o: ActiveSupport::Cache::Entry :@expires_in0:@compressedF: @value{ " _version"%fe06ce16d5b0149a7786c195d4c3c749" digest"%b35ea57d958ab0dfdb4ab002ae2c5baf" lengthiþ$" source"þ$/*! * jQuery JavaScript Library v1.4.2 * http://jquery.com/ * * Copyright 2010, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2010, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Sat Feb 13 22:33:48 2010 -0500 */ function addQueryString(a,b){var c=[];if(!b)return a;for(var d in b)c.push(d+"="+encodeURIComponent(b[d]));return a+(a.indexOf("?")!=-1?"&":"?")+c.join("&")}(function(a,b){function c(){if(!q.isReady){try{t.documentElement.doScroll("left")}catch(a){setTimeout(c,1);return}q.ready()}}function d(a,b){b.src?q.ajax({url:b.src,async:!1,dataType:"script"}):q.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function e(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&q.isFunction(d);for(j=0;j)[^>]*$|^#([\w-]+)$/,w=/^.[^:#\[\.,]*$/,x=/\S/,y=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,z=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,A=navigator.userAgent,B=!1,C=[],D,E=Object.prototype.toString,F=Object.prototype.hasOwnProperty,G=Array.prototype.push,H=Array.prototype.slice,I=Array.prototype.indexOf;q.fn=q.prototype={init:function(a,c){var d,e;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(a==="body"&&!c)return this.context=t,this[0]=t.body,this.selector="body",this.length=1,this;if(typeof a=="string"){if((d=v.exec(a))&&(d[1]||!c)){if(d[1])return e=c?c.ownerDocument||c:t,(a=z.exec(a))?q.isPlainObject(c)?(a=[t.createElement(a[1])],q.fn.attr.call(a,c,!0)):a=[e.createElement(a[1])]:(a=n([d[1]],[e]),a=(a.cacheable?a.fragment.cloneNode(!0):a.fragment).childNodes),q.merge(this,a);if(c=t.getElementById(d[2])){if(c.id!==d[2])return u.find(a);this.length=1,this[0]=c}return this.context=t,this.selector=a,this}return!c&&/^\w+$/.test(a)?(this.selector=a,this.context=t,a=t.getElementsByTagName(a),q.merge(this,a)):!c||c.jquery?(c||u).find(a):q(c).find(a)}return q.isFunction(a)?u.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),q.makeArray(a,this))},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return H.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,c){var d=q();return q.isArray(a)?G.apply(d,a):q.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return q.each(this,a,b)},ready:function(a){return q.bindReady(),q.isReady?a.call(t,q):C&&C.push(a),this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(H.apply(this,arguments),"slice",H.call(arguments).join(","))},map:function(a){return this.pushStack(q.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||q(null)},push:G,sort:[].sort,splice:[].splice},q.fn.init.prototype=q.fn,q.extend=q.fn.extend=function(){var a=arguments[0]||{},c=1,d=arguments.length,e=!1,f,g,h,i;typeof a=="boolean"&&(e=a,a=arguments[1]||{},c=2),typeof a!="object"&&!q.isFunction(a)&&(a={}),d===c&&(a=this,--c);for(;c
a";var g=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0];if(!(!g||!g.length||!h)){q.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:t.createElement("select").appendChild(t.createElement("option")).selected,parentNode:d.removeChild(d.appendChild(t.createElement("div"))).parentNode===null,deleteExpando:!0,checkClone:!1,scriptEval:!1,noCloneEvent:!0,boxModel:null},c.type="text/javascript";try{c.appendChild(t.createTextNode("window."+e+"=1;"))}catch(i){}b.insertBefore(c,b.firstChild),a[e]&&(q.support.scriptEval=!0,delete a[e]);try{delete c.test}catch(j){q.support.deleteExpando=!1}b.removeChild(c),d.attachEvent&&d.fireEvent&&(d.attachEvent("onclick",function k(){q.support.noCloneEvent=!1,d.detachEvent("onclick",k)}),d.cloneNode(!0).fireEvent("onclick")),d=t.createElement("div"),d.innerHTML="",b=t.createDocumentFragment(),b.appendChild(d.firstChild),q.support.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,q(function(){var a=t.createElement("div");a.style.width=a.style.paddingLeft="1px",t.body.appendChild(a),q.boxModel=q.support.boxModel=a.offsetWidth===2,t.body.removeChild(a).style.display="none"}),b=function(a){var b=t.createElement("div");a="on"+a;var c=a in b;return c||(b.setAttribute(a,"return;"),c=typeof b[a]=="function"),c},q.support.submitBubbles=b("submit"),q.support.changeBubbles=b("change"),b=c=d=g=h=null}}(),q.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var J="jQuery"+f(),K=0,L={};q.extend({cache:{},expando:J,noData:{embed:!0,object:!0,applet:!0},data:function(c,d,e){if(!c.nodeName||!q.noData[c.nodeName.toLowerCase()]){c=c==a?L:c;var f=c[J],g=q.cache;return!f&&typeof d=="string"&&e===b?null:(f||(f=++K),typeof d=="object"?(c[J]=f,g[f]=q.extend(!0,{},d)):g[f]||(c[J]=f,g[f]={}),c=g[f],e!==b&&(c[d]=e),typeof d=="string"?c[d]:c)}},removeData:function(b,c){if(!b.nodeName||!q.noData[b.nodeName.toLowerCase()]){b=b==a?L:b;var d=b[J],e=q.cache,f=e[d];c?f&&(delete f[c],q.isEmptyObject(f)&&q.removeData(b)):(q.support.deleteExpando?delete b[q.expando]:b.removeAttribute&&b.removeAttribute(q.expando),delete e[d])}}}),q.fn.extend({data:function(a,c){if(typeof a=="undefined"&&this.length)return q.data(this[0]);if(typeof a=="object")return this.each(function(){q.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(c===b){var e=this.triggerHandler("getData"+d[1]+"!",[d[0]]);return e===b&&this.length&&(e=q.data(this[0],a)),e===b&&d[1]?this.data(d[0]):e}return this.trigger("setData"+d[1]+"!",[d[0],c]).each(function(){q.data(this,a,c)})},removeData:function(a){return this.each(function(){q.removeData(this,a)})}}),q.extend({queue:function(a,b,c){if(a){b=(b||"fx")+"queue";var d=q.data(a,b);return c?(!d||q.isArray(c)?d=q.data(a,b,q.makeArray(c)):d.push(c),d):d||[]}},dequeue:function(a,b){b=b||"fx";var c=q.queue(a,b),d=c.shift();d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){q.dequeue(a,b)}))}}),q.fn.extend({queue:function(a,c){return typeof a!="string"&&(c=a,a="fx"),c===b?q.queue(this[0],a):this.each(function(){var b=q.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&q.dequeue(this,a)})},dequeue:function(a){return this.each(function(){q.dequeue(this,a)})},delay:function(a,b){return a=q.fx?q.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(){var c=this;setTimeout(function(){q.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var M=/[\n\t]/g,N=/\s+/,O=/\r/g,P=/href|src|style/,Q=/(button|input)/i,R=/(button|input|object|select|textarea)/i,S=/^(a|area)$/i,T=/radio|checkbox/;q.fn.extend({attr:function(a,b){return e(this,a,b,!0,q.attr)},removeAttr:function(a){return this.each(function(){q.attr(this,a,""),this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(q.isFunction(a))return this.each(function(b){var c=q(this);c.addClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string")for(var b=(a||"").split(N),c=0,d=this.length;c-1)return!0;return!1},val:function(a){if(a===b){var c=this[0];if(c){if(q.nodeName(c,"option"))return(c.attributes.value||{}).specified?c.value:c.text;if(q.nodeName(c,"select")){var d=c.selectedIndex,e=[],f=c.options;c=c.type==="select-one";if(d<0)return null;var g=c?d:0;for(d=c?d+1:f.length;g=0;else if(q.nodeName(this,"select")){var e=q.makeArray(d);q("option",this).each(function(){this.selected=q.inArray(q(this).val(),e)>=0}),e.length||(this.selectedIndex=-1)}else this.value=d}})}}),q.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8)return b;if(e&&c in q.attrFn)return q(a)[c](d);e=a.nodeType!==1||!q.isXMLDoc(a);var f=d!==b;c=e&&q.props[c]||c;if(a.nodeType===1){var g=P.test(c);return c in a&&e&&!g?(f&&(c==="type"&&Q.test(a.nodeName)&&a.parentNode&&q.error("type property can't be changed"),a[c]=d),q.nodeName(a,"form")&&a.getAttributeNode(c)?a.getAttributeNode(c).nodeValue:c==="tabIndex"?(c=a.getAttributeNode("tabIndex"))&&c.specified?c.value:R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b:a[c]):!q.support.style&&e&&c==="style"?(f&&(a.style.cssText=""+d),a.style.cssText):(f&&a.setAttribute(c,""+d),a=!q.support.hrefNormalized&&e&&g?a.getAttribute(c,2):a.getAttribute(c),a===null?b:a)}return q.style(a,c,d)}});var U=/\.(.*)$/,V=function(a){return a.replace(/[^\w\s\.\|`]/g,function(a){return"\\"+a})};q.event={add:function(c,d,e,f){if(c.nodeType!==3&&c.nodeType!==8){c.setInterval&&c!==a&&!c.frameElement&&(c=a);var g,h;e.handler&&(g=e,e=g.handler),e.guid||(e.guid=q.guid++);if(h=q.data(c)){var i=h.events=h.events||{},j=h.handle;j||(h.handle=j=function(){return typeof q!="undefined"&&!q.event.triggered?q.event.handle.apply(j.elem,arguments):b}),j.elem=c,d=d.split(" ");for(var k,l=0,m;k=d[l++];){h=g?q.extend({},g):{handler:e,data:f},k.indexOf(".")>-1?(m=k.split("."),k=m.shift(),h.namespace=m.slice(0).sort().join(".")):(m=[],h.namespace=""),h.type=k,h.guid=e.guid;var n=i[k],o=q.event.special[k]||{};if(!n){n=i[k]=[];if(!o.setup||o.setup.call(c,f,m,j)===!1)c.addEventListener?c.addEventListener(k,j,!1):c.attachEvent&&c.attachEvent("on"+k,j)}o.add&&(o.add.call(c,h),h.handler.guid||(h.handler.guid=e.guid)),n.push(h),q.event.global[k]=!0}c=null}}},global:{},remove:function(a,b,c,d){if(a.nodeType!==3&&a.nodeType!==8){var e,f=0,g,h,i,j,k,l,m=q.data(a),n=m&&m.events;if(m&&n){b&&b.type&&(c=b.handler,b=b.type);if(!b||typeof b=="string"&&b.charAt(0)==="."){b=b||"";for(e in n)q.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[f++];){j=e,g=e.indexOf(".")<0,h=[],g||(h=e.split("."),e=h.shift(),i=new RegExp("(^|\\.)"+q.map(h.slice(0).sort(),V).join("\\.(?:.*\\.)?")+"(\\.|$)"));if(k=n[e])if(c){j=q.event.special[e]||{};for(o=d||0;o=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),d||(a.stopPropagation(),q.event.global[f]&&q.each(q.cache,function(){this.events&&this.events[f]&&q.event.trigger(a,c,this.handle.elem)}));if(!d||d.nodeType===3||d.nodeType===8)return b;a.result=b,a.target=d,c=q.makeArray(c),c.unshift(a)}a.currentTarget=d,(e=q.data(d,"handle"))&&e.apply(d,c),e=d.parentNode||d.ownerDocument;try{d&&d.nodeName&&q.noData[d.nodeName.toLowerCase()]||d["on"+f]&&d["on"+f].apply(d,c)===!1&&(a.result=!1)}catch(g){}if(!a.isPropagationStopped()&&e)q.event.trigger(a,c,e,!0);else if(!a.isDefaultPrevented()){e=a.target;var h,i=q.nodeName(e,"a")&&f==="click",j=q.event.special[f]||{};if((!j._default||j._default.call(d,a)===!1)&&!i&&!(e&&e.nodeName&&q.noData[e.nodeName.toLowerCase()])){try{if(e[f]){if(h=e["on"+f])e["on"+f]=null;q.event.triggered=!0,e[f]()}}catch(k){}h&&(e["on"+f]=h),q.event.triggered=!1}}},handle:function(c){var d,e,f,g;c=arguments[0]=q.event.fix(c||a.event),c.currentTarget=this,d=c.type.indexOf(".")<0&&!c.exclusive,d||(e=c.type.split("."),c.type=e.shift(),f=new RegExp("(^|\\.)"+e.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")),g=q.data(this,"events"),e=g[c.type];if(g&&e){e=e.slice(0),g=0;for(var h=e.length;g-1?q.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex),c},ba=function(a,c){var d=a.target,e,f;if(!!Z.test(d.nodeName)&&!d.readOnly){e=q.data(d,"_change_data"),f=_(d),(a.type!=="focusout"||d.type!=="radio")&&q.data(d,"_change_data",f);if(e!==b&&f!==e)if(e!=null||f)return a.type="change",q.event.trigger(a,c,d)}};q.event.special.change={filters:{focusout:ba,click:function(a){var b=a.target,c=b.type;if(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")return ba.call(this,a)},keydown:function(a){var b=a.target,c=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")return ba.call(this,a)},beforeactivate:function(a){a=a.target,q.data(a,"_change_data",_(a))}},setup:function(){if(this.type==="file")return!1;for(var a in $)q.event.add(this,a+".specialChange",$[a]);return Z.test(this.nodeName)},teardown:function(){return q.event.remove(this,".specialChange"),Z.test(this.nodeName)}},$=q.event.special.change.filters}t.addEventListener&&q.each({focus:"focusin",blur:"focusout"},function(a,b){function c(a){return a=q.event.fix(a),a.type=b,q.event.handle.call(this,a)}q.event.special[b]={setup:function(){this.addEventListener(a,c,!0)},teardown:function(){this.removeEventListener(a,c,!0)}}}),q.each(["bind","one"],function(a,c){q.fn[c]=function(a,d,e){if(typeof a=="object"){for(var f in a)this[c](f,d,a[f],e);return this}q.isFunction(d)&&(e=d,d=b);var g=c==="one"?q.proxy(e,function(a){return q(this).unbind(a,g),e.apply(this,arguments)}):e;if(a==="unload"&&c!=="one")this.one(a,d,e);else{f=0;for(var h=this.length;f0){i=h;break}}h=h[a]}d[e]=i}}}var e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,f=0,g=Object.prototype.toString,h=!1,i=!0;[0,0].sort(function(){return i=!1,0});var j=function(a,b,c,d){c=c||[];var f=b=b||t;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!="string")return c;for(var h=[],i,m,o,p,q=!0,v=s(b),w=a;(e.exec(""),i=e.exec(w))!==null;){w=i[3],h.push(i[1]);if(i[2]){p=i[3];break}}if(h.length>1&&l.exec(a))if(h.length===2&&k.relative[h[0]])m=u(h[0]+h[1],b);else for(m=k.relative[h[0]]?[b]:j(h.shift(),b);h.length;)a=h.shift(),k.relative[a]&&(a+=h.shift()),m=u(a,m);else{!d&&h.length>1&&b.nodeType===9&&!v&&k.match.ID.test(h[0])&&!k.match.ID.test(h[h.length-1])&&(i=j.find(h.shift(),b,v),b=i.expr?j.filter(i.expr,i.set)[0]:i.set[0]);if(b){i=d?{expr:h.pop(),set:n(d)}:j.find(h.pop(),h.length!==1||h[0]!=="~"&&h[0]!=="+"||!b.parentNode?b:b.parentNode,v),m=i.expr?j.filter(i.expr,i.set):i.set,h.length>0?o=n(m):q=!1;for(;h.length;){var x=h.pop();i=x,k.relative[x]?i=h.pop():x="",i==null&&(i=b),k.relative[x](o,i,v)}}else o=[]}o||(o=m),o||j.error(x||a);if(g.call(o)==="[object Array]")if(q)if(b&&b.nodeType===1)for(a=0;o[a]!=null;a++)o[a]&&(o[a]===!0||o[a].nodeType===1&&r(b,o[a]))&&c.push(m[a]);else for(a=0;o[a]!=null;a++)o[a]&&o[a].nodeType===1&&c.push(m[a]);else c.push.apply(c,o);else n(o,c);return p&&(j(p,f,c,d),j.uniqueSort(c)),c};j.uniqueSort=function(a){if(p){h=i,a.sort(p);if(h)for(var b=1;b":function(a,b){var c=typeof b=="string";if(c&&!/\W/.test(b)){b=b.toLowerCase();for(var d=0,e=a.length;d=0)?c||d.push(g):c&&(b[f]=!1));return!1},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){var b=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}return a[0]=f++,a},ATTR:function(a,b,c,d,e,f){return b=a[1].replace(/\\/g,""),!f&&k.attrMap[b]&&(a[1]=k.attrMap[b]),a[2]==="~="&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(a,b,c,d,f){if(a[1]==="not")if((e.exec(a[3])||"").length>1||/^\w/.test(a[3]))a[3]=j(a[3],null,null,b);else return a=j.filter(a[3],b,c,!0^f),c||d.push.apply(d,a),!1;else if(k.match.POS.test(a[0])||k.match.CHILD.test(a[0]))return!0;return a},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!j(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(b,c,d,e){var f=c[1],g=k.filters[f];if(g)return g(b,d,c,e);if(f==="contains")return(b.textContent||b.innerText||a([b])||"").indexOf(c[3])>=0;if(f==="not"){c=c[3],d=0;for(e=c.length;d=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1];a=k.attrHandle[c]?k.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),c=a+"";var d=b[2];return b=b[4],a==null?d==="!=":d==="="?c===b:d==="*="?c.indexOf(b)>=0:d==="~="?(" "+c+" ").indexOf(b)>=0:b?d==="!="?c!==b:d==="^="?c.indexOf(b)===0:d==="$="?c.substr(c.length-b.length)===b:d==="|="?c===b||c.substr(0,b.length+1)===b+"-":!1:c&&a!==!1},POS:function(a,b,c,d){var e=k.setFilters[b[2]];if(e)return e(a,c,b,d)}}},l=k.match.POS;for(var m in k.match)k.match[m]=new RegExp(k.match[m].source+/(?![^\[]*\])(?![^\(]*\))/.source),k.leftMatch[m]=new RegExp(/(^(?:.|\r|\n)*?)/.source+k.match[m].source.replace(/\\(\d+)/g,function(a,b){return"\\"+(b-0+1)}));var n=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(o){n=function(a,b){b=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(b,a);else if(typeof a.length=="number")for(var c=0,d=a.length;c";var d=t.documentElement;d.insertBefore(a,d.firstChild),t.getElementById(c)&&(k.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d)return(c=c.getElementById(a[1]))?c.id===a[1]||typeof c.getAttributeNode!="undefined"&&c.getAttributeNode("id").nodeValue===a[1]?[c]:b:[]},k.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),d.removeChild(a),d=a=null}(),function(){var a=t.createElement("div");a.appendChild(t.createComment("")),a.getElementsByTagName("*").length>0&&(k.find.TAG=function(a,b){b=b.getElementsByTagName(a[1]);if(a[1]==="*"){a=[];for(var c=0;b[c];c++)b[c].nodeType===1&&a.push(b[c]);b=a}return b}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(k.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),t.querySelectorAll&&function(){var a=j,b=t.createElement("div");b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){j=function(b,c,d,e){c=c||t;if(!e&&c.nodeType===9&&!s(c))try{return n(c.querySelectorAll(b),d)}catch(f){}return a(b,c,d,e)};for(var c in a)j[c]=a[c];b=null}}(),function(){var a=t.createElement("div");a.innerHTML="
",!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0&&(a.lastChild.className="e",a.getElementsByClassName("e").length!==1&&(k.order.splice(1,0,"CLASS"),k.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null))}();var r=t.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:function(a,b){return a!==b&&(a.contains?a.contains(b):!0)},s=function(a){return(a=(a?a.ownerDocument||a:0).documentElement)?a.nodeName!=="HTML":!1},u=function(a,b){var c=[],d="",e;for(b=b.nodeType?[b]:b;e=k.match.PSEUDO.exec(a);)d+=e[0],a=a.replace(k.match.PSEUDO,"");a=k.relative[a]?a+"*":a,e=0;for(var f=b.length;e=0===c})};q.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),c=0,d=0,e=this.length;d0)for(var f=c;f0},closest:function(a,b){if(q.isArray(a)){var c=[],d=this[0],e,f={},g;if(d&&a.length){e=0;for(var h=a.length;e-1:q(d).is(e))c.push({selector:g,elem:d}),delete f[g]}d=d.parentNode}}return c}var i=q.expr.match.POS.test(a)?q(a,b||this.context):null;return this.map(function(c,d){for(;d&&d.ownerDocument&&d!==b;){if(i?i.index(d)>-1:q(d).is(a))return d;d=d.parentNode}return null})},index:function(a){return!a||typeof a=="string"?q.inArray(this[0],a?q(a):this.parent().children()):q.inArray(a.jquery?a[0]:a,this)},add:function(a,b){return a=typeof a=="string"?q(a,b||this.context):q.makeArray(a),b=q.merge(this.get(),a),this.pushStack(l(a[0])||l(b[0])?b:q.unique(b))},andSelf:function(){return this.add(this.prevObject)}}),q.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return q.dir(a,"parentNode")},parentsUntil:function(a,b,c){return q.dir(a,"parentNode",c)},next:function(a){return q.nth(a,2,"nextSibling")},prev:function(a){return q.nth(a,2,"previousSibling")},nextAll:function(a){return q.dir(a,"nextSibling")},prevAll:function(a){return q.dir(a,"previousSibling")},nextUntil:function(a,b,c){return q.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return q.dir(a,"previousSibling",c)},siblings:function(a){return q.sibling(a.parentNode.firstChild,a)},children:function(a){return q.sibling(a.firstChild)},contents:function(a){return q.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:q.makeArray(a.childNodes)}},function(a,b){q.fn[a]=function(c,d){var e=q.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=q.filter(d,e)),e=this.length>1?q.unique(e):e,(this.length>1||be.test(d))&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,H.call(arguments).join(","))}}),q.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),q.find.matches(a,b)},dir:function(a,c,d){var e=[];for(a=a[c];a&&a.nodeType!==9&&(d===b||a.nodeType!==1||!q(a).is(d));)a.nodeType===1&&e.push(a),a=a[c];return e},nth:function(a,b,c){b=b||1;for(var d=0;a;a=a[c])if(a.nodeType===1&&++d===b)break;return a},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bg=/ jQuery\d+="(?:\d+|null)"/g,bh=/^\s+/,bi=/(<([\w:]+)[^>]*?)\/>/g,bj=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,bk=/<([\w:]+)/,bl=/"},bq={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};bq.optgroup=bq.option,bq.tbody=bq.tfoot=bq.colgroup=bq.caption=bq.thead,bq.th=bq.td,q.support.htmlSerialize||(bq._default=[1,"div
","
"]),q.fn.extend({text:function(a){return q.isFunction(a)?this.each(function(b){var c=q(this);c.text(a.call(this,b,c.text()))}):typeof a!="object"&&a!==b?this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a)):q.text(this)},wrapAll:function(a){if(q.isFunction(a))return this.each(function(b){q(this).wrapAll(a.call(this,b))});if(this[0]){var b=q(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&a.firstChild.nodeType===1;)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return q.isFunction(a)?this.each(function(b){q(this).wrapInner(a.call(this,b))}):this.each(function(){var b=q(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){q(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){q.nodeName(this,"body")||q(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=q(arguments[0]);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,q(arguments[0]).toArray()),a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||q.filter(a,[d]).length)!b&&d.nodeType===1&&(q.cleanData(d.getElementsByTagName("*")),q.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&q.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);return this},clone:function(a){var b=this.map(function(){if(!q.support.noCloneEvent&&!q.isXMLDoc(this)){var a=this.outerHTML,b=this.ownerDocument;return a||(a=b.createElement("div"),a.appendChild(this.cloneNode(!0)),a=a.innerHTML),q.clean([a.replace(bg,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(bh,"")],b)[0]}return this.cloneNode(!0)});return a===!0&&(m(this,b),m(this.find("*"),b.find("*"))),b},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(bg,""):null;if(typeof a=="string"&&!bn.test(a)&&(q.support.leadingWhitespace||!bh.test(a))&&!bq[(bk.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bi,bp);try{for(var c=0,d=this.length;c0||g.cacheable||this.length>1?k.cloneNode(!0):k)}j.length&&q.each(j,d)}return this}}),q.fragments={},q.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){q.fn[a]=function(c){var d=[];c=q(c);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&c.length===1)return c[b](this[0]),this;e=0;for(var f=c.length;e0?this.clone(!0):this).get();q.fn[b].apply(q(c[e]),g),d=d.concat(g)}return this.pushStack(d,a,c.selector)}}),q.extend({clean:function(a,b,c,d){b=b||t,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||t);for(var e=[],f=0,g;(g=a[f])!=null;f++){typeof g=="number"&&(g+="");if(g){if(typeof g=="string"&&!bm.test(g))g=b.createTextNode(g);else if(typeof g=="string"){g=g.replace(bi,bp);var h=(bk.exec(g)||["",""])[1].toLowerCase(),i=bq[h]||bq._default,j=i[0],k=b.createElement("div");for(k.innerHTML=i[1]+g+i[2];j--;)k=k.lastChild;if(!q.support.tbody){j=bl.test(g),h=h==="table"&&!j?k.firstChild&&k.firstChild.childNodes:i[1]===""&&!j?k.childNodes:[];for(i=h.length-1;i>=0;--i)q.nodeName(h[i],"tbody")&&!h[i].childNodes.length&&h[i].parentNode.removeChild(h[i])}!q.support.leadingWhitespace&&bh.test(g)&&k.insertBefore(b.createTextNode(bh.exec(g)[0]),k.firstChild),g=k.childNodes}g.nodeType?e.push(g):e=q.merge(e,g)}}if(c)for(f=0;e[f];f++)d&&q.nodeName(e[f],"script")&&(!e[f].type||e[f].type.toLowerCase()==="text/javascript")?d.push(e[f].parentNode?e[f].parentNode.removeChild(e[f]):e[f]):(e[f].nodeType===1&&e.splice.apply(e,[f+1,0].concat(q.makeArray(e[f].getElementsByTagName("script")))),c.appendChild(e[f]));return e},cleanData:function(a){for(var b,c,d=q.cache,e=q.event.special,f=q.support.deleteExpando,g=0,h;(h=a[g])!=null;g++)if(c=h[q.expando]){b=d[c];if(b.events)for(var i in b.events)e[i]?q.event.remove(h,i):W(h,i,b.handle);f?delete h[q.expando]:h.removeAttribute&&h.removeAttribute(q.expando),delete d[c]}}});var br=/z-?index|font-?weight|opacity|zoom|line-?height/i,bs=/alpha\([^)]*\)/,bt=/opacity=([^)]*)/,bu=/float/i,bv=/-([a-z])/ig,bw=/([A-Z])/g,bx=/^-?\d+(?:px)?$/i,by=/^-?\d/,bz={position:"absolute",visibility:"hidden",display:"block"},bA=["Left","Right"],bB=["Top","Bottom"],bC=t.defaultView&&t.defaultView.getComputedStyle,bD=q.support.cssFloat?"cssFloat":"styleFloat",bE=function(a,b){return b.toUpperCase()};q.fn.css=function(a,c){return e(this,a,c,!0,function(a,c,d){if(d===b)return q.curCSS(a,c);typeof d=="number"&&!br.test(c)&&(d+="px"),q.style(a,c,d)})},q.extend({style:function(a,c,d){if(!a||a.nodeType===3||a.nodeType===8)return b;(c==="width"||c==="height")&&parseFloat(d)<0&&(d=b);var e=a.style||a,f=d!==b;return!q.support.opacity&&c==="opacity"?(f&&(e.zoom=1,c=parseInt(d,10)+""=="NaN"?"":"alpha(opacity="+d*100+")",a=e.filter||q.curCSS(a,"filter")||"",e.filter=bs.test(a)?a.replace(bs,c):c),e.filter&&e.filter.indexOf("opacity=")>=0?parseFloat(bt.exec(e.filter)[1])/100+"":""):(bu.test(c)&&(c=bD),c=c.replace(bv,bE),f&&(e[c]=d),e[c])},css:function(a,b,c,d){if(b==="width"||b==="height"){var e,f=b==="width"?bA:bB;function g(){e=b==="width"?a.offsetWidth:a.offsetHeight,d!=="border"&&q.each(f,function(){d||(e-=parseFloat(q.curCSS(a,"padding"+this,!0))||0),d==="margin"?e+=parseFloat(q.curCSS(a,"margin"+this,!0))||0:e-=parseFloat(q.curCSS(a,"border"+this+"Width",!0))||0})}return a.offsetWidth!==0?g():q.swap(a,bz,g),Math.max(0,Math.round(e))}return q.curCSS(a,b,c)},curCSS:function(a,b,c){var d,e=a.style;if(!q.support.opacity&&b==="opacity"&&a.currentStyle)return d=bt.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"",d===""?"1":d;bu.test(b)&&(b=bD);if(!c&&e&&e[b])d=e[b];else if(bC){bu.test(b)&&(b="float"),b=b.replace(bw,"-$1").toLowerCase(),e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))d=a.getPropertyValue(b);b==="opacity"&&d===""&&(d="1")}else if(a.currentStyle){c=b.replace(bv,bE),d=a.currentStyle[b]||a.currentStyle[c];if(!bx.test(d)&&by.test(d)){b=e.left;var f=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left,e.left=c==="fontSize"?"1em":d||0,d=e.pixelLeft+"px",e.left=b,a.runtimeStyle.left=f}}return d},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),q.expr&&q.expr.filters&&(q.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight,d=a.nodeName.toLowerCase()==="tr";return b===0&&c===0&&!d?!0:b>0&&c>0&&!d?!1:q.curCSS(a,"display")==="none"},q.expr.filters.visible=function(a){return!q.expr.filters.hidden(a)});var bF=f(),bG=//gi,bH=/select|textarea/i,bI=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,bJ=/=\?(&|$)/,bK=/\?/,bL=/(\?|&)_=.*?(&|$)/,bM=/^(\w+:)?\/\/([^\/?#]+)/,bN=/%20/g,bO=q.fn.load;q.fn.extend({load:function(a,b,c){if(typeof a!="string")return bO.call(this,a);if(!this.length)return this;var d=a.indexOf(" ");if(d>=0){var e=a.slice(d,a.length);a=a.slice(0,d)}d="GET",b&&(q.isFunction(b)?(c=b,b=null):typeof b=="object"&&(b=q.param(b,q.ajaxSettings.traditional),d="POST"));var f=this;return q.ajax({url:a,type:d,dataType:"html",data:b,complete:function(a,b){(b==="success"||b==="notmodified")&&f.html(e?q("
").append(a.responseText.replace(bG,"")).find(e):a.responseText),c&&f.each(c,[a.responseText,b,a])}}),this},serialize:function(){return q.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?q.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bH.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){return a=q(this).val(),a==null?null:q.isArray(a)?q.map(a,function(a){return{name:b.name,value:a}}):{name:b.name,value:a}}).get()}}),q.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){q.fn[b]=function(a){return this.bind(b,a)}}),q.extend({get:function(a,b,c,d){return q.isFunction(b)&&(d=d||c,c=b,b=null),q.ajax({type:"GET",url:a,data:b,success:c,dataType:d})},getScript:function(a,b){return q.get(a,null,b,"script")},getJSON:function(a,b,c){return q.get(a,b,c,"json")},post:function(a,b,c,d){return q.isFunction(b)&&(d=d||c,c=b,b={}),q.ajax({type:"POST",url:a,data:b,success:c,dataType:d})},ajaxSetup:function(a){q.extend(q.ajaxSettings,a)},ajaxSettings:{url:location.href,global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,xhr:a.XMLHttpRequest&&(a.location.protocol!=="file:"||!a.ActiveXObject)?function(){return new a.XMLHttpRequest}:function(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(c){function d(){h.success&&h.success.call(l,k,j,v),h.global&&g("ajaxSuccess",[v,h])}function e(){h.complete&&h.complete.call(l,v,j),h.global&&g("ajaxComplete",[v,h]),h.global&&!--q.active&&q.event.trigger("ajaxStop")}function g(a,b){(h.context?q(h.context):q.event).trigger(a,b)}var h=q.extend(!0,{},q.ajaxSettings,c),i,j,k,l=c&&c.context||h,m=h.type.toUpperCase();h.data&&h.processData&&typeof h.data!="string"&&(h.data=q.param(h.data,h.traditional));if(h.dataType==="jsonp"){if(m==="GET")bJ.test(h.url)||(h.url+=(bK.test(h.url)?"&":"?")+(h.jsonp||"callback")+"=?");else if(!h.data||!bJ.test(h.data))h.data=(h.data?h.data+"&":"")+(h.jsonp||"callback")+"=?";h.dataType="json"}h.dataType==="json"&&(h.data&&bJ.test(h.data)||bJ.test(h.url))&&(i=h.jsonpCallback||"jsonp"+bF++,h.data&&(h.data=(h.data+"").replace(bJ,"="+i+"$1")),h.url=h.url.replace(bJ,"="+i+"$1"),h.dataType="script",a[i]=a[i]||function(c){k=c,d(),e(),a[i]=b;try{delete a[i]}catch(f){}p&&p.removeChild(r)}),h.dataType==="script"&&h.cache===null&&(h.cache=!1);if(h.cache===!1&&m==="GET"){var n=f(),o=h.url.replace(bL,"$1_="+n+"$2");h.url=o+(o===h.url?(bK.test(h.url)?"&":"?")+"_="+n:"")}h.data&&m==="GET"&&(h.url+=(bK.test(h.url)?"&":"?")+h.data),h.global&&!(q.active++)&&q.event.trigger("ajaxStart"),n=(n=bM.exec(h.url))&&(n[1]&&n[1]!==location.protocol||n[2]!==location.host);if(h.dataType==="script"&&m==="GET"&&n){var p=t.getElementsByTagName("head")[0]||t.documentElement,r=t.createElement("script");r.src=h.url,h.scriptCharset&&(r.charset=h.scriptCharset);if(!i){var s=!1;r.onload=r.onreadystatechange=function(){!s&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")&&(s=!0,d(),e(),r.onload=r.onreadystatechange=null,p&&r.parentNode&&p.removeChild(r))}}return p.insertBefore(r,p.firstChild),b}var u=!1,v=h.xhr();if(v){h.username?v.open(m,h.url,h.async,h.username,h.password):v.open(m,h.url,h.async);try{(h.data||c&&c.contentType)&&v.setRequestHeader("Content-Type",h.contentType),h.ifModified&&(q.lastModified[h.url]&&v.setRequestHeader("If-Modified-Since",q.lastModified[h.url]),q.etag[h.url]&&v.setRequestHeader("If-None-Match",q.etag[h.url])),n||v.setRequestHeader("X-Requested-With","XMLHttpRequest"),v.setRequestHeader("Accept",h.dataType&&h.accepts[h.dataType]?h.accepts[h.dataType]+", */*":h.accepts._default)}catch(w){}if(h.beforeSend&&h.beforeSend.call(l,v,h)===!1)return h.global&&!--q.active&&q.event.trigger("ajaxStop"),v.abort(),!1;h.global&&g("ajaxSend",[v,h]);var x=v.onreadystatechange=function(a){if(!v||v.readyState===0||a==="abort")u||e(),u=!0,v&&(v.onreadystatechange=q.noop);else if(!u&&v&&(v.readyState===4||a==="timeout")){u=!0,v.onreadystatechange=q.noop,j=a==="timeout"?"timeout":q.httpSuccess(v)?h.ifModified&&q.httpNotModified(v,h.url)?"notmodified":"success":"error";var b;if(j==="success")try{k=q.httpData(v,h.dataType,h)}catch(c){j="parsererror",b=c}j==="success"||j==="notmodified"?i||d():q.handleError(h,v,j,b),e(),a==="timeout"&&v.abort(),h.async&&(v=null)}};try{var y=v.abort;v.abort=function(){v&&y.call(v),x("abort")}}catch(z){}h.async&&h.timeout>0&&setTimeout(function(){v&&!u&&x("timeout")},h.timeout);try{v.send(m==="POST"||m==="PUT"||m==="DELETE"?h.data:null)}catch(A){q.handleError(h,v,null,A),e()}return h.async||x(),v}},handleError:function(a,b,c,d){a.error&&a.error.call(a.context||a,b,c,d),a.global&&(a.context?q(a.context):q.event).trigger("ajaxError",[b,a,d])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return!1},httpNotModified:function(a,b){var c=a.getResponseHeader("Last-Modified"),d=a.getResponseHeader("Etag");return c&&(q.lastModified[b]=c),d&&(q.etag[b]=d),a.status===304||a.status===0},httpData:function(a,b,c){var d=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&d.indexOf("xml")>=0;return a=e?a.responseXML:a.responseText,e&&a.documentElement.nodeName==="parsererror"&&q.error("parsererror"),c&&c.dataFilter&&(a=c.dataFilter(a,b)),typeof a=="string"&&(b==="json"||!b&&d.indexOf("json")>=0?a=q.parseJSON(a):(b==="script"||!b&&d.indexOf("javascript")>=0)&&q.globalEval(a)),a},param:function(a,c){function d(a,b){q.isArray(b)?q.each(b,function(b,f){c||/\[\]$/.test(a)?e(a,f):d(a+"["+(typeof f=="object"||q.isArray(f)?b:"")+"]",f)}):!c&&b!=null&&typeof b=="object"?q.each(b,function(b,c){d(a+"["+b+"]",c)}):e(a,b)}function e(a,b){b=q.isFunction(b)?b():b,f[f.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)}var f=[];c===b&&(c=q.ajaxSettings.traditional);if(q.isArray(a)||a.jquery)q.each(a,function(){e(this.name,this.value)});else for(var g in a)d(g,a[g]);return f.join("&").replace(bN,"+")}});var bP={},bQ=/toggle|show|hide/,bR=/^([+-]=)?([\d+-.]+)(.*)$/,bS,bT=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];q.fn.extend({show:function(a,b){if(a||a===0)return this.animate(o("show",3),a,b);a=0;for(b=this.length;a").appendTo("body");d=e.css("display"),d==="none"&&(d="block"),e.remove(),bP[c]=d}q.data(this[a],"olddisplay",d)}}a=0;for(b=this.length;a=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue(),this}}),q.each({slideDown:o("show",1),slideUp:o("hide",1),slideToggle:o("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){q.fn[a]=function(a,c){return this.animate(b,a,c)}}),q.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?a:{complete:c||!c&&b||q.isFunction(a)&&a,duration:a,easing:c&&b||b&&!q.isFunction(b)&&b};return d.duration=q.fx.off?0:typeof d.duration=="number"?d.duration:q.fx.speeds[d.duration]||q.fx.speeds._default,d.old=d.complete,d.complete=function(){d.queue!==!1&&q(this).dequeue(),q.isFunction(d.old)&&d.old.call(this)},d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),q.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(q.fx.step[this.prop]||q.fx.step._default)(this),(this.prop==="height"||this.prop==="width")&&this.elem.style&&(this.elem.style.display="block")},cur:function(a){return this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null?(a=parseFloat(q.css(this.elem,this.prop,a)))&&a>-1e4?a:parseFloat(q.curCSS(this.elem,this.prop))||0:this.elem[this.prop]},custom:function(a,b,c){function d(a){return e.step(a)}this.startTime=f(),this.start=a,this.end=b,this.unit=c||this.unit||"px",this.now=this.start,this.pos=this.state=0;var e=this;d.elem=this.elem,d()&&q.timers.push(d)&&!bS&&(bS=setInterval(q.fx.tick,13))},show:function(){this.options.orig[this.prop]=q.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),q(this.elem).show()},hide:function(){this.options.orig[this.prop]=q.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=f(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var d in this.options.curAnim)this.options.curAnim[d]!==!0&&(c=!1);if(c){this.options.display!=null&&(this.elem.style.overflow=this.options.overflow,a=q.data(this.elem,"olddisplay"),this.elem.style.display=a?a:this.options.display,q.css(this.elem,"display")==="none"&&(this.elem.style.display="block")),this.options.hide&&q(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)q.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return!1}return e=b-this.startTime,this.state=e/this.options.duration,a=this.options.easing||(q.easing.swing?"swing":"linear"),this.pos=q.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),!0}},q.extend(q.fx,{tick:function(){for(var a=q.timers,b=0;b
",a.insertBefore(b,a.firstChild),c=b.firstChild,d=c.firstChild,e=c.nextSibling.firstChild.firstChild,this.doesNotAddBorder=d.offsetTop!==5,this.doesAddBorderForTableAndCells=e.offsetTop===5,d.style.position="fixed",d.style.top="20px",this.supportsFixedPosition=d.offsetTop===20||d.offsetTop===15,d.style.position=d.style.top="",c.style.overflow="hidden",c.style.position="relative",this.subtractsBorderForOverflowNotVisible=d.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==f,a.removeChild(b),q.offset.initialize=q.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return q.offset.initialize(),q.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(q.curCSS(a,"marginTop",!0))||0,c+=parseFloat(q.curCSS(a,"marginLeft",!0))||0),{top:b,left:c}},setOffset:function(a,b,c){/static/.test(q.curCSS(a,"position"))&&(a.style.position="relative");var d=q(a),e=d.offset(),f=parseInt(q.curCSS(a,"top",!0),10)||0,g=parseInt(q.curCSS(a,"left",!0),10)||0;q.isFunction(b)&&(b=b.call(a,c,e)),c={top:b.top-e.top+f,left:b.left-e.left+g},"using"in b?b.using.call(a,c):d.css(c)}},q.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(q.curCSS(a,"marginTop",!0))||0,c.left-=parseFloat(q.curCSS(a,"marginLeft",!0))||0,d.top+=parseFloat(q.curCSS(b[0],"borderTopWidth",!0))||0,d.left+=parseFloat(q.curCSS(b[0],"borderLeftWidth",!0))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!/^body|html$/i.test(a.nodeName)&&q.css(a,"position")==="static";)a=a.offsetParent;return a})}}),q.each(["Left","Top"],function(a,c){var d="scroll"+c;q.fn[d]=function(c){var e=this[0],f;return e?c!==b?this.each(function(){(f=p(this))?f.scrollTo(a?q(f).scrollLeft():c,a?c:q(f).scrollTop()):this[d]=c}):(f=p(e))?"pageXOffset"in f?f[a?"pageYOffset":"pageXOffset"]:q.support.boxModel&&f.document.documentElement[d]||f.document.body[d]:e[d]:null}}),q.each(["Height","Width"],function(a,c){var d=c.toLowerCase();q.fn["inner"+c]=function(){return this[0]?q.css(this[0],d,!1,"padding"):null},q.fn["outer"+c]=function(a){return this[0]?q.css(this[0],d,!1,a?"margin":"border"):null},q.fn[d]=function(a){var e=this[0];return e?q.isFunction(a)?this.each(function(b){var c=q(this);c[d](a.call(this,b,c[d]()))}):"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+c]||e.document.body["client"+c]:e.nodeType===9?Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]):a===b?q.css(e,d):this.css(d,typeof a=="string"?a:a+"px"):a==null?null:this}}),a.jQuery=a.$=q})(window),jQuery(function(a){var b=a("meta[name=csrf-token]").attr("content"),c=a("meta[name=csrf-param]").attr("content");a.fn.extend({triggerAndReturn:function(b,c){var d=new a.Event(b);return this.trigger(d,c),d.result!==!1},callRemote:function(){var b=this,c=b.attr("method")||b.attr("data-method")||"GET",d=b.attr("action")||b.attr("href"),e=b.attr("data-type")||"script";if(d===undefined)throw"No URL specified for remote call (action or href must be present).";if(b.triggerAndReturn("ajax:before")){var f=b.is("form")?b.serializeArray():[];a.ajax({url:d,data:f,dataType:e,type:c.toUpperCase(),beforeSend:function(a){b.trigger("ajax:loading",a)},success:function(a,c,d){b.trigger("ajax:success",[a,c,d])},complete:function(a){b.trigger("ajax:complete",a)},error:function(a,c,d){b.trigger("ajax:failure",[a,c,d])}})}b.trigger("ajax:after")}}),a("a[data-confirm],input[data-confirm]").live("click",function(){var b=a(this);if(b.triggerAndReturn("confirm")&&!confirm(b.attr("data-confirm")))return!1}),a("form[data-remote]").live("submit",function(b){a(this).callRemote(),b.preventDefault()}),a("a[data-remote],input[data-remote]").live("click",function(b){a(this).callRemote(),b.preventDefault()}),a("a[data-method]:not([data-remote])").live("click",function(d){var e=a(this),f=e.attr("href"),g=e.attr("data-method"),h=a('
'),i='';c!=null&&b!=null&&(i+=''),h.hide().append(i).appendTo("body"),d.preventDefault(),h.submit()});var d="input[data-disable-with]",e="form[data-remote]:has("+d+")";a(e).live("ajax:before",function(){a(this).find(d).each(function(){var b=a(this);b.data("enable-with",b.val()).attr("value",b.attr("data-disable-with")).attr("disabled","disabled")})}),a(e).live("ajax:complete",function(){a(this).find(d).each(function(){var b=a(this);b.removeAttr("disabled").val(b.data("enable-with"))})})}),function(a){a.ui=a.ui||{},a.ui.version||(a.extend(a.ui,{version:"1.8.2",plugin:{add:function(b,d,e){b=a.ui[b].prototype;for(var f in e)b.plugins[f]=b.plugins[f]||[],b.plugins[f].push([d,e[f]])},call:function(a,b,c){if((b=a.plugins[b])&&a.element[0].parentNode)for(var d=0;d0?!0:(b[d]=1,e=b[d]>0,b[d]=0,e)},isOverAxis:function(a,b,c){return a>b&&a=0)&&a(b).is(":focusable")}}))}(jQuery),function(d){function J(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._inDialog=this._datepickerShowing=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1},d.extend(this._defaults,this.regional[""]),this.dpDiv=d('
')}function E(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.2"}});var y=(new Date).getTime();d.extend(J.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){return E(this._defaults,a||{}),this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase(),f=e=="div"||e=="span",a.id||(this.uuid+=1,a.id="dp"+this.uuid);var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{}),e=="input"?this._connectDatepicker(a,i):f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:b?d('
'):this.dpDiv}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]),b.trigger=d([]),c.hasClass(this.markerClassName)||(this._attachments(c,b),c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),this._autoSize(b),d.data(a,"datepicker",b))},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove(),c&&(b.append=d(''+c+""),a[e?"before":"after"](b.append)),a.unbind("focus",this._showDatepicker),b.trigger&&b.trigger.remove(),c=this._get(b,"showOn"),(c=="focus"||c=="both")&&a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f==""?c:d("").attr({src:f,alt:c,title:c}))),a[e?"before":"after"](b.trigger),b.trigger.click(function(){return d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():d.datepicker._showDatepicker(a[0]),!1})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){for(var b=0,c=0,d=0;db&&(b=a[d].length,c=d);return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort"))),b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=d(a);c.hasClass(this.markerClassName)||(c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)}),d.data(a,"datepicker",b),this._setDate(b,this._getDefaultDate(b),!0),this._updateDatepicker(b),this._updateAlternate(b))},_dialogDatepicker:function(a,b,c,e,f){return a=this._dialogInst,a||(this.uuid+=1,this._dialogInput=d(''),this._dialogInput.keydown(this._doKeyDown),d("body").append(this._dialogInput),a=this._dialogInst=this._newInst(this._dialogInput,!1),a.settings={},d.data(this._dialogInput[0],"datepicker",a)),E(a.settings,e||{}),b=b&&b.constructor==Date?this._formatDate(a,b):b,this._dialogInput.val(b),this._pos=f?f.length?f:[f.pageX,f.pageY]:null,this._pos||(this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),a.settings.onSelect=c,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),d.blockUI&&d.blockUI(this.dpDiv),d.data(this._dialogInput[0],"datepicker",a),this},_destroyDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker"),e=="input"?(c.append.remove(),c.trigger.remove(),b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):(e=="div"||e=="span")&&b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();e=="input"?(a.disabled=!1,c.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):(e=="div"||e=="span")&&b.children("."+this._inlineClass).children().removeClass("ui-state-disabled"),this._disabledInputs=d.map(this._disabledInputs,function(b){return b==a?null:b})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();e=="input"?(a.disabled=!0,c.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):(e=="div"||e=="span")&&b.children("."+this._inlineClass).children().addClass("ui-state-disabled"),this._disabledInputs=d.map(this._disabledInputs,function(b){return b==a?null:b}),this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return!1;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))&&(d.datepicker._setDateFromField(a),d.datepicker._updateAlternate(a),d.datepicker._updateDatepicker(a))}catch(b){d.datepicker.log(b)}return!0},_showDatepicker:function(a){a=a.target||a,a.nodeName.toLowerCase()!="input"&&(a=d("input",a.parentNode)[0]);if(!d.datepicker._isDisabledDatepicker(a)&&d.datepicker._lastInput!=a){var b=d.datepicker._getInst(a);d.datepicker._curInst&&d.datepicker._curInst!=b&&d.datepicker._curInst.dpDiv.stop(!0,!0);var c=d.datepicker._get(b,"beforeShow");E(b.settings,c?c.apply(a,[a,b]):{}),b.lastVal=null,d.datepicker._lastInput=a,d.datepicker._setDateFromField(b),d.datepicker._inDialog&&(a.value=""),d.datepicker._pos||(d.datepicker._pos=d.datepicker._findPos(a),d.datepicker._pos[1]+=a.offsetHeight);var e=!1;d(a).parents().each(function(){return e|=d(this).css("position")=="fixed",!e}),e&&d.browser.opera&&(d.datepicker._pos[0]-=document.documentElement.scrollLeft,d.datepicker._pos[1]-=document.documentElement.scrollTop),c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]},d.datepicker._pos=null,b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),d.datepicker._updateDatepicker(b),c=d.datepicker._checkOffset(b,c,e),b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),g=function(){d.datepicker._datepickerShowing=!0;var a=d.datepicker._getBorders(b.dpDiv);b.dpDiv.find("iframe.ui-datepicker-cover").css({left:-a[0],top:-a[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})};b.dpDiv.zIndex(d(a).zIndex()+1),d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,g):b.dpDiv[c||"show"](c?f:null,g),(!c||!f)&&g(),b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus(),d.datepicker._curInst=b}}},_updateDatepicker:function(a){var b=this,c=d.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-datepicker-cover").css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){d(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&d(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){b._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])||(d(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),d(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!=-1&&d(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!=-1&&d(this).addClass("ui-datepicker-next-hover"))}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end(),c=this._getNumberOfMonths(a);var e=c[1];e>1?a.dpDiv.addClass("ui-datepicker-multi-"+e).css("width",17*e+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),a.dpDiv[(c[0]!=1||c[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi"),a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus()},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),g=a.input?a.input.outerWidth():0,h=a.input?a.input.outerHeight():0,i=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();return b.left-=this._get(a,"isRTL")?e-g:0,b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0,b.top-=c&&b.top==a.input.offset().top+h?d(document).scrollTop():0,b.left-=Math.min(b.left,b.left+e>i&&i>e?Math.abs(b.left+e-i):0),b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+h):0),b},_findPos:function(a){for(var b=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[b?"previousSibling":"nextSibling"];return a=d(a).offset(),[a.left,a.top]},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker"))&&this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b),this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e),a||e(),(a=this._get(b,"onClose"))&&a.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b]),this._datepickerShowing=!1,this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),d.blockUI&&(d.unblockUI(),d("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){d.datepicker._curInst&&(a=d(a.target),a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&(!d.datepicker._inDialog||!d.blockUI)&&d.datepicker._hideDatepicker())},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);this._isDisabledDatepicker(a[0])||(this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c),this._updateDatepicker(e))},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay)b.selectedDay=b.currentDay,b.drawMonth=b.selectedMonth=b.currentMonth,b.drawYear=b.selectedYear=b.currentYear;else{var c=new Date;b.selectedDay=c.getDate(),b.drawMonth=b.selectedMonth=c.getMonth(),b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b),this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e._selectingMonthYear=!1,e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10),this._notifyChange(e),this._adjustDate(a)},_clickMonthYear:function(a){a=this._getInst(d(a)[0]),a.input&&a._selectingMonthYear&&!d.browser.msie&&a.input.focus(),a._selectingMonthYear=!a._selectingMonthYear},_selectDay:function(a,b,c,e){var f=d(a);!d(e).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(f[0])&&(f=this._getInst(f[0]),f.selectedDay=f.currentDay=d("a",e).html(),f.selectedMonth=f.currentMonth=b,f.selectedYear=f.currentYear=c,this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(a){a=d(a),this._getInst(a[0]),this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]),b=b!=null?b:this._formatDate(a),a.input&&a.input.val(b),this._updateAlternate(a);var c=this._get(a,"onSelect");c?c.apply(a.input?a.input[0]:null,[b,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],typeof a.input[0]!="object"&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){return a=a.getDay(),[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime()),a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();return a.setMonth(0),a.setDate(1),Math.floor(Math.round((b-a)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;for(var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff,e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,h=(c?c.monthNames:null)||this._defaults.monthNames,i=c=-1,j=-1,k=-1,l=!1,m=function(b){return(b=r+1-1){i=1,j=k;do{d=this._getDaysInMonth(c,i-1);if(j<=d)break;i++,j-=d}while(1)}s=this._daylightSavingAdjust(new Date(c,i-1,j));if(s.getFullYear()!=c||s.getMonth()+1!=i||s.getDate()!=j)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,e=(c?c.dayNames:null)||this._defaults.dayNames,f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:null)||this._defaults.monthNames;var g=function(b){return(b=l+112?a.getHours()+2:0),a):null},_setDate:function(a,b,c){var d=!b,e=a.selectedMonth,f=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date)),a.selectedDay=a.currentDay=b.getDate(),a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth(),a.drawYear=a.selectedYear=a.currentYear=b.getFullYear(),(e!=a.selectedMonth||f!=a.selectedYear)&&!c&&this._notifyChange(a),this._adjustInstDate(a),a.input&&a.input.val(d?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),g=this._get(a,"navigationAsDateFormat"),h=this._getNumberOfMonths(a),i=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),k=h[0]!=1||h[1]!=1,l=this._daylightSavingAdjust(a.currentDay?new Date(a.currentYear,a.currentMonth,a.currentDay):new Date(9999,9,9)),m=this._getMinMaxDate(a,"min"),n=this._getMinMaxDate(a,"max");i=a.drawMonth-i;var o=a.drawYear;i<0&&(i+=12,o--);if(n){var p=this._daylightSavingAdjust(new Date(n.getFullYear(),n.getMonth()-h[0]*h[1]+1,n.getDate()));for(p=m&&pp;)i--,i<0&&(i=11,o--)}a.drawMonth=i,a.drawYear=o,p=this._get(a,"prevText"),p=g?this.formatDate(p,this._daylightSavingAdjust(new Date(o,i-j,1)),this._getFormatConfig(a)):p,p=this._canAdjustMonth(a,-1,o,i)?''+p+"":f?"":''+p+"";var q=this._get(a,"nextText");q=g?this.formatDate(q,this._daylightSavingAdjust(new Date(o,i+j,1)),this._getFormatConfig(a)):q,f=this._canAdjustMonth(a,1,o,i)?''+q+"":f?"":''+q+"",j=this._get(a,"currentText"),q=this._get(a,"gotoCurrent")&&a.currentDay?l:b,j=g?this.formatDate(j,q,this._getFormatConfig(a)):j,g=a.inline?"":'",e=e?'
'+(c?g:"")+(this._isInRange(a,q)?'":"")+(c?"":g)+"
":"",g=parseInt(this._get(a,"firstDay"),10),g=isNaN(g)?0:g,j=this._get(a,"showWeek"),q=this._get(a,"dayNames"),this._get(a,"dayNamesShort");var r=this._get(a,"dayNamesMin"),s=this._get(a,"monthNames"),t=this._get(a,"monthNamesShort"),u=this._get(a,"beforeShowDay"),v=this._get(a,"showOtherMonths"),w=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var x=this._getDefaultDate(a),z="",A=0;A1)switch(C){case 0:F+=" ui-datepicker-group-first",E=" ui-corner-"+(c?"right":"left");break;case h[1]-1:F+=" ui-datepicker-group-last",E=" ui-corner-"+(c?"left":"right");break;default:F+=" ui-datepicker-group-middle",E=""}F+='">'}F+='
'+(/all|left/.test(E)&&A==0?c?f:p:"")+(/all|right/.test(E)&&A==0?c?p:f:"")+this._generateMonthYearHeader(a,i,o,m,n,A>0||C>0,s,t)+'
';var G=j?'":"";for(E=0;E<7;E++){var H=(E+g)%7;G+="=5?' class="ui-datepicker-week-end"':"")+'>'+r[H]+""}F+=G+"",G=this._getDaysInMonth(o,i),o==a.selectedYear&&i==a.selectedMonth&&(a.selectedDay=Math.min(a.selectedDay,G)),E=(this._getFirstDayOfMonth(o,i)-g+7)%7,G=k?6:Math.ceil((E+G)/7),H=this._daylightSavingAdjust(new Date(o,i,1-E));for(var I=0;I";var J=j?'":"";for(E=0;E<7;E++){var K=u?u.apply(a.input?a.input[0]:null,[H]):[!0,""],L=H.getMonth()!=i,M=L&&!w||!K[0]||m&&Hn;J+='",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H)}F+=J+""}i++,i>11&&(i=0,o++),F+="
'+this._get(a,"weekHeader")+"
'+this._get(a,"calculateWeek")(H)+""+(L&&!v?" ":M?''+H.getDate()+"":''+H.getDate()+"")+"
"+(k?""+(h[0]>0&&C==h[1]-1?'
':""):""),B+=F}z+=B}return z+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'':""),a._keyEvent=!1,z},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth"),j=this._get(a,"changeYear"),k=this._get(a,"showMonthAfterYear"),l='
',m="";if(f||!i)m+=''+g[b]+"";else{g=d&&d.getFullYear()==c;var n=e&&e.getFullYear()==c;m+='"}k||(l+=m+(f||!i||!j?" ":""));if(f||!j)l+=''+c+"";else{h=this._get(a,"yearRange").split(":");var p=(new Date).getFullYear();g=function(a){return a=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?p+parseInt(a,10):parseInt(a,10),isNaN(a)?p:a},b=g(h[0]),h=Math.max(b,g(h[1]||"")),b=d?Math.max(b,d.getFullYear()):b,h=e?Math.min(h,e.getFullYear()):h;for(l+='"}return l+=this._get(a,"yearSuffix"),k&&(l+=(f||!i||!j?" ":"")+m),l+="
",l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0),e=a.drawMonth+(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0),d=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,b))),a.selectedDay=d.getDate(),a.drawMonth=a.selectedMonth=d.getMonth(),a.drawYear=a.selectedYear=d.getFullYear(),(c=="M"||c=="Y")&&this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");return a=this._getMinMaxDate(a,"max"),b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");b&&b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){return a=this._get(a,"numberOfMonths"),a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a);return c=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1)),b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth())),this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");return a=this._getMinMaxDate(a,"max"),(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");return b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10),{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){return b||(a.currentDay=a.selectedDay,a.currentMonth=a.selectedMonth,a.currentYear=a.selectedYear),b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay)),this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}}),d.fn.datepicker=function(a){d.datepicker.initialized||(d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv),d.datepicker.initialized=!0);var b=Array.prototype.slice.call(arguments,1);return typeof a!="string"||a!="isDisabled"&&a!="getDate"&&a!="widget"?a=="option"&&arguments.length==2&&typeof arguments[1]=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b)):this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)}):d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b))},d.datepicker=new J,d.datepicker.initialized=!1,d.datepicker.uuid=(new Date).getTime(),d.datepicker.version="1.8.2",window["DP_jQuery_"+y]=d}(jQuery),$(function(){$(".datepicker").datepicker({dateFormat:"yy-mm-dd"}),$(".clear_filters_btn").click(function(){return window.location.search="",!1})});var CKEDITOR_BASEPATH="/assets/ckeditor/";(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a={timestamp:"B8DJ5M3",version:"3.6.2",revision:"7275",_:{},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a){var b=document.getElementsByTagName("script");for(var c=0;c=0?"&":"?")+"t="+this.timestamp),a}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d)}}return a}());var a=CKEDITOR;a.event||(a.event=function(){},a.event.implementOn=function(b){var c=a.event.prototype;for(var d in c)b[d]==undefined&&(b[d]=c[d])},a.event.prototype=function(){var a=function(a){var b=a.getPrivate&&a.getPrivate()||a._||(a._={});return b.events||(b.events={})},b=function(a){this.name=a,this.listeners=[]};return b.prototype={getListenerIndex:function(a){for(var b=0,c=this.listeners;b=0;m--)if(j[m].priority<=g){j.splice(m+1,0,l);return}j.unshift(l)}},fire:function(){var b=!1,c=function(){b=!0},d=!1,e=function(){d=!0};return function(f,g,h){var i=a(this)[f],j=b,k=d;b=d=!1;if(i){var l=i.listeners;if(l.length){l=l.slice(0);for(var m=0;m=0&&d.listeners.splice(e,1)}},hasListeners:function(b){var c=a(this)[b];return c&&c.listeners.length>0}}}()),a.editor||(a.ELEMENT_MODE_NONE=0,a.ELEMENT_MODE_REPLACE=1,a.ELEMENT_MODE_APPENDTO=2,a.editor=function(b,c,d,e){var f=this;f._={instanceConfig:b,element:c,data:e},f.elementMode=d||0,a.event.call(f),f._init()},a.editor.replace=function(b,c){var d=b;if(typeof d!="object"){d=document.getElementById(b),d&&d.tagName.toLowerCase()in{style:1,script:1,base:1,link:1,meta:1,title:1}&&(d=null);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&d.tagName.toLowerCase()!="textarea");}if(!d)throw'[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.'}return d.style.visibility="hidden",new a.editor(c,d,1)},a.editor.appendTo=function(b,c,d){var e=b;if(typeof e!="object"){e=document.getElementById(b);if(!e)throw'[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.'}return new a.editor(c,e,2,d)},a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this)},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this)},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this)}},a.event.implementOn(a.editor.prototype,!0)),a.env||(a.env=function(){var a=navigator.userAgent.toLowerCase(),b=window.opera,c={ie:!1,opera:!!b&&b.version,webkit:a.indexOf(" applewebkit/")>-1,air:a.indexOf(" adobeair/")>-1,mac:a.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:a.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:location.protocol=="https:"};c.gecko=navigator.product=="Gecko"&&!c.webkit&&!c.opera;var d=0;c.ie&&(d=parseFloat(a.match(/msie (\d+)/)[1]),c.ie8=!!document.documentMode,c.ie8Compat=document.documentMode==8,c.ie9Compat=document.documentMode==9,c.ie7Compat=d==7&&!document.documentMode||document.documentMode==7,c.ie6Compat=d<7||c.quirks);if(c.gecko){var e=a.match(/rv:([\d\.]+)/);e&&(e=e[1].split("."),d=e[0]*1e4+(e[1]||0)*100+ +(e[2]||0))}return c.opera&&(d=parseFloat(b.version())),c.air&&(d=parseFloat(a.match(/ adobeair\/(\d+)/)[1])),c.webkit&&(d=parseFloat(a.match(/ applewebkit\/(\d+)/)[1])),c.version=d,c.isCompatible=c.iOS&&d>=534||!c.mobile&&(c.ie&&d>=6||c.gecko&&d>=10801||c.opera&&d>=9.5||c.air&&d>=1||c.webkit&&d>=522||!1),c.cssClass="cke_browser_"+(c.ie?"ie":c.gecko?"gecko":c.opera?"opera":c.webkit?"webkit":"unknown"),c.quirks&&(c.cssClass+=" cke_browser_quirks"),c.ie&&(c.cssClass+=" cke_browser_ie"+(c.version<7?"6":c.version>=8?document.documentMode:"7"),c.quirks&&(c.cssClass+=" cke_browser_iequirks")),c.gecko&&d<10900&&(c.cssClass+=" cke_browser_gecko18"),c.air&&(c.cssClass+=" cke_browser_air"),c}());var b=a.env,c=b.ie;a.status=="unloaded"&&function(){a.event.implementOn(a),a.loadFullCore=function(){if(a.status!="basic_ready"){a.loadFullCore._load=1;return}delete a.loadFullCore;var b=document.createElement("script");b.type="text/javascript",b.src=a.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(b)},a.loadFullCoreTimeout=0,a.replaceClass="ckeditor",a.replaceByClassEnabled=1;var c=function(c,d,e,f){if(b.isCompatible){a.loadFullCore&&a.loadFullCore();var g=e(c,d,f);return a.add(g),g}return null};a.replace=function(b,d){return c(b,d,a.editor.replace)},a.appendTo=function(b,d,e){return c(b,d,a.editor.appendTo,e)},a.add=function(a){var b=this._.pending||(this._.pending=[]);b.push(a)},a.replaceAll=function(){var a=document.getElementsByTagName("textarea");for(var b=0;b"+b+""):c.push('');return c.join("")},htmlEncode:function(a){var b=function(a){var b=new d.element("span");return b.setText(a),b.getHtml()},c=b("\n").toLowerCase()=="
"?function(a){return b(a).replace(/
/gi,"\n")}:b,e=b(">")==">"?function(a){return c(a).replace(/>/g,">")}:c,f=b(" ")=="  "?function(a){return e(a).replace(/ /g," ")}:e;return this.htmlEncode=f,this.htmlEncode(a)},htmlEncodeAttr:function(a){return a.replace(/"/g,""").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,b){return b(a)},setTimeout:function(a,b,c,d,e){return e||(e=window),c||(c=e),e.setTimeout(function(){d?a.apply(c,[].concat(d)):a.apply(c)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;c',a.document),a.document.getBody().append(b)),/%$/.test(c)?c:(b.setStyle("width",c),b.$.clientWidth)}}(),repeat:function(a,b){return(new Array(b+1)).join(a)},tryThese:function(){var a;for(var b=0,c=arguments.length;b8)&&b&&(a=b+":"+a),new d.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a?a=new d.element(a):a=this.getDocumentElement().append(new d.element("head"),!0),(this.getHead=function(){return a})()},getBody:function(){var a=new d.element(this.$.body);return(this.getBody=function(){return a})()},getDocumentElement:function(){var a=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return a})()},getWindow:function(){var a=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return a})()},write:function(a){var c=this;c.$.open("text/html","replace"),b.isCustomDomain()&&(c.$.domain=document.domain),c.$.write(a),c.$.close()}}),d.node=function(a){if(a){switch(a.nodeType){case 9:return new g(a);case 1:return new d.element(a);case 3:return new d.text(a)}d.domObject.call(this,a)}return this},d.node.prototype=new d.domObject,a.NODE_ELEMENT=1,a.NODE_DOCUMENT=9,a.NODE_TEXT=3,a.NODE_COMMENT=8,a.NODE_DOCUMENT_FRAGMENT=11,a.POSITION_IDENTICAL=0,a.POSITION_DISCONNECTED=1,a.POSITION_FOLLOWING=2,a.POSITION_PRECEDING=4,a.POSITION_IS_CONTAINED=8,a.POSITION_CONTAINS=16,e.extend(d.node.prototype,{appendTo:function(a,b){return a.append(this,b),a},clone:function(a,b){var c=this.$.cloneNode(a),e=function(c){if(c.nodeType!=1)return;b||c.removeAttribute("id",!1),c.removeAttribute("data-cke-expando",!1);if(a){var d=c.childNodes;for(var f=0;f]*>/g,""):a},getOuterHtml:function(){var a=this;if(a.$.outerHTML)return a.$.outerHTML.replace(/<\?[^>]*>/,"");var b=a.$.ownerDocument.createElement("div");return b.appendChild(a.$.cloneNode(!0)),b.innerHTML},setHtml:function(a){return this.$.innerHTML=a},setText:function(a){return h.prototype.setText=this.$.innerText!=undefined?function(a){return this.$.innerText=a}:function(a){return this.$.textContent=a},this.setText(a)},getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return c&&(b.ie7Compat||b.ie6Compat)?function(b){var c=this;switch(b){case"class":b="className";break;case"http-equiv":b="httpEquiv";break;case"name":return c.$.name;case"tabindex":var d=a.call(c,b);return d!==0&&c.$.tabIndex===0&&(d=null),d;case"checked":var e=c.$.attributes.getNamedItem(b),f=e.specified?e.nodeValue:c.$.checked;return f?"checked":null;case"hspace":case"value":return c.$[b];case"style":return c.$.style.cssText}return a.call(c,b)}:a}(),getChildren:function(){return new d.nodeList(this.$.childNodes)},getComputedStyle:c?function(a){return this.$.currentStyle[e.cssStyleToDomStyle(a)]}:function(a){return this.getWindow().$.getComputedStyle(this.$,"").getPropertyValue(a)},getDtd:function(){var a=f[this.getName()];return this.getDtd=function(){return a},a},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var a=this.$.tabIndex;return a===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute("tabindex"),10)!==0&&(a=-1),a}:b.webkit?function(){var a=this.$.tabIndex;return a==undefined&&(a=parseInt(this.getAttribute("tabindex"),10),isNaN(a)&&(a=-1)),a}:function(){return this.$.tabIndex},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(c&&!(document.documentMode>8)){var b=this.$.scopeName;b!="HTML"&&(a=b.toLowerCase()+":"+a)}return(this.getName=function(){return a})()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild,c=b&&new d.node(b);return c&&a&&!a(c)&&(c=c.getNext(a)),c},getLast:function(a){var b=this.$.lastChild,c=b&&new d.node(b);return c&&a&&!a(c)&&(c=c.getPrevious(a)),c},getStyle:function(a){return this.$.style[e.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();for(var b=0;b0&&(b>2||!c[a[0].nodeName]||b==2&&!c[a[1].nodeName])},hasAttribute:function(){function a(a){var b=this.$.attributes.getNamedItem(a);return!!b&&!!b.specified}return c&&b.version<8?function(b){return b=="name"?!!this.$.name:a.call(this,b)}:a}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c==a)return;var d;if(b)while(d=c.lastChild)a.insertBefore(c.removeChild(d),a.firstChild);else while(d=c.firstChild)a.appendChild(c.removeChild(d))},mergeSiblings:function(){function a(a,b,c){if(b&&b.type==1){var d=[];while(b.data("cke-bookmark")||b.isEmptyInlineRemoveable()){d.push(b),b=c?b.getNext():b.getPrevious();if(!b||b.type!=1)return}if(a.isIdentical(b)){var e=c?a.getLast():a.getFirst();while(d.length)d.shift().move(a,!c);b.moveChildren(a,!c),b.remove(),e&&e.type==1&&e.mergeSiblings()}}}return function(b){var c=this;if(b!==!1&&!f.$removeEmpty[c.getName()]&&!c.is("a"))return;a(c,c.getNext(),!0),a(c,c.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,b){return this.$.setAttribute(a,b),this};return c&&(b.ie7Compat||b.ie6Compat)?function(b,c){var d=this;return b=="class"?d.$.className=c:b=="style"?d.$.style.cssText=c:b=="tabindex"?d.$.tabIndex=c:b=="checked"?d.$.checked=c:a.apply(d,arguments),d}:b.ie8Compat&&b.secure?function(b,c){if(b=="src"&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(d){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){return this.$.value=a,this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return c&&(b.ie7Compat||b.ie6Compat)?function(b){b=="class"?b="className":b=="tabindex"&&(b="tabIndex"),a.call(this,b)}:a}(),removeAttributes:function(a){if(e.isArray(a))for(var b=0;b=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")):this.setStyle("opacity",a)},unselectable:b.gecko?function(){this.$.style.MozUserSelect="none",this.on("dragstart",function(a){a.data.preventDefault()})}:b.webkit?function(){this.$.style.KhtmlUserSelect="none",this.on("dragstart",function(a){a.data.preventDefault()})}:function(){if(c||b.opera){var a=this.$,d,e=0;a.unselectable="on";while(d=a.all[e++])switch(d.tagName.toLowerCase()){case"iframe":case"textarea":case"input":case"select":break;default:d.unselectable="on"}}},getPositionedAncestor:function(){var a=this;while(a.getName()!="html"){if(a.getComputedStyle("position")!="static")return a;a=a.getParent()}return null},getDocumentPosition:function(a){var d=this,e=0,f=0,g=d.getDocument(),i=g.getBody(),j=g.$.compatMode=="BackCompat";if(document.documentElement.getBoundingClientRect){var k=d.$.getBoundingClientRect(),l=g.$,m=l.documentElement,n=m.clientTop||i.$.clientTop||0,o=m.clientLeft||i.$.clientLeft||0,p=!0;if(c){var q=g.getDocumentElement().contains(d),r=g.getBody().contains(d);p=j&&r||!j&&q}p&&(e=k.left+(!j&&m.scrollLeft||i.$.scrollLeft),e-=o,f=k.top+(!j&&m.scrollTop||i.$.scrollTop),f-=n)}else{var s=d,t=null,u;while(s&&s.getName()!="body"&&s.getName()!="html"){e+=s.$.offsetLeft-s.$.scrollLeft,f+=s.$.offsetTop-s.$.scrollTop,s.equals(d)||(e+=s.$.clientLeft||0,f+=s.$.clientTop||0);var v=t;while(v&&!v.equals(s))e-=v.$.scrollLeft,f-=v.$.scrollTop,v=v.getParent();t=s,s=(u=s.$.offsetParent)?new h(u):null}}if(a){var w=d.getWindow(),x=a.getWindow();if(!w.equals(x)&&w.$.frameElement){var y=(new h(w.$.frameElement)).getDocumentPosition(a);e+=y.x,f+=y.y}}return document.documentElement.getBoundingClientRect||b.gecko&&!j&&(e+=d.$.clientLeft?1:0,f+=d.$.clientTop?1:0),{x:e,y:f}},scrollIntoView:function(a){var b=this,c=b.getWindow(),d=c.getViewPaneSize().height,e=d*-1;a?e+=d:(e+=b.$.offsetHeight||0,e+=parseInt(b.getComputedStyle("marginBottom")||0,10)||0);var f=b.getDocumentPosition();e+=f.y,e=e<0?0:e;var g=c.getScrollPosition().y;(e>g||ewindow.setTimeout(function(){window.close();},50);")')}return a&&new g(a.contentWindow.document)},copyAttributes:function(a,b){var d=this,e=d.$.attributes;b=b||{};for(var f=0;f0&&b)b=b.childNodes[a.shift()];return b?new d.node(b):null},getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",function(a){a.data.getTarget().hasClass("cke_enable_context_menu")||a.data.preventDefault()})},getDirection:function(a){var b=this;return a?b.getComputedStyle("direction")||b.getDirection()||b.getDocument().$.dir||b.getDocument().getBody().getDirection(1):b.getStyle("direction")||b.getAttribute("dir")},data:function(a,b){return a="data-"+a,b===undefined?this.getAttribute(a):(b===!1?this.removeAttribute(a):this.setAttribute(a,b),null)}}),function(){function d(b){var c=0;for(var d=0,e=a[b].length;d',bodyId:"",bodyClass:"",fullPage:!1,height:200,plugins:"about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc",extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,theme:"default",skin:"kama",width:"",baseFloatZIndex:1e4};var i=a.config;a.focusManager=function(a){return a.focusManager?a.focusManager:(this.hasFocus=!1,this._={editor:a},this)},a.focusManager.prototype={focus:function(){var b=this;b._.timer&&clearTimeout(b._.timer);if(!b.hasFocus){a.currentInstance&&a.currentInstance.focusManager.forceBlur();var c=b._.editor;c.container.getChild(1).addClass("cke_focus"),b.hasFocus=!0,c.fire("focus")}},blur:function(){var a=this;a._.timer&&clearTimeout(a._.timer),a._.timer=setTimeout(function(){delete a._.timer,a.forceBlur()},100)},forceBlur:function(){if(this.hasFocus){var a=this._.editor;a.container.getChild(1).removeClass("cke_focus"),this.hasFocus=!1,a.fire("blur")}}},function(){var b={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sk:1,sl:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,"zh-cn":1,zh:1},load:function(b,c,d){if(!b||!a.lang.languages[b])b=this.detect(c,b);this[b]?d(b,this[b]):a.scriptLoader.load(a.getUrl("lang/"+b+".js"),function(){d(b,this[b])},this)},detect:function(b,c){var d=this.languages;c=c||navigator.userLanguage||navigator.language||b;var e=c.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),f=e[1],g=e[2];return d[f+"-"+g]?f=f+"-"+g:d[f]||(f=null),a.lang.detect=f?function(){return f}:function(a){return a},f||b}}}(),a.scriptLoader=function(){var b={},d={};return{load:function(e,f,g,i){var j=typeof e=="string";j&&(e=[e]),g||(g=a);var k=e.length,l=[],m=[],n=function(a){f&&(j?f.call(g,a):f.call(g,l,m))};if(k===0){n(!0);return}var o=function(b,c){(c?l:m).push(b),--k<=0&&(i&&a.document.getDocumentElement().removeStyle("cursor"),n(c))},p=function(a,c){b[a]=1;var e=d[a];delete d[a];for(var f=0;f1)return;var i=new h("script");i.setAttributes({type:"text/javascript",src:e}),f&&(c?i.$.onreadystatechange=function(){if(i.$.readyState=="loaded"||i.$.readyState=="complete")i.$.onreadystatechange=null,p(e,!0)}:(i.$.onload=function(){setTimeout(function(){p(e,!0)},0)},i.$.onerror=function(){p(e,!1)})),i.appendTo(a.document.getHead())};i&&a.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r1)return;var n=!g.css||!g.css.length,o=!g.js||!g.js.length,p=function(){if(n&&o){g._isLoaded=1;for(var a=0;a=0?c.langCode:k[0],!i.langEntries||!i.langEntries[m]?g.push(a.getUrl(l+"lang/"+m+".js")):(e.extend(c.lang,i.langEntries[m]),m=null)),f.push(m),d.push(i)}a.scriptLoader.load(g,function(){var a=["beforeInit","init","afterInit"];for(var b=0;b]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,c={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(a){var d=this,e,g,h=0,i;while(e=d._.htmlPartsRegex.exec(a)){var j=e.index;if(j>h){var k=a.substring(h,j);i?i.push(k):d.onText(k)}h=d._.htmlPartsRegex.lastIndex;if(g=e[1]){g=g.toLowerCase(),i&&f.$cdata[g]&&(d.onCDATA(i.join("")),i=null);if(!i){d.onTagClose(g);continue}}if(i){i.push(e[0]);continue}if(g=e[3]){g=g.toLowerCase();if(/="/.test(g))continue;var l={},n,o=e[4],p=!!o&&o.charAt(o.length-1)=="/";if(o)while(n=b.exec(o)){var q=n[1].toLowerCase(),r=n[2]||n[3]||n[4]||"";!r&&c[q]?l[q]=q:l[q]=r}d.onTagOpen(g,l,p),!i&&f.$cdata[g]&&(i=[]);continue}(g=e[2])&&d.onComment(g)}a.length>h&&d.onText(a.substring(h,a.length))}}}(),a.htmlParser.comment=function(a){this.value=a,this._={isBlockLike:!1}},a.htmlParser.comment.prototype={type:8,writeHtml:function(a,b){var c=this.value;if(b){if(!(c=b.onComment(c,this)))return;if(typeof c!="string"){c.parent=this.parent,c.writeHtml(a,b);return}}a.comment(c)}},function(){a.htmlParser.text=function(a){this.value=a,this._={isBlockLike:!1}},a.htmlParser.text.prototype={type:3,writeHtml:function(a,b){var c=this.value;if(b&&!(c=b.onText(c,this)))return;a.text(c)}}}(),function(){a.htmlParser.cdata=function(a){this.value=a},a.htmlParser.cdata.prototype={type:3,writeHtml:function(a){a.write(this.value)}}}(),a.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function j(a){return a.name=="a"&&a.attributes.href||f.$removeEmpty[a.name]}var d=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),g=c&&b.version<8?{dd:1,dt:1}:{},h={ol:1,ul:1},i=e.extend({},{html:1},f.html,f.body,f.head,{style:1,script:1});a.htmlParser.fragment.fromHtml= function(b,k,l){function x(a){var b;if(s.length>0)for(var c=0;c=0;b--)if(a==s[b].name){s.splice(b,1);return}var c=[],d=[],e=u;while(e!=r&&e.name!=a)e._.isBlockLike||d.unshift(e),c.push(e),e=e.returnPoint||e.parent;if(e!=r){for(b=0;b0?c.children[b-1]:null;if(d){if(a._.isBlockLike&&d.type==3){d.value=e.rtrim(d.value);if(d.value.length===0){c.children.pop(),c.add(a);return}}d.next=a}a.previous=d,a.parent=c,c.children.splice(b,0,a),c._.hasInlineStarted=a.type==3||a.type==1&&!a._.isBlockLike},writeHtml:function(b,c){var d;this.filterChildren=function(){var b=new a.htmlParser.basicWriter;this.writeChildrenHtml.call(this,b,c,!0);var e=b.getHtml();this.children=(new a.htmlParser.fragment.fromHtml(e)).children,d=1},!this.name&&c&&c.onFragment(this),this.writeChildrenHtml(b,d?null:c)},writeChildrenHtml:function(a,b){for(var c=0;cb?1:0};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes)},writeHtml:function(c,d){var e=this.attributes,f=this,g=f.name,h,i,j,k;f.filterChildren=function(){if(!k){var b=new a.htmlParser.basicWriter;a.htmlParser.fragment.prototype.writeChildrenHtml.call(f,b,d),f.children=(new a.htmlParser.fragment.fromHtml(b.getHtml(),0,f.clone())).children,k=1}};if(d){for(;;){if(!(g=d.onElementName(g)))return;f.name=g;if(!(f=d.onElement(f)))return;f.parent=this.parent;if(f.name==g)break;if(f.type!=1){f.writeHtml(c,d);return}g=f.name;if(!g){for(var l=0,m=this.children.length;l=0;e--){var h=b[e];h&&(h.pri=c,a.splice(d,0,h))}}}function d(a,b,c){if(b)for(var d in b){var e=a[d];a[d]=f(e,b[d],c),e||a.$length++}}function f(a,b,d){if(b)return b.pri=d,a?(a.splice?c(a,b,d):(a.pri>d?a=[b,a]:a=[a,b],a.filter=g),a):(b.filter=b,b)}function g(b){var c=b.type||b instanceof a.htmlParser.fragment;for(var d=0;d"):this._.output.push(">")},attribute:function(a,b){typeof b=="string"&&(b=e.htmlEncodeAttr(b)),this._.output.push(" ",a,'="',b,'"')},closeTag:function(a){this._.output.push("")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[],this._.indent=!1},getHtml:function(a){var b=this._.output.join("");return a&&this.reset(),b}}}),delete a.loadFullCore,a.instances={},a.document=new g(document),a.add=function(b){a.instances[b.name]=b,b.on("focus",function(){a.currentInstance!=b&&(a.currentInstance=b,a.fire("currentInstance"))}),b.on("blur",function(){a.currentInstance==b&&(a.currentInstance=null,a.fire("currentInstance"))})},a.remove=function(b){delete a.instances[b.name]},a.on("instanceDestroyed",function(){e.isEmpty(this.instances)&&a.fire("reset")}),a.TRISTATE_ON=1,a.TRISTATE_OFF=2,a.TRISTATE_DISABLED=0,d.comment=e.createClass({base:d.node,$:function(a,b){typeof a=="string"&&(a=(b?b.$:document).createComment(a)),this.base(a)},proto:{type:8,getOuterHtml:function(){return""}}}),function(){var a={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1,caption:1},b={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1},e=function(a){var b=a.getChildren();for(var c=0,d=b.count();c0&&k.getChild(d.startOffset-1);this._.guardRTL=function(a,b){return(!b||!k.equals(a))&&(!l||!a.equals(l))&&(a.type!=1||!b||a.getName()!="body")}}var m=a?this._.guardRTL:this._.guardLTR;f?e=function(a,b){return m(a,b)===!1?!1:f(a,b)}:e=m,this.current?c=this.current[h](!1,g,e):a?(c=d.endContainer,d.endOffset>0?(c=c.getChild(d.endOffset-1),e(c)===!1&&(c=null)):c=e(c,!0)===!1?null:c.getPreviousSourceNode(!0,g,e)):(c=d.startContainer,c=c.getChild(d.startOffset),c?e(c)===!1&&(c=null):c=e(d.startContainer,!0)===!1?null:d.startContainer.getNextSourceNode(!0,g,e));while(c&&!this._.end){this.current=c;if(!this.evaluator||this.evaluator(c)!==!1){if(!b)return c}else if(b&&this.evaluator)return!1;c=c[h](!1,g,e)}return this.end(),this.current=null}function b(b){var c,d=null;while(c=a.call(this,b))d=c;return d}d.walker=e.createClass({$:function(a){this.range=a,this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return a.call(this,0,1)!==!1},checkBackward:function(){return a.call(this,1,1)!==!1},lastForward:function(){return b.call(this)},lastBackward:function(){return b.call(this,1)},reset:function(){delete this.current,this._={}}}});var g={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1};h.prototype.isBlockBoundary=function(a){var b=a?e.extend({},f.$block,a||{}):f.$block;return this.getComputedStyle("float")=="none"&&g[this.getComputedStyle("display")]||b[this.getName()]},d.walker.blockBoundary=function(a){return function(b,c){return b.type!=1||!b.isBlockBoundary(a)}},d.walker.listItemBoundary=function(){return this.blockBoundary({br:1})},d.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&a.getName()=="span"&&a.data("cke-bookmark")}return function(d){var e,f;return e=d&&!d.getName&&(f=d.getParent())&&c(f),e=a?e:e||c(d),!!(b^e)}},d.walker.whitespaces=function(a){return function(b){var c=b&&b.type==3&&!e.trim(b.getText());return!!(a^c)}},d.walker.invisible=function(a){var b=d.walker.whitespaces();return function(c){var d=b(c)||c.is&&!c.$.offsetHeight;return!!(a^d)}},d.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};var i=/^[\t\r\n ]*(?: |\xa0)$/,j=d.walker.whitespaces(),k=d.walker.bookmark(),l=function(a){return k(a)||j(a)||a.type==1&&a.getName()in f.$inline&&!(a.getName()in f.$empty)};h.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(l(a));return a&&(c?a.getText&&i.test(a.getText()):a.is&&a.is("br"))?a:!1}}(),d.range=function(a){var b=this;b.startContainer=null,b.startOffset=null,b.endContainer=null,b.endOffset=null,b.collapsed=!0,b.document=a},function(){function i(a){var b=!1,f=d.walker.bookmark(!0);return function(d){if(f(d))return!0;if(d.type==3){if(d.hasAscendant("pre")||e.trim(d.getText()).length)return!1}else if(d.type==1&&!g[d.getName()])if(!a&&!c&&d.getName()=="br"&&!b)b=!0;else return!1;return!0}}function j(a){return a.type!=3&&a.getName()in f.$removeEmpty||!e.trim(a.getText())||!!a.getParent().data("cke-bookmark")}function m(a){return!k(a)&&!l(a)}var a=function(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset},b=function(a,b,c,d){a.optimizeBookmark();var e=a.startContainer,f=a.endContainer,g=a.startOffset,i=a.endOffset,j,k;f.type==3?f=f.split(i):f.getChildCount()>0&&(i>=f.getChildCount()?(f=f.append(a.document.createText("")),k=!0):f=f.getChild(i)),e.type==3?(e.split(g),e.equals(f)&&(f=e.getNext())):g?g>=e.getChildCount()?(e=e.append(a.document.createText("")),j=!0):e=e.getChild(g).getPrevious():(e=e.getFirst().insertBeforeMe(a.document.createText("")),j=!0);var l=e.getParents(),m=f.getParents(),n,o,p;for(n=0;n0&&!r.equals(f)&&(s=q.append(r.clone()));if(!l[w]||r.$.parentNode!=l[w].$.parentNode){t=r.getPrevious();while(t){if(t.equals(l[w])||t.equals(e))break;u=t.getPrevious(),b==2?q.$.insertBefore(t.$.cloneNode(!0),q.$.firstChild):(t.remove(),b==1&&q.$.insertBefore(t.$,q.$.firstChild)),t=u}}q&&(q=s)}if(b==2){var x=a.startContainer;x.type==3&&(x.$.data+=x.$.nextSibling.data,x.$.parentNode.removeChild(x.$.nextSibling));var y=a.endContainer;y.type==3&&y.$.nextSibling&&(y.$.data+=y.$.nextSibling.data,y.$.parentNode.removeChild(y.$.nextSibling))}else{if(o&&p&&(e.$.parentNode!=o.$.parentNode||f.$.parentNode!=p.$.parentNode)){var z=p.getIndex();j&&p.$.parentNode==e.$.parentNode&&z--;if(d&&o.type==1){var A=h.createFromHtml(' ',a.document);A.insertAfter(o),o.mergeSiblings(!1),a.moveToBookmark({startNode:A})}else a.setStart(p.getParent(),z)}a.collapse(!0)}j&&e.remove(),k&&f.$.parentNode&&f.remove()},g={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=new d.walker.whitespaces,l=new d.walker.bookmark;d.range.prototype={clone:function(){var a=this,b=new d.range(a.document);return b.startContainer=a.startContainer,b.startOffset=a.startOffset,b.endContainer=a.endContainer,b.endOffset=a.endOffset,b.collapsed=a.collapsed,b},collapse:function(a){var b=this;a?(b.endContainer=b.startContainer,b.endOffset=b.startOffset):(b.startContainer=b.endContainer,b.startOffset=b.endOffset),b.collapsed=!0},cloneContents:function(){var a=new d.documentFragment(this.document);return this.collapsed||b(this,2,a),a},deleteContents:function(a){if(this.collapsed)return;b(this,0,null,a)},extractContents:function(a){var c=new d.documentFragment(this.document);return this.collapsed||b(this,1,c,a),c},createBookmark:function(a){var b=this,c,d,f,g,h=b.collapsed;return c=b.document.createElement("span"),c.data("cke-bookmark",1),c.setStyle("display","none"),c.setHtml(" "),a&&(f="cke_bm_"+e.getNextNumber(),c.setAttribute("id",f+"S")),h||(d=c.clone(),d.setHtml(" "),a&&d.setAttribute("id",f+"E"),g=b.clone(),g.collapse(),g.insertNode(d)),g=b.clone(),g.collapse(!0),g.insertNode(c),d?(b.setStartAfter(c),b.setEndBefore(d)):b.moveToPosition(c,4),{startNode:a?f+"S":c,endNode:a?f+"E":d,serializable:a,collapsed:h}},createBookmark2:function(a){var b=this,c=b.startContainer,d=b.endContainer,e=b.startOffset,f=b.endOffset,g=b.collapsed,h,i;if(!c||!d)return{start:0,end:0};if(a){c.type==1&&(h=c.getChild(e),h&&h.type==3&&e>0&&h.getPrevious().type==3&&(c=h,e=0),h&&h.type==1&&(e=h.getIndex(1)));while(c.type==3&&(i=c.getPrevious())&&i.type==3)c=i,e+=i.getLength();if(!g){d.type==1&&(h=d.getChild(f),h&&h.type==3&&f>0&&h.getPrevious().type==3&&(d=h,f=0),h&&h.type==1&&(f=h.getIndex(1)));while(d.type==3&&(i=d.getPrevious())&&i.type==3)d=i,f+=i.getLength()}}return{start:c.getAddress(a),end:g?null:d.getAddress(a),startOffset:e,endOffset:f,normalized:a,collapsed:g,is2:!0}},moveToBookmark:function(a){var b=this;if(a.is2){var c=b.document.getByAddress(a.start,a.normalized),d=a.startOffset,e=a.end&&b.document.getByAddress(a.end,a.normalized),f=a.endOffset;b.setStart(c,d),e?b.setEnd(e,f):b.collapse(!0)}else{var g=a.serializable,h=g?b.document.getById(a.startNode):a.startNode,i=g?b.document.getById(a.endNode):a.endNode;b.setStartBefore(h),h.remove(),i?(b.setEndBefore(i),i.remove()):b.collapse(!0)}},getBoundaryNodes:function(){var a=this,b=a.startContainer,c=a.endContainer,e=a.startOffset,f=a.endOffset,g;if(b.type==1){g=b.getChildCount();if(g>e)b=b.getChild(e);else if(g<1)b=b.getPreviousSourceNode();else{b=b.$;while(b.lastChild)b=b.lastChild;b=new d.node(b),b=b.getNextSourceNode()||b}}if(c.type==1){g=c.getChildCount();if(g>f)c=c.getChild(f).getPreviousSourceNode(!0);else if(g<1)c=c.getPreviousSourceNode();else{c=c.$;while(c.lastChild)c=c.lastChild;c=new d.node(c)}}return b.getPosition(c)&2&&(b=c),{startNode:b,endNode:c}},getCommonAncestor:function(a,b){var c=this,d=c.startContainer,e=c.endContainer,f;return d.equals(e)?a&&d.type==1&&c.startOffset==c.endOffset-1?f=d.getChild(c.startOffset):f=d:f=d.getCommonAncestor(e),b&&!f.is?f.getParent():f},optimize:function(){var a=this,b=a.startContainer,c=a.startOffset;b.type!=1&&(c?c>=b.getLength()&&a.setStartAfter(b):a.setStartBefore(b)),b=a.endContainer,c=a.endOffset,b.type!=1&&(c?c>=b.getLength()&&a.setEndAfter(b):a.setEndBefore(b))},optimizeBookmark:function(){var a=this,b=a.startContainer,c=a.endContainer;b.is&&b.is("span")&&b.data("cke-bookmark")&&a.setStartAt(b,3),c&&c.is&&c.is("span")&&c.data("cke-bookmark")&&a.setEndAt(c,4)},trim:function(a,b){var c=this,d=c.startContainer,e=c.startOffset,f=c.collapsed;if((!a||f)&&d&&d.type==3){if(!e)e=d.getIndex(),d=d.getParent();else if(e>=d.getLength())e=d.getIndex()+1,d=d.getParent();else{var g=d.split(e);e=d.getIndex()+1,d=d.getParent(),c.startContainer.equals(c.endContainer)?c.setEnd(g,c.endOffset-c.startOffset):d.equals(c.endContainer)&&(c.endOffset+=1)}c.setStart(d,e);if(f){c.collapse(!0);return}}var h=c.endContainer,i=c.endOffset;!b&&!f&&h&&h.type==3&&(i?i>=h.getLength()?(i=h.getIndex()+1,h=h.getParent()):(h.split(i),i=h.getIndex()+1,h=h.getParent()):(i=h.getIndex(),h=h.getParent()),c.setEnd(h,i))},enlarge:function(a,b){switch(a){case 1:if(this.collapsed)return;var c=this.getCommonAncestor(),g=this.document.getBody(),h,i,j,k,l,m=!1,n,o,p=this.startContainer,q=this.startOffset;p.type==3?(q&&(p=!e.trim(p.substring(0,q)).length&&p,m=!!p),p&&((k=p.getPrevious())||(j=p.getParent()))):(q&&(k=p.getChild(q-1)||p.getLast()),k||(j=p));while(j||k){if(j&&!k){!l&&j.equals(c)&&(l=!0);if(!g.contains(j))break;if(!m||j.getComputedStyle("display")!="inline")m=!1,l?h=j:this.setStartBefore(j);k=j.getPrevious()}while(k){n=!1;if(k.type==3)o=k.getText(),/[^\s\ufeff]/.test(o)&&(k=null),n=/[\s\ufeff]$/.test(o);else if((k.$.offsetWidth>0||b&&k.is("br"))&&!k.data("cke-bookmark"))if(m&&f.$removeEmpty[k.getName()]){o=k.getText();if(/[^\s\ufeff]/.test(o))k=null;else{var r=k.$.all||k.$.getElementsByTagName("*");for(var s=0,t;t=r[s++];)if(!f.$removeEmpty[t.nodeName.toLowerCase()]){k=null;break}}k&&(n=!!o.length)}else k=null;n&&(m?l?h=j:j&&this.setStartBefore(j):m=!0);if(k){var u=k.getPrevious();if(!j&&!u){j=k,k=null;break}k=u}else j=null}j&&(j=j.getParent())}p=this.endContainer,q=this.endOffset,j=k=null,l=m=!1,p.type==3?(p=!e.trim(p.substring(q)).length&&p,m=!p||!p.getLength(),p&&((k=p.getNext())||(j=p.getParent()))):(k=p.getChild(q),k||(j=p));while(j||k){if(j&&!k){!l&&j.equals(c)&&(l=!0);if(!g.contains(j))break;if(!m||j.getComputedStyle("display")!="inline")m=!1,l?i=j:j&&this.setEndAfter(j);k=j.getNext()}while(k){n=!1;if(k.type==3)o=k.getText(),/[^\s\ufeff]/.test(o)&&(k=null),n=/^[\s\ufeff]/.test(o);else if((k.$.offsetWidth>0||b&&k.is("br"))&&!k.data("cke-bookmark"))if(m&&f.$removeEmpty[k.getName()]){o=k.getText();if(/[^\s\ufeff]/.test(o))k=null;else{r=k.$.all||k.$.getElementsByTagName("*");for(s=0;t=r[s++];)if(!f.$removeEmpty[t.nodeName.toLowerCase()]){k=null;break}}k&&(n=!!o.length)}else k=null;n&&m&&(l?i=j:this.setEndAfter(j));if(k){u=k.getNext();if(!j&&!u){j=k,k=null;break}k=u}else j=null}j&&(j=j.getParent())}h&&i&&(c=h.contains(i)?i:h,this.setStartBefore(c),this.setEndAfter(c));break;case 2:case 3:var v=new d.range(this.document);g=this.document.getBody(),v.setStartAt(g,1),v.setEnd(this.startContainer,this.startOffset);var w=new d.walker(v),x,y,z=d.walker.blockBoundary(a==3?{br:1}:null),A=function(a){var b=z(a);return b||(x=a),b},B=function(a){var b=A(a);return!b&&a.is&&a.is("br")&&(y=a),b};w.guard=A,j=w.lastBackward(),x=x||g,this.setStartAt(x,!x.is("br")&&(!j&&this.checkStartOfBlock()||j&&x.contains(j))?1:4);if(a==3){var C=this.clone();w=new d.walker(C);var D=d.walker.whitespaces(),E=d.walker.bookmark();w.evaluator=function(a){return!D(a)&&!E(a)};var F=w.previous();if(F&&F.type==1&&F.is("br"))return}v=this.clone(),v.collapse(),v.setEndAt(g,2),w=new d.walker(v),w.guard=a==3?B:A,x=null,j=w.lastForward(),x=x||g,this.setEndAt(x,!j&&this.checkEndOfBlock()||j&&x.contains(j)?2:3),y&&this.setEndAfter(y)}},shrink:function(a,b){if(!this.collapsed){a=a||2;var c=this.clone(),e=this.startContainer,f=this.endContainer,g=this.startOffset,h=this.endOffset,i=this.collapsed,j=1,k=1;e&&e.type==3&&(g?g>=e.getLength()?c.setStartAfter(e):(c.setStartBefore(e),j=0):c.setStartBefore(e)),f&&f.type==3&&(h?h>=f.getLength()?c.setEndAfter(f):(c.setEndAfter(f),k=0):c.setEndBefore(f));var l=new d.walker(c),m=d.walker.bookmark();l.evaluator=function(b){return b.type==(a==1?1:3)};var n;l.guard=function(b,c){return m(b)?!0:a==1&&b.type==3?!1:c&&b.equals(n)?!1:(!c&&b.type==1&&(n=b),!0)};if(j){var o=l[a==1?"lastForward":"next"]();o&&this.setStartAt(o,b?1:3)}if(k){l.reset();var p=l[a==1?"lastBackward":"previous"]();p&&this.setEndAt(p,b?2:4)}return!!j||!!k}},insertNode:function(a){var b=this;b.optimizeBookmark(),b.trim(!1,!0);var c=b.startContainer,d=b.startOffset,e=c.getChild(d);e?a.insertBefore(e):c.append(a),a.getParent().equals(b.endContainer)&&b.endOffset++,b.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b),this.collapse(!0)},selectNodeContents:function(a){this.setStart(a,0),this.setEnd(a,a.type==3?a.getLength():a.getChildCount())},setStart:function(b,c){var d=this;b.type==1&&f.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent()),d.startContainer=b,d.startOffset=c,d.endContainer||(d.endContainer=b,d.endOffset=c),a(d)},setEnd:function(b,c){var d=this;b.type==1&&f.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent()),d.endContainer=b,d.endOffset=c,d.startContainer||(d.startContainer=b,d.startOffset=c),a(d)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){var d=this;switch(c){case 1:d.setStart(b,0);break;case 2:b.type==3?d.setStart(b,b.getLength()):d.setStart(b,b.getChildCount());break;case 3:d.setStartBefore(b);break;case 4:d.setStartAfter(b)}a(d)},setEndAt:function(b,c){var d=this;switch(c){case 1:d.setEnd(b,0);break;case 2:b.type==3?d.setEnd(b,b.getLength()):d.setEnd(b,b.getChildCount());break;case 3:d.setEndBefore(b);break;case 4:d.setEndAfter(b)}a(d)},fixBlock:function(a,b){var d=this,e=d.createBookmark(),f=d.document.createElement(b);return d.collapse(a),d.enlarge(2),d.extractContents().appendTo(f),f.trim(),c||f.appendBogus(),d.insertNode(f),d.moveToBookmark(e),f},splitBlock:function(a){var b=this,e=new d.elementPath(b.startContainer),f=new d.elementPath(b.endContainer),g=e.blockLimit,h=f.blockLimit,i=e.block,j=f.block,k=null;if(!g.equals(h))return null;a!="br"&&(i||(i=b.fixBlock(!0,a),j=(new d.elementPath(b.endContainer)).block),j||(j=b.fixBlock(!1,a)));var l=i&&b.checkStartOfBlock(),m=j&&b.checkEndOfBlock();return b.deleteContents(),i&&i.equals(j)&&(m?(k=new d.elementPath(b.startContainer),b.moveToPosition(j,4),j=null):l?(k=new d.elementPath(b.startContainer),b.moveToPosition(i,3),i=null):(j=b.splitElement(i),!c&&!i.is("ul","ol")&&i.appendBogus())),{previousBlock:i,nextBlock:j,wasStartOfBlock:l,wasEndOfBlock:m,elementPath:k}},splitElement:function(a){var b=this;if(!b.collapsed)return null;b.setEndAt(a,2);var c=b.extractContents(),d=a.clone(!1);return c.appendTo(d),d.insertAfter(a),b.moveToPosition(a,4),d},checkBoundaryOfElement:function(a,b){var c=b==1,e=this.clone();e.collapse(c),e[c?"setStartAt":"setEndAt"](a,c?1:2);var f=new d.walker(e);return f.evaluator=j,f[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this,b=a.startContainer,c=a.startOffset;if(c&&b.type==3){var f=e.ltrim(b.substring(0,c));if(f.length)return!1}a.trim();var g=new d.elementPath(a.startContainer),h=a.clone();h.collapse(!0),h.setStartAt(g.block||g.blockLimit,1);var j=new d.walker(h);return j.evaluator=i(!0),j.checkBackward()},checkEndOfBlock:function(){var a=this,b=a.endContainer,c=a.endOffset;if(b.type==3){var f=e.rtrim(b.substring(c));if(f.length)return!1}a.trim();var g=new d.elementPath(a.endContainer),h=a.clone();h.collapse(!1),h.setEndAt(g.block||g.blockLimit,2);var j=new d.walker(h);return j.evaluator=i(!1),j.checkForward()},checkReadOnly:function(){function a(a,b){while(a){if(a.type==1){if(a.getAttribute("contentEditable")=="false"&&!a.data("cke-editable"))return 0;if(a.is("html")||a.getAttribute("contentEditable")=="true"&&(a.contains(b)||a.equals(b)))break}a=a.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!a(b,c)||!a(c,b)}}(),moveToElementEditablePosition:function(a,b){function c(a,c){var d;return a.type==1&&a.isEditable(!1)&&!f.$nonEditable[a.getName()]&&(d=a[b?"getLast":"getFirst"](m)),!c&&!d&&(d=a[b?"getPrevious":"getNext"](m)),d}var d=0;while(a){if(a.type==3){this.moveToPosition(a,b?4:3),d=1;break}a.type==1&&a.isEditable()&&(this.moveToPosition(a,b?2:1),d=1),a=c(a,d)}return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=1||a.endContainer.type!=1)return null;var b=new d.walker(a),c=d.walker.bookmark(!0),e=d.walker.whitespaces(!0),f=function(a){return e(a)&&c(a)};a.evaluator=f;var g=b.next();return b.reset(),g&&g.equals(b.previous())?g:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=1?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=1?a:a.getChild(this.endOffset-1)||a}}}(),a.POSITION_AFTER_START=1,a.POSITION_BEFORE_END=2,a.POSITION_BEFORE_START=3,a.POSITION_AFTER_END=4,a.ENLARGE_ELEMENT=1,a.ENLARGE_BLOCK_CONTENTS=2,a.ENLARGE_LIST_ITEM_CONTENTS=3,a.START=1,a.END=2,a.STARTEND=3,a.SHRINK_ELEMENT=1,a.SHRINK_TEXT=2,function(){function b(a,b,c){var d=a.serializable,e=b[c?"endContainer":"startContainer"],f=c?"endOffset":"startOffset",g=d?b.document.getById(a.startNode):a.startNode,h=d?b.document.getById(a.endNode):a.endNode;return e.equals(g.getPrevious())?(b.startOffset=b.startOffset-e.getLength()-h.getPrevious().getLength(),e=h.getNext()):e.equals(h.getPrevious())&&(b.startOffset=b.startOffset-e.getLength(),e=h.getNext()),e.equals(g.getParent())&&b[f]++,e.equals(h.getParent())&&b[f]++,b[c?"endContainer":"startContainer"]=e,b}d.rangeList=function(b){return b instanceof d.rangeList?b:(b?b instanceof d.range&&(b=[b]):b=[],e.extend(b,a))};var a={createIterator:function(){var a=this,b=d.walker.bookmark(),c=function(a){return!a.is||!a.is("tr")},e=[],f;return{getNextRange:function(c){f=f==undefined?0:f+1;var d=a[f];if(d&&a.length>1){if(!f)for(var g=a.length-1;g>=0;g--)e.unshift(a[g].createBookmark(!0));if(c){var h=0;while(a[f+h+1]){var i=d.document,j=0,k=i.getById(e[h].endNode),l=i.getById(e[h+1].startNode),m;for(;;){m=k.getNextSourceNode(!1);if(!l.equals(m)){if(b(m)||m.type==1&&m.isBlockBoundary()){k=m;continue}}else j=1;break}if(!j)break;h++}}d.moveToBookmark(e.shift());while(h--)m=a[++f],m.moveToBookmark(e.shift()),d.setEnd(m.endContainer,m.endOffset)}return d}}},createBookmarks:function(a){var c=this,d=[],e;for(var f=0;f',a.document);c.appendTo(a.document.getHead());try{b.hc=c.getComputedStyle("border-top-color")==c.getComputedStyle("border-right-color")}catch(d){b.hc=!1}b.hc&&(b.cssClass+=" cke_hc"),c.remove()}(),j.load(i.corePlugins.split(","),function(){a.status="loaded",a.fire("loaded");var b=a._.pending;if(b){delete a._.pending;for(var c=0;c0){n=p.shift();while(!n.getParent().equals(s))n=n.getParent();n.equals(w)||t.push(n),w=n}while(t.length>0){n=t.shift();if(n.getName()=="blockquote"){var x=new d.documentFragment(a.document);while(n.getFirst())x.append(n.getFirst().remove()),p.push(x.getLast());x.replace(n)}else p.push(n)}var y=a.document.createElement("blockquote");y.insertBefore(p[0]);while(p.length>0)n=p.shift(),y.append(n)}else if(b==1){var z=[],A={};while(n=m.getNextParagraph()){var B=null,C=null;while(n.getParent()){if(n.getParent().getName()=="blockquote"){B=n.getParent(),C=n;break}n=n.getParent()}B&&C&&!C.getCustomData("blockquote_moveout")&&(z.push(C),h.setMarker(A,C,"blockquote_moveout",!0))}h.clearAllMarkers(A);var D=[],E=[];A={};while(z.length>0){var F=z.shift();y=F.getParent(),F.getPrevious()?F.getNext()?(F.breakParent(F.getParent()),E.push(F.getNext())):F.remove().insertAfter(y):F.remove().insertBefore(y),y.getCustomData("blockquote_processed")||(E.push(y),h.setMarker(A,y,"blockquote_processed",!0)),D.push(F)}h.clearAllMarkers(A);for(u=E.length-1;u>=0;u--)y=E[u],e(y)&&y.remove();if(a.config.enterMode==2){var G=!0;while(D.length){F=D.shift();if(F.getName()=="div"){x=new d.documentFragment(a.document);var H=G&&F.getPrevious()&&(F.getPrevious().type!=1||!F.getPrevious().isBlockBoundary());H&&x.append(a.document.createElement("br"));var I=F.getNext()&&(F.getNext().type!=1||!F.getNext().isBlockBoundary());while(F.getFirst())F.getFirst().remove().appendTo(x);I&&x.append(a.document.createElement("br")),x.replace(F),G=!1}}}}f.selectBookmarks(i),a.focus()}};j.add("blockquote",{init:function(a){a.addCommand("blockquote",f),a.ui.addButton("Blockquote",{label:a.lang.blockquote,command:"blockquote"}),a.on("selectionChange",b)},requires:["domiterator"]})}(),j.add("button",{beforeInit:function(a){a.ui.addHandler("button",k.button.handler)}}),a.UI_BUTTON="button",k.button=function(a){e.extend(this,a,{title:a.label,className:a.className||a.command&&"cke_button_"+a.command||"",click:a.click||function(b){b.execCommand(a.command)}}),this._={}},k.button.handler={create:function(a){return new k.button(a)}},function(){k.button.prototype={render:function(f,g){var h=b,i=this._.id=e.getNextId(),j="",k=this.command,l;this._.editor=f;var m={id:i,button:this,editor:f,focus:function(){var b=a.document.getById(i);b.focus()},execute:function(){c&&b.version<7?e.setTimeout(function(){this.button.click(f)},0,this):this.button.click(f)}},n=e.addFunction(function(a){if(m.onkey)return a=new d.event(a),m.onkey(m,a.getKeystroke())!==!1}),o=e.addFunction(function(a){var c;return m.onfocus&&(c=m.onfocus(m,new d.event(a))!==!1),b.gecko&&b.version<10900&&a.preventBubble(),c});m.clickFn=l=e.addFunction(m.execute,m);if(this.modes){var p={};function q(){var a=f.mode;if(a){var b=this.modes[a]?p[a]!=undefined?p[a]:2:0;this.setState(f.readOnly&&!this.readOnly?0:b)}}f.on("beforeModeUnload",function(){f.mode&&this._.state!=0&&(p[f.mode]=this._.state)},this),f.on("mode",q,this),!this.readOnly&&f.on("readOnly",q,this)}else k&&(k=f.getCommand(k),k&&(k.on("state",function(){this.setState(k.state)},this),j+="cke_"+(k.state==1?"on":k.state==0?"disabled":"off")));k||(j+="cke_off"),this.className&&(j+=" "+this.className),g.push('','=10900&&!h.hc?"":'" href="javascript:void(\''+(this.title||"").replace("'","")+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+i+'_label"'+(this.hasArrow?' aria-haspopup="true"':"")),(h.opera||h.gecko&&h.mac)&&g.push(' onkeypress="return false;"'),h.gecko&&g.push(' onblur="this.style.cssText = this.style.cssText;"'),g.push(' onkeydown="return CKEDITOR.tools.callFunction(',n,', event);" onfocus="return CKEDITOR.tools.callFunction(',o,', event);" '+(c?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction(',l,', this); return false;"> ',this.label,""),this.hasArrow&&g.push(''+(b.hc?"▼":" ")+""),g.push("",""),this.onRender&&this.onRender(),m},setState:function(b){if(this._.state==b)return!1;this._.state=b;var c=a.document.getById(this._.id);return c?(c.setState(b),b==0?c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled"),b==1?c.setAttribute("aria-pressed",!0):c.removeAttribute("aria-pressed"),!0):!1}}}(),k.prototype.addButton=function(a,b){this.add(a,"button",b)},function(){function m(a){a.cancel()}function n(a,c,e){var f=this.document;if(f.getById("cke_pastebin"))return;if(c=="text"&&a.data&&a.data.$.clipboardData){var g=a.data.$.clipboardData.getData("text/plain");if(g){a.data.preventDefault(),e(g);return}}var i=this.getSelection(),j=new d.range(f),k=new h(c=="text"?"textarea":b.webkit?"body":"div",f);k.setAttribute("id","cke_pastebin"),b.webkit&&k.append(f.createText(" ")),f.getBody().append(k),k.setStyles({position:"absolute",top:i.getStartElement().getDocumentPosition().y+"px",width:"1px",height:"1px",overflow:"hidden"}),k.setStyle(this.config.contentsLangDirection=="ltr"?"left":"right","-1000px");var l=i.createBookmarks();this.on("selectionChange",m,null,null,0),c=="text"?k.$.focus():(j.setStartAt(k,1),j.setEndAt(k,2),j.select(!0));var n=this;window.setTimeout(function(){c=="text"&&b.gecko&&n.focusGrabber.focus(),k.remove(),n.removeListener("selectionChange",m);var a;k=b.webkit&&(a=k.getFirst())&&a.is&&a.hasClass("Apple-style-span")?a:k,i.selectBookmarks(l),e(k["get"+(c=="text"?"Value":"Html")]())},0)}function o(a){if(!c||b.quirks)return;var d=a.getSelection(),e;if(d.getType()==3&&(e=d.getSelectedElement())){var f=d.getRanges()[0],g=a.document.createText("");g.insertBefore(e),f.setStartBefore(g),f.setEndAfter(e),d.selectRanges([f]),setTimeout(function(){e.getParent()&&(g.remove(),d.selectElement(e))},0)}}function q(a,b){c&&(p=1);var d=2;try{d=b.document.$.queryCommandEnabled(a)?2:0}catch(e){}return p=0,d}function s(){var a=this;if(a.mode!="wysiwyg")return;a.getCommand("cut").setState(r?0:q("Cut",a)),a.getCommand("copy").setState(q("Copy",a));var c=r?0:b.webkit?2:q("Paste",a);a.fire("pasteState",c)}var f=function(a,c){var d=a.document,e=d.getBody(),f=0,g=function(){f=1};return e.on(c,g),(b.version>7?d.$:d.$.selection.createRange()).execCommand(c),e.removeListener(c,g),f},g=c?function(a,b){return f(a,b)}:function(a,b){try{return a.document.$.execCommand(b,!1,null)}catch(c){return!1}},i=function(a){var b=this;b.type=a,b.canUndo=b.type=="cut",b.startDisabled=!0};i.prototype={exec:function(a,b){this.type=="cut"&&o(a);var c=g(a,this.type);return c||alert(a.lang.clipboard[this.type+"Error"]),c}};var k={canUndo:!1,exec:c?function(a){a.focus();if(!a.document.getBody().fire("beforepaste")&&!f(a,"paste"))return a.fire("pasteDialog"),!1}:function(a){try{if(!a.document.getBody().fire("beforepaste")&&!a.document.$.execCommand("Paste",!1,null))throw 0}catch(b){return setTimeout(function(){a.fire("pasteDialog")},0),!1}}},l=function(a){if(this.mode!="wysiwyg")return;switch(a.data.keyCode){case 1114198:case 2228269:var d=this.document.getBody();!c&&d.fire("beforepaste")?a.cancel():(b.opera||b.gecko&&b.version<10900)&&d.fire("paste");return;case 1114200:case 2228270:var e=this;this.fire("saveSnapshot"),setTimeout(function(){e.fire("saveSnapshot")},0)}},p,r;j.add("clipboard",{requires:["dialog","htmldataprocessor"],init:function(c){function d(a,b,d,e){var f=c.lang[b];c.addCommand(b,d),c.ui.addButton(a,{label:f,command:b}),c.addMenuItems&&c.addMenuItem(b,{label:f,command:b,group:"clipboard",order:e})}c.on("paste",function(a){var b=a.data;b.html?c.insertHtml(b.html):b.text&&c.insertText(b.text),setTimeout(function(){c.fire("afterPaste")},0)},null,null,1e3),c.on("pasteDialog",function(a){setTimeout(function(){c.openDialog("paste")},0)}),c.on("pasteState",function(a){c.getCommand("paste").setState(a.data)}),d("Cut","cut",new i("cut"),1),d("Copy","copy",new i("copy"),4),d("Paste","paste",k,8),a.dialog.add("paste",a.getUrl(this.path+"dialogs/paste.js")),c.on("key",l,c),c.on("contentDom",function(){var a=c.document.getBody();a.on(b.webkit?"paste":"beforepaste",function(a){if(p)return;var b={mode:"html"};c.fire("beforePaste",b),n.call(c,a,b.mode,function(a){if(!(a=e.trim(a.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,""))))return;var d={};d[b.mode]=a,c.fire("paste",d)})}),a.on("contextmenu",function(){p=1,setTimeout(function(){p=0},10)}),a.on("beforecut",function(){!p&&o(c)}),a.on("mouseup",function(){setTimeout(function(){s.call(c)},0)},c),a.on("keyup",s,c)}),c.on("selectionChange",function(a){r=a.data.selection.getRanges()[0].checkReadOnly(),s.call(c)}),c.contextMenu&&c.contextMenu.addListener(function(a,d){var e=d.getRanges()[0].checkReadOnly();return{cut:!e&&q("Cut",c),copy:q("Copy",c),paste:!e&&(b.webkit?2:q("Paste",c))}})}})}(),j.add("colorbutton",{requires:["panelbutton","floatpanel","styles"],init:function(c){function i(a,b,f){var h=e.getNextId()+"_colorBox";c.ui.add(a,"panelbutton",{label:f,title:f,className:"cke_button_"+a.toLowerCase(),modes:{wysiwyg:1},panel:{css:c.skin.editor.css,attributes:{role:"listbox","aria-label":g.panelTitle}},onBlock:function(a,d){d.autoSize=!0,d.element.addClass("cke_colorblock"),d.element.setHtml(j(a,b,h)),d.element.getDocument().getBody().setStyle("overflow","hidden"),k.fire("ready",this);var e=d.keys,f=c.lang.dir=="rtl";e[f?37:39]="next",e[40]="next",e[9]="next",e[f?39:37]="prev",e[38]="prev",e[2228233]="prev",e[32]="click"},onOpen:function(){var a=c.getSelection(),e=a&&a.getStartElement(),f=new d.elementPath(e),g;e=f.block||f.blockLimit||c.document.getBody();do g=e&&e.getComputedStyle(b=="back"?"background-color":"color")||"transparent";while(b=="back"&&g=="transparent"&&e&&(e=e.getParent()));if(!g||g=="transparent")g="#ffffff";this._.panel._.iframe.getFrameDocument().getById(h).setStyle("background-color",g)}})}function j(b,d,h){var i=[],j=f.colorButton_colors.split(","),k=j.length+(f.colorButton_enableMore?2:1),p=e.addFunction(function(d,e){if(d=="?"){var g=arguments.callee;function h(a){this.removeListener("ok",h),this.removeListener("cancel",h),a.name=="ok"&&g(this.getContentElement("picker","selectedColor").getValue(),e)}c.openDialog("colordialog",function(){this.on("ok",h),this.on("cancel",h)});return}c.focus(),b.hide(!1),c.fire("saveSnapshot"),(new a.style(f["colorButton_"+e+"Style"],{color:"inherit"})).remove(c.document);if(d){var i=f["colorButton_"+e+"Style"];i.childRule=e=="back"?function(a){return l(a)}:function(a){return!a.is("a")&&!a.getElementsByTag("a").count()||l(a)},(new a.style(i,{color:d})).apply(c.document)}c.fire("saveSnapshot")});i.push('
',g.auto,'
');for(var q=0;q");var r=j[q].split("/"),t=r[0],u=r[1]||t;r[1]||(t="#"+t.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));var v=c.lang.colors[u]||u;i.push('')}return(f.colorButton_enableMore===undefined||f.colorButton_enableMore)&&i.push('"),i.push("
',g.more,"
"),i.join("")}function l(a){return a.getAttribute("contentEditable")=="false"||a.getAttribute("data-nostyle")}var f=c.config,g=c.lang.colorButton,h;b.hc||(i("TextColor","fore",g.textColorTitle),i("BGColor","back",g.bgColorTitle))}}),i.colorButton_colors="000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF",i.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},i.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},j.colordialog={init:function(b){b.addCommand("colordialog",new a.dialogCommand("colordialog")),a.dialog.add("colordialog",this.path+"dialogs/colordialog.js")}},j.add("colordialog",j.colordialog),j.add("contextmenu",{requires:["menu"],onLoad:function(){j.contextMenu=e.createClass({base:a.menu,$:function(a){this.base.call(this,a,{panel:{className:a.skinClass+" cke_contextmenu",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,d){if(b.opera&&!("oncontextmenu"in document.body)){var f;a.on("mousedown",function(c){c=c.data;if(c.$.button!=2){c.getKeystroke()==1114112+1&&a.fire("contextmenu",c);return}if(d&&(b.mac?c.$.metaKey:c.$.ctrlKey))return;var e=c.getTarget();if(!f){var g=e.getDocument();f=g.createElement("input"),f.$.type="button",g.getBody().append(f)}f.setAttribute("style","position:absolute;top:"+(c.$.clientY-2)+"px;left:"+(c.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}),a.on("mouseup",function(b){f&&(f.remove(),f=undefined,a.fire("contextmenu",b.data))})}a.on("contextmenu",function(a){var f=a.data;if(d&&(b.webkit?g:b.mac?f.$.metaKey:f.$.ctrlKey))return;f.preventDefault();var h=f.getTarget().getDocument().getDocumentElement(),i=f.$.clientX,j=f.$.clientY;e.setTimeout(function(){this.open(h,null,i,j)},c?200:0,this)},this),b.opera&&a.on("keypress",function(a){var b=a.data;b.$.keyCode===0&&b.preventDefault()});if(b.webkit){var g,h=function(a){g=b.mac?a.data.$.metaKey:a.data.$.ctrlKey},i=function(){g=0};a.on("keydown",h),a.on("keyup",i),a.on("contextmenu",i)}},open:function(b,c,d,e){this.editor.focus(),b=b||a.document.getDocumentElement(),this.show(b,c,d,e)}}})},beforeInit:function(a){a.contextMenu=new j.contextMenu(a),a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}})}}),function(){function b(a){var b=this.att,c=a&&a.hasAttribute(b)&&a.getAttribute(b)||"";c!==undefined&&this.setValue(c)}function c(){var a;for(var b=0;b ';j.add("elementspath",{requires:["selection"],init:function(c){function l(a){c.focus();var b=c._.elementsPath.list[a];if(b.is("body")){var e=new d.range(c.document);e.selectNodeContents(b),e.select()}else c.getSelection().selectElement(b)}function q(){i&&i.setHtml(g),delete c._.elementsPath.list}var h="cke_path_"+c.name,i,j=function(){return i||(i=a.document.getById(h)),i},k="cke_elementspath_"+e.getNextNumber()+"_";c._.elementsPath={idBase:k,filters:[]},c.on("themeSpace",function(a){a.data.space=="bottom"&&(a.data.html+=''+c.lang.elementsPath.eleLabel+""+'
'+g+"
")});var o=e.addFunction(l),p=e.addFunction(function(b,e){var f=c._.elementsPath.idBase,g;e=new d.event(e);var h=c.lang.dir=="rtl";switch(e.getKeystroke()){case h?39:37:case 9:return g=a.document.getById(f+(b+1)),g||(g=a.document.getById(f+"0")),g.focus(),!1;case h?37:39:case 2228233:return g=a.document.getById(f+(b-1)),g||(g=a.document.getById(f+(c._.elementsPath.list.length-1))),g.focus(),!1;case 27:return c.focus(),!1;case 13:case 32:return l(b),!1}return!0});c.on("selectionChange",function(a){var c=b,d=a.data.selection,e=d.getStartElement(),f=[],h=a.editor,i=h._.elementsPath.list=[],l=h._.elementsPath.filters;while(e){var m=0,q;e.data("cke-display-name")?q=e.data("cke-display-name"):e.data("cke-real-element-type")?q=e.data("cke-real-element-type"):q=e.getName();for(var t=0;t',q,''+z+"","")}if(q=="body")break;e=e.getParent()}var A=j();A.setHtml(f.join("")+g),h.fire("elementsPathUpdate",{space:A})}),c.on("readOnly",q),c.on("contentDomUnload",q),c.addCommand("elementsPathFocus",f.toolbarFocus)}})}(),function(){function i(a){return a.mode!="wysiwyg"?!1:k(a,a.config.shiftEnterMode,1)}function k(a,b,c){return c=a.config.forceEnterMode||c,a.mode!="wysiwyg"?!1:(b||(b=a.config.enterMode),setTimeout(function(){a.fire("saveSnapshot"),b==2?e(a,b,null,c):g(a,b,null,c),a.fire("saveSnapshot")},0),!0)}function l(a){var b=a.getSelection().getRanges(!0);for(var c=b.length-1;c>0;c--)b[c].deleteContents();return b[0]}j.add("enterkey",{requires:["keystrokes","indent"],init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){k(a)}}),a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){i(a)}});var b=a.keystrokeHandler.keystrokes;b[13]="enter",b[2228237]="shiftEnter"}}),j.enterkey={enterBlock:function(a,b,g,i){g=g||l(a);if(!g)return;var j=g.document,k=g.checkStartOfBlock(),m=g.checkEndOfBlock(),o=new d.elementPath(g.startContainer),q=o.block;if(k&&m){if(q&&(q.is("li")||q.getParent().is("li"))){a.execCommand("outdent");return}if(q&&q.getParent().is("blockquote")){q.breakParent(q.getParent()),q.getPrevious().getFirst(d.walker.invisible(1))||q.getPrevious().remove(),q.getNext().getFirst(d.walker.invisible(1))||q.getNext().remove(),g.moveToElementEditStart(q),g.select();return}}else if(q&&q.is("pre")){if(!m){e(a,b,g,i);return}}else if(q&&f.$captionBlock[q.getName()]){e(a,b,g,i);return}var r=b==3?"div":"p",t=g.splitBlock(r);if(!t)return;var u=t.previousBlock,v=t.nextBlock,w=t.wasStartOfBlock,x=t.wasEndOfBlock,y;v?(y=v.getParent(),y.is("li")&&(v.breakParent(y),v.move(v.getNext(),1))):u&&(y=u.getParent())&&y.is("li")&&(u.breakParent(y),y=u.getNext(),g.moveToElementEditStart(y),u.move(u.getPrevious()));if(!w&&!x)v.is("li")&&(y=v.getFirst(d.walker.invisible(!0)))&&y.is&&y.is("ul","ol")&&(c?j.createText(" "):j.createElement("br")).insertBefore(y),v&&g.moveToElementEditStart(v);else{var z,A;if(u){if(u.is("li")||!h.test(u.getName())&&!u.is("pre"))z=u.clone()}else v&&(z=v.clone());z?i&&!z.is("li")&&z.renameNode(r):y&&y.is("li")?z=y:(z=j.createElement(r),u&&(A=u.getDirection())&&z.setAttribute("dir",A));var B=t.elementPath;if(B)for(var C=0,D=B.elements.length;C",lt:"<",amp:"&"};a=a.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(a,f){var g=b?"&"+f+";":e[f],h=b?e[f]:"&"+f+";";return c[g]=h,d.push(g),""});if(!b&&a){a=a.split(",");var f=document.createElement("div"),g;f.innerHTML="&"+a.join(";&")+";",g=f.innerHTML,f=null;for(var h=0;h0;case"checked":return!!c.$.checked;case"value":var e=c.getAttribute("type");return e=="checkbox"||e=="radio"?c.$.value!="on":c.$.value}return a.apply(c,arguments)}})),function(){var a={canUndo:!1,exec:function(a){var b=a.document.createElement("hr"),c=new d.range(a.document);a.insertElement(b),c.moveToPosition(b,4);var e=b.getNext();(!e||e.type==1&&!e.isEditable())&&c.fixBlock(!0,a.config.enterMode==3?"div":"p"),c.select()}},b="horizontalrule";j.add(b,{init:function(c){c.addCommand(b,a),c.ui.addButton("HorizontalRule",{label:c.lang.horizontalrule,command:b})}})}(),function(){function g(a){var b=a.children.length,c=a.children[b-1];while(c&&c.type==3&&!e.trim(c.value))c=a.children[--b];return c}function k(a,d){var e=a.children,f=g(a);f&&((d||!c)&&f.type==1&&f.name=="br"&&e.pop(),f.type==3&&b.test(f.value)&&e.pop())}function l(a,b,d){if(!b&&(!d||typeof d=="function"&&d(a)===!1))return!1;if(b&&c&&(document.documentMode>7||a.name in f.tr||a.name in f.$listItem))return!1;var e=g(a);return!e||e&&(e.type==1&&e.name=="br"||a.name=="form"&&e.name=="input")}function m(b,d){return function(e){k(e,!b),l(e,!b,d)&&(b||c?e.add(new a.htmlParser.text(" ")):e.add(new a.htmlParser.element("br",{})))}}function u(a){var b=a.attributes;b.contenteditable!="false"&&(b["data-cke-editable"]=b.contenteditable?"true":1),b.contenteditable="false"}function v(a){var b=a.attributes;switch(b["data-cke-editable"]){case"true":b.contenteditable="true";break;case"1":delete b.contenteditable}}function D(a){return a.replace(w,function(a,b,c){return"<"+b+c.replace(x,function(a,b){return!/^on/.test(b)&&c.indexOf("data-cke-saved-"+b)==-1?" data-cke-saved-"+a+" "+a:a})+">"})}function E(a){return a.replace(y,function(a){return""+encodeURIComponent(a)+""})}function F(a){return a.replace(z,function(a,b){return decodeURIComponent(b)})}function G(a){return a.replace(A,"$1cke:$2")}function H(a){return a.replace(B,"$1$2")}function I(a){return a.replace(C,"")}function J(a){return a.replace(/(]*>)(\r\n|\n)/g,"$1$2$2")}function K(a){return a.replace(//g,function(a){return""})}function L(a){return a.replace(//g,function(a,b){return decodeURIComponent(b)})}function M(a,b){var c=b._.dataStore;return a.replace(//g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function N(a,b){var c=[],e=b.config.protectedSource,f=b._.dataStore||(b._.dataStore={id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,h=[//gi,//gi].concat(e);a=a.replace(//g,function(a){return""});for(var i=0;i"});return a=a.replace(g,function(a,b,e){return""}),a.replace(/(['"]).*?\1/g,function(a){return a.replace(//g,function(a,b){return f[f.id]=decodeURIComponent(b),"{cke_protected_"+f.id++ +"}"})})}var b=/^[\t\r\n ]*(?: |\xa0)$/,d="{cke_protected}",n=f,o=["caption","colgroup","col","thead","tfoot","tbody"],p=e.extend({},n.$block,n.$listItem,n.$tableContent);for(var q in p)"br"in n[q]||delete p[q];delete p.pre;var r={elements:{},attributeNames:[[/^on/,"data-cke-pa-on"]]},s={elements:{}};for(q in p)s.elements[q]=m();var t={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;var c=["name","href","src"],d;for(var e=0;ee.indexOf(o,b.name)?1:-1:0})},embed:function(a){var b=a.parent;if(b&&b.name=="object"){var c=b.attributes.width,d=b.attributes.height;c&&(a.attributes.width=c),d&&(a.attributes.height=d)}},param:function(a){return a.children=[],a.isEmpty=!0,a},a:function(a){if(!(a.children.length||a.attributes.name||a.attributes["data-cke-saved-name"]))return!1},span:function(a){a.attributes["class"]=="Apple-style-span"&&delete a.name},pre:function(a){c&&k(a)},html:function(a){delete a.attributes.contenteditable,delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck,delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=e.trim(b.value)),a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];b&&(b.value=a.attributes["data-cke-title"]||"")}},attributes:{"class":function(a,b){return e.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};c&&(t.attributes.style=function(a,b){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});for(q in{input:1,textarea:1})r.elements[q]=u,t.elements[q]=v;var w=/<(a|area|img|input)\b([^>]*)>/gi,x=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,y=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,z=/([^<]*)<\/cke:encoded>/gi,A=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,B=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,C=/]*?)\/?>(?!\s*<\/cke:\1)/gi;j.add("htmldataprocessor",{requires:["htmlwriter"],init:function(b){var c=b.dataProcessor=new a.htmlDataProcessor(b);c.writer.forceSimpleAmpersand=b.config.forceSimpleAmpersand,c.dataFilter.addRules(r),c.dataFilter.addRules(s),c.htmlFilter.addRules(t);var d={elements:{}};for(q in p)d.elements[q]=m(!0,b.config.fillEmptyBlocks);c.htmlFilter.addRules(d)},onLoad:function(){!("fillEmptyBlocks"in i)&&(i.fillEmptyBlocks=1)}}),a.htmlDataProcessor=function(b){var c=this;c.editor=b,c.writer=new a.htmlWriter,c.dataFilter=new a.htmlParser.filter,c.htmlFilter=new a.htmlParser.filter},a.htmlDataProcessor.prototype={toHtml:function(b,c){b=N(b,this.editor),b=D(b),b=E(b),b=G(b),b=I(b),b=J(b);var d=new h("div");d.setHtml("a"+b),b=d.getHtml().substr(1),b=H(b),b=F(b),b=L(b);var e=a.htmlParser.fragment.fromHtml(b,c),f=new a.htmlParser.basicWriter;return e.writeHtml(f,this.dataFilter),b=f.getHtml(!0),b=K(b),b},toDataFormat:function(b,c){var d=this.writer,e=a.htmlParser.fragment.fromHtml(b,c);d.reset(),e.writeHtml(d,this.htmlFilter);var f=d.getHtml(!0);return f=L(f),f=M(f,this.editor),f}}}(),function(){j.add("iframe",{requires:["dialog","fakeobjects"],init:function(b){var c="iframe",d=b.lang.iframe;a.dialog.add(c,this.path+"dialogs/iframe.js"),b.addCommand(c,new a.dialogCommand(c)),b.addCss("img.cke_iframe{background-image: url("+a.getUrl(this.path+"images/placeholder.png")+");"+"background-position: center center;"+"background-repeat: no-repeat;"+"border: 1px solid #a9a9a9;"+"width: 80px;"+"height: 80px;"+"}"),b.ui.addButton("Iframe",{label:d.toolbar,command:c}),b.on("doubleclick",function(a){var b=a.data.element;b.is("img")&&b.data("cke-real-element-type")=="iframe"&&(a.data.dialog="iframe")}),b.addMenuItems&&b.addMenuItems({iframe:{label:d.title,command:"iframe",group:"image"}}),b.contextMenu&&b.contextMenu.addListener(function(a,b){if(a&&a.is("img")&&a.data("cke-real-element-type")=="iframe")return{iframe:2}})},afterInit:function(a){var b=a.dataProcessor,c=b&&b.dataFilter;c&&c.addRules({elements:{iframe:function(b){return a.createFakeParserElement(b,"cke_iframe","iframe",!0)}}})}})}(),j.add("image",{init:function(b){var c="image";a.dialog.add(c,this.path+"dialogs/image.js"),b.addCommand(c,new a.dialogCommand(c)),b.ui.addButton("Image",{label:b.lang.common.image,command:c}),b.on("doubleclick",function(a){var b=a.data.element;b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly()&&(a.data.dialog="image")}),b.addMenuItems&&b.addMenuItems({image:{label:b.lang.image.menu,command:"image",group:"image"}}),b.contextMenu&&b.contextMenu.addListener(function(a,b){return!a||!a.is("img")||a.data("cke-realelement")||a.isReadOnly()?null:{image:2}})}}),i.image_removeLinkByEmptyURL=!0,function(){function i(b){var c=this;if(b.editor.readOnly)return null;var d=b.editor,e=b.data.path,f=e&&e.contains(a),g=e.block||e.blockLimit;if(f)return c.setState(2);if(!c.useIndentClasses&&c.name=="indent")return c.setState(2);if(!g)return c.setState(0);if(c.useIndentClasses){var h=g.$.className.match(c.classNameRegex),i=0;return h&&(h=h[1],i=c.indentClassMap[h]),c.name=="outdent"&&!i||c.name=="indent"&&i==d.config.indentClasses.length?c.setState(0):c.setState(2)}var j=parseInt(g.getStyle(l(g)),10);return isNaN(j)&&(j=0),j<=0?c.setState(0):c.setState(2)}function k(a,b){var c=this;c.name=b,c.useIndentClasses=a.config.indentClasses&&a.config.indentClasses.length>0;if(c.useIndentClasses){c.classNameRegex=new RegExp("(?:^|\\s+)("+a.config.indentClasses.join("|")+")(?=$|\\s)"),c.indentClassMap={};for(var d=0;dy;s++)w[s].indent+=t;var A=j.list.arrayToList(w,k,null,b.config.enterMode,d.getDirection());if(i.name=="outdent"){var B;if((B=d.getParent())&&B.is("li")){var C=A.listNode.getChildren(),D=[],E=C.count(),F;for(s=E-1;s>=0;s--)(F=C.getItem(s))&&F.is&&F.is("li")&&D.push(F)}}A&&A.listNode.replace(d);if(D&&D.length)for(s=0;s0&&a.addClass(b.config.indentClasses[f-1])}else{var g=l(a,c),j=parseInt(a.getStyle(g),10);isNaN(j)&&(j=0);var m=b.config.indentOffset||40;j+=(i.name=="indent"?1:-1)*m;if(j<0)return!1;j=Math.max(j,0),j=Math.ceil(j/m)*m,a.setStyle(g,j?j+(b.config.indentUnit||"px"):""),a.getAttribute("style")===""&&a.removeAttribute("style")}return h.setMarker(k,a,"indent_processed",1),!0}var i=this,k={},u=b.getSelection(),v=u.createBookmarks(1),w=u&&u.getRanges(1),x,y=w.createIterator();while(x=y.getNextRange()){var z=x.getCommonAncestor(),A=z;while(A&&(A.type!=1||!a[A.getName()]))A=A.getParent();if(!A){var B=x.getEnclosedNode();B&&B.type==1&&B.getName()in a&&(x.setStartAt(B,1),x.setEndAt(B,2),A=B)}if(A&&x.startContainer.type==1&&x.startContainer.getName()in a){var C=new d.walker(x);C.evaluator=m,x.startContainer=C.next()}A&&x.endContainer.type==1&&x.endContainer.getName()in a&&(C=new d.walker(x),C.evaluator=m,x.endContainer=C.previous());if(A){var D=A.getFirst(m),E=!!D.getNext(m),F=x.startContainer,G=D.equals(F)||D.contains(F);(!G||i.name!="indent"&&!i.useIndentClasses&&!parseInt(A.getStyle(l(A)),10)||!t(A,!E&&D.getDirection()))&&p(A)}else q()}h.clearAllMarkers(k),b.forceNextSelectionCheck(),u.selectBookmarks(v)}},j.add("indent",{init:function(a){var c=a.addCommand("indent",new k(a,"indent")),f=a.addCommand("outdent",new k(a,"outdent"));a.ui.addButton("Indent",{label:a.lang.indent,command:"indent"}),a.ui.addButton("Outdent",{label:a.lang.outdent,command:"outdent"}),a.on("selectionChange",e.bind(i,c)),a.on("selectionChange",e.bind(i,f)),(b.ie6Compat||b.ie7Compat)&&a.addCss("ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}"),a.on("dirChanged",function(b){var c=new d.range(a.document);c.setStartBefore(b.data.node),c.setEndAfter(b.data.node);var e=new d.walker(c),f;while(f=e.next())if(f.type==1){if(!f.equals(b.data.node)&&f.getDirection()){c.setStartAfter(f),e=new d.walker(c);continue}var g=a.config.indentClasses;if(g){var h=b.data.dir=="ltr"?["_rtl",""]:["","_rtl"];for(var i=0;i=0;m--){j=h[m].createIterator(),j.enlargeBr=f!=2;while(k=j.getNextParagraph(f==1?"p":"div")){k.removeAttribute("align"),k.removeStyle("text-align");var o=i&&(k.$.className=e.ltrim(k.$.className.replace(c.cssClassRegex,""))),p=c.state==2&&(!l||b(k,true)!=c.value);i?p?k.addClass(i):o||k.removeAttribute("class"):p&&k.setStyle("text-align",c.value)}}a.focus(),a.forceNextSelectionCheck(),d.selectBookmarks(g)}},j.add("justify",{init:function(a){var b=new f(a,"justifyleft","left"),d=new f(a,"justifycenter","center"),h=new f(a,"justifyright","right"),i=new f(a,"justifyblock","justify");a.addCommand("justifyleft",b),a.addCommand("justifycenter",d),a.addCommand("justifyright",h),a.addCommand("justifyblock",i),a.ui.addButton("JustifyLeft",{label:a.lang.justify.left,command:"justifyleft"}),a.ui.addButton("JustifyCenter",{label:a.lang.justify.center,command:"justifycenter"}),a.ui.addButton("JustifyRight",{label:a.lang.justify.right,command:"justifyright"}),a.ui.addButton("JustifyBlock",{label:a.lang.justify.block,command:"justifyblock"}),a.on("selectionChange",e.bind(c,b)),a.on("selectionChange",e.bind(c,h)),a.on("selectionChange",e.bind(c,d)),a.on("selectionChange",e.bind(c,i)),a.on("dirChanged",g)},requires:["domiterator"]})}(),j.add("keystrokes",{beforeInit:function(b){b.keystrokeHandler=new a.keystrokeHandler(b),b.specialKeys={}},init:function(a){var b=a.config.keystrokes,c=a.config.blockedKeystrokes,d=a.keystrokeHandler.keystrokes,e=a.keystrokeHandler.blockedKeystrokes;for(var f=0;fe[g-1].indent+1){var m=e[g-1].indent+1-e[g].indent,n=e[g].indent;while(e[g]&&e[g].indent>=n)e[g].indent+=m,g++;g--}var o=j.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")),p=o.listNode,q,r;s(!0),s(),p.replace(b.root)}function s(a,b){this.name=a,this.type=b}function t(a){var b=a.getDirection();if(b){for(var c=0,d=a.getChildren(),e;e=d.getItem(c),c7)&&s.append(n.createText(" ")),s.append(y.listNode),q=y.nextIndex}else{if(v.indent!=-1||!!g||!v.grandparent)return null;b[v.grandparent.getName()]?s=v.element.clone(!1,!0):k||v.element.hasAttributes()||i!=2?(s=n.createElement(u),v.element.copyAttributes(s,{type:1,value:1}),!k&&i==2&&!s.hasAttributes()&&(s=new d.documentFragment(n))):s=new d.documentFragment(n),s.type==1&&v.grandparent.getDirection(1)!=t&&s.setAttribute("dir",t);for(w=0;w=0&&(G=B[H]);H--)if(b[G.getName()]&&F.contains(G)){F.removeCustomData("list_group_object_"+u);var I=G.getCustomData("list_group_object");I?I.contents.push(z):(I={root:G,contents:[z]},n.push(I),h.setMarker(p,G,"list_group_object",I)),E=1;break}if(E)continue;var J=F;J.getCustomData("list_group_object_"+u)?J.getCustomData("list_group_object_"+u).contents.push(z):(I={root:J,contents:[z]},h.setMarker(p,J,"list_group_object_"+u,I),n.push(I))}}var K=[];while(n.length>0)I=n.shift(),this.state==2?b[I.root.getName()]?o.call(this,a,I,p,K):q.call(this,a,I,K):this.state==1&&b[I.root.getName()]&&r.call(this,a,I,p);for(H=0;H0)for(var c=b.length-1;c>=0;c--){var d=b[c][0],e=b[c][1];e?d.insertBefore(e):d.appendTo(a)}}function f(a,b){var c=d(a),f={},g=a.$;return b||(f["class"]=g.className||"",g.className=""),f.inline=g.style.cssText||"",b||(g.style.cssText="position: static; overflow: visible"),e(c),f}function g(a,b){var c=d(a),f=a.$;"class"in b&&(f.className=b["class"]),"inline"in b&&(f.style.cssText=b.inline),e(c)}function i(b){var c=a.instances;for(var d in c){var e=c[d];if(e.mode=="wysiwyg"&&!e.readOnly){var f=e.document.getBody();f.setAttribute("contentEditable",!1),f.setAttribute("contentEditable",!0)}}b.focusManager.hasFocus&&(b.toolbox.focus(),b.focus())}function k(a){if(!c||b.version>6)return null;var d=h.createFromHtml('');return a.append(d,!0)}j.add("maximize",{init:function(d){function t(){var a=j.getViewPaneSize();s&&s.setStyles({width:a.width+"px",height:a.height+"px"}),d.resize(a.width,a.height,null,!0)}var e=d.lang,h=a.document,j=h.getWindow(),l,m,n,s,u=2;d.addCommand("maximize",{modes:{wysiwyg:!b.iOS,source:!b.iOS},readOnly:1,editorFocus:!1,exec:function(){var a=d.container.getChild(1),C=d.getThemeSpace("contents");if(d.mode=="wysiwyg"){var D=d.getSelection();l=D&&D.getRanges(),m=j.getScrollPosition()}else{var E=d.textarea.$;l=!c&&[E.selectionStart,E.selectionEnd],m=[E.scrollLeft,E.scrollTop]}if(this.state==2){j.on("resize",t),n=j.getScrollPosition();var F=d.container;while(F=F.getParent())F.setCustomData("maximize_saved_styles",f(F)),F.setStyle("z-index",d.config.baseFloatZIndex-1);C.setCustomData("maximize_saved_styles",f(C,!0)),a.setCustomData("maximize_saved_styles",f(a,!0));var G={overflow:b.webkit?"":"hidden",width:0,height:0};h.getDocumentElement().setStyles(G),!b.gecko&&h.getDocumentElement().setStyle("position","fixed"),(!b.gecko||!b.quirks)&&h.getBody().setStyles(G),c?setTimeout(function(){j.$.scrollTo(0,0)},0):j.$.scrollTo(0,0),a.setStyle("position",b.gecko&&b.quirks?"fixed":"absolute"),a.$.offsetLeft,a.setStyles({"z-index":d.config.baseFloatZIndex-1,left:"0px",top:"0px"}),s=k(a),a.addClass("cke_maximized"),t();var H=a.getDocumentPosition();a.setStyles({left:-1*H.x+"px",top:-1*H.y+"px"}),b.gecko&&i(d)}else if(this.state==1){j.removeListener("resize",t);var I=[C,a];for(var J=0;J ');c.children.length=0,c.add(e);var f=c.attributes;delete f["aria-label"],delete f.contenteditable,delete f.title}return d}}},5),e&&e.addRules({elements:{div:function(a){var b=a.attributes,d=b&&b.style,e=d&&a.children.length==1&&a.children[0],f=e&&e.name=="span"&&e.attributes.style;f&&/page-break-after\s*:\s*always/i.test(d)&&/display\s*:\s*none/i.test(f)&&(b.contenteditable="false",b["class"]="cke_pagebreak",b["data-cke-display-name"]="pagebreak",b["aria-label"]=c,b.title=c,a.children.length=0)}}})},requires:["fakeobjects"]}),j.pagebreakCmd={exec:function(a){var b=a.lang.pagebreakAlt,c=h.createFromHtml('
'+"
",a.document),d=a.getSelection().getRanges(!0);a.fire("saveSnapshot");for(var e,f=d.length-1;f>=0;f--){e=d[f],f1&&b.substr(b.length-1,1)=="%"&&(b=parseInt(window.screen.width*parseInt(b,10)/100,10)),typeof c=="string"&&c.length>1&&c.substr(c.length-1,1)=="%"&&(c=parseInt(window.screen.height*parseInt(c,10)/100,10)),b<640&&(b=640),c<420&&(c=420);var e=parseInt((window.screen.height-c)/2,10),f=parseInt((window.screen.width-b)/2,10);d=(d||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+b+",height="+c+",top="+e+",left="+f;var g=window.open("",null,d,!0);if(!g)return!1;try{g.moveTo(f,e),g.resizeTo(b,c),g.focus(),g.location.href=a}catch(h){g=window.open(a,null,d,!0)}return!0}}),function(){var a={modes:{wysiwyg:1,source:1},canUndo:!1,readOnly:1,exec:function(a){var c,d=a.config,f=d.baseHref?'':"",g=b.isCustomDomain();if(d.fullPage)c=a.getData().replace(//,"$&"+f).replace(/[^>]*(?=<\/title>)/,"$& — "+a.lang.preview);else{var h="'+""+f+""+a.lang.preview+""+e.buildStyleHtml(a.config.contentsCss)+""+h+a.getData()+""}var j=640,k=420,l=80;try{var m=window.screen;j=Math.round(m.width*.8),k=Math.round(m.height*.7),l=Math.round(m.width*.1)}catch(n){}var o="";g&&(window._cke_htmlToLoad=c,o='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+"document.write( window.opener._cke_htmlToLoad );"+"document.close();"+"window.opener._cke_htmlToLoad = null;"+"})() )");var p=window.open(o,null,"toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width="+j+",height="+k+",left="+l);if(!g){var q=p.document;q.open(),q.write(c),q.close(),b.webkit&&setTimeout(function(){q.body.innerHTML+=""},0)}}},c="preview";j.add(c,{init:function(b){b.addCommand(c,a),b.ui.addButton("Preview",{label:b.lang.preview,command:c})}})}(),j.add("print",{init:function(a){var b="print",c=a.addCommand(b,j.print);a.ui.addButton("Print",{label:a.lang.print,command:b})}}),j.print={exec:function(a){if(b.opera)return;b.gecko?a.window.$.print():a.document.$.execCommand("Print")},canUndo:!1,readOnly:1,modes:{wysiwyg:!b.opera}},j.add("removeformat",{requires:["selection"],init:function(a){a.addCommand("removeFormat",j.removeformat.commands.removeformat),a.ui.addButton("RemoveFormat",{label:a.lang.removeFormat,command:"removeFormat"}),a._.removeFormat={filters:[]}}}),j.removeformat={commands:{removeformat:{exec:function(a){var b=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),c=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),e=j.removeformat.filter,f=a.getSelection().getRanges(1),g=f.createIterator(),h;while(h=g.getNextRange()){h.collapsed||h.enlarge(1);var i=h.createBookmark(),k=i.startNode,l=i.endNode,m,n=function(c){var f=new d.elementPath(c),g=f.elements;for(var h=1,i;i=g[h];h++){if(i.equals(f.block)||i.equals(f.blockLimit))break;b.test(i.getName())&&e(a,i)&&c.breakParent(i)}};n(k);if(l){n(l),m=k.getNextSourceNode(!0,1);while(m){if(m.equals(l))break;var o=m.getNextSourceNode(!1,1);(m.getName()!="img"||!m.data("cke-realelement"))&&e(a,m)&&(b.test(m.getName())?m.remove(1):(m.removeAttributes(c),a.fire("removeFormatCleanup",m))),m=o}}h.moveToBookmark(i)}a.getSelection().selectRanges(f)}}},filter:function(a,b){var c=a._.removeFormat.filters;for(var d=0;dh.width&&(c.resize_minWidth=h.width),c.resize_minHeight>h.height&&(c.resize_minHeight=h.height),a.document.on("mousemove",k),a.document.on("mouseup",l),b.document&&(b.document.on("mousemove",k),b.document.on("mouseup",l))});b.on("destroy",function(){e.removeFunction(m)}),b.on("themeSpace",function(a){if(a.data.space=="bottom"){var c="";i&&!j&&(c=" cke_resizer_horizontal"),!i&&j&&(c=" cke_resizer_vertical");var f='
";d=="ltr"&&c=="ltr"?a.data.html+=f:a.data.html=f+a.data.html}},b,null,100)}}}),function(){var a={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){var b=a.element.$.form;if(b)try{b.submit()}catch(c){b.submit.click&&b.submit.click()}}},b="save";j.add(b,{init:function(c){var d=c.addCommand(b,a);d.modes={wysiwyg:!!c.element.$.form},c.ui.addButton("Save",{label:c.lang.save,command:b})}})}(),function(){function g(a,b){var c=0,d;for(d in b)if(b[d]==a){c=1;break}return c}var d="scaytcheck",f="",i=function(){var d=this,g=function(){var e=d.config,f={};f.srcNodeRef=d.document.getWindow().$.frameElement,f.assocApp="CKEDITOR."+a.version+"@"+a.revision,f.customerid=e.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2",f.customDictionaryIds=e.scayt_customDictionaryIds||"",f.userDictionaryName=e.scayt_userDictionaryName||"",f.sLang=e.scayt_sLang||"en_US",f.onLoad=function(){c&&b.version<8||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;"),d.focusManager.hasFocus&&!k.isControlRestored(d)&&this.focus()},f.onBeforeChange=function(){k.getScayt(d)&&!d.checkDirty()&&setTimeout(function(){d.resetDirty()},0)};var g=window.scayt_custom_params;if(typeof g=="object")for(var i in g)f[i]=g[i];k.getControlId(d)&&(f.id=k.getControlId(d));var j=new window.scayt(f);j.afterMarkupRemove.push(function(a){(new h(a,j.document)).mergeSiblings()});var l=k.instances[d.name];l&&(j.sLang=l.sLang,j.option(l.option()),j.paused=l.paused),k.instances[d.name]=j;try{j.setDisabled(k.isPaused(d)===!1)}catch(m){}d.fire("showScaytState")};d.on("contentDom",g),d.on("contentDomUnload",function(){var b=a.document.getElementsByTag("script"),c=/^dojoIoScript(\d+)$/i,d=/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var e=0;e=0&&(this.setState(0),k.loadEngine(a))}};j.add("scayt",{requires:["menubutton"],beforeInit:function(a){var b=a.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",c="";b=b.split("|");if(b&&b.length)for(var d=0;d tr > td, .%1 table.%2 > tr > th,",".%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,",".%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,",".%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th","{","border : #d3d3d3 1px dotted","}"]).join("");d=f.replace(/%2/g,c).replace(/%1/g,"cke_show_borders ");var g={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState(),this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==1?"addClass":"removeClass";a.document.getBody()[b]("cke_show_borders")}}};j.add("showborders",{requires:["wysiwygarea"],modes:{wysiwyg:1},init:function(a){var b=a.addCommand("showborders",g);b.canUndo=!1,a.config.startupShowBorders!==!1&&b.setState(1),a.addCss(d),a.on("mode",function(){b.state!=0&&b.refresh(a)},null,null,100),a.on("contentDom",function(){b.state!=0&&b.refresh(a)}),a.on("removeFormatCleanup",function(b){var d=b.data;a.getCommand("showborders").state==1&&d.is("table")&&(!d.hasAttribute("border")||parseInt(d.getAttribute("border"),10)<=0)&&d.addClass(c)})},afterInit:function(a){var b=a.dataProcessor,d=b&&b.dataFilter,e=b&&b.htmlFilter;d&&d.addRules({elements:{table:function(a){var b=a.attributes,d=b["class"],e=parseInt(b.border,10);(!e||e<=0)&&(!d||d.indexOf(c)==-1)&&(b["class"]=(d||"")+" "+c)}}}),e&&e.addRules({elements:{table:function(a){var b=a.attributes,d=b["class"];d&&(b["class"]=d.replace(c,"").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),a.on("dialogDefinition",function(a){var b=a.data.name;if(b=="table"||b=="tableProperties"){var d=a.data.definition,f=d.getContents("info"),g=f.get("txtBorder"),h=g.commit;g.commit=e.override(h,function(a){return function(b,d){a.apply(this,arguments);var e=parseInt(this.getValue(),10);d[!e||e<=0?"addClass":"removeClass"](c)}});var i=d.getContents("advanced"),j=i&&i.get("advCSSClasses");j&&(j.setup=e.override(j.setup,function(a){return function(){a.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}}),j.commit=e.override(j.commit,function(a){return function(b,c){a.apply(this,arguments),parseInt(c.getAttribute("border"),10)||c.addClass("cke_show_border")}}))}})}(),j.add("sourcearea",{requires:["editingblock"],init:function(d){var e=j.sourcearea,f=a.document.getWindow();d.on("editingBlockReady",function(){var a,e;d.addMode("source",{load:function(g,i){c&&b.version<8&&g.setStyle("position","relative"),d.textarea=a=new h("textarea"),a.setAttributes({dir:"ltr",tabIndex:b.webkit?-1:d.tabIndex,role:"textbox","aria-label":d.lang.editorTitle.replace("%1",d.name)}),a.addClass("cke_source"),a.addClass("cke_enable_context_menu"),d.readOnly&&a.setAttribute("readOnly","readonly");var j={width:b.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"};c&&(e=function(){a.hide(),a.setStyle("height",g.$.clientHeight+"px"),a.setStyle("width",g.$.clientWidth+"px"),a.show()},d.on("resize",e),f.on("resize",e),setTimeout(e,0)),g.setHtml(""),g.append(a),a.setStyles(j),d.fire("ariaWidget",a),a.on("blur",function(){d.focusManager.blur()}),a.on("focus",function(){d.focusManager.focus()}),d.mayBeDirty=!0,this.loadData(i);var k=d.keystrokeHandler;k&&k.attach(a),setTimeout(function(){d.mode="source",d.fire("mode",{previousMode:d._.previousMode})},b.gecko||b.webkit?100:0)},loadData:function(b){a.setValue(b),d.fire("dataReady")},getData:function(){return a.getValue()},getSnapshotData:function(){return a.getValue()},unload:function(g){a.clearCustomData(),d.textarea=a=null,e&&(d.removeListener("resize",e),f.removeListener("resize",e)),c&&b.version<8&&g.removeStyle("position")},focus:function(){a.focus()}})}),d.on("readOnly",function(){d.mode=="source"&&(d.readOnly?d.textarea.setAttribute("readOnly","readonly"):d.textarea.removeAttribute("readOnly"))}),d.addCommand("source",e.commands.source),d.ui.addButton&&d.ui.addButton("Source",{label:d.lang.source,command:"source"}),d.on("mode",function(){d.getCommand("source").setState(d.mode=="source"?1:2)})}}),j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){a.mode=="wysiwyg"&&a.fire("saveSnapshot"),a.getCommand("source").setState(0),a.setMode(a.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},function(){function e(a,b){var c=a.type,d=b.type;return c==d?0:c==3?-1:d==3?1:d==1?1:-1}j.add("stylescombo",{requires:["richcombo","styles"],init:function(f){function l(b){f.getStylesSet(function(c){if(!j.length){var d,f;for(var h=0,k=c.length;h0)return;a.type==1&&b.test(a.getName())&&!a.getCustomData("selected_cell")&&(h.setMarker(g,a,"selected_cell",!0),f.push(a))}var c=a.createBookmarks(),e=a.getRanges(),f=[],g={};for(var j=0;j1&&t&&s[w]==t[w]?(x=s[w],x.rowSpan+=1):(x=(new h(s[w])).clone(),x.removeAttribute("rowSpan"),!c&&x.appendBogus(),v.append(x),x=x.$),w+=x.colSpan-1}b?v.insertBefore(q):v.insertAfter(q)}function k(a){if(a instanceof d.selection){var b=f(a),c=b[0],g=c.getAscendant("table"),i=e.buildTableMap(g),j=b[0].getParent(),l=j.$.rowIndex,m=b[b.length-1],n=m.getParent().$.rowIndex+m.$.rowSpan-1,o=[];for(var p=l;p<=n;p++){var q=i[p],r=new h(g.$.rows[p]);for(var s=0;s0?w[l-1]:null)||g.$.parentNode);for(p=o.length;p>=0;p--)k(o[p]);return x}return a instanceof h&&(g=a.getAscendant("table"),g.$.rows.length==1?g.remove():a.remove()),null}function l(a,b){var c=a.getParent(),d=c.$.cells,e=0;for(var f=0;fc)c=e}return c}function n(a,b){var d=f(a),g=d[0],i=g.getAscendant("table"),j=m(d,1),k=m(d),l=b?j:k,n=e.buildTableMap(i),o=[],p=[],q=n.length;for(var r=0;r1&&p.length&&p[r]==o[r]?(t=o[r],t.colSpan+=1):(t=(new h(o[r])).clone(),t.removeAttribute("colSpan"),!c&&t.appendBogus(),t[b?"insertBefore":"insertAfter"].call(t,new h(o[r])),t=t.$),r+=t.rowSpan-1}}function o(a){var b=f(a),c=b[0],d=b[b.length-1],g=c.getAscendant("table"),i=e.buildTableMap(g),j,k,l=[];for(var m=0,n=i.length;m1){f=b[d-1]+1;break}f||(f=b[0]>0?b[0]-1:b[b.length-1]+1);var i=c.$.rows;for(d=0,e=i.length;d=0;i--)r(b[i]);e?t(e,!0):c&&c.remove()}else if(a instanceof h){var j=a.getParent();j.getChildCount()==1?j.remove():a.remove()}}function s(a){var b=a.getBogus();b&&b.remove(),a.trim()}function t(a,b){var c=new d.range(a.getDocument());c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0)),c.select(!0)}function u(a,b,c){var d=a[b];if(typeof c=="undefined")return d;for(var e=0;d&&e=p?l.removeAttribute("rowSpan"):l.$.rowSpan=B,B>=o?l.removeAttribute("colSpan"):l.$.colSpan=C;var N=new d.nodeList(m.$.rows),O=N.count();for(F=O-1;F>=0;F--){var P=N.getItem(F);if(!P.$.cells.length){P.remove(),O++;continue}}return l}return B*C==E}function x(a,b){var d=f(a);if(d.length>1)return!1;if(b)return!0;var g=d[0],i=g.getParent(),j=i.getAscendant("table"),k=e.buildTableMap(j),l=i.$.rowIndex,m=u(k,l,g),n=g.$.rowSpan,o,p,q,r;if(n>1){p=Math.ceil(n/2),q=Math.floor(n/2),r=l+p;var s=new h(j.$.rows[r]),t=u(k,r),v;o=g.clone();for(var w=0;wm){o.insertBefore(new h(v));break}v=null}v||s.append(o,!0)}else{q=p=1,s=i.clone(),s.insertAfter(i),s.append(o=g.clone());var x=u(k,l);for(var y=0;y1)return!1;if(b)return!0;var g=d[0],h=g.getParent(),i=h.getAscendant("table"),j=e.buildTableMap(i),k=h.$.rowIndex,l=u(j,k,g),m=g.$.colSpan,n,o,p;if(m>1)o=Math.ceil(m/2),p=Math.floor(m/2);else{p=o=1;var q=v(j,l);for(var r=0;r0?2:0}}},tablecell_insertBefore:{label:c.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:c.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:c.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:c.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:c.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:c.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:c.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:c.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:c.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:c.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2}}},tablerow_insertBefore:{label:c.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:c.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:c.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:c.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2}}},tablecolumn_insertBefore:{label:c.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:c.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:c.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),b.contextMenu&&b.contextMenu.addListener(function(a,b){if(!a||a.isReadOnly())return null;while(a){if(a.getName()in z)return{tablecell:2,tablerow:2,tablecolumn:2};a=a.getParent()}return null})},getSelectedCells:f},j.add("tabletools",j.tabletools)}(),e.buildTableMap=function(a){var b=a.$.rows,c=-1,d=[];for(var e=0;ee&&(!h||!i||ki&&(h=k,i=j)}else{if(f&&j==e){h=k;break}ji)&&(h=k,i=j)}}h&&h.focus()},function(){j.add("templates",{requires:["dialog"],init:function(b){a.dialog.add("templates",a.getUrl(this.path+"dialogs/templates.js")),b.addCommand("templates",new a.dialogCommand("templates")),b.ui.addButton("Templates",{label:b.lang.templates.button,command:"templates"})}});var b={},c={};a.addTemplates=function(a,c){b[a]=c},a.getTemplates=function(a){return b[a]},a.loadTemplates=function(b,d){var e=[];for(var f=0,g=b.length;f":' style="display:none">'),h.push('',b.lang.toolbars,"");var k=b.toolbox.toolbars,l=b.config.toolbar instanceof Array?b.config.toolbar:b.config["toolbar_"+b.config.toolbar];for(var n=0;n"),j=0);if(t==="/"){h.push('
');continue}u=t.items||t;for(var v=0;v'),s&&h.push('',s,""),h.push('');var z=k.push(r)-1;z>0&&(r.previous=k[z-1],r.previous.next=r)}y?j||(h.push(''),j=1):j&&(h.push(""),j=0);var A=w.render(b,h);z=r.items.push(A)-1,z>0&&(A.previous=r.items[z-1],A.previous.next=A),A.toolbar=r,A.onkey=g,A.onfocus=function(){b.toolbox.focusCommandExecuted||b.focus()}}}j&&(h.push(""),j=0),r&&h.push('')}h.push("");if(b.config.toolbarCanCollapse){var B=e.addFunction(function(){b.execCommand("toolbarCollapse")});b.on("destroy",function(){e.removeFunction(B)});var C=e.getNextId();b.addCommand("toolbarCollapse",{readOnly:1,exec:function(b){var c=a.document.getById(C),d=c.getPrevious(),e=b.getThemeSpace("contents"),f=d.getParent(),g=parseInt(e.$.style.height,10),h=f.$.offsetHeight,i=!d.isVisible();i?(d.show(),c.removeClass("cke_toolbox_collapser_min"),c.setAttribute("title",b.lang.toolbarCollapse)):(d.hide(),c.addClass("cke_toolbox_collapser_min"),c.setAttribute("title",b.lang.toolbarExpand)),c.getFirst().setText(i?"â–²":"â—€");var j=f.$.offsetHeight-h;e.setStyle("height",g-j+"px"),b.fire("resize")},modes:{wysiwyg:1,source:1}}),h.push('',"","")}c.data.html+=h.join("")}}),b.on("destroy",function(){var a,b=0,c,d,f;a=this.toolbox.toolbars;for(;b'),{}}}}})}})}(),a.UI_SEPARATOR="separator",i.toolbarLocation="top",i.toolbar_Basic=[["Bold","Italic","-","NumberedList","BulletedList","-","Link","Unlink","-","About"]],i.toolbar_Full=[{name:"document",items:["Source","-","Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About"]}],i.toolbar="Full",i.toolbarCanCollapse=!0,function(){function f(a){this.editor=a,this.reset()}j.add("undo",{requires:["selection","wysiwygarea"],init:function(a){function e(a){b.enabled&&a.data.command.canUndo!==!1&&b.save()}var b=new f(a),c=a.addCommand("undo",{exec:function(){b.undo()&&(a.selectionChange(),this.fire("afterUndo"))},state:0,canUndo:!1}),d=a.addCommand("redo",{exec:function(){b.redo()&&(a.selectionChange(),this.fire("afterRedo"))},state:0,canUndo:!1});b.onChange=function(){c.setState(b.undoable()?2:0),d.setState(b.redoable()?2:0)},a.on("beforeCommandExec",e),a.on("afterCommandExec",e),a.on("saveSnapshot",function(a){b.save(a.data&&a.data.contentOnly)}),a.on("contentDom",function(){a.document.on("keydown",function(a){!a.data.$.ctrlKey&&!a.data.$.metaKey&&b.type(a)})}),a.on("beforeModeUnload",function(){a.mode=="wysiwyg"&&b.save(!0)}),a.on("mode",function(){b.enabled=a.readOnly?!1:a.mode=="wysiwyg",b.onChange()}),a.ui.addButton("Undo",{label:a.lang.undo,command:"undo"}),a.ui.addButton("Redo",{label:a.lang.redo,command:"redo"}),a.resetUndo=function(){b.reset(),a.fire("saveSnapshot")},a.on("updateSnapshot",function(){b.currentImage&&b.update()})}}),j.undo={};var a=j.undo.Image=function(a){this.editor=a,a.fire("beforeUndoImage");var b=a.getSnapshot(),d=b&&a.getSelection();c&&b&&(b=b.replace(/\s+data-cke-expando=".*?"/g,"")),this.contents=b,this.bookmarks=d&&d.createBookmarks2(!0),a.fire("afterUndoImage")},d=/\b(?:href|src|name)="[^"]*?"/gi;a.prototype={equals:function(a,f){var g=this.contents,h=a.contents;c&&(b.ie7Compat||b.ie6Compat)&&(g=g.replace(d,""),h=h.replace(d,""));if(g!=h)return!1;if(f)return!0;var i=this.bookmarks,j=a.bookmarks;if(i||j){if(!i||!j||i.length!=j.length)return!1;for(var k=0;k25&&(this.save(!1,null,!1),this.modifiersCount=1)):n||(this.modifiersCount=0,this.typesCount++,this.typesCount>25&&(this.save(!1,null,!1),this.typesCount=1))},reset:function(){var a=this;a.lastKeystroke=0,a.snapshots=[],a.index=-1,a.limit=a.editor.config.undoStackSize||20,a.currentImage=null,a.hasUndo=!1,a.hasRedo=!1,a.resetType()},resetType:function(){var a=this;a.typing=!1,delete a.lastKeystroke,a.typesCount=0,a.modifiersCount=0},fireChange:function(){var a=this;a.hasUndo=!!a.getNextImage(!0),a.hasRedo=!!a.getNextImage(!1),a.resetType(),a.onChange()},save:function(b,c,d){var e=this,f=e.snapshots;return c||(c=new a(e.editor)),c.contents===!1?!1:e.currentImage&&c.equals(e.currentImage,b)?!1:(f.splice(e.index+1,f.length-e.index-1),f.length==e.limit&&f.shift(),e.index=f.push(c)-1,e.currentImage=c,d!==!1&&e.fireChange(),!0)},restoreImage:function(a){var b=this;b.editor.loadSnapshot(a.contents);if(a.bookmarks)b.editor.getSelection().selectBookmarks(a.bookmarks);else if(c){var d=b.editor.document.getBody().$.createTextRange();d.collapse(!0),d.select()}b.index=a.index,b.update(),b.fireChange()},getNextImage:function(a){var b=this,c=b.snapshots,d=b.currentImage,e,f;if(d)if(a)for(f=b.index-1;f>=0;f--){e=c[f];if(!d.equals(e,!0))return e.index=f,e}else for(f=b.index+1;f"+c+""})),j=j.replace(/\n/g,"
"),!i&&!c&&(j=j.replace(new RegExp("
(?=)"),function(a){return e.repeat(a,2)}));if(b.gecko||b.webkit){var l=new d.elementPath(g.getStartElement()),m=[];for(var o=0;o/));else if(p in f.$block)break}j=m.join("")+j}n.call(this,j)}function p(a){var b=this.getSelection(),c=b.getRanges(),d=a.getName(),e=f.$block[d],g=b.isLocked;g&&b.unlock();var h,i,j,l;for(var m=c.length-1;m>=0;m--){h=c[m];if(!h.checkReadOnly()){h.deleteContents(1),i=!m&&a||a.clone(1);var n,o;if(e)while((n=h.getCommonAncestor(0,1))&&(o=f[n.getName()])&&(!o||!o[d]))n.getName()in f.span?h.splitElement(n):h.checkStartOfBlock()&&h.checkEndOfBlock()?(h.setStartBefore(n),h.collapse(!0),n.remove()):h.splitBlock();h.insertNode(i),j||(j=i)}}if(j){h.moveToPosition(j,4);if(e){var p=j.getNext(k),q=p&&p.type==1&&p.getName();q&&f.$block[q]&&f[q]["#"]&&h.moveToElementEditStart(p)}}b.selectRanges([h]),g&&this.getSelection().lock()}function q(a){a.checkDirty()||setTimeout(function(){a.resetDirty()},0)}function t(a){return r(a)&&s(a)}function u(a){return a.type==3&&e.trim(a.getText()).match(/^(?: |\xa0)$/)}function v(a){a.isLocked&&(a.unlock(),setTimeout(function(){a.lock()},0))}function w(a){return a.getOuterHtml().match(i)}function x(a){var b=a.window,c=a.document,e=a.document.getBody(),f=e.getFirst(),g=e.getChildren().count();if(!g||g==1&&f.type==1&&f.hasAttribute("_moz_editor_bogus_node")){q(a);var h=a.element.getDocument(),i=h.getDocumentElement(),j=i.$.scrollTop,k=i.$.scrollLeft,l=c.$.createEvent("KeyEvents");l.initKeyEvent("keypress",!0,!0,b.$,!1,!1,!1,!1,0,32),c.$.dispatchEvent(l),(j!=i.$.scrollTop||k!=i.$.scrollLeft)&&h.getWindow().$.scrollTo(k,j),g&&e.getFirst().remove(),c.getBody().appendBogus();var m=new d.range(c);m.setStartAt(e,1),m.select()}}function y(a){var e=a.editor,f=a.data.path,g=f.blockLimit,h=a.data.selection,i=h.getRanges()[0],j=e.document.getBody(),k=e.config.enterMode;if(b.gecko){x(e);var m=f.block||f.blockLimit,n=m&&m.getLast(t);m&&m.isBlockBoundary()&&(!n||n.type!=1||!n.isBlockBoundary())&&!m.is("pre")&&!m.getBogus()&&m.appendBogus()}if(e.config.autoParagraph!==!1&&k!=2&&i.collapsed&&g.getName()=="body"&&!f.block){var o=i.fixBlock(!0,e.config.enterMode==3?"div":"p");if(c){var p=o.getFirst(t);p&&u(p)&&p.remove()}if(w(o)){var q=o.getNext(r);q&&q.type==1&&!l(q)?(i.moveToElementEditStart(q),o.remove()):(q=o.getPrevious(r),q&&q.type==1&&!l(q)&&(i.moveToElementEditEnd(q),o.remove()))}i.select(),a.cancel()}var s=new d.range(e.document);s.moveToElementEditEnd(e.document.getBody());var v=new d.elementPath(s.startContainer);if(!v.blockLimit.is("body")){var y;k!=2?y=j.append(e.document.createElement(k==1?"p":"div")):y=j,c||y.appendBogus()}}var i=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,k=d.walker.whitespaces(!0),r=d.walker.whitespaces(!0),s=d.walker.bookmark(!1,!0);r=d.walker.whitespaces(!0),j.add("wysiwygarea",{requires:["editingblock"],init:function(j){function u(b){if(j.readOnly)return;e.tryThese(function(){j.document.$.designMode="on",setTimeout(function(){j.document.$.designMode="off",a.currentInstance==j&&j.document.getBody().focus()},50)},function(){j.document.$.designMode="off";var a=j.document.getBody();a.setAttribute("contentEditable",!1),a.setAttribute("contentEditable",!0),!b&&u(1)})}var k=j.config.enterMode!=2&&j.config.autoParagraph!==!1?j.config.enterMode==3?"div":"p":!1,l=j.lang.editorTitle.replace("%1",j.name),q;j.on("editingBlockReady",function(){function L(a){if(!w)return;w=0,j.fire("ariaWidget",r);var f=a.document,h=f.body,k=f.getElementById("cke_actscrpt");k&&k.parentNode.removeChild(k),h.spellcheck=!j.config.disableNativeSpellChecker;var l=!j.readOnly;c?(h.hideFocus=!0,h.disabled=!0,h.contentEditable=l,h.removeAttribute("disabled")):setTimeout(function(){b.gecko&&b.version>=10900||b.opera?f.$.body.contentEditable=l:b.webkit?f.$.body.parentNode.contentEditable=l:f.$.designMode=l?"off":"on"},0),l&&b.gecko&&e.setTimeout(x,0,null,j),a=j.window=new d.window(a),f=j.document=new g(f),l&&f.on("dblclick",function(a){var b=a.data.getTarget(),c={element:b,dialog:""};j.fire("doubleclick",c),c.dialog&&j.openDialog(c.dialog)}),c&&f.on("click",function(a){var b=a.data.getTarget();if(b.is("input")){var c=b.getAttribute("type");(c=="submit"||c=="reset")&&a.data.preventDefault()}}),!c&&!b.opera&&f.on("mousedown",function(a){var b=a.data.getTarget();b.is("img","hr","input","textarea","select")&&j.getSelection().selectElement(b)}),b.gecko&&f.on("mouseup",function(a){if(a.data.$.button==2){var b=a.data.getTarget();if(!b.getOuterHtml().replace(i,"")){var c=new d.range(f);c.moveToElementEditStart(b),c.select(!0)}}}),f.on("click",function(a){a=a.data,a.getTarget().is("a")&&a.$.button!=2&&a.preventDefault()}),b.webkit&&(f.on("mousedown",function(){o=1}),f.on("click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),f.on("mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));if(l&&c&&f.$.compatMode=="CSS1Compat"||b.gecko||b.opera){var m=f.getDocumentElement();m.on("mousedown",function(a){a.data.getTarget().equals(m)&&(b.gecko&&b.version>=10900&&u(),v.focus())})}var n=c?r:a;n.on("blur",function(){j.focusManager.blur()});var o;n.on("focus",function(){var a=j.document;l&&b.gecko&&b.version>=10900?u():b.opera?a.getBody().focus():b.webkit&&(o||(j.document.getDocumentElement().focus(),o=1)),j.focusManager.focus()});var p=j.keystrokeHandler;p.blockedKeystrokes[8]=!l,p.attach(f),f.getDocumentElement().addClass(f.$.compatMode),l&&f.on("keydown",function(a){var b=a.data.getKeystroke();if(b in{8:1,46:1}){var c=j.getSelection(),d=c.getSelectedElement(),e=c.getRanges()[0];if(d){j.fire("saveSnapshot"),e.moveToPosition(d,3),d.remove(),e.select(),j.fire("saveSnapshot"),a.data.preventDefault();return}}});if(c&&f.$.compatMode=="CSS1Compat"){var q={33:1,34:1};f.on("keydown",function(a){a.data.getKeystroke()in q&&setTimeout(function(){j.getSelection().scrollIntoView()},0)})}c&&j.config.enterMode!=1&&f.on("selectionchange",function(){var a=f.getBody(),b=j.getSelection().getRanges()[0];a.getHtml().match(/^

 <\/p>$/i)&&b.startContainer.equals(a)&&setTimeout(function(){b=j.getSelection().getRanges()[0],b.startContainer.equals("body")||(a.getFirst().remove(1),b.moveToElementEditEnd(a),b.select(1))},0)}),j.contextMenu&&j.contextMenu.addTarget(f,j.config.browserContextMenuOnCtrl!==!1),setTimeout(function(){j.fire("contentDom"),z&&(j.mode="wysiwyg",j.fire("mode",{previousMode:j._.previousMode}),z=!1),s=!1,t&&(j.focus(),t=!1),setTimeout(function(){j.fire("dataReady")},0);try{j.document.$.execCommand("enableInlineTableEditing",!1,!j.config.disableNativeTableHandles)}catch(a){}if(j.config.disableObjectResizing)try{j.document.$.execCommand("enableObjectResizing",!1,!1)}catch(b){j.document.getBody().on(c?"resizestart":"resize",function(a){a.data.preventDefault()})}c&&setTimeout(function(){if(j.document){var a=j.document.$.body;a.runtimeStyle.marginBottom="0px",a.runtimeStyle.marginBottom=""}},1e3)},0)}var f,r,s,t,w,z,G=b.isCustomDomain(),H=function(d){r&&r.remove();var e="document.open();"+(G?'document.domain="'+document.domain+'";':"")+"document.close();";e=b.air?"javascript:void(0)":c?"javascript:void(function(){"+encodeURIComponent(e)+"}())":"",r=h.createFromHtml('"),document.location.protocol=="chrome:"&&(a.event.useCapture=!0),r.on("load",function(a){w=1,a.removeListener();var c=r.getFrameDocument();c.write(d),b.air&&L(c.getWindow().$)}),document.location.protocol=="chrome:"&&(a.event.useCapture=!1),f.append(r)};q=e.addFunction(L);var I='";j.addMode("wysiwyg",{load:function(a,d,e){f=a,c&&b.quirks&&a.setStyle("position","relative"),j.mayBeDirty=!0,z=!0,e?this.loadSnapshotData(d):this.loadData(d)},loadData:function(a){s=!0,j._.dataStore={id:1};var c=j.config,d=c.fullPage,f=c.docType,g='";!d&&(g=e.buildStyleHtml(j.config.contentsCss)+g);var h=c.baseHref?'':"";d&&(a=a.replace(/]*>/i,function(a){return j.docType=f=a,""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){return j.xmlDeclaration=a,""})),j.dataProcessor&&(a=j.dataProcessor.toHtml(a,k)),d?(/]/.test(a)||(a=""+a),/]/.test(a)||(a=""+a+""),/]/.test(a)?/]/.test(a)||(a=a.replace(/]*>/,"$&")):a=a.replace(/]*>/,"$&"),h&&(a=a.replace(//,"$&"+h)),a=a.replace(/<\/head\s*>/,g+"$&"),a=f+a):a=c.docType+''+""+""+l+""+h+g+""+""+a+"",b.gecko&&(a=a.replace(/
(?=\s*<\/(:?html|body)>)/,'$&
')),a+=I,this.onDispose(),H(a)},getData:function(){var a=j.config,c=a.fullPage,d=c&&j.docType,e=c&&j.xmlDeclaration,f=r.getFrameDocument(),g=c?f.getDocumentElement().getOuterHtml():f.getBody().getHtml();return b.gecko&&(g=g.replace(/
(?=\s*(:?$|<\/body>))/,"")),j.dataProcessor&&(g=j.dataProcessor.toDataFormat(g,k)),a.ignoreEmptyParagraph&&(g=g.replace(i,function(a,b){return b})),e&&(g=e+"\n"+g),d&&(g=d+"\n"+g),g},getSnapshotData:function(){return r.getFrameDocument().getBody().getHtml()},loadSnapshotData:function(a){r.getFrameDocument().getBody().setHtml(a)},onDispose:function(){if(!j.document)return;j.document.getDocumentElement().clearCustomData(),j.document.getBody().clearCustomData(),j.window.clearCustomData(),j.document.clearCustomData(),r.clearCustomData(),r.remove()},unload:function(a){this.onDispose(),j.window=j.document=r=f=t=null,j.fire("contentDomUnload")},focus:function(){var a=j.window;s?t=!0:a&&(b.air?setTimeout(function(){a.focus()},0):a.focus(),j.selectionChange())}}),j.on("insertHtml",m(n),null,null,20),j.on("insertElement",m(p),null,null,20),j.on("insertText",m(o),null,null,20),j.on("selectionChange",function(a){if(j.readOnly)return;var b=j.getSelection();if(b&&!b.isLocked){var c=j.checkDirty();j.fire("saveSnapshot",{contentOnly:1}),y.call(this,a),j.fire("updateSnapshot"),!c&&j.resetDirty()}},null,null,1)});var r;j.on("contentDom",function(){var a=j.document.getElementsByTag("title").getItem(0);a.data("cke-title",j.document.$.title),j.document.$.title=l}),j.on("readOnly",function(){if(j.mode=="wysiwyg"){var a=j.getMode();a.loadData(a.getData())}});if(a.document.$.documentMode>=8){j.addCss("html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}");var s=[];for(var t in f.$removeEmpty)s.push("html.CSS1Compat "+t+"[contenteditable=false]");j.addCss(s.join(",")+"{ display:inline-block;}")}else b.gecko&&(j.addCss("html { height: 100% !important; }"),j.addCss("img:-moz-broken { -moz-force-broken-image-icon : 1;\twidth : 24px; height : 24px; }"));j.addCss("html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}"),j.addCss("img, input, textarea { cursor: default;}");if(b.gecko||c||b.opera){var v;j.on("uiReady",function(){v=j.container.append(h.createFromHtml('')),v.on("focus",function(){j.focus()}),j.focusGrabber=v}),j.on("destroy",function(){e.removeFunction(q),v.clearCustomData(),delete j.focusGrabber})}j.on("insertElement",function(a){var b=a.data;if(b.type==1&&(b.is("input")||b.is("textarea"))){var c=b.getAttribute("contenteditable")=="false";c||(b.data("cke-editable",b.hasAttribute("contenteditable")?"true":"1"),b.setAttribute("contenteditable",!1))}})}}),b.gecko&&function(){var a=document.body;if(!a)window.addEventListener("load",arguments.callee,!1);else{var b=a.getAttribute("onpageshow");a.setAttribute("onpageshow",(b?b+";":"")+"event.persisted && (function(){"+"var allInstances = CKEDITOR.instances, editor, doc;"+"for ( var i in allInstances )"+"{"+"\teditor = allInstances[ i ];"+"\tdoc = editor.document;"+"\tif ( doc )"+"\t{"+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+"\t}"+"}"+"})();")}}()}(),i.disableObjectResizing=!1,i.disableNativeTableHandles=!0,i.disableNativeSpellChecker=!0,i.ignoreEmptyParagraph=!0,j.add("wsc",{requires:["dialog"],init:function(c){var d="checkspell",e=c.addCommand(d,new a.dialogCommand(d));e.modes={wysiwyg:!b.opera&&!b.air&&document.domain==window.location.hostname},c.ui.addButton("SpellChecker",{label:c.lang.spellCheck.toolbar,command:d}),a.dialog.add(d,this.path+"dialogs/wsc.js")}}),i.wsc_customerId=i.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",i.wsc_customLoaderScript=i.wsc_customLoaderScript||null,a.DIALOG_RESIZE_NONE=0,a.DIALOG_RESIZE_WIDTH=1,a.DIALOG_RESIZE_HEIGHT=2,a.DIALOG_RESIZE_BOTH=3,function(){function j(a){return!!this._.tabs[a][0].$.offsetHeight}function l(){var a=this,b=a._.currentTabId,c=a._.tabIdList.length,d=e.indexOf(a._.tabIdList,b)+c;for(var f=d-1;f>d-c;f--)if(j.call(a,a._.tabIdList[f%c]))return a._.tabIdList[f%c];return null}function m(){var a=this,b=a._.currentTabId,c=a._.tabIdList.length,d=e.indexOf(a._.tabIdList,b);for(var f=d+1;fj.width-f.width-h?o=j.width-f.width+(g.lang.dir=="rtl"?0:i[1]):o=e.x,e.y+i[0]j.height-f.height-h?p=j.height-f.height+i[2]:p=e.y,c.move(o,p,1),b.data.preventDefault()}function k(c){a.document.removeListener("mousemove",j),a.document.removeListener("mouseup",k);if(b.ie6Compat){var d=B.getChild(0).getFrameDocument();d.removeListener("mousemove",j),d.removeListener("mouseup",k)}}var d=null,e=null,f=c.getElement().getFirst(),g=c.getParentEditor(),h=g.config.dialog_magnetDistance,i=g.skin.margins||[0,0,0,0];typeof h=="undefined"&&(h=20),c.parts.title.on("mousedown",function(f){d={x:f.data.$.screenX,y:f.data.$.screenY},a.document.on("mousemove",j),a.document.on("mouseup",k),e=c.getPosition();if(b.ie6Compat){var g=B.getChild(0).getFrameDocument();g.on("mousemove",j),g.on("mouseup",k)}f.data.preventDefault()},c)}function y(d){function q(a){var b=i.lang.dir=="rtl",c=(a.data.$.screenX-m.x)*(b?-1:1),e=a.data.$.screenY-m.y,h=n.width,o=n.height,p=h+c*(d._.moved?1:2),q=o+e*(d._.moved?1:2),r=d._.element.getFirst(),s=b&&r.getComputedStyle("right"),t=d.getPosition();t.y+q>l.height&&(q=l.height-t.y),(b?s:t.x)+p>l.width&&(p=l.width-(b?s:t.x));if(g==1||g==3)h=Math.max(f.minWidth||0,p-j);if(g==2||g==3)o=Math.max(f.minHeight||0,q-k);d.resize(h,o),d._.moved||d.layout(),a.data.preventDefault()}function r(){a.document.removeListener("mouseup",r),a.document.removeListener("mousemove",q),o&&(o.remove(),o=null);if(b.ie6Compat){var c=B.getChild(0).getFrameDocument();c.removeListener("mouseup",r),c.removeListener("mousemove",q)}}var f=d.definition,g=f.resizable;if(g==0)return;var i=d.getParentEditor(),j,k,l,m,n,o,p=e.addFunction(function(e){n=d.getSize();var f=d.parts.contents,g=f.$.getElementsByTagName("iframe").length;g&&(o=h.createFromHtml('

'),f.append(o)),k=n.height-d.parts.contents.getSize("height",!(b.gecko||b.opera||c&&b.quirks)),j=n.width-d.parts.contents.getSize("width",1),m={x:e.screenX,y:e.screenY},l=a.document.getWindow().getViewPaneSize(),a.document.on("mousemove",q),a.document.on("mouseup",r);if(b.ie6Compat){var i=B.getChild(0).getFrameDocument();i.on("mousemove",q),i.on("mouseup",r)}e.preventDefault&&e.preventDefault()});d.on("load",function(){var a="";g==1?a=" cke_resizer_horizontal":g==2&&(a=" cke_resizer_vertical");var b=h.createFromHtml('
');d.parts.footer.append(b,1)}),i.on("destroy",function(){e.removeFunction(p)})}function C(a){a.data.preventDefault(1)}function D(c){var d=a.document.getWindow(),f=c.config,g=f.dialog_backgroundCoverColor||"white",i=f.dialog_backgroundCoverOpacity,j=f.baseFloatZIndex,k=e.genKey(g,i,j),l=A[k];if(!l){var m=['
'];if(b.ie6Compat){var n=b.isCustomDomain(),o="";m.push('')}m.push("
"),l=h.createFromHtml(m.join("")),l.setOpacity(i!=undefined?i:.5),l.on("keydown",C),l.on("keypress",C),l.on("keyup",C),l.appendTo(a.document.getBody()),A[k]=l}else l.show();B=l;var p=function(){var a=d.getViewPaneSize();l.setStyles({width:a.width+"px",height:a.height+"px"})},q=function(){var b=d.getScrollPosition(),c=a.dialog._.currentTop;l.setStyles({left:b.x+"px",top:b.y+"px"});if(c)do{var e=c.getPosition();c.move(e.x,e.y)}while(c=c._.parentDialog)};z=p,d.on("resize",p),p(),(!b.mac||!b.webkit)&&l.focus();if(b.ie6Compat){var r=function(){q(),arguments.callee.prevScrollHandler.apply(this,arguments)};d.$.setTimeout(function(){r.prevScrollHandler=window.onscroll||function(){},window.onscroll=r},0),q()}}function E(){if(!B)return;var c=a.document.getWindow();B.hide(),c.removeListener("resize",z),b.ie6Compat&&c.$.setTimeout(function(){var a=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=a||null},0),z=null}function F(){for(var a in A)A[a].remove();A={}}var f=e.cssLength;a.dialog=function(f,h){function E(){var a=C._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});var b=a.length;for(var c=0;c1?(C._.tabBarMode=!0,C._.tabs[C._.currentTabId][0].focus(),G=1):d!=37&&d!=39||!C._.tabBarMode?(d==13||d==32)&&C._.tabBarMode&&(c.selectPage(c._.currentTabId),c._.tabBarMode=!1,c._.currentFocusIndex=-1,F(!0),G=1):(h=d==(e?39:37)?l.call(C):m.call(C),C.selectPage(h),C._.tabs[h][0].focus(),G=1);G&&(b.stop(),b.data.preventDefault())}function I(a){G&&a.data.preventDefault()}var j=a.dialog._.dialogDefinitions[h],k=e.clone(r),n=f.config.dialog_buttonsOrder||"OS",q=f.lang.dir;(n=="OS"&&b.mac||n=="rtl"&&q=="ltr"||n=="ltr"&&q=="rtl")&&k.buttons.reverse(),j=e.extend(j(f),k),j=e.clone(j),j=new v(this,j);var s=a.document,t=f.theme.buildDialog(f);this._={editor:f,element:t.element,name:h,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=t.parts,e.setTimeout(function(){f.fire("ariaWidget",this.parts.contents)},0,this);var u={position:b.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};u[q=="rtl"?"right":"left"]=0,this.parts.dialog.setStyles(u),a.event.call(this),this.definition=j=a.fire("dialogDefinition",{name:h,definition:j},f).definition;var w={};if(!("removeDialogTabs"in f._)&&f.config.removeDialogTabs){var z=f.config.removeDialogTabs.split(";");for(i=0;i1)C._.tabBarMode=!0,C._.tabs[C._.currentTabId][0].focus();else if(!a._.hasFocus){a._.currentFocusIndex=-1;if(j.onFocus){var b=j.onFocus.call(a);b&&b.focus()}else F(!0);if(a._.editor.mode=="wysiwyg"&&c){var d=f.document.$.selection,e=d.createRange();if(e)if(e.parentElement&&e.parentElement().ownerDocument==f.document.$||e.item&&e.item(0).ownerDocument==f.document.$){var g=document.body.createTextRange();g.moveToElementText(a.getElement().getFirst().$),g.collapse(!0),g.select()}}}},this,null,4294967295),b.ie6Compat&&this.on("load",function(a){var b=this.getElement(),c=b.getFirst();c.remove(),c.appendTo(b)},this),x(this),y(this),(new d.text(j.title,a.document)).appendTo(this.parts.title);for(var K=0;K0?d:0)+"px"};l[h?"right":"left"]=(c>0?c:0)+"px",g.setStyles(l),e&&(f._.moved=1)}}(),getPosition:function(){return e.extend({},this._.position)},show:function(){var c=this._.element,d=this.definition;!c.getParent()||!c.getParent().equals(a.document.getBody())?c.appendTo(a.document.getBody()):c.setStyle("display","block");if(b.gecko&&b.version<10900){var f=this.parts.dialog;f.setStyle("position","absolute"),setTimeout(function(){f.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||d.width||d.minWidth,this._.contentSize&&this._.contentSize.height||d.height||d.minHeight),this.reset(),this.selectPage(this.definition.contents[0].id),a.dialog._.currentZIndex===null&&(a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this,this._.parentDialog=null,D(this._.editor),c.on("keydown",H),c.on(b.opera?"keypress":"keyup",I);for(var g in{keyup:1,keydown:1,keypress:1})c.on(g,O)}else{this._.parentDialog=a.dialog._.currentTop;var h=this._.parentDialog.getElement().getFirst();h.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),a.dialog._.currentTop=this}J(this,this,"",null,function(){this.getButton("cancel")&&this.getButton("cancel").click()}),this._.hasFocus=!1,e.setTimeout(function(){this.layout(),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),k.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var b=this,c=a.document.getWindow().getViewPaneSize(),d=b.getSize();b.move(b._.moved?b._.position.x:(c.width-d.width)/2,b._.moved?b._.position.y:(c.height-d.height)/2)},foreach:function(a){var b=this;for(var c in b._.contents)for(var d in b._.contents[c])a.call(b,b._.contents[c][d]);return b},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){return this.foreach(a),this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){c&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur(),b.commit&&b.commit.apply(b,a)})},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire("hide",{}),this._.editor.fire("dialogHide",this);var d=this._.element;d.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),K(this);while(a.dialog._.currentTop!=this)a.dialog._.currentTop.hide();if(!this._.parentDialog)E();else{var e=this._.parentDialog.getElement().getFirst();e.setStyle("z-index",parseInt(e.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null,d.removeListener("keydown",H),d.removeListener(b.opera?"keypress":"keyup",I);for(var f in{keyup:1,keydown:1,keypress:1})d.removeListener(f,O);var g=this._.editor;g.focus();if(g.mode=="wysiwyg"&&c){var h=g.getSelection();h&&h.unlock(!0)}}else a.dialog._.currentZIndex-=10;delete this._.parentDialog,this.foreach(function(a){a.resetInitValue&&a.resetInitValue()})},addPage:function(c){var d=this,f=[],g=c.label?' title="'+e.htmlEncode(c.label)+'"':"",i=c.elements,j=a.dialog._.uiElementBuilders.vbox.build(d,{type:"vbox",className:"cke_dialog_page_contents",children:c.elements,expand:!!c.expand,padding:c.padding,style:c.style||"width: 100%;height:100%"},f),k=h.createFromHtml(f.join(""));k.setAttribute("role","tabpanel");var l=b,m="cke_"+c.id+"_"+e.getNextNumber(),n=h.createFromHtml(['0?" cke_last":"cke_first",g,c.hidden?' style="display:none"':"",' id="',m,'"',l.gecko&&l.version>=10900&&!l.hc?"":' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',c.label,""].join(""));k.setAttribute("aria-labelledby",m),d._.tabs[c.id]=[n,k],d._.tabIdList.push(c.id),!c.hidden&&d._.pageCount++,d._.lastTab=n,d.updateStyle();var o=d._.contents[c.id]={},p,q=j.getChild();while(p=q.shift())o[p.id]=p,typeof p.getChild=="function"&&q.push.apply(q,p.getChild());k.setAttribute("name",c.id),k.appendTo(d.parts.contents),n.unselectable(),d.parts.tabs.append(n),c.accessKey&&(J(d,d,"CTRL+"+c.accessKey,M,L),d._.accessKeyMap["CTRL+"+c.accessKey]=c.id)},selectPage:function(a){if(this._.currentTabId==a)return;if(this.fire("selectPage",{page:a,currentPage:this._.currentTabId})===!0)return;for(var c in this._.tabs){var d=this._.tabs[c][0],f=this._.tabs[c][1];c!=a&&(d.removeClass("cke_dialog_tab_selected"),f.hide()),f.setAttribute("aria-hidden",c!=a)}var g=this._.tabs[a];g[0].addClass("cke_dialog_tab_selected"),b.ie6Compat||b.ie7Compat?(n(g[1]),g[1].show(),setTimeout(function(){n(g[1],1)},0)):g[1].show(),this._.currentTabId=a,this._.currentTabIndex=e.indexOf(this._.tabIdList,a)},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=this,c=b._.tabs[a]&&b._.tabs[a][0];if(!c||b._.pageCount==1||!c.isVisible())return;a==b._.currentTabId&&b.selectPage(l.call(b)),c.hide(),b._.pageCount--,b.updateStyle()},showPage:function(a){var b=this,c=b._.tabs[a]&&b._.tabs[a][0];if(!c)return;c.show(),b._.pageCount++,b.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){var c=this;if(typeof b=="undefined")b=c._.focusList.length,c._.focusList.push(new q(c,a,b));else{c._.focusList.splice(b,0,new q(c,a,b));for(var d=b+1;d=0;d--)(c[d].dialog==a||c[d].uiElement==a)&&c.splice(d,1);c.length===0&&delete G[b]}},L=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},M=function(a,b){},N={27:1,13:1},O=function(a){a.data.getKeystroke()in N&&a.data.stopPropagation()};(function(){k.dialog={uiElement:function(d,f,g,h,i,j,k){if(arguments.length<4)return;var l=(h.call?h(f):h)||"div",m=["<",l," "],n=(i&&i.call?i(f):i)||{},o=(j&&j.call?j(f):j)||{},p=(k&&k.call?k.call(this,d,f):k)||"",q=this.domId=o.id||e.getNextId()+"_uiElement",r=this.id=f.id,s;o.id=q;var t={};f.type&&(t["cke_dialog_ui_"+f.type]=1),f.className&&(t[f.className]=1),f.disabled&&(t.cke_disabled=1);var u=o["class"]&&o["class"].split?o["class"].split(" "):[];for(s=0;s=0;s--)w[s]===""&&w.splice(s,1);w.length>0&&(o.style=(o.style?o.style+"; ":"")+w.join("; "));for(s in o)m.push(s+'="'+e.htmlEncode(o[s])+'" ');m.push(">",p,""),g.push(m.join("")),(this._||(this._={})).dialog=d,typeof f.isChanged=="boolean"&&(this.isChanged=function(){return f.isChanged}),typeof f.isChanged=="function"&&(this.isChanged=f.isChanged),typeof f.setValue=="function"&&(this.setValue=e.override(this.setValue,function(a){return function(b){a.call(this,f.setValue.call(this,b))}})),typeof f.getValue=="function"&&(this.getValue=e.override(this.getValue,function(a){return function(){return f.getValue.call(this,a.call(this))}})),a.event.implementOn(this),this.registerEvents(f),this.accessKeyUp&&this.accessKeyDown&&f.accessKey&&J(this,d,"CTRL+"+f.accessKey);var y=this;d.on("load",function(){var a=y.getInputElement();if(a){var e=y.type in{checkbox:1,ratio:1}&&c&&b.version<8?"cke_dialog_ui_focused":"";a.on("focus",function(){d._.tabBarMode=!1,d._.hasFocus=!0,y.fire("focus"),e&&this.addClass(e)}),a.on("blur",function(){y.fire("blur"),e&&this.removeClass(e)})}}),this.keyboardFocusable&&(this.tabIndex=f.tabIndex||0,this.focusIndex=d._.focusList.push(this)-1,this.on("focus",function(){d._.currentFocusIndex=y.focusIndex})),e.extend(this,f)},hbox:function(a,d,e,g,h){if(arguments.length<4)return;this._||(this._={});var i=this._.children=d,j=h&&h.widths||null,l=h&&h.height||null,m={},n,o=function(){var a=[''];for(n=0;n0&&a.push('style="'+g.join("; ")+'" '),a.push(">",e[n],"")}return a.push(""),a.join("")},p={role:"presentation"};h&&h.align&&(p.align=h.align),k.dialog.uiElement.call(this,a,h||{type:"hbox"},g,"table",m,p,o)},vbox:function(a,d,g,h,i){if(arguments.length<3)return;this._||(this._={});var j=this._.children=d,l=i&&i.width||null,m=i&&i.heights||null,n=function(){var d=['");for(var h=0;h")}return d.push("
0&&d.push('style="',k.join("; "),'" '),d.push(' class="cke_dialog_ui_vbox_child">',g[h],"
"),d.join("")};k.dialog.uiElement.call(this,a,i||{type:"vbox"},h,"div",null,{role:"presentation"},n)}}})(),k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){return this.getInputElement().setValue(a),!b&&this.fire("change",{value:a}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){var a=this,b=a.getInputElement(),c=b,d;while((c=c.getParent())&&c.$.className.search("cke_dialog_page_contents")==-1);return c?(d=c.getAttribute("name"),a._.dialog._.currentTabId!=d&&a._.dialog.selectPage(d),a):a},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})};for(var e in a){if(!(c=e.match(b)))continue;this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e])}return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(a,b){this.focus()},accessKeyUp:function(a,b){},disable:function(){var a=this.getElement(),b=this.getInputElement();b.setAttribute("disabled","true"),a.addClass("cke_disabled")},enable:function(){var a=this.getElement(),b=this.getInputElement();b.removeAttribute("disabled"),a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!this.isEnabled()||!this.isVisible()?!1:!0}},k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement,{getChild:function(a){var b=this;return arguments.length<1?b._.children.concat():(a.splice||(a=[a]),a.length<2?b._.children[a[0]]:b._.children[a[0]]&&b._.children[a[0]].getChild?b._.children[a[0]].getChild(a.slice(1,a.length)):null)}},!0),k.dialog.vbox.prototype=new k.dialog.hbox,function(){var b={build:function(b,c,d){var e=c.children,f,g=[],h=[];for(var i=0;i"+d+"":a.setHtml(d),b.remove()}function v(a){var b=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,c=a.getName(),d=w(a.getOuterHtml(),b,function(a,b,c){return b+""+c+"
"}),e=[];return d.replace(/([\s\S]*?)<\/pre>/gi,function(a,b){e.push(b)}),e}function w(a,b,c){var d="",e="";return a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){return b&&(d=b),c&&(e=c),""}),d+a.replace(b,c)+e}function x(a,b){var c;a.length>1&&(c=new d.documentFragment(b.getDocument()));for(var f=0;f"),g=g.replace(/[ \t]{2,}/g,function(a){return e.repeat(" ",a.length-1)+" "});if(c){var h=b.clone();h.setHtml(g),c.append(h)}else b.setHtml(g)}return c||b}function y(a,b){var d=a.getBogus();d&&d.remove();var e=a.getHtml();e=w(e,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,""),e=e.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,"$1"),e=e.replace(/([ \t\n\r]+| )/g," "),e=e.replace(/]*>/gi,"\n");if(c){var f=a.getDocument().createElement("div");f.append(b),b.$.outerHTML="
"+e+"
",b.copyAttributes(f.getFirst()),b=f.getFirst().remove()}else b.setHtml(e);return b}function z(a,b){var c=a._.definition,d=e.extend({},c.attributes,H(a)[b.getName()]),g=c.styles,h=e.isEmpty(d)&&e.isEmpty(g);for(var i in d)if(i!="class"&&!a._.definition.fullMatch||b.getAttribute(i)==I(i,d[i]))h=b.hasAttribute(i),b.removeAttribute(i);else continue;for(var j in g){if(a._.definition.fullMatch&&b.getStyle(j)!=I(j,g[j],true))continue;h=h||!!b.getStyle(j),b.removeStyle(j)}h&&(!f.$block[b.getName()]||a._.enterMode==2&&!b.hasAttributes()?C(b):b.renameNode(a._.enterMode==1?"p":"div"))}function A(a,b){var c=a._.definition,d=c.attributes,e=c.styles,f=H(a),g=b.getElementsByTag(a.element);for(var h=g.count();--h>=0;)z(a,g.getItem(h));for(var i in f)if(i!=a.element){g=b.getElementsByTag(i);for(h=g.count()-1;h>=0;h--){var j=g.getItem(h);B(j,f[i])}}}function B(a,b){var c=b&&b.attributes;if(c)for(var d=0;d",b||c.name,""),d.join("")}},a.style.getStyleText=function(a){var b=a._ST;if(b)return b;b=a.styles;var c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(i,";"));for(var e in b){var f=b[e],g=(e+":"+f).replace(i,";");f=="inherit"?d+=g:c+=g}return c.length&&(c=J(c)),c+=d,a._ST=c}}(),a.styleCommand=function(a){this.style=a},a.styleCommand.prototype.exec=function(a){var b=this;a.focus();var c=a.document;return c&&(b.state==2?b.style.apply(c):b.state==1&&b.style.remove(c)),!!c},a.stylesSet=new a.resourceManager("","stylesSet"),a.addStylesSet=e.bind(a.stylesSet.add,a.stylesSet),a.loadStylesSet=function(b,c,d){a.stylesSet.addExternal(b,c,""),a.stylesSet.load(b,d)},a.editor.prototype.getStylesSet=function(b){if(!this._. stylesDefinitions){var c=this,d=c.config.stylesCombo_stylesSet||c.config.stylesSet||"default";if(d instanceof Array){c._.stylesDefinitions=d,b(d);return}var e=d.split(":"),f=e[0],g=e[1],h=j.registered.styles.path;a.stylesSet.addExternal(f,g?e.slice(1).join(":"):h+"styles/"+f+".js",""),a.stylesSet.load(f,function(a){c._.stylesDefinitions=a[f],b(c._.stylesDefinitions)})}else b(this._.stylesDefinitions)},j.add("domiterator"),function(){function a(a){var b=this;if(arguments.length<1)return;b.range=a,b.forceBrBreak=0,b.enlargeBr=1,b.enforceRealBlocks=0,b._||(b._={})}function i(a,b,c){var d=a.getNextSourceNode(b,null,c);while(!f(d))d=d.getNextSourceNode(b,null,c);return d}var b=/^[\r\n\t ]+$/,f=d.walker.bookmark(!1,!0),g=d.walker.whitespaces(!0),h=function(a){return f(a)&&g(a)};a.prototype={getNextParagraph:function(a){var g=this,j,k,l,m,p,s;if(!g._.lastNode){k=g.range.clone(),k.shrink(1,!0),m=k.endContainer.hasAscendant("pre",!0)||k.startContainer.hasAscendant("pre",!0),k.enlarge(g.forceBrBreak&&!m||!g.enlargeBr?3:2);var t=new d.walker(k),u=d.walker.bookmark(!0,!0);t.evaluator=u,g._.nextNode=t.next(),t=new d.walker(k),t.evaluator=u;var v=t.previous();g._.lastNode=v.getNextSourceNode(!0);if(g._.lastNode&&g._.lastNode.type==3&&!e.trim(g._.lastNode.getText())&&g._.lastNode.getParent().isBlockBoundary()){var w=new d.range(k.document);w.moveToPosition(g._.lastNode,4);if(w.checkEndOfBlock()){var x=new d.elementPath(w.endContainer),y=x.block||x.blockLimit;g._.lastNode=y.getNextSourceNode(!0)}}g._.lastNode||(g._.lastNode=g._.docEndMarker=k.document.createText(""),g._.lastNode.insertAfter(v)),k=null}var z=g._.nextNode;v=g._.lastNode,g._.nextNode=null;while(z){var A=0,B=z.hasAscendant("pre"),C=z.type!=1,D=0;if(!C){var E=z.getName();if(z.isBlockBoundary(g.forceBrBreak&&!B&&{br:1})){if(E=="br")C=1;else if(!k&&!z.getChildCount()&&E!="hr"){j=z,l=z.equals(v);break}k&&(k.setEndAt(z,3),E!="br"&&(g._.nextNode=z)),A=1}else{if(z.getFirst()){k||(k=new d.range(g.range.document),k.setStartAt(z,3)),z=z.getFirst();continue}C=1}}else z.type==3&&b.test(z.getText())&&(C=0);C&&!k&&(k=new d.range(g.range.document),k.setStartAt(z,3)),l=(!A||C)&&z.equals(v);if(k&&!A)while(!z.getNext(h)&&!l){var F=z.getParent();if(F.isBlockBoundary(g.forceBrBreak&&!B&&{br:1})){A=1,C=0,l=l||F.equals(v),k.setEndAt(F,2);break}z=F,C=1,l=z.equals(v),D=1}C&&k.setEndAt(z,4),z=i(z,D,v),l=!z;if(l||A&&k)break}if(!j){if(!k)return g._.docEndMarker&&g._.docEndMarker.remove(),g._.nextNode=null,null;var G=new d.elementPath(k.startContainer),H=G.blockLimit,I={div:1,th:1,td:1};j=G.block;if(!j&&!g.enforceRealBlocks&&I[H.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock())j=H;else if(!j||g.enforceRealBlocks&&j.getName()=="li")j=g.range.document.createElement(a||"p"),k.extractContents().appendTo(j),j.trim(),k.insertNode(j),p=s=!0;else if(j.getName()!="li"){if(!k.checkStartOfBlock()||!k.checkEndOfBlock()){j=j.clone(!1),k.extractContents().appendTo(j),j.trim();var J=k.splitBlock();p=!J.wasStartOfBlock,s=!J.wasEndOfBlock,k.insertNode(j)}}else l||(g._.nextNode=j.equals(v)?null:i(k.getBoundaryNodes().endNode,1,v))}if(p){var K=j.getPrevious();K&&K.type==1&&(K.getName()=="br"?K.remove():K.getLast()&&K.getLast().$.nodeName.toLowerCase()=="br"&&K.getLast().remove())}if(s){var L=j.getLast();L&&L.type==1&&L.getName()=="br"&&(c||L.getPrevious(f)||L.getNext(f))&&L.remove()}return g._.nextNode||(g._.nextNode=l||j.equals(v)?null:i(j,1,v)),j}},d.range.prototype.createIterator=function(){return new a(this)}}(),j.add("panelbutton",{requires:["button"],onLoad:function(){function b(a){var b=this,c=b._;if(c.state==0)return;b.createPanel(a);if(c.on){c.panel.hide();return}c.panel.showBlock(b._.id,b.document.getById(b._.id),4)}k.panelButton=e.createClass({base:k.button,$:function(c){var d=this,e=c.panel;delete c.panel,d.base(c),d.document=e&&e.parent&&e.parent.getDocument()||a.document,e.block={attributes:e.attributes},d.hasArrow=!0,d.click=b,d._={panelDefinition:e}},statics:{handler:{create:function(a){return new k.panelButton(a)}}},proto:{createPanel:function(b){var c=this._;if(c.panel)return;var d=this._.panelDefinition||{},e=this._.panelDefinition.block,f=d.parent||a.document.getBody(),g=this._.panel=new k.floatPanel(b,f,d),h=g.addBlock(c.id,e),i=this;g.onShow=function(){i.className&&this.element.getFirst().addClass(i.className+"_panel"),i.setState(1),c.on=1,i.onOpen&&i.onOpen()},g.onHide=function(a){i.className&&this.element.getFirst().removeClass(i.className+"_panel"),i.setState(i.modes&&i.modes[b.mode]?2:0),c.on=0,!a&&i.onClose&&i.onClose()},g.onEscape=function(){g.hide(),i.document.getById(c.id).focus()},this.onBlock&&this.onBlock(g,h),h.onHide=function(){c.on=0,i.setState(2)}}}})},beforeInit:function(a){a.ui.addHandler("panelbutton",k.panelButton.handler)}}),a.UI_PANELBUTTON="panelbutton",j.add("floatpanel",{requires:["panel"]}),function(){function i(a,b,c,d,g){var i=e.genKey(b.getUniqueId(),c.getUniqueId(),a.skinName,a.lang.dir,a.uiColor||"",d.css||"",g||""),j=f[i];return j||(j=f[i]=new k.panel(b,d),j.element=c.append(h.createFromHtml(j.renderHtml(a),b)),j.element.setStyles({display:"none",position:"absolute"})),j}var f={},g=!1;k.floatPanel=e.createClass({$:function(a,b,c,d){c.forceIFrame=1;var e=b.getDocument(),f=i(a,e,b,c,d||0),g=f.element,h=g.getFirst().getFirst();this.element=g,this._={editor:a,panel:f,parentElement:b,definition:c,document:e,iframe:h,children:[],dir:a.lang.dir},a.on("mode",function(){this.hide()},this)},proto:{addBlock:function(a,b){return this._.panel.addBlock(a,b)},addListBlock:function(a,b){return this._.panel.addListBlock(a,b)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(f,i,j,k,l){var m=this._.panel,o=m.showBlock(f);this.allowBlur(!1),g=1,this._.returnFocus=this._.editor.focusManager.hasFocus?this._.editor:new h(a.document.$.activeElement);var p=this.element,q=this._.iframe,r=this._.definition,s=i.getDocumentPosition(p.getDocument()),t=this._.dir=="rtl",u=s.x+(k||0),v=s.y+(l||0);!t||j!=1&&j!=4?!t&&(j==2||j==3)&&(u+=i.$.offsetWidth-1):u+=i.$.offsetWidth;if(j==3||j==4)v+=i.$.offsetHeight-1;this._.panel._.offsetParentId=i.getId(),p.setStyles({top:v+"px",left:0,display:""}),p.setOpacity(0),p.getFirst().removeStyle("width");if(!this._.blurSet){var w=c?q:new d.window(q.$.contentWindow);a.event.useCapture=!0,w.on("blur",function(a){var b=this;if(!b.allowBlur())return;var c=a.data.getTarget();if(c.getName&&c.getName()!="iframe")return;b.visible&&!b._.activeChild&&!g&&(delete b._.returnFocus,b.hide())},this),w.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),a.event.useCapture=!1,this._.blurSet=1}m.onEscape=e.bind(function(a){if(this.onEscape&&this.onEscape(a)===!1)return!1},this),e.setTimeout(function(){t&&(u-=p.$.offsetWidth);var a=e.bind(function(){var a=p.getFirst();if(o.autoSize){var d=o.element.$;if(b.gecko||b.opera)d=d.parentNode;c&&(d=d.document.body);var e=d.scrollWidth;c&&b.quirks&&e>0&&(e+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3),e+=4,a.setStyle("width",e+"px"),o.element.addClass("cke_frameLoaded");var f=o.element.$.scrollHeight;c&&b.quirks&&f>0&&(f+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3),a.setStyle("height",f+"px"),m._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");var g=m.element,i=g.getWindow(),j=i.getScrollPosition(),k=i.getViewPaneSize(),l={height:g.$.offsetHeight,width:g.$.offsetWidth};if(t?u<0:u+l.width>k.width+j.x)u+=l.width*(t?1:-1);v+l.height>k.height+j.y&&(v-=l.height);if(c){var n=new h(p.$.offsetParent),q=n;q.getName()=="html"&&(q=q.getDocument().getBody()),q.getComputedStyle("direction")=="rtl"&&(b.ie8Compat?u-=p.getDocument().getDocumentElement().$.scrollLeft*2:u-=n.$.scrollWidth-n.$.clientWidth)}var r=p.getFirst(),s;(s=r.getCustomData("activePanel"))&&s.onHide&&s.onHide.call(this,1),r.setCustomData("activePanel",this),p.setStyles({top:v+"px",left:u+"px"}),p.setOpacity(1)},this);m.isLoaded?a():m.onLoad=a,e.setTimeout(function(){q.$.contentWindow.focus(),this.allowBlur(!0)},0,this)},b.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this),g=0},hide:function(a){var c=this;if(c.visible&&(!c.onHide||c.onHide.call(c)!==!0)){c.hideChild(),b.gecko&&c._.iframe.getFrameDocument().$.activeElement.blur(),c.element.setStyle("display","none"),c.visible=0,c.element.getFirst().removeCustomData("activePanel");var d=a!==!1&&c._.returnFocus;d&&(b.webkit&&d.type&&d.getWindow().$.focus(),d.focus())}},allowBlur:function(a){var b=this._.panel;return a!=undefined&&(b.allowBlur=a),b.allowBlur},showAsChild:function(a,c,d,f,g,h){if(this._.activeChild==a&&a._.panel._.offsetParentId==d.getId())return;this.hideChild(),a.onHide=e.bind(function(){e.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(c,d,f,g,h),(b.ie7Compat||b.ie8&&b.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(){var a=this._.activeChild;a&&(delete a.onHide,delete a._.returnFocus,delete this._.activeChild,a.hide())}}}),a.on("instanceDestroyed",function(){var b=e.isEmpty(a.instances);for(var c in f){var d=f[c];b?d.destroy():d.element.hide()}b&&(f={})})}(),j.add("menu",{beforeInit:function(b){var c=b.config.menu_groups.split(","),d=b._.menuGroups={},e=b._.menuItems={};for(var f=0;fb.group?1:a.orderb.order?1:0})}a.menu=e.createClass({$:function(a,b){var c=this;b=c._.definition=b||{},c.id=e.getNextId(),c.editor=a,c.items=[],c._.listeners=[],c._.level=b.level||1;var d=e.extend({},b.panel,{css:a.skin.editor.css,level:c._.level-1,block:{}}),f=d.block.attributes=d.attributes||{};!f.role&&(f.role="menu"),c._.panelDefinition=d},_:{onShow:function(){var a=this,b=a.editor.getSelection();c&&b&&b.lock();var d=b&&b.getStartElement(),e=a._.listeners,f=[];a.removeAll();for(var g=0;g'],u=i.length,v=u&&i[0].group;for(var w=0;w'),v=x.group),x.render(this,w,t)}t.push(""),n.setHtml(t.join("")),k.fire("ready",this),this.parent?this.parent._.panel.showAsChild(l,this.id,b,f,g,h):l.showBlock(this.id,b,f,g,h),j.fire("menuShow",[l])},addListener:function(a){this._.listeners.push(a)},hide:function(a){var b=this;b._.onHide&&b._.onHide(),b._.panel&&b._.panel.hide(a)}}}),a.menuItem=e.createClass({$:function(a,b,c){var d=this;e.extend(d,c,{order:0,className:"cke_button_"+b}),d.group=a._.menuGroups[d.group],d.editor=a,d.name=b},proto:{render:function(d,e,f){var g=this,h=d.id+String(e),i=typeof g.state=="undefined"?2:g.state,j=" cke_"+(i==1?"on":i==0?"disabled":"off"),k=g.label;g.className&&(j+=" "+g.className);var l=g.getItems;f.push(''+'"+''),l&&f.push('',"&#",g.editor.lang.dir=="rtl"?"9668":"9658",";",""),f.push(k,"")}}})}(),i.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",function(){var c;j.add("editingblock",{init:function(d){if(!d.config.editingBlock)return;d.on("themeSpace",function(a){a.data.space=="contents"&&(a.data.html+="
")}),d.on("themeLoaded",function(){d.fireOnce("editingBlockReady")}),d.on("uiReady",function(){d.setMode(d.config.startupMode)}),d.on("afterSetData",function(){if(!c){function a(){c=!0,d.getMode().loadData(d.getData()),c=!1}d.mode?a():d.on("mode",function(){d.mode&&(a(),d.removeListener("mode",arguments.callee))})}}),d.on("beforeGetData",function(){!c&&d.mode&&(c=!0,d.setData(d.getMode().getData(),null,1),c=!1)}),d.on("getSnapshot",function(a){d.mode&&(a.data=d.getMode().getSnapshotData())}),d.on("loadSnapshot",function(a){d.mode&&d.getMode().loadSnapshotData(a.data)}),d.on("mode",function(c){c.removeListener(),b.webkit&&d.container.on("focus",function(){d.focus()}),d.config.startupFocus&&d.focus(),setTimeout(function(){d.fireOnce("instanceReady"),a.fire("instanceReady",null,d)},0)}),d.on("destroy",function(){var a=this;a.mode&&a._.modes[a.mode].unload(a.getThemeSpace("contents"))})}}),a.editor.prototype.mode="",a.editor.prototype.addMode=function(a,b){b.name=a,(this._.modes||(this._.modes={}))[a]=b},a.editor.prototype.setMode=function(a){this.fire("beforeSetMode",{newMode:a});var b,c=this.getThemeSpace("contents"),d=this.checkDirty();if(this.mode){if(a==this.mode)return;this._.previousMode=this.mode,this.fire("beforeModeUnload");var e=this.getMode();b=e.getData(),e.unload(c),this.mode=""}c.setHtml("");var f=this.getMode(a);if(!f)throw'[CKEDITOR.editor.setMode] Unknown mode "'+a+'".';d||this.on("mode",function(){this.resetDirty(),this.removeListener("mode",arguments.callee)}),f.load(c,typeof b!="string"?this.getData():b)},a.editor.prototype.getMode=function(a){return this._.modes&&this._.modes[a||this.mode]},a.editor.prototype.focus=function(){this.forceNextSelectionCheck();var a=this.getMode();a&&a.focus()}}(),i.startupMode="wysiwyg",i.editingBlock=!0,function(){function i(){var a=this;try{var b=a.getSelection();if(!b||!b.document.getWindow().$)return;var c=b.getStartElement(),e=new d.elementPath(c);e.compare(a._.selectionPreviousPath)||(a._.selectionPreviousPath=e,a.fire("selectionChange",{selection:b,path:e,element:c}))}catch(f){}}function m(){l=!0;if(k)return;n.call(this),k=e.setTimeout(n,200,this)}function n(){k=null,l&&(e.setTimeout(i,0,this),l=!1)}function o(a){function b(a){return a&&a.type==1&&a.getName()in f.$removeEmpty}function c(b){var c=a.document.getBody();return!b.is("body")&&c.getChildCount()==1}var d=a.startContainer,g=a.startOffset;return d.type==3?!1:e.trim(d.getHtml())?b(d.getChild(g-1))||b(d.getChild(g)):b(d)||c(d)}function q(a){t(a);var b=a.createText("​");return a.setCustomData("cke-fillingChar",b),b}function r(a){return a&&a.getCustomData("cke-fillingChar")}function s(a){var b=a&&r(a);b&&(b.getCustomData("ready")?t(a):b.setCustomData("ready",1))}function t(a){var b=a&&a.removeCustomData("cke-fillingChar");b&&(b.setText(b.getText().replace(/\u200B/g,"")),b=0)}var k,l,p={modes:{wysiwyg:1,source:1},readOnly:c||b.webkit,exec:function(a){switch(a.mode){case"wysiwyg":a.document.$.execCommand("SelectAll",!1,null),a.forceNextSelectionCheck(),a.selectionChange();break;case"source":var b=a.textarea.$;c?b.createTextRange().execCommand("SelectAll"):(b.selectionStart=0,b.selectionEnd=b.value.length),b.focus()}},canUndo:!1};j.add("selection",{init:function(a){if(b.webkit){a.on("selectionChange",function(){s(a.document)}),a.on("beforeSetMode",function(){t(a.document)}),a.on("key",function(b){switch(b.data.keyCode){case 13:case 2228237:case 37:case 39:case 8:t(a.document)}},null,null,10);var d,f;function g(){var b=a.document,c=r(b);if(c){var e=b.$.defaultView.getSelection();e.type=="Caret"&&e.anchorNode==c.$&&(f=1),d=c.getText(),c.setText(d.replace(/\u200B/g,""))}}function h(){var b=a.document,c=r(b);c&&(c.setText(d),f&&(b.$.defaultView.getSelection().setPosition(c.$,c.getLength()),f=0))}a.on("beforeUndoImage",g),a.on("afterUndoImage",h),a.on("beforeGetData",g,null,null,0),a.on("getData",h)}a.on("contentDom",function(){var d=a.document,f=d.getBody(),g=d.getDocumentElement();if(c){var h,i,j=1;f.on("focusin",function(a){if(a.data.$.srcElement.nodeName!="BODY")return;if(h){if(j){try{h.select()}catch(b){}var c=d.getCustomData("cke_locked_selection");c&&(c.unlock(),c.lock())}h=null}}),f.on("focus",function(){i=1,n()}),f.on("beforedeactivate",function(a){if(a.data.$.toElement)return;i=0,j=1}),c&&b.version<8&&a.on("blur",function(b){try{a.document&&a.document.$.selection.empty()}catch(c){}}),g.on("mousedown",function(){j=0}),g.on("mouseup",function(){j=1}),c&&(b.ie7Compat||b.version<8||b.quirks)&&g.on("click",function(b){b.data.getTarget().getName()=="html"&&a.getSelection().getRanges()[0].select()});var k;f.on("mousedown",function(b){if(b.data.$.button==2){var c=a.document.$.selection;c.type=="None"&&(k=a.window.getScrollPosition())}l()}),f.on("mouseup",function(b){b.data.$.button==2&&k&&(a.document.$.documentElement.scrollLeft=k.x,a.document.$.documentElement.scrollTop=k.y),k=null,i=1,setTimeout(function(){n(!0)},0)}),f.on("keydown",l),f.on("keyup",function(){i=1,n()}),d.on("selectionchange",n);function l(){i=0}function n(b){if(i){var c=a.document,d=a.getSelection(),f=d&&d.getNative();if(b&&f&&f.type=="None"&&!c.$.queryCommandEnabled("InsertImage")){e.setTimeout(n,50,this,!0);return}var g;if(f&&f.type&&f.type!="Control"&&(g=f.createRange())&&(g=g.parentElement())&&(g=g.nodeName)&&g.toLowerCase()in{input:1,textarea:1})return;h=f&&d.getRanges()[0],m.call(a)}}}else d.on("mouseup",m,a),d.on("keyup",m,a),d.on("selectionchange",m,a)}),a.on("contentDomUnload",a.forceNextSelectionCheck,a),a.addCommand("selectAll",p),a.ui.addButton("SelectAll",{label:a.lang.selectAll,command:"selectAll"}),a.selectionChange=m,b.ie9Compat&&a.on("destroy",function(){var b=a.getSelection();b&&b.getNative().clear()},null,null,9)}}),a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection()},a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath},g.prototype.getSelection=function(){var a=new d.selection(this);return!a||a.isInvalid?null:a},a.SELECTION_NONE=1,a.SELECTION_TEXT=2,a.SELECTION_ELEMENT=3,d.selection=function(a){var b=this,d=a.getCustomData("cke_locked_selection");if(d)return d;b.document=a,b.isLocked=0,b._={cache:{}};if(c){var e=b.getNative().createRange();if(!e||e.item&&e.item(0).ownerDocument!=b.document.$||e.parentElement&&e.parentElement().ownerDocument!=b.document.$)b.isInvalid=!0}return b};var u={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection)}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection())},getType:c?function(){var a=this._.cache;if(a.type)return a.type;var b=1;try{var c=this.getNative(),d=c.type;d=="Text"&&(b=2),d=="Control"&&(b=3),c.createRange().parentElement&&(b=2)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=2,c=this.getNative();if(!c)b=1;else if(c.rangeCount==1){var d=c.getRangeAt(0),e=d.startContainer;e==d.endContainer&&e.nodeType==1&&d.endOffset-d.startOffset==1&&u[e.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=3)}return a.type=b},getRanges:function(){var a=c?function(){function a(a){return(new d.node(a)).getIndex()}var c=function(c,d){c=c.duplicate(),c.collapse(d);var e=c.parentElement(),f=e.ownerDocument;if(!e.hasChildNodes())return{container:e,offset:0};var g=e.children,h,i,j=c.duplicate(),k=0,l=g.length-1,m=-1,n,o;while(k<=l){m=Math.floor((k+l)/2),h=g[m],j.moveToElementText(h),n=j.compareEndPoints("StartToStart",c);if(n>0)l=m-1;else if(n<0)k=m+1;else{if(b.ie9Compat&&h.tagName=="BR"){var p="cke_range_marker";c.execCommand("CreateBookmark",!1,p),h=f.getElementsByName(p)[0];var q=a(h);return e.removeChild(h),{container:e,offset:q}}return{container:e,offset:a(h)}}}if(m==-1||m==g.length-1&&n<0){j.moveToElementText(e),j.setEndPoint("StartToStart",c),o=j.text.replace(/(\r\n|\r)/g,"\n").length,g=e.childNodes;if(!o)return h=g[g.length-1],h.nodeType==1?{container:e,offset:g.length}:{container:h,offset:h.nodeValue.length};var r=g.length;while(o>0)o-=g[--r].nodeValue.length;return{container:g[r],offset:-o}}j.collapse(n>0?!0:!1),j.setEndPoint(n>0?"StartToStart":"EndToStart",c),o=j.text.replace(/(\r\n|\r)/g,"\n").length;if(!o)return{container:e,offset:a(h)+(n>0?0:1)};while(o>0)try{i=h[n>0?"previousSibling":"nextSibling"],o-=i.nodeValue.length,h=i}catch(s){return{container:e,offset:a(h)}}return{container:h,offset:n>0?-o:h.nodeValue.length+o}};return function(){var a=this,b=a.getNative(),e=b&&b.createRange(),f=a.getType(),g;if(!b)return[];if(f==2){g=new d.range(a.document);var h=c(e,!0);return g.setStart(new d.node(h.container),h.offset),h=c(e),g.setEnd(new d.node(h.container),h.offset),g.endContainer.getPosition(g.startContainer)&4&&g.endOffset<=g.startContainer.getIndex()&&g.collapse(),[g]}if(f==3){var i=[];for(var j=0;j=j.getLength()?n.setStartAfter(j):n.setStartBefore(j)),k&&k.type==3&&(m?n.setEndAfter(k):n.setEndBefore(k));var o=new d.walker(n);o.evaluator=function(a){if(a.type==1&&a.isReadOnly()){var b=g.clone();return g.setEndBefore(a),g.collapsed&&e.splice(f--,1),a.getPosition(n.endContainer)&16||(b.setStartAfter(a),b.collapsed||e.splice(f+1,0,b)),!0}return!1},o.next()}}return c.ranges}}(),getStartElement:function(){var a=this,b=a._.cache;if(b.startElement!==undefined)return b.startElement;var c,d=a.getNative();switch(a.getType()){case 3:return a.getSelectedElement();case 2:var e=a.getRanges()[0];if(e){if(!e.collapsed){e.optimize();for(;;){var f=e.startContainer,g=e.startOffset;if(g==(f.getChildCount?f.getChildCount():f.getLength())&&!f.isBlockBoundary())e.setStartAfter(f);else break}c=e.startContainer;if(c.type!=1)return c.getParent();c=c.getChild(e.startOffset);if(!c||c.type!=1)c=e.startContainer;else{var i=c.getFirst();while(i&&i.type==1)c=i,i=i.getFirst()}}else c=e.startContainer,c.type!=1&&(c=c.getParent());c=c.$}}return b.startElement=c?new h(c):null},getSelectedElement:function(){var a=this._.cache;if(a.selectedElement!==undefined)return a.selectedElement;var b=this,c=e.tryThese(function(){return b.getNative().createRange().item(0)},function(){var a,c,g=b.getRanges()[0],h=g.getCommonAncestor(1,1),i={table:1,ul:1,ol:1,dl:1};for(var j in i)if(a=h.getAscendant(j,1))break;if(a){var k=new d.range(this.document);k.setStartAt(a,1),k.setEnd(g.startContainer,g.startOffset);var l=e.extend(i,f.$listItem,f.$tableContent),m=new d.walker(k),n=function(a,b){return function(c,d){if(c.type==3&&(!e.trim(c.getText())||c.getParent().data("cke-bookmark")))return!0;var g;if(c.type==1){g=c.getName();if(g=="br"&&b&&c.equals(c.getParent().getBogus()))return!0;if(d&&g in l||g in f.$removeEmpty)return!0}return a.halted=1,!1}};m.guard=n(m),m.checkBackward()&&!m.halted&&(m=new d.walker(k),k.setStart(g.endContainer,g.endOffset),k.setEndAt(a,2),m.guard=n(m,1),m.checkForward()&&!m.halted&&(c=a.$))}if(!c)throw 0;return c},function(){var a=b.getRanges()[0],c,d;for(var e=2;e&&!((c=a.getEnclosedNode())&&c.type==1&&u[c.getName()]&&(d=c));e--)a.shrink(1);return d.$});return a.selectedElement=c?new h(c):null},getSelectedText:function(){var a=this._.cache;if(a.selectedText!==undefined)return a.selectedText;var b="",d=this.getNative();return this.getType()==2&&(b=c?d.createRange().text:d.toString()),a.selectedText=b},lock:function(){var a=this;a.getRanges(),a.getStartElement(),a.getSelectedElement(),a.getSelectedText(),a._.cache.nativeSel={},a.isLocked=1,a.document.setCustomData("cke_locked_selection",a)},unlock:function(a){var b=this,c=b.document,d=c.getCustomData("cke_locked_selection");if(d){c.setCustomData("cke_locked_selection",null);if(a){var e=d.getSelectedElement(),f=!e&&d.getRanges();b.isLocked=0,b.reset(),c.getBody().focus(),e?b.selectElement(e):b.selectRanges(f)}}if(!d||!a)b.isLocked=0,b.reset()},reset:function(){this._.cache={}},selectElement:function(a){var b=this;if(b.isLocked){var c=new d.range(b.document);c.setStartBefore(a),c.setEndAfter(a),b._.cache.selectedElement=a,b._.cache.startElement=a,b._.cache.ranges=new d.rangeList(c),b._.cache.type=3;return}c=new d.range(a.getDocument()),c.setStartBefore(a),c.setEndAfter(a),c.select(),b.document.fire("selectionchange"),b.reset()},selectRanges:function(a){var e=this;if(e.isLocked){e._.cache.selectedElement=null,e._.cache.startElement=a[0]&&a[0].getTouchedStartNode(),e._.cache.ranges=new d.rangeList(a),e._.cache.type=2;return}if(c){if(a.length>1){var f=a[a.length-1];a[0].setEnd(f.endContainer,f.endOffset),a.length=1}a[0]&&a[0].select(),e.reset()}else{var g=e.getNative();if(!g)return;a.length&&(g.removeAllRanges(),b.webkit&&t(e.document));for(var h=0;h=0)n.collapse(1),p.setEnd(n.endContainer.$,n.endOffset);else throw v}g.addRange(p)}e.document.fire("selectionchange"),e.reset()}},createBookmarks:function(a){return this.getRanges().createBookmarks(a)},createBookmarks2:function(a){return this.getRanges().createBookmarks2(a)},selectBookmarks:function(a){var b=[];for(var c=0;c',"','',this.label,"",'=10900&&!i.hc?"":" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',j,'_label" aria-describedby="',j,'_text" aria-haspopup="true"'),(b.opera||b.gecko&&b.mac)&&g.push(' onkeypress="return false;"'),b.gecko&&g.push(' onblur="this.style.cssText = this.style.cssText;"'),g.push(' onkeydown="CKEDITOR.tools.callFunction( ',n,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',o,', event);" '+(c?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction(',k,', this); return false;">'+this.label+""+""+""+(b.hc?"▼":b.air?" ":"")+""+""+""+""),this.onRender&&this.onRender(),l},createPanel:function(b){if(this._.panel)return;var c=this._.panelDefinition,d=this._.panelDefinition.block,e=c.parent||a.document.getBody(),f=new k.floatPanel(b,e,c),g=f.addListBlock(this.id,d),h=this;f.onShow=function(){h.className&&this.element.getFirst().addClass(h.className+"_panel"),h.setState(1),g.focus(!h.multiSelect&&h.getValue()),h._.on=1,h.onOpen&&h.onOpen()},f.onHide=function(a){h.className&&this.element.getFirst().removeClass(h.className+"_panel"),h.setState(h.modes&&h.modes[b.mode]?2:0),h._.on=0,!a&&h.onClose&&h.onClose()},f.onEscape=function(){f.hide()},g.onClick=function(a,b){h.document.getWindow().focus(),h.onClick&&h.onClick.call(h,a,b),b?h.setValue(a,h._.items[a]):h.setValue(""),f.hide(!1)},this._.panel=f,this._.list=g,f.getBlock(this.id).onHide=function(){h._.on=0,h.setState(2)},this.init&&this.init()},setValue:function(a,b){var c=this;c._.value=a;var d=c.document.getById("cke_"+c.id+"_text");d&&(!a&&!b?(b=c.label,d.addClass("cke_inline_label")):d.removeClass("cke_inline_label"),d.setHtml(typeof b!="undefined"?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,c){this._.items[a]=c||a,this._.list.add(a,b,c)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){var a=this;a._.committed||(a._.list.commit(),a._.committed=1,k.fire("ready",a)),a._.committed=1},setState:function(a){var b=this;if(b._.state==a)return;b.document.getById("cke_"+b.id).setState(a),b._.state=a}}}),k.prototype.addRichCombo=function(a,b){this.add(a,"richcombo",b)},j.add("htmlwriter"),a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var a=this;a.base(),a.indentationChars="\t",a.selfClosingEnd=" />",a.lineBreakChars="\n",a.forceSimpleAmpersand=0,a.sortAttributes=1,a._.indent=0,a._.indentation="",a._.inPre=0,a._.rules={};var b=f;for(var c in e.extend({},b.$nonBodyContent,b.$block,b.$listItem,b.$tableContent))a.setRules(c,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!b[c]["#"],breakAfterClose:1});a.setRules("br",{breakAfterOpen:1}),a.setRules("title",{indent:0,breakAfterOpen:0}),a.setRules("style",{indent:0,breakBeforeClose:1}),a.setRules("pre",{indent:0})},proto:{openTag:function(a,b){var c=this,d=c._.rules[a];c._.indent?c.indentation():d&&d.breakBeforeOpen&&(c.lineBreak(),c.indentation()),c._.output.push("<",a)},openTagClose:function(a,b){var c=this,d=c._.rules[a];b?c._.output.push(c.selfClosingEnd):(c._.output.push(">"),d&&d.indent&&(c._.indentation+=c.indentationChars)),d&&d.breakAfterOpen&&c.lineBreak(),a=="pre"&&(c._.inPre=1)},attribute:function(a,b){typeof b=="string"&&(this.forceSimpleAmpersand&&(b=b.replace(/&/g,"&")),b=e.htmlEncodeAttr(b)),this._.output.push(" ",a,'="',b,'"')},closeTag:function(a){var b=this,c=b._.rules[a];c&&c.indent&&(b._.indentation=b._.indentation.substr(b.indentationChars.length)),b._.indent?b.indentation():c&&c.breakBeforeClose&&(b.lineBreak(),b.indentation()),b._.output.push(""),a=="pre"&&(b._.inPre=0),c&&c.breakAfterClose&&b.lineBreak()},text:function(a){var b=this;b._.indent&&(b.indentation(),!b._.inPre&&(a=e.ltrim(a))),b._.output.push(a)},comment:function(a){this._.indent&&this.indentation(),this._.output.push("")},lineBreak:function(){var a=this;!a._.inPre&&a._.output.length>0&&a._.output.push(a.lineBreakChars),a._.indent=1},indentation:function(){var a=this;a._.inPre||a._.output.push(a._.indentation),a._.indent=0},setRules:function(a,b){var c=this._.rules[a];c?e.extend(c,b,!0):this._.rules[a]=b}}}),j.add("menubutton",{requires:["button","menu"],beforeInit:function(a){a.ui.addHandler("menubutton",k.menuButton.handler)}}),a.UI_MENUBUTTON="menubutton",function(){var b=function(b){var c=this._;if(c.state===0)return;c.previousState=c.state;var d=c.menu;d||(d=c.menu=new a.menu(b,{panel:{className:b.skinClass+" cke_contextmenu",attributes:{"aria-label":b.lang.common.options}}}),d.onHide=e.bind(function(){this.setState(this.modes&&this.modes[b.mode]?c.previousState:0)},this),this.onMenu&&d.addListener(this.onMenu));if(c.on){d.hide();return}this.setState(1),d.show(a.document.getById(this._.id),4)};k.menuButton=e.createClass({base:k.button,$:function(a){var c=a.panel;delete a.panel,this.base(a),this.hasArrow=!0,this.click=b},statics:{handler:{create:function(a){return new k.menuButton(a)}}}})}(),j.add("dialogui"),function(){var f=function(a){var b=this;b._||(b._={}),b._["default"]=b._.initValue=a["default"]||"",b._.required=a.required||!1;var c=[b._];for(var d=1;d",c.label,"",'");else{var i={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'