1 |
- !function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){var e,t,n,i,o,a,r,s;window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,t={timestamp:"L4KA",version:"4.16.1",revision:"cae20318d4",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var t=window.CKEDITOR_BASEPATH||"";if(!t)for(var n=document.getElementsByTagName("script"),i=0;i<n.length;i++){var o=n[i].src.match(e);if(o){t=o[1];break}}if(-1==t.indexOf(":/")&&"//"!=t.slice(0,2)&&(t=0===t.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+t:location.href.match(/^[^\?]*\/(?:)/)[0]+t),!t)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return t}(),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),window.removeEventListener("load",e,!1),t()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",e),window.detachEvent("onload",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){}document.documentElement.doScroll&&t&&function t(){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}}}()},n=window.CKEDITOR_GETURL;if(n){var i=t.getUrl;t.getUrl=function(e){return n.call(t,e)||i.call(t,e)}}return t}()),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 t(e){var t=n(this);return t[e]||(t[e]=new i(e))}var n=function(e){return(e=e.getPrivate&&e.getPrivate()||e._||(e._={})).events||(e.events={})},i=function(e){this.name=e,this.listeners=[]};return i.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(e,n){var i=t.call(this,e);CKEDITOR.tools.extend(i,n,!0)},on:function(n,i,o,a,r){function s(t,r,s,c){return t={name:n,sender:this,editor:t,data:r,listenerData:a,stop:s,cancel:c,removeListener:l},!1===i.call(o,t)?e:t.data}function l(){c.removeListener(n,i)}var c=this,d=t.call(this,n);if(0>d.getListenerIndex(i)){d=d.listeners,o||(o=this),isNaN(r)&&(r=10),s.fn=i,s.priority=r;for(var u=d.length-1;0<=u;u--)if(d[u].priority<=r)return d.splice(u+1,0,s),{removeListener:l};d.unshift(s)}return{removeListener:l}},once:function(){var e=Array.prototype.slice.call(arguments),t=e[1];return e[1]=function(e){return e.removeListener(),t.apply(this,arguments)},this.on.apply(this,e)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:function(){var t=0,i=function(){t=1},o=0,a=function(){o=1};return function(r,s,l){var c=n(this)[r];r=t;var d=o;if(t=o=0,c&&(h=c.listeners).length)for(var u,h=h.slice(0),f=0;f<h.length;f++){if(c.errorProof)try{u=h[f].call(this,l,s,i,a)}catch(e){}else u=h[f].call(this,l,s,i,a);if(u===e?o=1:void 0!==u&&(s=u),t||o)break}return s=!o&&(void 0===s||s),t=r,o=d,s}}(),fireOnce:function(e,t,i){return t=this.fire(e,t,i),delete n(this)[e],t},removeListener:function(e,t){var i=n(this)[e];if(i){var o=i.getListenerIndex(t);0<=o&&i.listeners.splice(o,1)}},removeAllListeners:function(){var e,t=n(this);for(e in t)delete t[e]},hasListeners:function(e){return(e=n(this)[e])&&0<e.listeners.length}}}()),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=e.match(/edge[ \/](\d+.?\d*)/),n=-1<e.indexOf("trident/");(n={ie:n=!(!t&&!n),edge:!!t,webkit:!n&&-1<e.indexOf(" applewebkit/"),air:-1<e.indexOf(" adobeair/"),mac:-1<e.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<e.indexOf("mobile"),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}).gecko="Gecko"==navigator.product&&!n.webkit&&!n.ie,n.webkit&&(-1<e.indexOf("chrome")?n.chrome=!0:n.safari=!0);var i=0;return n.ie&&(i=t?parseFloat(t[1]):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=7>i||n.quirks),n.gecko&&(t=e.match(/rv:([\d\.]+)/))&&(i=1e4*(t=t[1].split("."))[0]+100*(t[1]||0)+1*(t[2]||0)),n.air&&(i=parseFloat(e.match(/ adobeair\/(\d+)/)[1])),n.webkit&&(i=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),n.version=i,n.isCompatible=!(n.ie&&7>i||n.gecko&&4e4>i||n.webkit&&534>i),n.hidpi=2<=window.devicePixelRatio,n.needsBrFiller=n.gecko||n.webkit||n.ie&&10<i,n.needsNbspFiller=n.ie&&11>i,n.cssClass="cke_browser_"+(n.ie?"ie":n.gecko?"gecko":n.webkit?"webkit":"unknown"),n.quirks&&(n.cssClass+=" cke_browser_quirks"),n.ie&&(n.cssClass+=" cke_browser_ie"+(n.quirks?"6 cke_browser_iequirks":n.version)),n.air&&(n.cssClass+=" cke_browser_air"),n.iOS&&(n.cssClass+=" cke_browser_ios"),n.hidpi&&(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.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:t})},CKEDITOR.error=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:e,additionalData:t})},CKEDITOR.on("log",(function(e){if(window.console&&window.console.log){var t=console[e.data.type]?e.data.type:"log",n=e.data.errorCode;(e=e.data.additionalData)?console[t]("[CKEDITOR] Error code: "+n+".",e):console[t]("[CKEDITOR] Error code: "+n+"."),console[t]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+n)}}),null,null,999),CKEDITOR.dom={},function(){function e(e,t,n){this._minInterval=e,this._context=n,this._lastOutput=this._scheduledTimer=0,this._output=CKEDITOR.tools.bind(t,n||{});var i=this;this.input=function(){function e(){i._lastOutput=(new Date).getTime(),i._scheduledTimer=0,i._call()}if(!i._scheduledTimer||!1!==i._reschedule()){var t=(new Date).getTime()-i._lastOutput;t<i._minInterval?i._scheduledTimer=setTimeout(e,i._minInterval-t):e()}}}function t(t,n,i){e.call(this,t,n,i),this._args=[];var o=this;this.input=CKEDITOR.tools.override(this.input,(function(e){return function(){o._args=Array.prototype.slice.call(arguments),e.call(this)}}))}var n=[],i=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",o=/&/g,a=/>/g,r=/</g,s=/"/g,l=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,c={lt:"<",gt:">",amp:"&",quot:'"',nbsp:" ",shy:""},d=function(e,t){return"#"==t[0]?String.fromCharCode(parseInt(t.slice(1),10)):c[t]};CKEDITOR.on("reset",(function(){n=[]})),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},getIndex:function(e,t){for(var n=0;n<e.length;++n)if(t(e[n]))return n;return-1},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||e.nodeType||e.window===e)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 a=arguments[o]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(a),(function(i){!0!==t&&null!=e[i]||n&&!(i in n)||(e[i]=a[i])}))}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,n){return n?i+e+":"+t+";"+e+":"+t:((n={})[e]=t,n[i+e]=t,n)},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 null==e?"":String(e).replace(o,"&").replace(a,">").replace(r,"<")},htmlDecode:function(e){return e.replace(l,d)},htmlEncodeAttr:function(e){return CKEDITOR.tools.htmlEncode(e).replace(s,""")},htmlDecodeAttr:function(e){return CKEDITOR.tools.htmlDecode(e)},transformPlainTextToHtml:function(e,t){var n=t==CKEDITOR.ENTER_BR,i=(i=this.htmlEncode(e.replace(/\r\n/g,"\n"))).replace(/\t/g," "),o=t==CKEDITOR.ENTER_P?"p":"div";if(!n){var a=/\n{2}/g;if(a.test(i)){var r="<"+o+">",s="</"+o+">";i=r+i.replace(a,(function(){return s+r}))+s}}return i=i.replace(/\n/g,"<br>"),n||(i=i.replace(new RegExp("<br>(?=</"+o+">)"),(function(e){return CKEDITOR.tools.repeat(e,2)}))),(i=i.replace(/^ | $/g," ")).replace(/(>|\s) /g,(function(e,t){return t+" "})).replace(/ (?=<)/g," ")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var e="e",t=0;8>t;t++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e},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)},throttle:function(e,t,n){return new this.buffers.throttle(e,t,n)},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 0<=n?e[n]:null},bind:function(e,t){var n=Array.prototype.slice.call(arguments,2);return function(){return e.apply(t,n.concat(Array.prototype.slice.call(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 a=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}a.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 e(){this.base=n.prototype.base,n.apply(this,arguments),this.base=e}),o&&this.extend(t.prototype,o,!0),e&&this.extend(t,e,!0),t},addFunction:function(e,t){return n.push((function(){return e.apply(t||this,arguments)}))-1},removeFunction:function(e){n[e]=null},callFunction:function(e){var t=n[e];return t&&t.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){if(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)){var n=0>parseFloat(t);return n&&(t=t.replace("-","")),e.setStyle("width",t),t=e.$.clientWidth,n?-t:t}return t}}(),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;3>t;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")}))},normalizeHex:function(e){return e.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,(function(e,t,n,i){return 3==(e=t.toLowerCase()).length&&(e=[(e=e.split(""))[0],e[0],e[1],e[1],e[2],e[2]].join("")),"#"+e+i}))},_isValidColorFormat:function(e){return!!e&&(e=e.replace(/\s+/g,""),/^[a-z0-9()#%,./]+$/i.test(e))},parseCssText:function(e,t,n){var i={};return n&&(e=new CKEDITOR.dom.element("span").setAttribute("style",e).getAttribute("style")||""),e&&(e=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(e))),e&&";"!=e?(e.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,(function(e,n,o){t&&("font-family"==(n=n.toLowerCase())&&(o=o.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){return CKEDITOR.tools.object.keys(e)},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},getStyledSpans:function(e,t){var n=CKEDITOR.env.ie&&8==CKEDITOR.env.version?e.toUpperCase():e;n=t.find("span[style*="+n+"]").toArray();return CKEDITOR.tools.array.filter(n,(function(t){return!!t.getStyle(e)}))},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,n){return new this.buffers.event(e,t,n)},enableHtml5Elements:function(e,t){for(var n,i="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),o=i.length;o--;)n=e.createElement(i[o]),t&&e.appendChild(n)},checkIfAnyArrayItemMatches:function(e,t){for(var n=0,i=e.length;n<i;++n)if(e[n].match(t))return!0;return!1},checkIfAnyObjectPropertyMatches:function(e,t){for(var n in e)if(n.match(t))return!0;return!1},keystrokeToString:function(e,t){var n=this.keystrokeToArray(e,t);return n.display=n.display.join("+"),n.aria=n.aria.join("+"),n},keystrokeToArray:function(e,t){var n=16711680&t,i=65535&t,o=CKEDITOR.env.mac,a=[],r=[];return n&CKEDITOR.CTRL&&(a.push(o?"⌘":e[17]),r.push(o?e[224]:e[17])),n&CKEDITOR.ALT&&(a.push(o?"⌥":e[18]),r.push(e[18])),n&CKEDITOR.SHIFT&&(a.push(o?"⇧":e[16]),r.push(e[16])),i&&(e[i]?(a.push(e[i]),r.push(e[i])):(a.push(String.fromCharCode(i)),r.push(String.fromCharCode(i)))),{display:a,aria:r}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==",getCookie:function(e){e=e.toLowerCase();for(var t,n=document.cookie.split(";"),i=0;i<n.length;i++)if(t=n[i].split("="),decodeURIComponent(CKEDITOR.tools.trim(t[0]).toLowerCase())===e)return decodeURIComponent(1<t.length?t[1]:"");return null},setCookie:function(e,t){document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+";path=/"},getCsrfToken:function(){if(!(e=CKEDITOR.tools.getCookie("ckCsrfToken"))||40!=e.length){var e=[],t="";if(window.crypto&&window.crypto.getRandomValues)e=new Uint8Array(40),window.crypto.getRandomValues(e);else for(var n=0;40>n;n++)e.push(Math.floor(256*Math.random()));for(n=0;n<e.length;n++){var i="abcdefghijklmnopqrstuvwxyz0123456789".charAt(e[n]%36);t=t+(.5<Math.random()?i.toUpperCase():i)}e=t,CKEDITOR.tools.setCookie("ckCsrfToken",e)}return e},escapeCss:function(e){return e?window.CSS&&CSS.escape?CSS.escape(e):isNaN(parseInt(e.charAt(0),10))?e:"\\3"+e.charAt(0)+" "+e.substring(1,e.length):""},getMouseButton:function(e){return!!(e=e&&e.data?e.data.$:e)&&CKEDITOR.tools.normalizeMouseButton(e.button)},normalizeMouseButton:function(e,t){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return e;for(var n=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],i=0;i<n.length;i++){var o=n[i];if(o[0]===e&&t)return o[1];if(!t&&o[1]===e)return o[0]}},convertHexStringToBytes:function(e){var t,n=[],i=e.length/2;for(t=0;t<i;t++)n.push(parseInt(e.substr(2*t,2),16));return n},convertBytesToBase64:function(e){var t,n="",i=e.length;for(t=0;t<i;t+=3){var o,a=e.slice(t,t+3),r=a.length,s=[];if(3>r)for(o=r;3>o;o++)a[o]=0;for(s[0]=(252&a[0])>>2,s[1]=(3&a[0])<<4|a[1]>>4,s[2]=(15&a[1])<<2|(192&a[2])>>6,s[3]=63&a[2],o=0;4>o;o++)n=o<=r?n+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(s[o]):n+"="}return n},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(e){var t={},n=this._findColor(e);return n.length&&(t.color=n[0],CKEDITOR.tools.array.forEach(n,(function(t){e=e.replace(t,"")}))),(e=CKEDITOR.tools.trim(e))&&(t.unprocessed=e),t},margin:function(e){return CKEDITOR.tools.style.parse.sideShorthand(e,(function(e){return e.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]}))},sideShorthand:function(e,t){function n(e){i.top=o[e[0]],i.right=o[e[1]],i.bottom=o[e[2]],i.left=o[e[3]]}var i={},o=t?t(e):e.split(/\s+/);switch(o.length){case 1:n([0,0,0,0]);break;case 2:n([0,1,0,1]);break;case 3:n([0,1,2,1]);break;case 4:n([0,1,2,3])}return i},border:function(e){return CKEDITOR.tools.style.border.fromCssRule(e)},_findColor:function(e){var t=[],n=CKEDITOR.tools.array;return(t=(t=t.concat(e.match(this._rgbaRegExp)||[])).concat(e.match(this._hslaRegExp)||[])).concat(n.filter(e.split(/\s+/),(function(e){return!!e.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)||e.toLowerCase()in CKEDITOR.tools.style.parse._colors})))}}},array:{filter:function(e,t,n){var i=[];return this.forEach(e,(function(o,a){t.call(n,o,a,e)&&i.push(o)})),i},find:function(e,t,n){for(var i=e.length,o=0;o<i;){if(t.call(n,e[o],o,e))return e[o];o++}},forEach:function(e,t,n){var i,o=e.length;for(i=0;i<o;i++)t.call(n,e[i],i,e)},map:function(e,t,n){for(var i=[],o=0;o<e.length;o++)i.push(t.call(n,e[o],o,e));return i},reduce:function(e,t,n,i){for(var o=0;o<e.length;o++)n=t.call(i,n,e[o],o,e);return n},every:function(e,t,n){return!e.length||(t=this.filter(e,t,n),e.length===t.length)},some:function(e,t,n){for(var i=0;i<e.length;i++)if(t.call(n,e[i],i,e))return!0;return!1},zip:function(e,t){return CKEDITOR.tools.array.map(e,(function(e,n){return[e,t[n]]}))},unique:function(e){return this.filter(e,(function(t,n){return n===CKEDITOR.tools.array.indexOf(e,t)}))}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),entries:function(e){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(e),(function(t){return[t,e[t]]}))},values:function(e){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(e),(function(t){return e[t]}))},keys:function(e){var t=Object.prototype.hasOwnProperty,n=[],i=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!e||"object"!=typeof e)){if(t=[],"string"==typeof e)for(n=0;n<e.length;n++)t.push(String(n));return t}for(var o in e)n.push(o);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)for(o=0;o<i.length;o++)t.call(e,i[o])&&n.push(i[o]);return n},findKey:function(e,t){if("object"!=typeof e)return null;for(var n in e)if(e[n]===t)return n;return null},merge:function(e,t){var n=CKEDITOR.tools,i=n.clone(e),o=n.clone(t);return n.array.forEach(n.object.keys(o),(function(e){i[e]="object"==typeof o[e]&&"object"==typeof i[e]?n.object.merge(i[e],o[e]):o[e]})),i}},getAbsoluteRectPosition:function(e,t){var n=CKEDITOR.tools.copy(t);!function e(t){if(t){var i=t.getClientRect();n.top+=i.top,n.left+=i.left,"x"in n&&"y"in n&&(n.x+=i.x,n.y+=i.y),e(t.getWindow().getFrame())}}(e.getFrame());var i=CKEDITOR.document.getWindow().getScrollPosition();return n.top+=i.y,n.left+=i.x,"x"in n&&"y"in n&&(n.y+=i.y,n.x+=i.x),n.right=n.left+n.width,n.bottom=n.top+n.height,n}},e.prototype={reset:function(){this._lastOutput=0,this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer),this._scheduledTimer=0}},t.prototype=CKEDITOR.tools.prototypedCopy(e.prototype),t.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()},t.prototype._call=function(){this._output.apply(this._context,this._args)},CKEDITOR.tools.buffers={},CKEDITOR.tools.buffers.event=e,CKEDITOR.tools.buffers.throttle=t,CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(e){e=e||{},this.width=e.width,this.style=e.style,this.color=e.color,this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,"black"]]},normalize:function(){for(var e in this._.normalizeMap){var t=this[e];t&&(this[e]=CKEDITOR.tools.array.reduce(this._.normalizeMap[e],(function(e,t){return e.replace(t[0],t[1])}),t))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],(function(e){return!!e})).join(" ")}},statics:{fromCssRule:function(e){var t={},n=e.split(/\s+/g);return(e=CKEDITOR.tools.style.parse._findColor(e)).length&&(t.color=e[0]),CKEDITOR.tools.array.forEach(n,(function(e){t.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,e)?!t.width&&CKEDITOR.tools.style.parse._widthRegExp.test(e)&&(t.width=e):t.style=e})),new CKEDITOR.tools.style.border(t)},splitCssValues:function(e,t){t=t||{};var n=CKEDITOR.tools.array.reduce(["width","style","color"],(function(n,i){var o=e["border-"+i]||t[i];return n[i]=o?CKEDITOR.tools.style.parse.sideShorthand(o):null,n}),{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],(function(t,i){var o,a={};for(o in n){var r=e["border-"+i+"-"+o];a[o]=r||n[o]&&n[o][i]}return t["border-"+i]=new CKEDITOR.tools.style.border(a),t}),{})}}}),CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf,CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray,CKEDITOR.MOUSE_BUTTON_LEFT=0,CKEDITOR.MOUSE_BUTTON_MIDDLE=1,CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),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++)for(var 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,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},a={command:1,link:1,meta:1,noscript:1,script:1,style:1},r={},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:r,article:i,aside:i,audio:e({source:1,track:1},i),b:n,base:r,bdi:n,bdo:n,blockquote:i,body:i,br:r,button:t(n,{a:1,button:1}),canvas:n,caption:i,cite:n,code:n,col:r,colgroup:{col:1},command:r,datalist:e({option:1},n),dd:i,del:n,details:e({summary:1},i),dfn:n,div:i,dl:{dt:1,dd:1},dt:i,em:n,embed:r,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},a),header:i,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:r,html:e({head:1,body:1},i,a),i:n,iframe:s,img:r,input:r,ins:n,kbd:n,keygen:r,label:n,legend:n,li:i,link:r,main:i,map:i,mark:n,menu:e({li:1},i),meta:r,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:r,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:i,select:{optgroup:1,option:1},small:n,source:r,span:n,strong:n,style:s,sub:n,summary:e({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},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:r,u:n,ul:{li:1},var:n,video:e({source:1,track:1},i),wbr:r,acronym:n,applet:e({param:1},i),basefont:r,big:n,center:i,dialog:r,dir:{li:1},font:n,isindex:r,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,main: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,main: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(){try{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]}}catch(e){if(!CKEDITOR.env.edge||-2146828218!==e.number)throw e}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),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.getUniqueId();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);return function n(i){if(i["data-cke-expando"]&&(i["data-cke-expando"]=!1),(i.nodeType==CKEDITOR.NODE_ELEMENT||i.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(t||i.nodeType!=CKEDITOR.NODE_ELEMENT||i.removeAttribute("id",!1),e)){i=i.childNodes;for(var o=0;o<i.length;o++)n(i[o])}}(n),n=new CKEDITOR.dom.node(n),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&function t(n){if(n.type==CKEDITOR.NODE_ELEMENT||n.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(n.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var i=n.getName();":"==i[0]&&n.renameNode(i.substring(1))}if(e)for(i=0;i<n.getChildCount();i++)t(n.getChild(i))}}(n),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.getParent();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){function t(e,n){var i=n?e.getNext():e.getPrevious();return i&&i.type==CKEDITOR.NODE_TEXT?i.isEmpty()?t(i,n):i:null}var n,i=this,o=-1;if(!this.getParent()||e&&i.type==CKEDITOR.NODE_TEXT&&i.isEmpty()&&!t(i)&&!t(i,!0))return-1;do{e&&!i.equals(this)&&i.type==CKEDITOR.NODE_TEXT&&(n||i.isEmpty())||(o++,n=i.type==CKEDITOR.NODE_TEXT)}while(i=i.getPrevious());return o},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 0>t.sourceIndex||0>n.sourceIndex?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;i++)if(t[i]!=e[i])return t[i]<e[i]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;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,o=this.$;for(t||(o=o.parentNode),"function"==typeof e?(i=!0,n=e):(i=!1,n=function(t){return t="string"==typeof t.nodeName?t.nodeName.toLowerCase():"","string"==typeof e?t==e:t in e});o;){if(n(i?new CKEDITOR.dom.node(o):o))return new CKEDITOR.dom.node(o);try{o=o.parentNode}catch(e){o=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(e){var t=this;if(this.type!=CKEDITOR.NODE_ELEMENT&&(t=this.getParent()),CKEDITOR.env.edge&&t&&t.is("textarea","input")&&(e=!0),!e&&t&&void 0!==t.$.isContentEditable)return!(t.$.isContentEditable||t.data("cke-editable"));for(;t;){if(t.data("cke-editable"))return!1;if(t.hasAttribute("contenteditable"))return"false"==t.getAttribute("contenteditable");t=t.getParent()}return!0}}),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(){var e;try{e=this.$.activeElement}catch(e){return null}return new CKEDITOR.dom.element(e)},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 a=-1,r=0;r<n.childNodes.length;r++){var s=n.childNodes[r];if((!0!==t||3!=s.nodeType||!s.previousSibling||3!=s.previousSibling.nodeType)&&++a==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&&8>=document.documentMode||!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 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,(function(e){return new CKEDITOR.dom.node(e)}))}},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"),a=t.getCustomData("list_marker_names")||t.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");return e[o]=t,a[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"),a=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[a])},function(){function e(e,t){return-1<(" "+e+" ").replace(a," ").indexOf(" "+t+" ")}function t(e){var t=!0;return e.$.id||(e.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),t=!1),function(){t||e.removeAttribute("id")}}function n(e,t){var n=CKEDITOR.tools.escapeCss(e.$.id);return"#"+n+" "+t.split(/,\s*/).join(", #"+n+" ")}function i(e){for(var t=0,n=0,i=r[e].length;n<i;n++)t+=parseFloat(this.getComputedStyle(r[e][n])||0,10)||0;return t}var o=void 0!==(o=document.createElement("_").classList)&&null!==String(o.add).match(/\[Native code\]/gi),a=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:o?function(e){return this.$.classList.add(e),this}:function(t){var n=this.$.className;return n&&(e(n,t)||(n+=" "+t)),this.$.className=n||t,this},removeClass:o?function(e){var t=this.$;return t.classList.remove(e),t.className||t.removeAttribute("class"),this}:function(t){var n=this.getAttribute("class");return n&&e(n,t)&&((n=n.replace(new RegExp("(?:^|\\s+)"+t+"(?=\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",n):this.removeAttribute("class")),this},hasClass:function(t){return e(this.$.className,t)},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&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=e:this.append(new CKEDITOR.dom.text(e))},appendBogus:function(e){if(e||CKEDITOR.env.needsBrFiller){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=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&e.setAttribute("type","_moz"),this.append(e))}},breakParent:function(e,t){var n=new CKEDITOR.dom.range(this.getDocument());n.setStartAfter(this),n.setEndAfter(e);var i,o=n.extractContents(!1,t||!1);if(n.insertNode(this.remove()),CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(n=new CKEDITOR.dom.element("div");i=o.getFirst();)i.$.style.backgroundColor&&(i.$.style.backgroundColor=i.$.style.backgroundColor),n.append(i);n.insertAfter(this),n.remove(!0)}else o.insertAfterNode(this)},contains:document.compareDocumentPosition?function(e){return!!(16&this.$.compareDocumentPosition(e.$))}:function(e){var t=this.$;return e.type!=CKEDITOR.NODE_ELEMENT?t.contains(e.getParent().$):t!=e.$&&t.contains(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(e){var t=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());return!t.width&&(t.width=t.right-t.left),!t.height&&(t.height=t.bottom-t.top),e?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),t):t},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?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(){var e=document.createElement("p");return e.innerHTML="x",e=e.textContent,function(t){this.$[e?"textContent":"innerText"]=t}}(),getAttribute:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?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)},getAttributes:function(e){var t,n={},i=this.$.attributes;for(e=CKEDITOR.tools.isArray(e)?e:[],t=0;t<i.length;t++)-1===CKEDITOR.tools.indexOf(e,i[t].name)&&(n[i[t].name]=i[t].value);return n},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getClientSize:function(){return{width:this.$.clientWidth,height:this.$.clientHeight}},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(e){var t=this.getWindow().$.getComputedStyle(this.$,null);return t?t.getPropertyValue(e):""}:function(e){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(e)]},getDtd:function(){var e=CKEDITOR.dtd[this.getName()];return this.getDtd=function(){return e},e},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var e=this.$.tabIndex;return 0!==e||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?e:-1},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&&8>=document.documentMode){var t=this.$.scopeName;"HTML"!=t&&(e=t.toLowerCase()+":"+e)}return this.getName=function(){return e},this.getName()},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&&9>CKEDITOR.env.version&&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&&(!(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.quirks)?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 0<t&&(2<t||!n[e[0].nodeName]||2==t&&!n[e[1].nodeName])},hasAttribute:function(){function e(e){var t=this.$.attributes.getNamedItem(e);if("input"==this.getName())switch(e){case"class":return 0<this.$.className.length;case"checked":return!!this.$.checked;case"value":return"checkbox"==(e=this.getAttribute("type"))||"radio"==e?"on"!=this.$.value:!!this.$.value}return!!t&&t.specified}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(t){return"name"==t?!!this.$.name:e.call(this,t)}:e:function(e){return!!this.$.attributes.getNamedItem(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.quirks)?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.quirks)?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||this.getAttributes())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 a=0;a<t.length;a++)i.push([e,n[o],t[a]].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&&9>CKEDITOR.env.version?(e=Math.round(100*e),this.setStyle("filter",100<=e?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+e+")")):this.setStyle("opacity",e)},unselectable:function(){if(this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none")),CKEDITOR.env.ie){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(),a="BackCompat"==i.$.compatMode;if(!document.documentElement.getBoundingClientRect||CKEDITOR.env.ie&&8===CKEDITOR.env.version)for(l=this,c=null;l&&"body"!=l.getName()&&"html"!=l.getName();){for(t+=l.$.offsetLeft-l.$.scrollLeft,n+=l.$.offsetTop-l.$.scrollTop,l.equals(this)||(t+=l.$.clientLeft||0,n+=l.$.clientTop||0);c&&!c.equals(l);)t-=c.$.scrollLeft,n-=c.$.scrollTop,c=c.getParent();c=l,l=(r=l.$.offsetParent)?new CKEDITOR.dom.element(r):null}else{var r=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=a&&i||!a&&d),d&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(t=o.$.scrollLeft||s.scrollLeft,n=o.$.scrollTop||s.scrollTop):(t=(n=a?o.$:s).scrollLeft,n=n.scrollTop),t=r.left+t-c,n=r.top+n-l)}return e&&(r=this.getWindow(),l=e.getWindow(),!r.equals(l)&&r.$.frameElement&&(t+=(e=new CKEDITOR.dom.element(r.$.frameElement).getDocumentPosition(e)).x,n+=e.y)),document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||a||(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,a,r;function s(t,n){/body|html/.test(e.getName())?e.getWindow().$.scrollBy(t,n):(e.$.scrollLeft+=t,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+=i.x,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"==(a=e.getDocument()).$.compatMode;e instanceof CKEDITOR.dom.window&&(e=d?a.getBody():a.getDocumentElement()),CKEDITOR.env.webkit&&(a=this.getEditor(!1))&&(a._.previousScrollTop=null),o=l(this,a=e.getWindow());var u=l(e,a),h=this.$.offsetHeight;i=this.$.offsetWidth;var f=e.$.clientHeight,g=e.$.clientWidth;a=o.x-c(this,"left")-u.x||0,r=o.y-c(this,"top")-u.y||0,i=o.x+i+c(this,"right")-(u.x+g)||0,o=o.y+h+c(this,"bottom")-(u.y+f)||0,(0>r||0<o)&&s(0,!0===t?r:!1===t?o:0>r?r:o),n&&(0>a||0<i)&&s(0>a?a: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){var n=this.$.attributes;t=t||{};for(var i=0;i<n.length;i++){var o,a=n[i],r=a.nodeName.toLowerCase();r in t||("checked"==r&&(o=this.getAttribute(r))?e.setAttribute(r,o):CKEDITOR.env.ie&&!this.hasAttribute(r)||(null===(o=this.getAttribute(r))&&(o=a.nodeValue),e.setAttribute(r,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(!0)&&this.$.parentNode.replaceChild(e.$,this.$),e.$["data-cke-expando"]=this.$["data-cke-expando"],this.$=e.$,delete this.getName}},getChild:function(){function e(e,t){var n=e.childNodes;if(0<=t&&t<n.length)return n[t]}return function(t){var n=this.$;if(t.slice)for(t=t.slice();0<t.length&&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(){function e(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_enable_context_menu")}this.on("contextmenu",(function(t){t.data.getTarget().getAscendant(e,!0)||t.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(e){var t,n,i,o=CKEDITOR.instances;for(t in e=e||void 0===e,o)if((n=o[t]).element.equals(this)&&n.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!e&&(i=n.editable())&&(i.equals(this)||i.contains(this)))return n;return null},find:function(e){var i=t(this);return e=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(n(this,e))),i(),e},findOne:function(e){var i=t(this);return e=this.$.querySelector(n(this,e)),i(),e?new CKEDITOR.dom.element(e):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)}},fireEventHandler:function(e,t){var n="on"+e,i=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var o,a=i.ownerDocument.createEventObject();for(o in t)a[o]=t[o];i.fireEvent(n,a)}else i[i[e]?e:n](t)},isDetached:function(){var e=this.getDocument(),t=e.getDocumentElement();return!t.equals(this)&&!t.contains(this)||(!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks)&&!e.$.defaultView}});var r={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,n){"number"==typeof t&&(!n||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(t-=i.call(this,e)),this.setStyle(e,t+"px"))},CKEDITOR.dom.element.prototype.getSize=function(e,t){var n=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(e)],this.$["client"+CKEDITOR.tools.capitalize(e)])||0;return t&&(n-=i.call(this,e)),n}}(),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)},getHtml:function(){var e=new CKEDITOR.dom.element("div");return this.clone(1,1).appendTo(e),e.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml: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}),CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.document.prototype,!0,{find:1,findOne: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 a,r=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 f=o.type==CKEDITOR.NODE_ELEMENT?o:o.getParent(),g=o.type==CKEDITOR.NODE_ELEMENT?r?o.getChild(r-1):null:o.getPrevious();this._.guardRTL=function(e,t){return!(t&&f.equals(e)||g&&e.equals(g)||e.type==CKEDITOR.NODE_ELEMENT&&t&&e.equals(n.root))}}var m=e?this._.guardRTL:this._.guardLTR;for(a=l?function(e,t){return!1!==m(e,t)&&l(e,t)}:m,this.current?i=this.current[d](!1,c,a):(e?i.type==CKEDITOR.NODE_ELEMENT&&(i=0<s?i.getChild(s-1):!1===a(i,!0)?null:i.getPreviousSourceNode(!0,c,a)):(i=o).type==CKEDITOR.NODE_ELEMENT&&((i=i.getChild(r))||(i=!1===a(o,!0)?null:o.getNextSourceNode(!0,c,a))),i&&!1===a(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,a)}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,a;return o=i&&i.type!=CKEDITOR.NODE_ELEMENT&&(a=i.getParent())&&n(a),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()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE),!!(e^n)}},CKEDITOR.dom.walker.invisible=function(e){var t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.env.webkit?1:0;return function(i){return t(i)?i=1:(i.type==CKEDITOR.NODE_TEXT&&(i=i.getParent()),i=i.$.offsetWidth<=n),!!(e^i)}},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!a(e)&&!r(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)$/,a=CKEDITOR.dom.walker.whitespaces(),r=CKEDITOR.dom.walker.bookmark(),s=CKEDITOR.dom.walker.temp(),l=function(e){return r(e)||a(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$inline)&&!e.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(e){return function(t){return t=a(t)||r(t)||s(t),!!(e^t)}};var c=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(e){return function(t){for(var n=0,i=t.getChildCount();n<i;++n)if(!c(t.getChild(n)))return!!e;return!e}};var d=CKEDITOR.dom.walker.empty(),u=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(e){var t,n={};for(t in e)CKEDITOR.dtd[t]["#"]&&(n[t]=1);return n}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(e){return function(t){return t=!c(t)&&!!(t.type==CKEDITOR.NODE_TEXT||t.type==CKEDITOR.NODE_ELEMENT&&(t.is(CKEDITOR.dtd.$inline)||t.is("hr")||"false"==t.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&t.is(u)&&d(t))),!!(e^t)}},CKEDITOR.dom.element.prototype.getBogus=function(){var e=this;do{e=e.getPreviousSourceNode()}while(l(e));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(e){e.collapsed=e.startContainer&&e.endContainer&&e.startContainer.equals(e.endContainer)&&e.startOffset==e.endOffset}function t(e,t,n,i,o){function a(e,t,n,i){var a=n?e.getPrevious():e.getNext();return i&&r||(l||i?t.append(e.clone(!0,o),n):(e.remove(),s&&t.append(e,n))),a}e.optimizeBookmark();var r=0===t,s=1==t,l=2==t;t=l||s;var c,d,u,h,f,g,m=e.startContainer,p=e.endContainer,E=e.startOffset,T=e.endOffset;if(l&&p.type==CKEDITOR.NODE_TEXT&&(m.equals(p)||m.type===CKEDITOR.NODE_ELEMENT&&m.getFirst().equals(p)))n.append(e.document.createText(p.substring(E,T)));else{p.type==CKEDITOR.NODE_TEXT?l?g=!0:p=p.split(T):0<p.getChildCount()?T>=p.getChildCount()?(p=p.getChild(T-1),d=!0):p=p.getChild(T):h=d=!0,m.type==CKEDITOR.NODE_TEXT?l?f=!0:m.split(E):0<m.getChildCount()?0===E?(m=m.getChild(E),c=!0):m=m.getChild(E-1):u=c=!0;for(var C,I,O,D=m.getParents(),R=p.getParents(),v=function(){var e,t,n,i=Math.min(D.length,R.length);for(e=0;e<i;e++)if(t=D[e],n=R[e],!t.equals(n))return e;return e-1}(),b=D.length-1,y=R.length-1,_=n,K=-1,k=v;k<=b;k++){for(O=(I=D[k]).getNext(),k!=b||I.equals(R[k])&&b<y?t&&(C=_.append(I.clone(0,o))):c?a(I,_,!1,u):f&&_.append(e.document.createText(I.substring(E)));O;){if(O.equals(R[k])){K=k;break}O=a(O,_)}_=C}for(_=n,k=v;k<=y;k++)if(O=(n=R[k]).getPrevious(),n.equals(D[k]))t&&(_=_.getChild(0));else{if(k!=y||n.equals(D[k])&&y<b?t&&(C=_.append(n.clone(0,o))):d?a(n,_,!1,h):g&&_.append(e.document.createText(n.substring(0,T))),k>K)for(;O;)O=a(O,_,!0);_=C}l||function(){var t=v-1,n=u&&h&&!m.equals(p);t<b-1||t<y-1||n?(n?e.moveToPosition(p,CKEDITOR.POSITION_BEFORE_START):y==t+1&&d?e.moveToPosition(R[t],CKEDITOR.POSITION_BEFORE_END):e.moveToPosition(R[t+1],CKEDITOR.POSITION_BEFORE_START),i&&(t=D[t+1])&&t.type==CKEDITOR.NODE_ELEMENT&&((n=CKEDITOR.dom.element.createFromHtml('<span data-cke-bookmark="1" style="display:none"> </span>',e.document)).insertAfter(t),t.mergeSiblings(!1),e.moveToBookmark({startNode:n}))):e.collapse(!0)}()}}function n(){var e=!1,t=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(!0),i=CKEDITOR.dom.walker.bogus();return function(a){return!(!n(a)&&!t(a))||(i(a)&&!e?e=!0:!(a.type==CKEDITOR.NODE_TEXT&&(a.hasAscendant("pre")||CKEDITOR.tools.trim(a.getText()).length)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(o)))}}function i(e){return function(){var t;return this[e?"getPreviousNode":"getNextNode"]((function(e){return!t&&l(e)&&(t=e),s(e)&&!(a(e)&&e.equals(t))}))}}var 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},a=CKEDITOR.dom.walker.bogus(),r=/^[\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._setStartContainer(this.startContainer),e.startOffset=this.startOffset,e._setEndContainer(this.endContainer),e.endOffset=this.endOffset,e.collapsed=this.collapsed,e},collapse:function(e){e?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset),this.collapsed=!0},cloneContents:function(e){var n=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,2,n,!1,void 0===e||e),n},deleteContents:function(e){this.collapsed||t(this,0,null,e)},extractContents:function(e,n){var i=new CKEDITOR.dom.documentFragment(this.document);return this.collapsed||t(this,1,i,e,void 0===n||n),i},equals:function(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset&&this.startContainer.equals(e.startContainer)&&this.endContainer.equals(e.endContainer)},createBookmark:function(e){function t(e){return e.getAscendant((function(e){var t;return(t=e.data&&e.data("cke-temp"))&&(t=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],e.getAttribute("id"))),t}),!0)}var n,i,o,a,r=this.startContainer,s=this.endContainer,l=this.collapsed;return(n=this.document.createElement("span")).data("cke-bookmark",1),n.setStyle("display","none"),n.setHtml(" "),e&&(o="cke_bm_"+CKEDITOR.tools.getNextNumber(),n.setAttribute("id",o+(l?"C":"S"))),l||((i=n.clone()).setHtml(" "),e&&i.setAttribute("id",o+"E"),a=this.clone(),t(s)&&(s=t(s),a.moveToPosition(s,CKEDITOR.POSITION_AFTER_END)),a.collapse(),a.insertNode(i)),a=this.clone(),t(r)&&(s=t(r),a.moveToPosition(s,CKEDITOR.POSITION_BEFORE_START)),a.collapse(!0),a.insertNode(n),i?(this.setStartAfter(n),this.setEndBefore(i)):this.moveToPosition(n,CKEDITOR.POSITION_AFTER_END),{startNode:e?o+(l?"C":"S"):n,endNode:e?o+"E":i,serializable:e,collapsed:l}},createBookmark2:function(){function e(e){var t,i=e.container,o=e.offset,a=o;if((t=(t=i).type!=CKEDITOR.NODE_ELEMENT||0===a||a==t.getChildCount()?0:t.getChild(a-1).type==CKEDITOR.NODE_TEXT&&t.getChild(a).type==CKEDITOR.NODE_TEXT)&&(o=(i=i.getChild(o-1)).getLength()),i.type==CKEDITOR.NODE_ELEMENT&&0<o){e:{for(t=i;o--;)if(0<=(a=t.getChild(o).getIndex(!0))){o=a;break e}o=-1}o+=1}if(i.type==CKEDITOR.NODE_TEXT){for(t=i,a=0;(t=t.getPrevious())&&t.type==CKEDITOR.NODE_TEXT;)a+=t.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;t=a,i.isEmpty()?(a=i.getPrevious(n),t?(o=t,i=a?a.getNext():i.getParent().getFirst()):(i=i.getParent(),o=a?a.getIndex(!0)+1:0)):o+=t}e.container=i,e.offset=o}function t(e,t){var n=t.getCustomData("cke-fillingChar");if(n){var i=e.container;n.equals(i)&&(e.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=e.offset&&(e.offset=i.getIndex(),e.container=i.getParent()))}}var n=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(n){var i=this.collapsed,o={container:this.startContainer,offset:this.startOffset},a={container:this.endContainer,offset:this.endOffset};return n&&(e(o),t(o,this.root),i||(e(a),t(a,this.root))),{start:o.container.getAddress(n),end:i?null:a.container.getAddress(n),startOffset:o.offset,endOffset:a.offset,normalized:n,collapsed:i,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(1>e)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(1>e)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;n=n.equals(i)?e&&n.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?n.getChild(this.startOffset):n:n.getCommonAncestor(i);return 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 a=n.split(i);i=n.getIndex()+1,n=n.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(a,this.endOffset-this.startOffset):n.equals(this.endContainer)&&(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}var i=new RegExp(/[^\s\ufeff]/);switch(e){case CKEDITOR.ENLARGE_INLINE:var o=1;case CKEDITOR.ENLARGE_ELEMENT:var a=function(e,t){var n,o;for((n=new CKEDITOR.dom.range(g)).setStart(e,t),n.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),(n=new CKEDITOR.dom.walker(n)).guard=function(e){return!(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())};o=n.next();){if(o.type!=CKEDITOR.NODE_TEXT)return!1;if(h=o!=e?o.getText():o.substring(t),i.test(h))return!1}return!0};if(this.collapsed)break;var r,s,l,c,d,u,h,f=this.getCommonAncestor(),g=this.root,m=!1;u=this.startContainer;var p=this.startOffset;for(u.type==CKEDITOR.NODE_TEXT?(p&&(m=!!(u=!CKEDITOR.tools.trim(u.substring(0,p)).length&&u)),u&&((c=u.getPrevious())||(l=u.getParent()))):(p&&(c=u.getChild(p-1)||u.getLast()),c||(l=u)),l=n(l);l||c;){if(l&&!c){if(!d&&l.equals(f)&&(d=!0),o?l.isBlockBoundary():!g.contains(l))break;m&&"inline"==l.getComputedStyle("display")||(m=!1,d?r=l:this.setStartBefore(l)),c=l.getPrevious()}for(;c;)if(u=!1,c.type==CKEDITOR.NODE_COMMENT)c=c.getPrevious();else{if(c.type==CKEDITOR.NODE_TEXT)h=c.getText(),i.test(h)&&(c=null),u=/[\s\ufeff]$/.test(h);else if((c.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||t&&c.is("br"))&&!c.data("cke-bookmark"))if(m&&CKEDITOR.dtd.$removeEmpty[c.getName()]){if(h=c.getText(),i.test(h))c=null;else{p=c.$.getElementsByTagName("*");for(var E,T=0;E=p[T++];)if(!CKEDITOR.dtd.$removeEmpty[E.nodeName.toLowerCase()]){c=null;break}}c&&(u=!!h.length)}else c=null;if(u&&(m?d?r=l:l&&this.setStartBefore(l):m=!0),c){if(u=c.getPrevious(),!l&&!u){l=c,c=null;break}c=u}else l=null}l&&(l=n(l.getParent()))}for(u=this.endContainer,p=this.endOffset,l=c=null,d=m=!1,u.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(u.substring(p)).length?m=!0:(m=!u.getLength(),p==u.getLength()?(c=u.getNext())||(l=u.getParent()):a(u,p)&&(l=u.getParent())):(c=u.getChild(p))||(l=u);l||c;){if(l&&!c){if(!d&&l.equals(f)&&(d=!0),o?l.isBlockBoundary():!g.contains(l))break;m&&"inline"==l.getComputedStyle("display")||(m=!1,d?s=l:l&&this.setEndAfter(l)),c=l.getNext()}for(;c;){if(u=!1,c.type==CKEDITOR.NODE_TEXT)h=c.getText(),a(c,0)||(c=null),u=/^[\s\ufeff]/.test(h);else if(c.type==CKEDITOR.NODE_ELEMENT){if((0<c.$.offsetWidth||t&&c.is("br"))&&!c.data("cke-bookmark"))if(m&&CKEDITOR.dtd.$removeEmpty[c.getName()]){if(h=c.getText(),i.test(h))c=null;else for(p=c.$.getElementsByTagName("*"),T=0;E=p[T++];)if(!CKEDITOR.dtd.$removeEmpty[E.nodeName.toLowerCase()]){c=null;break}c&&(u=!!h.length)}else c=null}else u=1;if(u&&m&&(d?s=l:this.setEndAfter(l)),c){if(u=c.getNext(),!l&&!u){l=c,c=null;break}c=u}else l=null}l&&(l=n(l.getParent()))}r&&s&&(f=r.contains(s)?s:r,this.setStartBefore(f),this.setEndAfter(f));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=new CKEDITOR.dom.range(this.root),g=this.root,l.setStartAt(g,CKEDITOR.POSITION_AFTER_START),l.setEnd(this.startContainer,this.startOffset),l=new CKEDITOR.dom.walker(l);var C,I,O=CKEDITOR.dom.walker.blockBoundary(e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),D=null,R=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable"))if(D){if(D.equals(e))return void(D=null)}else D=e;else if(D)return;var t=O(e);return t||(C=e),t};o=function(e){var t=R(e);return!t&&e.is&&e.is("br")&&(I=e),t};if(l.guard=R,l=l.lastBackward(),C=C||g,this.setStartAt(C,!C.is("br")&&(!l&&this.checkStartOfBlock()||l&&C.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END),e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone(),l=new CKEDITOR.dom.walker(l);var v=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark();if(l.evaluator=function(e){return!v(e)&&!b(e)},(l=l.previous())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}(l=this.clone()).collapse(),l.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),(l=new CKEDITOR.dom.walker(l)).guard=e==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?o:R,C=D=I=null,l=l.lastForward(),C=C||g,this.setEndAt(C,!l&&this.checkEndOfBlock()||l&&C.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START),I&&this.setEndAfter(I)}},shrink:function(e,t,n){var i="boolean"==typeof n?n:!n||"boolean"!=typeof n.shrinkOnBlockBoundary||n.shrinkOnBlockBoundary,o=n&&n.skipBogus;if(!this.collapsed){e=e||CKEDITOR.SHRINK_TEXT;var a=this.clone(),r=this.startContainer,s=this.endContainer,l=this.startOffset,c=this.endOffset,d=n=1;r&&r.type==CKEDITOR.NODE_TEXT&&(l?l>=r.getLength()?a.setStartAfter(r):(a.setStartBefore(r),n=0):a.setStartBefore(r)),s&&s.type==CKEDITOR.NODE_TEXT&&(c?c>=s.getLength()?a.setEndAfter(s):(a.setEndAfter(s),d=0):a.setEndBefore(s));a=new CKEDITOR.dom.walker(a);var u,h=CKEDITOR.dom.walker.bookmark(),f=CKEDITOR.dom.walker.bogus();return a.evaluator=function(t){return t.type==(e==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)},a.guard=function(t,n){return!!(o&&f(t)||h(t))||!(e==CKEDITOR.SHRINK_ELEMENT&&t.type==CKEDITOR.NODE_TEXT||n&&t.equals(u)||!1===i&&t.type==CKEDITOR.NODE_ELEMENT&&t.isBlockBoundary()||t.type==CKEDITOR.NODE_ELEMENT&&t.hasAttribute("contenteditable"))&&(n||t.type!=CKEDITOR.NODE_ELEMENT||(u=t),!0)},n&&(r=a[e==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(r,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START),d&&(a.reset(),(a=a[e==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(a,t?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)),!(!n&&!d)}},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(t,n){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(n=t.getIndex(),t=t.getParent()),this._setStartContainer(t),this.startOffset=n,this.endContainer||(this._setEndContainer(t),this.endOffset=n),e(this)},setEnd:function(t,n){t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[t.getName()]&&(n=t.getIndex()+1,t=t.getParent()),this._setEndContainer(t),this.endOffset=n,this.startContainer||(this._setStartContainer(t),this.startOffset=n),e(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(t,n){switch(n){case CKEDITOR.POSITION_AFTER_START:this.setStart(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setStart(t,t.getLength()):this.setStart(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(t)}e(this)},setEndAt:function(t,n){switch(n){case CKEDITOR.POSITION_AFTER_START:this.setEnd(t,0);break;case CKEDITOR.POSITION_BEFORE_END:t.type==CKEDITOR.NODE_TEXT?this.setEnd(t,t.getLength()):this.setEnd(t,t.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(t);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(t)}e(this)},fixBlock:function(e,t){var n=this.createBookmark(),i=this.document.createElement(t);this.collapse(e),this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),this.extractContents().appendTo(i),i.trim(),this.insertNode(i);var o=i.getBogus();return o&&o.remove(),i.appendBogus(),this.moveToBookmark(n),i},splitBlock:function(e,t){var n=new CKEDITOR.dom.elementPath(this.startContainer,this.root),i=new CKEDITOR.dom.elementPath(this.endContainer,this.root),o=n.block,a=i.block,r=null;return n.blockLimit.equals(i.blockLimit)?("br"!=e&&(o||(o=this.fixBlock(!0,e),a=new CKEDITOR.dom.elementPath(this.endContainer,this.root).block),a||(a=this.fixBlock(!1,e))),n=o&&this.checkStartOfBlock(),i=a&&this.checkEndOfBlock(),this.deleteContents(),o&&o.equals(a)&&(i?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),a=null):n?(r=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),o=null):(a=this.splitElement(o,t||!1),o.is("ul","ol")||o.appendBogus())),{previousBlock:o,nextBlock:a,wasStartOfBlock:n,wasEndOfBlock:i,elementPath:r}):null},splitElement:function(e,t){if(!this.collapsed)return null;this.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);var n=this.extractContents(!1,t||!1),i=e.clone(!1,t||!1);return n.appendTo(i),i.insertAfter(e),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),i},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"](),a=o.block||o.blockLimit;a&&!a.equals(o.root)&&!a.getFirst(e(a));)n=a.getParent(),this[t?"setEndAt":"setStartAt"](a,CKEDITOR.POSITION_AFTER_END),a.remove(1),a=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&&a(i)||i.type==CKEDITOR.NODE_ELEMENT&&i.is(CKEDITOR.dtd.$removeEmpty))}}(n),i[n?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var e=this.startContainer,t=this.startOffset;return CKEDITOR.env.ie&&t&&e.type==CKEDITOR.NODE_TEXT&&(e=CKEDITOR.tools.ltrim(e.substring(0,t)),r.test(e)&&this.trim(0,1)),this.trim(),e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),(t=this.clone()).collapse(!0),t.setStartAt(e.block||e.blockLimit,CKEDITOR.POSITION_AFTER_START),(e=new CKEDITOR.dom.walker(t)).evaluator=n(),e.checkBackward()},checkEndOfBlock:function(){var e=this.endContainer,t=this.endOffset;return CKEDITOR.env.ie&&e.type==CKEDITOR.NODE_TEXT&&(e=CKEDITOR.tools.rtrim(e.substring(t)),r.test(e)&&this.trim(1,0)),this.trim(),e=new CKEDITOR.dom.elementPath(this.endContainer,this.root),(t=this.clone()).collapse(!1),t.setEndAt(e.block||e.blockLimit,CKEDITOR.POSITION_BEFORE_END),(e=new CKEDITOR.dom.walker(t)).evaluator=n(),e.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()&&r.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,a=void 0;i.type==CKEDITOR.NODE_ELEMENT&&i.isEditable(!1)&&(a=i[t?"getLast":"getFirst"](l)),o||a||(a=i[t?"getPrevious":"getNext"](l)),e=a}return!!n},moveToClosestEditablePosition:function(e,t){var n,i,o,a=0,r=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];return e?(n=new CKEDITOR.dom.range(this.root)).moveToPosition(e,r[t?0:1]):n=this.clone(),e&&!e.is(CKEDITOR.dtd.$block)?a=1:(i=n[t?"getNextEditableNode":"getPreviousEditableNode"]())&&(a=1,(o=i.type==CKEDITOR.NODE_ELEMENT)&&i.is(CKEDITOR.dtd.$block)&&"false"==i.getAttribute("contenteditable")?(n.setStartAt(i,CKEDITOR.POSITION_BEFORE_START),n.setEndAt(i,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&o&&i.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(n.setEnd(i,0),n.collapse()):n.moveToPosition(i,r[t?1:0])),a&&this.moveToRange(n),!!a},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:i(),getPreviousEditableNode:i(1),_getTableElement:function(e){e=e||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var t=this.getTouchedStartNode(),n=this.getTouchedEndNode(),i=t.getAscendant("table",!0);n=n.getAscendant("table",!0);return i&&!this.root.contains(i)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(e,!0):i&&n&&(i.equals(n)||i.contains(n)||n.contains(i))?t.getAscendant(e,!0):null},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()},getClientRects:function(){function e(e,t,i){var o;return t.collapsed?i.startContainer instanceof CKEDITOR.dom.element?(e=i.checkStartOfBlock(),o=new CKEDITOR.dom.text(""),e?i.startContainer.append(o,!0):0===i.startOffset?o.insertBefore(i.startContainer.getFirst()):(i=i.startContainer.getChildren().getItem(i.startOffset-1),o.insertAfter(i)),t.setStart(o.$,0),t.setEnd(o.$,0),e=t.getClientRects(),o.remove()):i.startContainer instanceof CKEDITOR.dom.text&&(""===i.startContainer.getText()?(i.startContainer.setText(""),e=t.getClientRects(),i.startContainer.setText("")):e=[n(i.createBookmark())]):e=[n(i.createBookmark())],e}function t(e,t,n){return e=CKEDITOR.tools.extend({},e),t&&(e=CKEDITOR.tools.getAbsoluteRectPosition(n.document.getWindow(),e)),!e.width&&(e.width=e.right-e.left),!e.height&&(e.height=e.bottom-e.top),e}function n(e){var t,n=e.startNode;return e=e.endNode,n.setText(""),n.removeStyle("display"),e?(e.setText(""),e.removeStyle("display"),t=[n.getClientRect(),e.getClientRect()],e.remove()):t=[n.getClientRect(),n.getClientRect()],n.remove(),{right:Math.max(t[0].right,t[1].right),bottom:Math.max(t[0].bottom,t[1].bottom),left:Math.min(t[0].left,t[1].left),top:Math.min(t[0].top,t[1].top),width:Math.abs(t[0].left-t[1].left),height:Math.max(t[0].bottom,t[1].bottom)-Math.min(t[0].top,t[1].top)}}return void 0!==this.document.getSelection?function(n){var i,o=this.root.getDocument().$.createRange();return o.setStart(this.startContainer.$,this.startOffset),o.setEnd(this.endContainer.$,this.endOffset),(i=function(e,t){var n,i,o,a=CKEDITOR.tools.array.map(e,(function(e){return e})),r=new CKEDITOR.dom.range(t.root);if(t.startContainer instanceof CKEDITOR.dom.element&&(i=0===t.startOffset&&t.startContainer.hasAttribute("data-widget")),t.endContainer instanceof CKEDITOR.dom.element&&(o=(o=t.endOffset===(t.endContainer.getChildCount?t.endContainer.getChildCount():t.endContainer.length))&&t.endContainer.hasAttribute("data-widget")),i&&r.setStart(t.startContainer.getParent(),t.startContainer.getIndex()),o&&r.setEnd(t.endContainer.getParent(),t.endContainer.getIndex()+1),(i||o)&&(t=r),r=t.cloneContents().find("[data-cke-widget-id]").toArray(),r=CKEDITOR.tools.array.map(r,(function(e){var n=t.root.editor;return e=e.getAttribute("data-cke-widget-id"),n.widgets.instances[e].element})))return r=CKEDITOR.tools.array.map(r,(function(e){var t;return t=e.getParent().hasClass("cke_widget_wrapper")?e.getParent():e,(n=this.root.getDocument().$.createRange()).setStart(t.getParent().$,t.getIndex()),n.setEnd(t.getParent().$,t.getIndex()+1),(t=n.getClientRects()).widgetRect=e.getClientRect(),t}),t),CKEDITOR.tools.array.forEach(r,(function(e){var t;!function n(i){CKEDITOR.tools.array.forEach(a,(function(n,o){var r=CKEDITOR.tools.objectCompare(e[i],n);r||(r=CKEDITOR.tools.objectCompare(e.widgetRect,n)),r&&(Array.prototype.splice.call(a,o,e.length-i,e.widgetRect),t=!0)})),t||(i<a.length-1?n(i+1):a.push(e.widgetRect))}(0)})),a}(i=o.getClientRects(),this)).length||(i=e(i,o,this)),CKEDITOR.tools.array.map(i,(function(e){return t(e,n,this)}),this)}:function(e){return[t(n(this.createBookmark()),e,this)]}}(),_setStartContainer:function(e){this.startContainer=e},_setEndContainer:function(e){this.endContainer=e},_find:function(e,t){var n,i,o,a,r=this.getCommonAncestor(),s=this.getBoundaryNodes(),l=[];if(r&&r.find)for(i=r.find(e),n=0;n<i.count();n++)r=i.getItem(n),(t||!r.isReadOnly())&&(o=r.getPosition(s.startNode)&CKEDITOR.POSITION_FOLLOWING||s.startNode.equals(r),a=r.getPosition(s.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||s.endNode.equals(r),o&&a&&l.push(r));return l}},CKEDITOR.dom.range.mergeRanges=function(e){return CKEDITOR.tools.array.reduce(e,(function(e,t){var n=e[e.length-1],i=!1;if((t=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT),n){var o=new CKEDITOR.dom.range(t.root),a=(i=new CKEDITOR.dom.walker(o),CKEDITOR.dom.walker.whitespaces());for(o.setStart(n.endContainer,n.endOffset),o.setEnd(t.startContainer,t.startOffset),o=i.next();a(o)||t.endContainer.equals(o);)o=i.next();i=!o}return i?n.setEnd(t.endContainer,t.endOffset):e.push(t),e}),[])}}(),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){1>arguments.length||(this.range=e,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function t(e,n,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 a;a=o.shift();)if(a.getDtd().p){o={element:a,remaining:o};break e}o=null}return o?(a=CKEDITOR.filter.instances[o.element.data("cke-filter")])&&!a.check(n)?t(e,n,i,o.remaining):((n=new CKEDITOR.dom.range(o.element)).selectNodeContents(o.element),(n=n.createIterator()).enlargeBr=e.enlargeBr,n.enforceRealBlocks=e.enforceRealBlocks,n.activeFilter=n.filter=a,e._.nestedEditable={element:o.element,container:i,remaining:o.remaining,iterator:n},1):0}function n(e,t,n){return!!t&&((e=e.clone()).collapse(!n),e.checkBoundaryOfElement(t,n?CKEDITOR.START:CKEDITOR.END))}var i=/^[\r\n\t ]+$/,o=CKEDITOR.dom.walker.bookmark(!1,!0),a=CKEDITOR.dom.walker.whitespaces(!0),r=function(e){return o(e)&&a(e)},s={dd:1,dt:1,li:1};e.prototype={getNextParagraph:function(e){var a,l,c,d,u;if(e=e||"p",this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;if(this.activeFilter=this.filter,t(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 h=this.range.clone();l=h.startPath();var f=h.endPath(),g=!h.collapsed&&n(h,l.block),m=!h.collapsed&&n(h,f.block,1);h.shrink(CKEDITOR.SHRINK_ELEMENT,!0),g&&h.setStartAt(l.block,CKEDITOR.POSITION_BEFORE_END),m&&h.setEndAt(f.block,CKEDITOR.POSITION_AFTER_START),l=h.endContainer.hasAscendant("pre",!0)||h.startContainer.hasAscendant("pre",!0),h.enlarge(this.forceBrBreak&&!l||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),h.collapsed||(l=new CKEDITOR.dom.walker(h.clone()),f=CKEDITOR.dom.walker.bookmark(!0,!0),l.evaluator=f,this._.nextNode=l.next(),(l=new CKEDITOR.dom.walker(h.clone())).evaluator=f,l=l.previous(),this._.lastNode=l.getNextSourceNode(!0,null,h.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&((f=this.range.clone()).moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),f.checkEndOfBlock()&&(f=new CKEDITOR.dom.elementPath(f.endContainer,f.root),this._.lastNode=(f.block||f.blockLimit).getNextSourceNode(!0))),this._.lastNode&&h.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=h.document.createText(""),this._.lastNode.insertAfter(l)),h=null),this._.started=1,l=h}for(f=this._.nextNode,h=this._.lastNode,this._.nextNode=null;f;){g=0,m=f.hasAscendant("pre");var p=f.type!=CKEDITOR.NODE_ELEMENT,E=0;if(p)f.type==CKEDITOR.NODE_TEXT&&i.test(f.getText())&&(p=0);else{var T=f.getName();if(CKEDITOR.dtd.$block[T]&&"false"==f.getAttribute("contenteditable")){t(this,e,a=f);break}if(f.isBlockBoundary(this.forceBrBreak&&!m&&{br:1})){if("br"==T)p=1;else if(!l&&!f.getChildCount()&&"hr"!=T){a=f,c=f.equals(h);break}l&&(l.setEndAt(f,CKEDITOR.POSITION_BEFORE_START),"br"!=T&&(this._.nextNode=f)),g=1}else{if(f.getFirst()){l||(l=this.range.clone()).setStartAt(f,CKEDITOR.POSITION_BEFORE_START),f=f.getFirst();continue}p=1}}if(p&&!l&&(l=this.range.clone()).setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c=(!g||p)&&f.equals(h),l&&!g)for(;!f.getNext(r)&&!c;){if((T=f.getParent()).isBlockBoundary(this.forceBrBreak&&!m&&{br:1})){g=1,p=0,c||T.equals(h),l.setEndAt(T,CKEDITOR.POSITION_BEFORE_END);break}p=1,c=(f=T).equals(h),E=1}if(p&&l.setEndAt(f,CKEDITOR.POSITION_AFTER_END),(c=!(f=this._getNextSourceNode(f,E,h)))||g&&l)break}if(!a){if(!l)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;f=(a=new CKEDITOR.dom.elementPath(l.startContainer,l.root)).blockLimit,g={div:1,th:1,td:1},!(a=a.block)&&f&&!this.enforceRealBlocks&&g[f.getName()]&&l.checkStartOfBlock()&&l.checkEndOfBlock()&&!f.equals(l.root)?a=f:!a||this.enforceRealBlocks&&a.is(s)?(a=this.range.document.createElement(e),l.extractContents().appendTo(a),a.trim(),l.insertNode(a),d=u=!0):"li"!=a.getName()?l.checkStartOfBlock()&&l.checkEndOfBlock()||(a=a.clone(!1),l.extractContents().appendTo(a),a.trim(),d=!(u=l.splitBlock()).wasStartOfBlock,u=!u.wasEndOfBlock,l.insertNode(a)):c||(this._.nextNode=a.equals(h)?null:this._getNextSourceNode(l.getBoundaryNodes().endNode,1,h))}return d&&(d=a.getPrevious())&&d.type==CKEDITOR.NODE_ELEMENT&&("br"==d.getName()?d.remove():d.getLast()&&"br"==d.getLast().$.nodeName.toLowerCase()&&d.getLast().remove()),u&&(d=a.getLast())&&d.type==CKEDITOR.NODE_ELEMENT&&"br"==d.getName()&&(!CKEDITOR.env.needsBrFiller||d.getPrevious(o)||d.getNext(o))&&d.remove(),this._.nextNode||(this._.nextNode=c||a.equals(h)||!h?null:this._getNextSourceNode(a,1,h)),a},_getNextSourceNode:function(e,t,n){function i(e){return!(e.equals(n)||e.equals(a))}var a=this.range.root;for(e=e.getNextSourceNode(t,null,i);!o(e);)e=e.getNextSourceNode(t,null,i);return e}},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.checkAllowed(!0)?(this.disable(),!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.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,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1e4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function e(e,t,n,i,o){var a,s,l;for(a in e=[],t){s="boolean"==typeof(s=t[a])?{}:"function"==typeof s?{match:s}:b(s),"$"!=a.charAt(0)&&(s.elements=a),n&&(s.featureName=n.toLowerCase());var c=s;c.elements=r(c.elements,/\s+/)||null,c.propertiesOnly=c.propertiesOnly||!0===c.elements;var d=/\s*,\s*/,u=void 0;for(u in k){c[u]=r(c[u],d)||null;var h=c,f=w[u],g=r(c[w[u]],d),p=c[u],E=[],T=!0,C=void 0;for(C in g?T=!1:g={},p)"!"==C.charAt(0)&&(C=C.slice(1),E.push(C),g[C]=!0,T=!1);for(;C=E.pop();)p[C]=p["!"+C],delete p["!"+C];h[f]=!T&&g||null}c.match=c.match||null,i.push(s),e.push(s)}for(t=o.elements,o=o.generic,n=0,i=e.length;n<i;++n){for(d in s=!0===(a=b(e[n])).classes||!0===a.styles||!0===a.attributes,c=a,u=f=d=void 0,k)c[d]=m(c[d]);for(u in h=!0,w){for(p in g=[],p=void 0,f=c[d=w[u]])-1<p.indexOf("*")?g.push(new RegExp("^"+p.replace(/\*/g,".*")+"$")):g.push(p);(f=g).length&&(c[d]=f,h=!1)}if(c.nothingRequired=h,c.noProperties=!(c.attributes||c.classes||c.styles),!0===a.elements||null===a.elements)o[s?"unshift":"push"](a);else for(l in c=a.elements,delete a.elements,c)t[l]?t[l][s?"unshift":"push"](a):t[l]=[a]}}function t(e,t,i,o){if((!e.match||e.match(t))&&(o||function(e,t){if(e.nothingRequired)return!0;var n,i,o,a;if(o=e.requiredClasses)for(a=t.classes,n=0;n<o.length;++n)if("string"==typeof(i=o[n])){if(-1==CKEDITOR.tools.indexOf(a,i))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(a,i))return!1;return s(t.styles,e.requiredStyles)&&s(t.attributes,e.requiredAttributes)}(e,t))&&(e.propertiesOnly||(i.valid=!0),i.allAttributes||(i.allAttributes=n(e.attributes,t.attributes,i.validAttributes)),i.allStyles||(i.allStyles=n(e.styles,t.styles,i.validStyles)),!i.allClasses)){if(e=e.classes,t=t.classes,o=i.validClasses,e)if(!0===e)e=!0;else{for(var a,r=0,l=t.length;r<l;++r)o[a=t[r]]||(o[a]=e(a));e=!1}else e=!1;i.allClasses=e}}function n(e,t,n){if(!e)return!1;if(!0===e)return!0;for(var i in t)n[i]||(n[i]=e(i));return!1}function i(e,t,n){if(!e.match||e.match(t)){if(e.noProperties)return!1;if(n.hadInvalidAttribute=o(e.attributes,t.attributes)||n.hadInvalidAttribute,n.hadInvalidStyle=o(e.styles,t.styles)||n.hadInvalidStyle,e=e.classes,t=t.classes,e){for(var i=!1,a=!0===e,r=t.length;r--;)(a||e(t[r]))&&(t.splice(r,1),i=!0);e=i}else e=!1;n.hadInvalidClass=e||n.hadInvalidClass}}function o(e,t){if(!e)return!1;var n,i=!1,o=!0===e;for(n in t)(o||e(n))&&(delete t[n],i=!0);return i}function a(e,t,n){return!(e.disabled||e.customConfig&&!n||!t)&&(e._.cachedChecks={},!0)}function r(e,t){if(!e)return!1;if(!0===e)return e;if("string"==typeof e)return"*"==(e=y(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 s(e,t){if(!t)return!0;for(var n,i=0;i<t.length;++i)if("string"==typeof(n=t[i])){if(!(n in e))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(e,n))return!1;return!0}function l(e){if(!e)return{};e=e.split(/\s*,\s*/).sort();for(var t={};e.length;)t[e.shift()]="cke-test";return t}function c(e){var t,n,i,o,a={},r=1;for(e=y(e);t=e.match(S);)(n=t[2])?(i=d(n,"styles"),o=d(n,"attrs"),n=d(n,"classes")):i=o=n=null,a["$"+r++]={elements:t[1],classes:n,styles:i,attributes:o},e=e.slice(t[0].length);return a}function d(e,t){var n=e.match(N[t]);return n?y(n[1]):null}function u(e){var t=e.styleBackup=e.attributes.style,n=e.classBackup=e.attributes.class;e.styles||(e.styles=CKEDITOR.tools.parseCssText(t||"",1)),e.classes||(e.classes=n?n.split(/\s+/):[])}function h(e,n,o,a){var r,s=0;if(a.toHtml&&(n.name=n.name.replace(x,"$1")),a.doCallbacks&&e.elementCallbacks){e:{for(var l,c=0,d=(r=e.elementCallbacks).length;c<d;++c)if(l=r[c](n)){r=l;break e}r=void 0}if(r)return r}if(a.doTransform&&(r=e._.transformations[n.name])){for(u(n),c=0;c<r.length;++c)C(e,n,r[c]);f(n)}if(a.doFilter){e:{c=n.name,e=(d=e._).allowedRules.elements[c],r=d.allowedRules.generic,c=d.disallowedRules.elements[c],d=d.disallowedRules.generic,l=a.skipRequired;var h,m,p={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1};if(e||r){if(u(n),c)for(h=0,m=c.length;h<m;++h)if(!1===i(c[h],n,p)){e=null;break e}if(d)for(h=0,m=d.length;h<m;++h)i(d[h],n,p);if(e)for(h=0,m=e.length;h<m;++h)t(e[h],n,p,l);if(r)for(h=0,m=r.length;h<m;++h)t(r[h],n,p,l);e=p}else e=null}if(!e||!e.valid)return o.push(n),1;m=e.validAttributes;var E=e.validStyles;r=e.validClasses;c=n.attributes;var T=n.styles;d=n.classes;l=n.classBackup;var I,O,D=n.styleBackup,R=[],v=(p=[],/^data-cke-/);if(h=!1,delete c.style,delete c.class,delete n.classBackup,delete n.styleBackup,!e.allAttributes)for(I in c)m[I]||v.test(I)&&(I==(O=I.replace(/^data-cke-saved-/,""))||m[O])||(delete c[I],h=!0);if(!e.allStyles||e.hadInvalidStyle){for(I in T)e.allStyles||E[I]?R.push(I+":"+T[I]):h=!0;R.length&&(c.style=R.sort().join("; "))}else D&&(c.style=D);if(!e.allClasses||e.hadInvalidClass){for(I=0;I<d.length;++I)(e.allClasses||r[d[I]])&&p.push(d[I]);p.length&&(c.class=p.sort().join(" ")),l&&p.length<l.split(/\s+/).length&&(h=!0)}else l&&(c.class=l);if(h&&(s=1),!a.skipFinalValidation&&!g(n))return o.push(n),1}return a.toHtml&&(n.name=n.name.replace(A,"cke:$1")),s}function f(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 g(e){switch(e.name){case"a":if(!(e.children.length||e.attributes.name||e.attributes.id))return!1;break;case"img":if(!e.attributes.src)return!1}return!0}function m(e){if(!e)return!1;if(!0===e)return!0;var t=function(e){var t,n=[];for(t in e)-1<t.indexOf("*")&&n.push(t.replace(/\*/g,".*"));return n.length?new RegExp("^(?:"+n.join("|")+")$"):null}(e);return function(n){return n in e||t&&n.match(t)}}function p(){return new CKEDITOR.htmlParser.element("br")}function E(e){return e.type==CKEDITOR.NODE_ELEMENT&&("br"==e.name||v.$block[e.name])}function T(e,t,n){var i=e.name;if(v.$empty[i]||!e.children.length)"hr"==i&&"br"==t?e.replaceWith(p()):(e.parent&&n.push({check:"it",el:e.parent}),e.remove());else if(v.$block[i]||"tr"==i)if("br"==t)e.previous&&!E(e.previous)&&(t=p()).insertBefore(e),e.next&&!E(e.next)&&(t=p()).insertAfter(e),e.replaceWithChildren();else{var o;i=e.children;e:{o=v[t];for(var a,r=0,s=i.length;r<s;++r)if((a=i[r]).type==CKEDITOR.NODE_ELEMENT&&!o[a.name]){o=!1;break e}o=!0}if(o)e.name=t,e.attributes={},n.push({check:"parent-down",el:e});else{var l,c;for(r=(o=e.parent).type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==o.name,s=i.length;0<s;)a=i[--s],r&&(a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&v.$inline[a.name])?(l||((l=new CKEDITOR.htmlParser.element(t)).insertAfter(e),n.push({check:"parent-down",el:l})),l.add(a,0)):(l=null,c=v[o.name]||v.span,a.insertAfter(e),o.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||a.type!=CKEDITOR.NODE_ELEMENT||c[a.name]||n.push({check:"el-up",el:a}));e.remove()}}else i in{style:1,script:1}?e.remove():(e.parent&&n.push({check:"it",el:e.parent}),e.replaceWithChildren())}function C(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 I(e,t){var n,i,o,a,r=t.getDefinition(),s=r.attributes,l=r.styles;if(e.name!=r.element)return!1;for(n in s)if("class"==n){for(r=s[n].split(/\s+/),o=e.classes.join("|");a=r.pop();)if(-1==o.indexOf(a))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 O(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 D(e){return function(t){return I(t,e)}}function R(e){return function(t,n){n[e](t)}}var v=CKEDITOR.dtd,b=CKEDITOR.tools.copy,y=CKEDITOR.tools.trim,_=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2,CKEDITOR.filter=function(e,t){this.allowedContent=[],this.disallowedContent=[],this.elementCallbacks=null,this.disabled=!1,this.editor=null,this.id=CKEDITOR.tools.getNextNumber(),this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}},CKEDITOR.filter.instances[this.id]=this;var n=this.editor=e instanceof CKEDITOR.editor?e:null;if(n&&!t){this.customConfig=!0;var i=n.config.allowedContent;!0===i?this.disabled=!0:(i||(this.customConfig=!1),this.allow(i,"config",1),this.allow(n.config.extraAllowedContent,"extra",1),this.allow(_[n.enterMode]+" "+_[n.shiftEnterMode],"default",1),this.disallow(n.config.disallowedContent))}else this.customConfig=!1,this.allow(t||e,"default",1)},CKEDITOR.filter.instances={},CKEDITOR.filter.prototype={allow:function(t,n,i){if(!a(this,t,i))return!1;var o,r;if("string"==typeof t)t=c(t);else if(t instanceof CKEDITOR.style){if(t.toAllowedContentRules)return this.allow(t.toAllowedContentRules(this.editor),n,i);o=t.getDefinition(),t={},i=o.attributes,t[o.element]=o={styles:o.styles,requiredStyles:o.styles&&CKEDITOR.tools.object.keys(o.styles)},i&&(i=b(i),o.classes=i.class?i.class.split(/\s+/):null,o.requiredClasses=o.classes,delete i.class,o.attributes=i,o.requiredAttributes=i&&CKEDITOR.tools.object.keys(i))}else if(CKEDITOR.tools.isArray(t)){for(o=0;o<t.length;++o)r=this.allow(t[o],n,i);return r}return e(this,t,n,this.allowedContent,this._.allowedRules),!0},applyTo:function(e,t,n,i){if(this.disabled)return!1;var o,a,r,s=this,l=[],c=this.editor&&this.editor.config.protectedSource,d=!1,u={doFilter:!n,doTransform:!0,doCallbacks:!0,toHtml:t};for(e.forEach((function(e){if(e.type==CKEDITOR.NODE_ELEMENT){if("off"==e.attributes["data-cke-filter"])return!1;if(!t||"span"!=e.name||!~CKEDITOR.tools.object.keys(e.attributes).join("|").indexOf("data-cke-"))if(1&(o=h(s,e,l,u)))d=!0;else if(2&o)return!1}else if(e.type==CKEDITOR.NODE_COMMENT&&e.value.match(/^\{cke_protected\}(?!\{C\})/)){var n;e:{var i,a,r,f=decodeURIComponent(e.value.replace(/^\{cke_protected\}/,""));if(n=[],c)for(a=0;a<c.length;++a)if((r=f.match(c[a]))&&r[0].length==f.length){n=!0;break e}1==(f=CKEDITOR.htmlParser.fragment.fromHtml(f)).children.length&&(i=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&h(s,i,n,u),n=!n.length}n||l.push(e)}}),null,!0),l.length&&(d=!0),e=[],i=_[i||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];n=l.pop();)n.type==CKEDITOR.NODE_ELEMENT?T(n,i,e):n.remove();for(;a=e.pop();)if((n=a.el).parent)switch(r=v[n.parent.name]||v.span,a.check){case"it":v.$removeEmpty[n.name]&&!n.children.length?T(n,i,e):g(n)||T(n,i,e);break;case"el-up":n.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||r[n.name]||T(n,i,e);break;case"parent-down":n.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||r[n.name]||T(n.parent,i,e)}return d},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},disallow:function(t){return!!a(this,t,!0)&&("string"==typeof t&&(t=c(t)),e(this,t,null,this.disallowedContent,this._.disallowedRules),!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(O(e[t],i));this.addTransformations(o)}}},addElementCallback:function(e){this.elementCallbacks||(this.elementCallbacks=[]),this.elementCallbacks.push(e)},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),!e.requiredContent||!this.customConfig&&!this.disallowedContent.length||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 a=void 0,r=void 0,s=void 0,l=void 0,c=void 0,d=void 0;for(n=[],r=0;r<t.length;++r)"string"==typeof(s=t[r])?(l=(s=s.split(/\s*:\s*/))[0],c=null,d=s[1]):(l=s.check,c=s.left,d=s.right),a||(a=(a=s).element?a.element:l?l.match(/^([a-z0-9]+)/i)[0]:a.left.getDefinition().element),c instanceof CKEDITOR.style&&(c=D(c)),n.push({check:l==a?null:l,left:c,right:"string"==typeof d?R(d):d});o[t=a]||(o[t]=[]),o[t].push(n)}}},check:function(e,t,n){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(e)){for(var i=e.length;i--;)if(this.check(e[i],t,n))return!0;return!1}var o,a;if("string"==typeof e){if((a=e+"<"+(!1===t?"0":"1")+(n?"1":"0")+">")in this._.cachedChecks)return this._.cachedChecks[a];var r=(o=c(e).$1).styles;i=o.classes;o.name=o.elements,o.classes=i=i?i.split(/\s*,\s*/):[],o.styles=l(r),o.attributes=l(o.attributes),o.children=[],i.length&&(o.attributes.class=i.join(" ")),r&&(o.attributes.style=CKEDITOR.tools.writeCssText(o.styles))}else r=(o=e.getDefinition()).styles,i=o.attributes||{},r&&!CKEDITOR.tools.isEmpty(r)?(r=b(r),i.style=CKEDITOR.tools.writeCssText(r,!0)):r={},o={name:o.element,attributes:i,classes:i.class?i.class.split(/\s+/):[],styles:r,children:[]};r=CKEDITOR.tools.clone(o);var s,d=[];if(!1!==t&&(s=this._.transformations[o.name])){for(i=0;i<s.length;++i)C(this,o,s[i]);f(o)}return h(this,r,d,{doFilter:!0,doTransform:!1!==t,skipRequired:!n,skipFinalValidation:!n}),0<d.length?n=!1:((t=o.attributes.class)&&(o.attributes.class=o.attributes.class.split(" ").sort().join(" ")),n=CKEDITOR.tools.objectCompare(o.attributes,r.attributes,!0),t&&(o.attributes.class=t)),"string"==typeof e&&(this._.cachedChecks[a]=n),n},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,a=e.slice();if(this.check(_[n]))return n;for(i||(a=a.reverse());o=a.pop();)if(this.check(o))return t[o];return CKEDITOR.ENTER_BR}}(),clone:function(){var e=new CKEDITOR.filter,t=CKEDITOR.tools.clone;return e.allowedContent=t(this.allowedContent),e._.allowedRules=t(this._.allowedRules),e.disallowedContent=t(this.disallowedContent),e._.disallowedRules=t(this._.disallowedRules),e._.transformations=t(this._.transformations),e.disabled=this.disabled,e.editor=this.editor,e},destroy:function(){delete CKEDITOR.filter.instances[this.id],delete this._,delete this.allowedContent,delete this.disallowedContent}};var K,k={styles:1,attributes:1,classes:1},w={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},S=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,N={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},x=/^cke:(object|embed|param)$/,A=/^(object|embed|param)$/;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]:"cke-test"==i&&(e.attributes[n]="cke-test")}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},splitBorderShorthand:function(e){if(e.styles.border){var t=CKEDITOR.tools.style.parse.border(e.styles.border);t.color&&(e.styles["border-color"]=t.color),t.style&&(e.styles["border-style"]=t.style),t.width&&(e.styles["border-width"]=t.width),delete e.styles.border}},listTypeToStyle:function(e){if(e.attributes.type)switch(e.attributes.type){case"a":e.styles["list-style-type"]="lower-alpha";break;case"A":e.styles["list-style-type"]="upper-alpha";break;case"i":e.styles["list-style-type"]="lower-roman";break;case"I":e.styles["list-style-type"]="upper-roman";break;case"1":e.styles["list-style-type"]="decimal";break;default:e.styles["list-style-type"]=e.attributes.type}},splitMarginShorthand:function(e){function t(t){e.styles["margin-top"]=n[t[0]],e.styles["margin-right"]=n[t[1]],e.styles["margin-bottom"]=n[t[2]],e.styles["margin-left"]=n[t[3]]}if(e.styles.margin){var n=e.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||["0px"];switch(n.length){case 1:t([0,0,0,0]);break;case 2:t([0,1,0,1]);break;case 3:t([0,1,2,1]);break;case 4:t([0,1,2,3])}delete e.styles.margin}},matchesStyle:I,transform:function(e,t){if("string"==typeof t)e.name=t;else{var n,i,o,a,r=t.getDefinition(),s=r.styles,l=r.attributes;for(n in e.name=r.element,l)if("class"==n)for(r=e.classes.join("|"),o=l[n].split(/\s+/);a=o.pop();)-1==r.indexOf(a)&&e.classes.push(a);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,domEvent:t}))||(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.gecko&&CKEDITOR.env.mac&&e.on("keypress",n,this)}}}(),CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":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,oc: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,tt: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));var i=this;t=function(){i[e].dir=i.rtl[e]?"rtl":"ltr",n(e,i[e])},this[e]?t():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),t,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,a){var r="string"==typeof n;r&&(n=[n]),o||(o=CKEDITOR);var s=n.length,l=s,c=[],d=[],u=function(e){i&&(r?i.call(o,e):i.call(o,c,d))};if(0===l)u(!0);else{var h=function(e,t){(t?c:d).push(e),0>=--l&&(a&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),u(t))},f=function(n,i){e[n]=1;var o=t[n];delete t[n];for(var a=0;a<o.length;a++)o[a](n,i)},g=function(n){if(e[n])h(n,!0);else{var o=t[n]||(t[n]=[]);if(o.push(h),!(1<o.length)){var a=new CKEDITOR.dom.element("script");a.setAttributes({type:"text/javascript",src:n}),i&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?a.$.onreadystatechange=function(){"loaded"!=a.$.readyState&&"complete"!=a.$.readyState||(a.$.onreadystatechange=null,f(n,!0))}:(a.$.onload=function(){setTimeout((function(){a.$.onload=null,a.$.onerror=null,f(n,!0)}),0)},a.$.onerror=function(){a.$.onload=null,a.$.onerror=null,f(n,!1)})),a.appendTo(CKEDITOR.document.getHead())}}};a&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var m=0;m<s;m++)g(n[m])}},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 Error('[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){n||(t=t.replace(/[^\/]+$/,(function(e){return n=e,""}))),n=n||this.fileName+".js",e=e.split(",");for(var i=0;i<e.length;i++)this.externals[e[i]]={dir:t,file:n}},load:function(e,t,n){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var i=this.loaded,o=this.registered,a=[],r={},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);a.push(d),d in r||(r[d]=[]),r[d].push(c)}}CKEDITOR.scriptLoader.load(a,(function(e,o){if(o.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+r[o[0]].join(",")+'" was not found at "'+o[0]+'".');for(var a=0;a<e.length;a++)for(var l=r[e[a]],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 a={},r=function(n){e.call(this,n,(function(e){CKEDITOR.tools.extend(a,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");l.isSupportedEnvironment=l.isSupportedEnvironment||function(){return!0},t[n]=1}if(c)for(c.split&&(c=c.split(",")),l=0;l<c.length;l++)a[c[l]]||s.push(c[l])}if(s.length)r.call(this,s);else{for(n in a)(l=a[n]).onLoad&&!l.onLoad._called&&(!1===l.onLoad()&&delete a[n],l.onLoad._called=1);i&&i.call(o||window,a)}}),this)};r.call(this,n)}})),CKEDITOR.plugins.setLang=function(e,t,n){var i=this.get(e);e=i.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);n=n&&n.create.apply(this,t.args);return 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(!function(e,t){return t==CKEDITOR.ELEMENT_MODE_INLINE?e.is(CKEDITOR.dtd.$editable)||e.is("textarea"):t==CKEDITOR.ELEMENT_MODE_REPLACE?!e.is(CKEDITOR.dtd.$nonBodyContent):1}(n,o))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"+ ++a}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),CKEDITOR.dom.selection.setupEditorOptimization(this),this.on("instanceReady",(function(){if(this.config.startupFocus){if("end"===this.config.startupFocus){var e=this.createRange();e.selectNodeContents(this.editable()),e.shrink(CKEDITOR.SHRINK_ELEMENT,!0),e.collapse(),this.getSelection().selectRanges([e])}this.focus()}})),CKEDITOR.fire("instanceCreated",null,this),CKEDITOR.add(this),CKEDITOR.tools.setTimeout((function(){this.isDestroyed()||this.isDetached()||function(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.hasAttribute("readonly"):e.element.isReadOnly():e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.element.hasAttribute("disabled")||e.element.hasAttribute("readonly"))),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(", "),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){function t(e){return e?(CKEDITOR.tools.isArray(e)&&(e=e.join(",")),e.replace(/\s/g,"")):""}var n=e.config,i=t(n.plugins),o=t(n.extraPlugins),a=t(n.removePlugins);if(o){var r=new RegExp("(?:^|,)(?:"+o.replace(/,/g,"|")+")(?=,|$)","g");i=(i=i.replace(r,""))+","+o}if(a){var s=new RegExp("(?:^|,)(?:"+a.replace(/,/g,"|")+")(?=,|$)","g");i=i.replace(s,"")}CKEDITOR.env.air&&(i+=",adobeair"),CKEDITOR.plugins.load(i.split(","),(function(t){var i=[],o=[],a=[];for(var r in e.plugins=CKEDITOR.tools.extend({},e.plugins,t),t){var l,c=t[r],d=c.lang,u=null,h=c.requires;if(CKEDITOR.tools.isArray(h)&&(h=h.join(",")),h&&(l=h.match(s)))for(;h=l.pop();)CKEDITOR.error("editor-plugin-required",{plugin:h.replace(",",""),requiredBy:r});d&&!e.lang[r]&&(d.split&&(d=d.split(",")),0<=CKEDITOR.tools.indexOf(d,e.langCode)?u=e.langCode:u=(u=e.langCode.replace(/-.*/,""))!=e.langCode&&0<=CKEDITOR.tools.indexOf(d,u)?u:0<=CKEDITOR.tools.indexOf(d,"en")?"en":d[0],c.langEntries&&c.langEntries[u]?(e.lang[r]=c.langEntries[u],u=null):a.push(CKEDITOR.getUrl(c.path+"lang/"+u+".js"))),o.push(u),i.push(c)}CKEDITOR.scriptLoader.load(a,(function(){if(!e.isDestroyed()&&!e.isDetached()){for(var t=["beforeInit","init","afterInit"],a=0;a<t.length;a++)for(var r=0;r<i.length;r++){var s=i[r];0===a&&o[r]&&s.lang&&s.langEntries&&(e.lang[s.name]=s.langEntries[o[r]]),s[t[a]]&&s[t[a]](e)}for(e.fireOnce("pluginsLoaded"),n.keystrokes&&e.setKeystroke(e.config.keystrokes),r=0;r<e.config.blockedKeystrokes.length;r++)e.keystrokeHandler.blockedKeystrokes[e.config.blockedKeystrokes[r]]=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),function e(t){if(!(n=t.config.customConfig))return!1;var n=CKEDITOR.getUrl(n),i=r[n]||(r[n]={});return i.fn?(i.fn.call(t,t.config),CKEDITOR.getUrl(t.config.customConfig)!=n&&e(t)||t.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(n,(function(){i.fn=i.fn||CKEDITOR.editorConfig||function(){},e(t)})),!0}(e)||e.fireOnce("customConfigLoaded")}(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,a=e.commands;for(o in a)i=a[o],(n||i.contextSensitive)&&i.refresh(e,t)}}function o(){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 a=0,r={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(e,t){for(var n=0;n<t.length;n++){var i=t[n];if(this[i])return CKEDITOR.warn("editor-plugin-conflict",{plugin:e,replacedWith:i}),!0}return!1}},addCommand:function(e,t){t.name=e.toLowerCase();var i=t instanceof CKEDITOR.command?t:new CKEDITOR.command(this,t);return this.mode&&n(this,i),this.commands[e]=i},_attachToForm:function(){function e(e){t.updateElement(),t._.required&&!n.getValue()&&!1===t.fire("required")&&e.data.preventDefault()}var t=this,n=t.element,i=new CKEDITOR.dom.element(n.$.form);n.is("textarea")&&i&&(i.on("submit",e),function(e){return!!(e&&e.call&&e.apply)}(i.$.submit)&&(i.$.submit=CKEDITOR.tools.override(i.$.submit,(function(t){return function(){e(),t.apply?t.apply(this):t()}}))),t.on("destroy",(function(){i.removeListener("submit",e)})))},destroy:function(e){var t=CKEDITOR.filter.instances,n=this;this.fire("beforeDestroy"),!e&&o.call(this),this.editable(null),this.filter&&delete this.filter,CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(t),(function(e){e=t[e],n===e.editor&&e.destroy()})),delete this.activeFilter,this.status="destroyed",this.fire("destroy"),this.removeAllListeners(),CKEDITOR.remove(this),CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(e){if(!e){if(!(e=this.getSelection()))return null;e=e.getStartElement()}return e?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||!1===this.fire("beforeCommandExec",i)||(i.returnValue=n.exec(i.commandData),n.async||!1===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");return"string"!=typeof e&&(e=(e=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?e.is("textarea")?e.getValue():e.getHtml():""),e},loadSnapshot:function(e){this.fire("loadSnapshot",e)},setData:function(e,t,n){var i=!0,o=t;t&&"object"==typeof t&&(n=t.internal,o=t.callback,i=!t.noSnapshot),!n&&i&&this.fire("saveSnapshot"),!o&&n||this.once("dataReady",(function(e){!n&&i&&this.fire("saveSnapshot"),o&&o.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,n){this.fire("insertHtml",{dataValue:e,mode:t,range:n})},insertText:function(e){this.fire("insertText",e)},insertElement:function(e){this.fire("insertElement",e)},getSelectedHtml:function(e){var t=this.editable(),n=(n=this.getSelection())&&n.getRanges();return t&&n&&0!==n.length?(t=function(e,t){function n(e){var t=e.startContainer,n=e.endContainer;return!(!t.is||!(t.is("tr")||t.is("td")&&t.equals(n)&&e.endOffset===t.getChildCount()))}function i(e){var t=e.startContainer;return t.is("tr")?e.cloneContents():t.clone(!0)}for(var o,a,r,s=new CKEDITOR.dom.documentFragment,l=0;l<e.length;l++){var c=e[l],d=c.startContainer.getAscendant("tr",!0);n(c)?(o||((o=d.getAscendant("table").clone()).append(d.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),s.append(o),o=o.findOne("thead, tbody, tfoot")),a&&a.equals(d)||(a=d,r=d.clone(),o.append(r)),r.append(i(c))):s.append(c.cloneContents())}return o?s:t.getHtmlFromRange(e[0])}(n,t),e?t.getHtml():t):null},extractSelectedHtml:function(e,t){var n,i=this.editable(),o=this.getSelection().getRanges(),a=new CKEDITOR.dom.documentFragment;if(!i||0===o.length)return null;for(n=0;n<o.length;n++)a.append(i.extractHtmlFromRange(o[n],t));return t||this.getSelection().selectRanges([o[0]]),e?a.getHtml():a},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return o.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]},getCommandKeystroke:function(e,t){var n="string"==typeof e?this.getCommand(e):e,i=[];if(n){var o=CKEDITOR.tools.object.findKey(this.commands,n),a=this.keystrokeHandler.keystrokes;if(n.fakeKeystroke)i.push(n.fakeKeystroke);else for(var r in a)a[r]===o&&i.push(r)}return t?i:i[0]||null},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"))},showNotification:function(e){alert(e)},isDetached:function(){return!!this.container&&this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}}),CKEDITOR.editor._getEditorElement=function(e){if(!CKEDITOR.env.isCompatible)return null;var t=CKEDITOR.dom.element.get(e);return t?t.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:t.getEditor().name}),null):t:(CKEDITOR.error("editor-incorrect-element",{element:e}),null)}}(),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:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\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,a,r=0;i=this._.htmlPartsRegex.exec(n);)if((o=i.index)>r&&(r=n.substring(r,o),a?a.push(r):this.onText(r)),r=this._.htmlPartsRegex.lastIndex,!(o=i[1])||(o=o.toLowerCase(),a&&CKEDITOR.dtd.$cdata[o]&&(this.onCDATA(a.join("")),a=null),a))if(a)a.push(i[0]);else if(o=i[3]){if(o=o.toLowerCase(),!/="/.test(o)){var s,l={},c=i[4];if(i=!!i[5],c)for(;s=e.exec(c);){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,i),!a&&CKEDITOR.dtd.$cdata[o]&&(a=[])}}else(o=i[2])&&this.onComment(o);else this.onTagClose(o);n.length>r&&this.onText(n.substring(r,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}),o={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(a,r,s){function l(e){var t;if(0<p.length)for(var n=0;n<p.length;n++){var i=p[n],o=i.name,a=CKEDITOR.dtd[o],r=T.name&&CKEDITOR.dtd[T.name];r&&!r[o]||e&&a&&!a[e]&&CKEDITOR.dtd[e]?o==T.name&&(u(T,T.parent,1),n--):(t||(c(),t=1),(i=i.clone()).parent=T,T=i,p.splice(n,1),n--)}}function c(){for(;E.length;)u(E.shift(),T)}function d(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 u(t,n,i){n=n||T||m;var o=T;void 0===t.previous&&(h(n,t)&&(T=n,g.onTagOpen(s,{}),t.returnPoint=n=T),d(t),e(t)&&!t.children.length||n.add(t),"pre"==t.name&&(I=!1),"textarea"==t.name&&(C=!1)),t.returnPoint?(T=t.returnPoint,delete t.returnPoint):T=i?n:o}function h(e,t){var n,i;if((e==m||"body"==e.name)&&s&&(!e.name||CKEDITOR.dtd[e.name][s]))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 f(e,t){return(e in CKEDITOR.dtd.$listItem||e in CKEDITOR.dtd.$tableContent)&&(e==t||"dt"==e&&"dd"==t||"dd"==e&&"dt"==t)}var g=new CKEDITOR.htmlParser,m=r instanceof CKEDITOR.htmlParser.element?r:"string"==typeof r?new CKEDITOR.htmlParser.element(r):new CKEDITOR.htmlParser.fragment,p=[],E=[],T=m,C="textarea"==m.name,I="pre"==m.name;for(g.onTagOpen=function(o,a,r,s){if((a=new CKEDITOR.htmlParser.element(o,a)).isUnknown&&r&&(a.isEmpty=!0),a.isOptionalClose=s,e(a))p.push(a);else{if("pre"==o)I=!0;else{if("br"==o&&I)return void T.add(new CKEDITOR.htmlParser.text("\n"));"textarea"==o&&(C=!0)}if("br"==o)E.push(a);else{for(;s=(r=T.name)?CKEDITOR.dtd[r]||(T._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i,!(a.isUnknown||T.isUnknown||s[o]);)if(T.isOptionalClose)g.onTagClose(r);else if(o in n&&r in n)(r=(r=T.children)[r.length-1])&&"li"==r.name||u(r=new CKEDITOR.htmlParser.element("li"),T),!a.returnPoint&&(a.returnPoint=T),T=r;else if(o in CKEDITOR.dtd.$listItem&&!f(o,r))g.onTagOpen("li"==o?"ul":"dl",{},0,1);else if(r in t&&!f(o,r))!a.returnPoint&&(a.returnPoint=T),T=T.parent;else{if(r in CKEDITOR.dtd.$inline&&p.unshift(T),!T.parent){a.isOrphan=1;break}u(T,T.parent,1)}l(o),c(),a.parent=T,a.isEmpty?u(a):T=a}}},g.onTagClose=function(e){for(var t=p.length-1;0<=t;t--)if(e==p[t].name)return void p.splice(t,1);for(var n=[],i=[],o=T;o!=m&&o.name!=e;)o._.isBlockLike||i.unshift(o),n.push(o),o=o.returnPoint||o.parent;if(o!=m){for(t=0;t<n.length;t++){var a=n[t];u(a,a.parent)}T=o,o._.isBlockLike&&c(),u(o,o.parent),o==T&&(T=T.parent),p=p.concat(i)}"body"==e&&(s=!1)},g.onText=function(e){if(T._.hasInlineStarted&&!E.length||I||C||0!==(e=CKEDITOR.tools.ltrim(e)).length){var n=T.name,a=n?CKEDITOR.dtd[n]||(T._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):i;C||a["#"]||!(n in t)?(c(),l(),I||C||(e=e.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," ")),e=new CKEDITOR.htmlParser.text(e),h(T,e)&&this.onTagOpen(s,{},0,1),T.add(e)):(g.onTagOpen(o[n]||""),g.onText(e))}},g.onCDATA=function(e){T.add(new CKEDITOR.htmlParser.cdata(e))},g.onComment=function(e){c(),l(),T.add(new CKEDITOR.htmlParser.comment(e))},g.parse(a),c();T!=m;)u(T,T.parent,1);return d(m),m},CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(e,t){isNaN(t)&&(t=this.children.length);var n=0<t?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 a,r;for(a in n)(r=t[a])||(r=t[a]=new e),r.add(n[a],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,n){return this.textRules.exec(e,t,n)},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;3>o;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,t)):n==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,t.value,t)):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,a=e.length;o<a;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;0<=n&&e<t[n].priority;)n--;return n+1},exec:function(e,t){var n,i,o,a,r=t instanceof CKEDITOR.htmlParser.node||t instanceof CKEDITOR.htmlParser.fragment,s=Array.prototype.slice.call(arguments,1),l=this.rules,c=l.length;for(a=0;a<c;a++)if(r&&(n=t.type,i=t.name),o=l[a],!(e.nonEditable&&!o.options.applyToAll||e.nestedEditable&&o.options.excludeNestedEditable)){if(!1===(o=o.value.apply(null,s))||r&&o&&(o.name!=i||o.type!=n))return o;null!=o&&(s[0]=t=o)}return t},execOnName:function(e,t){for(var n,i=0,o=this.rules,a=o.length;t&&i<a;i++)n=o[i],e.nonEditable&&!n.options.applyToAll||e.nestedEditable&&n.options.excludeNestedEditable||(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 r,l,d=[],u=n(o);if(u)for(c(u,1)&&d.push(u);u;)a(u)&&(r=i(u))&&c(r)&&((l=i(r))&&!a(l)?d.push(r):(s(h).insertAfter(r),r.remove())),u=u.previous;for(u=0;u<d.length;u++)d[u].remove();(d=!e||!1!==("function"==typeof t?t(o):t))&&((h||CKEDITOR.env.needsBrFiller||o.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&(h||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||o.name in CKEDITOR.dtd.tr||o.name in CKEDITOR.dtd.$listItem))?d=!(d=n(o))||"form"==o.name&&"input"==d.name:d=!1),d&&o.add(s(e))}}}function c(e,t){return!(h&&!CKEDITOR.env.needsBrFiller||e.type!=CKEDITOR.NODE_ELEMENT||"br"!=e.name||e.attributes["data-cke-eol"])||!!(e.type==CKEDITOR.NODE_TEXT&&(n=e.value.match(g))&&(n.index&&(new CKEDITOR.htmlParser.text(e.value.substring(0,n.index)).insertBefore(e),e.value=n[0]),!CKEDITOR.env.needsBrFiller&&h&&(!t||e.parent.name in f)||!h&&((n=e.previous)&&"br"==n.name||!n||a(n))));var n}var d,u={elements:{}},h="html"==t,f=CKEDITOR.tools.extend({},T);for(d in f)"#"in p[d]||delete f[d];for(d in f)u.elements[d]=l(h,e.config.fillEmptyBlocks);return u.root=l(h,!1),u.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&&a(t.parent)?r(t.parent,s(e)):a(n)&&l&&!a(l)&&s(e).insertBefore(n)}}}}(h),u}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 a(e){return e&&(e.type==CKEDITOR.NODE_ELEMENT&&e.name in T||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function r(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(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,(function(e,t){return decodeURIComponent(t)}))}function u(e,t){var n=t._.dataStore;return e.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,(function(e,t){return decodeURIComponent(t)})).replace(/\{cke_protected_(\d+)\}/g,(function(e,t){return n&&n[t]||""}))}function h(e,t){var n=[],i=t.config.protectedSource,o=t._.dataStore||(t._.dataStore={id:1}),a=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g;i=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(i);e=e.replace(/\x3c!--[\s\S]*?--\x3e/g,(function(e){return"\x3c!--{cke_tempcomment}"+(n.push(e)-1)+"--\x3e"}));for(var r=0;r<i.length;r++)e=e.replace(i[r],(function(e){return e=e.replace(a,(function(e,t,i){return n[i]})),/cke_temp(comment)?/.test(e)?e:"\x3c!--{cke_temp}"+(n.push(e)-1)+"--\x3e"}));return(e=(e=e.replace(a,(function(e,t,i){return"\x3c!--"+m+(t?"{C}":"")+encodeURIComponent(n[i]).replace(/--/g,"%2D%2D")+"--\x3e"}))).replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,(function(e){return e.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,(function(e,t){return o[o.id]=decodeURIComponent(t),"{cke_protected_"+o.id+++"}"}))}))).replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,(function(e,n,i,o){return"<"+n+i+">"+u(d(o),t)+"</"+n+">"}))}var f;CKEDITOR.htmlDataProcessor=function(n){var i,o,a=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(C),i.addRules(I,{applyToAll:!0}),i.addRules(e(n,"data"),{applyToAll:!0}),o.addRules(O),o.addRules(D,{applyToAll:!0}),o.addRules(e(n,"html"),{applyToAll:!0}),n.on("toHtml",(function(e){var i,o,a=(e=e.data).dataValue;a=c(a=h(a=f(a),n),_),a=(a=(a=(a=(a=c(a=function(e){return e.replace(R,(function(e,t,n){return"<"+t+n.replace(v,(function(e,t){return b.test(t)&&-1==n.indexOf("data-cke-saved-"+t)?" data-cke-saved-"+e+" data-cke-"+CKEDITOR.rnd+"-"+e:e}))+">"}))}(a),y)).replace(k,"$1cke:$2")).replace(S,"<cke:$1$2></cke:$1>")).replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2")).replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");i=e.context||n.editable().getName(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==i&&(i="div",a="<pre>"+a+"</pre>",o=1),(i=n.document.createElement(i)).setHtml("a"+a),a=(a=i.getHtml().substr(1)).replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),""),o&&(a=a.replace(/^<pre>|<\/pre>$/gi,"")),a=d(a=function(e){return e.replace(K,(function(e,t){return decodeURIComponent(t)}))}(a=a.replace(w,"$1$2"))),i=!1!==e.fixForBody&&t(e.enterMode,n.config.autoParagraph),a=CKEDITOR.htmlParser.fragment.fromHtml(a,e.context,i),i&&(!(o=a).children.length&&CKEDITOR.dtd[o.name][i]&&(i=new CKEDITOR.htmlParser.element(i),o.add(i))),e.dataValue=a}),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(a.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(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,(function(e){return"\x3c!--"+m+"{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(a.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=a.writer;i.reset(),t.writeChildrenHtml(i),t=u(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,a,r,s,l=this.editor;return t&&"object"==typeof t?(o=t.context,n=t.fixForBody,i=t.dontFilter,a=t.filter,r=t.enterMode,s=t.protectedWhitespaces):o=t,o||null===o||(o=l.editable().getName()),l.fire("toHtml",{dataValue:e,context:o,fixForBody:n,dontFilter:i,filter:a||l.filter,enterMode:r||l.enterMode,protectedWhitespaces:s}).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},protectSource:function(e){return h(e,this.editor)},unprotectSource:function(e){return u(e,this.editor)}};var g=/(?: |\xa0)$/,m="{cke_protected}",p=CKEDITOR.dtd,E="caption colgroup col thead tfoot tbody".split(" "),T=CKEDITOR.tools.extend({},p.$blockLimit,p.$block),C={elements:{input:s,textarea:s}},I={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(e){if(e.attributes&&e.attributes.src){var t=e.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");0!==t.indexOf("javascript")&&0!==t.indexOf("data")||(e.attributes["data-cke-pa-src"]=e.attributes.src,delete e.attributes.src)}}}},O={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){var t=e.attributes;if(!(e.children.length||t.name||t.id||e.attributes["data-cke-saved-name"]))return!1}}},D={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(E,e.name),i=CKEDITOR.tools.indexOf(E,t.name)),-1<n&&-1<i&&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&&r(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&&(D.attributes.style=function(e){return e.replace(/(^|;)([^\:]+)/g,(function(e){return e.toLowerCase()}))});var R=/<(a|area|img|input|source)\b([^>]*)>/gi,v=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,b=/^(href|src|name)$/i,y=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,_=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,K=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,k=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,w=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,S=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;f=function(){function e(e){return CKEDITOR.tools.array.reduce(e.split(""),(function(e,n){var i=n.toLowerCase(),o=n.toUpperCase(),a=t(i);return i!==o&&(a+="|"+t(o)),e+"("+a+")"}),"")}function t(e){var t,n=(t=e.charCodeAt(0)).toString(16);for(var i in t={htmlCode:"&#"+t+";?",hex:"�*"+n+";?",entity:{"<":"<",">":">",":":":"}[e]})t[i]&&(e+="|"+t[i]);return e}var n=new RegExp("("+e("<cke:encoded>")+"(.*?)"+e("</cke:encoded>")+")|("+e("<")+e("/")+"?"+e("cke:encoded>")+")","gi"),i=new RegExp("(("+e("{cke_protected")+")(_[0-9]*)?"+e("}")+")","gi");return function(e){return e.replace(n,"").replace(i,"")}}()}(),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("")}}},t=function(e,t){return(e=e[0])<(t=t[0])?-1:e>t?1:0},n=CKEDITOR.htmlParser.fragment.prototype,CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:n.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,t){var n,i,o,a,r=this;for(t=r.getFilterContext(t),r.parent||e.onRoot(t,r);;){if(n=r.name,!(i=e.onElementName(t,n)))return this.remove(),!1;if(r.name=i,!(r=e.onElement(t,r)))return this.remove(),!1;if(r!==this)return this.replaceWith(r),!1;if(r.name==n)break;if(r.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(r),!1;if(!r.name)return this.replaceWithChildren(),!1}for(o in n=r.attributes){for(i=n[o];;){if(!(a=e.onAttributeName(t,o))){delete n[o];break}if(a==o)break;delete n[o],o=a}a&&(!1===(i=e.onAttribute(t,r,a,i))?delete n[a]:n[a]=i)}return r.isEmpty||this.filterChildren(e,!1,t),!0},filterChildren:n.filterChildren,writeHtml:function(e,n){n&&this.filter(n);var i,o,a=this.name,r=[],s=this.attributes;for(i in e.openTag(a,s),s)r.push([i,s[i]]);for(e.sortAttributes&&r.sort(t),i=0,o=r.length;i<o;i++)s=r[i],e.attribute(s[0],s[1]);e.openTagClose(a,this.isEmpty),this.writeChildrenHtml(e),this.isEmpty||e.closeTag(a)},writeChildrenHtml:n.writeChildrenHtml,replaceWithChildren:function(){for(var e=this.children,t=e.length;t;)e[--t].insertAfter(this);this.remove()},forEach:n.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),0<e&&(this.children[e-1].next=null),this.parent.add(n,this.getIndex()+1),n},find:function(e,t){void 0===t&&(t=!1);var n,i=[];for(n=0;n<this.children.length;n++){var o=this.children[n];("function"==typeof e&&e(o)||"string"==typeof e&&o.name===e)&&i.push(o),t&&o.find&&(i=i.concat(o.find(e,t)))}return i},findOne:function(e,t){var n=null,i=CKEDITOR.tools.array.find(this.children,(function(i){var o="function"==typeof e?e(i):i.name===e;return o||!t?o:(i.children&&i.findOne&&(n=i.findOne(e,!0)),!!n)}));return n||i||null},addClass:function(e){if(!this.hasClass(e)){var t=this.attributes.class||"";this.attributes.class=t+(t?" ":"")+e}},removeClass:function(e){var t=this.attributes.class;t&&((t=CKEDITOR.tools.trim(t.replace(new RegExp("(?:\\s+|^)"+e+"(?:\\s+|$)")," ")))?this.attributes.class=t:delete this.attributes.class)},hasClass:function(e){var t=this.attributes.class;return!!t&&new RegExp("(?:^|\\s)"+e+"(?=\\s|$)").test(t)},getFilterContext:function(e){var t=[];if(e||(e={nonEditable:!1,nestedEditable:!1}),e.nonEditable||"false"!=this.attributes.contenteditable?e.nonEditable&&!e.nestedEditable&&"true"==this.attributes.contenteditable&&t.push("nestedEditable",!0):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=/{([^}]+)}/g;CKEDITOR.template=function(e){this.source="function"==typeof e?e:String(e)},CKEDITOR.template.prototype.output=function(t,n){var i=("function"==typeof this.source?this.source(t):this.source).replace(e,(function(e,n){return void 0!==t[n]?t[n]:e}));return n?n.push(i):i}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(e){function t(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[e.name]=e,e.on("focus",(function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))})),e.on("blur",t),e.on("destroy",t),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(!(e=CKEDITOR.editor._getEditorElement(e)))return null;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()):(t&&void 0!==t.readOnly&&!t.readOnly&&e.setAttribute("contenteditable","true"),n.setData(e.getHtml(),null,!0)),n.on("loaded",(function(){n.fire("uiReady"),n.editable(e),n.container=e,n.ui.contentsElement=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(){var e=n.container;i&&e&&(e.clearCustomData(),e.remove()),i&&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,a=i.count();o<a;o++)"true"!=(e=i.getItem(o)).getAttribute("contenteditable")||e.getEditor()||(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,n,i,o){if(!(e=CKEDITOR.editor._getEditorElement(e)))return null;var a=new CKEDITOR.editor(n,e,o);return o==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.setStyle("visibility","hidden"),a._.required=e.hasAttribute("required"),e.removeAttribute("required")),i&&a.setData(i,null,!0),a.on("loaded",(function(){a.isDestroyed()||a.isDetached()||(function(e){var t=e.name,n=e.element,i=e.elementMode,o=e.fire("uiSpace",{space:"top",html:""}).html,a=e.fire("uiSpace",{space:"bottom",html:""}).html,r=new CKEDITOR.template('<{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"'+(e.title?' aria-labelledby="cke_{name}_arialbl"':"")+">"+(e.title?'<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(r.output({id:e.id,name:t,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.title,topHtml:o?'<span id="'+e.ui.spaceId("top")+'" class="cke_top cke_reset_all" role="presentation" style="height:auto">'+o+"</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"}));i==CKEDITOR.ELEMENT_MODE_REPLACE?(n.hide(),t.insertAfter(n)):n.append(t),e.container=t,e.ui.contentsElement=e.ui.space("contents"),o&&e.ui.space("top").unselectable(),a&&e.ui.space("bottom").unselectable(),n=e.config.width,i=e.config.height,n&&t.setStyle("width",CKEDITOR.tools.cssLength(n)),i&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(i)),t.disableContextMenu(),CKEDITOR.env.webkit&&t.on("focus",(function(){e.focus()})),e.fireOnce("uiReady")}(a),o==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)}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(!new 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,a=n.checkDirty(),r=(i=n._.previousModeData,0);n.fire("beforeModeUnload"),n.editable(0),n._.previousMode=n.mode,n._.previousModeData=o=n.getData(1),"source"==n.mode&&i==o&&(n.fire("lockSnapshot",{forceUpdate:!0}),r=1),n.ui.space("contents").setHtml(""),n.mode=""}else n._.previousModeData=n.getData(1);this._.modes[e]((function(){n.mode=e,void 0!==a&&!a&&n.resetDirty(),r?n.fire("unlockSnapshot"):"wysiwyg"==e&&n.fire("saveSnapshot"),setTimeout((function(){n.isDestroyed()||n.isDetached()||(n.fire("mode"),t&&t.call(n))}),0)}))}},CKEDITOR.editor.prototype.resize=function(e,t,n,i){var o=this.container,a=this.ui.space("contents"),r=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;i=i?this.container.getFirst((function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")})):o,(e||0===e)&&(e=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(e))),i.setSize("width",e,!0),r&&(r.style.width="1%"),t=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(t));var s=(i.$.offsetHeight||0)-(a.$.clientHeight||0);o=Math.max(t-(n?0:s),0);t=n?t+s:t,a.setStyle("height",CKEDITOR.tools.cssLength(o)),r&&(r.style.width="100%"),this.fire("resize",{outerHeight:t,contentsHeight:o,outerWidth:e||i.getSize("width")})},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,s=e.data.selection,l=s.getRanges()[0];(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)&&(s=function(e,t){if(e.isFake)return 0;var i=t.block||t.blockLimit,o=i&&i.getLast(n);if(!(!i||!i.isBlockBoundary()||o&&o.type==CKEDITOR.NODE_ELEMENT&&o.isBlockBoundary()||i.is("pre")||i.getBogus()))return i}(s,o))&&(s.appendBogus(),t=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&i._.previousActive),a(i,o.block,r)&&l.collapsed&&!l.getCommonAncestor().isReadOnly()&&((o=l.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=l.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&&l.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 d(e)&&u(e)}function i(e,t){return function(n){var i=n.data.$.toElement||n.data.$.fromElement||n.data.$.relatedTarget;(i=i&&i.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(i):null)&&(t.equals(i)||t.contains(i))||e.call(this,n)}}function o(e){function t(e){return function(t,o){if(o&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(a)&&(i=t),!(o||!n(t)||e&&f(t)))return!1}}var i,o=e.getRanges()[0];e=e.root;var a={table:1,ul:1,ol:1,dl:1};if(o.startPath().contains(a)){var r=o.clone();if(r.collapse(1),r.setStartAt(e,CKEDITOR.POSITION_AFTER_START),(e=new CKEDITOR.dom.walker(r)).guard=t(),e.checkBackward(),i)return(r=o.clone()).collapse(),r.setEndAt(i,CKEDITOR.POSITION_AFTER_END),(e=new CKEDITOR.dom.walker(r)).guard=t(!0),i=!1,e.checkForward(),i}return null}function a(e,t,n){return!1!==e.config.autoParagraph&&e.activeEnterMode!=CKEDITOR.ENTER_BR&&(e.editable().equals(n)&&!t||t&&"true"==t.getAttribute("contenteditable"))}function r(e){return e.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==e.config.autoParagraph&&(e.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p")}function s(e){e&&e.isEmptyInlineRemoveable()&&e.remove()}function l(e){var t=e.editor;t.getSelection().scrollIntoView(),setTimeout((function(){t.fire("saveSnapshot")}),0)}function c(e,t,n){var i=e.getCommonAncestor(t);for(t=e=n?t:e;(e=e.getParent())&&!i.equals(e)&&1==e.getChildCount();)t=e;t.remove()}var d,u,h,f,g,m,p,E,T,C;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(e,t){this.base(t.$||t),this.editor=e,this.status="unloaded",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{CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var t=this.$.scrollTop;this.$.focus(),this.$.scrollTop=t}else this.$.focus();else this.$.setActive()}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){!this._.listeners&&(this._.listeners=[]);var t=Array.prototype.slice.call(arguments,1);t=e.on.apply(e,t);return this._.listeners.push(t),t},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))},insertText:function(e){this.editor.focus(),this.insertHtml(this.transformPlainTextToHtml(e),"text")},transformPlainTextToHtml:function(e){var t=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(e,t)},insertHtml:function(e,t,n){var i=this.editor;i.focus(),i.fire("saveSnapshot"),n||(n=i.getSelection().getRanges()[0]),m(this,t||"html",e,n),n.select(),l(this),this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(e,t,n){m(this,n||"html",e,t),this.editor.fire("afterInsertHtml",{intoRange:t})},insertElement:function(e,t){(o=this.editor).focus(),o.fire("saveSnapshot");var i=o.activeEnterMode,o=o.getSelection(),a=e.getName();a=CKEDITOR.dtd.$block[a];t||(t=o.getRanges()[0]),this.insertElementIntoRange(e,t)&&(t.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),a&&((a=e.getNext((function(e){return n(e)&&!f(e)})))&&a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$block)?a.getDtd()["#"]?t.moveToElementEditStart(a):t.moveToElementEditEnd(e):a||i==CKEDITOR.ENTER_BR||(a=t.fixBlock(!0,i==CKEDITOR.ENTER_DIV?"div":"p"),t.moveToElementEditStart(a)))),o.selectRanges([t]),l(this)},insertElementIntoSelection:function(e){this.insertElement(e)},insertElementIntoRange:function(e,t){var n,i,o=this.editor,a=o.config.enterMode,r=e.getName(),l=CKEDITOR.dtd.$block[r];if(t.checkReadOnly())return!1;if(t.deleteContents(1),t.startContainer.type==CKEDITOR.NODE_ELEMENT&&(t.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?p(t):t.startContainer.is(CKEDITOR.dtd.$list)&&E(t)),l)for(;(n=t.getCommonAncestor(0,1))&&(i=CKEDITOR.dtd[n.getName()])&&(!i||!i[r]);)if(n.getName()in CKEDITOR.dtd.span){l=t.splitElement(n);var c=t.createBookmark();s(n),s(l),t.moveToBookmark(c)}else t.checkStartOfBlock()&&t.checkEndOfBlock()?(t.setStartBefore(n),t.collapse(!0),n.remove()):t.splitBlock(a==CKEDITOR.ENTER_DIV?"div":"p",o.editable());return t.insertNode(e),!0},setData:function(e,t){t||(e=this.editor.dataProcessor.toHtml(e)),this.setHtml(e),this.fixInitialSelection(),"unloaded"==this.status&&(this.status="ready"),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.status="detached",this.editor.setData(this.editor.getData(),{internal:!0}),this.clearListeners();try{this._.cleanCustomData()}catch(e){if(!CKEDITOR.env.ie||-2146828218!==e.number)throw e}this.editor.fire("contentDomUnload"),delete this.editor.document,delete this.editor.window,delete this.editor},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function e(){var e,n=t.getDocument().$,i=n.getSelection();e:if(i.anchorNode&&i.anchorNode==t.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=t.getDocument().getActive())&&e.equals(t)&&!i.anchorNode){e=!0;break e}e=void 0}e&&((e=new CKEDITOR.dom.range(t)).moveToElementEditStart(t),(n=n.createRange()).setStart(e.startContainer.$,e.startOffset),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}var t=this;CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks)?this.hasFocus&&(this.focus(),function(){var e=t.getDocument().$,n=e.selection,i=t.getDocument().getActive();"None"==n.type&&i.equals(t)&&(n=new CKEDITOR.dom.range(t),e=e.body.createTextRange(),n.moveToElementEditStart(t),(n=n.startContainer).type!=CKEDITOR.NODE_ELEMENT&&(n=n.getParent()),e.moveToElementText(n.$),e.collapse(!0),e.select())}()):this.hasFocus?(this.focus(),e()):this.once("focus",(function(){e()}),null,null,-999)},getHtmlFromRange:function(e){return e.collapsed?new CKEDITOR.dom.documentFragment(e.document):(e={doc:this.getDocument(),range:e.clone()},T.eol.detect(e,this),T.bogus.exclude(e),T.cell.shrink(e),e.fragment=e.range.cloneContents(),T.tree.rebuild(e,this),T.eol.fix(e,this),new CKEDITOR.dom.documentFragment(e.fragment.$))},extractHtmlFromRange:function(e,t){var n=C,i={range:e,doc:e.document},o=this.getHtmlFromRange(e);if(e.collapsed)return e.optimize(),o;if(e.enlarge(CKEDITOR.ENLARGE_INLINE,1),n.table.detectPurge(i),i.bookmark=e.createBookmark(),delete i.range,(r=this.editor.createRange()).moveToPosition(i.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START),i.targetBookmark=r.createBookmark(),n.list.detectMerge(i,this),n.table.detectRanges(i,this),n.block.detectMerge(i,this),i.tableContentsRanges?(n.table.deleteRanges(i),e.moveToBookmark(i.bookmark),i.range=e):(e.moveToBookmark(i.bookmark),i.range=e,e.extractContents(n.detectExtractMerge(i))),e.moveToBookmark(i.targetBookmark),e.optimize(),n.fixUneditableRangePosition(e),n.list.merge(i,this),n.table.purge(i,this),n.block.merge(i,this),t){if(n=e.startPath(),i=e.checkStartOfBlock()&&e.checkEndOfBlock()&&n.block&&!e.root.equals(n.block)){e:{var a,r=0;if(i=n.block.getElementsByTag("span"))for(;a=i.getItem(r++);)if(!u(a)){i=!0;break e}i=!1}i=!i}i&&(e.moveToPosition(n.block,CKEDITOR.POSITION_BEFORE_START),n.block.remove())}else n.autoParagraph(this.editor,e),h(e.startContainer)&&e.startContainer.appendBogus();return e.startContainer.mergeSiblings(),o},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(g,(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,e.data.range)}),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"),e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):e.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&e.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed"),this.attachClass("cke_contents_"+e.config.contentsLangDirection),e.keystrokeHandler.blockedKeystrokes[8]=+e.readOnly,e.keystrokeHandler.attach(this),this.on("blur",(function(){this.hasFocus=!1}),null,null,-1),this.on("focus",(function(){this.hasFocus=!0}),null,null,-1),CKEDITOR.env.webkit&&this.on("scroll",(function(){e._.previousScrollTop=e.editable().$.scrollTop}),null,null,-1),CKEDITOR.env.edge&&14<CKEDITOR.env.version){var i=function(){var t=e.editable();null!=e._.previousScrollTop&&t.getDocument().equals(CKEDITOR.document)&&(t.$.scrollTop=e._.previousScrollTop,e._.previousScrollTop=null,this.removeListener("scroll",i))};this.on("scroll",i)}if(e.focusManager.add(this),this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,e.once("contentDom",(function(){e.focusManager.focus(this)}),this)),this.isInline()&&this.changeAttr("tabindex",e.tabIndex),!this.is("textarea")){e.document=this.getDocument(),e.window=this.getWindow();var a=e.document;this.changeAttr("spellcheck",!e.config.disableNativeSpellChecker);var r=e.config.contentsLangDirection;this.getDirection(1)!=r&&this.changeAttr("dir",r);var s=CKEDITOR.getCss();if(s){var l=(r=a.getHead()).getCustomData("stylesheet");l?s!=l.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?l.$.styleSheet.cssText=s:l.setText(s)):(s=a.appendStyleText(s),s=new CKEDITOR.dom.element(s.ownerNode||s.owningElement),r.setCustomData("stylesheet",s),s.data("cke-temp",1))}r=a.getCustomData("stylesheet_ref")||0,a.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 u={8:1,46:1};this.attachListener(e,"key",(function(t){if(e.readOnly)return!0;var n,i=t.data.domEvent.getKey();if(0!==(t=e.getSelection()).getRanges().length){if(i in u){var a,r,s,l,c=t.getRanges()[0],h=c.startPath();i=8==i;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(a=t.getSelectedElement())||(a=o(t))?(e.fire("saveSnapshot"),c.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START),a.remove(),c.select(),e.fire("saveSnapshot"),n=1):c.collapsed&&((r=h.block)&&(l=r[i?"getPrevious":"getNext"](d))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&c[i?"checkStartOfBlock":"checkEndOfBlock"]()?(e.fire("saveSnapshot"),c[i?"checkEndOfBlock":"checkStartOfBlock"]()&&r.remove(),c["moveToElementEdit"+(i?"End":"Start")](l),c.select(),e.fire("saveSnapshot"),n=1):h.blockLimit&&h.blockLimit.is("td")&&(s=h.blockLimit.getAscendant("table"))&&c.checkBoundaryOfElement(s,i?CKEDITOR.START:CKEDITOR.END)&&(l=s[i?"getPrevious":"getNext"](d))?(e.fire("saveSnapshot"),c["moveToElementEdit"+(i?"End":"Start")](l),c.checkStartOfBlock()&&c.checkEndOfBlock()?l.remove():c.select(),e.fire("saveSnapshot"),n=1):(s=h.contains(["td","th","caption"]))&&c.checkBoundaryOfElement(s,i?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 u&&!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.edge||this.attachListener(this,"mousedown",(function(t){var n=t.data.getTarget();n.is("img","hr","input","textarea","select")&&!n.isReadOnly()&&(e.getSelection().selectElement(n),n.is("input","textarea","select")&&t.data.preventDefault())})),CKEDITOR.env.edge&&this.attachListener(this,"mouseup",(function(t){(t=t.data.getTarget())&&t.is("img")&&!t.isReadOnly()&&e.getSelection().selectElement(t)})),CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",(function(t){if(2==t.data.$.button&&(!(t=t.data.getTarget()).getAscendant("table")&&!t.getOuterHtml().replace(g,""))){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()}))),CKEDITOR.env.webkit&&this.attachListener(e,"key",(function(t){if(e.readOnly)return!0;if((n=t.data.domEvent.getKey())in u&&0!==(t=e.getSelection()).getRanges().length){var n=8==n,i=t.getRanges()[0];if(t=i.startPath(),i.collapsed)e:{var o=t.block;if(o&&i[n?"checkStartOfBlock":"checkEndOfBlock"]()&&i.moveToClosestEditablePosition(o,!n)&&i.collapsed){if(i.startContainer.type==CKEDITOR.NODE_ELEMENT){var a=i.startContainer.getChild(i.startOffset-(n?1:0));if(a&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("hr")){e.fire("saveSnapshot"),a.remove(),t=!0;break e}}var r;if(!(i=i.startPath().block)||i&&i.contains(o))t=void 0;else e.fire("saveSnapshot"),(r=(n?i:o).getBogus())&&r.remove(),a=(r=e.getSelection()).createBookmarks(),(n?o:i).moveChildren(n?i:o,!1),t.lastElement.mergeSiblings(),c(o,i,!n),r.selectBookmarks(a),t=!0}else t=!1}else n=i,r=t.block,i=n.endPath().block,r&&i&&!r.equals(i)?(e.fire("saveSnapshot"),(o=r.getBogus())&&o.remove(),n.enlarge(CKEDITOR.ENLARGE_INLINE),n.deleteContents(),i.getParent()&&(i.moveChildren(r,!1),t.lastElement.mergeSiblings(),c(r,i,!0)),(n=e.getSelection().getRanges()[0]).collapse(1),n.optimize(),""===n.startContainer.getHtml()&&n.startContainer.appendBogus(),n.select(),t=!0):t=!1;if(!t)return;return e.getSelection().scrollIntoView(),e.fire("saveSnapshot"),!1}}),this,null,100)}},getUniqueId:function(){var e;try{this._.expandoNumber=e=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(t){e=this._&&this._.expandoNumber}return e}},_:{cleanCustomData:function(){this.removeClass("cke_editable"),this.restoreAttrs();for(var e=this.removeCustomData("classes");e&&e.length;)this.removeClass(e.pop());if(!this.is("textarea")){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())}}}}}),CKEDITOR.editor.prototype.editable=function(e){var t=this._.editable;return t&&e?0:arguments.length?(e?t=e instanceof CKEDITOR.editable?e:new CKEDITOR.editable(this,e):(t&&t.detach(),t=null),this._.editable=t):t},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-multiline","true"),e.changeAttr("aria-label",n),n&&e.changeAttr("title",n),(o=t.fire("ariaEditorHelpLabel",{}).label)&&(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">'+o+"</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}"),d=CKEDITOR.dom.walker.whitespaces(!0),u=CKEDITOR.dom.walker.bookmark(!1,!0),h=CKEDITOR.dom.walker.empty(),f=CKEDITOR.dom.walker.bogus(),g=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,m=function(){function e(e){return e.type==CKEDITOR.NODE_ELEMENT}function t(n,i){var o,a=[],r=n.getChildren(),s=r.count(),l=0,d=c[i],u=!n.is(c.$inline)||n.is("br");for(u&&a.push(" ");l<s;l++)e(o=r.getItem(l))&&!o.is(d)?a=a.concat(t(o,i)):a.push(o);return u&&a.push(" "),a}function i(t){return e(t.startContainer)&&t.startContainer.getChild(t.startOffset-1)}function o(t){return t&&e(t)&&(t.is(c.$removeEmpty)||t.is("a")&&!t.isBlockBoundary())}function l(t,n,i,o){var a,r,s=t.clone();s.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(a=new CKEDITOR.dom.walker(s).next())&&e(a)&&d[a.getName()]&&(r=a.getPrevious())&&e(r)&&!r.getParent().equals(t.startContainer)&&i.contains(r)&&o.contains(a)&&a.isIdentical(r)&&(a.moveChildren(r),a.remove(),l(t,n,i,o))}var c=CKEDITOR.dtd,d={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},u={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},h=CKEDITOR.tools.extend({},c.$inline);return delete h.br,function(d,f,m,p){var E,T=d.editor,C=!1;if("unfiltered_html"==f&&(f="html",C=!0),!p.checkReadOnly()){C=(f={type:f,dontFilter:C,editable:d,editor:T,range:p,blockLimit:y=new CKEDITOR.dom.elementPath(p.startContainer,p.root).blockLimit||p.root,mergeCandidates:[],zombies:[]}).range;var I,O,D,R,v,b,y=f.mergeCandidates,_="html"===f.type;if("text"==f.type&&C.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(O=CKEDITOR.dom.element.createFromHtml("<span> </span>",C.document),C.insertNode(O),C.setStartAfter(O)),D=new CKEDITOR.dom.elementPath(C.startContainer),f.endPath=R=new CKEDITOR.dom.elementPath(C.endContainer),!C.collapsed){I=R.block||R.blockLimit;var K=C.getCommonAncestor();I&&!I.equals(K)&&!I.contains(K)&&C.checkEndOfBlock()&&f.zombies.push(I),C.deleteContents()}for(;(v=i(C))&&e(v)&&v.isBlockBoundary()&&D.contains(v);)C.moveToPosition(v,CKEDITOR.POSITION_BEFORE_END);for(l(C,f.blockLimit,D,R),O&&(C.setEndBefore(O),C.collapse(),O.remove()),(I=(O=C.startPath()).contains(o,!1,1))&&(E=C.splitElement(I),f.inlineStylesRoot=I,f.inlineStylesPeak=O.lastElement),O=C.createBookmark(),_&&(s(I),s(E)),(I=O.startNode.getPrevious(n))&&e(I)&&o(I)&&y.push(I),(I=O.startNode.getNext(n))&&e(I)&&o(I)&&y.push(I),I=O.startNode;(I=I.getParent())&&o(I);)y.push(I);if(C.moveToBookmark(O),E=""===(E=d.getHtml())||E.match(g),T.enterMode===CKEDITOR.ENTER_DIV&&E&&((T=d.getFirst())&&T.remove(),p.setStartAt(d,CKEDITOR.POSITION_AFTER_START),p.collapse(!0)),d=m){if(d=f.range,"text"==f.type&&f.inlineStylesRoot){for(T=(p=f.inlineStylesPeak).getDocument().createText("{cke-peak}"),E=f.inlineStylesRoot.getParent();!p.equals(E);)T=T.appendTo(p.clone()),p=p.getParent();m=T.getOuterHtml().split("{cke-peak}").join(m)}if(p=f.blockLimit.getName(),/^\s+|\s+$/.test(m)&&"span"in CKEDITOR.dtd[p])m=(x='<span data-cke-marker="1"> </span>')+m+x;if(m=f.editor.dataProcessor.toHtml(m,{context:null,fixForBody:!1,protectedWhitespaces:!!x,dontFilter:f.dontFilter,filter:f.editor.activeFilter,enterMode:f.editor.activeEnterMode}),(p=d.document.createElement("body")).setHtml(m),x&&(p.getFirst().remove(),p.getLast().remove()),(x=d.startPath().block)&&(1!=x.getChildCount()||!x.getBogus()))e:{var k;if(1==p.getChildCount()&&e(k=p.getFirst())&&k.is(u)&&!k.hasAttribute("contenteditable")){for(d=0,E=(x=k.getElementsByTag("*")).count();d<E;d++)if(!(T=x.getItem(d)).is(h))break e;k.moveChildren(k.getParent(1)),k.remove()}}f.dataWrapper=p,d=m}if(d){d=(k=f.range).document,p=f.blockLimit,E=0;var w,S,N,x=[];m=O=0;var A,L;T=k.startContainer,C=(v=f.endPath.elements[0]).getPosition(T),y=!(!v.getCommonAncestor(T)||C==CKEDITOR.POSITION_IDENTICAL||C&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);for(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),a=n.endContainer.getChild(n.endOffset-1);o&&i(o,t[t.length-1]),a&&i(a,t[0])&&(n.setEnd(n.endContainer,n.endOffset-1),n.collapse())}(T=function t(n,i){var o,a,r,s,l=[],d=i.range.startContainer;o=i.range.startPath(),d=c[d.getName()];for(var u=0,h=n.getChildren(),f=h.count(),g=-1,m=-1,p=0,E=o.contains(c.$list);u<f;++u)e(o=h.getItem(u))?(r=o.getName(),E&&r in CKEDITOR.dtd.$list?l=l.concat(t(o,i)):(s=!!d[r],"br"!=r||!o.data("cke-eol")||u&&u!=f-1||(p=(a=u?l[u-1].node:h.getItem(u+1))&&(!e(a)||!a.is("br")),a=a&&e(a)&&c.$block[a.getName()]),-1!=g||s||(g=u),s||(m=u),l.push({isElement:1,isLineBreak:p,isBlock:o.isBlockBoundary(),hasBlockSibling:a,node:o,name:r,allowed:s}),a=p=0)):l.push({isElement:0,node:o,allowed:1});return-1<g&&(l[g].firstNotAllowed=1),-1<m&&(l[m].lastNotAllowed=1),l}(f.dataWrapper,f),k);E<T.length;E++)if((_=(C=T[E]).isLineBreak)&&(_=k,I=p,R=D=void 0,C.hasBlockSibling?_=1:(D=_.startContainer.getAscendant(c.$block,1))&&D.is({div:1,p:1})?(R=D.getPosition(I))==CKEDITOR.POSITION_IDENTICAL||R==CKEDITOR.POSITION_CONTAINS?_=0:(I=_.splitElement(D),_.moveToPosition(I,CKEDITOR.POSITION_AFTER_START),_=1):_=0),_)m=0<E;else{if(_=k.startPath(),!C.isBlock&&a(f.editor,_.block,_.blockLimit)&&(N=r(f.editor))&&((N=d.createElement(N)).appendBogus(),k.insertNode(N),CKEDITOR.env.needsBrFiller&&(w=N.getBogus())&&w.remove(),k.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)),(_=k.startPath().block)&&!_.equals(S)&&((w=_.getBogus())&&(w.remove(),x.push(_)),S=_),C.firstNotAllowed&&(O=1),O&&C.isElement){for(_=k.startContainer,I=null;_&&!c[_.getName()][C.name];){if(_.equals(p)){_=null;break}I=_,_=_.getParent()}if(_)I&&(A=k.splitElement(I),f.zombies.push(A),f.zombies.push(I));else{I=p.getName(),L=!E,_=E==T.length-1,D=[],R=(I=t(C.node,I)).length;K=0;for(var F=void 0,P=0,B=-1;K<R;K++)" "==(F=I[K])?(P||L&&!K||(D.push(new CKEDITOR.dom.text(" ")),B=D.length),P=1):(D.push(F),P=0);_&&B==D.length&&D.pop(),L=D}}if(L){for(;_=L.pop();)k.insertNode(_);L=0}else k.insertNode(C.node);C.lastNotAllowed&&E<T.length-1&&((A=y?v:A)&&k.setEndAt(A,CKEDITOR.POSITION_AFTER_START),O=0),k.collapse()}1!=T.length?w=!1:w=(w=T[0]).isElement&&"false"==w.node.getAttribute("contenteditable"),w&&(m=!0,_=T[0].node,k.setStartAt(_,CKEDITOR.POSITION_BEFORE_START),k.setEndAt(_,CKEDITOR.POSITION_AFTER_END)),f.dontMoveCaret=m,f.bogusNeededBlocks=x}for(w=f.range,L=f.bogusNeededBlocks,S=w.createBookmark();N=f.zombies.pop();)N.getParent()&&((A=w.clone()).moveToElementEditStart(N),A.removeEmptyBlocksAtEnd());if(L)for(;N=L.pop();)CKEDITOR.env.needsBrFiller?N.appendBogus():N.append(w.document.createText(" "));for(;N=f.mergeCandidates.pop();)N.mergeSiblings();if(CKEDITOR.env.webkit&&w.startPath()&&((N=w.startPath()).block?N.block.$.normalize():N.blockLimit&&N.blockLimit.$.normalize()),w.moveToBookmark(S),!f.dontMoveCaret){for(N=i(w);N&&e(N)&&!N.is(c.$empty);){if(N.isBlockBoundary())w.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END);else{if(o(N)&&N.getHtml().match(/(\s| )$/g)){b=null;break}(b=w.clone()).moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}N=N.getLast(n)}b&&w.moveToRange(b)}}}}(),p=function(){function e(e){return(e=new CKEDITOR.dom.walker(e)).guard=function(e,t){return!t&&(e.type==CKEDITOR.NODE_ELEMENT?e.is(CKEDITOR.dtd.$tableContent):void 0)},e.evaluator=function(e){return e.type==CKEDITOR.NODE_ELEMENT},e}function t(e,t,n){return t=e.getDocument().createElement(t),e.append(t,n),t}function n(e){for(var t,n=e.count();0<n--;)t=e.getItem(n),CKEDITOR.tools.trim(t.getHtml())||(t.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&t.getChildCount()&&t.getFirst().remove())}return function(i){var o=i.startContainer,a=o.getAscendant("table",1),r=!1;n(a.getElementsByTag("td")),n(a.getElementsByTag("th")),(a=i.clone()).setStart(o,0),(a=e(a).lastBackward())||((a=i.clone()).setEndAt(o,CKEDITOR.POSITION_BEFORE_END),a=e(a).lastForward(),r=!0),a||(a=o),a.is("table")?(i.setStartAt(a,CKEDITOR.POSITION_BEFORE_START),i.collapse(!0),a.remove()):(a.is({tbody:1,thead:1,tfoot:1})&&(a=t(a,"tr",r)),a.is("tr")&&(a=t(a,a.getParent().is("thead")?"th":"td",r)),(o=a.getBogus())&&o.remove(),i.moveToPosition(a,r?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}(),E=function(){function e(e){return(e=new CKEDITOR.dom.walker(e)).guard=function(e,t){return!t&&(e.type==CKEDITOR.NODE_ELEMENT?e.is(CKEDITOR.dtd.$list)||e.is(CKEDITOR.dtd.$listItem):void 0)},e.evaluator=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$listItem)},e}return function(t){var n,i=t.startContainer,o=!1;(n=t.clone()).setStart(i,0),(n=e(n).lastBackward())||((n=t.clone()).setEndAt(i,CKEDITOR.POSITION_BEFORE_END),n=e(n).lastForward(),o=!0),n||(n=i),n.is(CKEDITOR.dtd.$list)?(t.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),t.collapse(!0),n.remove()):((i=n.getBogus())&&i.remove(),t.moveToPosition(n,o?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),t.select())}}(),T={eol:{detect:function(e,t){var n=e.range,i=n.clone(),o=n.clone(),a=new CKEDITOR.dom.elementPath(n.startContainer,t),r=new CKEDITOR.dom.elementPath(n.endContainer,t);i.collapse(1),o.collapse(),a.block&&i.checkBoundaryOfElement(a.block,CKEDITOR.END)&&(n.setStartAfter(a.block),e.prependEolBr=1),r.block&&o.checkBoundaryOfElement(r.block,CKEDITOR.START)&&(n.setEndBefore(r.block),e.appendEolBr=1)},fix:function(e,t){var n,i=t.getDocument();e.appendEolBr&&(n=this.createEolBr(i),e.fragment.append(n)),!e.prependEolBr||n&&!n.getPrevious()||e.fragment.append(this.createEolBr(i),1)},createEolBr:function(e){return e.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(e){var t,n=(t=e.range.getBoundaryNodes()).startNode;!(t=t.endNode)||!f(t)||n&&n.equals(t)||e.range.setEndBefore(t)}},tree:{rebuild:function(e,t){var n,i=(r=e.range).getCommonAncestor(),o=new CKEDITOR.dom.elementPath(i,t),a=new CKEDITOR.dom.elementPath(r.startContainer,t),r=new CKEDITOR.dom.elementPath(r.endContainer,t);if(i.type==CKEDITOR.NODE_TEXT&&(i=i.getParent()),o.blockLimit.is({tr:1,table:1})){var s=o.contains("table").getParent();n=function(e){return!e.equals(s)}}else if(o.block&&o.block.is(CKEDITOR.dtd.$listItem)&&(a=a.contains(CKEDITOR.dtd.$list),r=r.contains(CKEDITOR.dtd.$list),!a.equals(r))){var l=o.contains(CKEDITOR.dtd.$list).getParent();n=function(e){return!e.equals(l)}}n||(n=function(e){return!e.equals(o.block)&&!e.equals(o.blockLimit)}),this.rebuildFragment(e,t,i,n)},rebuildFragment:function(e,t,n,i){for(var o;n&&!n.equals(t)&&i(n);)o=n.clone(0,1),e.fragment.appendTo(o),e.fragment=o,n=n.getParent()}},cell:{shrink:function(e){var t=(e=e.range).startContainer,n=e.endContainer,i=e.startOffset,o=e.endOffset;t.type==CKEDITOR.NODE_ELEMENT&&t.equals(n)&&t.is("tr")&&++i==o&&e.shrink(CKEDITOR.SHRINK_TEXT)}}},C=function(){function e(e,t){var n=e.getParent();n.is(CKEDITOR.dtd.$inline)&&e[t?"insertBefore":"insertAfter"](n)}function t(t,n,i){e(n),e(i,1);for(var o;o=i.getNext();)o.insertAfter(n),n=o;h(t)&&t.remove()}function n(e,t){var n=new CKEDITOR.dom.range(e);return n.setStartAfter(t.startNode),n.setEndBefore(t.endNode),n}return{list:{detectMerge:function(e,t){var i=n(t,e.bookmark),o=i.startPath(),a=i.endPath(),r=o.contains(CKEDITOR.dtd.$list),s=a.contains(CKEDITOR.dtd.$list);e.mergeList=r&&s&&r.getParent().equals(s.getParent())&&!r.equals(s),e.mergeListItems=o.block&&a.block&&o.block.is(CKEDITOR.dtd.$listItem)&&a.block.is(CKEDITOR.dtd.$listItem),(e.mergeList||e.mergeListItems)&&((i=i.clone()).setStartBefore(e.bookmark.startNode),i.setEndAfter(e.bookmark.endNode),e.mergeListBookmark=i.createBookmark())},merge:function(e,n){if(e.mergeListBookmark){var i=e.mergeListBookmark.startNode,o=e.mergeListBookmark.endNode,a=new CKEDITOR.dom.elementPath(i,n),r=new CKEDITOR.dom.elementPath(o,n);if(e.mergeList){var s=a.contains(CKEDITOR.dtd.$list),l=r.contains(CKEDITOR.dtd.$list);s.equals(l)||(l.moveChildren(s),l.remove())}e.mergeListItems&&(a=a.contains(CKEDITOR.dtd.$listItem),r=r.contains(CKEDITOR.dtd.$listItem),a.equals(r)||t(r,i,o)),i.remove(),o.remove()}}},block:{detectMerge:function(e,t){if(!e.tableContentsRanges&&!e.mergeListBookmark){var n=new CKEDITOR.dom.range(t);n.setStartBefore(e.bookmark.startNode),n.setEndAfter(e.bookmark.endNode),e.mergeBlockBookmark=n.createBookmark()}},merge:function(e,n){if(e.mergeBlockBookmark&&!e.purgeTableBookmark){var i=e.mergeBlockBookmark.startNode,o=e.mergeBlockBookmark.endNode,a=new CKEDITOR.dom.elementPath(i,n),r=new CKEDITOR.dom.elementPath(o,n);a=a.block,r=r.block;a&&r&&!a.equals(r)&&t(r,i,o),i.remove(),o.remove()}}},table:function(){function e(e){var n,o=[],a=new CKEDITOR.dom.walker(e),r=e.startPath().contains(i),s=e.endPath().contains(i),l={};return a.guard=function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d="visited_"+(c?"out":"in");if(a.getCustomData(d))return;CKEDITOR.dom.element.setMarker(l,a,d,1)}if(c&&r&&a.equals(r))(n=e.clone()).setEndAt(r,CKEDITOR.POSITION_BEFORE_END),o.push(n);else if(!c&&s&&a.equals(s))(n=e.clone()).setStartAt(s,CKEDITOR.POSITION_AFTER_START),o.push(n);else{if((d=!c)&&(d=a.type==CKEDITOR.NODE_ELEMENT&&a.is(i)&&(!r||t(a,r))&&(!s||t(a,s))),!d&&(d=c))if(a.is(i)){d=r&&r.getAscendant("table",!0);var u=s&&s.getAscendant("table",!0),h=a.getAscendant("table",!0);d=d&&d.contains(h)||u&&u.contains(h)}else d=void 0;d&&((n=e.clone()).selectNodeContents(a),o.push(n))}},a.lastForward(),CKEDITOR.dom.element.clearAllMarkers(l),o}function t(e,t){var n=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,i=e.getPosition(t);return i!==CKEDITOR.POSITION_IDENTICAL&&0==(i&n)}var i={td:1,th:1,caption:1};return{detectPurge:function(e){var t=e.range;(n=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT);var n=new CKEDITOR.dom.walker(n),o=0;if(n.evaluator=function(e){e.type==CKEDITOR.NODE_ELEMENT&&e.is(i)&&++o},n.checkForward(),1<o){n=t.startPath().contains("table");var a=t.endPath().contains("table");n&&a&&t.checkBoundaryOfElement(n,CKEDITOR.START)&&t.checkBoundaryOfElement(a,CKEDITOR.END)&&((t=e.range.clone()).setStartBefore(n),t.setEndAfter(a),e.purgeTableBookmark=t.createBookmark())}},detectRanges:function(o,a){var r,s,l=n(a,o.bookmark),c=l.clone(),d=l.getCommonAncestor();d.is(CKEDITOR.dtd.$tableContent)&&!d.is(i)&&(d=d.getAscendant("table",!0)),s=d,d=new CKEDITOR.dom.elementPath(l.startContainer,s),s=new CKEDITOR.dom.elementPath(l.endContainer,s),d=d.contains("table"),s=s.contains("table"),(d||s)&&(d&&s&&t(d,s)?(o.tableSurroundingRange=c,c.setStartAt(d,CKEDITOR.POSITION_AFTER_END),c.setEndAt(s,CKEDITOR.POSITION_BEFORE_START),(c=l.clone()).setEndAt(d,CKEDITOR.POSITION_AFTER_END),(r=l.clone()).setStartAt(s,CKEDITOR.POSITION_BEFORE_START),r=e(c).concat(e(r))):d?s||(o.tableSurroundingRange=c,c.setStartAt(d,CKEDITOR.POSITION_AFTER_END),l.setEndAt(d,CKEDITOR.POSITION_AFTER_END)):(o.tableSurroundingRange=c,c.setEndAt(s,CKEDITOR.POSITION_BEFORE_START),l.setStartAt(s,CKEDITOR.POSITION_AFTER_START)),o.tableContentsRanges=r||e(l))},deleteRanges:function(e){for(var t;t=e.tableContentsRanges.pop();)t.extractContents(),h(t.startContainer)&&t.startContainer.appendBogus();e.tableSurroundingRange&&e.tableSurroundingRange.extractContents()},purge:function(e){if(e.purgeTableBookmark){var t=e.doc,n=e.range.clone();(t=t.createElement("p")).insertBefore(e.purgeTableBookmark.startNode),n.moveToBookmark(e.purgeTableBookmark),n.deleteContents(),e.range.moveToPosition(t,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(e){return!(e.range.startPath().contains(CKEDITOR.dtd.$listItem)&&e.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(e){e.startContainer.getDtd()["#"]||e.moveToClosestEditablePosition(null,!0)},autoParagraph:function(e,t){var n,i=t.startPath();a(e,i.block,i.blockLimit)&&(n=r(e))&&((n=t.document.createElement(n)).appendBogus(),t.insertNode(n),t.moveToPosition(n,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function e(e){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(e)}function t(t,n){if(0===t.length||e(t[0].getEnclosedNode()))return!1;var i,o;if((i=!n&&1===t.length)&&!(i=t[0].collapsed)){var a=t[0];i=a.startContainer.getAscendant({td:1,th:1},!0);var r=a.endContainer.getAscendant({td:1,th:1},!0);o=CKEDITOR.tools.trim,i&&i.equals(r)&&!i.findOne("td, th, tr, tbody, table")?i=!(a=a.cloneContents()).getFirst()||o(a.getFirst().getText())!==o(i.getText()):i=!1}if(i)return!1;for(o=0;o<t.length;o++)if(!(i=t[o]._getTableElement()))return!1;return!0}function n(e){e=function(e){function t(e){e=e.find("td, th");var t,n=[];for(t=0;t<e.count();t++)n.push(e.getItem(t));return n}var n,i,o=[];for(i=0;i<e.length;i++)(n=e[i]._getTableElement()).is&&n.is({td:1,th:1})?o.push(n):o=o.concat(t(n));return o}(e);var t,n,i="",o=[];for(n=0;n<e.length;n++)t&&!t.equals(e[n].getAscendant("tr"))?(i+=o.join("\t")+"\n",t=e[n].getAscendant("tr"),o=[]):0===n&&(t=e[n].getAscendant("tr")),o.push(e[n].getText());return i+o.join("\t")}function i(e){var t=this.root.editor,i=t.getSelection(1);this.reset(),h=!0,i.root.once("selectionchange",(function(e){e.cancel()}),null,null,0),i.selectRanges([e[0]]),(i=this._.cache).ranges=new CKEDITOR.dom.rangeList(e),i.type=CKEDITOR.SELECTION_TEXT,i.selectedElement=e[0]._getTableElement(),i.selectedText=n(e),i.nativeSel=null,this.isFake=1,this.rev=p++,t._.fakeSelection=this,h=!1,this.root.fire("selectionchange")}function o(){var n,i=this._.fakeSelection;if(i){var o;if(!(o=!(n=this.getSelection(1)))&&(o=!n.isHidden())){o=i;var a=n.getRanges(),r=o.getRanges(),s=a.length&&a[0]._getTableElement()&&a[0]._getTableElement().getAscendant("table",!0),l=r.length&&r[0]._getTableElement()&&r[0]._getTableElement().getAscendant("table",!0),c=1===a.length&&a[0]._getTableElement()&&a[0]._getTableElement().is("table"),d=1===r.length&&r[0]._getTableElement()&&r[0]._getTableElement().is("table");if(e(o.getSelectedElement()))o=!1;else{var u=1===a.length&&a[0].collapsed;r=t(a,!!CKEDITOR.env.webkit)&&t(r);(s=!(!s||!l)&&(s.equals(l)||l.contains(s)))&&(u||r)?(c&&!d&&o.selectRanges(a),o=!0):o=!1}o=!o}o&&(i.reset(),i=0)}(i||(i=n||this.getSelection(1))&&i.getType()!=CKEDITOR.SELECTION_NONE)&&(this.fire("selectionCheck",i),(n=this.elementPath()).compare(this._.selectionPreviousPath)||(o=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(n.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||o||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=n,this.fire("selectionChange",{selection:i,path:n})))}function a(){g=!0,f||(r.call(this),f=CKEDITOR.tools.setTimeout(r,200,this))}function r(){f=null,g&&(CKEDITOR.tools.setTimeout(o,0,this),g=!1)}function s(e){return!(!C(e)&&(e.type!=CKEDITOR.NODE_ELEMENT||e.is(CKEDITOR.dtd.$empty)))}function l(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(s,null,n),o=e.getNextNode(s,null,n);return!(!t(i)&&!t(o,1)&&(i||o||n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()&&n.getBogus()))}function c(e){d(e,!1);var t=e.getDocument().createText(E);return e.setCustomData("cke-fillingChar",t),t}function d(e,t){var n=e&&e.removeCustomData("cke-fillingChar");if(n){if(!1!==t){var i=e.getDocument().getSelection().getNative(),o=i&&"None"!=i.type&&i.getRangeAt(0),a=E.length;if(n.getLength()>a&&o&&o.intersectsNode(n.$)){var r=[{node:i.anchorNode,offset:i.anchorOffset},{node:i.focusNode,offset:i.focusOffset}];i.anchorNode==n.$&&i.anchorOffset>a&&(r[0].offset-=a),i.focusNode==n.$&&i.focusOffset>a&&(r[1].offset-=a)}}n.setText(u(n.getText(),1)),r&&(i=(n=e.getDocument().$).getSelection(),(n=n.createRange()).setStart(r[0].node,r[0].offset),n.collapse(!0),i.removeAllRanges(),i.addRange(n),i.extend(r[1].node,r[1].offset))}}function u(e,t){return t?e.replace(T,(function(e,t){return t?" ":""})):e.replace(E,"")}var h,f,g,m="function"!=typeof window.getSelection,p=1,E=CKEDITOR.tools.repeat("",7),T=new RegExp(E+"( )?","g"),C=CKEDITOR.dom.walker.invisible(1),I=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();if(!i.readOnly)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(e){function t(){var e=n.getSelection();e&&e.removeAllRanges()}var n=e.editor;n.on("contentDom",(function(){function e(){(r=new CKEDITOR.dom.selection(n.getSelection())).lock()}function t(){u.removeListener("mouseup",t),g.removeListener("mouseup",t);var e=CKEDITOR.document.$.selection,n=e.createRange();"None"!=e.type&&n.parentElement()&&n.parentElement().ownerDocument==c.$&&n.select()}var i,r,s,l,c=n.document,u=CKEDITOR.document,h=n.editable(),f=c.getBody(),g=c.getDocumentElement(),p=h.isInline();if((CKEDITOR.env.gecko&&h.attachListener(h,"focus",(function(e){e.removeListener(),0!==i&&(e=n.getSelection().getNative())&&e.isCollapsed&&e.anchorNode==h.$&&((e=n.createRange()).moveToElementEditStart(h),e.select())}),null,null,-2),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",(function(){if(i&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){i=n._.previousActive&&n._.previousActive.equals(c.getActive());var e=null!=n._.previousScrollTop&&n._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&i&&e&&(h.$.scrollTop=n._.previousScrollTop)}n.unlockSelection(i),i=0}),null,null,-1),h.attachListener(h,"mousedown",(function(){i=0})),(CKEDITOR.env.ie||CKEDITOR.env.gecko||p)&&(m?h.attachListener(h,"beforedeactivate",e,null,null,-1):h.attachListener(n,"selectionCheck",e,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",(function(){var e=r&&(r.isFake||2>r.getRanges().length);CKEDITOR.env.gecko&&!p&&e||(n.lockSelection(r),i=1)}),null,null,-1),h.attachListener(h,"mousedown",(function(){i=0}))),CKEDITOR.env.ie&&!p)&&(h.attachListener(h,"mousedown",(function(e){2==e.data.$.button&&((e=n.document.getSelection())&&e.getType()!=CKEDITOR.SELECTION_NONE||(s=n.window.getScrollPosition()))})),h.attachListener(h,"mouseup",(function(e){2==e.data.$.button&&s&&(n.document.$.documentElement.scrollLeft=s.x,n.document.$.documentElement.scrollTop=s.y),s=null})),"BackCompat"!=c.$.compatMode)){var E,T;if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)g.on("mousedown",(function(e){function t(e){if(e=e.data.$,E){var t=f.$.createTextRange();try{t.moveToPoint(e.clientX,e.clientY)}catch(e){}E.setEndPoint(0>T.compareEndPoints("StartToStart",t)?"EndToEnd":"StartToStart",t),E.select()}}function n(){g.removeListener("mousemove",t),u.removeListener("mouseup",n),g.removeListener("mouseup",n),E.select()}if((e=e.data).getTarget().is("html")&&e.$.y<g.$.clientHeight&&e.$.x<g.$.clientWidth){E=f.$.createTextRange();try{E.moveToPoint(e.$.clientX,e.$.clientY)}catch(e){}T=E.duplicate(),g.on("mousemove",t),u.on("mouseup",n),g.on("mouseup",n)}}));7<CKEDITOR.env.version&&11>CKEDITOR.env.version&&g.on("mousedown",(function(e){e.data.getTarget().is("html")&&(u.on("mouseup",t),g.on("mouseup",t))}))}(h.attachListener(h,"selectionchange",o,n),h.attachListener(h,"keyup",a,n),h.attachListener(h,"touchstart",a,n),h.attachListener(h,"touchend",a,n),CKEDITOR.env.ie&&h.attachListener(h,"keydown",(function(e){var t,n;(t=!!(t=this.document.getActive())&&("input"===t.getName()||"textarea"===t.getName()))||(n=function(e){return(e=e.getRanges()[0])&&(e=e.startContainer.getAscendant((function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("contenteditable")}),!0))&&"false"===e.getAttribute("contenteditable")?e:null}(t=this.getSelection(1)))&&!n.equals(h)&&(t.selectElement(n),e.data.preventDefault())}),n),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",(function(){n.forceNextSelectionCheck(),n.selectionChange(1)})),p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko))?(h.attachListener(h,"mousedown",(function(){l=1})),h.attachListener(c.getDocumentElement(),"mouseup",(function(){l&&a.call(n),l=0}))):h.attachListener(CKEDITOR.env.ie?h:c.getDocumentElement(),"mouseup",a,n);CKEDITOR.env.webkit&&h.attachListener(c,"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:h.hasFocus&&d(h)}}),null,null,-1),h.attachListener(h,"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(),a=o.getRanges()[0];o.isCollapsed()&&(a=a[38>i?"getPreviousEditableNode":"getNextEditableNode"]())&&a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable")&&(!(o=o.getStartElement()).isBlockBoundary()||""!==(void 0===o.$.textContent?o.$.innerText:o.$.textContent)||8!==i&&46!==i||(o.remove(),e.fire("saveSnapshot")),e.getSelection().fake(a),n.data.preventDefault(),n.cancel())}}}(n),null,null,-1)})),n.on("setData",(function(){n.unlockSelection(),CKEDITOR.env.webkit&&t()})),n.on("contentDomUnload",(function(){n.unlockSelection()})),CKEDITOR.env.ie9Compat&&n.on("beforeDestroy",t,null,null,9),n.on("dataReady",(function(){delete n._.fakeSelection,delete n._.hiddenSelectionContainer,n.selectionChange(1)})),n.on("loadSnapshot",(function(){var e=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),t=n.editable().getLast(e);t&&t.hasAttribute("data-cke-hidden-sel")&&(t.remove(),CKEDITOR.env.gecko&&(e=n.editable().getFirst(e))&&e.is("br")&&e.getAttribute("_moz_editor_bogus_node")&&e.remove())}),null,null,100),n.on("key",(function(e){if("wysiwyg"==n.mode){var t=n.getSelection();if(t.isFake){var i=I[e.data.keyCode];if(i)return i({editor:n,selected:t.getSelectedElement(),selection:t,keyEvent:e})}}}))})),CKEDITOR.env.webkit&&CKEDITOR.on("instanceReady",(function(e){var t=e.editor;t.on("selectionChange",(function(){var e=t.editable(),n=e.getCustomData("cke-fillingChar");n&&(n.getCustomData("ready")?(d(e),e.editor.fire("selectionCheck")):n.setCustomData("ready",1))}),null,null,-1),t.on("beforeSetMode",(function(){d(t.editable())}),null,null,-1),t.on("getSnapshot",(function(e){e.data&&(e.data=u(e.data))}),t,null,20),t.on("toDataFormat",(function(e){e.data.dataValue=u(e.data.dataValue)}),null,null,0)})),CKEDITOR.editor.prototype.selectionChange=function(e){(e?o:a).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.getSelectedRanges=function(e){var t=this.getSelection();return t&&t.getRanges(e)||[]},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,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:p++,this.document=e instanceof CKEDITOR.dom.document?e:e.getDocument(),this.root=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(e=this.getNative())if(e.getRangeAt)n=(i=e.rangeCount&&e.getRangeAt(0))&&new CKEDITOR.dom.node(i.commonAncestorContainer);else{try{i=e.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 O={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.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:u,_createFillingCharSequenceNode:c,FILLING_CHAR_SEQUENCE:E}),CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=m?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:m?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&&1==n.endOffset-n.startOffset&&O[i.childNodes[n.startOffset].nodeName.toLowerCase()]&&(t=CKEDITOR.SELECTION_ELEMENT)}}else t=CKEDITOR.SELECTION_NONE;return e.type=t},getRanges:function(){var e=m?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,a,r,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),0<(r=c.compareEndPoints("StartToStart",t)))u=h-1;else{if(!(0>r))return{container:i,offset:e(o)};d=h+1}if(-1==h||h==l.length-1&&0>r){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;0<c&&0<i;)(a=l[--i]).nodeType==CKEDITOR.NODE_TEXT&&(s=a,c-=a.nodeValue.length);return{container:s,offset:-c}}if(c.collapse(0<r),c.setEndPoint(0<r?"StartToStart":"EndToStart",t),!(c=c.text.replace(/(\r\n|\r)/g,"\n").length))return{container:i,offset:e(o)+(0<r?0:1)};for(;0<c;)try{(a=o[0<r?"previousSibling":"nextSibling"]).nodeType==CKEDITOR.NODE_TEXT&&(c-=a.nodeValue.length,s=a),o=a}catch(t){return{container:i,offset:e(o)}}return{container:s,offset:0<r?-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),a=o.parentNode,r=0,s=new CKEDITOR.dom.range(this.root);r<a.childNodes.length&&a.childNodes[r]!=o;r++);s.setStart(new CKEDITOR.dom.node(a),r),s.setEnd(new CKEDITOR.dom.node(a),r+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,i=n.ranges;return i||(n.ranges=i=new CKEDITOR.dom.rangeList(e.call(this))),t?function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.getCommonAncestor().isReadOnly()&&e.splice(t,1),!n.collapsed){if(n.startContainer.isReadOnly())for(var i,o=n.startContainer;o&&!((i=o.type==CKEDITOR.NODE_ELEMENT)&&o.is("body")||!o.isReadOnly());)i&&"false"==o.getAttribute("contentEditable")&&n.setStartAfter(o),o=o.getParent();o=n.startContainer,i=n.endContainer;var a=n.startOffset,r=n.endOffset,s=n.clone();o&&o.type==CKEDITOR.NODE_TEXT&&(a>=o.getLength()?s.setStartAfter(o):s.setStartBefore(o)),i&&i.type==CKEDITOR.NODE_TEXT&&(r?s.setEndAfter(i):s.setEndBefore(i)),(o=new CKEDITOR.dom.walker(s)).evaluator=function(i){if(i.type==CKEDITOR.NODE_ELEMENT&&i.isReadOnly()){var o=n.clone();return n.setEndBefore(i),n.collapsed&&e.splice(t--,1),i.getPosition(s.endContainer)&CKEDITOR.POSITION_CONTAINS||(o.setStartAfter(i),o.collapsed||e.splice(t+1,0,o)),!0}return!1},o.next()}}return e}(new CKEDITOR.dom.rangeList(i.slice())):i}}(),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&&O[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();t=m?"Control"==t.type?"":t.createRange().text:t.toString();return 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 n=this.getSelectedElement(),o=this.getRanges(),a=this.isFake;this.isLocked=0,this.reset(),e&&(e=n||o[0]&&o[0].getCommonAncestor())&&e.getAscendant("body",1)&&((e=this.root.editor)&&e.plugins.tableselection&&e.plugins.tableselection.isSupportedEnvironment(e)&&t(o)?i.call(this,o):a?this.fake(n):n&&2>o.length?this.selectElement(n):this.selectRanges(o))}},reset:function(){this._.cache={},this.isFake=0;var e=this.root.editor;if(e&&e._.fakeSelection)if(this.rev==e._.fakeSelection.rev){delete e._.fakeSelection;var t=e._.hiddenSelectionContainer;if(t){var n=e.checkDirty();e.fire("lockSnapshot"),t.remove(),e.fire("unlockSnapshot"),!n&&e.resetDirty()}delete e._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=p++},selectElement:function(e){var t=new CKEDITOR.dom.range(this.root);t.setStartBefore(e),t.setEndAfter(e),this.selectRanges([t])},selectRanges:function(e){var n=this.root.editor,o=n&&n._.hiddenSelectionContainer;if(this.reset(),o){o=this.root;for(var a,r=0;r<e.length;++r)(a=e[r]).endContainer.equals(o)&&(a.endOffset=Math.min(a.endOffset,o.getChildCount()))}if(e.length)if(this.isLocked){var s=CKEDITOR.document.getActive();this.unlock(),this.selectRanges(e),this.lock(),s&&!s.equals(this.root)&&s.focus()}else{var u,f,g;if(1==e.length&&!(g=e[0]).collapsed&&(u=g.getEnclosedNode())&&u.type==CKEDITOR.NODE_ELEMENT&&((g=g.clone()).shrink(CKEDITOR.SHRINK_ELEMENT,!0),(f=g.getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&(u=f),"false"==u.getAttribute("contenteditable"))||(u=void 0),u)this.fake(u);else if(n&&n.plugins.tableselection&&n.plugins.tableselection.isSupportedEnvironment(n)&&t(e)&&!h&&!e[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))i.call(this,e);else{if(m){var p,E,T;if(f=CKEDITOR.dom.walker.whitespaces(!0),u=/\ufeff|\u00a0/,g={table:1,tbody:1,tr:1},1<e.length&&(n=e[e.length-1],e[0].setEnd(n.endContainer,n.endOffset)),e=(n=e[0]).collapsed,(o=n.getEnclosedNode())&&o.type==CKEDITOR.NODE_ELEMENT&&o.getName()in O&&(!o.is("a")||!o.getText()))try{return(T=o.$.createControlRange()).addElement(o.$),void T.select()}catch(e){}(n.startContainer.type==CKEDITOR.NODE_ELEMENT&&n.startContainer.getName()in g||n.endContainer.type==CKEDITOR.NODE_ELEMENT&&n.endContainer.getName()in g)&&(n.shrink(CKEDITOR.NODE_ELEMENT,!0),e=n.collapsed),g=(T=n.createBookmark()).startNode,e||(s=T.endNode),(T=n.document.$.body.createTextRange()).moveToElementText(g.$),T.moveStart("character",1),s?((u=n.document.$.body.createTextRange()).moveToElementText(s.$),T.setEndPoint("EndToEnd",u),T.moveEnd("character",-1)):(p=g.getNext(f),E=g.hasAscendant("pre"),p=!(p&&p.getText&&p.getText().match(u))&&(E||!g.hasPrevious()||g.getPrevious().is&&g.getPrevious().is("br")),(E=n.document.createElement("span")).setHtml(""),E.insertBefore(g),p&&n.document.createText("\ufeff").insertBefore(g)),n.setStartBefore(g),g.remove(),e?(p?(T.moveStart("character",-1),T.select(),n.document.$.selection.clear()):T.select(),n.moveToPosition(E,CKEDITOR.POSITION_BEFORE_START),E.remove()):(n.setEndBefore(s),s.remove(),T.select())}else{if(!(s=this.getNative()))return;for(this.removeAllRanges(),T=0;T<e.length;T++)if(T<e.length-1&&(p=e[T],E=e[T+1],(u=p.clone()).setStart(p.endContainer,p.endOffset),u.setEnd(E.startContainer,E.startOffset),!u.collapsed&&(u.shrink(CKEDITOR.NODE_ELEMENT,!0),n=u.getCommonAncestor(),u=u.getEnclosedNode(),n.isReadOnly()||u&&u.isReadOnly())))E.setStart(p.startContainer,p.startOffset),e.splice(T--,1);else{n=e[T],E=this.document.$.createRange(),n.collapsed&&CKEDITOR.env.webkit&&l(n)&&(u=c(this.root),n.insertNode(u),(p=u.getNext())&&!u.getPrevious()&&p.type==CKEDITOR.NODE_ELEMENT&&"br"==p.getName()?(d(this.root),n.moveToPosition(p,CKEDITOR.POSITION_BEFORE_START)):n.moveToPosition(u,CKEDITOR.POSITION_AFTER_END)),E.setStart(n.startContainer.$,n.startOffset);try{E.setEnd(n.endContainer.$,n.endOffset)}catch(e){if(!(0<=e.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")))throw e;n.collapse(1),E.setEnd(n.endContainer.$,n.endOffset)}s.addRange(E)}}this.reset(),this.root.fire("selectionchange")}}},fake:function(e,t){var n=this.root.editor;void 0===t&&e.hasAttribute("aria-label")&&(t=e.getAttribute("aria-label")),this.reset(),function(e,t){var n=t&&CKEDITOR.tools.htmlEncode(t)||" ";n=CKEDITOR.dom.element.createFromHtml('<div data-cke-hidden-sel="1" data-cke-temp="1" style="'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+'">'+n+"</div>",e.document),e.fire("lockSnapshot"),e.editable().append(n);var i=e.getSelection(1),o=e.createRange(),a=i.root.on("selectionchange",(function(e){e.cancel()}),null,null,0);o.setStartAt(n,CKEDITOR.POSITION_AFTER_START),o.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),i.selectRanges([o]),a.removeListener(),e.fire("unlockSnapshot"),e._.hiddenSelectionContainer=n}(n,t);var i=this._.cache,o=new CKEDITOR.dom.range(this.root);o.setStartBefore(e),o.setEndAfter(e),i.ranges=new CKEDITOR.dom.rangeList(o),i.selectedElement=i.startElement=e,i.type=CKEDITOR.SELECTION_ELEMENT,i.selectedText=i.nativeSel=null,this.isFake=1,this.rev=p++,n._.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"))},isInTable:function(e){return t(this.getRanges(),e)},isCollapsed:function(){var e=this.getRanges();return 1===e.length&&e[0].collapsed},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 n,i=[],o=0;o<e.length;o++){var a=new CKEDITOR.dom.range(this.root);a.moveToBookmark(e[o]),i.push(a)}return e.isFake&&((n=t(i)?i[0]._getTableElement():i[0].getEnclosedNode())&&n.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),e.isFake=0)),e.isFake&&!t(i)?this.fake(n):this.selectRanges(i),this},getCommonAncestor:function(){var e=this.getRanges();return e.length?e[0].startContainer.getCommonAncestor(e[e.length-1].endContainer):null},scrollIntoView:function(){this.getType()!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var e=this.getNative();try{e&&e[m?"empty":"removeAllRanges"]()}catch(e){}this.reset()}}}}(),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(e,t,n,i){return(e.getPosition(t)|i)==i&&(!n.childRule||n.childRule(e))}function n(i){var a=i.document;if(i.collapsed)a=m(this,a),i.insertNode(a),i.moveToPosition(a,CKEDITOR.POSITION_BEFORE_END);else{var r,s=this.element,l=this._.definition,c=(T=l.ignoreReadonly)||l.includeReadonly;null==c&&(c=i.root.getCustomData("cke_includeReadonly"));var d=CKEDITOR.dtd[s];d||(r=!0,d=CKEDITOR.dtd.span),i.enlarge(CKEDITOR.ENLARGE_INLINE,1),i.trim();var u,f=i.createBookmark(),g=f.startNode,p=f.endNode,E=g;if(!T){var T=e(g,C=i.getCommonAncestor()),C=e(p,C);T&&(E=T.getNextSourceNode(!0)),C&&(p=C)}for(E.getPosition(p)==CKEDITOR.POSITION_FOLLOWING&&(E=0);E;){if(T=!1,E.equals(p))E=null,T=!0;else{C=(_=E.type==CKEDITOR.NODE_ELEMENT?E.getName():null)&&"false"==E.getAttribute("contentEditable");var I=_&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,_);I=_&&(E.getAttribute("data-nostyle")||I);if(_&&E.data("cke-bookmark")||E.type===CKEDITOR.NODE_COMMENT){E=E.getNextSourceNode(!0);continue}if(C&&c&&CKEDITOR.dtd.$block[_])for(var O=void 0,D=0,R=(A=(x=o(R=E)).length)&&new CKEDITOR.dom.range(R.getDocument());D<A;++D){O=x[D];var v=CKEDITOR.filter.instances[O.data("cke-filter")];v&&!v.check(this)||(R.selectNodeContents(O),n.call(this,R))}if(x=_?!d[_]||I||C&&!c?0:t(E,p,l,K):1){if(x=l,A=s,D=r,!(O=E.getParent())||!(O.getDtd()||CKEDITOR.dtd.span)[A]&&!D||x.parentRule&&!x.parentRule(O))T=!0;else if(u||_&&CKEDITOR.dtd.$removeEmpty[_]&&(E.getPosition(p)|K)!=K||(u=i.clone()).setStartBefore(E),(_=E.type)==CKEDITOR.NODE_TEXT||C||_==CKEDITOR.NODE_ELEMENT&&!E.getChildCount()){for(var b,_=E;(T=!_.getNext(y))&&d[(b=_.getParent()).getName()]&&t(b,g,l,k);)_=b;u.setEndAfter(_)}}else T=!0;E=E.getNextSourceNode(I||C)}if(T&&u&&!u.collapsed){C=(T=m(this,a)).hasAttributes(),I=u.getCommonAncestor(),_={};for(var w,S,N,x={},A=(O={},{});T&&I;){if(I.getName()==s){for(w in l.attributes)!A[w]&&(N=I.getAttribute(S))&&(T.getAttribute(w)==N?x[w]=1:A[w]=1);for(S in l.styles)!O[S]&&(N=I.getStyle(S))&&(T.getStyle(S)==N?_[S]=1:O[S]=1)}I=I.getParent()}for(w in x)T.removeAttribute(w);for(S in _)T.removeStyle(S);C&&!T.hasAttributes()&&(T=null),T?(u.extractContents().appendTo(T),u.insertNode(T),h.call(this,T),T.mergeSiblings(),CKEDITOR.env.ie||T.$.normalize()):(T=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(T),u.insertNode(T),h.call(this,T),T.remove(!0)),u=null}}i.moveToBookmark(f),i.shrink(CKEDITOR.SHRINK_TEXT),i.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function i(e){function t(){for(var e=new CKEDITOR.dom.elementPath(i.getParent()),t=new CKEDITOR.dom.elementPath(d.getParent()),n=null,o=null,a=0;a<e.elements.length;a++){var r=e.elements[a];if(r==e.block||r==e.blockLimit)break;h.checkElementRemovable(r,!0)&&(n=r)}for(a=0;a<t.elements.length&&((r=t.elements[a])!=t.block&&r!=t.blockLimit);a++)h.checkElementRemovable(r,!0)&&(o=r);o&&d.breakParent(o),n&&i.breakParent(n)}e.enlarge(CKEDITOR.ENLARGE_INLINE,1);var n=e.createBookmark(),i=n.startNode,o=this._.definition.alwaysRemoveElement;if(e.collapsed){for(var a,r,s=new CKEDITOR.dom.elementPath(i.getParent(),e.root),l=0;l<s.elements.length&&(r=s.elements[l])&&r!=s.block&&r!=s.blockLimit;l++)if(this.checkElementRemovable(r)){var c;!o&&e.collapsed&&(e.checkBoundaryOfElement(r,CKEDITOR.END)||(c=e.checkBoundaryOfElement(r,CKEDITOR.START)))?(a=r).match=c?"start":"end":(r.mergeSiblings(),r.is(this.element)?u.call(this,r):f(r,T(this)[r.getName()]))}if(a){for(o=i,l=0;!(r=s.elements[l]).equals(a);l++)r.match||((r=r.clone()).append(o),o=r);o["start"==a.match?"insertBefore":"insertAfter"](a)}}else{var d=n.endNode,h=this;for(t(),s=i;!s.equals(d);)a=s.getNextSourceNode(),s.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(s)&&(s.getName()==this.element?u.call(this,s):f(s,T(this)[s.getName()]),a.type==CKEDITOR.NODE_ELEMENT&&a.contains(i)&&(t(),a=i.getNext())),s=a}e.moveToBookmark(n),e.shrink(CKEDITOR.NODE_ELEMENT,!0)}function o(e){var t=[];return e.forEach((function(e){if("true"==e.getAttribute("contenteditable"))return t.push(e),!1}),CKEDITOR.NODE_ELEMENT,!0),t}function a(e){var t=e.getEnclosedNode()||e.getCommonAncestor(!1,!0);(e=new CKEDITOR.dom.elementPath(t,e.root).contains(this.element,1))&&!e.isReadOnly()&&p(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 s(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))&&c(i,m(this,o,i));e.moveToBookmark(t)}function l(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),c(t,n)):u.call(this,t));e.moveToBookmark(i)}function c(e,t){(n=!t)&&(t=e.getDocument().createElement("div"),e.copyAttributes(t));var n,i,o=t&&t.is("pre"),a=e.is("pre"),r=!o&&a;if(o&&!a){if(a=t,(r=e.getBogus())&&r.remove(),r=(r=(r=(r=d(r=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(a),a.$.outerHTML="<pre>"+r+"</pre>",a.copyAttributes(s.getFirst()),a=s.getFirst().remove()}else a.setHtml(r);t=a}else r?t=function(e,t){var n;1<e.length&&(n=new CKEDITOR.dom.documentFragment(t.getDocument()));for(var i=0;i<e.length;i++){var o=d(o=(o=e[i]).replace(/(\r\n|\r)/g,"\n"),/^[ \t]*\n/,"");o=d(o,/\n$/,""),o=(o=(o=d(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)+" "}));if(n){var a=t.clone();a.setHtml(o),n.append(a)}else t.setHtml(o)}return n||t}(n?[e.getHtml()]:function(e){var t=[];return d(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(_))&&i.type==CKEDITOR.NODE_ELEMENT&&i.is("pre")&&(o=d(i.getHtml(),/\n$/,"")+"\n\n"+d(n.getHtml(),/^\n/,""),CKEDITOR.env.ie?n.$.outerHTML="<pre>"+o+"</pre>":n.setHtml(o),i.remove()):n&&g(t)}function d(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 u(e,t){var n,i=(o=this._.definition).attributes,o=o.styles,a=T(this)[e.getName()],r=CKEDITOR.tools.isEmpty(i)&&CKEDITOR.tools.isEmpty(o);for(n in i)("class"!=n&&!this._.definition.fullMatch||e.getAttribute(n)==C(n,i[n]))&&(t&&"data-"==n.slice(0,5)||(r=e.hasAttribute(n),e.removeAttribute(n)));for(var s in o)this._.definition.fullMatch&&e.getStyle(s)!=C(s,o[s],!0)||(r=r||!!e.getStyle(s),e.removeStyle(s));f(e,a,D[e.getName()]),r&&(this._.definition.alwaysRemoveElement?g(e,1):!CKEDITOR.dtd.$block[e.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!e.hasAttributes()?g(e):e.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function h(e){for(var t,n=T(this),i=e.getElementsByTag(this.element),o=i.count();0<=--o;)(t=i.getItem(o)).isReadOnly()||u.call(this,t,!0);for(var a in n)if(a!=this.element)for(o=(i=e.getElementsByTag(a)).count()-1;0<=o;o--)(t=i.getItem(o)).isReadOnly()||f(t,n[a])}function f(e,t,n){if(t=t&&t.attributes)for(var i=0;i<t.length;i++){var o,a=t[i][0];if(o=e.getAttribute(a)){var r=t[i][1];(null===r||r.test&&r.test(o)||"string"==typeof r&&o==r)&&e.removeAttribute(a)}}n||g(e)}function g(e,t){if(!e.hasAttributes()||t)if(CKEDITOR.dtd.$block[e.getName()]){var n=e.getPrevious(_),i=e.getNext(_);!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 m(e,t,n){var i;return"*"==(i=e.element)&&(i="span"),i=new CKEDITOR.dom.element(i,t),n&&n.copyAttributes(i),i=p(i,e),t.getCustomData("doc_processing_style")&&i.hasAttribute("id")?i.removeAttribute("id"):t.setCustomData("doc_processing_style",1),i}function p(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.getDocument().removeCustomData("doc_processing_style"),e}function E(e,t){for(var n in e)e[n]=e[n].replace(b,(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,a;if("string"==typeof(s=n[i])?o=s.toLowerCase():(o=s.element?s.element.toLowerCase():e.element,a=s.attributes),s=t[o]||(t[o]={}),a){var r,s=s.attributes=s.attributes||[];for(r in a)s.push([r.toLowerCase(),a[r]])}}}return t}function C(e,t,n){var i=new CKEDITOR.dom.element("span");return i[n?"setStyle":"setAttribute"](e,t),i[n?"getStyle":"getAttribute"](e)}function I(e,t){function n(e,t){return"font-family"==t.toLowerCase()?e.replace(/["']/g,""):e}for(var i in"string"==typeof e&&(e=CKEDITOR.tools.parseCssText(e)),"string"==typeof t&&(t=CKEDITOR.tools.parseCssText(t,!0)),e)if(!(i in t)||n(t[i],i)!=n(e[i],i)&&"inherit"!=e[i]&&"inherit"!=t[i])return!1;return!0}function O(e,t,n){var i=e.getRanges();t=t?this.removeFromRange:this.applyToRange;for(var o,a=i.createIterator();o=a.getNextRange();)t.call(this,o,n);e.selectRanges(i)}var D={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},R={a:1,blockquote: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},v=/\s*(?:;\s*|$)/,b=/#\((.+?)\)/g,y=CKEDITOR.dom.walker.bookmark(0,1),_=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(e,t){if("string"==typeof e.type)return new CKEDITOR.style.customHandlers[e.type](e);var n=e.attributes;n&&n.style&&(e.styles=CKEDITOR.tools.extend({},e.styles,CKEDITOR.tools.parseCssText(n.style)),delete n.style),t&&(E((e=CKEDITOR.tools.clone(e)).attributes,t),E(e.styles,t)),n=this.element=e.element?"string"==typeof e.element?e.element.toLowerCase():e.element:"*",this.type=e.type||(D[n]?CKEDITOR.STYLE_BLOCK:R[n]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE),"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT),this._={definition:e}},CKEDITOR.style.prototype={apply:function(e){if(e instanceof CKEDITOR.dom.document)return O.call(this,e.getSelection());if(this.checkApplicable(e.elementPath(),e)){var t=this._.enterMode;t||(this._.enterMode=e.activeEnterMode),O.call(this,e.getSelection(),0,e),this._.enterMode=t}},remove:function(e){if(e instanceof CKEDITOR.dom.document)return O.call(this,e.getSelection(),1);if(this.checkApplicable(e.elementPath(),e)){var t=this._.enterMode;t||(this._.enterMode=e.activeEnterMode),O.call(this,e.getSelection(),1,e),this._.enterMode=t}},applyToRange:function(e){return this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?n:this.type==CKEDITOR.STYLE_BLOCK?s:this.type==CKEDITOR.STYLE_OBJECT?a:null,this.applyToRange(e)},removeFromRange:function(e){return this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?i:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?r:null,this.removeFromRange(e)},applyToObject:function(e){p(e,this)},checkActive:function(e,t){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(e.block||e.blockLimit,!0,t);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var n,i=e.elements,o=0;o<i.length;o++)if(n=i[o],this.type!=CKEDITOR.STYLE_INLINE||n!=e.block&&n!=e.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var a=n.getName();if(!("string"==typeof this.element?a==this.element:a in this.element))continue}if(this.checkElementRemovable(n,!0,t))return!0}}return!1},checkApplicable:function(e,t,n){if(t&&t instanceof CKEDITOR.filter&&(n=t),n&&!n.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,a=n.attributes;if(a)for(var r in a)o++,i[r]=a[r];(r=CKEDITOR.style.getStyleText(n))&&(i.style||o++,i.style=r),i._length=o,n=n._AC=i}if(!n._length)return!0;for(var s in n)if("_length"!=s)if(i=e.getAttribute(s)||"","style"==s?I(n[s],i):n[s]==i){if(!t)return!0}else if(t)return!1;if(t)return!0}return!1},checkElementRemovable:function(e,t,n){if(this.checkElementMatch(e,t,n))return!0;if(t=T(this)[e.getName()]){var i;if(!(t=t.attributes))return!0;for(n=0;n<t.length;n++)if(i=t[n][0],i=e.getAttribute(i)){var o=t[n][1];if(null===o)return!0;if("string"==typeof o){if(i==o)return!0}else if(o.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 a in o)n.push(" ",a,'="',o[a],'"');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(v,";")),t){var a=t[o],r=(o+":"+a).replace(v,";");"inherit"==a?i+=r:n+=r}return n.length&&(n=CKEDITOR.tools.normalizeCssText(n,!0)),e._ST=n+i},CKEDITOR.style.customHandlers={},CKEDITOR.style.unstylableElements=[],CKEDITOR.style.addCustomHandler=function(e){var t=function(e){this._={definition:e},this.setup&&this.setup(e)};return t.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},e,!0),this.customHandlers[e.type]=t};var K=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,k=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.tools.extend(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,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;i.fn.call(this,o)}}))),n.push({style:e,fn:t})},applyStyle:function(e){e.apply(this)},removeStyle:function(e){e.remove(this)},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)}))}}}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var e=CKEDITOR.getUrl("vendor/promise.js");if("function"==typeof window.define&&window.define.amd&&"function"==typeof window.require)return window.require([e],(function(e){CKEDITOR.tools.promise=e}));CKEDITOR.scriptLoader.load(e,(function(t){return t?void 0!==window.ES6Promise?CKEDITOR.tools.promise=ES6Promise:void 0:CKEDITOR.error("no-vendor-lib",{path:e})}))}}(),function(){function e(e,i,o){e.once("selectionCheck",(function(e){if(!t){var a=e.data.getRanges()[0];o.equals(a)?e.cancel():i.equals(a)&&(n=!0)}}),null,null,-1)}var t=!0,n=!1;CKEDITOR.dom.selection.setupEditorOptimization=function(e){e.on("selectionCheck",(function(e){e.data&&!n&&e.data.optimizeInElementEnds(),n=!1})),e.on("contentDom",(function(){var t=e.editable();t&&(t.attachListener(t,"keydown",(function(e){this._.shiftPressed=e.data.$.shiftKey}),this),t.attachListener(t,"keyup",(function(e){this._.shiftPressed=e.data.$.shiftKey}),this))}))},CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var n,i=this.getRanges()[0],o=this.root.editor;if(this.root.editor._.shiftPressed||this.isFake||i.isCollapsed||i.startContainer.equals(i.endContainer))n=!1;else if(0===i.endOffset)n=!0;else{n=i.startContainer.type===CKEDITOR.NODE_TEXT;var a=i.endContainer.type===CKEDITOR.NODE_TEXT,r=n?i.startContainer.getLength():i.startContainer.getChildCount();n=i.startOffset===r||n^a}n&&(n=i.clone(),i.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),t=!1,e(o,i,n),i.select(),t=!0)}}(),function(){function e(e,t){return n(e)?e=Math.round(t*(parseFloat(e)/100)):"string"==typeof e&&e.match(/^\d+$/gm)&&(e=parseInt(e,10)),e}function t(e,t){return n(e)?e=t*(parseFloat(e)/100):"string"==typeof e&&e.match(/^\d?\.\d+/gm)&&(e=parseFloat(e)),e}function n(e){return"string"==typeof e&&e.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function i(e,t,n){return!isNaN(e)&&e>=t&&e<=n}function o(e){return 1==(e=e.toString(16)).length?"0"+e:e}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(e,t){this._.initialColorCode=e,this._.defaultValue=t,this._.parseInput(e)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(e[0],e[1],e[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var e=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,e)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",e[0],e[1],e[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);e=this._.rgbToHsl(e[0],e[1],e[2]);return this._.formatHslString("hsl",e[0],e[1],e[2])},getHsla:function(){if(!this._.isValidColor)return this._.defaultValue;var e=this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",e[0],e[1],e[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(e,t,n,i){return CKEDITOR.tools.array.map([e,t,n],(function(e){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-i*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-e))}))},formatHexString:function(e,t,n,i){return e="#"+o(e)+o(t)+o(n),void 0!==i&&(e+=o(i)),e.toUpperCase()},formatRgbString:function(e,t,n,i,o){return t=[t,n,i],void 0!==o&&t.push(o),e+"("+t.join(",")+")"},formatHslString:function(e,t,n,i,o){return e+"("+t+","+n+"%,"+i+"%"+(void 0!==o?","+o:"")+")"},parseInput:function(e){if("string"!=typeof e)this._.isValidColor=!1;else{e=CKEDITOR.tools.trim(e),(t=this._.matchStringToNamedColor(e))&&(e=t);var t=this._.extractColorChannelsFromHex(e),n=this._.extractColorChannelsFromRgba(e);e=this._.extractColorChannelsFromHsla(e),(e=t||n||e)?(this._.red=e[0],this._.green=e[1],this._.blue=e[2],this._.alpha=e[3]):this._.isValidColor=!1}},matchStringToNamedColor:function(e){return CKEDITOR.tools.color.namedColors[e.toLowerCase()]||null},extractColorChannelsFromHex:function(e){if(e.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(e=this._.hex3ToHex6(e)),!e.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!e.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;var t=1;return(e=e.split(""))[7]&&e[8]&&(t=parseInt(e[7]+e[8],16),t/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,t=Number(t.toFixed(1))),[parseInt(e[1]+e[2],16),parseInt(e[3]+e[4],16),parseInt(e[5]+e[6],16),t]},extractColorChannelsFromRgba:function(n){var i=this._.extractColorChannelsByPattern(n,CKEDITOR.tools.color.rgbRegExp);if(!i||(n=0===n.indexOf("rgba"))&&4!==i.length||!n&&3!==i.length)return null;var o=e(i[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),a=e(i[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),r=e(i[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),s=1;return n&&(s=t(i[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)),this._.areColorChannelsValid(o,a,r,s)?[o,a,r,s]:null},extractColorChannelsFromHsla:function(n){var i=this._.extractColorChannelsByPattern(n,CKEDITOR.tools.color.hslRegExp);if(!i||(n=0===n.indexOf("hsla"))&&4!==i.length||!n&&3!==i.length)return null;var o=e(i[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),a=t(i[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),r=t(i[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),s=1;o=this._.hslToRgb(o,a,r);return n&&(s=t(i[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)),o.push(s),this._.areColorChannelsValid(o[0],o[1],o[2],o[3])?o:null},hex3ToHex6:function(e){return"#"+(e=e.split(""))[1]+e[1]+e[2]+e[2]+e[3]+e[3]},extractColorChannelsByPattern:function(e,t){var n=e.match(t);return n?(n=n[2].split(","),CKEDITOR.tools.array.map(n,(function(e){return CKEDITOR.tools.trim(e)}))):null},areColorChannelsValid:function(e,t,n,o){return i(e,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&i(t,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&i(n,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&i(o,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},hslToRgb:function(e,t,n){var i=function(i){var o=(i+e/30)%12;return i=t*Math.min(n,1-n),o=Math.min(o-3,9-o,1),o=Math.max(-1,o),Math.round((n-i*o)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[i(0),i(8),i(4)]},rgbToHsl:function(e,t,n){e/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,t/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var i=n/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,o=Math.max(e,t,i),a=Math.min(e,t,i);n=o-a;var r=0;switch(o){case e:r=(t-i)/n%6;break;case t:r=(i-e)/n+2;break;case i:r=(e-t)/n+4}return e=0===n?0:60*r,t=(o+a)/2,o=0,1!==t&&0!==t&&(o=n/(1-Math.abs(2*t-1))),[e=Math.round(e),o=100*Math.round(o),100*t]}},statics:{MAX_RGB_CHANNEL_VALUE:255,MAX_ALPHA_CHANNEL_VALUE:1,MAX_HUE_CHANNEL_VALUE:360,MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE:1,hex3CharsRegExp:/#([0-9a-f]{3}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/(rgb[a]?)\(([.,\d\s%]*)\)/i,hslRegExp:/(hsl[a]?)\(([.,\d\s%]*)\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}}}),CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors}(),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,a=null,r=null,s=[],l=e;i=i||e.getDocument().getBody(),l||(l=i);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(!r&&(o=l.getName(),"true"==l.getAttribute("contenteditable")?r=l:!a&&n[o]&&(a=l),t[o])){if(o=!a&&"div"==o){e:{for(var c=0,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}o?a=l:r=l}}}while(l=l.getParent());r||(r=i),this.block=a,this.blockLimit=r,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,o=0;"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-1<CKEDITOR.tools.indexOf(e,t.getName())}:"function"==typeof e?i=e:"object"==typeof e&&(i=function(t){return t.getName()in e});var a=this.elements,r=a.length;for(t&&(n?o+=1:--r),n&&(a=Array.prototype.slice.call(a,0)).reverse();o<r;o++)if(i(a[o]))return a[o];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},isEmpty:function(e){var t=this.getText();return e&&(t=CKEDITOR.tools.trim(t)),!t||t===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(e){var t=this.$.parentNode,n=t.childNodes.length,i=this.getLength(),o=this.getDocument(),a=new CKEDITOR.dom.text(this.$.splitText(e),o);return t.childNodes.length==n&&(e>=i?(a=o.createText("")).insertAfter(this):((e=o.createText("")).insertAfter(a),e.remove())),a},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"],a=n?"endOffset":"startOffset",r=i?t.document.getById(e.startNode):e.startNode;return e=i?t.document.getById(e.endNode):e.endNode,o.equals(r.getPrevious())?(t.startOffset=t.startOffset-o.getLength()-e.getPrevious().getLength(),o=e.getNext()):o.equals(e.getPrevious())&&(t.startOffset-=o.getLength(),o=e.getNext()),o.equals(r.getParent())&&t[a]++,o.equals(e.getParent())&&t[a]++,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 a=t[e=void 0===e?0:e+1];if(a&&1<t.length){if(!e)for(var r=t.length-1;0<=r;r--)i.unshift(t[r].createBookmark(!0));if(o)for(var s=0;t[e+s+1];){var l=a.document;for(o=0,r=l.getById(i[s].endNode),l=l.getById(i[s+1].startNode);;){if(r=r.getNextSourceNode(!1),l.equals(r))o=1;else if(n(r)||r.type==CKEDITOR.NODE_ELEMENT&&r.isBlockBoundary())continue;break}if(!o)break;s++}for(a.moveToBookmark(i.shift());s--;)(r=t[++e]).moveToBookmark(i.shift()),a.setEnd(r.endContainer,r.endOffset)}return a}}},createBookmarks:function(t){for(var n,i=[],o=0;o<this.length;o++){i.push(n=this[o].createBookmark(t,!0));for(var a=o+1;a<this.length;a++)this[a]=e(n,this[a]),this[a]=e(n,this[a],!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,a=0;a<n.length;a++)if(o=n[a],i.ie&&(o.replace(/^ie/,"")==i.version||i.quirks&&"iequirks"==o)&&(o="ie"),i[o]){t+="_"+n[a];break}}return CKEDITOR.getUrl(e()+t+".css")}function n(e,n){a[e]||(CKEDITOR.document.appendStyleSheet(t(e)),a[e]=1),n&&n()}function i(e){var t=e.getById(r);return t||((t=e.getHead().append("style")).setAttribute("id",r),t.setAttribute("type","text/css")),t}function o(e,t,n){var i,o,a;if(CKEDITOR.env.webkit)for(t=t.split("}").slice(0,-1),o=0;o<t.length;o++)t[o]=t[o].split("{");for(var r=0;r<e.length;r++)if(CKEDITOR.env.webkit)for(o=0;o<t.length;o++){for(a=t[o][1],i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);e[r].$.sheet.addRule(t[o][0],a)}else{for(a=t,i=0;i<n.length;i++)a=a.replace(n[i][0],n[i][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?e[r].$.styleSheet.cssText+=a:e[r].$.innerHTML+=a}}var a={};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 a;return e&&(e=e.toLowerCase(),t&&(a=this.icons[e+"-rtl"]),a||(a=this.icons[e])),e=n||a&&a.path||"",i=i||a&&a.offset,o=o||a&&a.bgsize||"16px",e&&(e=e.replace(/'/g,"\\'")),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){this.uiColor=e;var n=CKEDITOR.skin.chameleon,i="",a="";"function"==typeof n&&(i=n(this,"editor"),a=n(this,"panel")),o([t],i,e=[[l,e]]),o(s,a,e)}).call(this,e)}});var r="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")){var n=i(e);s.push(n),t.on("destroy",(function(){s=CKEDITOR.tools.array.filter(s,(function(e){return n!==e}))})),(e=t.getUiColor())&&o([n],CKEDITOR.skin.chameleon(t,"panel"),[[l,e]])}},t.on("panelShow",e),t.on("menuShow",e),t.config.uiColor&&t.setUiColor(t.config.uiColor)}}))}(),function(){var e=CKEDITOR.dom.element.createFromHtml('<div style="width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"></div>',CKEDITOR.document);e.appendTo(CKEDITOR.document.getHead());try{var t=e.getComputedStyle("border-top-color"),n=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!t||t!=n)}catch(e){CKEDITOR.env.hc=!1}if(e.remove(),CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc"),CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"),CKEDITOR.status="loaded",CKEDITOR.fireOnce("loaded"),e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,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-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var e=function(e,t){for(var n=e.match(/[^#]./g),i=0;3>i;i++){var o,a=i;o=parseInt(n[i],16),o=("0"+(0>t?0|o*(1+t):0|o+(255-o)*t).toString(16)).slice(-2),n[a]=o}return"#"+n.join("")},t={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {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} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {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:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};return function(n,i){var o=e(n.uiColor,.4);o={id:"."+n.id,defaultBorder:e(o,-.2),toolbarElementsBorder:e(o,-.25),defaultBackground:o,lightBackground:e(o,.8),darkBackground:e(o,-.15),ckeButtonOn:e(o,.4),ckeResizer:e(o,-.4),ckeColorauto:e(o,.8),dialogBody:e(o,.7),dialogTab:e(o,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:e(o,-.6),menubuttonHover:e(o,.1),menubuttonIcon:e(o,.5),menubuttonIconHover:e(o,.3)};return t[i].output(o).replace(/\[/g,"{").replace(/\]/g,"}")}}(),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),a=/^on([A-Z]\w+)/,r=function(e){for(var t in e)(a.test(t)||"title"==t||"type"==t)&&delete e[t];return e},s=function(e){(e=e.data.getKeystroke())==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):e==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(t,n,i,o){if(!(4>arguments.length)){var a=e.call(this,n);a.labelId=CKEDITOR.tools.getNextId()+"_label",this._.children=[];var r={role:n.role||"presentation"};n.includeLabel&&(r["aria-labelledby"]=a.labelId),CKEDITOR.ui.dialog.uiElement.call(this,t,n,i,"div",null,r,(function(){var e=[],i=n.required?" cke_required":"";return"horizontal"!=n.labelLayout?e.push('<label class="cke_dialog_ui_labeled_label'+i+'" ',' id="'+a.labelId+'"',a.inputId?' for="'+a.inputId+'"':"",(n.labelStyle?' style="'+n.labelStyle+'"':"")+">",n.label,"</label>",'<div class="cke_dialog_ui_labeled_content"',n.controlStyle?' style="'+n.controlStyle+'"':"",' role="presentation">',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="'+a.labelId+'" for="'+a.inputId+'"'+(n.labelStyle?' style="'+n.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(n.label)+"</label>"},{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",a={class:"cke_dialog_ui_input_"+n.type,id:o,type:n.type};n.validate&&(this.validate=n.validate),n.maxLength&&(a.maxlength=n.maxLength),n.size&&(a.size=n.size),n.inputStyle&&(a.style=n.inputStyle);var r=this,l=!1;t.on("load",(function(){r.getInputElement().on("keydown",(function(e){13==e.data.getKeystroke()&&(l=!0)})),r.getInputElement().on("keyup",(function(e){13==e.data.getKeystroke()&&l&&(t.getButton("ok")&&setTimeout((function(){t.getButton("ok").click()}),0),l=!1),r.bidi&&s.call(r,e)}),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 "),a["aria-labelledby"]=this._.labelId,this._.required&&(a["aria-required"]=this._.required),a)e.push(t+'="'+a[t]+'" ');return e.push(" /></div>"),e.join("")}))}},textarea:function(t,n,i){if(!(3>arguments.length)){e.call(this,n);var o=this,a=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",r={};n.validate&&(this.validate=n.validate),r.rows=n.rows||5,r.cols=n.cols||20,r.class="cke_dialog_ui_input_textarea "+(n.class||""),void 0!==n.inputStyle&&(r.style=n.inputStyle),n.dir&&(r.dir=n.dir),o.bidi&&t.on("load",(function(){o.getInputElement().on("keyup",s)}),o),CKEDITOR.ui.dialog.labeledElement.call(this,t,n,i,(function(){r["aria-labelledby"]=this._.labelId,this._.required&&(r["aria-required"]=this._.required);var e,t=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea id="',a,'" '];for(e in r)t.push(e+'="'+CKEDITOR.tools.htmlEncode(r[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=[],a=CKEDITOR.tools.getNextId()+"_label",s={class:"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":a};return r(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="',a,'" 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.validate);var o=[],a=this;n.role="radiogroup",n.includeLabel=!0,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=(f=CKEDITOR.tools.getNextId()+"_radio_input")+"_label",f=CKEDITOR.tools.extend({},n,{id:f,title:null,type:null},!0),g=(d=CKEDITOR.tools.extend({},f,{title:d},!0),{type:"radio",class:"cke_dialog_ui_radio_input",name:s,value:u,"aria-labelledby":h}),m=[];a._.default==u&&(g.checked="checked"),r(f),r(d),void 0!==f.inputStyle&&(f.style=f.inputStyle),f.keyboardFocusable=!0,o.push(new CKEDITOR.ui.dialog.uiElement(t,f,m,"input",null,g)),m.push(" "),new CKEDITOR.ui.dialog.uiElement(t,d,m,"label",null,{id:h,for:g.id},c[0]),e.push(m.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 a=CKEDITOR.tools.extend({},n);delete a.style;var r=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,t,a,i,"a",null,{style:n.style,href:"javascript:void(0)",title:n.label,hidefocus:"true",class:n.class,role:"button","aria-labelledby":r},'<span id="'+r+'" 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=[],a=[],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(">"),void 0!==n.size&&(s.size=n.size),void 0!==n.multiple&&(s.multiple=n.multiple),r(e);for(var l,c=0;c<n.items.length&&(l=n.items[c]);c++)a.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,a.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){var o=this;if(!(3>arguments.length)){e.call(this,n),n.validate&&(this.validate=n.validate);var a=CKEDITOR.tools.extend({},n),r=a.onClick;a.className=(a.className?a.className+" ":"")+"cke_dialog_ui_button",a.onClick=function(e){var i=n.for;!1!==(e=!!r&&r.call(this,e))&&("xhr"!==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,a,i)}},html:function(){var e=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,n=/\/$/;return function(i,o,a){if(!(3>arguments.length)){var r=[],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,r,"span",null,null,""),r=r.join("").match(e),s=s.match(t)||["","",""],n.test(s[1])&&(s[1]=s[1].slice(0,-1),s[2]="/"+s[2]),a.push([s[1]," ",r[1]||"",s[2]].join(""))}}}(),fieldset:function(e,t,n,i,o){var a=o.label;this._={children:t},CKEDITOR.ui.dialog.uiElement.call(this,e,o,i,"fieldset",null,null,(function(){var e=[];a&&e.push("<legend"+(o.labelStyle?' style="'+o.labelStyle+'"':"")+">"+a+"</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){if(this.bidi){var t=e&&e.charAt(0);(t=""==t?"ltr":""==t?"rtl":null)&&(e=e.slice(1)),this.setDirectionMarker(t)}return e||(e=""),CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var e=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&e){var t=this.getDirectionMarker();t&&(e=("ltr"==t?"":"")+e)}return e},setDirectionMarker:function(e){var t=this.getInputElement();e?t.setAttributes({dir:e,"data-cke-dir-marker":e}):this.getDirectionMarker()&&t.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},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||8<CKEDITOR.env.version?o.onChange.apply(this,arguments):(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)}}},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 style="width:100%" 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("+a+");","window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction("+r+")}","<\/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,a=this.formLoadedNumber,r=this.formUnloadNumber,s=t.dialog._.editor.lang.dir,l=t.dialog._.editor.langCode;a||(a=this.formLoadedNumber=CKEDITOR.tools.addFunction((function(){this.fire("formLoaded")}),this),r=this.formUnloadNumber=CKEDITOR.tools.addFunction((function(){this.getInputElement().clearCustomData()}),this),this.getDialog()._.editor.on("destroy",(function(){CKEDITOR.tools.removeFunction(a),CKEDITOR.tools.removeFunction(r)}))),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("tel",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,a=[],r=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];a.push(l),r.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,r,a,n,t)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function e(e){e._.tabBarMode=!0,e._.tabs[e._.currentTabId][0].focus(),e._.currentFocusIndex=-1}function t(){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 n(){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 i(e,t){for(var n=e.$.getElementsByTagName("input"),i=0,o=n.length;i<o;i++){var a=new CKEDITOR.dom.element(n[i]);"text"==a.getAttribute("type").toLowerCase()&&(t?(a.setAttribute("value",a.getCustomData("fake_value")||""),a.removeCustomData("fake_value")):(a.setCustomData("fake_value",a.getAttribute("value")),a.setAttribute("value","")))}}function o(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 a(){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 s(e,t){this.dialog=e;for(var n,i=t.contents,o=0;n=i[o];o++)i[o]=n&&new l(e,n);CKEDITOR.tools.extend(this,t)}function l(e,t){this._={dialog:e},CKEDITOR.tools.extend(this,t)}function c(e,t,n){var i=e.parts.dialog.getParent().getClientSize(),o=e.getSize(),a=e._.viewportRatio,r=Math.max(i.width-o.width,0);i=Math.max(i.height-o.height,0);a.width=r?t/r:a.width,a.height=i?n/i:a.height,e._.viewportRatio=a}function d(e){e.data.preventDefault(1)}function u(e){var t=e.config,n=CKEDITOR.skinName||e.config.skin,i=t.dialog_backgroundCoverColor||("moono-lisa"==n?"black":"white"),o=(n=t.dialog_backgroundCoverOpacity,t.baseFloatZIndex),a=(t=CKEDITOR.tools.genKey(i,n,o),_[t]);CKEDITOR.document.getBody().addClass("cke_dialog_open"),a?a.show():(o=['<div tabIndex="-1" style="position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",o,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+i,'" class="cke_dialog_background_cover">'],CKEDITOR.env.ie6Compat&&(i="<html><body style=\\'background-color:"+i+";\\'></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( '"+i+"' );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(void 0!==n?n:.5),a.on("keydown",d),a.on("keypress",d),a.on("keyup",d),a.appendTo(CKEDITOR.document.getBody()),_[t]=a),e.focusManager.add(a),C=a,CKEDITOR.env.mac&&CKEDITOR.env.webkit||a.focus()}function h(e){CKEDITOR.document.getBody().removeClass("cke_dialog_open"),C&&(e.focusManager.remove(C),C.hide())}function f(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=K[(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())}function g(e){var t=e.data.$.ctrlKey||e.data.$.metaKey,n=e.data.$.altKey,i=e.data.$.shiftKey,o=String.fromCharCode(e.data.$.keyCode);(t=K[(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()))}function m(e,t,n,i,o){(K[n]||(K[n]=[])).push({uiElement:e,dialog:t,key:n,keyup:o||e.accessKeyUp,keydown:i||e.accessKeyDown})}function p(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])}function E(){}var T,C,I=CKEDITOR.tools.cssLength,O=!1,D=!CKEDITOR.env.ie||CKEDITOR.env.edge,R='<div class="cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir="{langDir}" style="'+(D?"display:flex":"")+'" lang="{langCode}" role="dialog" aria-labelledby="cke_dialog_title_{id}"><table class="cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style="'+(D?"margin:auto":"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(i,r){function l(e){var t=D._.focusList;if(e=e||0,!(1>t.length)){var n=D._.currentFocusIndex;D._.tabBarMode&&0>e&&(n=0);try{t[n].getInputElement().$.blur()}catch(e){}var i=n,o=1<D._.pageCount;do{if(i+=e,o&&!D._.tabBarMode&&(i==t.length||-1==i))return D._.tabBarMode=!0,D._.tabs[D._.currentTabId][0].focus(),void(D._.currentFocusIndex=-1);if((i=(i+t.length)%t.length)==n)break}while(e&&!t[i].isFocusable());t[i].focus(),"text"==t[i].type&&t[i].select()}}function d(o){if(D==CKEDITOR.dialog._.currentTop){var a=o.data.getKeystroke(),r="rtl"==i.lang.dir;if(h=f=0,9==a||a==CKEDITOR.SHIFT+9)l(a==CKEDITOR.SHIFT+9?-1:1),h=1;else if(a==CKEDITOR.ALT+121&&!D._.tabBarMode&&1<D.getPageCount())e(D),h=1;else if(-1!=CKEDITOR.tools.indexOf([37,38,39,40],a)&&D._.tabBarMode)a=-1!=CKEDITOR.tools.indexOf([r?39:37,38],a)?t.call(D):n.call(D),D.selectPage(a),D._.tabs[a][0].focus(),h=1;else if(13!=a&&32!=a||!D._.tabBarMode)if(13==a)(a=o.data.getTarget()).is("a","button","select","textarea")||a.is("input")&&"button"==a.$.type||((a=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(a.click,0,a),h=1),f=1;else{if(27!=a)return;(a=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(a.click,0,a):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),f=1}else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),h=1;u(o)}}function u(e){h?e.data.preventDefault(1):f&&e.data.stopPropagation()}var h,f,g=CKEDITOR.dialog._.dialogDefinitions[r],m=CKEDITOR.tools.clone(T),p=i.config.dialog_buttonsOrder||"OS",E=i.lang.dir,I={};if(("OS"==p&&CKEDITOR.env.mac||"rtl"==p&&"ltr"==E||"ltr"==p&&"rtl"==E)&&m.buttons.reverse(),g=CKEDITOR.tools.extend(g(i),m),g=new s(this,g=CKEDITOR.tools.clone(g)),m=function(e){var t=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",R).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":""})),n=t.getChild([0,0,0,0,0]),i=n.getChild(0),o=n.getChild(1);return e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(n),!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(e="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('<iframe frameBorder="0" class="cke_iframe_shim" src="'+e+'" tabIndex="-1"></iframe>').appendTo(n.getParent())),i.unselectable(),o.unselectable(),{element:t,parts:{dialog:t.getChild(0),title:i,close:o,tabs:n.getChild(2),contents:n.getChild([3,0,0,0]),footer:n.getChild([3,0,1,0])}}}(i),this._={editor:i,element:m.element,name:r,model:null,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=m.parts,CKEDITOR.tools.setTimeout((function(){i.fire("ariaWidget",this.parts.contents)}),0,this),m={top:0,visibility:"hidden"},CKEDITOR.env.ie6Compat&&(m.position="absolute"),m["rtl"==E?"right":"left"]=0,this.parts.dialog.setStyles(m),CKEDITOR.event.call(this),this.definition=g=CKEDITOR.fire("dialogDefinition",{name:r,definition:g,dialog:this},i).definition,!("removeDialogTabs"in i._)&&i.config.removeDialogTabs){for(m=i.config.removeDialogTabs.split(";"),E=0;E<m.length;E++)if(2==(p=m[E].split(":")).length){var O=p[0];I[O]||(I[O]=[]),I[O].push(p[1])}i._.removeDialogTabs=I}if(i._.removeDialogTabs&&(I=i._.removeDialogTabs[r]))for(E=0;E<I.length;E++)g.removeContents(I[E]);g.onLoad&&this.on("load",g.onLoad),g.onShow&&this.on("show",g.onShow),g.onHide&&this.on("hide",g.onHide),g.onOk&&this.on("ok",(function(e){i.fire("saveSnapshot"),setTimeout((function(){i.fire("saveSnapshot")}),0),!1===g.onOk.call(this,e)&&(e.data.hide=!1)})),this.state=CKEDITOR.DIALOG_STATE_IDLE,g.onCancel&&this.on("cancel",(function(e){!1===g.onCancel.call(this,e)&&(e.data.hide=!1)}));var D=this,v=function(e){var t,n=D._.contents;for(t in n)for(var i in n[t])if(e.call(this,n[t][i]))return};this.on("ok",(function(e){v((function(t){if(t.validate){var n=t.validate(this),i="string"==typeof n||!1===n;return i&&(e.data.hide=!1,e.stop()),o.call(t,!i,"string"==typeof n?n:void 0),i}}))}),this,null,0),this.on("cancel",(function(e){v((function(t){if(t.isChanged())return i.config.dialog_noConfirmCancel||confirm(i.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=l;var b=this._.element;for(i.focusManager.add(b,1),this.on("show",(function(){b.on("keydown",d,this),CKEDITOR.env.gecko&&b.on("keypress",u,this)})),this.on("hide",(function(){b.removeListener("keydown",d),CKEDITOR.env.gecko&&b.removeListener("keypress",u),v((function(e){a.apply(e)}))})),this.on("iframeAdded",(function(e){new CKEDITOR.dom.document(e.data.iframe.$.contentWindow.document).on("keydown",d,this,null,0)})),this.on("show",(function(){!function(){var e=D._.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}();var e=1<D._.pageCount;i.config.dialog_startupFocusTab&&e?(D._.tabBarMode=!0,D._.tabs[D._.currentTabId][0].focus(),D._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=e?-1:this._.focusList.length-1,g.onFocus?(e=g.onFocus.call(this))&&e.focus():l(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=e.parts.dialog.getParent().getClientSize(),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,c=o.x+s[3]<r?-s[3]:o.x-s[1]>l.width-n.width-r?l.width-n.width+("rtl"==a.lang.dir?0:s[1]):o.x,n=o.y+s[0]<r?-s[0]:o.y-s[2]>l.height-n.height-r?l.height-n.height+s[2]:o.y,c=Math.floor(c),n=Math.floor(n),e.move(c,n,1),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.env.ie6Compat){var e=C.getChild(0).getFrameDocument();e.removeListener("mousemove",t),e.removeListener("mouseup",n)}}var i=null,o=null,a=e.getParentEditor(),r=a.config.dialog_magnetDistance,s=CKEDITOR.skin.margins||[0,0,0,0];void 0===r&&(r=20),e.parts.title.on("mousedown",(function(a){if(!e._.moved){var r=e._.element;r.getFirst().setStyle("position","absolute"),r.removeStyle("display"),e._.moved=!0,e.layout()}i={x:a.data.$.screenX,y:a.data.$.screenY},CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),o=e.getPosition(),CKEDITOR.env.ie6Compat&&((r=C.getChild(0).getFrameDocument()).on("mousemove",t),r.on("mouseup",n)),a.data.preventDefault()}),e)}(this),function(e){function t(t){var n="rtl"==h.lang.dir,u=d.width,f=d.height,g=u+(t.data.$.screenX-l.x)*(n?-1:1)*(e._.moved?1:2),m=f+(t.data.$.screenY-l.y)*(e._.moved?1:2),p=e._.element.getFirst(),E=(p=n&&parseInt(p.getComputedStyle("right"),10),e.getPosition());E.x=E.x||0,E.y=E.y||0,E.y+m>s.height&&(m=s.height-E.y),(n?p:E.x)+g>s.width&&(g=s.width-(n?p:E.x)),m=Math.floor(m),g=Math.floor(g),o!=CKEDITOR.DIALOG_RESIZE_WIDTH&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(u=Math.max(i.minWidth||0,g-a)),o!=CKEDITOR.DIALOG_RESIZE_HEIGHT&&o!=CKEDITOR.DIALOG_RESIZE_BOTH||(f=Math.max(i.minHeight||0,m-r)),e.resize(u,f),e._.moved&&c(e,e._.position.x,e._.position.y),e._.moved||e.layout(),t.data.preventDefault()}function n(){if(CKEDITOR.document.removeListener("mouseup",n),CKEDITOR.document.removeListener("mousemove",t),u&&(u.remove(),u=null),CKEDITOR.env.ie6Compat){var e=C.getChild(0).getFrameDocument();e.removeListener("mouseup",n),e.removeListener("mousemove",t)}}var i=e.definition,o=i.resizable;if(o!=CKEDITOR.DIALOG_RESIZE_NONE){var a,r,s,l,d,u,h=e.getParentEditor(),f=CKEDITOR.tools.addFunction((function(i){function o(e){return e.isVisible()}d=e.getSize();var c=e.parts.contents,h=c.$.getElementsByTagName("iframe").length,f=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);h&&(u=CKEDITOR.dom.element.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%; left:0; top:0;"></div>'),c.append(u)),r=d.height-e.parts.contents.getFirst(o).getSize("height",f),a=d.width-e.parts.contents.getFirst(o).getSize("width",1),l={x:i.screenX,y:i.screenY},s=CKEDITOR.document.getWindow().getViewPaneSize(),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),CKEDITOR.env.ie6Compat&&((c=C.getChild(0).getFrameDocument()).on("mousemove",t),c.on("mouseup",n)),i.preventDefault&&i.preventDefault()}));e.on("load",(function(){var t="";o==CKEDITOR.DIALOG_RESIZE_WIDTH?t=" cke_resizer_horizontal":o==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('+f+', event )">'+("ltr"==h.lang.dir?"◢":"◣")+"</div>"),e.parts.footer.append(t,1)})),h.on("destroy",(function(){CKEDITOR.tools.removeFunction(f)}))}}(this),new CKEDITOR.dom.text(g.title,CKEDITOR.document).appendTo(this.parts.title),E=0;E<g.contents.length;E++)(I=g.contents[E])&&this.addPage(I);for(this.parts.tabs.on("click",(function(t){var n=t.data.getTarget();n.hasClass("cke_dialog_tab")&&(n=n.$.id,this.selectPage(n.substring(4,n.lastIndexOf("_"))),e(this),t.data.preventDefault())}),this),E=[],I=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:g.buttons},E).getChild(),this.parts.footer.setHtml(E.join("")),E=0;E<I.length;E++)this._.buttons[I[E].id]=I[E]},CKEDITOR.dialog.prototype={destroy:function(){this.hide(),this._.element.remove()},resize:function(e,t){if(!this._.contentSize||this._.contentSize.width!=e||this._.contentSize.height!=t){if(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){var n=this.parts.dialog.getParent().getClientSize().width;this._.position.x=n-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;CKEDITOR.env.ie&&i.setStyle("zoom","100%");var a=this.parts.dialog.getParent().getClientSize(),r=this.getSize(),s=this._.viewportRatio,l=Math.max(a.width-r.width,0);a=Math.max(a.height-r.height,0);this._.position&&this._.position.x==e&&this._.position.y==t?(e=Math.floor(l*s.width),t=Math.floor(a*s.height)):c(this,e,t),this._.position={x:e,y:t},o&&(e=l-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,n=CKEDITOR.document.getBody(),i=this._.editor.config.baseFloatZIndex;for(var o in e.getParent()&&e.getParent().equals(n)?e.setStyle("display",D?"flex":"block"):e.appendTo(n),this.resize(this._.contentSize&&this._.contentSize.width||t.width||t.minWidth,this._.contentSize&&this._.contentSize.height||t.height||t.minHeight),this.reset(),null===this._.currentTabId&&this.selectPage(this.definition.contents[0].id),null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=i),this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10),this.getElement().setStyle("z-index",CKEDITOR.dialog._.currentZIndex),null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,u(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,(n=this._.parentDialog.getElement().getFirst()).$.style.zIndex-=Math.floor(i/2),this._.parentDialog.getElement().setStyle("z-index",n.$.style.zIndex),CKEDITOR.dialog._.currentTop=this),e.on("keydown",f),e.on("keyup",g),this._.hasFocus=!1,t.contents)if(t.contents[o]){e=t.contents[o],i=this._.tabs[e.id],n=e.requiredContent;var a=0;if(i){for(var r in this._.contents[e.id]){var s=this._.contents[e.id][r];"hbox"!=s.type&&"vbox"!=s.type&&s.getInputElement()&&(s.requiredContent&&!this._.editor.activeFilter.check(s.requiredContent)?s.disable():(s.enable(),a++))}!a||n&&!this._.editor.activeFilter.check(n)?i[0].addClass("cke_dialog_tab_disabled"):i[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;if(this._.moved||!D){var t,n=this.getSize(),i=CKEDITOR.document.getWindow().getViewPaneSize();this._.moved&&this._.position?(t=this._.position.x,n=this._.position.y):(t=(i.width-n.width)/2,n=(i.height-n.height)/2),CKEDITOR.env.ie6Compat||(e.setStyle("position","absolute"),e.removeStyle("margin")),t=Math.floor(t),n=Math.floor(n),this.move(t,n)}},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"),function(e){for(var t in K){for(var n=K[t],i=n.length-1;0<=i;i--)n[i].dialog!=e&&n[i].uiElement!=e||n.splice(i,1);0===n.length&&delete K[t]}}(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var t=this._.parentDialog.getElement().getFirst();this._.parentDialog.getElement().removeStyle("z-index"),t.setStyle("z-index",parseInt(t.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else h(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null,e.removeListener("keydown",f),e.removeListener("keyup",g);var n=this._.editor;n.focus(),setTimeout((function(){n.focusManager.unlock(),CKEDITOR.env.iOS&&n.window.focus()}),0)}delete this._.parentDialog,this.foreach((function(e){e.resetInitValue&&e.resetInitValue()})),this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},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]={},a=i.getChild(),r=0;i=a.shift();)i.notAllowed||"hbox"==i.type||"vbox"==i.type||r++,o[i.id]=i,"function"==typeof i.getChild&&a.push.apply(a,i.getChild());r||(e.hidden=!0),(t=CKEDITOR.dom.element.createFromHtml(t.join(""))).setAttribute("role","tabpanel"),t.setStyle("min-height","100%"),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&&!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&&(m(this,this,"CTRL+"+e.accessKey,E,p),this._.accessKeyMap["CTRL+"+e.accessKey]=e.id)}},selectPage:function(e){if(this._.currentTabId!=e&&!this._.tabs[e][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:e,currentPage:this._.currentTabId})){for(var t in this._.tabs){var n=this._.tabs[t][0],o=this._.tabs[t][1];t!=e&&(n.removeClass("cke_dialog_tab_selected"),n.removeAttribute("aria-selected"),o.hide()),o.setAttribute("aria-hidden",t!=e)}var a=this._.tabs[e];a[0].addClass("cke_dialog_tab_selected"),a[0].setAttribute("aria-selected",!0),CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(i(a[1]),a[1].show(),setTimeout((function(){i(a[1],1)}),0)):a[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(e){var n=this._.tabs[e]&&this._.tabs[e][0];n&&1!=this._.pageCount&&n.isVisible()&&(e==this._.currentTabId&&this.selectPage(t.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++}},setState:function(e){if(this.state!=e){if(this.state=e,e==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var t=this.getParentEditor().lang.dir,n={attributes:{class:"cke_dialog_spinner"},styles:{float:"rtl"==t?"right":"left"}};n.styles["margin-"+("rtl"==t?"left":"right")]="8px",this.parts.spinner=CKEDITOR.document.createElement("div",n),this.parts.spinner.setHtml("⌛"),this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show(),this.getButton("ok").disable()}else e==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",e)}},getModel:function(e){return this._.model?this._.model:this.definition.getModel?this.definition.getModel(e):null},setModel:function(e){this._.model=e},getMode:function(e){return this.definition.getMode?this.definition.getMode(e):!(e=this.getModel(e))||e instanceof CKEDITOR.dom.element&&!e.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}},CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,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(new 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),T={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var v=function(e,t,n){for(var i,o=0;i=e[o];o++)if(i.id==t||n&&i[n]&&(i=v(i[n],t,n)))return i;return null},b=function(e,t,n,i,o){if(n){for(var a,r=0;a=e[r];r++){if(a.id==n)return e.splice(r,0,t),t;if(i&&a[i]&&(a=b(a[i],t,n,i,!0)))return a}if(o)return null}return e.push(t),t},y=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=y(i[n],t,n)))return i}return null};s.prototype={getContents:function(e){return v(this.contents,e)},getButton:function(e){return v(this.buttons,e)},addContents:function(e,t){return b(this.contents,e,t)},addButton:function(e,t){return b(this.buttons,e,t)},removeContents:function(e){y(this.contents,e)},removeButton:function(e){y(this.buttons,e)}},l.prototype={get:function(e){return v(this.elements,e,"children")},add:function(e,t){return b(this.elements,e,t,"children")},remove:function(e){y(this.elements,e,"children")}};var _={},K={};CKEDITOR.ui.dialog={uiElement:function(e,t,n,i,o,a,r){if(!(4>arguments.length)){var s=(i.call?i(t):i)||"div",l=["<",s," "],c=(o&&o.call?o(t):o)||{},d=(a&&a.call?a(t):a)||{},u=(r&&r.call?r.call(this,e,t):r)||"",h=this.domId=d.id||CKEDITOR.tools.getNextId()+"_uiElement";t.requiredContent&&!e.getParentEditor().filter.check(t.requiredContent)&&(c.display="none",this.notAllowed=!0),d.id=h;var f={};t.type&&(f["cke_dialog_ui_"+t.type]=1),t.className&&(f[t.className]=1),t.disabled&&(f.cke_disabled=1);var g=d.class&&d.class.split?d.class.split(" "):[];for(h=0;h<g.length;h++)g[h]&&(f[g[h]]=1);for(h in g=[],f)g.push(h);for(h in d.class=g.join(" "),t.title&&(d.title=t.title),f=(t.style||"").split(";"),t.align&&(g=t.align,c["margin-left"]="left"==g?0:"auto",c["margin-right"]="right"==g?0:"auto"),c)f.push(h+":"+c[h]);for(t.hidden&&f.push("display:none"),h=f.length-1;0<=h;h--)""===f[h]&&f.splice(h,1);for(h in 0<f.length&&(d.style=(d.style?d.style+"; ":"")+f.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&&m(this,e,"CTRL+"+t.accessKey);var p=this;e.on("load",(function(){var t=p.getInputElement();if(t){var n=p.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";t.on("focus",(function(){e._.tabBarMode=!1,e._.hasFocus=!0,p.fire("focus"),n&&this.addClass(n)})),t.on("blur",(function(){p.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=p.focusIndex})))}},hbox:function(e,t,n,i,o){if(!(4>arguments.length)){this._||(this._={});var a,r=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(a=0;a<n.length;a++){var t="cke_dialog_ui_hbox_child",i=[];0===a&&(t="cke_dialog_ui_hbox_first"),a==n.length-1&&(t="cke_dialog_ui_hbox_last"),e.push('<td class="',t,'" role="presentation" '),s?s[a]&&i.push("width:"+I(s[a])):i.push("width:"+Math.floor(100/n.length)+"%"),l&&i.push("height:"+I(l)),o&&void 0!==o.padding&&i.push("padding:"+I(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&r[a].align&&i.push("text-align:"+r[a].align),0<i.length&&e.push('style="'+i.join("; ")+'" '),e.push(">",n[a],"</td>")}return e.push("</tr></tbody>"),e.join("")}))}},vbox:function(e,t,n,i,o){if(!(3>arguments.length)){this._||(this._={});var a=this._.children=t,r=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:"+I(r||"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" '),r&&l.push("width:"+I(r||"100%")),s?l.push("height:"+I(s[i])):o&&o.expand&&l.push("height:"+Math.floor(100/n.length)+"%"),o&&void 0!==o.padding&&l.push("padding:"+I(o.padding)),CKEDITOR.env.ie&&CKEDITOR.env.quirks&&a[i].align&&l.push("text-align:"+a[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,a=[],r=[],s=0;s<o.length&&(i=o[s]);s++){var l=[];a.push(l),r.push(CKEDITOR.dialog._.uiElementBuilders[i.type].build(e,i,l))}return new CKEDITOR.ui.dialog[t.type](e,r,a,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){var t=this.tabId;e.openDialog(this.dialogName,(function(e){t&&e.selectPage(t)}))},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,a=/^(--|-?([a-zA-Z_]|\\))(\\|[a-zA-Z0-9-_])*\s*?:\s*?[^:;]+$/;CKEDITOR.VALIDATE_OR=1,CKEDITOR.VALIDATE_AND=2,CKEDITOR.dialog.validate={functions:function(){var e=arguments;return function(){var t,n,i=this&&this.getValue?this.getValue():e[0],o=CKEDITOR.VALIDATE_AND,a=[];for(n=0;n<e.length&&"function"==typeof e[n];n++)a.push(e[n]);n<e.length&&"string"==typeof e[n]&&(t=e[n],n++),n<e.length&&"number"==typeof e[n]&&(o=e[n]);var r=o==CKEDITOR.VALIDATE_AND;for(n=0;n<a.length;n++)r=o==CKEDITOR.VALIDATE_AND?r&&a[n](i):r||a[n](i);return!!r||t}},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""===(e=CKEDITOR.tools.trim(e).split(";"))[e.length-1]&&e.pop(),CKEDITOR.tools.array.every(e,(function(e){return a.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 _)_[n].remove();_={}}for(var i in e=e.editor._.storedDialogs)e[i].destroy()}))}(),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(e,t,n){var i=null,o=CKEDITOR.dialog._.dialogDefinitions[e];if(null===CKEDITOR.dialog._.currentTop&&u(this),"function"==typeof o)o=this._.storedDialogs||(this._.storedDialogs={}),(i=o[e]||(o[e]=new CKEDITOR.dialog(this,e))).setModel(n),t&&t.call(i,i),i.show();else{if("failed"==o)throw h(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+e+'" failed when loading definition.');"string"==typeof o&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(o),(function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[e]&&(CKEDITOR.dialog._.dialogDefinitions[e]="failed"),this.openDialog(e,t,n)}),this,0,1)}return CKEDITOR.skin.loadPart("dialog"),i&&i.once("hide",(function(){i.setModel(null)}),null,null,999),i}}),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(e){O||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),O=!0),e.on("doubleclick",(function(t){t.data.dialog&&e.openDialog(t.data.dialog)}),null,null,999)}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(e){var t=e.addCommand("about",new CKEDITOR.dialogCommand("about"));t.modes={wysiwyg:1,source:1},t.canUndo=!1,t.readOnly=1,e.ui.addButton&&e.ui.addButton("About",{label:e.lang.about.dlgTitle,command:"about",toolbar:"about"}),CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(e){var t=this;e.addCommand("a11yHelp",{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(){e.lang.a11yhelp=t.langEntries[n],e.openDialog("a11yHelp")}))},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1}),e.setKeystroke(CKEDITOR.ALT+48,"a11yHelp"),CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js"),e.on("ariaEditorHelpLabel",(function(t){t.data.label=e.lang.common.editorHelp}))}}),function(){function e(e){var t=this.att;void 0!==(e=e&&e.hasAttribute(t)&&e.getAttribute(t)||"")&&this.setValue(e)}function t(){for(var e,t=0;t<arguments.length;t++)if(arguments[t]instanceof CKEDITOR.dom.element){e=arguments[t];break}if(e){t=this.att;var n=this.getValue();n?e.setAttribute(t,n):e.removeAttribute(t,n)}}var n={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(e){e||(e=n);var t=[];e.id&&t.push("id"),e.dir&&t.push("dir");var i="";return t.length&&(i+="["+t.join(",")+"]"),e.classes&&(i+="(*)"),e.styles&&(i+="{*}"),i},createAdvancedTab:function(i,o,a){o||(o=n);var r=i.lang.common,s={id:"advanced",label:r.advancedTab,title:r.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},l=[];return(o.id||o.dir)&&(o.id&&l.push({id:"advId",att:"id",type:"text",requiredContent:a?a+"[id]":null,label:r.id,setup:e,commit:t}),o.dir&&l.push({id:"advLangDir",att:"dir",type:"select",requiredContent:a?a+"[dir]":null,label:r.langDir,default:"",style:"width:100%",items:[[r.notSet,""],[r.langDirLTR,"ltr"],[r.langDirRTL,"rtl"]],setup:e,commit:t}),s.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(l)})),(o.styles||o.classes)&&(l=[],o.styles&&l.push({id:"advStyles",att:"style",type:"text",requiredContent:a?a+"{cke-xyz}":null,label:r.styles,default:"",validate:CKEDITOR.dialog.validate.inlineStyle(r.invalidInlineStyle),onChange:function(){},getStyle:function(e,t){var n=this.getValue().match(new RegExp("(?:^|;)\\s*"+e+"\\s*:\\s*([^;]*)","i"));return n?n[1]:t},updateStyle:function(e,t){var n=this.getValue(),o=i.document.createElement("span");o.setAttribute("style",n),o.setStyle(e,t),n=CKEDITOR.tools.normalizeCssText(o.getAttribute("style")),this.setValue(n,1)},setup:e,commit:t}),o.classes&&l.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:a?a+"(cke-xyz)":null,label:r.cssClasses,default:"",setup:e,commit:t}]}),s.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(l)})),s}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(e){var t=0,n=function(n,o,a,r){if(r){r=new CKEDITOR.style(r);var s=i[a];s.unshift(r),e.attachStyleStateChange(r,(function(t){!e.readOnly&&e.getCommand(a).setState(t)})),e.addCommand(a,new CKEDITOR.styleCommand(r,{contentForms:s})),e.ui.addButton&&e.ui.addButton(n,{label:o,command:a,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,a=e.lang.basicstyles;n("Bold",a.bold,"bold",o.coreStyles_bold),n("Italic",a.italic,"italic",o.coreStyles_italic),n("Underline",a.underline,"underline",o.coreStyles_underline),n("Strike",a.strike,"strike",o.coreStyles_strike),n("Subscript",a.subscript,"subscript",o.coreStyles_subscript),n("Superscript",a.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"},function(){function e(e,t,n,i){if(!e.isReadOnly()&&!e.equals(n.editable())){CKEDITOR.dom.element.setMarker(i,e,"bidi_processed",1),i=e;for(var o=n.editable();(i=i.getParent())&&!i.equals(o);)if(i.getCustomData("bidi_processed"))return e.removeStyle("direction"),void e.removeAttribute("dir");((i="useComputedState"in n.config?n.config.useComputedState:1)?e.getComputedStyle("direction"):e.getStyle("direction")||e.hasAttribute("dir"))!=t&&(e.removeStyle("direction"),i?(e.removeAttribute("dir"),t!=e.getComputedStyle("direction")&&e.setAttribute("dir",t)):e.setAttribute("dir",t),n.forceNextSelectionCheck())}}function t(e,t,n){var i=e.getCommonAncestor(!1,!0);if((e=e.clone()).enlarge(n==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS),e.checkBoundaryOfElement(i,CKEDITOR.START)&&e.checkBoundaryOfElement(i,CKEDITOR.END)){for(var o;i&&i.type==CKEDITOR.NODE_ELEMENT&&(o=i.getParent())&&1==o.getChildCount()&&!(i.getName()in t);)i=o;return i.type==CKEDITOR.NODE_ELEMENT&&i.getName()in t&&i}}function n(n){return{context:"p",allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(e,t){var n,i;if(!(i=void 0===(i=e.config.useComputedState)||i)){n=t.lastElement;for(var o=e.editable();n&&!(n.getName()in r)&&!n.equals(o);){var a=n.getParent();if(!a)break;n=a}}(n=n||t.block||t.blockLimit).equals(e.editable())&&(o=e.getSelection().getRanges()[0].getEnclosedNode())&&o.type==CKEDITOR.NODE_ELEMENT&&(n=o),n&&(i=i?n.getComputedStyle("direction"):n.getStyle("direction")||n.getAttribute("dir"),e.getCommand("bidirtl").setState("rtl"==i?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.getCommand("bidiltr").setState("ltr"==i?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)),(i=(t.block||t.blockLimit||e.editable()).getDirection(1))!=(e._.selDir||e.lang.dir)&&(e._.selDir=i,e.fire("contentDirChanged",i))},exec:function(i){var r=i.getSelection(),s=i.config.enterMode;if((u=r.getRanges())&&u.length){for(var l,c={},d=r.createBookmarks(),u=u.createIterator(),h=0;l=u.getNextRange(1);){var f=l.getEnclosedNode();f&&(!f||f.type==CKEDITOR.NODE_ELEMENT&&f.getName()in a)||(f=t(l,o,s)),f&&e(f,n,i,c);var g=new CKEDITOR.dom.walker(l),m=d[h].startNode,p=d[h++].endNode;for(g.evaluator=function(e){var t,n=s==CKEDITOR.ENTER_P?"p":"div";return(t=!!e&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in o)&&((n=e.is(n))&&(n=!!(n=e.getParent())&&n.type==CKEDITOR.NODE_ELEMENT),t=!(n&&e.getParent().is("blockquote"))),!!(t&&e.getPosition(m)&CKEDITOR.POSITION_FOLLOWING&&(e.getPosition(p)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};f=g.next();)e(f,n,i,c);for((l=l.createIterator()).enlargeBr=s!=CKEDITOR.ENTER_BR;f=l.getNextParagraph(s==CKEDITOR.ENTER_P?"p":"div");)e(f,n,i,c)}CKEDITOR.dom.element.clearAllMarkers(c),i.forceNextSelectionCheck(),r.selectBookmarks(d),i.focus()}}}}function i(e){var t=e==s.setAttribute,n=e==s.removeAttribute,i=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(o,a){if(!this.isReadOnly()){var r;if(r=o==(t||n?"dir":"direction")||"style"==o&&(n||i.test(a))){e:{for(var s=(r=this).getDocument().getBody().getParent();r;){if(r.equals(s)){r=!1;break e}r=r.getParent()}r=!0}r=!r}if(r&&(r=this.getDirection(1),s=e.apply(this,arguments),r!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),s}return e.apply(this,arguments)}}var o={table:1,ul:1,ol:1,blockquote:1,div:1},a={},r={};CKEDITOR.tools.extend(a,o,{tr:1,p:1,div:1,li:1}),CKEDITOR.tools.extend(r,a,{td:1}),CKEDITOR.plugins.add("bidi",{init:function(e){function t(t,n,i,o,a){e.addCommand(i,new CKEDITOR.command(e,o)),e.ui.addButton&&e.ui.addButton(t,{label:n,command:i,toolbar:"bidi,"+a})}if(!e.blockless){var i=e.lang.bidi;t("BidiLtr",i.ltr,"bidiltr",n("ltr"),10),t("BidiRtl",i.rtl,"bidirtl",n("rtl"),20),e.on("contentDom",(function(){e.document.on("dirChanged",(function(t){e.fire("dirChanged",{node:t.data,dir:t.data.getDirection(1)})}))})),e.on("contentDirChanged",(function(t){t=(e.lang.dir!=t.data?"add":"remove")+"Class";var n=e.ui.space(e.config.toolbarLocation);n&&n[t]("cke_mixed_dir_content")}))}}});for(var s=CKEDITOR.dom.element.prototype,l=["setStyle","removeStyle","setAttribute","removeAttribute"],c=0;c<l.length;c++)s[l[c]]=CKEDITOR.tools.override(s[l[c]],i)}(),i={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 a,r=o[0].startNode,s=o[0].endNode;if(r&&"blockquote"==r.getParent().getName())for(a=r;a=a.getNext();)if(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()){r.move(a,!0);break}if(s&&"blockquote"==s.getParent().getName())for(a=s;a=a.getPrevious();)if(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary()){s.move(a);break}}if((l=i.createIterator()).enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR,t==CKEDITOR.TRISTATE_OFF){for(r=[];t=l.getNextParagraph();)r.push(t);for(1>r.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(),r.push(t),o.unshift(s)),a=r[0].getParent(),i=[],s=0;s<r.length;s++)t=r[s],a=a.getCommonAncestor(t.getParent());for(t={table:1,tbody:1,tr:1,ol:1,ul:1};t[a.getName()];)a=a.getParent();for(s=null;0<r.length;){for(t=r.shift();!t.getParent().equals(a);)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()),r.push(s.getLast());s.replace(t)}else r.push(t);for((i=e.document.createElement("blockquote")).insertBefore(r[0]);0<r.length;)t=r.shift(),i.append(t)}else if(t==CKEDITOR.TRISTATE_ON){for(s=[],a={};t=l.getNextParagraph();){for(r=i=null;t.getParent();){if("blockquote"==t.getParent().getName()){i=t.getParent(),r=t;break}t=t.getParent()}i&&r&&!r.getCustomData("blockquote_moveout")&&(s.push(r),CKEDITOR.dom.element.setMarker(a,r,"blockquote_moveout",!0))}for(CKEDITOR.dom.element.clearAllMarkers(a),t=[],r=[],a={};0<s.length;)i=(l=s.shift()).getParent(),l.getPrevious()?l.getNext()?(l.breakParent(l.getParent()),r.push(l.getNext())):l.remove().insertAfter(i):l.remove().insertBefore(i),i.getCustomData("blockquote_processed")||(r.push(i),CKEDITOR.dom.element.setMarker(a,i,"blockquote_processed",!0)),t.push(l);for(CKEDITOR.dom.element.clearAllMarkers(a),s=r.length-1;0<=s;s--){e:{for(var l=0,c=(a=i=r[s]).getChildCount(),d=void 0;l<c&&(d=a.getChild(l));l++)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){a=!1;break e}a=!0}a&&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",i),e.ui.addButton&&e.ui.addButton("Blockquote",{label:e.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}}),function(){function e(e,t){CKEDITOR.tools.extend(this,t,{editor:e,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:e._.notificationArea}),t.type||(this.type="info"),this.element=this._createElement(),e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function t(e){var t=this;this.editor=e,this.notifications=[],this.element=this._createElement(),this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this),this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this),e.on("destroy",(function(){t._removeListeners(),t.element.remove()}))}CKEDITOR.plugins.add("notification",{init:function(e){e._.notificationArea=new t(e),e.showNotification=function(t,n,i){var o,a;return"progress"==n?o=i:a=i,(t=new CKEDITOR.plugins.notification(e,{message:t,type:n,progress:o,duration:a})).show(),t},e.on("key",(function(t){if(27==t.data.keyCode){var n=e._.notificationArea.notifications;n.length&&(function(e){var t=new CKEDITOR.dom.element("div");t.setStyles({position:"fixed","margin-left":"-9999px"}),t.setAttributes({"aria-live":"assertive","aria-atomic":"true"}),t.setText(e),CKEDITOR.document.getBody().append(t),setTimeout((function(){t.remove()}),100)}(e.lang.notification.closed),n[n.length-1].hide(),t.cancel())}}))}}),e.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(e){var t=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:e})&&(t=!1);var n=this.element,i=n.findOne(".cke_notification_message"),o=n.findOne(".cke_notification_progress"),a=e.type;n.removeAttribute("role"),e.progress&&"progress"!=this.type&&(a="progress"),a&&(n.removeClass(this._getClass()),n.removeAttribute("aria-label"),this.type=a,n.addClass(this._getClass()),n.setAttribute("aria-label",this.type),"progress"!=this.type||o?"progress"!=this.type&&o&&o.remove():(o=this._createProgressElement()).insertBefore(i)),void 0!==e.message&&(this.message=e.message,i.setHtml(this.message)),void 0!==e.progress&&(this.progress=e.progress,o&&o.setStyle("width",this._getPercentageProgress())),t&&e.important&&(n.setAttribute("role","alert"),this.isVisible()||this.area.add(this)),this.duration=e.duration,this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var e,t,n=this,i=this.editor.lang.common.close;return(e=new CKEDITOR.dom.element("div")).addClass("cke_notification"),e.addClass(this._getClass()),e.setAttributes({id:this.id,role:"alert","aria-label":this.type}),"progress"==this.type&&e.append(this._createProgressElement()),(t=new CKEDITOR.dom.element("p")).addClass("cke_notification_message"),t.setHtml(this.message),e.append(t),t=CKEDITOR.dom.element.createFromHtml('<a class="cke_notification_close" href="javascript:void(0)" title="'+i+'" role="button" tabindex="-1"><span class="cke_label">X</span></a>'),e.append(t),t.on("click",(function(){n.editor.focus(),n.hide()})),e},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var e=new CKEDITOR.dom.element("span");return e.addClass("cke_notification_progress"),e.setStyle("width",this._getPercentageProgress()),e},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var e,t=this;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId),"number"==typeof this.duration?e=this.duration:"info"!=this.type&&"success"!=this.type||(e="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5e3),e&&(t._hideTimeoutId=setTimeout((function(){t.hide()}),e))}},t.prototype={add:function(e){this.notifications.push(e),this.element.append(e.element),1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners()),this._layout()},remove:function(e){var t=CKEDITOR.tools.indexOf(this.notifications,e);0>t||(this.notifications.splice(t,1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,t=e.config,n=new CKEDITOR.dom.element("div");return n.addClass("cke_notifications_area"),n.setAttribute("id","cke_notifications_area_"+e.name),n.setStyle("z-index",t.baseFloatZIndex-2),n},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),t=this.editor;e.on("scroll",this._uiBuffer.input),e.on("resize",this._uiBuffer.input),t.on("change",this._changeBuffer.input),t.on("floatingSpaceLayout",this._layout,this,null,20),t.on("blur",this._layout,this,null,20)},_removeListeners:function(){var e=CKEDITOR.document.getWindow(),t=this.editor;e.removeListener("scroll",this._uiBuffer.input),e.removeListener("resize",this._uiBuffer.input),t.removeListener("change",this._changeBuffer.input),t.removeListener("floatingSpaceLayout",this._layout),t.removeListener("blur",this._layout)},_layout:function(){function e(){o.setStyle("left",m(p+r.width-c-d))}var t,n,i,o=this.element,a=this.editor,r=a.ui.contentsElement.getClientRect(),s=a.ui.contentsElement.getDocumentPosition(),l=o.getClientRect(),c=this._notificationWidth,d=this._notificationMargin,u=(i=CKEDITOR.document.getWindow()).getScrollPosition(),h=i.getViewPaneSize(),f=CKEDITOR.document.getBody(),g=f.getDocumentPosition(),m=CKEDITOR.tools.cssLength;c&&d||(i=this.element.getChild(0),c=this._notificationWidth=i.getClientRect().width,d=this._notificationMargin=parseInt(i.getComputedStyle("margin-left"),10)+parseInt(i.getComputedStyle("margin-right"),10)),a.toolbar&&(n=(t=a.ui.space(a.config.toolbarLocation)).getClientRect()),t&&t.isVisible()&&n.bottom>r.top&&n.bottom<r.bottom-l.height?o.setStyles({position:"fixed",top:m(n.bottom)}):0<r.top?o.setStyles({position:"absolute",top:m(s.y)}):s.y+r.height-l.height>u.y?o.setStyles({position:"fixed",top:0}):o.setStyles({position:"absolute",top:m(s.y+r.height-l.height)});var p="fixed"==o.getStyle("position")?r.left:"static"!=f.getComputedStyle("position")?s.x-g.x:s.x;r.width<c+d?s.x+c+d>u.x+h.width?e():o.setStyle("left",m(p)):s.x+c+d>u.x+h.width?o.setStyle("left",m(p)):s.x+r.width/2+c/2+d>u.x+h.width?o.setStyle("left",m(p-s.x+u.x+h.width-c-d)):0>r.left+r.width-c-d?e():0>r.left+r.width/2-c/2?o.setStyle("left",m(p-s.x+u.x)):o.setStyle("left",m(p+r.width/2-c/2-d/2))}},CKEDITOR.plugins.notification=e}(),function(){var e='<a id="{id}" class="cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' title="{title}" tabindex="-1" hidefocus="true" role="button" aria-labelledby="{id}_label" aria-describedby="{id}_description" aria-haspopup="{hasArrow}" aria-disabled="{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"');var t="";CKEDITOR.env.ie&&(t='return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)==CKEDITOR.MOUSE_BUTTON_LEFT&&');e=e+' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" onclick="'+t+'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><span id="{id}_description" class="cke_button_label" aria-hidden="false">{ariaShortcutSpace}{ariaShortcut}</span>{arrowHtml}</a>';var n=CKEDITOR.addTemplate("buttonArrow",'<span class="cke_button_arrow">'+(CKEDITOR.env.hc?"▼":"")+"</span>"),i=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,t){function o(){var t=e.mode;t&&(t=this.modes[t]?void 0!==l[t]?l[t]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,t=e.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:t,this.setState(t),this.refresh&&this.refresh())}var a,r,s,l=null,c=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),u="",h=this.command;this._.editor=e;var f,g={id:d,button:this,editor:e,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(e)},attach:function(e){this.button.attach(e)}},m=CKEDITOR.tools.addFunction((function(e){if(g.onkey)return e=new CKEDITOR.dom.event(e),!1!==g.onkey(g,e.getKeystroke())})),p=CKEDITOR.tools.addFunction((function(e){var t;return g.onfocus&&(t=!1!==g.onfocus(g,new CKEDITOR.dom.event(e))),t})),E=0;g.clickFn=a=CKEDITOR.tools.addFunction((function(){E&&(e.unlockSelection(1),E=0),g.execute(),c.iOS&&e.focus()})),this.modes?(l={},e.on("beforeModeUnload",(function(){e.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(l[e.mode]=this._.state)}),this),e.on("activeFilterChange",o,this),e.on("mode",o,this),!this.readOnly&&e.on("readOnly",o,this)):h&&(h=e.getCommand(h))&&(h.on("state",(function(){this.setState(h.state)}),this),u+=h.state==CKEDITOR.TRISTATE_ON?"on":h.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(f,"rtl"==t,this.icon,this.iconOffset))}),this),h?(r=e.getCommandKeystroke(h))&&(s=CKEDITOR.tools.keystrokeToString(e.lang.common.keyboard,r)):u+="off",r=this.name||this.command;var T=null,C=this.icon;return f=r,this.icon&&!/\./.test(this.icon)?(f=this.icon,C=null):(this.icon&&(T=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(T=this.iconHiDpi)),T?(CKEDITOR.skin.addIcon(T,T),C=null):T=f,u={id:d,name:r,iconName:f,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:u,ariaDisabled:"disabled"==u?"true":"false",title:this.title+(s?" ("+s.display+")":""),ariaShortcutSpace:s?" ":"",ariaShortcut:s?e.lang.common.keyboardShortcut+" "+s.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:"string"==typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:m,focusFn:p,clickFn:a,style:CKEDITOR.skin.getIconStyle(T,"rtl"==e.lang.dir,C,this.iconOffset),arrowHtml:this.hasArrow?n.output():""},i.output(u,t),this.onRender&&this.onRender(),g},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"),t.setAttribute("aria-disabled",e==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?t.setAttribute("aria-expanded",e==CKEDITOR.TRISTATE_ON):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,a=[];for(t=0;t<e.length;++t)o={},"/"==(i=e[t])?a.push(i):CKEDITOR.tools.isArray(i)?(n(o,CKEDITOR.tools.clone(i)),a.push(o)):i.items&&(n(o,CKEDITOR.tools.clone(i.items)),o.name=i.name,a.push(o));return a}(o):function(){for(var i=function(){var t,n,i,o={};for(t in e.ui.items)n=e.ui.items[t],i=(i=n.toolbar||"others").split(","),n=i[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),a=0;a<o.length;a++){var r=o[a];if("/"!=r){"string"==typeof r&&(r=o[a]={name:r});var s,l=r.groups;if(l)for(var c=0;c<l.length;c++)(s=i[s=l[c]])&&n(r,s);(s=i[r.name])&&n(r,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,a=function(e,n){var i,r=(s="rtl"==t.lang.dir)?37:39,s=s?39:37,l=void 0===(l=t.config.toolbarGroupCycling)||l;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 r:i=e;do{!(i=i.next)&&l&&(i=e.toolbar.items[0])}while(i&&!i.focus);return i?i.focus():a(e,9),!1;case 40:return e.button&&e.button.hasArrow?e.execute():a(e,40==n?r:s),!1;case s:case 38:i=e;do{!(i=i.previous)&&l&&(i=e.toolbar.items[e.toolbar.items.length-1])}while(i&&!i.focus);return i?i.focus():(o=1,a(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,r,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=d.length,h=0;h<u;h++){var f,g,m,p=0,E=d[h],T="/"!==E&&("/"===d[h+1]||h==u-1);if(E)if(o&&(s.push("</span>"),r=o=0),"/"===E)s.push('<span class="cke_toolbar_break"></span>');else{m=E.items||E;for(var C=0;C<m.length;C++){var I,O=m[C];if(O){var D=function(e){e=e.render(t,s),0<(R=p.items.push(e)-1)&&(e.previous=p.items[R-1],e.previous.next=e),e.toolbar=p,e.onkey=a,e.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}};if(O.type==CKEDITOR.UI_SEPARATOR)r=o&&O;else{if(I=!1!==O.canGroup,!p){f=CKEDITOR.tools.getNextId(),p={id:f,items:[]},g=E.name&&(t.lang.toolbar.toolbarGroups[E.name]||E.name),s.push('<span id="',f,'" class="cke_toolbar'+(T?' cke_toolbar_last"':'"'),g?' aria-labelledby="'+f+'_label"':"",' role="toolbar">'),g&&s.push('<span id="',f,'_label" class="cke_voice_label">',g,"</span>"),s.push('<span class="cke_toolbar_start"></span>');var R=c.push(p)-1;0<R&&(p.previous=c[R-1],p.previous.next=p)}I?o||(s.push('<span class="cke_toolgroup" role="presentation">'),o=1):o&&(s.push("</span>"),o=0),r&&(D(r),r=0),D(O)}}}o&&(s.push("</span>"),r=o=0),p&&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 v=CKEDITOR.tools.addFunction((function(){t.execCommand("toolbarCollapse")}));t.on("destroy",(function(){CKEDITOR.tools.removeFunction(v)})),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(),a=parseInt(i.$.style.height,10),r=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",a-(o.$.offsetHeight-r)+"px"),e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:i.$.offsetHeight,outerWidth:e.container.$.offsetWidth})},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('+v+')">','<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),a=0===n,r={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(a?i.groups.splice(0,0,e):i.groups.push(e));n=null}n&&(n=CKEDITOR.tools.indexOf(o,(function(e){return e.name==n}))),a?o.splice(0,0,e):"number"==typeof n?o.splice(n+1,0,r):o.push(e)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){function e(e,t,n){return t.type||(t.type="auto"),!(n&&!1===e.fire("beforePaste",t)||!t.dataValue&&t.dataTransfer.isEmpty())&&(t.dataValue||(t.dataValue=""),CKEDITOR.env.gecko&&"drop"==t.method&&e.toolbox&&e.once("afterPaste",(function(){e.toolbox.focus()})),e.fire("paste",t))}function t(t){function n(){var e,n=t.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var i=function(e){t.getSelection().isCollapsed()||(t.readOnly&&"cut"==e.name||f.initPasteDataTransfer(e,t),e.data.preventDefault())};n.on("copy",i),n.on("cut",i),n.on("cut",(function(){t.readOnly||t.extractSelectedHtml()}),null,null,999)}n.on(f.mainPasteEvent,(function(e){"beforepaste"==f.mainPasteEvent&&g||d(e)})),"beforepaste"==f.mainPasteEvent&&(n.on("paste",(function(e){m||(o(),e.data.preventDefault(),d(e),r("paste"))})),n.on("contextmenu",a,null,null,0),n.on("beforepaste",(function(e){!e.data||e.data.$.ctrlKey||e.data.$.shiftKey||a()}),null,null,0)),n.on("beforecut",(function(){!g&&s()})),n.attachListener(CKEDITOR.env.ie?n:t.document.getDocumentElement(),"mouseup",(function(){e=setTimeout(u,0)})),t.on("destroy",(function(){clearTimeout(e)})),n.on("keyup",u)}function i(e){return{type:e,canUndo:"cut"==e,startDisabled:!0,fakeKeystroke:"cut"==e?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){var e;"cut"==this.type&&s();var n=this.type;if(CKEDITOR.env.ie)e=r(n);else try{e=t.document.$.execCommand(n,!1,null)}catch(t){e=!1}return e||t.showNotification(t.lang.clipboard[this.type+"Error"]),e}}}function o(){m=1,setTimeout((function(){m=0}),100)}function a(){g=1,setTimeout((function(){g=0}),10)}function r(e){var n=t.document,i=n.getBody(),o=!1,a=function(){o=!0};return i.on(e,a),7<CKEDITOR.env.version?n.$.execCommand(e):n.$.selection.createRange().execCommand(e),i.removeListener(e,a),o}function s(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var e,n,i,o=t.getSelection();o.getType()==CKEDITOR.SELECTION_ELEMENT&&(e=o.getSelectedElement())&&(n=o.getRanges()[0],(i=t.document.createText("")).insertBefore(e),n.setStartBefore(i),n.setEndAfter(e),o.selectRanges([n]),setTimeout((function(){e.getParent()&&(i.remove(),o.selectElement(e))}),0))}}function l(){if("paste"==f.mainPasteEvent)return t.fire("beforePaste",{type:"auto",method:"paste"}),!1;t.focus(),o();var e=t.focusManager;return e.lock(),t.editable().fire(f.mainPasteEvent)&&!r("paste")?(e.unlock(),!1):(e.unlock(),!0)}function c(e){if("wysiwyg"==t.mode)switch(e.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:e=t.editable(),o(),"paste"==f.mainPasteEvent&&e.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:t.fire("saveSnapshot"),setTimeout((function(){t.fire("saveSnapshot")}),50)}}function d(n){var i={type:"auto",method:"paste",dataTransfer:f.initPasteDataTransfer(n)};i.dataTransfer.cacheData();var o=!1!==t.fire("beforePaste",i);o&&f.canClipboardApiBeTrusted(i.dataTransfer,t)?(n.data.preventDefault(),setTimeout((function(){e(t,i)}),0)):function(e,n){var i,o=t.document,a=t.editable(),r=function(e){e.cancel()};if(!o.getById("cke_pastebin")){var s=t.getSelection(),l=s.createBookmarks();CKEDITOR.env.ie&&s.root.fire("selectionchange");var c=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!a.is("body")||CKEDITOR.env.ie?"div":"body",o);c.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var d=0;o=o.getWindow();CKEDITOR.env.webkit?(a.append(c),c.addClass("cke_editable"),a.is("body")||(d=(d="static"!=a.getComputedStyle("position")?a:CKEDITOR.dom.element.get(a.$.offsetParent)).getDocumentPosition().y)):a.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(c),c.setStyles({position:"absolute",top:o.getScrollPosition().y-d+10+"px",width:"1px",height:Math.max(1,o.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0}),CKEDITOR.env.safari&&c.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text")),(d=c.getParent().isReadOnly())?(c.setOpacity(0),c.setAttribute("contenteditable",!0)):c.setStyle("ltr"==t.config.contentsLangDirection?"left":"right","-10000px"),t.on("selectionChange",r,null,null,0),(CKEDITOR.env.webkit||CKEDITOR.env.gecko)&&(i=a.once("blur",r,null,null,-100)),d&&c.focus(),(d=new CKEDITOR.dom.range(c)).selectNodeContents(c);var u=d.select();CKEDITOR.env.ie&&(i=a.once("blur",(function(){t.lockSelection(u)})));var h=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout((function(){var e;CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=h),i&&i.removeListener(),CKEDITOR.env.ie&&a.focus(),s.selectBookmarks(l),c.remove(),CKEDITOR.env.webkit&&(e=c.getFirst())&&e.is&&e.hasClass("Apple-style-span")&&(c=e),t.removeListener("selectionChange",r),n(c.getHtml())}),0)}}(0,(function(n){i.dataValue=n.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/gi,""),o&&e(t,i)}))}function u(){if("wysiwyg"==t.mode){var e=h("paste");t.getCommand("cut").setState(h("cut")),t.getCommand("copy").setState(h("copy")),t.getCommand("paste").setState(e),t.fire("pasteState",e)}}function h(e){var n=(n=t.getSelection())&&n.getRanges()[0];return(t.readOnly||n&&n.checkReadOnly())&&e in{paste:1,cut:1}?CKEDITOR.TRISTATE_DISABLED:"paste"==e?CKEDITOR.TRISTATE_OFF:(n=(e=t.getSelection()).getRanges(),e.getType()==CKEDITOR.SELECTION_NONE||1==n.length&&n[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF)}var f=CKEDITOR.plugins.clipboard,g=0,m=0;!function(){if(t.on("key",c),t.on("contentDom",n),t.on("selectionChange",u),t.contextMenu){t.contextMenu.addListener((function(){return{cut:h("cut"),copy:h("copy"),paste:h("paste")}}));var e=null;t.on("menuShow",(function(){e&&(e.removeListener(),e=null);var n=t.contextMenu.findItemByCommandName("paste");n&&n.element&&(e=n.element.on("touchend",(function(){t._.forcePasteDialog=!0})))}))}t.ui.addButton&&t.once("instanceReady",(function(){t._.pasteButtons&&CKEDITOR.tools.array.forEach(t._.pasteButtons,(function(e){(e=t.ui.get(e))&&(e=CKEDITOR.document.getById(e._.id))&&e.on("touchend",(function(){t._.forcePasteDialog=!0}))}))}))}(),function(){function n(e,n,i,o,a){var r=t.lang.clipboard[n];t.addCommand(n,i),t.ui.addButton&&t.ui.addButton(e,{label:r,command:n,toolbar:"clipboard,"+o}),t.addMenuItems&&t.addMenuItem(n,{label:r,command:n,group:"clipboard",order:a})}n("Cut","cut",i("cut"),10,1),n("Copy","copy",i("copy"),20,4),n("Paste","paste",{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(t,n){function i(n,i){i=void 0===i||i,n?(n.method="paste",n.dataTransfer||(n.dataTransfer=f.initPasteDataTransfer()),e(t,n,i)):a&&!t._.forcePasteDialog&&t.showNotification(l,"info",t.config.clipboard_notificationDuration),t._.forcePasteDialog=!1,t.fire("afterCommandExec",{name:"paste",command:o,returnValue:!!n})}var o=this,a=void 0===(n=null!=n?n:{}).notification||n.notification,r=n.type,s=CKEDITOR.tools.keystrokeToString(t.lang.common.keyboard,t.getCommandKeystroke(this)),l="string"==typeof a?a:t.lang.clipboard.pasteNotification.replace(/%1/,'<kbd aria-label="'+s.aria+'">'+s.display+"</kbd>");s="string"==typeof n?n:n.dataValue,r&&!0!==t.config.forcePasteAsPlainText&&"allow-word"!==t.config.forcePasteAsPlainText?t._.nextPasteType=r:delete t._.nextPasteType,"string"==typeof s?i({dataValue:s}):t.getClipboardData(i)}},30,8),t._.pasteButtons||(t._.pasteButtons=[]),t._.pasteButtons.push("Paste")}(),t.getClipboardData=function(e,n){function i(e){e.removeListener(),e.cancel(),n(e.data)}function o(e){e.removeListener(),e.cancel(),n({type:r,dataValue:e.data.dataValue,dataTransfer:e.data.dataTransfer,method:"paste"})}var a=!1,r="auto";n||(n=e,e=null),t.on("beforePaste",(function(e){e.removeListener(),a=!0,r=e.data.type}),null,null,1e3),t.on("paste",i,null,null,0),!1===l()&&(t.removeListener("paste",i),t._.forcePasteDialog&&a&&t.fire("pasteDialog")?(t.on("pasteDialogCommit",o),t.on("dialogHide",(function(e){e.removeListener(),e.data.removeListener("pasteDialogCommit",o),e.data._.committed||n(null)}))):n(null))}}function n(e,t){function n(e){return CKEDITOR.tools.repeat("</p><p>",~~(e/2))+(1==e%2?"<br>":"")}return(t=(t=t.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"><").replace(/<br ?\/>/gi,"<br>")).replace(/<\/?[A-Z]+>/g,(function(e){return e.toLowerCase()}))).match(/^[^<]$/)?t:(CKEDITOR.env.webkit&&-1<t.indexOf("<div>")&&((t=t.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"<br>").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"<div></div>")).match(/<div>(<br>|)<\/div>/)&&(t="<p>"+t.replace(/(<div>(<br>|)<\/div>)+/g,(function(e){return n(e.split("</div><div>").length+1)}))+"</p>"),t=(t=t.replace(/<\/div><div>/g,"<br>")).replace(/<\/?div>/g,"")),CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(t=t.replace(/^<br><br>$/,"<br>")),-1<t.indexOf("<br><br>")&&(t="<p>"+t.replace(/(<br>){2,}/g,(function(e){return n(e.length/4)}))+"</p>")),function(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}(e,t))}function i(e,t,n){t=CKEDITOR.htmlParser.fragment.fromHtml(t);var i=new CKEDITOR.htmlParser.basicWriter;return n.applyTo(t,!0,!1,e.activeEnterMode),t.writeHtml(i),i.getHtml()}function o(e){e.data.preventDefault(),e.data.$.dataTransfer.dropEffect="none"}function a(t){var n=CKEDITOR.plugins.clipboard;t.on("contentDom",(function(){function i(e,n,i){var o={$:e.data.$,target:e.data.getTarget()};n&&(o.dragRange=n),i&&(o.dropRange=i),!1===t.fire(e.name,o)&&e.data.preventDefault()}function o(e){return e.type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),e.getChildCount()}var a=t.editable(),r=CKEDITOR.plugins.clipboard.getDropTarget(t),s=t.ui.space("top"),l=t.ui.space("bottom");n.preventDefaultDropOnElement(s),n.preventDefaultDropOnElement(l),a.attachListener(r,"dragstart",i),a.attachListener(t,"dragstart",n.resetDragDataTransfer,n,null,1),a.attachListener(t,"dragstart",(function(e){n.initDragDataTransfer(e,t)}),null,null,2),a.attachListener(t,"dragstart",(function(){var e=n.dragRange=t.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(n.dragStartContainerChildCount=e?o(e.startContainer):null,n.dragEndContainerChildCount=e?o(e.endContainer):null)}),null,null,100),a.attachListener(r,"dragend",i),a.attachListener(t,"dragend",n.initDragDataTransfer,n,null,1),a.attachListener(t,"dragend",n.resetDragDataTransfer,n,null,100),a.attachListener(r,"dragover",(function(e){if(CKEDITOR.env.edge)e.data.preventDefault();else{var t=e.data.getTarget();(t&&t.is&&t.is("html")||CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&e.data.$.dataTransfer.types.contains("Files"))&&e.data.preventDefault()}})),a.attachListener(r,"drop",(function(e){if(!e.data.$.defaultPrevented&&(e.data.preventDefault(),!t.readOnly)&&(!(o=e.data.getTarget()).isReadOnly()||o.type==CKEDITOR.NODE_ELEMENT&&o.is("html"))){var o=n.getRangeAtDropPosition(e,t),a=n.dragRange;o&&i(e,a,o)}}),null,null,9999),a.attachListener(t,"drop",n.initDragDataTransfer,n,null,1),a.attachListener(t,"drop",(function(i){if(i=i.data){var o=i.dropRange,a=i.dragRange,r=i.dataTransfer;r.getTransferType(t)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout((function(){n.internalDrop(a,o,r,t)}),0):r.getTransferType(t)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?function(n,i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),o.sourceEditor.fire("saveSnapshot"),o.sourceEditor.editable().extractHtmlFromRange(n),o.sourceEditor.getSelection().selectRanges([n]),o.sourceEditor.fire("saveSnapshot")}(a,o,r):function(i,o){i.select(),e(t,{dataTransfer:o,method:"drop"},1),n.resetDragDataTransfer()}(o,r)}}),null,null,9999)}))}var r;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(e){var o,r=function(e){function t(){var e,t={};for(e in CKEDITOR.dtd)"$"!=e.charAt(0)&&"div"!=e&&"span"!=e&&(t[e]=1);return t}var n={};return{get:function(i){return"plain-text"==i?n.plainText||(n.plainText=new CKEDITOR.filter(e,"br")):"semantic-content"==i?((i=n.semanticContent)||((i=new CKEDITOR.filter(e,{})).allow({$1:{elements:t(),attributes:!0,styles:!1,classes:!1}}),i=n.semanticContent=i),i):i?new CKEDITOR.filter(e,i):null}}}(e);if(e.config.forcePasteAsPlainText?o="plain-text":e.config.pasteFilter?o=e.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in e.config||(o="semantic-content"),e.pasteFilter=r.get(o),t(e),a(e),CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")),CKEDITOR.env.gecko){var s,l=["image/png","image/jpeg","image/gif"];e.on("paste",(function(t){var n=t.data,i=n.dataTransfer;if(!n.dataValue&&"paste"==n.method&&function(e){if(!e||s===e.id)return!1;var t=1===(t=e.getTypes()).length&&"Files"===t[0];return e=1===e.getFilesCount(),t&&e}(i)&&(i=i.getFile(0),-1!=CKEDITOR.tools.indexOf(l,i.type))){var o=new FileReader;o.addEventListener("load",(function(){t.data.dataValue='<img src="'+o.result+'" />',e.fire("paste",t.data)}),!1),o.addEventListener("abort",(function(){e.fire("paste",t.data)}),!1),o.addEventListener("error",(function(){e.fire("paste",t.data)}),!1),o.readAsDataURL(i),s=n.dataTransfer.id,t.stop()}}),null,null,1)}e.on("paste",(function(t){if(t.data.dataTransfer||(t.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer),!t.data.dataValue){var n=t.data.dataTransfer,i=n.getData("text/html");i?(t.data.dataValue=i,t.data.type="html"):(i=n.getData("text/plain"))&&(t.data.dataValue=e.editable().transformPlainTextToHtml(i),t.data.type="text")}}),null,null,1),e.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,a=new CKEDITOR.dom.element("div");for(a.setHtml(t);1==a.getChildCount()&&(i=a.getFirst())&&i.type==CKEDITOR.NODE_ELEMENT&&(i.hasClass("cke_editable")||i.hasClass("cke_contents"));)a=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),e.on("paste",(function(t){t=t.data;var o,a=e._.nextPasteType||t.type,s=t.dataValue,l=e.config.clipboard_defaultContentType||"html",c=t.dataTransfer.getTransferType(e)==CKEDITOR.DATA_TRANSFER_EXTERNAL,d=!0===e.config.forcePasteAsPlainText;o="html"==a||"html"==t.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)return"html";if(!e.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}return"htmlifiedtext"}(s),delete e._.nextPasteType,"htmlifiedtext"==o&&(s=n(e.config,s)),"text"==a&&"html"==o?s=i(e,s,r.get("plain-text")):(c&&e.pasteFilter&&!t.dontFilter||d)&&(s=i(e,s,e.pasteFilter)),t.startsWithEOL&&(s='<br data-cke-eol="1">'+s),t.endsWithEOL&&(s+='<br data-cke-eol="1">'),"auto"==a&&(a="html"==o||"html"==l?"html":"text"),t.type=a,t.dataValue=s,delete t.preSniffing,delete t.startsWithEOL,delete t.endsWithEOL}),null,null,6),e.on("paste",(function(t){(t=t.data).dataValue&&(e.insertHtml(t.dataValue,t.type,t.range),setTimeout((function(){e.fire("afterPaste")}),0))}),null,null,1e3),e.on("pasteDialog",(function(t){setTimeout((function(){e.openDialog("paste",t.data)}),0)}))}}),CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!(CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version),isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",addPasteButton:function(e,t,n){e.ui.addButton&&(e.ui.addButton(t,n),e._.pasteButtons||(e._.pasteButtons=[]),e._.pasteButtons.push(t))},canClipboardApiBeTrusted:function(e,t){return!!(e.getTransferType(t)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!e.isEmpty()||CKEDITOR.env.gecko&&(e.getData("text/html")||e.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version)},getDropTarget:function(e){var t=e.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||t.isInline()?t:e.document},fixSplitNodesAfterDrop:function(e,t,n,i){function o(e,n,i){var o=e;if(o.type==CKEDITOR.NODE_TEXT&&(o=e.getParent()),o.equals(n)&&i!=n.getChildCount())return e=t.startContainer.getChild(t.startOffset-1),n=t.startContainer.getChild(t.startOffset),e&&e.type==CKEDITOR.NODE_TEXT&&n&&n.type==CKEDITOR.NODE_TEXT&&(i=e.getLength(),e.setText(e.getText()+n.getText()),n.remove(),t.setStart(e,i),t.collapse(!0)),!0}var a=t.startContainer;"number"==typeof i&&"number"==typeof n&&a.type==CKEDITOR.NODE_ELEMENT&&(o(e.startContainer,a,n)||o(e.endContainer,a,i))},isDropRangeAffectedByDragRange:function(e,t){var n=t.startContainer,i=t.endOffset;return!!(e.endContainer.equals(n)&&e.endOffset<=i||e.startContainer.getParent().equals(n)&&e.startContainer.getIndex()<i||e.endContainer.getParent().equals(n)&&e.endContainer.getIndex()<i)},internalDrop:function(t,n,i,o){var a,r,s=CKEDITOR.plugins.clipboard,l=o.editable();o.fire("saveSnapshot"),o.fire("lockSnapshot",{dontUpdate:1}),CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(t,n,s.dragStartContainerChildCount,s.dragEndContainerChildCount),(r=this.isDropRangeAffectedByDragRange(t,n))||(a=t.createBookmark(!1)),s=n.clone().createBookmark(!1),r&&(a=t.createBookmark(!1)),t=a.startNode,n=a.endNode,r=s.startNode,n&&t.getPosition(r)&CKEDITOR.POSITION_PRECEDING&&n.getPosition(r)&CKEDITOR.POSITION_FOLLOWING&&r.insertBefore(t),(t=o.createRange()).moveToBookmark(a),l.extractHtmlFromRange(t,1),n=o.createRange(),s.startNode.getCommonAncestor(l)||(s=o.getSelection().createBookmarks()[0]),n.moveToBookmark(s),e(o,{dataTransfer:i,method:"drop",range:n},1),o.fire("unlockSnapshot")},getRangeAtDropPosition:function(e,t){var n=e.data.$,i=n.clientX,o=n.clientY,a=t.getSelection(!0).getRanges()[0],r=t.createRange();if(e.data.testRange)return e.data.testRange;if(document.caretRangeFromPoint&&t.document.$.caretRangeFromPoint(i,o))n=t.document.$.caretRangeFromPoint(i,o),r.setStart(CKEDITOR.dom.node(n.startContainer),n.startOffset),r.collapse(!0);else if(n.rangeParent)r.setStart(CKEDITOR.dom.node(n.rangeParent),n.rangeOffset),r.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&a&&t.editable().hasFocus)return a;if(!document.body.createTextRange)return null;t.focus(),n=t.document.getBody().$.createTextRange();try{for(var s=!1,l=0;20>l&&!s;l++){if(!s)try{n.moveToPoint(i,o-l),s=!0}catch(e){}if(!s)try{n.moveToPoint(i,o+l),s=!0}catch(e){}}if(s){var c="cke-temp-"+(new Date).getTime();n.pasteHTML('<span id="'+c+'"></span>');var d=t.document.getById(c);r.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START),d.remove()}else{var u=t.document.$.elementFromPoint(i,o),h=new CKEDITOR.dom.element(u);if(h.equals(t.editable())||"html"==h.getName())return a&&a.startContainer&&!a.startContainer.equals(t.editable())?a:null;i<h.getClientRect().left?r.setStartAt(h,CKEDITOR.POSITION_AFTER_START):r.setStartAt(h,CKEDITOR.POSITION_BEFORE_END),r.collapse(!0)}}catch(e){return null}}return r},initDragDataTransfer:function(e,t){var n=e.data.$?e.data.$.dataTransfer:null,i=new this.dataTransfer(n,t);"dragstart"===e.name&&i.storeId(),n?this.dragData&&i.id==this.dragData.id?i=this.dragData:this.dragData=i:this.dragData?i=this.dragData:this.dragData=i,e.data.dataTransfer=i},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(e,t){if(this.isCustomCopyCutSupported){if(e&&e.data&&e.data.$){var n=e.data.$.clipboardData,i=new this.dataTransfer(n,t);return"copy"!==e.name&&"cut"!==e.name||i.storeId(),this.copyCutData&&i.id==this.copyCutData.id?(i=this.copyCutData).$=n:this.copyCutData=i,i}return new this.dataTransfer(null,t)}return new this.dataTransfer(CKEDITOR.env.edge&&e&&e.data.$&&e.data.$.clipboardData||null,t)},preventDefaultDropOnElement:function(e){e&&e.on("dragover",o)}},r=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text",CKEDITOR.plugins.clipboard.dataTransfer=function(e,t){e&&(this.$=e),this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(e){return"text"==(e=e.toLowerCase())||"text/plain"==e?"Text":"url"==e?"URL":e}},this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this),this.id=this.getData(r),this.id||(this.id="Text"==r?"":"cke-"+CKEDITOR.tools.getUniqueId()),t&&(this.sourceEditor=t,this.setData("text/html",t.getSelectedHtml(1)),"Text"==r||this.getData("text/plain")||this.setData("text/plain",t.getSelection().getSelectedText()))},CKEDITOR.DATA_TRANSFER_INTERNAL=1,CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2,CKEDITOR.DATA_TRANSFER_EXTERNAL=3,CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(e,t){if(null==(i="text/html"==(e=this._.normalizeType(e))&&t?this._.nativeHtmlCache:this._.data[e])||""===i){if(this._.fallbackDataTransfer.isRequired())i=this._.fallbackDataTransfer.getData(e,t);else try{i=this.$.getData(e)||""}catch(e){i=""}"text/html"!=e||t||(i=this._stripHtml(i))}if("Text"==e&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==i.substring(0,7)&&(i=""),"string"==typeof i)var n=i.indexOf("</html>"),i=-1!==n?i.substring(0,n+7):i;return i},setData:function(e,t){if("text/html"==(e=this._.normalizeType(e))?(this._.data[e]=this._stripHtml(t),this._.nativeHtmlCache=t):this._.data[e]=t,CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==e||"Text"==e)if("Text"==r&&"Text"==e&&(this.id=t),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(e,t);else try{this.$.setData(e,t)}catch(e){}},storeId:function(){"Text"!==r&&this.setData(r,this.id)},getTransferType:function(e){return this.sourceEditor?this.sourceEditor==e?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function e(e){e=i._.normalizeType(e);var t=i.getData(e);"text/html"==e&&(i._.nativeHtmlCache=i.getData(e,!0),t=i._stripHtml(t)),t&&(i._.data[e]=t)}if(this.$){var t,n,i=this;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(t=0;t<this.$.types.length;t++)e(this.$.types[t])}else e("Text"),e("URL");if(n=this._getImageFromClipboard(),this.$&&this.$.files||n){if(this._.files=[],this.$.files&&this.$.files.length)for(t=0;t<this.$.files.length;t++)this._.files.push(this.$.files[t]);0===this._.files.length&&n&&this._.files.push(n)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(e){return this._.files.length?this._.files[e]:this.$&&this.$.files&&this.$.files.length?this.$.files[e]:0===e?this._getImageFromClipboard():void 0},isEmpty:function(){var e,t={};if(this.getFilesCount())return!1;if(CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),(function(e){t[e]=1})),this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var n=0;n<this.$.types.length;n++)t[this.$.types[n]]=1}else t.Text=1,t.URL=1;for(e in"Text"!=r&&(t[r]=0),t)if(t[e]&&""!==this.getData(e))return!1;return!0},getTypes:function(){return this.$&&this.$.types?[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var e;try{if(this.$&&this.$.items&&this.$.items[0]&&(e=this.$.items[0].getAsFile())&&e.type)return e}catch(e){}},_stripHtml:function(e){if(e&&e.length){e=e.replace(this._.metaRegExp,"");var t=this._.bodyRegExp.exec(e);t&&t.length&&(e=(e=t[1]).replace(this._.fragmentRegExp,""))}return e}},CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(e){this._dataTransfer=e,this._customDataFallbackType="text/html"},CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null,CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[],CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var e=CKEDITOR.plugins.clipboard.fallbackDataTransfer,t=this._dataTransfer.$;if(null===e._isCustomMimeTypeSupported){if(!t)return!1;if(e._isCustomMimeTypeSupported=!1,CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{t.setData("cke/mimetypetest","cke test value"),e._isCustomMimeTypeSupported="cke test value"===t.getData("cke/mimetypetest"),t.clearData("cke/mimetypetest")}catch(e){}}return!e._isCustomMimeTypeSupported},getData:function(e,t){var n=this._getData(this._customDataFallbackType,!0);if(t)return n;n=this._extractDataComment(n);var i=null;return null!==(i=e===this._customDataFallbackType?n.content:n.data&&n.data[e]?n.data[e]:this._getData(e,!0))?i:""},setData:function(e,t){(o=e===this._customDataFallbackType)&&(t=this._applyDataComment(t,this._getFallbackTypeData()));var n=t,i=this._dataTransfer.$;try{i.setData(e,n),o&&(this._dataTransfer._.nativeHtmlCache=n)}catch(t){if(this._isUnsupportedMimeTypeError(t)){o=CKEDITOR.plugins.clipboard.fallbackDataTransfer,-1===CKEDITOR.tools.indexOf(o._customTypes,e)&&o._customTypes.push(e);var o=this._getFallbackTypeContent(),a=this._getFallbackTypeData();a[e]=n;try{n=this._applyDataComment(o,a),i.setData(this._customDataFallbackType,n),this._dataTransfer._.nativeHtmlCache=n}catch(e){n=""}}}return n},_getData:function(e,t){var n=this._dataTransfer._.data;if(!t&&n[e])return n[e];try{return this._dataTransfer.$.getData(e)}catch(e){return null}},_getFallbackTypeContent:function(){var e=this._dataTransfer._.data[this._customDataFallbackType];return e||(e=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content),e},_getFallbackTypeData:function(){var e=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,t=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},n=this._dataTransfer._.data;return CKEDITOR.tools.array.forEach(e,(function(e){void 0!==n[e]?t[e]=n[e]:void 0!==t[e]&&(t[e]=t[e])}),this),t},_isUnsupportedMimeTypeError:function(e){return e.message&&-1!==e.message.search(/element not found/gi)},_extractDataComment:function(e){var t,n={data:null,content:e||""};e&&16<e.length&&((t=/\x3c!--cke-data:(.*?)--\x3e/g.exec(e))&&t[1]&&(n.data=JSON.parse(decodeURIComponent(t[1])),n.content=e.replace(t[0],"")));return n},_applyDataComment:function(e,t){var n="";return t&&CKEDITOR.tools.object.keys(t).length&&(n="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(t))+"--\x3e"),n+(e&&e.length?e:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1e4,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},n.toolbarRelated=!0,this.hasArrow="listbox",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(),a=this._.panel=new CKEDITOR.ui.floatPanel(e,o,n),r=(n=a.addBlock(t.id,i),this),s=e.getCommand(this.command);a.onShow=function(){r.className&&this.element.addClass(r.className+"_panel"),r.setState(CKEDITOR.TRISTATE_ON),t.on=1,r.editorFocus&&e.focus(),r.onOpen&&r.onOpen()},a.onHide=function(n){r.className&&this.element.getFirst().removeClass(r.className+"_panel"),!r.modes&&s?r.setStateFromCommand(s):r.setState(r.modes&&r.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),t.on=0,!n&&r.onClose&&r.onClose()},a.onEscape=function(){a.hide(1),r.document.getById(t.id).focus()},this.onBlock&&this.onBlock(a,n),n.onHide=function(){t.on=0,!r.modes&&r.command?r.setStateFromCommand(s):r.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(e){this.setState(e.state)}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",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){var a={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.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+");"},a))),t.getWindow().$.CKEDITOR=CKEDITOR,t.on("keydown",(function(e){var t=e.data.getKeystroke(),n=this.document.getById(this.id).getAttribute("dir");("input"!==e.data.getTarget().getName()||37!==t&&39!==t)&&(this._.onKeyDown&&!1===this._.onKeyDown(t)?"input"===e.data.getTarget().getName()&&32===t||e.data.preventDefault():(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},this.isFramed){var r=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";a.frame=t.output({id:this.id+"_frame",src:r})}return r=e.output(a),o&&o.push(r),r},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._.getItems().getItem(this._.focusIndex=e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))},markFirstDisplayed:function(e){for(var t,n,i=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&"none"==e.getStyle("display")},o=this._.getItems(),a=o.count()-1;0<=a;a--)if((t=o.getItem(a)).getAscendant(i)||(n=t,this._.focusIndex=a),"true"==t.getAttribute("aria-selected")){n=t,this._.focusIndex=a;break}n&&(e&&e(),CKEDITOR.env.webkit&&n.getDocument().getWindow().focus(),n.focus(),this.onMark&&this.onMark(n))},getItems:function(){return this.element.find("a,input")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,t){switch(o=this.keys[e]){case"next":for(var n,i=this._.focusIndex,o=this._.getItems();n=o.getItem(++i);)if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=i,n.focus(!0);break}return!n&&!t&&(this._.focusIndex=-1,this.onKeyDown(e,1));case"prev":for(i=this._.focusIndex,o=this._.getItems();0<i&&(n=o.getItem(--i));){if(n.getAttribute("_cke_focus")&&n.$.offsetWidth){this._.focusIndex=i,n.focus(!0);break}n=null}return!n&&!t&&(this._.focusIndex=o.count(),this.onKeyDown(e,1));case"click":case"mouseup":return(n=0<=(i=this._.focusIndex)&&this._.getItems().getItem(i))&&n.fireEventHandler(o,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),o={},CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,t,n,i){function a(){c.hide()}n.forceIFrame=1,n.toolbarRelated&&e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(t=CKEDITOR.document.getById("cke_"+e.name));var r=t.getDocument(),s=(i=function(e,t,n,i,a){a=CKEDITOR.tools.genKey(t.getUniqueId(),n.getUniqueId(),e.lang.dir,e.uiColor||"",i.css||"",a||"");var r=o[a];return r||((r=o[a]=new CKEDITOR.ui.panel(t,i)).element=n.append(CKEDITOR.dom.element.createFromHtml(r.render(e),t)),r.element.setStyles({display:"none",position:"absolute"})),r}(e,r,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:r,iframe:l,children:[],dir:e.lang.dir,showBlockParams:null,markFirst:void 0===n.markFirst||n.markFirst},e.on("mode",a),e.on("resize",a),r.getWindow().on("resize",(function(){this.reposition()}),this)},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,a){var r=this._.panel,s=r.showBlock(e);this._.showBlockParams=[].slice.call(arguments),this.allowBlur(!1);var l=this._.editor.editable();this._.returnFocus=l.hasFocus?l:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement),this._.hideTimeout=0;var c=this.element,d=(l=this._.iframe,l=CKEDITOR.env.ie&&!CKEDITOR.env.edge?l:new CKEDITOR.dom.window(l.$.contentWindow),c.getDocument()),u=this._.parentElement.getPositionedAncestor(),h=t.getDocumentPosition(d),f=(d=u?u.getDocumentPosition(d):{x:0,y:0},"rtl"==this._.dir),g=h.x+(i||0)-d.x,m=h.y+(o||0)-d.y;!f||1!=n&&4!=n?f||2!=n&&3!=n||(g+=t.$.offsetWidth-1):g+=t.$.offsetWidth,3!=n&&4!=n||(m+=t.$.offsetHeight-1),this._.panel._.offsetParentId=t.getId(),c.setStyles({top:m+"px",left:0,display:""}),c.setOpacity(0),c.getFirst().removeStyle("width"),this._.editor.focusManager.add(l),this._.blurSet||(CKEDITOR.event.useCapture=!0,l.on("blur",(function(e){function t(){delete this._.returnFocus,this.hide()}this.allowBlur()&&e.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(t,0,this)):t.call(this))}),this),l.on("focus",(function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)}),this),CKEDITOR.env.iOS&&(l.on("touchstart",(function(){clearTimeout(this._.hideTimeout)}),this),l.on("touchend",(function(){this._.hideTimeout=0,this.focus()}),this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1),r.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((n=c).removeStyle("width"),s.autoSize){var e=s.element.getDocument();e=(CKEDITOR.env.webkit||CKEDITOR.env.edge?s.element:e.getBody()).$.scrollWidth,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<e&&(e+=(n.$.offsetWidth||0)-(n.$.clientWidth||0)+3),n.setStyle("width",e+10+"px"),e=s.element.$.scrollHeight,CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<e&&(e+=(n.$.offsetHeight||0)-(n.$.clientHeight||0)+3),n.setStyle("height",e+"px"),r._.currentBlock.element.setStyle("display","none").removeStyle("display")}else n.removeStyle("height");f&&(g-=c.$.offsetWidth),c.setStyle("left",g+"px"),e=r.element.getWindow();var t,n=c.$.getBoundingClientRect(),i=(e=e.getViewPaneSize(),n.width||n.right-n.left),o=n.height||n.bottom-n.top,l=f?n.right:e.width-n.left,d=f?e.width-n.right:n.left;f?l<i&&(g=d>i?g+i:e.width>i?g-n.left:g-n.right+e.width):l<i&&(g=d>i?g-i:e.width>i?g-n.right+e.width:g-n.left),i=n.top,e.height-n.top<o&&(m=i>o?m-o:e.height>o?m-n.bottom+e.height:m-n.top),CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((e=n=c.$.offsetParent&&new CKEDITOR.dom.element(c.$.offsetParent))&&"html"==e.getName()&&(e=e.getDocument().getBody()),e&&"rtl"==e.getComputedStyle("direction")&&(g=CKEDITOR.env.ie8Compat?g-2*c.getDocument().getDocumentElement().$.scrollLeft:g-(n.$.scrollWidth-n.$.clientWidth))),(t=(n=c.getFirst()).getCustomData("activePanel"))&&t.onHide&&t.onHide.call(this,1),n.setCustomData("activePanel",this),c.setStyles({top:m+"px",left:g+"px"}),c.setOpacity(1),a&&a()}),this);r.isLoaded?e():r.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._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout((function(){s.markFirstDisplayed?s.markFirstDisplayed():s._.markFirstDisplayed()}),0):s.markFirstDisplayed?s.markFirstDisplayed():s._.markFirstDisplayed()),this._.editor.fire("panelShow",this)}),0,this)}),CKEDITOR.env.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&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._.showBlockParams=null,this._.editor.fire("panelHide",this))},allowBlur:function(e){var t=this._.panel;return void 0!==e&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,t,n,i,o,a){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,a),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 o){var n=o[e];t?n.destroy():n.element.hide()}t&&(o={})})),CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(e){function t(t){function l(t,i,o){var a={};if(t&&(a.color=t),i&&(a.colorName=i),i=!CKEDITOR.tools.isEmpty(a)&&new CKEDITOR.style(function(){var t=e.config["colorButton_"+d+"Style"];return t.childRule="back"==d?function(e){return n(e)}:function(e){return!(e.is("a")||e.getElementsByTag("a").count())||n(e)},t}(),a),e.execCommand(f,{newStyle:i}),t&&o)for(o.addColor(t.substr(1).toUpperCase()),t=g.element.find("[role=option]").toArray(),o=0;o<t.length;o++)t[o].setAttributes({"aria-posinset":o+1,"aria-setsize":t.length})}var c=t.name,d=t.type,u=t.title,h=t.order,f=t.commandName;t=t.contentTransformations||{};var g,m=new CKEDITOR.style(o["colorButton_"+d+"Style"]),p=CKEDITOR.tools.getNextId()+"_colorBox",E={type:d},T=new CKEDITOR.style(o["colorButton_"+d+"Style"],{color:"inherit"}),C=CKEDITOR.tools.addFunction((function(t,n,i){e.focus(),e.fire("saveSnapshot"),"?"==t?e.getColorFromDialog((function(e){e&&l(e,n,I)}),null,E):l(t&&"#"+t,n,I),i&&(i.setAttribute("cke_colorlast",!0),e.once("selectionChange",(function(){i.removeAttribute("cke_colorlast")})))})),I=s.getRowLimit(e)?new s(e,"back"==d?"background-color":"color",C):void 0;e.addCommand(f,{contextSensitive:!0,exec:function(e,t){if(!e.readOnly){var n=t.newStyle;e.removeStyle(T),e.focus(),n&&e.applyStyle(n),e.fire("saveSnapshot")}},refresh:function(e,t){T.checkApplicable(t,e,e.activeFilter)?T.checkActive(t,e)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}}),e.ui.add(c,CKEDITOR.UI_PANELBUTTON,{label:u,title:u,command:f,editorFocus:0,toolbar:"colors,"+h,allowedContent:m,requiredContent:m,contentTransformations:t,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":r.panelTitle}},select:function(e){var t=o.colorButton_colors.split(",");e=CKEDITOR.tools.array.find(t,e),e=a.normalizeColor(e),i(g,e),g._.markFirstDisplayed()},onBlock:function(t,n){g=n,n.autoSize=!0,n.element.addClass("cke_colorblock"),n.element.setHtml(function(t,n,i){var l=[],c=o.colorButton_colors.split(","),d=e.plugins.colordialog&&o.colorButton_enableMore;i=c.length+i+(d?1:0);var u=1;for(o.colorButton_enableAutomatic&&(i+=1,u+=1,l.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true',' title="',r.auto,'"',' draggable="false"',' ondragstart="return false;"',' onclick="CKEDITOR.tools.callFunction(',n,',null);return false;"'," href=\"javascript:void('",r.auto,"')\"",' role="option" aria-posinset="1" aria-setsize="',i,'">','<table role="presentation" cellspacing=0 cellpadding=0 width="100%">',"<tr>",'<td colspan="',e.config.colorButton_colorsPerRow,'" align="center">','<span class="cke_colorbox" id="',t,'"></span>',r.auto,"</td>","</tr>","</table>","</a>")),l.push('<table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tbody>'),t=0;t<c.length;t++){0==t%e.config.colorButton_colorsPerRow&&l.push("</tr><tr>");var h,f=(h=c[t].split("/"))[0];(h=new a(e,{color:h[1]||f,label:h[1]?f:void 0},n)).setPositionIndex(u+t,i),l.push(h.getHtml())}return s.getRowLimit(e)&&s.renderContainer(l,e),d&&l.push("</tr>","<tr>",'<td colspan="',e.config.colorButton_colorsPerRow,'" align="center">','<a class="cke_colormore" _cke_focus=1 hidefocus=true',' title="',r.more,'"',' draggable="false"',' ondragstart="return false;"',' onclick="CKEDITOR.tools.callFunction(',n,",'?');return false;\""," href=\"javascript:void('",r.more,"')\"",' role="option" aria-posinset="',i,'" aria-setsize="',i,'">',r.more,"</a>","</td>"),l.push("</tr></tbody></table>"),l.join("")}(p,C,I?I.getLength():0)),n.element.getDocument().getBody().setStyle("overflow","hidden"),CKEDITOR.ui.fire("ready",this);var i=n.keys,l="rtl"==e.lang.dir;i[l?37:39]="next",i[40]="next",i[9]="next",i[l?39:37]="prev",i[38]="prev",i[CKEDITOR.SHIFT+9]="prev",i[32]="click",I&&I.setContainer(n.element.findOne(".cke_colorhistory"))},onOpen:function(){var t=(s=e.getSelection())&&s.getStartElement(),n=e.elementPath(t),r="back"==d?"background-color":"color";if(n){t=n.block||n.blockLimit||e.document.getBody();do{n=t&&t.getComputedStyle(r)||"transparent"}while("back"==d&&"transparent"==n&&t&&(t=t.getParent()));if(n&&"transparent"!=n||(n="#ffffff"),o.colorButton_enableAutomatic&&g.element.findOne("#"+p).setStyle("background-color",n),t=s&&s.getRanges()[0]){var s=new CKEDITOR.dom.walker(t),l=t.collapsed?t.startContainer:s.next();for(t="";l;){if(l.type!==CKEDITOR.NODE_ELEMENT&&(l=l.getParent()),l=a.normalizeColor(l.getComputedStyle(r)),(t=t||l)!==l){t="";break}l=s.next()}"transparent"==t&&(t=""),"fore"==d&&(E.automaticTextColor="#"+a.normalizeColor(n)),E.selectionColor=t?"#"+t:"",i(g,t)}return n}}})}function n(e){return"false"==e.getAttribute("contentEditable")||e.getAttribute("data-nostyle")}function i(e,t){var n=e._.getItems(),i=e.element.findOne("[aria-selected]"),o=e.element.findOne("[cke_colorlast]");if(i&&i.removeAttribute("aria-selected"),o)o.setAttribute("aria-selected",!0);else for(i=0;i<n.count();i++)if(o=n.getItem(i),t&&t==a.normalizeColor(o.getAttribute("data-value"))){o.setAttribute("aria-selected",!0);break}}var o=e.config,r=e.lang.colorbutton;if(!CKEDITOR.env.hc){t({name:"TextColor",type:"fore",commandName:"textColor",title:r.textColorTitle,order:10,contentTransformations:[[{element:"font",check:"span{color}",left:function(e){return!!e.attributes.color},right:function(e){e.name="span",e.attributes.color&&(e.styles.color=e.attributes.color),delete e.attributes.color}}]]});var l,c=e.config.colorButton_normalizeBackground;(void 0===c||c)&&(l=[[{element:"span",left:function(e){var t=CKEDITOR.tools;return!("span"!=e.name||!e.styles||!e.styles.background)&&(e=t.style.parse.background(e.styles.background)).color&&1===t.object.keys(e).length},right:function(t){var n=new CKEDITOR.style(e.config.colorButton_backStyle,{color:t.styles.background}).getDefinition();return t.name=n.element,t.styles=n.styles,t.attributes=n.attributes||{},t}}]]),t({name:"BGColor",type:"back",commandName:"bgColor",title:r.bgColorTitle,order:20,contentTransformations:l})}}}),a=CKEDITOR.tools.createClass({$:function(e,t,n){this.$=new CKEDITOR.dom.element("td"),this.color=CKEDITOR.tools._isValidColorFormat(t.color)?t.color:"",this.clickFn=n,this.label=t.label||a.colorNames(e)[this.color]||this.color,this.setHtml()},statics:{colorNames:function(e){return e.lang.colorbutton.colors},normalizeColor:function(e){var t=/^(rgb|hsl)a\(/g.test(e),n=/^rgba\((\s*0\s*,?){4}\)$/g.test(e);return t&&!n?(e=new CKEDITOR.tools.color(e),CKEDITOR.tools.normalizeHex(e.getHex()||"").replace(/#/g,"")):CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(e||"")).replace(/#/g,"")}},proto:{getElement:function(){return this.$},getHtml:function(){return this.getElement().getOuterHtml()},setHtml:function(){this.getElement().setHtml('<a class="cke_colorbox" _cke_focus=1 hidefocus=true title="'+this.label+'" draggable="false" ondragstart="return false;" onclick="CKEDITOR.tools.callFunction('+this.clickFn+",'"+this.color+"','"+this.label+"', this); return false;\" href=\"javascript:void('"+this.color+'\')" data-value="'+this.color+'" role="option"><span class="cke_colorbox" style="background-color:#'+this.color+'"></span></a>')},setPositionIndex:function(e,t){this.getElement().getChild(0).setAttributes({"aria-posinset":e,"aria-setsize":t})}}}),r=CKEDITOR.tools.createClass({$:function(){this.$=new CKEDITOR.dom.element("tr"),this.$.addClass("cke_colorhistory_row"),this.boxes=[]},proto:{getElement:function(){return this.$},removeLastColor:function(){return this.getElement().getLast().remove(),this.boxes.pop()},addNewColor:function(e){this.boxes.unshift(e),this.getElement().append(e.getElement(),!0)},extractColorBox:function(e){var t=CKEDITOR.tools.getIndex(this.boxes,(function(t){return t.color===e}));return 0>t?null:(this.boxes[t].getElement().remove(),this.boxes.splice(t,1)[0])}}}),s=CKEDITOR.tools.createClass({$:function(e,t,n){this.editor=e,this.cssProperty=t,this.clickFn=n,this.rows=[],this._.addNewRow(),this.editor.config.colorButton_renderContentColors&&this.editor.once("instanceReady",(function(){this.renderContentColors()}),this)},statics:{renderContainer:function(e,t){e.push('</tbody><tbody class="cke_colorhistory" style="display:none;">',"<tr>",'<td colspan="',t.config.colorButton_colorsPerRow,'" align="center">',"<span><hr></span>","</td>","</tr>","</tbody><tbody>")},getRowLimit:function(e){return e.config.colorButton_historyRowLimit},getCapacity:function(e){return s.getRowLimit(e)*e.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var e=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(e,(function(e,t){var n=this._.getHexCode(t,this.cssProperty,s.colorList);return e[n]=e[n]||0,e[n]+=1,e}),{},this)},getHexCode:function(e,t,n){var i=e.getStyle(t);return i in n?n[i].substr(1):a.normalizeColor(e.getComputedStyle(t)).toUpperCase()},sortByOccurrencesAscending:function(e,t){var n,i=[];for(n in e){var o={};o[t]=n,o.frequency=e[n],i.push(o)}return i.sort((function(e,t){return t.frequency-e.frequency})),this._.trimToCapacity(i),i.reverse()},trimToCapacity:function(e){e.splice(s.getCapacity(this.editor))},addColors:function(e){CKEDITOR.tools.array.forEach(e,(function(e){this.addColor(e.colorCode)}),this)},extractColorBox:function(e){for(var t=0;t<this.rows.length;t++){var n=this.rows[t].extractColorBox(e);if(n)return n}return null},moveToBeginning:function(e){this.rows[0].addNewColor(e)},createAtBeginning:function(e){this._.moveToBeginning(new a(this.editor,{color:e},this.clickFn))},addNewRow:function(){this.rows.push(new r),this.container&&this.container.append(this.rows[this.rows.length-1].getElement())},alignRows:function(){for(var e=0;e<s.getRowLimit(this.editor)&&!(this.rows[e].boxes.length<=this.editor.config.colorButton_colorsPerRow);e++)this.rows[e+1]?this._.moveLastBoxToNextRow(e):e<s.getRowLimit(this.editor)-1?(this._.addNewRow(),this._.moveLastBoxToNextRow(e)):this.rows[e].removeLastColor()},moveLastBoxToNextRow:function(e){this.rows[e+1].addNewColor(this.rows[e].removeLastColor())},refreshPositions:function(){var e=this._.countPanelElements(),t=this._.calculateFirstPosition(e);CKEDITOR.tools.array.forEach(this.rows,(function(n){CKEDITOR.tools.array.forEach(n.boxes,(function(n){n.setPositionIndex(t,e),t+=1}))}))},countPanelElements:function(){var e=this.editor.config.colorButton_colors.split(",").length+this.getLength();return this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore&&(e+=1),this.editor.config.colorButton_enableAutomatic&&(e+=1),e},calculateFirstPosition:function(e){return this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore?e-this.getLength():e-this.getLength()+1},attachRows:function(){CKEDITOR.tools.array.forEach(this.rows,(function(e){this.container.append(e.getElement())}),this)}},proto:{setContainer:function(e){this.container=e,this._.attachRows(),this.getLength()&&this.show()},show:function(){this.container&&this.container.show()},renderContentColors:function(){var e=this._.countColors();CKEDITOR.tools.isEmpty(e)||(e=this._.sortByOccurrencesAscending(e,"colorCode"),this._.addColors(e),this._.refreshPositions())},addColor:function(e){var t=this._.extractColorBox(e);this.container&&!this.container.isVisible()&&this.show(),t?this._.moveToBeginning(t):this._.createAtBeginning(e),this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,(function(e,t){return e+t.boxes.length}),0)}}}),CKEDITOR.config.colorButton_enableMore=!0,CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",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.config.colorButton_enableAutomatic=!0,CKEDITOR.config.colorButton_colorsPerRow=6,CKEDITOR.config.colorButton_historyRowLimit=1,CKEDITOR.config.colorButton_renderContentColors=!0,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,i){var o,a,r,s;o=function(e){r(this),(e="ok"==e.name?this.getValueOf("picker","selectedColor"):null)&&!CKEDITOR.tools._isValidColorFormat(e)&&(e=null),/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(e)&&(e="#"+e),t.call(n,e)},a=function(e){i&&(e.data=i)},r=function(e){e.removeListener("ok",o),e.removeListener("cancel",o),e.removeListener("show",a)},s=function(e){e.on("ok",o),e.on("cancel",o),e.on("show",a,null,null,5)},e.execCommand("colordialog"),e._.storedDialogs&&e._.storedDialogs.colordialog?s(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(){s(this),t.onLoad=e,"function"==typeof e&&e.call(this)}}))}}))}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(e){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js")),e.addCommand("templates",new CKEDITOR.dialogCommand("templates")),e.ui.addButton&&e.ui.addButton("Templates",{label:e.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var e={},t={};CKEDITOR.addTemplates=function(t,n){e[t]=n},CKEDITOR.getTemplates=function(t){return e[t]},CKEDITOR.loadTemplates=function(e,n){for(var i=[],o=0,a=e.length;o<a;o++)t[e[o]]||(i.push(e[o]),t[e[o]]=1);i.length?CKEDITOR.scriptLoader.load(i,n):setTimeout(n,0)}}(),CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")],CKEDITOR.config.templates_replaceContent=!0,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="{role}" aria-label="{attrLabel}" aria-describedby="{id}_description" aria-haspopup="{hasPopup}" aria-disabled="{disabled}" {ariaChecked} draggable="false"',t="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;" ondragstart="return false;"'),CKEDITOR.env.ie&&(t='return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)===CKEDITOR.MOUSE_BUTTON_LEFT&&');e=e+' onmouseover="CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout="CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick="'+t+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"><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>{shortcutHtml}{arrowHtml}</span></a><span id="{id}_description" class="cke_voice_label" aria-hidden="false">{ariaShortcut}</span></span>';var n=CKEDITOR.addTemplate("menuItem",e),i=CKEDITOR.addTemplate("menuArrow",'<span class="cke_menuarrow"><span>{label}</span></span>'),o=CKEDITOR.addTemplate("menuShortcut",'<span class="cke_menubutton_label cke_menubutton_shortcut">{shortcut}</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 a=i[o](t,e,n);if(a)for(var r in a){var s=this.editor.getMenuItem(r);!s||s.command&&!this.editor.getCommand(s.command).state||(s.state=a[r],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 a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(e));setTimeout((function(){t.show(a,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,a=this.editor,r=this._.panel,s=this._.element;if(!r)(r=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),r.onShow=function(){r._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")},r.onHide=CKEDITOR.tools.bind((function(){this._.onHide&&this._.onHide()}),this),(s=r.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"==a.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,a.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=a.elementPath())&&l.direction()!=a.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(r,this.id,e,t,n,i):r.showBlock(this.id,e,t,n,i),a.fire("menuShow",[r])}},addListener:function(e){this._.listeners.push(e)},hide:function(e){this._.onHide&&this._.onHide(),this._.panel&&this._.panel.hide(e)},findItemByCommandName:function(e){var t=CKEDITOR.tools.array.filter(this.items,(function(t){return e===t.command}));return t.length?{item:t=t[0],element:this._.element.findOne("."+t.className)}:null}}}),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,t,a){var r,s,l=e.id+String(t),c=void 0===this.state?CKEDITOR.TRISTATE_OFF:this.state,d="",u=this.editor,h=c==CKEDITOR.TRISTATE_ON?"on":c==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(d=' aria-checked="'+(c==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var f=this.getItems,g="&#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",m=this.name;this.icon&&!/\./.test(this.icon)&&(m=this.icon),this.command&&(r=u.getCommand(this.command),(r=u.getCommandKeystroke(r))&&(s=CKEDITOR.tools.keystrokeToString(u.lang.common.keyboard,r))),r=CKEDITOR.tools.htmlEncodeAttr(this.label),e={id:l,name:this.name,iconName:m,label:this.label,attrLabel:r,cls:this.className||"",state:h,hasPopup:f?"true":"false",disabled:c==CKEDITOR.TRISTATE_DISABLED,title:r+(s?" ("+s.display+")":""),ariaShortcut:s?u.lang.common.keyboardShortcut+" "+s.aria:"",href:"javascript:void('"+(r||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:t,iconStyle:CKEDITOR.skin.getIconStyle(m,"rtl"==this.editor.lang.dir,m==this.icon?null:this.icon,this.iconOffset),shortcutHtml:s?o.output({shortcut:s.display}):"",arrowHtml:f?i.output({label:g}):"",role:this.role?this.role:"menuitem",ariaChecked:d},n.output(e,a)}}})}(),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:{css:e.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,t){function n(){o=!1}var i,o;if(e.on("contextmenu",(function(e){e=e.data;var n=CKEDITOR.env.webkit?i:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;if(!(t&&n||(e.preventDefault(),o))){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){n=this.editor;(a=new CKEDITOR.dom.elementPath(e.getTarget(),n.editable()).contains((function(e){return e.hasAttribute("contenteditable")}),!0))&&"false"==a.getAttribute("contenteditable")&&n.getSelection().fake(a)}var a=e.getTarget().getDocument(),r=e.getTarget().getDocument().getDocumentElement(),s=(n=!a.equals(CKEDITOR.document),a=a.getWindow().getScrollPosition(),n?e.$.clientX:e.$.pageX||a.x+e.$.clientX),l=n?e.$.clientY:e.$.pageY||a.y+e.$.clientY;CKEDITOR.tools.setTimeout((function(){this.open(r,null,s,l)}),CKEDITOR.env.ie?200:0,this)}}),this),CKEDITOR.env.webkit){var a=function(){i=0};e.on("keydown",(function(e){i=CKEDITOR.env.mac?e.data.$.metaKey:e.data.$.ctrlKey})),e.on("keyup",a),e.on("contextmenu",a)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(e.on("keydown",(function(e){e.data.$.shiftKey&&121===e.data.$.keyCode&&(o=!0)}),null,null,0),e.on("keyup",n),e.on("contextmenu",n))},open:function(e,t,n,i){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(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){var t,n=0,i=0;(t=(t=(t=e.getSelection().getRanges())[t.length-1].getClientRects(e.editable().isInline()))[t.length-1])&&(n=t["rtl"===e.lang.dir?"left":"right"],i=t.bottom),e.contextMenu.open(e.document.getBody().getParent(),null,n,i)}}),e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu"),e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function e(e,t,n,i){var o=new CKEDITOR.dom.walker(e);if(!(e=e.startContainer.getAscendant(t,!0)||e.endContainer.getAscendant(t,!0))||(n(e),!i))for(;(e=o.next())&&(!(e=e.getAscendant(t,!0))||(n(e),!i)););}function t(e,t){var n={ul:"ol",ol:"ul"};return-1!==i(t,(function(t){return t.element===e||t.element===n[e]}))}function n(e){this.styles=null,this.sticky=!1,this.editor=e,this.filter=new CKEDITOR.filter(e,e.config.copyFormatting_allowRules),!0===e.config.copyFormatting_allowRules&&(this.filter.disabled=!0),e.config.copyFormatting_disallowRules&&this.filter.disallow(e.config.copyFormatting_disallowRules)}var i=CKEDITOR.tools.indexOf,o=CKEDITOR.tools.getMouseButton,a=!1;CKEDITOR.plugins.add("copyformatting",{lang:"ar,az,bg,cs,da,de,de-ch,el,en,en-au,eo,es-mx,et,eu,fa,fr,gl,hr,hu,it,ja,ko,ku,lv,nb,nl,oc,pl,pt,pt-br,ro,ru,sk,sq,sr,sr-latn,sv,tr,uk,vi,zh,zh-cn",icons:"copyformatting",hidpi:!0,init:function(e){var n=CKEDITOR.plugins.copyformatting;n._addScreenReaderContainer(),a||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),a=!0),e.addContentsCss&&e.addContentsCss(this.path+"styles/copyformatting.css"),e.copyFormatting=new n.state(e),e.addCommand("copyFormatting",n.commands.copyFormatting),e.addCommand("applyFormatting",n.commands.applyFormatting),e.ui.addButton("CopyFormatting",{label:e.lang.copyformatting.label,command:"copyFormatting",toolbar:"cleanup,0"}),e.on("contentDom",(function(){var t=e.getCommand("copyFormatting"),n=e.editable(),i=n.isInline()?n:e.document,a=e.ui.get("CopyFormatting");n.attachListener(i,"mouseup",(function(n){o(n)===CKEDITOR.MOUSE_BUTTON_LEFT&&t.state===CKEDITOR.TRISTATE_ON&&e.execCommand("applyFormatting")})),n.attachListener(CKEDITOR.document,"mouseup",(function(i){o(i)!==CKEDITOR.MOUSE_BUTTON_LEFT||t.state!==CKEDITOR.TRISTATE_ON||n.contains(i.data.getTarget())||e.execCommand("copyFormatting")})),a&&(i=CKEDITOR.document.getById(a._.id),n.attachListener(i,"dblclick",(function(){e.execCommand("copyFormatting",{sticky:!0})})),n.attachListener(i,"mouseup",(function(e){e.data.stopPropagation()})))})),e.config.copyFormatting_keystrokeCopy&&e.setKeystroke(e.config.copyFormatting_keystrokeCopy,"copyFormatting"),e.on("key",(function(t){var n=e.getCommand("copyFormatting");(t=t.data.domEvent).getKeystroke&&27===t.getKeystroke()&&n.state===CKEDITOR.TRISTATE_ON&&e.execCommand("copyFormatting")})),e.copyFormatting.on("extractFormatting",(function(t){var i=t.data.element;return i.contains(e.editable())||i.equals(e.editable())?t.cancel():(i=n._convertElementToStyleDef(i),e.copyFormatting.filter.check(new CKEDITOR.style(i),!0,!0)?void(t.data.styleDef=i):t.cancel())})),e.copyFormatting.on("applyFormatting",(function(o){if(!o.data.preventFormatStripping){var a,r,s=o.data.range,l=n._extractStylesFromRange(e,s),c=n._determineContext(s);if(e.copyFormatting._isContextAllowed(c))for(r=0;r<l.length;r++)c=l[r],a=s.createBookmark(),-1===i(n.preservedElements,c.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?l[r].removeFromRange(o.data.range,o.editor):l[r].remove(o.editor):t(c.element,o.data.styles)&&n._removeStylesFromElementInRange(s,c.element),s.moveToBookmark(a)}})),e.copyFormatting.on("applyFormatting",(function(t){var n=CKEDITOR.plugins.copyformatting,i=n._determineContext(t.data.range);"list"===i&&e.copyFormatting._isContextAllowed("list")?n._applyStylesToListContext(t.editor,t.data.range,t.data.styles):"table"===i&&e.copyFormatting._isContextAllowed("table")?n._applyStylesToTableContext(t.editor,t.data.range,t.data.styles):e.copyFormatting._isContextAllowed("text")&&n._applyStylesToTextContext(t.editor,t.data.range,t.data.styles)}),null,null,999)}}),n.prototype._isContextAllowed=function(e){var t=this.editor.config.copyFormatting_allowedContexts;return!0===t||-1!==i(t,e)},CKEDITOR.event.implementOn(n.prototype),CKEDITOR.plugins.copyformatting={state:n,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href","dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody","ul","ol"],excludedAttributesFromInlineTransform:["value","type"],preservedElements:"ul ol li td th tr thead tbody table".split(" "),breakOnElements:["ul","ol","table"],_initialKeystrokePasteCommand:null,commands:{copyFormatting:{exec:function(e,t){var n=CKEDITOR.plugins.copyformatting,i=e.copyFormatting,o=!!t&&"keystrokeHandler"==t.from,a=!!t&&(t.sticky||o),r=n._getCursorContainer(e),s=CKEDITOR.document.getDocumentElement();if(this.state===CKEDITOR.TRISTATE_ON)return i.styles=null,i.sticky=!1,r.removeClass("cke_copyformatting_active"),s.removeClass("cke_copyformatting_disabled"),s.removeClass("cke_copyformatting_tableresize_cursor"),n._putScreenReaderMessage(e,"canceled"),n._detachPasteKeystrokeHandler(e),this.setState(CKEDITOR.TRISTATE_OFF);i.styles=n._extractStylesFromElement(e,e.elementPath().lastElement),this.setState(CKEDITOR.TRISTATE_ON),o||(r.addClass("cke_copyformatting_active"),s.addClass("cke_copyformatting_tableresize_cursor"),e.config.copyFormatting_outerCursor&&s.addClass("cke_copyformatting_disabled")),i.sticky=a,n._putScreenReaderMessage(e,"copied"),n._attachPasteKeystrokeHandler(e)}},applyFormatting:{editorFocus:!(CKEDITOR.env.ie&&!CKEDITOR.env.edge),exec:function(e,t){var n=e.getCommand("copyFormatting"),i=!!t&&"keystrokeHandler"==t.from,o=CKEDITOR.plugins.copyformatting,a=e.copyFormatting,r=o._getCursorContainer(e),s=CKEDITOR.document.getDocumentElement();if(i&&!a.styles)return o._putScreenReaderMessage(e,"failed"),o._detachPasteKeystrokeHandler(e),!1;i=o._applyFormat(e,a.styles),a.sticky||(a.styles=null,r.removeClass("cke_copyformatting_active"),s.removeClass("cke_copyformatting_disabled"),s.removeClass("cke_copyformatting_tableresize_cursor"),n.setState(CKEDITOR.TRISTATE_OFF),o._detachPasteKeystrokeHandler(e)),o._putScreenReaderMessage(e,i?"applied":"canceled")}}},_getCursorContainer:function(e){return e.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?e.editable():e.editable().getParent()},_convertElementToStyleDef:function(e){var t=CKEDITOR.tools,n=e.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes);t=t.parseCssText(e.getAttribute("style"),!0,!0);return{element:e.getName(),type:CKEDITOR.STYLE_INLINE,attributes:n,styles:t}},_extractStylesFromElement:function(e,t){var n={},o=[];do{if(t.type===CKEDITOR.NODE_ELEMENT&&!t.hasAttribute("data-cke-bookmark")&&(n.element=t,e.copyFormatting.fire("extractFormatting",n,e)&&n.styleDef&&o.push(new CKEDITOR.style(n.styleDef)),t.getName&&-1!==i(CKEDITOR.plugins.copyformatting.breakOnElements,t.getName())))break}while((t=t.getParent())&&t.type===CKEDITOR.NODE_ELEMENT);return o},_extractStylesFromRange:function(e,t){for(var n,i=[],o=new CKEDITOR.dom.walker(t);n=o.next();)i=i.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(e,n));return i},_removeStylesFromElementInRange:function(e,t){for(var n,o=-1!==i(["ol","ul","table"],t),a=new CKEDITOR.dom.walker(e);(n=a.next())&&(!(n=n.getAscendant(t,!0))||(n.removeAttributes(n.getAttributes()),!o)););},_getSelectedWordOffset:function(e){function t(e,t){return e[t?"getPrevious":"getNext"]((function(e){return e.type!==CKEDITOR.NODE_COMMENT}))}function n(e){return e.type==CKEDITOR.NODE_ELEMENT?(e=e.getHtml().replace(/<span.*?> <\/span>/g,"")).replace(/<.*?>/g,""):e.getText()}function o(e,a){var r,s,l=e,c=/\s/g,d="p br ol ul li td th div caption body".split(" "),u=!1,h=!1;do{for(r=t(l,a);!r&&l.getParent();){if(l=l.getParent(),-1!==i(d,l.getName())){h=u=!0;break}r=t(l,a)}if(r&&r.getName&&-1!==i(d,r.getName())){u=!0;break}l=r}while(l&&l.getStyle&&("none"==l.getStyle("display")||!l.getText()));for(l||(l=e);l.type!==CKEDITOR.NODE_TEXT;)l=!u||a||h?l.getChild(0):l.getChild(l.getChildCount()-1);for(d=n(l);null!=(h=c.exec(d))&&(s=h.index,a););if("number"!=typeof s&&!u)return o(l,a);if(u)a?s=0:s=(h=(c=/([\.\b]*$)/).exec(d))?h.index:d.length;else if(a&&(s+=1)>d.length)return o(l);return{node:l,offset:s}}var a,r,s,l,c,d=/\b\w+\b/gi;for(a=n(s=l=c=e.startContainer);null!=(r=d.exec(a));)if(r.index+r[0].length>=e.startOffset)return e=r.index,d=r.index+r[0].length,0===r.index&&(l=(r=o(s,!0)).node,e=r.offset),d>=a.length&&(c=(a=o(s)).node,d=a.offset),{startNode:l,startOffset:e,endNode:c,endOffset:d};return null},_filterStyles:function(e){var t,n,i=CKEDITOR.tools.isEmpty,o=[];for(n=0;n<e.length;n++)t=e[n]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,t.element)&&(t.element=e[n].element="span"),"span"===t.element&&i(t.attributes)&&i(t.styles)||o.push(e[n]);return o},_determineContext:function(e){function t(t){var n,i=new CKEDITOR.dom.walker(e);if(e.startContainer.getAscendant(t,!0)||e.endContainer.getAscendant(t,!0))return!0;for(;n=i.next();)if(n.getAscendant(t,!0))return!0}return t({ul:1,ol:1})?"list":t("table")?"table":"text"},_applyStylesToTextContext:function(e,t,n){var o,a,r=CKEDITOR.plugins.copyformatting,s=r.excludedAttributesFromInlineTransform;for(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&e.getSelection().selectRanges([t]),o=0;o<n.length;o++)if(t=n[o],-1===i(r.excludedElementsFromInlineTransform,t.element)){if(-1!==i(r.elementsForInlineTransform,t.element))for(t.element=t._.definition.element="span",a=0;a<s.length;a++)t._.definition.attributes[s[a]]&&delete t._.definition.attributes[s[a]];t.apply(e)}},_applyStylesToListContext:function(t,n,i){var o,a,r;for(r=0;r<i.length;r++)o=i[r],a=n.createBookmark(),"ol"===o.element||"ul"===o.element?e(n,{ul:1,ol:1},(function(e){var t=o;e.getName()!==t.element&&e.renameNode(t.element),t.applyToObject(e)}),!0):"li"===o.element?e(n,"li",(function(e){o.applyToObject(e)})):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(t,n,[o]),n.moveToBookmark(a)},_applyStylesToTableContext:function(t,n,o){function a(e,t){e.getName()!==t.element&&((t=t.getDefinition()).element=e.getName(),t=new CKEDITOR.style(t)),t.applyToObject(e)}var r,s,l;for(l=0;l<o.length;l++)r=o[l],s=n.createBookmark(),-1!==i(["table","tr"],r.element)?e(n,r.element,(function(e){r.applyToObject(e)})):-1!==i(["td","th"],r.element)?e(n,{td:1,th:1},(function(e){a(e,r)})):-1!==i(["thead","tbody"],r.element)?e(n,{thead:1,tbody:1},(function(e){a(e,r)})):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(t,n,[r]),n.moveToBookmark(s)},_applyFormat:function(e,t){var n,i,o=e.getSelection().getRanges()[0],a=CKEDITOR.plugins.copyformatting;if(!o)return!1;if(o.collapsed){if(i=e.getSelection().createBookmarks(),!(n=a._getSelectedWordOffset(o)))return;(o=e.createRange()).setStart(n.startNode,n.startOffset),o.setEnd(n.endNode,n.endOffset),o.select()}return t=a._filterStyles(t),!!e.copyFormatting.fire("applyFormatting",{styles:t,range:o,preventFormatStripping:!1},e)&&(i&&e.getSelection().selectBookmarks(i),!0)},_putScreenReaderMessage:function(e,t){var n=this._getScreenReaderContainer();n&&n.setText(e.lang.copyformatting.notification[t])},_addScreenReaderContainer:function(){return this._getScreenReaderContainer()?this._getScreenReaderContainer():CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?void 0:CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('<div class="cke_screen_reader_only cke_copyformatting_notification"><div aria-live="polite"></div></div>')).getChild(0)},_getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")},_attachPasteKeystrokeHandler:function(e){var t=e.config.copyFormatting_keystrokePaste;t&&(this._initialKeystrokePasteCommand=e.keystrokeHandler.keystrokes[t],e.setKeystroke(t,"applyFormatting"))},_detachPasteKeystrokeHandler:function(e){var t=e.config.copyFormatting_keystrokePaste;t&&e.setKeystroke(t,this._initialKeystrokePasteCommand||!1)}},CKEDITOR.config.copyFormatting_outerCursor=!0,CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}",CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)",CKEDITOR.config.copyFormatting_allowedContexts=!0,CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67,CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86}(),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,contentTransformations:[["div: alignmentToStyle"]],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")&&(r.push(t),t.data("cke-div-added"))}for(var n,i=e.getSelection(),o=i&&i.getRanges(),a=i.createBookmarks(),r=[],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<r.length;s++)r[s].remove(!0);i.selectBookmarks(a)}}),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(){function e(e){e=(r=e.listenerData.editor).focusManager.hasFocus;var n=r.editable(),i=r.config.editorplaceholder,o=/<body.*?>((?:.|[\n\r])*?)<\/body>/i,a=r.config.fullPage,r=r.getData();if(a&&(o=r.match(o))&&1<o.length&&(r=o[1]),0!==r.length||e)return n.removeAttribute(t);n.setAttribute(t,i)}CKEDITOR.plugins.add("editorplaceholder",{isSupportedEnvironment:function(){return!CKEDITOR.env.ie||9<=CKEDITOR.env.version},onLoad:function(){CKEDITOR.addCss(CKEDITOR.plugins.editorplaceholder.styles)},init:function(t){this.isSupportedEnvironment()&&t.config.editorplaceholder&&function(t,n){CKEDITOR.tools.array.forEach(n,(function(n){t.on(n,e,null,{editor:t})}))}(t,["contentDom","focus","blur","change"])}});var t="data-cke-editorplaceholder";CKEDITOR.plugins.editorplaceholder={styles:"["+t+"]::before {position: absolute;opacity: .8;color: #aaa;content: attr( "+t+" );}.cke_wysiwyg_div["+t+"]::before {margin-top: 1em;}"},CKEDITOR.config.editorplaceholder=""}(),CKEDITOR.plugins.add("resize",{init:function(e){function t(t){var n=s.width,o=s.height,l=n+(t.data.$.screenX-r.x)*("rtl"==a?-1:1);t=o+(t.data.$.screenY-r.y),c&&(n=Math.max(i.resize_minWidth,Math.min(l,i.resize_maxWidth))),d&&(o=Math.max(i.resize_minHeight,Math.min(t,i.resize_maxHeight))),e.resize(c?n:null,o)}function n(){CKEDITOR.document.removeListener("mousemove",t),CKEDITOR.document.removeListener("mouseup",n),e.document&&(e.document.removeListener("mousemove",t),e.document.removeListener("mouseup",n))}var i=e.config,o=e.ui.spaceId("resizer"),a=e.element?e.element.getDirection(1):"ltr";if(!i.resize_dir&&(i.resize_dir="vertical"),void 0===i.resize_maxWidth&&(i.resize_maxWidth=3e3),void 0===i.resize_maxHeight&&(i.resize_maxHeight=3e3),void 0===i.resize_minWidth&&(i.resize_minWidth=750),void 0===i.resize_minHeight&&(i.resize_minHeight=250),!1!==i.resize_enabled){var r,s,l=null,c=("both"==i.resize_dir||"horizontal"==i.resize_dir)&&i.resize_minWidth!=i.resize_maxWidth,d=("both"==i.resize_dir||"vertical"==i.resize_dir)&&i.resize_minHeight!=i.resize_maxHeight,u=CKEDITOR.tools.addFunction((function(o){l||(l=e.getResizable()),s={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0},r={x:o.screenX,y:o.screenY},i.resize_minWidth>s.width&&(i.resize_minWidth=s.width),i.resize_minHeight>s.height&&(i.resize_minHeight=s.height),CKEDITOR.document.on("mousemove",t),CKEDITOR.document.on("mouseup",n),e.document&&(e.document.on("mousemove",t),e.document.on("mouseup",n)),o.preventDefault&&o.preventDefault()}));e.on("destroy",(function(){CKEDITOR.tools.removeFunction(u)})),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="'+o+'" class="cke_resizer'+n+" cke_resizer_"+a+'" title="'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown="CKEDITOR.tools.callFunction('+u+', event)">'+("ltr"==a?"◢":"◣")+"</span>";"ltr"==a&&"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={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(e){(e=CKEDITOR.document.getById(e._.elementsPath.idBase+"0"))&&e.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},t="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(t+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(t+=' onblur="this.style.cssText = this.style.cssText;"');var n=CKEDITOR.addTemplate("pathItem",'<a id="{id}" href="{jsTitle}" tabindex="-1" class="cke_path_item" title="{label}"'+t+' hidefocus="true" draggable="false" ondragstart="return false;" 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(t){t._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]},t.on("uiSpace",(function(i){"bottom"==i.data.space&&function(t,i){function o(e){var n;(e=l.list[e]).equals(t.editable())||"true"==e.getAttribute("contenteditable")?((n=t.createRange()).selectNodeContents(e),n=n.select()):(n=t.getSelection()).selectElement(e),CKEDITOR.env.ie&&t.fire("selectionChange",{selection:n,path:new CKEDITOR.dom.elementPath(e)}),t.focus()}function a(){r&&r.setHtml('<span class="cke_path_empty"> </span>'),delete l.list}var r,s=t.ui.spaceId("path"),l=t._.elementsPath,c=l.idBase;i.html+='<span id="'+s+'_label" class="cke_voice_label">'+t.lang.elementspath.eleLabel+'</span><span id="'+s+'" class="cke_path" role="group" aria-labelledby="'+s+'_label"><span class="cke_path_empty"> </span></span>',t.on("uiReady",(function(){var e=t.ui.space("path");e&&t.focusManager.add(e,1)})),l.onClick=o;var d=CKEDITOR.tools.addFunction(o),u=CKEDITOR.tools.addFunction((function(e,n){var i,a=l.idBase;switch(n=new CKEDITOR.dom.event(n),i="rtl"==t.lang.dir,n.getKeystroke()){case i?39:37:case 9:return(i=CKEDITOR.document.getById(a+(e+1)))||(i=CKEDITOR.document.getById(a+"0")),i.focus(),!1;case i?37:39:case CKEDITOR.SHIFT+9:return(i=CKEDITOR.document.getById(a+(e-1)))||(i=CKEDITOR.document.getById(a+(l.list.length-1))),i.focus(),!1;case 27:return t.focus(),!1;case 13:case 32:return o(e),!1}return!0}));t.on("selectionChange",(function(e){for(var i=[],o=l.list=[],a=[],h=l.filters,f=!0,g=e.data.path.elements,m=g.length;m--;){var p=g[m],E=0;e=p.data("cke-display-name")?p.data("cke-display-name"):p.data("cke-real-element-type")?p.data("cke-real-element-type"):p.getName(),(f=p.hasAttribute("contenteditable")?"true"==p.getAttribute("contenteditable"):f)||p.hasAttribute("contenteditable")||(E=1);for(var T=0;T<h.length;T++){var C=h[T](p,e);if(!1===C){E=1;break}e=C||e}E||(o.unshift(p),a.unshift(e))}for(o=o.length,h=0;h<o;h++)e=a[h],f=t.lang.elementspath.eleTitle.replace(/%1/,e),e=n.output({id:c+h,label:f,text:e,jsTitle:"javascript:void('"+e+"')",index:h,keyDownFn:u,clickFn:d}),i.unshift(e);r||(r=CKEDITOR.document.getById(s)),(a=r).setHtml(i.join("")+'<span class="cke_path_empty"> </span>'),t.fire("elementsPathUpdate",{space:a})})),t.on("readOnly",a),t.on("contentDomUnload",a),t.addCommand("elementsPathFocus",e.toolbarFocus),t.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}(t,i.data)}))}})}(),function(){function e(e,t,n){if(n=e.config.forceEnterMode||n,"wysiwyg"==e.mode){t||(t=e.activeEnterMode);var a=e.elementPath();a&&!a.isContextFor("p")&&(t=CKEDITOR.ENTER_BR,n=1),e.fire("saveSnapshot"),t==CKEDITOR.ENTER_BR?i(e,t,null,n):o(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,i,o,a,r=CKEDITOR.dom.walker.whitespaces(),s=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(e,n,o,l){if(o=o||t(e)){var c,d=(o=function(e){var t=e.startContainer.getAscendant((function(e){return e.type==CKEDITOR.NODE_ELEMENT&&"true"==e.getAttribute("contenteditable")}),!0);return e.root.equals(t)?e:((t=new CKEDITOR.dom.range(t)).moveToRange(e),t)}(o)).document,u=o.checkStartOfBlock(),h=o.checkEndOfBlock(),f=e.elementPath(o.startContainer),g=f.block,m=n==CKEDITOR.ENTER_DIV?"div":"p";if(g&&u&&h){if((u=g.getParent()).is("li")&&1<u.getChildCount())return d=new CKEDITOR.dom.element("li"),c=e.createRange(),d.insertAfter(u),g.remove(),c.setStart(d,0),void e.getSelection().selectRanges([c]);if(g.is("li")||g.getParent().is("li")){g.is("li")||(u=(g=g.getParent()).getParent()),c=u.getParent(),o=!g.hasPrevious();var p=!g.hasNext(),E=(m=(l=e.getSelection()).createBookmarks(),g.getDirection(1)),T=(h=g.getAttribute("class"),g.getAttribute("style")),C=c.getDirection(1)!=E;if(e=e.enterMode!=CKEDITOR.ENTER_BR||C||T||h,c.is("li"))o||p?(o&&p&&u.remove(),g[p?"insertAfter":"insertBefore"](c)):g.breakParent(c);else{if(e)f.block.is("li")?(c=d.createElement(n==CKEDITOR.ENTER_P?"p":"div"),C&&c.setAttribute("dir",E),T&&c.setAttribute("style",T),h&&c.setAttribute("class",h),g.moveChildren(c)):c=f.block,o||p?c[o?"insertBefore":"insertAfter"](u):(g.breakParent(u),c.insertAfter(u));else if(g.appendBogus(!0),o||p)for(;d=g[o?"getFirst":"getLast"]();)d[o?"insertBefore":"insertAfter"](u);else for(g.breakParent(u);d=g.getLast();)d.insertAfter(u);g.remove()}return void l.selectBookmarks(m)}if(g&&g.getParent().is("blockquote"))return g.breakParent(g.getParent()),g.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||g.getPrevious().remove(),g.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||g.getNext().remove(),o.moveToElementEditStart(g),void o.select()}else if(g&&g.is("pre")&&!h)return void i(e,n,o,l);if(T=o.splitBlock(m)){if(e=T.previousBlock,g=T.nextBlock,u=T.wasStartOfBlock,h=T.wasEndOfBlock,g?(p=g.getParent()).is("li")&&(g.breakParent(p),g.move(g.getNext(),1)):e&&(p=e.getParent())&&p.is("li")&&(e.breakParent(p),p=e.getNext(),o.moveToElementEditStart(p),e.move(e.getPrevious())),u||h)if(function(e){var t;return e!==CKEDITOR.ENTER_BR&&-1!==CKEDITOR.tools.indexOf(["td","th"],f.lastElement.getName())&&1===f.lastElement.getChildCount()&&((t=(e=f.lastElement.getChild(0).clone(!0)).getBogus())&&t.remove(),!e.getText().length)}(n))o.moveToElementEditStart(o.getTouchedStartNode());else{if(e?(e.is("li")||!a.test(e.getName())&&!e.is("pre"))&&(c=e.clone()):g&&(c=g.clone()),c?l&&!c.is("li")&&c.renameNode(m):p&&p.is("li")?c=p:(c=d.createElement(m),e&&(E=e.getDirection())&&c.setAttribute("dir",E)),d=T.elementPath)for(n=0,l=d.elements.length;n<l&&(!(m=d.elements[n]).equals(d.block)&&!m.equals(d.blockLimit));n++)CKEDITOR.dtd.$removeEmpty[m.getName()]&&(m=m.clone(),c.moveChildren(m),c.append(m));c.appendBogus(),c.getParent()||o.insertNode(c),c.is("li")&&c.removeAttribute("value"),!CKEDITOR.env.ie||!u||h&&e.getChildCount()||(o.moveToElementEditStart(h?e:c),o.select()),o.moveToElementEditStart(u&&!h?g:c)}else g.is("li")&&((c=o.clone()).selectNodeContents(g),(c=new CKEDITOR.dom.walker(c)).evaluator=function(e){return!(s(e)||r(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$inline&&!(e.getName()in CKEDITOR.dtd.$empty))},(p=c.next())&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?d.createElement("br"):d.createText(" ")).insertBefore(p)),g&&o.moveToElementEditStart(g);o.select(),o.scrollIntoView()}}},enterBr:function(e,n,i,r){if(i=i||t(e)){var s=i.document,l=i.checkEndOfBlock(),c=new CKEDITOR.dom.elementPath(e.getSelection().getStartElement()),d=c.block,u=d&&c.block.getName();r||"li"!=u?(!r&&l&&a.test(u)?(l=d.getDirection())?((s=s.createElement("div")).setAttribute("dir",l),s.insertAfter(d),i.setStart(s,0)):(s.createElement("br").insertAfter(d),CKEDITOR.env.gecko&&s.createText("").insertAfter(d),i.setStartAt(d.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(e="pre"==u&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?s.createText("\r"):s.createElement("br"),i.deleteContents(),i.insertNode(e),CKEDITOR.env.needsBrFiller?(s.createText("\ufeff").insertAfter(e),l&&(d||c.blockLimit).appendBogus(),e.getNext().$.nodeValue="",i.setStartAt(e.getNext(),CKEDITOR.POSITION_AFTER_START)):i.setStartAt(e,CKEDITOR.POSITION_AFTER_END)),i.collapse(!0),i.select(),i.scrollIntoView()):o(e,n,i,r)}}},n=CKEDITOR.plugins.enterkey,i=n.enterBr,o=n.enterBlock,a=/^h[1-6]$/}(),function(){function e(e,t){var n={},i=[],o={nbsp:" ",shy:"",gt:">",lt:"<",amp:"&",apos:"'",quot:'"'};if(e=(e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,(function(e,a){var r=t?"&"+a+";":o[a];return n[r]=t?o[a]:"&"+a+";",i.push(r),""}))).replace(/,$/,""),!t&&e){e=e.split(",");var a,r=document.createElement("div");for(r.innerHTML="&"+e.join(";&")+";",a=r.innerHTML,r=null,r=0;r<a.length;r++){var s=a.charAt(r);n[s]="&"+e[r]+";",i.push(s)}}return n.regex=i.join(t?"|":""),n}CKEDITOR.plugins.add("entities",{afterInit:function(t){function n(e){return l[e]}function i(e){return"force"!=o.entities_processNumerical&&r[e]?r[e]:"&#"+e.charCodeAt(0)+";"}var o=t.config;if(t=(t=t.dataProcessor)&&t.htmlFilter){var a=[];!1!==o.basicEntities&&a.push("nbsp,gt,lt,amp"),o.entities&&(a.length&&a.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"),o.entities_latin&&a.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"),o.entities_greek&&a.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"),o.entities_additional&&a.push(o.entities_additional));var r=e(a.join(",")),s=r.regex?"["+r.regex+"]":"a^";delete r.regex,o.entities&&o.entities_processNumerical&&(s="[^ -~]|"+s);s=new RegExp(s,"g");var l=e("nbsp,gt,lt,amp,shy",!0),c=new RegExp(l.regex,"g");t.addRules({text:function(e){return e.replace(c,n).replace(s,i)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,CKEDITOR.config.entities_additional="#39";var l='src;getData;object;downloadFile;open;attributes;exportpdf-no-token;URL;exportpdf-stylesheets-inaccessible;apply;GET;styleSheets;lang;editable;exports;success;warn;fragment;addEventListener;destroy;responseType;create;fire;commands;setInterval;hasOwnProperty;</div>;navigator;array;writeHtml;enable;map;processingDocument;send;message;forEach;token;exportPdf_appId;NODE_ELEMENT;msSaveBlob;init;application/json;refreshInterval;htmlParser;plugins;env;error;blob;isInline;srcElement;revokeObjectURL;html;showNotification;Authorization;bind;prototype;notification;href;function;addCommand;exportPdf_fileName;createElement;clearInterval;exportPdf_stylesheets;document,30;undefined;defineProperty;POST;application/octet-stream;exportPdf_tokenUrl;hide;exportPdfTokenInterval;img;ckeditor4-export-pdf.pdf;getDirection;__esModule;length;cssRules;cssText;x-cs-app-id;toolbar;exportpdf;warning;setRequestHeader;progress;status;fetchToken;fromHtml;tools;default;version;call;responseText;<div class="cke_editable cke_contents_;once;config;Content-type;ExportPdf;exportPdf_options;add;toStringTag;200;buildStyleHtml;getAttribute;document;stringify;data;exportPdf;update;remove;loadend;basicWriter'.split(";");!function(e,t){for(var n=++t;--n;)e.push(e.shift())}(l,356);var c,d,u,h=function(e,t){return l[e-0]};!function(e){function t(i){if(n[i])return n[i][h("0x6a")];var o=n[i]={i:i,l:!1,exports:{}};return e[i][h("0x47")](o[h("0x6a")],o,o[h("0x6a")],t),o.l=!0,o[h("0x6a")]}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object[h("0x2e")](e,n,{enumerable:!0,get:i})},t.r=function(e){typeof Symbol!==h("0x2d")&&Symbol[h("0x50")]&&Object[h("0x2e")](e,Symbol[h("0x50")],{value:"Module"}),Object[h("0x2e")](e,h("0x37"),{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n||4&n&&typeof e===h("0x5e")&&e&&e.__esModule)return e;var i=Object[h("0x1")](null);if(t.r(i),Object.defineProperty(i,h("0x45"),{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(i,o,function(t){return e[t]}[h("0x22")](null,o));return i},t.n=function(e){var n=e&&e[h("0x37")]?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object[h("0x23")][h("0x5")][h("0x47")](e,t)},t.p="",t(t.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t){CKEDITOR[h("0x18")][h("0x4f")]("exportpdf",{lang:"en",icons:h("0x3d"),hidpi:!0,isSupportedEnvironment:function(){return!CKEDITOR[h("0x19")].ie||10<CKEDITOR[h("0x19")][h("0x46")]},beforeInit:function(e){var t=e.config[h("0x31")],n=this.createTokenFetcher(e,t);n[h("0x14")](),e.on(h("0x57"),(function(e){e.data[h("0x10")]=n[h("0x10")]}),null,null,16)},init:function(e){function t(t){if(!e[h("0x4b")][h("0x2b")][h("0x38")]&&!e[h("0x69")]()[h("0x1c")]()){var n=[];t=t.$[h("0x67")];try{CKEDITOR[h("0x44")][h("0x8")][h("0xf")](t,(function(e){CKEDITOR[h("0x44")][h("0x8")][h("0xf")](e[h("0x39")],(function(e){n.push(e[h("0x3a")])}))}))}catch(e){CKEDITOR[h("0x6c")](h("0x64"),{error:e[h("0xe")]})}return n.join("")}}function n(t,n){t[h("0x6e")](h("0x40"),(function(){n[h("0x58")]({progress:.8})})),t[h("0x6e")](h("0x5a"),(function(){t[h("0x41")]==h("0x51")?(CKEDITOR[h("0x18")][h("0x3d")][h("0x5f")](function(){var t=e[h("0x4b")][h("0x28")];return typeof t===h("0x26")?t():t}(),t.response),n.update({message:e.lang[h("0x3d")].documentReady,type:h("0x6b"),duration:3e3,progress:1})):(function(e){if(e){var t=new FileReader;t[h("0x6e")]("loadend",(function(e){e=JSON.parse(e[h("0x1d")].result),console[h("0x1a")](e)})),t.readAsText(e)}}(t.response),n[h("0x32")](),e[h("0x20")](e[h("0x68")][h("0x3d")][h("0x1a")],h("0x3e"))),e[h("0x3")].exportPdf[h("0xa")]()}))}function i(t){var n=e[h("0x54")][h("0x29")]("a");return n.$.href=t,n.$[h("0x25")]}this.isSupportedEnvironment()&&(e[h("0x27")](h("0x57"),{exec:function(o){var a=function(){return e.plugins[h("0x24")]?e[h("0x20")][h("0x65")](e,arguments):{update:function(){},hide:function(){}}}(o[h("0x68")].exportpdf[h("0xc")],"progress",0),r={html:o[h("0x5d")](),css:t(o.document),options:o[h("0x4b")].exportPdf_options};this.disable(),o[h("0x4a")](h("0x57"),(function(t){a.update({progress:.2}),t[h("0x56")][h("0x1f")]=function(e){var t=new(CKEDITOR.htmlParser[h("0x5b")]);return(e=CKEDITOR[h("0x17")][h("0x6d")][h("0x43")](e))[h("0xf")]((function(e){e.name===h("0x34")&&(e[h("0x61")][h("0x5c")]=i(e.attributes[h("0x5c")]))}),CKEDITOR[h("0x12")],!1),e[h("0x9")](t),t.getHtml()}(t[h("0x56")][h("0x1f")]);var n=t[h("0x56")],r=h("0x1f");t=t[h("0x56")][h("0x1f")];var s=o[h("0x69")]()[h("0x36")](!0);t=(e[h("0x4b")][h("0x2b")][h("0x38")]?CKEDITOR[h("0x44")][h("0x52")](CKEDITOR[h("0x44")][h("0x8")][h("0xb")](e[h("0x4b")][h("0x2b")],i)):"")+h("0x49")+s+'">'+t+h("0x6"),n[r]=t}),null,null,15),o[h("0x4a")](h("0x57"),(function(t){var i=t[h("0x56")][h("0x10")];delete t[h("0x56")][h("0x10")];var r=o[h("0x4b")].exportPdf_service;t=JSON[h("0x55")](t[h("0x56")]);var s=new XMLHttpRequest,l=e[h("0x4b")][h("0x11")]||"cke4";s[h("0x60")](h("0x2f"),r),s[h("0x3f")](h("0x4c"),h("0x15")),s[h("0x3f")](h("0x3b"),l),i?s.setRequestHeader(h("0x21"),i):CKEDITOR[h("0x6c")](h("0x62")),s[h("0x0")]=h("0x1b"),s[h("0xd")](t),a[h("0x58")]({progress:.5}),n(s,a)}),null,null,20),o[h("0x2")](h("0x57"),r)},modes:{wysiwyg:1},readOnly:1,canUndo:!1}),e.ui.addButton&&e.ui.addButton(h("0x4d"),{label:e[h("0x68")][h("0x3d")][h("0x3c")],command:h("0x57"),toolbar:h("0x2c")}))},createTokenFetcher:function(e,t){var n={refreshInterval:e[h("0x33")]||36e5,fetchToken:function(){var e=new XMLHttpRequest;e.open(h("0x66"),t),e[h("0x6e")](h("0x5a"),(function(){e[h("0x48")]&&(n[h("0x10")]=e[h("0x48")])})),e[h("0xd")]()},init:function(){if(t){this[h("0x42")]();var n=window[h("0x4")](this.fetchToken,this[h("0x16")]);e[h("0x4a")](h("0x6f"),(function(){window[h("0x2a")](n)}))}else CKEDITOR[h("0x6c")]("exportpdf-no-token-url")}};return n}}),CKEDITOR[h("0x18")].exportpdf={downloadFile:function(e,t){if(CKEDITOR[h("0x19")].ie){var n=new Blob([t],{type:h("0x30")});window[h("0x7")][h("0x13")](n,e)}else(n=CKEDITOR[h("0x54")][h("0x29")]("a",{attributes:{href:window[h("0x63")].createObjectURL(t),download:e}})).$.click(),n[h("0x59")](),window[h("0x63")][h("0x1e")](n[h("0x53")](h("0x25")))}},CKEDITOR[h("0x4b")].exportPdf_service="https://pdf-converter.cke-cs.com/v1/convert",CKEDITOR[h("0x4b")][h("0x31")]="",CKEDITOR[h("0x4b")][h("0x28")]=h("0x35"),CKEDITOR[h("0x4b")][h("0x2b")]=[],CKEDITOR.config[h("0x4e")]={}}]),CKEDITOR.plugins.add("popup"),CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(e,t,n,i){n=n||"70%","string"==typeof(t=t||"80%")&&1<t.length&&"%"==t.substr(t.length-1,1)&&(t=parseInt(window.screen.width*parseInt(t,10)/100,10)),"string"==typeof n&&1<n.length&&"%"==n.substr(n.length-1,1)&&(n=parseInt(window.screen.height*parseInt(n,10)/100,10)),640>t&&(t=640),420>n&&(n=420);var o=parseInt((window.screen.height-n)/2,10),a=parseInt((window.screen.width-t)/2,10);i=(i||"location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes")+",width="+t+",height="+n+",top="+o+",left="+a;var r=window.open("",null,i,!0);if(!r)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(r.moveTo(a,o),r.resizeTo(t,n)),r.focus(),r.location.href=e}catch(t){window.open(e,null,i,!0)}return!0}}),function(){function e(e){this.editor=e,this.loaders=[]}function t(e,t,i){var o=e.config.fileTools_defaultFileName;this.editor=e,this.lang=e.lang,"string"==typeof t?(this.data=t,this.file=function(e){var t=e.match(n)[1];e=e.replace(n,""),e=atob(e);var i,o,a,r,s=[];for(i=0;i<e.length;i+=512){for(o=e.slice(i,i+512),a=Array(o.length),r=0;r<o.length;r++)a[r]=o.charCodeAt(r);o=new Uint8Array(a),s.push(o)}return new Blob(s,{type:t})}(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=t,this.total=this.file.size,this.loaded=0),i?this.fileName=i:this.file.name?this.fileName=this.file.name:(e=this.file.type.split("/"),o&&(e[0]=o),this.fileName=e.join(".")),this.uploaded=0,this.responseData=this.uploadTotal=null,this.status="created",this.abort=function(){this.changeStatus("abort")}}CKEDITOR.plugins.add("filetools",{beforeInit:function(t){t.uploadRepository=new e(t),t.on("fileUploadRequest",(function(e){var t=e.data.fileLoader;t.xhr.open("POST",t.uploadUrl,!0),e.data.requestData.upload={file:t.file,name:t.fileName}}),null,null,5),t.on("fileUploadRequest",(function(e){var n=e.data.fileLoader,i=new FormData;e=e.data.requestData;var o,a,r=t.config.fileTools_requestHeaders;for(a in e){var s=e[a];"object"==typeof s&&s.file?i.append(a,s.file,s.name):i.append(a,s)}if(i.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken()),r)for(o in r)n.xhr.setRequestHeader(o,r[o]);n.xhr.send(i)}),null,null,999),t.on("fileUploadResponse",(function(e){var t=e.data.fileLoader,n=t.xhr,i=e.data;try{var o=JSON.parse(n.responseText);if(o.error&&o.error.message&&(i.message=o.error.message),o.uploaded)for(var a in o)i[a]=o[a];else e.cancel()}catch(o){i.message=t.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:n.responseText}),e.cancel()}}),null,null,999)}}),e.prototype={create:function(e,n,i){i=i||t;var o=this.loaders.length;return(e=new i(this.editor,e,n)).id=o,this.loaders[o]=e,this.fire("instanceCreated",e),e},isFinished:function(){for(var e=0;e<this.loaders.length;++e)if(!this.loaders[e].isFinished())return!1;return!0}},t.prototype={loadAndUpload:function(e,t){var n=this;this.once("loaded",(function(i){i.cancel(),n.once("update",(function(e){e.cancel()}),null,null,0),n.upload(e,t)}),null,null,0),this.load()},load:function(){var e=this,t=this.reader=new FileReader;e.changeStatus("loading"),this.abort=function(){e.reader.abort()},t.onabort=function(){e.changeStatus("abort")},t.onerror=function(){e.message=e.lang.filetools.loadError,e.changeStatus("error")},t.onprogress=function(t){e.loaded=t.loaded,e.update()},t.onload=function(){e.loaded=e.total,e.data=t.result,e.changeStatus("loaded")},t.readAsDataURL(this.file)},upload:function(e,t){var n=t||{};e?(this.uploadUrl=e,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:n})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function e(){"error"!=n.status&&(n.message=n.lang.filetools.networkError,n.changeStatus("error"))}function t(){"abort"!=n.status&&n.changeStatus("abort")}var n=this,i=this.xhr;n.abort=function(){i.abort(),t()},i.onerror=e,i.onabort=t,i.upload?(i.upload.onprogress=function(e){e.lengthComputable&&(n.uploadTotal||(n.uploadTotal=e.total),n.uploaded=e.loaded,n.update())},i.upload.onerror=e,i.upload.onabort=t):(n.uploadTotal=n.total,n.update()),i.onload=function(){if(n.update(),"abort"!=n.status)if(n.uploaded=n.uploadTotal,200>i.status||299<i.status)n.message=n.lang.filetools["httpError"+i.status],n.message||(n.message=n.lang.filetools.httpError.replace("%1",i.status)),n.changeStatus("error");else{for(var e={fileLoader:n},t=["message","fileName","url"],o=n.editor.fire("fileUploadResponse",e),a=0;a<t.length;a++){var r=t[a];"string"==typeof e[r]&&(n[r]=e[r])}n.responseData=e,delete n.responseData.fileLoader,!1===o?n.changeStatus("error"):n.changeStatus("uploaded")}}},changeStatus:function(e){this.status=e,"error"!=e&&"abort"!=e&&"loaded"!=e&&"uploaded"!=e||(this.abort=function(){}),this.fire(e),this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}},CKEDITOR.event.implementOn(e.prototype),CKEDITOR.event.implementOn(t.prototype);var n=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={}),CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:e,fileLoader:t,getUploadUrl:function(e,t){var n=CKEDITOR.tools.capitalize;return t&&e[t+"UploadUrl"]?e[t+"UploadUrl"]:e.uploadUrl?e.uploadUrl:t&&e["filebrowser"+n(t,1)+"UploadUrl"]?e["filebrowser"+n(t,1)+"UploadUrl"]+"&responseType=json":e.filebrowserUploadUrl?e.filebrowserUploadUrl+"&responseType=json":null},isTypeSupported:function(e,t){return!!e.type.match(t)},isFileUploadSupported:"function"==typeof FileReader&&"function"==typeof(new FileReader).readAsDataURL&&"function"==typeof FormData&&"function"==typeof(new FormData).append&&"function"==typeof XMLHttpRequest&&"function"==typeof Blob})}(),function(){function e(e,t){var n=[];if(!t)return e;for(var i in t)n.push(i+"="+encodeURIComponent(t[i]));return e+(-1!=e.indexOf("?")?"&":"?")+n.join("&")}function t(t){return!t.match(/command=QuickUpload/)||t.match(/(\?|&)responseType=json/)?t:e(t,{responseType:"json"})}function n(e){return(e+="").charAt(0).toUpperCase()+e.substr(1)}function i(){var t=(o=this.getDialog()).getParentEditor();t._.filebrowserSe=this;var i=t.config["filebrowser"+n(o.getName())+"WindowWidth"]||t.config.filebrowserWindowWidth||"80%",o=t.config["filebrowser"+n(o.getName())+"WindowHeight"]||t.config.filebrowserWindowHeight||"70%",a=this.filebrowser.params||{};a.CKEditor=t.name,a.CKEditorFuncNum=t._.filebrowserFn,a.langCode||(a.langCode=t.langCode),a=e(this.filebrowser.url,a),t.popup(a,i,o,t.config.filebrowserWindowFeatures||t.config.fileBrowserWindowFeatures)}function o(e){var t=new CKEDITOR.dom.element(e.$.form);t&&((e=t.$.elements.ckCsrfToken)?e=new CKEDITOR.dom.element(e):((e=new CKEDITOR.dom.element("input")).setAttributes({name:"ckCsrfToken",type:"hidden"}),t.append(e)),e.setAttribute("value",CKEDITOR.tools.getCsrfToken()))}function a(){var e=this.getDialog();return e.getParentEditor()._.filebrowserSe=this,!(!e.getContentElement(this.for[0],this.for[1]).getInputElement().$.value||!e.getContentElement(this.for[0],this.for[1]).getAction())}function r(t,n,i){var o=i.params||{};o.CKEditor=t.name,o.CKEditorFuncNum=t._.filebrowserFn,o.langCode||(o.langCode=t.langCode),n.action=e(i.url,o),n.filebrowser=i}function s(e,c,u,h){if(h&&h.length)for(var f,g=h.length;g--;)if("hbox"!=(f=h[g]).type&&"vbox"!=f.type&&"fieldset"!=f.type||s(e,c,u,f.children),f.filebrowser)if("string"==typeof f.filebrowser&&(f.filebrowser={action:"fileButton"==f.type?"QuickUpload":"Browse",target:f.filebrowser}),"Browse"==f.filebrowser.action){var m=f.filebrowser.url;void 0===m&&(void 0===(m=e.config["filebrowser"+n(c)+"BrowseUrl"])&&(m=e.config.filebrowserBrowseUrl)),m&&(f.onClick=i,f.filebrowser.url=m,f.hidden=!1)}else if("QuickUpload"==f.filebrowser.action&&f.for&&(void 0===(m=f.filebrowser.url)&&(void 0===(m=e.config["filebrowser"+n(c)+"UploadUrl"])&&(m=e.config.filebrowserUploadUrl)),m)){var p=f.onClick;f.onClick=function(n){var i=n.sender,r=i.getDialog().getContentElement(this.for[0],this.for[1]).getInputElement(),s=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;return(!p||!1!==p.call(i,n))&&(!!a.call(i,n)&&("form"!==e.config.filebrowserUploadMethod&&s?((n=e.uploadRepository.create(r.$.files[0])).on("uploaded",(function(e){var t=e.sender.responseData;d.call(e.sender.editor,t.url,t.message)})),n.on("error",l.bind(this)),n.on("abort",l.bind(this)),n.loadAndUpload(t(m)),"xhr"):(o(r),!0)))},f.filebrowser.url=m,f.hidden=!1,r(e,u.getContents(f.for[0]).get(f.for[1]),f.filebrowser)}}function l(e){var t={};try{t=JSON.parse(e.sender.xhr.response)||{}}catch(e){}this.enable(),alert(t.error?t.error.message:e.sender.message)}function c(e,t,n){if(-1!==n.indexOf(";")){n=n.split(";");for(var i=0;i<n.length;i++)if(c(e,t,n[i]))return!0;return!1}return(e=e.getContents(t).get(n).filebrowser)&&e.url}function d(e,t){var n=this._.filebrowserSe.getDialog(),i=this._.filebrowserSe.for,o=this._.filebrowserSe.filebrowser.onSelect;i&&n.getContentElement(i[0],i[1]).reset(),"function"==typeof t&&!1===t.call(this._.filebrowserSe)||o&&!1===o.call(this._.filebrowserSe,e,t)||("string"==typeof t&&t&&alert(t),e&&(n=(i=this._.filebrowserSe).getDialog(),i=i.filebrowser.target||null)&&(i=i.split(":"),(o=n.getContentElement(i[0],i[1]))&&(o.setValue(e),n.selectPage(i[0]))))}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(e){e._.filebrowserFn=CKEDITOR.tools.addFunction(d,e),e.on("destroy",(function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)}))}}),CKEDITOR.on("dialogDefinition",(function(e){if(e.editor.plugins.filebrowser)for(var t,n=e.data.definition,i=0;i<n.contents.length;++i)(t=n.contents[i])&&(s(e.editor,e.data.name,n,t.elements),t.hidden&&t.filebrowser&&(t.hidden=!c(n,t.id,t.filebrowser)))}))}(),CKEDITOR.plugins.add("find",{requires:"dialog",init:function(e){var t=e.addCommand("find",new CKEDITOR.dialogCommand("find")),n=e.addCommand("replace",new CKEDITOR.dialogCommand("find",{tabId:"replace"}));t.canUndo=!1,t.readOnly=1,n.canUndo=!1,e.ui.addButton&&(e.ui.addButton("Find",{label:e.lang.find.find,command:"find",toolbar:"find,10"}),e.ui.addButton("Replace",{label:e.lang.find.replace,command:"replace",toolbar:"find,20"})),CKEDITOR.dialog.add("find",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},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;n=i.attributes;var a=o.width;o=o.height;a&&(n.width=e(n.width,a)),o&&(n.height=e(n.height,o))}return i}}};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,{applyToAll:!0})}}),CKEDITOR.editor.prototype.createFakeElement=function(e,i,o,a){var r=(r=this.lang.fakeobjects)[o]||r.unknown;return i={class:i,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:r,title:r,align:e.getAttribute("align")||""},CKEDITOR.env.hc||(i.src=CKEDITOR.tools.transparentImageData),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 r,s=(s=this.lang.fakeobjects)[o]||s.unknown;return r=new CKEDITOR.htmlParser.basicWriter,e.writeHtml(r),r=r.getHtml(),i={class:i,"data-cke-realelement":encodeURIComponent(r),"data-cke-real-node-type":e.type,alt:s,title:s,align:e.attributes.align||""},CKEDITOR.env.hc||(i.src=CKEDITOR.tools.transparentImageData),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,void 0!==o&&(e.rules.width=n(o)),void 0!==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}}(),function(){function e(e){return"application/x-shockwave-flash"==(e=e.attributes).type||n.test(e.src||"")}function t(e,t){return e.createFakeParserElement(t,"cke_flash","flash",!0)}var n=/\.swf(?:$|\?)/i;CKEDITOR.plugins.add("flash",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_flash{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(e){var t="object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]";CKEDITOR.dialog.isTabEnabled(e,"flash","properties")&&(t+=";object[align]; embed[allowscriptaccess,quality,scale,wmode]"),CKEDITOR.dialog.isTabEnabled(e,"flash","advanced")&&(t+=";object[id]{*}; embed[bgcolor]{*}(*)"),e.addCommand("flash",new CKEDITOR.dialogCommand("flash",{allowedContent:t,requiredContent:"embed"})),e.ui.addButton&&e.ui.addButton("Flash",{label:e.lang.common.flash,command:"flash",toolbar:"insert,20"}),CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js"),e.addMenuItems&&e.addMenuItems({flash:{label:e.lang.flash.properties,command:"flash",group:"flash"}}),e.on("doubleclick",(function(e){var t=e.data.element;t.is("img")&&"flash"==t.data("cke-real-element-type")&&(e.data.dialog="flash")})),e.contextMenu&&e.contextMenu.addListener((function(e){if(e&&e.is("img")&&!e.isReadOnly()&&"flash"==e.data("cke-real-element-type"))return{flash:CKEDITOR.TRISTATE_OFF}}))},afterInit:function(n){var i=n.dataProcessor;(i=i&&i.dataFilter)&&i.addRules({elements:{"cke:object":function(i){var o=i.attributes;if(!(o.classid&&String(o.classid).toLowerCase()||e(i))){for(o=0;o<i.children.length;o++)if("cke:embed"==i.children[o].name){if(!e(i.children[o]))break;return t(n,i)}return null}return t(n,i)},"cke:embed":function(i){return e(i)?t(n,i):null}}},5)}})}(),CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1}),c=CKEDITOR.document.getWindow(),d=CKEDITOR.tools.cssLength,CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",(function(){!function(e){var t=e.config,n=e.fire("uiSpace",{space:"top",html:""}).html,i=function(){function n(e,t,n){a.setStyle(t,d(n)),a.setStyle("position",e)}function o(e){var t=s.getDocumentPosition();switch(e){case"top":n("absolute","top",t.y-f-p);break;case"pin":n("fixed","top",T);break;case"bottom":n("absolute","top",t.y+(u.height||u.bottom-u.top)+p)}r=e}var r,s,l,u,h,f,g,m=t.floatSpaceDockedOffsetX||0,p=t.floatSpaceDockedOffsetY||0,E=t.floatSpacePinnedOffsetX||0,T=t.floatSpacePinnedOffsetY||0;return function(n){if(s=e.editable()){var T=n&&"focus"==n.name;T&&a.show(),e.fire("floatingSpaceLayout",{show:T}),a.removeStyle("left"),a.removeStyle("right"),l=a.getClientRect(),u=s.getClientRect(),h=c.getViewPaneSize(),f=l.height,g="pageXOffset"in c.$?c.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft,r?(f+p<=u.top?o("top"):f+p>h.height-u.bottom?o("pin"):o("bottom"),n=h.width/2,n=t.floatSpacePreferRight?"right":0<u.left&&u.right<h.width&&u.width>l.width?"rtl"==t.contentsLangDirection?"right":"left":n-u.left>u.right-n?"left":"right",l.width>h.width?(n="left",T=0):(T="left"==n?0<u.left?u.left:0:u.right<h.width?h.width-u.right:0)+l.width>h.width&&(n="left"==n?"right":"left",T=0),a.setStyle(n,d(("pin"==r?E:m)+T+("pin"==r?0:"left"==n?g:-g)))):(r="pin",o("pin"),i(n))}}}();if(n){var o=new CKEDITOR.template('<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}"'+(e.title?' aria-labelledby="cke_{name}_arialbl"':" ")+">"+(e.title?'<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>'),a=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(o.output({content:n,id:e.id,langDir:e.lang.dir,langCode:e.langCode,name:e.name,style:"display:none;z-index:"+(t.baseFloatZIndex-1),topId:e.ui.spaceId("top"),voiceLabel:e.title}))),r=CKEDITOR.tools.eventsBuffer(500,i),s=CKEDITOR.tools.eventsBuffer(100,i);a.unselectable(),a.on("mousedown",(function(e){(e=e.data).getTarget().hasAscendant("a",1)||e.preventDefault()})),e.on("focus",(function(t){i(t),e.on("change",r.input),c.on("scroll",s.input),c.on("resize",s.input)})),e.on("blur",(function(){a.hide(),e.removeListener("change",r.input),c.removeListener("scroll",s.input),c.removeListener("resize",s.input)})),e.on("destroy",(function(){c.removeListener("scroll",s.input),c.removeListener("resize",s.input),a.clearCustomData(),a.remove()})),e.focusManager.hasFocus&&a.show(),e.focusManager.add(a,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}" draggable="false" ondragstart="return false;" href="javascript:void(\'{val}\')" onclick="{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role="option">{text}</a></li>'),n=CKEDITOR.addTemplate("panel-list-group",'<h1 id="{id}" draggable="false" ondragstart="return false;" class="cke_panel_grouptitle" role="presentation" >{label}</h1>'),i=/\'/g;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,o){var a=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0),this._.items[e]=a,e={id:a,val:CKEDITOR.tools.htmlEncodeAttr(e).replace(i,"\\'"),onclick:CKEDITOR.env.ie?'return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)===CKEDITOR.MOUSE_BUTTON_LEFT&&':"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(o||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)},markFirstDisplayed:function(){var e=this;this._.markFirstDisplayed((function(){e.multiSelect||e.unmarkAll()}))},unmark:function(e){var t=this.element.getDocument();e=this._.items[e];var n=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" title="{title}" tabindex="-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href=\"javascript:void('{titleJs}')\"")+' hidefocus="true" role="button" aria-labelledby="{id}_label" aria-haspopup="listbox"',t="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress="return false;"'),CKEDITOR.env.gecko&&(e+=' onblur="this.style.cssText = this.style.cssText;"'),CKEDITOR.env.ie&&(t='return false;" onmouseup="CKEDITOR.tools.getMouseButton(event)==CKEDITOR.MOUSE_BUTTON_LEFT&&');e=e+' onkeydown="return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus="return CKEDITOR.tools.callFunction({focusFn},event);" onclick="'+t+'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 n=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:{},listeners:[]}},proto:{renderHtml:function(e){var t=[];return this.render(e,t),t.join("")},render:function(e,t){function i(){if(this.getState()!=CKEDITOR.TRISTATE_ON){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,a,r=CKEDITOR.env,s="cke_"+this.id,l=CKEDITOR.tools.addFunction((function(t){a&&(e.unlockSelection(1),a=0),o.execute(t)}),this),c=this;o={id:s,combo:this,focus:function(){CKEDITOR.document.getById(s).getChild(1).focus()},execute:function(t){var n=c._;if(n.state!=CKEDITOR.TRISTATE_DISABLED)if(c.createPanel(e),n.on)n.panel.hide();else{c.commit();var i=c.getValue();i?n.list.mark(i):n.list.unmarkAll(),n.panel.showBlock(c.id,new CKEDITOR.dom.element(t),4)}},clickFn:l},this._.listeners.push(e.on("activeFilterChange",i,this)),this._.listeners.push(e.on("mode",i,this)),this._.listeners.push(e.on("selectionChange",i,this)),!this.readOnly&&this._.listeners.push(e.on("readOnly",i,this));var d=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(l,t);break;default:o.onkey(o,n)}e.preventDefault()})),u=CKEDITOR.tools.addFunction((function(){o.onfocus&&o.onfocus()}));return a=0,o.keyDownFn=d,r={id:s,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:r.gecko&&!r.hc?"":(this.title||"").replace("'",""),keydownFn:d,focusFn:u,clickFn:l},n.output(r,t),this.onRender&&this.onRender(),o},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,a=new CKEDITOR.ui.floatPanel(e,i,t),r=(t=a.addListBlock(this.id,n),this);a.onShow=function(){this.element.addClass(o),r.setState(CKEDITOR.TRISTATE_ON),r._.on=1,r.editorFocus&&!e.focusManager.hasFocus&&e.focus(),r.onOpen&&r.onOpen()},a.onHide=function(t){this.element.removeClass(o),r.setState(r.modes&&r.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),r._.on=0,!t&&r.onClose&&r.onClose()},a.onEscape=function(){a.hide(1)},t.onClick=function(e,t){r.onClick&&r.onClick.call(r,e,t),a.hide()},this._.panel=a,this._.list=t,a.getBlock(this.id).onHide=function(){r._.on=0,r.setState(CKEDITOR.TRISTATE_OFF)},this.init&&this.init()}},setValue:function(e,t){this._.value=e,(n=this.document.getById("cke_"+this.id+"_text"))&&(e||t?n.removeClass("cke_combo_inlinelabel"):(t=this.label,n.addClass("cke_combo_inlinelabel")),n.setText(void 0!==t?t:e));var n=void 0!==t?t:e,i=this.label;n=n===i?n:n+", "+i;(i=this.document.getById("cke_"+this.id+"_label"))&&i.setText(n)},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),n=t.getElementsByTag("a").getItem(0);t.setState(e,"cke_combo"),e==CKEDITOR.TRISTATE_DISABLED?t.setAttribute("aria-disabled",!0):t.removeAttribute("aria-disabled"),n&&n.setAttribute("aria-expanded",e==CKEDITOR.TRISTATE_ON),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))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,(function(e){e.removeListener()})),this._.listeners=[]},select:function(e){if(!CKEDITOR.tools.isEmpty(this._.items))for(var t in this._.items)if(e({value:t,text:this._.items[t]})){this.setValue(t);break}}},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)}}(),function(){function e(e,n){var i,o=e.config,a=n.lang,r=new CKEDITOR.style(n.styleDefinition),s=new t({entries:n.entries,styleVariable:n.styleVariable,styleDefinition:n.styleDefinition});e.addCommand(n.commandName,{exec:function(e,t){var n=t.newStyle,i=t.oldStyle,o=e.getSelection().getRanges()[0],a=void 0===n;(i||n)&&(i&&o.collapsed&&function(e){var t,n,i,o=e.editor,a=e.range,r=e.style;if(t=o.elementPath(),e=t.contains((function(e){return r.checkElementRemovable(e)}))){if(n=a.checkBoundaryOfElement(e,CKEDITOR.START),i=a.checkBoundaryOfElement(e,CKEDITOR.END),n&&i){for(n=a.createBookmark();t=e.getFirst();)t.insertBefore(e);e.remove(),a.moveToBookmark(n)}else n||i?a.moveToPosition(e,n?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(a.splitElement(e),a.moveToPosition(e,CKEDITOR.POSITION_AFTER_END)),function e(t,n,i){var o=n.pop();if(o){if(i)return e(t,n,o.equals(i)?null:i);i=o.clone(),t.insertNode(i),t.moveToPosition(i,CKEDITOR.POSITION_AFTER_START),e(t,n)}}(a,t.elements.slice(),e);o.getSelection().selectRanges([a])}}({editor:e,range:o,style:i}),a?e.removeStyle(i):((o=i)&&(o=!(o=i instanceof CKEDITOR.style&&n instanceof CKEDITOR.style&&CKEDITOR.style.getStyleText(i.getDefinition())===CKEDITOR.style.getStyleText(n.getDefinition()))),o&&e.removeStyle(i),e.applyStyle(n)))},refresh:function(e,t){r.checkApplicable(t,e,e.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}}),i=e.getCommand(n.commandName),e.ui.addRichCombo(n.comboName,{label:a.label,title:a.panelTitle,command:n.commandName,toolbar:"styles,"+n.order,defaultValue:"cke-default",allowedContent:r,requiredContent:r,contentTransformations:"span"===n.styleDefinition.element?[[{element:"font",check:"span",left:function(e){return!!e.attributes.size||!!e.attributes.align||!!e.attributes.face},right:function(e){var t=" x-small small medium large x-large xx-large 48px".split(" ");e.name="span",e.attributes.size&&(e.styles["font-size"]=t[e.attributes.size],delete e.attributes.size),e.attributes.align&&(e.styles["text-align"]=e.attributes.align,delete e.attributes.align),e.attributes.face&&(e.styles["font-family"]=e.attributes.face,delete e.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(o.contentsCss),multiSelect:!1,attributes:{"aria-label":a.panelTitle}},init:function(){var t="("+(e.element.$.style.fontFamily||e.lang.common.optionDefault)+")";this.startGroup(a.panelTitle),this.add(this.defaultValue,t,t),s.addToCombo(this)},onClick:function(t){var i=this.getValue();e.focus(),e.fire("saveSnapshot"),e.execCommand(n.commandName,{newStyle:s.getStyle(t),oldStyle:s.getStyle(i)}),e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",(function(t){var i=this.getValue();(t=s.getMatchingValue(e,t.data.path))?t!=i&&this.setValue(t):this.setValue("",n.defaultLabel)}),this),i.on("state",(function(){this.setState(i.state)}),this)},refresh:function(){this.setState(i.state)}})}var t=CKEDITOR.tools.createClass({$:function(e){var t=e.entries.split(";");this._.data={},this._.names=[];for(var n=0;n<t.length;n++){var i,o,a=t[n];a?(i=(a=a.split("/"))[0],a=a[1],(o={})[e.styleVariable]=a||i,this._.data[i]=new CKEDITOR.style(e.styleDefinition,o),this._.data[i]._.definition.name=i,this._.names.push(i)):(t.splice(n,1),n--)}},proto:{getStyle:function(e){return this._.data[e]},addToCombo:function(e){for(var t=0;t<this._.names.length;t++){var n=this._.names[t];e.add(n,this.getStyle(n).buildPreview(),n)}},getMatchingValue:function(e,t){for(var n,i=t.elements,o=0;o<i.length;o++)if(n=i[o],n=this._.findMatchingStyleName(e,n))return n;return null}},_:{findMatchingStyleName:function(e,t){return CKEDITOR.tools.array.find(this._.names,(function(n){return this.getStyle(n).checkElementMatch(t,!0,e)}),this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(t){var n=t.config;e(t,{comboName:"Font",commandName:"font",styleVariable:"family",lang:t.lang.font,entries:n.font_names,defaultLabel:n.font_defaultLabel,styleDefinition:n.font_style,order:30}),e(t,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:t.lang.font.fontSize,entries:n.fontSize_sizes,defaultLabel:n.fontSize_defaultLabel,styleDefinition:n.fontSize_style,order: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}}]},CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n"),CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}"),CKEDITOR.style.unstylableElements.push("select","option")},init:function(e){var t=e.lang,n=0,i={email:1,password:1,search:1,tel:1,text:1,url:1},o={checkbox:"input[type,name,checked,required]",radio:"input[type,name,checked,required]",textfield:"input[type,name,value,size,maxlength,required]",textarea:"textarea[cols,rows,name,required]",select:"select[name,size,multiple,required]; option[value,selected]",button:"input[type,name,value]",form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},a={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},r=function(i,r,s){var l={allowedContent:o[r],requiredContent:a[r]};"form"==r&&(l.context="form"),e.addCommand(r,new CKEDITOR.dialogCommand(r,l)),e.ui.addButton&&e.ui.addButton(i,{label:t.common[i.charAt(0).toLowerCase()+i.slice(1)],command:r,toolbar:"forms,"+(n+=10)}),CKEDITOR.dialog.add(r,s)},s=this.path+"dialogs/";!e.blockless&&r("Form","form",s+"form.js"),r("Checkbox","checkbox",s+"checkbox.js"),r("Radio","radio",s+"radio.js"),r("TextField","textfield",s+"textfield.js"),r("Textarea","textarea",s+"textarea.js"),r("Select","select",s+"select.js"),r("Button","button",s+"button.js");var l=e.plugins.image;l&&!e.plugins.image2&&r("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+"dialogs/image.js"),r("HiddenField","hiddenfield",s+"hiddenfield.js"),e.addMenuItems&&(r={checkbox:{label:t.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:t.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:t.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:t.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:t.forms.button.title,command:"button",group:"button"},select:{label:t.forms.select.title,command:"select",group:"select"},textarea:{label:t.forms.textarea.title,command:"textarea",group:"textarea"}},l&&(r.imagebutton={label:t.image.titleButton,command:"imagebutton",group:"imagebutton"}),!e.blockless&&(r.form={label:t.forms.form.menu,command:"form",group:"form"}),e.addMenuItems(r)),e.contextMenu&&(!e.blockless&&e.contextMenu.addListener((function(e,t,n){if((e=n.contains("form",1))&&!e.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}})),e.contextMenu.addListener((function(e){if(e&&!e.isReadOnly()){var t=e.getName();if("select"==t)return{select:CKEDITOR.TRISTATE_OFF};if("textarea"==t)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==t){var n=e.getAttribute("type")||"text";switch(n){case"button":case"submit":case"reset":return{button:CKEDITOR.TRISTATE_OFF};case"checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case"radio":return{radio:CKEDITOR.TRISTATE_OFF};case"image":return l?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(i[n])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==t&&"hiddenfield"==e.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}}))),e.on("doubleclick",(function(t){var n=t.data.element;if(!e.blockless&&n.is("form"))t.data.dialog="form";else if(n.is("select"))t.data.dialog="select";else if(n.is("textarea"))t.data.dialog="textarea";else if(n.is("img")&&"hiddenfield"==n.data("cke-real-element-type"))t.data.dialog="hiddenfield";else if(n.is("input")){switch(n=n.getAttribute("type")||"text"){case"button":case"submit":case"reset":t.data.dialog="button";break;case"checkbox":t.data.dialog="checkbox";break;case"radio":t.data.dialog="radio";break;case"image":t.data.dialog="imagebutton"}i[n]&&(t.data.dialog="textfield")}}))},afterInit:function(e){var t=(n=e.dataProcessor)&&n.htmlFilter,n=n&&n.dataFilter;CKEDITOR.env.ie&&t&&t.addRules({elements:{input:function(e){var t=(e=e.attributes).type;t||(e.type="text"),"checkbox"!=t&&"radio"!=t||"on"!=e.value||delete e.value}}},{applyToAll:!0}),n&&n.addRules({elements:{input:function(t){if("hidden"==t.attributes.type)return e.createFakeParserElement(t,"cke_hidden","hiddenfield")}}},{applyToAll:!0})}}),CKEDITOR.plugins.forms={_setupRequiredAttribute:function(e){this.setValue(e.hasAttribute("required"))}},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={},a=0,r=[],s=0;s<i.length;s++){var l=i[s],c=new CKEDITOR.style(t["format_"+l]);e.filter.customConfig&&!e.filter.check(c)||(a++,o[l]=c,o[l]._.enterMode=e.config.enterMode,r.push(c))}0!==a&&e.ui.addRichCombo("Format",{label:n.label,title:n.panelTitle,toolbar:"styles,20",allowedContent:r,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.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK}),t.checkActive(n,e)||e.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,e))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="string"==typeof e.config.dataIndentationChars?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&&(t=CKEDITOR.tools.htmlEncodeAttr(t),this.forceSimpleAmpersand&&(t=t.replace(/&/g,"&"))),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,this._.needsSpace=0},setRules:function(e,t){var n=this._.rules[e];n?CKEDITOR.tools.extend(n,t,!0):this._.rules[e]=t}}}),CKEDITOR.plugins.add("iframe",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(e){var t=e.lang.iframe,n="iframe[align,longdesc,tabindex,frameborder,height,name,scrolling,src,title,width]";e.plugins.dialogadvtab&&(n+=";iframe"+e.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1})),CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js"),e.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:n,requiredContent:"iframe"})),e.ui.addButton&&e.ui.addButton("Iframe",{label:t.toolbar,command:"iframe",toolbar:"insert,80"}),e.on("doubleclick",(function(e){var t=e.data.element;t.is("img")&&"iframe"==t.data("cke-real-element-type")&&(e.data.dialog="iframe")})),e.addMenuItems&&e.addMenuItems({iframe:{label:t.title,command:"iframe",group:"image"}}),e.contextMenu&&e.contextMenu.addListener((function(e){if(e&&e.is("img")&&"iframe"==e.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}}))},afterInit:function(e){var t=e.dataProcessor;(t=t&&t.dataFilter)&&t.addRules({elements:{iframe:function(t){return e.createFakeParserElement(t,"cke_iframe","iframe",!0)}}})}}),function(){function e(e){function t(e){var t=!1;r.attachListener(r,"keydown",(function(){var n=i.getBody().getElementsByTag(e);if(!t){for(var o=0;o<n.count();o++)n.getItem(o).setCustomData("retain",!0);t=!0}}),null,null,1),r.attachListener(r,"keyup",(function(){var n=i.getElementsByTag(e);t&&(1==n.count()&&!n.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(n.getItem(0).getAttributes())&&n.getItem(0).remove(1),t=!1)}))}var n=this.editor;if(n&&!n.isDetached()){var i=e.document,o=i.body,a=i.getElementById("cke_actscrpt");a&&a.parentNode.removeChild(a),(a=i.getElementById("cke_shimscrpt"))&&a.parentNode.removeChild(a),(a=i.getElementById("cke_basetagscrpt"))&&a.parentNode.removeChild(a),o.contentEditable=!0,CKEDITOR.env.ie&&(o.hideFocus=!0,o.disabled=!0,o.removeAttribute("disabled")),delete this._.isLoadingData,this.$=o,i=new CKEDITOR.dom.document(i),this.setup(),this.fixInitialSelection();var r=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&i.getDocumentElement().addClass(i.$.compatMode),CKEDITOR.env.ie&&!CKEDITOR.env.edge&&n.enterMode!=CKEDITOR.ENTER_P?t("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&n.enterMode!=CKEDITOR.ENTER_DIV&&t("div"),(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)&&i.getDocumentElement().on("mousedown",(function(e){e.data.getTarget().is("html")&&setTimeout((function(){n.editable().focus()}))})),function(e){function t(e){e.returnValue=!1}if(CKEDITOR.env.gecko)try{var n=e.document.$;n.execCommand("enableObjectResizing",!1,!e.config.disableObjectResizing),n.execCommand("enableInlineTableEditing",!1,!e.config.disableNativeTableHandles)}catch(e){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&e.config.disableObjectResizing&&function(){var n;e.editable().attachListener(e,"selectionChange",(function(){var i=e.getSelection().getSelectedElement();i&&(n&&(n.detachEvent("onresizestart",t),n=null),i.$.attachEvent("onresizestart",t),n=i.$)}))}()}(n);try{n.document.$.execCommand("2D-position",!1,!0)}catch(e){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==n.document.$.compatMode)&&this.attachListener(this,"keydown",(function(e){var t=e.data.getKeystroke();if(33==t||34==t)if(CKEDITOR.env.ie)setTimeout((function(){n.getSelection().scrollIntoView()}),0);else if(n.window.$.innerHeight>this.$.offsetHeight){var i=n.createRange();i[33==t?"moveToElementEditStart":"moveToElementEditEnd"](this),i.select(),e.data.preventDefault()}})),CKEDITOR.env.ie&&this.attachListener(i,"blur",(function(){try{i.$.selection.empty()}catch(e){}})),CKEDITOR.env.iOS&&this.attachListener(i,"touchend",(function(){e.focus()})),(o=n.document.getElementsByTag("title").getItem(0)).data("cke-title",o.getText()),CKEDITOR.env.ie&&(n.document.$.title=this._.docTitle),CKEDITOR.tools.setTimeout((function(){"unloaded"==this.status&&(this.status="ready"),n.fire("contentDom"),this._.isPendingFocus&&(n.focus(),this._.isPendingFocus=!1),setTimeout((function(){n.fire("dataReady")}),0)}),0,this)}}var t;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.isDestroyed()||e.isDetached()||(e.editable(new t(e,a.$.contentWindow.document.body)),e.setData(e.getData(1),n))}var o="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",a=(o=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(o)+"}())":"",CKEDITOR.dom.element.createFromHtml('<iframe src="'+o+'" frameBorder="0"></iframe>'));a.setStyles({width:"100%",height:"100%"}),a.addClass("cke_wysiwyg_frame").addClass("cke_reset"),(o=e.ui.space("contents")).append(a);var r=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;r&&a.on("load",i);var s=e.title,l=e.fire("ariaEditorHelpLabel",{}).label;if(s&&(CKEDITOR.env.ie&&l&&(s+=", "+l),a.setAttribute("title",s)),l){s=CKEDITOR.tools.getNextId();var c=CKEDITOR.dom.element.createFromHtml('<span id="'+s+'" class="cke_voice_label">'+l+"</span>");o.append(c,1),a.setAttribute("aria-describedby",s)}e.on("beforeModeUnload",(function(e){e.removeListener(),c&&c.remove()})),a.setAttributes({tabIndex:e.tabIndex,allowTransparency:"true"}),!r&&i(),e.fire("ariaWidget",a)}))}}),CKEDITOR.editor.prototype.addContentsCss=function(e){var t=this.config,n=t.contentsCss;CKEDITOR.tools.isArray(n)||(t.contentsCss=n?[n]:[]),t.contentsCss.push(e)},t=CKEDITOR.tools.createClass({$:function(){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),this.fixInitialSelection(),n.fire("dataReady");else{this._.isLoadingData=!0,n._.dataStore={id:1};var i=n.config,o=i.fullPage,a=i.docType,r=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||(r+=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=a=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*>/,r+"$&"),e=a+e):e=i.docType+'<html dir="'+i.contentsLangDirection+'" lang="'+(i.contentsLanguage||n.langCode)+'"><head><title>'+this._.docTitle+"</title>"+s+r+"</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>'),s&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(i+='<script id="cke_basetagscrpt">var baseTag = document.querySelector( "base" );baseTag.href = baseTag.href;<\/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=(a=t.fullPage)&&e.docType,i=a&&e.xmlDeclaration,o=this.getDocument(),a=a?o.getDocumentElement().getOuterHtml():o.getBody().getHtml();return CKEDITOR.env.gecko&&t.enterMode!=CKEDITOR.ENTER_BR&&(a=a.replace(/<br>(?=\s*(:?$|<\/body>))/,"")),a=e.dataProcessor.toDataFormat(a),i&&(a=i+"\n"+a),n&&(a=n+"\n"+a),a},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:t.baseProto.focus.call(this)},detach:function(){var e=(n=this.editor).document,n=n.container.findOne("iframe.cke_wysiwyg_frame");t.baseProto.detach.call(this),this.clearCustomData(this._.expandoNumber),e.getDocumentElement().clearCustomData(),CKEDITOR.tools.removeFunction(this._.frameLoadedHandler),n&&(n.clearCustomData(),(e=n.removeCustomData("onResize"))&&e.removeListener(),n.isDetached()||n.remove())}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,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){if(!t.plugins.detectConflict("image",["easyimage","image2"])){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 a=e(n);a&&(t(a)==i?(a.removeStyle("float"),i==t(a)&&a.removeAttribute("align")):a.setStyle("float",i),o.cancel())})),o.on("refresh",(function(o){var a=e(n);a&&(a=t(a),this.setState(a==i?CKEDITOR.TRISTATE_ON:"right"==i||"left"==i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),o.cancel())})))}n.plugins.image2||(i("left"),i("right"),i("center"),i("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function e(e,i){var o,a;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(),a=o.createBookmarks(1),t.data||(t.data={}),t.data.done=!1}),i,null,0),i.on("exec",(function(){e.forceNextSelectionCheck(),o.selectBookmarks(a)}),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,a=new CKEDITOR.dom.walker(n);o=a.next();)if(o.type==CKEDITOR.NODE_ELEMENT)if(!o.equals(i)&&o.getDirection())n.setStartAfter(o),a=new CKEDITOR.dom.walker(n);else{var r=t.config.indentClasses;if(r)for(var s="ltr"==e.data.dir?["_rtl",""]:["","_rtl"],l=0;l<r.length;l++)o.hasClass(r[l]+s[0])&&(o.removeClass(r[l]+s[0]),o.addClass(r[l]+s[1]));r=o.getStyle("margin-right"),s=o.getStyle("margin-left"),r?o.setStyle("margin-left",r):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],e.activeFilter.checkFeature(this)?n.state=n.refresh.call(this,e,i):n.state=t,n.state},getContext:function(e){return e.contains(this.context)}}}(),function(){function e(e,n,i){if(!e.getCustomData("indent_processed")){var o=this.editor,a=this.isIndent;if(n){if(i=0,(o=e.$.className.match(this.classNameRegex))&&(o=o[1],i=CKEDITOR.tools.indexOf(n,o)+1),0>(i+=a?1:-1))return;i=Math.min(i,n.length),i=Math.max(i,0),e.$.className=CKEDITOR.tools.ltrim(e.$.className.replace(this.classNameRegex,"")),0<i&&e.addClass(n[i-1])}else{n=t(e,i),i=parseInt(e.getStyle(n),10);var r=o.config.indentOffset||40;if(isNaN(i)&&(i=0),0>(i+=(a?1:-1)*r))return;i=Math.max(i,0),i=Math.ceil(i/r)*r,e.setStyle(n,i?i+(o.config.indentUnit||"px"):""),""===e.getAttribute("style")&&e.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,e,"indent_processed",1)}}function t(e,t){return"ltr"==(t||e.getComputedStyle("direction"))?"margin-left":"margin-right"}var n=CKEDITOR.dtd.$listItem,i=CKEDITOR.dtd.$list,o=CKEDITOR.TRISTATE_DISABLED,a=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(r){function s(){l.specificDefinition.apply(this,arguments),this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:c?null:"margin-left,margin-right",classes:c||null}},this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]],this.enterBr&&(this.allowedContent.div=!0),this.requiredContent=(this.enterBr?"div":"p")+(c?"("+c.join(",")+")":"{margin-left}"),this.jobs={20:{refresh:function(e,i){if(!(r=i.block||i.blockLimit).is(n))var r=(s=r.getAscendant(n))&&i.contains(s)||r;if(r.is(n)&&(r=r.getParent()),this.enterBr||this.getContext(i)){if(c){var s=c,l=(r=r.$.className.match(this.classNameRegex),this.isIndent);return(s=r?!l||r[1]!=s.slice(-1):l)?a:o}return this.isIndent?a:r?CKEDITOR[0>=(parseInt(r.getStyle(t(r)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:o}return o},exec:function(t){var n,o=(o=t.getSelection())&&o.getRanges()[0];if(n=t.elementPath().contains(i))e.call(this,n,c);else for(o=o.createIterator(),t=t.config.enterMode,o.enforceRealBlocks=!0,o.enlargeBr=t!=CKEDITOR.ENTER_BR;n=o.getNextParagraph(t==CKEDITOR.ENTER_P?"p":"div");)n.isReadOnly()||e.call(this,n,c);return!0}}}}var l=CKEDITOR.plugins.indent,c=r.config.indentClasses;l.registerCommands(r,{indentblock:new s(r,"indentblock",!0),outdentblock:new s(r,"outdentblock")}),CKEDITOR.tools.extend(s.prototype,l.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:c?new RegExp("(?:^|\\s+)("+c.join("|")+")(?=$|\\s)"):null})}})}(),function(){function e(e){function i(t){for(var i=o.startContainer,l=o.endContainer;i&&!i.getParent().equals(t);)i=i.getParent();for(;l&&!l.getParent().equals(t);)l=l.getParent();if(!i||!l)return!1;for(var c=[],d=!1;!d;)i.equals(l)&&(d=!0),c.push(i),i=i.getNext();if(1>c.length)return!1;for(i=t.getParents(!0),l=0;l<i.length;l++)if(i[l].getName&&s[i[l].getName()]){t=i[l];break}i=a.isIndent?1:-1,l=c[0],c=c[c.length-1];var u=(d=CKEDITOR.plugins.list.listToArray(t,r))[c.getCustomData("listarray_index")].indent;for(l=l.getCustomData("listarray_index");l<=c.getCustomData("listarray_index");l++)if(d[l].indent+=i,0<i){for(var h=d[l].parent,f=l-1;0<=f;f--)if(d[f].indent===i){h=d[f].parent;break}d[l].parent=new CKEDITOR.dom.element(h.getName(),h.getDocument())}for(l=c.getCustomData("listarray_index")+1;l<d.length&&d[l].indent>u;l++)d[l].indent+=i;var g;if((i=CKEDITOR.plugins.list.arrayToList(d,r,null,e.config.enterMode,t.getDirection()),!a.isIndent)&&((g=t.getParent())&&g.is("li"))){var m,p=[];for(l=(c=i.listNode.getChildren()).count()-1;0<=l;l--)(m=c.getItem(l))&&m.is&&m.is("li")&&p.push(m)}if(i&&i.listNode.replace(t),p&&p.length)for(l=0;l<p.length;l++){for(m=t=p[l];(m=m.getNext())&&m.is&&m.getName()in s;)CKEDITOR.env.needsNbspFiller&&!t.getFirst(n)&&t.append(o.document.createText(" ")),t.append(m);t.insertAfter(g)}return i&&e.fire("contentDomInvalidated"),!0}for(var o,a=this,r=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()]);){if(e.editable().equals(c)){c=!1;break}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=t,o.startContainer=d.next()),c&&o.endContainer.type==CKEDITOR.NODE_ELEMENT&&o.endContainer.getName()in s&&((d=new CKEDITOR.dom.walker(o)).evaluator=t,o.endContainer=d.previous()),c)return i(c)}return 0}function t(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")}function n(e){return i(e)&&o(e)}var i=CKEDITOR.dom.walker.whitespaces(!0),o=CKEDITOR.dom.walker.bookmark(!1,!0),a=CKEDITOR.TRISTATE_DISABLED,r=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(t){function n(t){i.specificDefinition.apply(this,arguments),this.requiredContent=["ul","ol"],t.on("key",(function(e){var n=t.elementPath();if("wysiwyg"==t.mode&&e.data.keyCode==this.indentKey&&n){var i=this.getContext(n);!i||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,n,i)||(t.execCommand(this.relatedGlobal),e.cancel())}}),this),this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(e,t){var n=this.getContext(t),i=CKEDITOR.plugins.indentList.firstItemInPath(this.context,t,n);return n&&this.isIndent&&!i?r:a}:function(e,t){return!this.getContext(t)||this.isIndent?a:r},exec:CKEDITOR.tools.bind(e,this)}}var i=CKEDITOR.plugins.indent;i.registerCommands(t,{indentlist:new n(t,"indentlist",!0),outdentlist:new n(t,"outdentlist")}),CKEDITOR.tools.extend(n.prototype,i.specificDefinition.prototype,{context:{ol:1,ul:1}})}}),CKEDITOR.plugins.indentList={},CKEDITOR.plugins.indentList.firstItemInPath=function(e,n,i){var o=n.contains(t);return i||(i=n.contains(e)),i&&o&&o.equals(i.getFirst(t))}}(),CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(e){e.config.smiley_path=e.config.smiley_path||this.path+"images/",e.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"})),e.ui.addButton&&e.ui.addButton("Smiley",{label:e.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"}),CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}}),CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "),CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";"),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=new 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 a=t.config.justifyClasses;a&&(i.hasClass(a[0])?(i.removeClass(a[0]),i.addClass(a[2])):i.hasClass(a[2])&&(i.removeClass(a[2]),i.addClass(a[0]))),"left"==(a=i.getStyle("text-align"))?i.setStyle("text-align","right"):"right"==a&&i.setStyle("text-align","left")}}t.prototype={exec:function(t){var n=t.getSelection(),i=t.config.enterMode;if(n){for(var o,a,r=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;a=o.getNextParagraph(i==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){var u,h=a.getName();if(u=t.activeFilter.check(h+"{text-align}"),(h=t.activeFilter.check(h+"("+l+")"))||u){a.removeAttribute("align"),a.removeStyle("text-align");var f=l&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),g=this.state==CKEDITOR.TRISTATE_OFF&&(!c||e(a,!0)!=this.value);l&&h?g?a.addClass(l):f||a.removeAttribute("class"):g&&u&&a.setStyle("text-align",this.value)}}t.focus(),t.forceNextSelectionCheck(),n.selectBookmarks(r)}},refresh:function(t,n){var i=n.block||n.blockLimit,o=i.getName(),a=i.equals(t.editable());o=this.cssClassName?t.activeFilter.check(o+"("+this.cssClassName+")"):t.activeFilter.check(o+"{text-align}");a&&!CKEDITOR.dtd.$list[n.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!a&&o?this.setState(e(i,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}},CKEDITOR.plugins.add("justify",{init:function(e){if(!e.blockless){var i=new t(e,"justifyleft","left"),o=new t(e,"justifycenter","center"),a=new t(e,"justifyright","right"),r=new t(e,"justifyblock","justify");e.addCommand("justifyleft",i),e.addCommand("justifycenter",o),e.addCommand("justifyright",a),e.addCommand("justifyblock",r),e.ui.addButton&&(e.ui.addButton("JustifyLeft",{label:e.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),e.ui.addButton("JustifyCenter",{label:e.lang.common.center,command:"justifycenter",toolbar:"align,20"}),e.ui.addButton("JustifyRight",{label:e.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),e.ui.addButton("JustifyBlock",{label:e.lang.common.justify,command:"justifyblock",toolbar:"align,40"})),e.on("dirChanged",n)}}})}(),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="menu",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",CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(e){var t,n,i,o,a=e.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],r=this,s=e.lang.language,l={};for(e.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(e,t){var n=l["language_"+t];n&&e[n.style.checkActive(e.elementPath(),e)?"removeStyle":"applyStyle"](n.style)},refresh:function(e){this.setState(r.getCurrentLangElement(e)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}}),o=0;o<a.length;o++)n=(t=a[o].split(":"))[0],l[i="language_"+n]={label:t[1],langId:n,group:"language",order:o,ltr:"rtl"!=(""+t[2]).toLowerCase(),onClick:function(){e.execCommand("language",this.langId)},role:"menuitemcheckbox"},l[i].style=new CKEDITOR.style({element:"span",attributes:{lang:n,dir:l[i].ltr?"ltr":"rtl"}});l.language_remove={label:s.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:l.length,onClick:function(){var t=r.getCurrentLangElement(e);t&&e.execCommand("language",t.getAttribute("lang"))}},e.addMenuGroup("language",1),e.addMenuGroup("language_remove"),e.addMenuItems(l),e.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:s.button,allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",toolbar:"bidi,30",command:"language",onMenu:function(){var t,n={},i=r.getCurrentLangElement(e);for(t in l)n[t]=CKEDITOR.TRISTATE_OFF;return n.language_remove=i?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,i&&(n["language_"+i.getAttribute("lang")]=CKEDITOR.TRISTATE_ON),n}}),e.addRemoveFormatFilter&&e.addRemoveFormatFilter((function(e){return!(e.is("span")&&e.getAttribute("dir")&&e.getAttribute("lang"))}))},getCurrentLangElement:function(e){var t,n=e.elementPath();if(e=n&&n.elements,n)for(var i=0;i<e.length;i++)n=e[i],!t&&"span"==n.getName()&&n.hasAttribute("dir")&&n.hasAttribute("lang")&&(t=n);return t}}),function(){function e(e){return e.replace(/'/g,"\\$&")}function t(e){for(var t,n=e.length,i=[],o=0;o<n;o++)t=e.charCodeAt(o),i.push(t);return"String.fromCharCode("+i.join(",")+")"}function n(t,n){for(var i,o,a=(r=t.plugins.link).compiledProtectionFunction.params,r=[r.compiledProtectionFunction.name,"("],s=0;s<a.length;s++)o=n[i=a[s].toLowerCase()],0<s&&r.push(","),r.push("'",o?e(encodeURIComponent(n[i])):"","'");return r.push(")"),r.join("")}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;}.%2 img.cke_anchor{"+t+"width:16px;min-height:15px;height:1.15em;vertical-align: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,download]{*}(*)")),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.setKeystroke(CKEDITOR.CTRL+75,"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=t.data.element.getAscendant({a:1,img:1},!0);n&&!n.isReadOnly()&&(n.is("a")?(t.data.dialog=!n.getAttribute("name")||n.getAttribute("href")&&n.getChildCount()?"link":"anchor",t.data.link=n):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,n)&&(t.data.dialog="anchor"))}),null,null,0),e.on("doubleclick",(function(t){t.data.dialog in{link:1,anchor:1}&&t.data.link&&e.getSelection().selectElement(t.data.link)}),null,null,20),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})),this.compiledProtectionFunction=function(e){var t;return(e=e.config.emailProtection||"")&&"encode"!=e&&(t={},e.replace(/^([^(]+)\(([^)]+)\)$/,(function(e,n,i){t.name=n,t.params=[],i.replace(/[^,\s]+/g,(function(e){t.params.push(e)}))}))),t}(e)},afterInit:function(e){e.dataProcessor.dataFilter.addRules({elements:{a:function(t){return t.attributes.name?t.children.length?null:e.createFakeParserElement(t,"cke_anchor","anchor"):null}}});var t=e._.elementsPath&&e._.elementsPath.filters;t&&t.push((function(t,n){if("a"==n&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t)||t.getAttribute("name")&&(!t.getAttribute("href")||!t.getChildCount())))return"anchor"}))}});var i=/^javascript:/,o=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,a=/subject=([^;?:@&=$,\/]*)/i,r=/body=([^;?:@&=$,\/]*)/i,s=/^#(.*)$/,l=/^((?:http|https|ftp|news):\/\/)?(.*)$/,c=/^(_(?:self|top|parent|blank))$/,d=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,u=/^javascript:([^(]+)\(([^)]+)\)$/,h=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,f=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,g=/^tel:(.*)$/,m={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType",class:"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(e,t){var n,i=e.getSelection(),o=i.getSelectedElement(),a=i.getRanges(),r=[];if(!t&&o&&o.is("a"))return o;for(o=0;o<a.length;o++)if((n=i.getRanges()[o]).shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(n=e.elementPath(n.getCommonAncestor()).contains("a",1))&&t)r.push(n);else if(n)return n;return t?r:null},getEditorAnchors:function(e){for(var t,n=(i=(n=e.editable()).isInline()&&!e.plugins.divarea?e.document:n).getElementsByTag("a"),i=i.getElementsByTag("img"),o=[],a=0;t=n.getItem(a++);)(t.data("cke-saved-name")||t.hasAttribute("name"))&&o.push({name:t.data("cke-saved-name")||t.getAttribute("name"),id:t.getAttribute("id")});for(a=0;t=i.getItem(a++);)(t=this.tryRestoreFakeAnchor(e,t))&&o.push({name:t.getAttribute("name"),id:t.getAttribute("id")});return o},fakeAnchor:!0,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}},parseLinkAttributes:function(e,t){var n,p=t&&(t.data("cke-saved-href")||t.getAttribute("href"))||"",E=e.plugins.link.compiledProtectionFunction,T=e.config.emailProtection,C={};if(p.match(i)&&("encode"==T?p=p.replace(d,(function(e,t,n){return n=n||"","mailto:"+String.fromCharCode.apply(String,t.split(","))+n.replace(/\\'/g,"'")})):T&&p.replace(u,(function(e,t,n){if(t==E.name){C.type="email",e=C.email={},t=/(^')|('$)/g;for(var i,o=(n=n.match(/[^,\s]+/g)).length,a=0;a<o;a++)i=decodeURIComponent(i=n[a].replace(t,"").replace(/\\'/g,"'")),e[E.params[a].toLowerCase()]=i;e.address=[e.name,e.domain].join("@")}}))),!C.type)if(T=p.match(s))C.type="anchor",C.anchor={},C.anchor.name=C.anchor.id=T[1];else if(T=p.match(g))C.type="tel",C.tel=T[1];else if(T=p.match(o)){n=p.match(a);p=p.match(r);var I=C.email={};C.type="email",I.address=T[0].replace("mailto:",""),n&&(I.subject=decodeURIComponent(n[1])),p&&(I.body=decodeURIComponent(p[1]))}else p&&(n=p.match(l))&&(C.type="url",C.url={},C.url.protocol=n[1],C.url.url=n[2]);if(t){if(p=t.getAttribute("target"))C.target={type:p.match(c)?p:"frame",name:p};else if(p=(p=t.data("cke-pa-onclick")||t.getAttribute("onclick"))&&p.match(h))for(C.target={type:"popup",name:p[1]};T=f.exec(p[2]);)"yes"!=T[2]&&"1"!=T[2]||T[1]in{height:1,width:1,top:1,left:1}?isFinite(T[2])&&(C.target[T[1]]=T[2]):C.target[T[1]]=!0;null!==t.getAttribute("download")&&(C.download=!0);var O;p={};for(O in m)(T=t.getAttribute(O))&&(p[m[O]]=T);(O=t.data("cke-saved-name")||p.advName)&&(p.advName=O),CKEDITOR.tools.isEmpty(p)||(C.advanced=p)}return C},getLinkAttributes:function(i,o){var a=i.config.emailProtection||"",r={};switch(o.type){case"url":a=o.url&&void 0!==o.url.protocol?o.url.protocol:"http://";var s=o.url&&CKEDITOR.tools.trim(o.url.url)||"";r["data-cke-saved-href"]=0===s.indexOf("/")?s:a+s;break;case"anchor":a=o.anchor&&o.anchor.id,r["data-cke-saved-href"]="#"+(o.anchor&&o.anchor.name||a||"");break;case"email":s=(d=o.email).address;switch(a){case"":case"encode":var l=encodeURIComponent(d.subject||""),c=encodeURIComponent(d.body||""),d=[];l&&d.push("subject="+l),c&&d.push("body="+c),d=d.length?"?"+d.join("&"):"","encode"==a?(a=["javascript:void(location.href='mailto:'+",t(s)],d&&a.push("+'",e(d),"'"),a.push(")")):a=["mailto:",s,d];break;default:a=s.split("@",2),d.name=a[0],d.domain=a[1],a=["javascript:",n(i,d)]}r["data-cke-saved-href"]=a.join("");break;case"tel":r["data-cke-saved-href"]="tel:"+o.tel}if(o.target)if("popup"==o.target.type){a=["window.open(this.href, '",o.target.name||"","', '"];var u="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" ");for(s=u.length,l=function(e){o.target[e]&&u.push(e+"="+o.target[e])},d=0;d<s;d++)u[d]+=o.target[u[d]]?"=yes":"=no";l("width"),l("left"),l("height"),l("top"),a.push(u.join(","),"'); return false;"),r["data-cke-pa-onclick"]=a.join("")}else"notSet"!=o.target.type&&o.target.name&&(r.target=o.target.name);if(o.download&&(r.download=""),o.advanced){for(var h in m)(a=o.advanced[m[h]])&&(r[h]=a);r.name&&(r["data-cke-saved-name"]=r.name)}for(var f in r["data-cke-saved-href"]&&(r.href=r["data-cke-saved-href"]),h={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1},o.advanced&&CKEDITOR.tools.extend(h,m),r)delete h[f];return{set:r,removed:CKEDITOR.tools.object.keys(h)}},showDisplayTextForElement:function(e,t){var n=t.getSelection();return!(t.widgets&&t.widgets.focused||n&&1<n.getRanges().length)&&(!e||!e.getName||!e.is({img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1}))}},CKEDITOR.unlinkCommand=function(){},CKEDITOR.unlinkCommand.prototype={exec:function(e){if(CKEDITOR.env.ie){var t,n=e.getSelection().getRanges()[0],i=n.getPreviousEditableNode()&&n.getPreviousEditableNode().getAscendant("a",!0)||n.getNextEditableNode()&&n.getNextEditableNode().getAscendant("a",!0);n.collapsed&&i&&(t=n.createBookmark(),n.selectNodeContents(i),n.select())}i=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1}),e.removeStyle(i),t&&(n.moveToBookmark(t),n.select())},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]",editorFocus:1},CKEDITOR.removeAnchorCommand=function(){},CKEDITOR.removeAnchorCommand.prototype={exec:function(e){var t,n=e.getSelection(),i=n.createBookmarks();n&&(t=n.getSelectedElement())&&(t.getChildCount()?t.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(e,t))?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,linkDefaultProtocol:"http://"})}(),function(){function e(e,t,n,i){for(var o=CKEDITOR.plugins.list.listToArray(t.root,n),a=[],r=0;r<t.contents.length;r++){(c=(c=t.contents[r]).getAscendant("li",!0))&&!c.getCustomData("list_item_processed")&&(a.push(c),CKEDITOR.dom.element.setMarker(n,c,"list_item_processed",!0))}var s,l,c=t.root.getDocument();for(r=0;r<a.length;r++){var d=a[r].getCustomData("listarray_index");(s=o[d].parent).is(this.type)||(l=c.createElement(this.type),s.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),o[d].parent=l)}var u;for(o=(n=CKEDITOR.plugins.list.arrayToList(o,n,null,e.config.enterMode)).listNode.getChildCount(),r=0;r<o&&(u=n.listNode.getChild(r));r++)u.getName()==this.type&&i.push(u);n.listNode.replace(t.root),e.fire("contentDomInvalidated")}function t(e,t,n){var i,o,a=t.contents,r=t.root.getDocument(),s=[];if(1==a.length&&a[0].equals(t.root)){var l=r.createElement("div");a[0].moveChildren&&a[0].moveChildren(l),a[0].append(l),a[0]=l}for(t=t.contents[0].getParent(),l=0;l<a.length;l++)t=t.getCommonAncestor(a[l].getParent());for(e=void 0===(e=e.config.useComputedState)||e,l=0;l<a.length;l++)for(var c,d=a[l];c=d.getParent();){if(c.equals(t)){s.push(d),!o&&d.getDirection()&&(o=1),d=d.getDirection(e),null!==i&&(i=i&&i!=d?null:d);break}d=c}if(!(1>s.length)){for(a=s[s.length-1].getNext(),l=r.createElement(this.type),n.push(l);s.length;)n=s.shift(),e=r.createElement("li"),(d=n).is("pre")||g.test(d.getName())||"false"==d.getAttribute("contenteditable")?n.appendTo(e):(n.copyAttributes(e),i&&n.getDirection()&&(e.removeStyle("direction"),e.removeAttribute("dir")),n.moveChildren(e),n.remove()),e.appendTo(l);i&&o&&l.setAttribute("dir",i),a?l.insertBefore(a):l.appendTo(t)}}function n(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),a=[],r=0;r<t.contents.length;r++){var s=t.contents[r];(s=s.getAscendant("li",!0))&&!s.getCustomData("list_item_processed")&&(a.push(s),CKEDITOR.dom.element.setMarker(n,s,"list_item_processed",!0))}for(s=null,r=0;r<a.length;r++)o[s=a[r].getCustomData("listarray_index")].indent=-1;for(r=s+1;r<o.length;r++)if(o[r].indent>o[r-1].indent+1){for(a=o[r-1].indent+1-o[r].indent,s=o[r].indent;o[r]&&o[r].indent>=s;)o[r].indent+=a,r++;r--}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 i(e,t){this.name=e,this.context=this.type=t,this.allowedContent=t+" li",this.requiredContent=t}function o(e,t,n,i){for(var o,a;o=e[i?"getLast":"getFirst"](m);)(a=o.getDirection(1))!==t.getDirection(1)&&o.setAttribute("dir",a),o.remove(),n?o[i?"insertBefore":"insertAfter"](n):t.append(o,i),n=o}function a(e){function t(t){var n=e[t?"getPrevious":"getNext"](h);n&&n.type==CKEDITOR.NODE_ELEMENT&&n.is(e.getName())&&(o(e,n,null,!t),e.remove(),e=n)}t(),t(1)}function r(e){return e.type==CKEDITOR.NODE_ELEMENT&&(e.getName()in CKEDITOR.dtd.$block||e.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[e.getName()]["#"]}function s(e,t,n){e.fire("saveSnapshot"),n.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var i=n.extractContents();t.trim(!1,!0);var r=t.createBookmark(),s=(c=new CKEDITOR.dom.elementPath(t.startContainer)).block,c=c.lastElement.getAscendant("li",1)||s,d=(u=new CKEDITOR.dom.elementPath(n.startContainer)).contains(CKEDITOR.dtd.$listItem),u=u.contains(CKEDITOR.dtd.$list);for(s?(s=s.getBogus())&&s.remove():u&&(s=u.getPrevious(h))&&f(s)&&s.remove(),(s=i.getLast())&&s.type==CKEDITOR.NODE_ELEMENT&&s.is("br")&&s.remove(),(s=t.startContainer.getChild(t.startOffset))?i.insertBefore(s):t.startContainer.append(i),d&&(i=l(d))&&(c.contains(d)?(o(i,d.getParent(),d),i.remove()):c.append(i));n.checkStartOfBlock()&&n.checkEndOfBlock()&&(i=(u=n.startPath()).block);)i.is("li")&&(c=i.getParent(),i.equals(c.getLast(h))&&i.equals(c.getFirst(h))&&(i=c)),n.moveToPosition(i,CKEDITOR.POSITION_BEFORE_START),i.remove();n=n.clone(),i=e.editable(),n.setEndAt(i,CKEDITOR.POSITION_BEFORE_END),(n=new CKEDITOR.dom.walker(n)).evaluator=function(e){return h(e)&&!f(e)},(n=n.next())&&n.type==CKEDITOR.NODE_ELEMENT&&n.getName()in CKEDITOR.dtd.$list&&a(n),t.moveToBookmark(r),t.select(),e.fire("saveSnapshot")}function l(e){return(e=e.getLast(h))&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in c?e:null}var c={ol:1,ul:1},d=CKEDITOR.dom.walker.whitespaces(),u=CKEDITOR.dom.walker.bookmark(),h=function(e){return!(d(e)||u(e))},f=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(e,t,n,i,o){if(!c[e.getName()])return[];i||(i=0),n||(n=[]);for(var a=0,r=e.getChildCount();a<r;a++){var s=e.getChild(a);if(s.type==CKEDITOR.NODE_ELEMENT&&s.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(s,t,n,i+1),"li"==s.$.nodeName.toLowerCase()){var l={parent:e,indent:i,element:s,contents:[]};o?l.grandparent=o:(l.grandparent=e.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent())),t&&CKEDITOR.dom.element.setMarker(t,s,"listarray_index",n.length),n.push(l);for(var d,u=0,h=s.getChildCount();u<h;u++)(d=s.getChild(u)).type==CKEDITOR.NODE_ELEMENT&&c[d.getName()]?CKEDITOR.plugins.list.listToArray(d,t,n,i+1,l.grandparent):l.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 a,r,s,l=e[n].parent.getDocument(),d=new CKEDITOR.dom.documentFragment(l),f=null,g=n,m=Math.max(e[n].indent,0),p=null,E=i==CKEDITOR.ENTER_P?"p":"div";;){var T=e[g];if(a=T.grandparent,r=T.element.getDirection(1),T.indent==m){for(f&&e[g].parent.getName()==f.getName()||(f=e[g].parent.clone(!1,1),o&&f.setAttribute("dir",o),d.append(f)),p=f.append(T.element.clone(0,1)),r!=f.getDirection(1)&&p.setAttribute("dir",r),a=0;a<T.contents.length;a++)p.append(T.contents[a].clone(1,1));g++}else if(T.indent==Math.max(m,0)+1)T=e[g-1].element.getDirection(1),g=CKEDITOR.plugins.list.arrayToList(e,null,g,i,T!=r?r:null),!p.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=l.$.documentMode&&p.append(l.createText(" ")),p.append(g.listNode),g=g.nextIndex;else{if(-1!=T.indent||n||!a)return null;c[a.getName()]?(p=T.element.clone(!1,!0),r!=a.getDirection(1)&&p.setAttribute("dir",r)):p=new CKEDITOR.dom.documentFragment(l);f=a.getDirection(1)!=r;var C,I,O=T.element,D=O.getAttribute("class"),R=O.getAttribute("style"),v=p.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(i!=CKEDITOR.ENTER_BR||f||R||D),b=T.contents.length;for(a=0;a<b;a++)if(C=T.contents[a],u(C)&&1<b)v?I=C.clone(1,1):p.append(C.clone(1,1));else if(C.type==CKEDITOR.NODE_ELEMENT&&C.isBlockBoundary()){f&&!C.getDirection()&&C.setAttribute("dir",r),s=C;var y=O.getAttribute("style");y&&s.setAttribute("style",y.replace(/([^;])$/,"$1;")+(s.getAttribute("style")||"")),D&&C.addClass(D),s=null,I&&(p.append(I),I=null),p.append(C.clone(1,1))}else v?(s||(s=l.createElement(E),p.append(s),f&&s.setAttribute("dir",r)),R&&s.setAttribute("style",R),D&&s.setAttribute("class",D),I&&(s.append(I),I=null),s.append(C.clone(1,1))):p.append(C.clone(1,1));I&&((s||p).append(I),I=null),p.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&g!=e.length-1&&(CKEDITOR.env.needsBrFiller&&(r=p.getLast())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br")&&r.remove(),(r=p.getLast(h))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(CKEDITOR.dtd.$block)||p.append(l.createElement("br"))),"div"!=(r=p.$.nodeName.toLowerCase())&&"p"!=r||p.appendBogus(),d.append(p),f=null,g++}if(s=null,e.length<=g||Math.max(e[g].indent,0)<m)break}if(t)for(e=d.getFirst();e;){if(e.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(t,e),e.getName()in CKEDITOR.dtd.$listItem&&(l=o=i=void 0,i=(n=e).getDirection()))){for(o=n.getParent();o&&!(l=o.getDirection());)o=o.getParent();i==l&&n.removeAttribute("dir")}e=e.getNextSourceNode()}return{listNode:d,nextIndex:g}}};var g=/^h[1-6]$/,m=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);i.prototype={exec:function(i){function o(e){return c[e.root.getName()]&&!function(e,t){return CKEDITOR.tools.array.filter(e.getChildren().toArray(),(function(e){return-1===CKEDITOR.tools.array.indexOf(t,e.type)})).length}(e.root,[CKEDITOR.NODE_COMMENT])}function r(e){var t=!0;return 0!==e.getChildCount()&&(e.forEach((function(e){if(e.type!==CKEDITOR.NODE_COMMENT)return t=!1}),null,!0),t)}this.refresh(i,i.elementPath());var s=i.config,l=i.getSelection(),d=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF)if((f=i.editable()).getFirst(h)){var u=1==d.length&&d[0];(s=u&&u.getEnclosedNode())&&s.is&&this.type==s.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else s.enterMode==CKEDITOR.ENTER_BR?f.appendBogus():d[0].fixBlock(1,s.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(d);s=l.createBookmarks(!0);for(var f=[],g={},m=(d=d.createIterator(),0);(u=d.getNextRange())&&++m;){var p=u.getBoundaryNodes(),E=p.startNode,T=p.endNode;for(E.type==CKEDITOR.NODE_ELEMENT&&"td"==E.getName()&&u.setStartAt(p.startNode,CKEDITOR.POSITION_AFTER_START),T.type==CKEDITOR.NODE_ELEMENT&&"td"==T.getName()&&u.setEndAt(p.endNode,CKEDITOR.POSITION_BEFORE_END),(u=u.createIterator()).forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;p=u.getNextParagraph();)if(!p.getCustomData("list_block")&&!r(p)){CKEDITOR.dom.element.setMarker(g,p,"list_block",1);E=(I=i.elementPath(p)).elements,T=0;for(var C,I=I.blockLimit,O=E.length-1;0<=O&&(C=E[O]);O--)if(c[C.getName()]&&I.contains(C)){I.removeCustomData("list_group_object_"+m),(E=C.getCustomData("list_group_object"))?E.contents.push(p):(E={root:C,contents:[p]},f.push(E),CKEDITOR.dom.element.setMarker(g,C,"list_group_object",E)),T=1;break}T||((T=I).getCustomData("list_group_object_"+m)?T.getCustomData("list_group_object_"+m).contents.push(p):(E={root:T,contents:[p]},CKEDITOR.dom.element.setMarker(g,T,"list_group_object_"+m,E),f.push(E)))}}for(C=[];0<f.length;)E=f.shift(),this.state==CKEDITOR.TRISTATE_OFF?o(E)||(c[E.root.getName()]?e.call(this,i,E,g,C):t.call(this,i,E,C)):this.state==CKEDITOR.TRISTATE_ON&&c[E.root.getName()]&&!o(E)&&n.call(this,i,E,g);for(O=0;O<C.length;O++)a(C[O]);CKEDITOR.dom.element.clearAllMarkers(g),l.selectBookmarks(s),i.focus()},refresh:function(e,t){var n=t.contains(c,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 i("numberedlist","ol")),e.addCommand("bulletedlist",new i("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,i=t.data.domEvent.getKey();if("wysiwyg"==e.mode&&i in{8:1,46:1}){var o=e.getSelection().getRanges()[0],a=o&&o.startPath();if(o&&o.collapsed){var d,u=8==i,g=e.editable(),m=new CKEDITOR.dom.walker(o.clone());if(m.evaluator=function(e){return h(e)&&!f(e)},m.guard=function(e,t){return!(t&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))},i=o.clone(),u)if((d=a.contains(c))&&o.checkBoundaryOfElement(d,CKEDITOR.START)&&(d=d.getParent())&&d.is("li")&&(d=l(d))?(n=d,d=d.getPrevious(h),i.moveToPosition(d&&f(d)?d:n,CKEDITOR.POSITION_BEFORE_START)):(m.range.setStartAt(g,CKEDITOR.POSITION_AFTER_START),m.range.setEnd(o.startContainer,o.startOffset),(d=m.previous())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.getName()in c||d.is("li"))&&(d.is("li")||(m.range.selectNodeContents(d),m.reset(),m.evaluator=r,d=m.previous()),n=d,i.moveToElementEditEnd(n),i.moveToPosition(i.endPath().block,CKEDITOR.POSITION_BEFORE_END))),n)s(e,i,o),t.cancel();else{var p=a.contains(c);p&&o.checkBoundaryOfElement(p,CKEDITOR.START)&&(n=p.getFirst(h),o.checkBoundaryOfElement(n,CKEDITOR.START)&&(d=p.getPrevious(h),l(n)?d&&(o.moveToElementEditEnd(d),o.select()):e.execCommand("outdent"),t.cancel()))}else if(n=a.contains("li")){if(m.range.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),u=(g=n.getLast(h))&&r(g)?g:n,a=0,(d=m.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in c&&d.equals(g)?(a=1,d=m.next()):o.checkBoundaryOfElement(u,CKEDITOR.END)&&(a=2),a&&d){if((o=o.clone()).moveToElementEditStart(d),1==a&&(i.optimize(),!i.startContainer.equals(n))){for(n=i.startContainer;n.is(CKEDITOR.dtd.$inline);)p=n,n=n.getParent();p&&i.moveToPosition(p,CKEDITOR.POSITION_AFTER_END)}2==a&&(i.moveToPosition(i.endPath().block,CKEDITOR.POSITION_BEFORE_END),o.endPath().block&&o.moveToPosition(o.endPath().block,CKEDITOR.POSITION_AFTER_START)),s(e,i,o),t.cancel()}}else m.range.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),(d=m.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(c)&&(d=d.getFirst(h),a.block&&o.checkStartOfBlock()&&o.checkEndOfBlock()?(a.block.remove(),o.moveToElementEditStart(d),o.select()):l(d)?(o.moveToElementEditStart(d),o.select()):((o=o.clone()).moveToElementEditStart(d),s(e,i,o)),t.cancel());setTimeout((function(){e.selectionChange(1)}))}}})))}})}(),CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(e){var t;e.blockless||(t=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]}),t=e.addCommand("numberedListStyle",t),e.addFeature(t),CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js"),t=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]}),t=e.addCommand("bulletedListStyle",t),e.addFeature(t),CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js"),e.addMenuGroup("list",108),e.addMenuItems({numberedlist:{label:e.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:e.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}}),e.contextMenu.addListener((function(e){if(!e||e.isReadOnly())return null;for(;e;){var t=e.getName();if("ol"==t)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==t)return{bulletedlist:CKEDITOR.TRISTATE_OFF};e=e.getParent()}return null})))}},CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle),function(){function e(e,t,n){return u(t)&&u(n)&&n.equals(t.getNext((function(e){return!(V(e)||W(e)||h(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&&u(t)&&(t=t.getAscendant(e.triggers,!0))&&e.editable.contains(t)){var n=r(t);if("true"==n.getAttribute("contenteditable"))return t;if(n.is(e.triggers))return n}return null}function i(e,t,n){return C(e,t),C(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&&!V(t)||u(t)&&!h(t)&&!d(e,t)}))}function a(e,t,n){return e>t&&e<n}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 s(e){var t=e.doc,n=v('<span contenteditable="false" data-cke-magic-line="1" style="'+q+"position:absolute;border-top:1px dashed "+e.boxColor+'"></span>',t),i=CKEDITOR.getUrl(this.path+"images/"+(b.hidpi?"hidpi/":"")+"icon"+(e.rtl?"-rtl":"")+".png");for(D(n,{attach:function(){return this.wrap.getParent()||this.wrap.appendTo(e.editable,!0),this},lineChildren:[D(v('<span title="'+e.editor.lang.magicline.title+'" contenteditable="false">↵</span>',t),{base:q+"height:17px;width:17px;"+(e.rtl?"left":"right")+":17px;background:url("+i+") center no-repeat "+e.boxColor+";cursor:pointer;"+(b.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(b.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),D(v(z,t),{base:U+"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"]}),D(v(z,t),{base:U+"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(){C(e,this);var t=e.holdDistance,n=this.size;return!!(n&&a(e.mouse.y,n.top-t,n.bottom+t)&&a(e.mouse.x,n.left-t,n.right+t))},place:function(){var t=e.view,n=e.editable,i=e.trigger,o=i.upper,r=i.lower,s=o||r,l=s.getParent(),c={};for(var d in this.trigger=i,o&&C(e,o,!0),r&&C(e,r,!0),C(e,l,!0),e.inInlineMode&&I(e,!0),l.equals(n)?(c.left=t.scroll.x,c.right=-t.scroll.x,c.width=""):(c.left=s.size.left-s.size.margin.left+t.scroll.x-(e.inInlineMode?t.editable.left+t.editable.border.left:0),c.width=s.size.outerWidth+s.size.margin.left+s.size.margin.right+t.scroll.x,c.right=""),o&&r?c.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||(c.top=o.size.bottom+o.size.margin.bottom):c.top=r.size.top-r.size.margin.top,i.is(x)||a(c.top,t.scroll.y-15,t.scroll.y+5)?(c.top=e.inInlineMode?0:t.scroll.y,this.look(x)):i.is(A)||a(c.top,t.pane.bottom-5,t.pane.bottom+15)?(c.top=e.inInlineMode?t.editable.height+t.editable.padding.top+t.editable.padding.bottom:t.pane.bottom-1,this.look(A)):(e.inInlineMode&&(c.top-=t.editable.top+t.editable.border.top),this.look(L)),e.inInlineMode&&(c.top--,c.top+=t.editable.scroll.top,c.left+=t.editable.scroll.left),c)c[d]=CKEDITOR.tools.cssLength(c[d]);this.setStyles(c)},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 R("span",e.doc)}),t=n.lineChildren.length;t--;)n.lineChildren[t].appendTo(n);n.look(L),n.appendTo(n.wrap),n.unselectable(),n.lineChildren[0].on("mouseup",(function(t){n.detach(),l(e,(function(t){var n=e.line.trigger;t[n.is(k)?"insertBefore":"insertAfter"](n.is(k)?n.lower:n.upper)}),!0),e.editor.focus(),b.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 l(e,t,n){var i,o=new CKEDITOR.dom.range(e.doc),a=e.editor;b.ie&&e.enterMode==CKEDITOR.ENTER_BR?i=e.doc.createText(F):(i=(i=r(e.element,!0))&&i.data("cke-enter-mode")||e.enterMode,(i=new R(K[i],e.doc)).is("br")||e.doc.createText(F).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 c(e,t){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function i(n){var i=b.ie&&9>b.version?" ":F,o=e.hotNode&&e.hotNode.getText()==i&&e.element.equals(e.hotNode)&&e.lastCmdDirection===!!t;l(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})),b.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),m(e,a)||!a||a.equals(e.editable)||a.contains(e.editable))||((s=r(a))&&"false"==s.getAttribute("contenteditable")&&(a=s),e.element=a,u(s=o(e,a,!t))&&s.is(e.triggers)&&s.is(M)&&(!o(e,s,!t)||(l=o(e,s,!t))&&u(l)&&l.is(e.triggers))?i(s):u(l=n(e))&&(o(e,l,!t)?(a=o(e,l,!t))&&u(a)&&a.is(e.triggers)&&i(l):i(l)))}}()}}function d(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 u(e){return e&&e.type==CKEDITOR.NODE_ELEMENT&&e.$}function h(e){return!!u(e)&&((t=f(e))||(u(e)?t=!(!(t={left:1,right:1,center:1})[e.getComputedStyle("float")]&&!t[e.getAttribute("align")]):t=!1),t);var t}function f(e){return!!{absolute:1,fixed:1}[e.getComputedStyle("position")]}function g(e,t){return u(t)?t.is(e.triggers):null}function m(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 p(e){var n=e.editable,i=e.mouse,o=e.view,r=e.triggerOffset;I(e);var s=i.y>(e.inInlineMode?o.editable.top+o.editable.height/2:Math.min(o.editable.height,o.pane.height)/2);return(n=n[s?"getLast":"getFirst"]((function(e){return!(V(e)||W(e))})))?(d(e,n)&&(n=e.line.wrap[s?"getPrevious":"getNext"]((function(e){return!(V(e)||W(e))}))),u(n)&&!h(n)&&g(e,n)?(C(e,n),!s&&0<=n.size.top&&a(i.y,0,n.size.top+r)?(e=e.inInlineMode||0===o.scroll.y?x:L,new t([null,n,k,N,e])):s&&n.size.bottom<=o.pane.height&&a(i.y,n.size.bottom-r,o.pane.height)?(e=e.inInlineMode||a(n.size.bottom,o.pane.height-r,o.pane.height)?A:L,new t([n,null,w,N,e])):null):null):null}function E(e){var i=e.mouse,r=e.view,s=e.triggerOffset,l=n(e);if(!l)return null;C(e,l);s=Math.min(s,0|l.size.outerHeight/2);var c,d,f=[];if(a(i.y,l.size.top-1,l.size.top+s))d=!1;else{if(!a(i.y,l.size.bottom-s,l.size.bottom+1))return null;d=!0}if(h(l)||function(e,t,n){return!!(t=t[n?"getLast":"getFirst"]((function(t){return e.isRelevant(t)&&!t.is(B)})))&&(C(e,t),n?t.size.top>e.mouse.y:t.size.bottom<e.mouse.y)}(e,l,d)||l.getParent().is(P))return null;var m=o(e,l,!d);if(m){if(m&&m.type==CKEDITOR.NODE_TEXT)return null;if(u(m)){if(h(m)||!g(e,m)||m.getParent().is(P))return null;f=[m,l][d?"reverse":"concat"]().concat([S,N])}}else l.equals(e.editable[d?"getLast":"getFirst"](e.isRelevant))?(I(e),d&&a(i.y,l.size.bottom-s,r.pane.height)&&a(l.size.bottom,r.pane.height-s,r.pane.height)?c=A:a(i.y,0,l.size.top+s)&&(c=x)):c=L,f=[null,l][d?"reverse":"concat"]().concat([d?w:k,N,c,l.equals(e.editable[d?"getLast":"getFirst"](e.isRelevant))?d?A:x:L]);return 0 in f?new t(f):null}function T(e,t,n,i){for(var o=t.getDocumentPosition(),a={},r={},s={},l={},c=X.length;c--;)a[X[c]]=parseInt(t.getComputedStyle.call(t,"border-"+X[c]+"-width"),10)||0,s[X[c]]=parseInt(t.getComputedStyle.call(t,"padding-"+X[c]),10)||0,r[X[c]]=parseInt(t.getComputedStyle.call(t,"margin-"+X[c]),10)||0;return n&&!i||O(e,i),l.top=o.y-(n?0:e.view.scroll.y),l.left=o.x-(n?0:e.view.scroll.x),l.outerWidth=t.$.offsetWidth,l.outerHeight=t.$.offsetHeight,l.height=l.outerHeight-(s.top+s.bottom+a.top+a.bottom),l.width=l.outerWidth-(s.left+s.right+a.left+a.right),l.bottom=l.top+l.outerHeight,l.right=l.left+l.outerWidth,e.inInlineMode&&(l.scroll={top:t.$.scrollTop,left:t.$.scrollLeft}),D({border:a,padding:s,margin:r,ignoreScroll:n},l,!0)}function C(e,t,n){if(!u(t))return t.size=null;if(t.size){if(t.size.ignoreScroll==n&&t.size.date>new Date-H)return null}else t.size={};return D(t.size,T(e,t,n),{date:+new Date},!0)}function I(e,t){e.view.editable=T(e,e.editable,t,!0)}function O(e,t){e.view||(e.view={});var n=e.view;if(!(!t&&n&&n.date>new Date-H)){n=(i=e.win).getScrollPosition();var i=i.getViewPaneSize();D(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,a,r,g=e.config,C=g.magicline_triggerOffset||30,R={editor:e,enterMode:g.enterMode,triggerOffset:C,holdDistance:0|C*(g.magicline_holdDistance||.5),boxColor:g.magicline_color||"#ff0000",rtl:"rtl"==g.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(g.magicline_tabuList||[]),triggers:g.magicline_everywhere?$:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}};R.isRelevant=function(e){return u(e)&&!d(R,e)&&!h(e)},e.on("contentDom",(function(){var u=e.editable(),h=e.document,C=e.window;D(R,{editable:u,inInlineMode:u.isInline(),doc:h,win:C,hotNode:null},!0),R.boundary=R.inInlineMode?R.editable:R.doc.getDocumentElement(),u.is(_.$inline)||(R.inInlineMode&&!f(u)&&u.setStyles({position:"relative",top:null,left:null}),s.call(this,R),O(R),u.attachListener(e,"beforeUndoImage",(function(){R.line.detach()})),u.attachListener(e,"beforeGetData",(function(){R.line.wrap.getParent()&&(R.line.detach(),e.once("getData",(function(){R.line.attach()}),null,null,1e3))}),null,null,0),u.attachListener(R.inInlineMode?h:h.getWindow().getFrame(),"mouseout",(function(t){if("wysiwyg"==e.mode)if(R.inInlineMode){var n=t.data.$.clientX;t=t.data.$.clientY,O(R),I(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(r),r=null,R.line.detach())}else clearTimeout(r),r=null,R.line.detach()})),u.attachListener(u,"keyup",(function(){R.hiddenMode=0})),u.attachListener(u,"keydown",(function(t){if("wysiwyg"==e.mode)switch(t.data.getKeystroke()){case 2228240:case 16:R.hiddenMode=1,R.line.detach()}})),u.attachListener(R.inInlineMode?u:h,"mousemove",(function(t){if(a=!0,"wysiwyg"==e.mode&&!e.readOnly&&!r){var n={x:t.data.$.clientX,y:t.data.$.clientY};r=setTimeout((function(){R.mouse=n,r=R.trigger=null,O(R),a&&!R.hiddenMode&&e.focusManager.hasFocus&&!R.line.mouseNear()&&(R.element=j(R,!0))&&((R.trigger=p(R)||E(R)||G(R))&&!m(R,R.trigger.upper||R.trigger.lower)?R.line.attach().place():(R.trigger=null,R.line.detach()),a=!1)}),30)}})),u.attachListener(C,"scroll",(function(){"wysiwyg"==e.mode&&(R.line.detach(),b.webkit&&(R.hiddenMode=1,clearTimeout(i),i=setTimeout((function(){R.mouseDown||(R.hiddenMode=0)}),50)))})),u.attachListener(y?h:C,"mousedown",(function(){"wysiwyg"==e.mode&&(R.line.detach(),R.hiddenMode=1,R.mouseDown=1)})),u.attachListener(y?h:C,"mouseup",(function(){R.hiddenMode=0,R.mouseDown=0})),e.addCommand("accessPreviousSpace",c(R)),e.addCommand("accessNextSpace",c(R,!0)),e.setKeystroke([[g.magicline_keystrokePrevious,"accessPreviousSpace"],[g.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"))})),e._.magiclineBackdoor={accessFocusSpace:l,boxTrigger:t,isLine:d,getAscendantTrigger:n,getNonEmptyNeighbour:o,getSize:T,that:R,triggerEdge:E,triggerEditable:p,triggerExpand:G})}),this)}});var D=CKEDITOR.tools.extend,R=CKEDITOR.dom.element,v=R.createFromHtml,b=CKEDITOR.env,y=CKEDITOR.env.ie&&9>CKEDITOR.env.version,_=CKEDITOR.dtd,K={},k=128,w=64,S=32,N=16,x=4,A=2,L=1,F=" ",P=_.$listItem,B=_.$tableContent,M=D({},_.$nonEditable,_.$empty),$=_.$block,H=100,q="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",U=q+"border-color:transparent;display:block;border-style:solid;",z="<span>"+F+"</span>";K[CKEDITOR.ENTER_BR]="br",K[CKEDITOR.ENTER_P]="p",K[CKEDITOR.ENTER_DIV]="div",t.prototype={set:function(e,t,n){return this.properties=e+t+(n||L),this},is:function(e){return(this.properties&e)==e}};var j=function(){function e(e,t){var n=e.$.elementFromPoint(t.x,t.y);return n&&n.nodeType?new CKEDITOR.dom.element(n):null}return function(t,n,i){if(!t.mouse)return null;var o=t.doc,a=t.line.wrap,r=e(o,i=i||t.mouse);return n&&d(t,r)&&(a.hide(),r=e(o,i),a.show()),!r||r.type!=CKEDITOR.NODE_ELEMENT||!r.$||b.ie&&9>b.version&&!t.boundary.equals(r)&&!t.boundary.contains(r)?null:r}}(),V=CKEDITOR.dom.walker.whitespaces(),W=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),G=function(){function n(n){var r,s,l;if(!u(g=n.element)||g.contains(n.editable)||g.isReadOnly())return null;if(l=function(e,n,i,o){for(var a=o,r=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(a,o)),c||(c=n(r,o)),!l&&0<u.y-s&&(a=i(e,{x:u.x,y:u.y-s})),!c&&u.y+s<d&&(r=i(e,{x:u.x,y:u.y+s})),!l||!c);)s+=2;return new t([a,r,null,null])}(n,(function(e,t){return!t.equals(e)}),(function(e,t){return j(e,!0,t)}),g),e(0,r=l.upper,s=l.lower))return l.set(S,8);if(r&&g.contains(r))for(;!r.getParent().equals(g);)r=r.getParent();else r=g.getFirst((function(e){return o(n,e)}));if(s&&g.contains(s))for(;!s.getParent().equals(g);)s=s.getParent();else s=g.getLast((function(e){return o(n,e)}));if(!r||!s)return null;if(C(n,r),C(n,s),!a(n.mouse.y,r.size.top,s.size.bottom))return null;for(var c,d,h,f,g=Number.MAX_VALUE;s&&!s.equals(r)&&(d=r.getNext(n.isRelevant));)(c=Math.abs(i(n,r,d)-n.mouse.y))<g&&(g=c,h=r,f=d),C(n,r=d);return h&&f&&a(n.mouse.y,h.size.top,f.size.bottom)?(l.upper=h,l.lower=f,l.set(S,8)):null}function o(e,t){return!(t&&t.type==CKEDITOR.NODE_TEXT||W(t)||h(t)||d(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 a=o.lower;i=!(!i||!a||h(a)||h(i)||a.equals(i)||i.equals(a)||a.contains(i)||i.contains(a))&&!!(g(t,i)&&g(t,a)&&e(0,i,a))}return i?o:null}}(),X=["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),a={},r=n.$;return i||(a.class=r.className||"",r.className=""),a.inline=r.style.cssText||"",i||(r.style.cssText="position: static; overflow: visible"),t(o),a}function i(n,i){var o=e(n),a=n.$;"class"in i&&(a.className=i.class),"inline"in i&&(a.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 a,r,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.getFirst((function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_inner")})),f=e.ui.space("contents");if("wysiwyg"==e.mode){var g=e.getSelection();a=g&&g.getRanges(),r=d.getScrollPosition()}else{var m=e.editable().$;a=!CKEDITOR.env.ie&&[m.selectionStart,m.selectionEnd],r=[m.scrollLeft,m.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){for(d.on("resize",t),s=d.getScrollPosition(),g=e.container;g=g.getParent();)g.setCustomData("maximize_saved_styles",n(g)),g.setStyle("z-index",e.config.baseFloatZIndex-5);f.setCustomData("maximize_saved_styles",n(f,!0)),h.setCustomData("maximize_saved_styles",n(h,!0)),f={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0},c.getDocumentElement().setStyles(f),!CKEDITOR.env.gecko&&c.getDocumentElement().setStyle("position","fixed"),CKEDITOR.env.gecko&&CKEDITOR.env.quirks||c.getBody().setStyles(f),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(),f=h.getDocumentPosition(),h.setStyles({left:-1*f.x+"px",top:-1*f.y+"px"}),CKEDITOR.env.gecko&&o(e)}else if(this.state==CKEDITOR.TRISTATE_ON){d.removeListener("resize",t);g=[f,h];for(var p=0;p<g.length;p++)i(g[p],g[p].getCustomData("maximize_saved_styles")),g[p].removeCustomData("maximize_saved_styles");for(g=e.container;g=g.getParent();)i(g,g.getCustomData("maximize_saved_styles")),g.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",{outerHeight:e.container.$.offsetHeight,contentsHeight:f.$.offsetHeight,outerWidth:e.container.$.offsetWidth})}this.toggleState(),(g=this.uiItems[0])&&(f=this.state==CKEDITOR.TRISTATE_OFF?l.maximize.maximize:l.maximize.minimize,(g=CKEDITOR.document.getById(g._.id)).getChild(1).setHtml(f),g.setAttribute("title",f),g.setAttribute("href",'javascript:void("'+f+'");')),"wysiwyg"==e.mode?a?(CKEDITOR.env.gecko&&o(e),e.getSelection().selectRanges(a),(m=e.getSelection().getStartElement())&&m.scrollIntoView(!0)):d.$.scrollTo(r.x,r.y):(a&&(m.selectionStart=a[0],m.selectionEnd=a[1]),m.scrollLeft=r[0],m.scrollTop=r[1]),a=r=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)}}})}(),CKEDITOR.plugins.add("newpage",{init:function(e){e.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(e){var t=this;e.setData(e.config.newpage_html||"",(function(){e.focus(),setTimeout((function(){e.fire("afterCommandExec",{name:"newpage",command:t}),e.selectionChange()}),200)}))},async:!0}),e.ui.addButton&&e.ui.addButton("NewPage",{label:e.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}}),function(){function e(e){return{"aria-label":e,class:"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:e}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var e=("background:url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g," !important;");CKEDITOR.addCss("div.cke_pagebreak{"+e+"}")},init:function(e){e.blockless||(e.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),e.ui.addButton&&e.ui.addButton("PageBreak",{label:e.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&e.on("contentDom",(function(){e.document.on("click",(function(t){(t=t.data.getTarget()).is("div")&&t.hasClass("cke_pagebreak")&&e.getSelection().selectElement(t)}))})))},afterInit:function(t){function n(n){CKEDITOR.tools.extend(n.attributes,e(t.lang.pagebreak.alt),!0),n.children.length=0}var i=(o=t.dataProcessor)&&o.dataFilter,o=o&&o.htmlFilter,a=/page-break-after\s*:\s*always/i,r=/display\s*:\s*none/i;o&&o.addRules({attributes:{class:function(e,t){var n=e.replace("cke_pagebreak","");if(n!=e){var i=CKEDITOR.htmlParser.fragment.fromHtml('<span style="display: none;"> </span>').children[0];t.children.length=0,t.add(i),delete(i=t.attributes)["aria-label"],delete i.contenteditable,delete i.title}return n}}},{applyToAll:!0,priority:5}),i&&i.addRules({elements:{div:function(e){if(e.attributes["data-cke-pagebreak"])n(e);else if(a.test(e.attributes.style)){var t=e.children[0];t&&"span"==t.name&&r.test(t.attributes.style)&&n(e)}}}})}}),CKEDITOR.plugins.pagebreakCmd={exec:function(e){e.insertElement(CKEDITOR.plugins.pagebreak.createElement(e))},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(e){return(e=e.parent)&&"div"==e.name&&e.styles&&e.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"},CKEDITOR.plugins.pagebreak={createElement:function(t){return t.document.createElement("div",{attributes:e(t.lang.pagebreak.alt)})}}}(),function(){var e={canUndo:!1,async:!0,exec:function(e,t){var n=e.lang,i=CKEDITOR.tools.keystrokeToString(n.common.keyboard,e.getCommandKeystroke(CKEDITOR.env.ie?e.commands.paste:this)),o=t&&void 0!==t.notification?t.notification:!t||!t.from||"keystrokeHandler"===t.from&&CKEDITOR.env.ie;n=o&&"string"==typeof o?o:n.pastetext.pasteNotification.replace(/%1/,'<kbd aria-label="'+i.aria+'">'+i.display+"</kbd>");e.execCommand("paste",{type:"text",notification:!!o&&n})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(t){var n=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;t.addCommand("pastetext",e),t.setKeystroke(n,"pastetext"),CKEDITOR.plugins.clipboard.addPasteButton(t,"PasteText",{label:t.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"}),t.config.forcePasteAsPlainText&&t.on("beforePaste",(function(e){"html"!=e.data.type&&(e.data.type="text")})),t.on("pasteState",(function(e){t.getCommand("pastetext").setState(e.data)}))}})}(),CKEDITOR.plugins.add("xml",{}),CKEDITOR.xml=function(e){var t=null;if("object"==typeof e)t=e;else if(e=(e||"").replace(/ /g," "),"ActiveXObject"in window){try{t=new ActiveXObject("MSXML2.DOMDocument")}catch(e){try{t=new ActiveXObject("Microsoft.XmlDom")}catch(e){}}t&&(t.async=!1,t.resolveExternals=!1,t.validateOnParse=!1,t.loadXML(e))}else window.DOMParser&&(t=(new DOMParser).parseFromString(e,"text/xml"));this.baseXml=t},CKEDITOR.xml.prototype={selectSingleNode:function(e,t){var n=this.baseXml;if(t||(t=n)){if("selectSingleNode"in t)return t.selectSingleNode(e);if(n.evaluate)return(n=n.evaluate(e,t,null,9,null))&&n.singleNodeValue||null}return null},selectNodes:function(e,t){var n=this.baseXml,i=[];if(t||(t=n)){if("selectNodes"in t)return t.selectNodes(e);if(n.evaluate&&(n=n.evaluate(e,t,null,5,null)))for(var o;o=n.iterateNext();)i.push(o)}return i},getInnerXml:function(e,t){var n=this.selectSingleNode(e,t),i=[];if(n)for(n=n.firstChild;n;)n.xml?i.push(n.xml):window.XMLSerializer&&i.push((new XMLSerializer).serializeToString(n)),n=n.nextSibling;return i.length?i.join(""):null}},CKEDITOR.plugins.add("ajax",{requires:"xml"}),CKEDITOR.ajax=function(){function e(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}return null}function t(e,t){if(4!=e.readyState||!(200<=e.status&&300>e.status||304==e.status||0===e.status||1223==e.status))return null;switch(t){case"text":return e.responseText;case"xml":var n=e.responseXML;return new CKEDITOR.xml(n&&n.firstChild?n:e.responseText);case"arraybuffer":return e.response;default:return null}}function n(n,i,o){var a=!!i,r=e();return r?(a&&"text"!==o&&"xml"!==o&&(r.responseType=o),r.open("GET",n,a),a&&(r.onreadystatechange=function(){4==r.readyState&&(i(t(r,o)),r=null)}),r.send(null),a?"":t(r,o)):null}return{load:function(e,t,i){return n(e,t,i||"text")},post:function(n,i,o,a){return function(n,i,o,a,r){var s=e();if(!s)return null;s.open("POST",n,!0),s.onreadystatechange=function(){4==s.readyState&&(a&&a(t(s,r)),s=null)},s.setRequestHeader("Content-type",o||"application/x-www-form-urlencoded; charset=UTF-8"),s.send(i)}(n,i,o,a,"text")},loadXml:function(e,t){return n(e,t,"xml")},loadText:function(e,t){return n(e,t,"text")},loadBinary:function(e,t){return n(e,t,"arraybuffer")}}}(),function(){function e(e,n){var i,o,a=0;if(!CKEDITOR.tools.array.isArray(e)||0===e.length)return!0;if(0<(i=CKEDITOR.tools.array.filter(e,(function(e){return-1===CKEDITOR.tools.array.indexOf(t,e)}))).length)for(o=0;o<i.length;o++)!function(e){CKEDITOR.scriptLoader.queue(e,(function(o){o&&t.push(e),++a===i.length&&n()}))}(i[o]);return 0===i.length}var t=[],n=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(e){"number"!=typeof e.priority&&(e.priority=10),this.handlers.push(e)},addPasteListener:function(t){t.on("paste",(function(n){var i=function(e,t){return CKEDITOR.tools.array.filter(e,(function(e){return e.canHandle(t)})).sort((function(e,t){return e.priority===t.priority?0:e.priority-t.priority}))}(this.handlers,n);if(0!==i.length){if(!e(function(e){var t=CKEDITOR.tools.array.reduce(e,(function(e,t){return CKEDITOR.tools.array.isArray(t.filters)?e.concat(t.filters):e}),[]);return CKEDITOR.tools.array.filter(t,(function(e,n){return CKEDITOR.tools.array.indexOf(t,e)===n}))}(i),(function(){return t.fire("paste",n.data)})))return n.cancel();!function e(t,n){var i=t.shift();i&&i.handle(n,(function(){e(t,n)}))}(i,n)}}),this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:["clipboard","ajax"],beforeInit:function(e){e.pasteTools=new n,e.pasteTools.addPasteListener(e)}}),CKEDITOR.plugins.pastetools={filters:{},loadFilters:e,createFilter:function(e){var t=CKEDITOR.tools.array.isArray(e.rules)?e.rules:[e.rules],n=e.additionalTransforms;return function(e,i){var o,a=new CKEDITOR.htmlParser.basicWriter,r=new CKEDITOR.htmlParser.filter;return n&&(e=n(e,i)),CKEDITOR.tools.array.forEach(t,(function(t){r.addRules(t(e,i,r))})),o=CKEDITOR.htmlParser.fragment.fromHtml(e),r.applyTo(o),o.writeHtml(a),a.getHtml()}},getClipboardData:function(e,t){var n;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===t?(n=e.dataTransfer.getData(t,!0))||"text/html"!==t?n:e.dataValue:null},getConfigValue:function(e,t){if(e&&e.config){var n=CKEDITOR.tools,i=e.config,o=n.object.keys(i),a=["pasteTools_"+t,"pasteFromWord_"+t,"pasteFromWord"+n.capitalize(t,!0)];return i[a=n.array.find(a,(function(e){return-1!==n.array.indexOf(o,e)}))]}},getContentGeneratorName:function(e){if((e=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(e))&&e.length)return 0===(e=e[1].toLowerCase()).indexOf("microsoft")?"microsoft":0===e.indexOf("libreoffice")?"libreoffice":"unknown"}},CKEDITOR.pasteFilters=CKEDITOR.plugins.pastetools.filters}(),CKEDITOR.plugins.add("pastefromgdocs",{requires:"pastetools",init:function(e){var t=CKEDITOR.plugins.getPath("pastetools"),n=this.path;e.pasteTools.register({filters:[CKEDITOR.getUrl(t+"filter/common.js"),CKEDITOR.getUrl(n+"filter/default.js")],canHandle:function(e){return/id=(\"|\')?docs\-internal\-guid\-/.test(e.data.dataValue)},handle:function(t,n){var i=t.data,o=CKEDITOR.plugins.pastetools.getClipboardData(i,"text/html");i.dontFilter=!0,i.dataValue=CKEDITOR.pasteFilters.gdocs(o,e),!0===e.config.forcePasteAsPlainText&&(i.type="text"),n()}})}}),CKEDITOR.plugins.add("pastefromlibreoffice",{requires:"pastetools",isSupportedEnvironment:function(){var e=CKEDITOR.env.ie&&11>=CKEDITOR.env.version;return!(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome||e)},init:function(e){if(this.isSupportedEnvironment()){var t=CKEDITOR.plugins.getPath("pastetools"),n=this.path;e.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(t+"filter/common.js"),CKEDITOR.getUrl(t+"filter/image.js"),CKEDITOR.getUrl(n+"filter/default.js")],canHandle:function(e){return!!(e=(e=e.data).dataTransfer.getData("text/html",!0)||e.dataValue)&&"libreoffice"===CKEDITOR.plugins.pastetools.getContentGeneratorName(e)},handle:function(t,n){var i=t.data,o=i.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(i,"text/html");i.dontFilter=!0,o=CKEDITOR.pasteFilters.image(o,e,CKEDITOR.plugins.pastetools.getClipboardData(i,"text/rtf")),i.dataValue=CKEDITOR.pasteFilters.libreoffice(o,e),!0===e.config.forcePasteAsPlainText&&(i.type="text"),n()}})}}}),CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(e){var t=0,n=CKEDITOR.plugins.getPath("pastetools"),i=this.path,o=void 0===e.config.pasteFromWord_inlineImages||e.config.pasteFromWord_inlineImages;n=[CKEDITOR.getUrl(n+"filter/common.js"),CKEDITOR.getUrl(n+"filter/image.js"),CKEDITOR.getUrl(i+"filter/default.js")],e.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(e,n){t=1,e.execCommand("paste",{type:"html",notification:!n||void 0===n.notification||n.notification})}}),CKEDITOR.plugins.clipboard.addPasteButton(e,"PasteFromWord",{label:e.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"}),e.pasteTools.register({filters:e.config.pasteFromWordCleanupFile?[e.config.pasteFromWordCleanupFile]:n,canHandle:function(e){e=CKEDITOR.plugins.pastetools.getClipboardData(e.data,"text/html");var n=(n=CKEDITOR.plugins.pastetools.getContentGeneratorName(e))?"microsoft"===n:/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/.test(e);return e&&(t||n)},handle:function(n,i){var a=n.data,r=CKEDITOR.plugins.pastetools.getClipboardData(a,"text/html"),s=CKEDITOR.plugins.pastetools.getClipboardData(a,"text/rtf");r={dataValue:r,dataTransfer:{"text/rtf":s}},(!1!==e.fire("pasteFromWord",r)||t)&&(a.dontFilter=!0,(t||!e.config.pasteFromWordPromptCleanup||confirm(e.lang.pastefromword.confirmCleanup))&&(r.dataValue=CKEDITOR.cleanWord(r.dataValue,e),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&o&&CKEDITOR.pasteFilters.image&&(r.dataValue=CKEDITOR.pasteFilters.image(r.dataValue,e,s)),e.fire("afterPasteFromWord",r),a.dataValue=r.dataValue,!0===e.config.forcePasteAsPlainText?a.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==e.config.forcePasteAsPlainText||(a.type="html")),t=0,i())}})}}),function(){function e(e){var t=CKEDITOR.plugins.getPath("preview"),n=e.config,i=e.lang.preview.preview,o=function(){var e=location.origin,t=location.pathname;return n.baseHref||CKEDITOR.env.gecko?n.baseHref?'<base href="{HREF}">'.replace("{HREF}",n.baseHref):((t=t.split("/")).pop(),t=t.join("/"),'<base href="{HREF}">'.replace("{HREF}",e+t+"/")):""}();return n.fullPage?e.getData().replace(/<head>/,"$&"+o).replace(/[^>]*(?=<\/title>)/,"$& — "+i):n.docType+'<html dir="'+n.contentsLangDirection+'"><head>'+o+"<title>"+i+"</title>"+CKEDITOR.tools.buildStyleHtml(n.contentsCss)+'<link rel="stylesheet" media="screen" href="'+t+'styles/screen.css"></head>'+function(){var t="<body>",n=e.document&&e.document.getBody();return n?(n.getAttribute("id")&&(t=t.replace(">",' id="'+n.getAttribute("id")+'">')),n.getAttribute("class")&&(t=t.replace(">",' class="'+n.getAttribute("class")+'">')),t):t}()+e.getData()+"</body></html>"}CKEDITOR.plugins.add("preview",{init:function(e){e.addCommand("preview",{modes:{wysiwyg:1},canUndo:!1,readOnly:1,exec:CKEDITOR.plugins.preview.createPreview}),e.ui.addButton&&e.ui.addButton("Preview",{label:e.lang.preview.preview,command:"preview",toolbar:"document,40"})}}),CKEDITOR.plugins.preview={createPreview:function(t){var n,i,o,a,r={dataValue:e(t)},s=window.screen;return n=Math.round(.8*s.width),i=Math.round(.7*s.height),o=Math.round(.1*s.width),s=CKEDITOR.env.ie?"javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad = null;})() )":null,a=CKEDITOR.plugins.getPath("preview"),a=CKEDITOR.env.gecko?CKEDITOR.getUrl(a+"preview.html"):"",!1!==t.fire("contentPreview",r)&&((s||a)&&(window._cke_htmlToLoad=r.dataValue),t=window.open(a,null,["toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes","width="+n,"height="+i,"left="+o].join()),s&&t&&(t.location=s),window._cke_htmlToLoad||((n=t.document).open(),n.write(r.dataValue),n.close()),new CKEDITOR.dom.window(t))}}}(),CKEDITOR.plugins.add("print",{requires:"preview",init:function(e){e.addCommand("print",CKEDITOR.plugins.print),e.ui.addButton&&e.ui.addButton("Print",{label:e.lang.print.toolbar,command:"print",toolbar:"document,50"})}}),CKEDITOR.plugins.print={exec:function(e){function t(){CKEDITOR.env.gecko?n.print():n.document.execCommand("Print"),n.close()}var n;if(e=CKEDITOR.plugins.preview.createPreview(e)){if("complete"===(n=e.$).document.readyState)return t();e.once("load",t)}},canUndo:!1,readOnly:1,modes:{wysiwyg:1}},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=new RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),i=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),o=CKEDITOR.plugins.removeformat.filter,a=e.getSelection().getRanges(),r=a.createIterator(),s=function(e){return e.type==CKEDITOR.NODE_ELEMENT};t=r.getNextRange();){t.enlarge(CKEDITOR.ENLARGE_INLINE);var l=t.createBookmark(),c=l.startNode,d=l.endNode,u=function(t){for(var i,a=e.elementPath(t),r=a.elements,s=1;(i=r[s])&&!i.equals(a.block)&&!i.equals(a.blockLimit);s++)n.test(i.getName())&&o(e,i)&&t.breakParent(i)};if(u(c),d)for(u(d),c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);c&&!c.equals(d);)if(c.isReadOnly()){if(c.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;c=c.getNext(s)}else u=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==c.getName()&&c.data("cke-realelement")||!o(e,c)||(n.test(c.getName())?c.remove(1):(c.removeAttributes(i),e.fire("removeFormatCleanup",c))),c=u;t.moveToBookmark(l)}e.forceNextSelectionCheck(),e.getSelection().selectRanges(a)}}},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,cite,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(){var e={readOnly:1,modes:{wysiwyg:1,source:1},exec:function(e){if(e.fire("save")&&(e=e.element.$.form))try{e.submit()}catch(t){e.submit.click&&e.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(t){t.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(t.addCommand("save",e).startDisabled=!t.element.$.form,t.ui.addButton&&t.ui.addButton("Save",{label:t.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})}(),CKEDITOR.plugins.add("selectall",{init:function(e){e.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(e){var t=e.editable();if(t.is("textarea"))e=t.$,CKEDITOR.env.ie&&e.createTextRange?e.createTextRange().execCommand("SelectAll"):(e.selectionStart=0,e.selectionEnd=e.value.length),e.focus();else{if(t.is("body"))e.document.$.execCommand("SelectAll",!1,null);else{var n=e.createRange();n.selectNodeContents(t),n.select()}e.forceNextSelectionCheck(),e.selectionChange()}},canUndo:!1}),e.ui.addButton&&e.ui.addButton("SelectAll",{label:e.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}}),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(){var e,t,n,i,o,a,r="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),s=CKEDITOR.getUrl(this.path),l=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),c=l?":not([contenteditable=false]):not(.cke_show_blocks_off)":"";for(e=t=n=i="";o=r.pop();)e+=".cke_show_blocks "+o+c+(a=r.length?",":""),n+=".cke_show_blocks.cke_contents_ltr "+o+c+a,i+=".cke_show_blocks.cke_contents_rtl "+o+c+a,t+=".cke_show_blocks "+o+c+"{background-image:url("+CKEDITOR.getUrl(s+"images/block_"+o+".png")+")}";CKEDITOR.addCss((e+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(t,n+"{background-position:top left;padding-left:8px}",i+"{background-position:top right;padding-right:8px}")),l||CKEDITOR.addCss(".cke_show_blocks [contenteditable=false],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable=false],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable=false],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},init:function(t){function n(){i.refresh(t)}if(!t.blockless){var i=t.addCommand("showblocks",e);i.canUndo=!1,t.config.startupOutlineBlocks&&i.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(){i.state!=CKEDITOR.TRISTATE_DISABLED&&i.refresh(t)})),t.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(t.on("focus",n),t.on("blur",n)),t.on("contentDom",(function(){i.state!=CKEDITOR.TRISTATE_DISABLED&&i.refresh(t)}))}}})}(),function(){var e={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(t){var n=t.addCommand("showborders",e);n.canUndo=!1,!1!==t.config.startupShowBorders&&n.setState(CKEDITOR.TRISTATE_ON),t.on("mode",(function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)}),null,null,100),t.on("contentDom",(function(){n.state!=CKEDITOR.TRISTATE_DISABLED&&n.refresh(t)})),t.on("removeFormatCleanup",(function(e){e=e.data,t.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||0>=parseInt(e.getAttribute("border"),10))&&e.addClass("cke_show_border")}))},afterInit:function(e){var t=e.dataProcessor;e=t&&t.dataFilter,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(){CKEDITOR.plugins.add("sourcearea",{init:function(t){function n(){var e=o&&this.equals(CKEDITOR.document.getActive());this.hide(),this.setStyle("height",this.getParent().$.clientHeight+"px"),this.setStyle("width",this.getParent().$.clientWidth+"px"),this.show(),e&&this.focus()}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").addClass("cke_reset").addClass("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 o=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e),this.status="ready",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:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu: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,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh: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("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",onLoad:function(e){"moono-lisa"==(CKEDITOR.skinName||e.config.skin)&&CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css")),CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"dialogs/dialog.css"));var t=!1;CKEDITOR.on("instanceLoaded",(function(e){if(!t&&CKEDITOR.plugins.autocomplete){t=!0;var n=CKEDITOR.plugins.autocomplete.prototype.getModel;CKEDITOR.plugins.autocomplete.prototype.getModel=function(e){var t=this.editor;return(e=n.bind(this)(e)).on("change-isActive",(function(e){e.data?t.fire("autocompletePanelShow"):t.fire("autocompletePanelHide")})),e}}}))},init:function(e){var t=this,n=CKEDITOR.plugins.scayt;this.bindEvents(e),this.parseConfig(e),this.addRule(e),CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js")),this.addMenuItems(e);var i=e.lang.scayt,o=CKEDITOR.env;e.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:i.text_title,title:e.plugins.wsc?e.lang.wsc.title:i.text_title,modes:{wysiwyg:!(o.ie&&(8>o.version||o.quirks))},toolbar:"spellchecker,20",refresh:function(){var t=e.ui.instances.Scayt.getState();e.scayt&&(t=n.state.scayt[e.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),e.fire("scaytButtonState",t)},onRender:function(){var t=this;e.on("scaytButtonState",(function(e){void 0!==typeof e.data&&t.setState(e.data)}))},onMenu:function(){var t=e.scayt;e.getMenuItem("scaytToggle").label=e.lang.scayt[t&&n.state.scayt[e.name]?"btn_disable":"btn_enable"];var i={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:t?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:e.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};return e.config.scayt_uiTabs[0]||delete i.scaytOptions,e.config.scayt_uiTabs[1]||delete i.scaytLangs,e.config.scayt_uiTabs[2]||delete i.scaytDict,t&&!CKEDITOR.plugins.scayt.isNewUdSupported(t)&&(delete i.scaytDict,e.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage()),i}}),e.contextMenu&&e.addMenuItems&&(e.contextMenu.addListener((function(n,i){var o,a,r=e.scayt;return r&&(a=r.getSelectionNode())&&(o=t.menuGenerator(e,a),r.showBanner("."+e.contextMenu._.definition.panel.className.split(" ").join(" ."))),o})),e.contextMenu._.onHide=CKEDITOR.tools.override(e.contextMenu._.onHide,(function(t){return function(){var n=e.scayt;return n&&n.hideBanner(),t.apply(this)}})))},addMenuItems:function(e){var t=this,n=CKEDITOR.plugins.scayt;e.addMenuGroup("scaytButton");for(var i=e.config.scayt_contextMenuItemsOrder.split("|"),o=0;o<i.length;o++)i[o]="scayt_"+i[o];if((i=["grayt_description","grayt_suggest","grayt_control"].concat(i))&&i.length)for(o=0;o<i.length;o++)e.addMenuGroup(i[o],o-10);e.addCommand("scaytToggle",{exec:function(e){var t=e.scayt;n.state.scayt[e.name]=!n.state.scayt[e.name],!0===n.state.scayt[e.name]?t||n.createScayt(e):t&&n.destroy(e)}}),e.addCommand("scaytAbout",{exec:function(e){e.scayt.tabToOpen="about",n.openDialog(t.dialogName,e)}}),e.addCommand("scaytOptions",{exec:function(e){e.scayt.tabToOpen="options",n.openDialog(t.dialogName,e)}}),e.addCommand("scaytLangs",{exec:function(e){e.scayt.tabToOpen="langs",n.openDialog(t.dialogName,e)}}),e.addCommand("scaytDict",{exec:function(e){e.scayt.tabToOpen="dictionaries",n.openDialog(t.dialogName,e)}}),i={scaytToggle:{label:e.lang.scayt.btn_enable,group:"scaytButton",command:"scaytToggle"},scaytAbout:{label:e.lang.scayt.btn_about,group:"scaytButton",command:"scaytAbout"},scaytOptions:{label:e.lang.scayt.btn_options,group:"scaytButton",command:"scaytOptions"},scaytLangs:{label:e.lang.scayt.btn_langs,group:"scaytButton",command:"scaytLangs"},scaytDict:{label:e.lang.scayt.btn_dictionaries,group:"scaytButton",command:"scaytDict"}},e.plugins.wsc&&(i.WSC={label:e.lang.wsc.toolbar,group:"scaytButton",onClick:function(){var t=CKEDITOR.plugins.scayt,n=e.scayt,i=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?e.container.getText():e.document.getBody().getText();(i=i.replace(/\s/g,""))?(n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!0),e.lockSelection(),e.execCommand("checkspell")):alert("Nothing to check!")}}),e.addMenuItems(i)},bindEvents:function(e){var t=CKEDITOR.plugins.scayt,n=e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE,i=function(){t.destroy(e)},o=function(){!t.state.scayt[e.name]||e.readOnly||e.scayt||t.createScayt(e)},a=function(){n?e.config.scayt_inlineModeImmediateMarkup?o():(e.on("blur",(function(){setTimeout(i,0)})),e.on("focus",o),e.focusManager.hasFocus&&o()):o(),function(){var t=e.editable();t.attachListener(t,"focus",(function(t){var i,a;if(CKEDITOR.plugins.scayt&&!e.scayt&&setTimeout(o,0),t=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[e.name]&&e.scayt,(n||t)&&e._.savedSelection){t=!(t=e._.savedSelection.getSelectedElement())&&e._.savedSelection.getRanges();for(var r=0;r<t.length;r++)"string"==typeof(a=t[r]).startContainer.$.nodeValue&&(((i=a.startContainer.getText().length)<a.startOffset||i<a.endOffset)&&e.unlockSelection(!1))}}),this,null,-10)}();var t=e.editable();t.attachListener(t,"mousedown",(function(t){t=t.data.getTarget();var n=e.widgets&&e.widgets.getByElement(t);n&&(n.wrapper=t.getAscendant((function(e){return e.hasAttribute("data-cke-widget-wrapper")}),!0))}),this,null,-10)};e.on("contentDom",a),e.on("beforeCommandExec",(function(n){var i=e.scayt,o=!1,a=!1,r=!0;n.data.name in t.options.disablingCommandExec&&"wysiwyg"==e.mode?i&&(t.destroy(e),e.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)):"bold"!==n.data.name&&"italic"!==n.data.name&&"underline"!==n.data.name&&"strike"!==n.data.name&&"subscript"!==n.data.name&&"superscript"!==n.data.name&&"enter"!==n.data.name&&"cut"!==n.data.name&&"language"!==n.data.name||!i||("cut"===n.data.name&&(r=!1,a=!0),"language"===n.data.name&&(a=o=!0),e.fire("reloadMarkupScayt",{removeOptions:{removeInside:r,forceBookmark:a,language:o},timeout:0}))})),e.on("beforeSetMode",(function(n){"source"==n.data&&((n=e.scayt)&&(t.destroy(e),e.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)),e.document&&e.document.getBody().removeAttribute("_jquid"))})),e.on("afterCommandExec",(function(n){"wysiwyg"!=e.mode||"undo"!=n.data.name&&"redo"!=n.data.name||setTimeout((function(){t.reloadMarkup(e.scayt)}),250)})),e.on("readOnly",(function(n){var i;n&&(i=e.scayt,!0===n.editor.readOnly?i&&i.fire("removeMarkupInDocument",{}):i?t.reloadMarkup(i):"wysiwyg"==n.editor.mode&&!0===t.state.scayt[n.editor.name]&&(t.createScayt(e),n.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)))})),e.on("beforeDestroy",i),e.on("setData",(function(){i(),(e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE||e.plugins.divarea)&&a()}),this,null,50),e.on("reloadMarkupScayt",(function(n){var i=n.data&&n.data.removeOptions,o=n.data&&n.data.timeout,a=n.data&&n.data.language,r=e.scayt;r&&setTimeout((function(){a&&(i.selectionNode=e.plugins.language.getCurrentLangElement(e),i.selectionNode=i.selectionNode&&i.selectionNode.$||null),r.removeMarkupInSelectionNode(i),t.reloadMarkup(r)}),o||0)})),e.on("insertElement",(function(){e.fire("reloadMarkupScayt",{removeOptions:{forceBookmark:!0}})}),this,null,50),e.on("insertHtml",(function(){e.scayt&&e.scayt.setFocused&&e.scayt.setFocused(!0),e.fire("reloadMarkupScayt")}),this,null,50),e.on("insertText",(function(){e.scayt&&e.scayt.setFocused&&e.scayt.setFocused(!0),e.fire("reloadMarkupScayt")}),this,null,50),e.on("scaytDialogShown",(function(t){t.data.selectPage(e.scayt.tabToOpen)})),e.on("autocompletePanelShow",(function(t){(t=e.scayt)&&t.setMarkupPaused&&t.setMarkupPaused(!0)})),e.on("autocompletePanelHide",(function(t){(t=e.scayt)&&t.setMarkupPaused&&t.setMarkupPaused(!1)}))},parseConfig:function(e){if((i=CKEDITOR.plugins.scayt).replaceOldOptionsNames(e.config),"boolean"!=typeof e.config.scayt_autoStartup&&(e.config.scayt_autoStartup=!1),i.state.scayt[e.name]=e.config.scayt_autoStartup,"boolean"!=typeof e.config.grayt_autoStartup&&(e.config.grayt_autoStartup=!1),"boolean"!=typeof e.config.scayt_inlineModeImmediateMarkup&&(e.config.scayt_inlineModeImmediateMarkup=!1),i.state.grayt[e.name]=e.config.grayt_autoStartup,e.config.scayt_contextCommands||(e.config.scayt_contextCommands="ignoreall|add"),e.config.scayt_contextMenuItemsOrder||(e.config.scayt_contextMenuItemsOrder="suggest|moresuggest|control"),e.config.scayt_sLang||(e.config.scayt_sLang="en_US"),(void 0===e.config.scayt_maxSuggestions||"number"!=typeof e.config.scayt_maxSuggestions||0>e.config.scayt_maxSuggestions)&&(e.config.scayt_maxSuggestions=3),(void 0===e.config.scayt_minWordLength||"number"!=typeof e.config.scayt_minWordLength||1>e.config.scayt_minWordLength)&&(e.config.scayt_minWordLength=3),void 0!==e.config.scayt_customDictionaryIds&&"string"==typeof e.config.scayt_customDictionaryIds||(e.config.scayt_customDictionaryIds=""),void 0!==e.config.scayt_userDictionaryName&&"string"==typeof e.config.scayt_userDictionaryName||(e.config.scayt_userDictionaryName=null),"string"==typeof e.config.scayt_uiTabs&&3===e.config.scayt_uiTabs.split(",").length){var t=[],n=[];e.config.scayt_uiTabs=e.config.scayt_uiTabs.split(","),CKEDITOR.tools.search(e.config.scayt_uiTabs,(function(e){1===Number(e)||0===Number(e)?(n.push(!0),t.push(Number(e))):n.push(!1)})),null===CKEDITOR.tools.search(n,!1)?e.config.scayt_uiTabs=t:e.config.scayt_uiTabs=[1,1,1]}else e.config.scayt_uiTabs=[1,1,1];if("string"!=typeof e.config.scayt_serviceProtocol&&(e.config.scayt_serviceProtocol=null),"string"!=typeof e.config.scayt_serviceHost&&(e.config.scayt_serviceHost=null),"string"!=typeof e.config.scayt_servicePort&&(e.config.scayt_servicePort=null),"string"!=typeof e.config.scayt_servicePath&&(e.config.scayt_servicePath=null),e.config.scayt_moreSuggestions||(e.config.scayt_moreSuggestions="on"),"string"!=typeof e.config.scayt_customerId&&(e.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2"),"string"!=typeof e.config.scayt_customPunctuation&&(e.config.scayt_customPunctuation="-"),"string"!=typeof e.config.scayt_srcUrl&&(i=-1!=(i=document.location.protocol).search(/https?:/)?i:"http:",e.config.scayt_srcUrl=i+"//svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js"),"boolean"!=typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0),"boolean"!=typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0),CKEDITOR.config.scayt_handleUndoRedo=!!CKEDITOR.plugins.undo&&CKEDITOR.config.scayt_handleUndoRedo,e.config.scayt_ignoreAllCapsWords&&"boolean"!=typeof e.config.scayt_ignoreAllCapsWords&&(e.config.scayt_ignoreAllCapsWords=!1),e.config.scayt_ignoreDomainNames&&"boolean"!=typeof e.config.scayt_ignoreDomainNames&&(e.config.scayt_ignoreDomainNames=!1),e.config.scayt_ignoreWordsWithMixedCases&&"boolean"!=typeof e.config.scayt_ignoreWordsWithMixedCases&&(e.config.scayt_ignoreWordsWithMixedCases=!1),e.config.scayt_ignoreWordsWithNumbers&&"boolean"!=typeof e.config.scayt_ignoreWordsWithNumbers&&(e.config.scayt_ignoreWordsWithNumbers=!1),e.config.scayt_disableOptionsStorage){var i=CKEDITOR.tools.isArray(e.config.scayt_disableOptionsStorage)?e.config.scayt_disableOptionsStorage:"string"==typeof e.config.scayt_disableOptionsStorage?[e.config.scayt_disableOptionsStorage]:void 0,o="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),a=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],r=CKEDITOR.tools.search,s=CKEDITOR.tools.indexOf;e.config.scayt_disableOptionsStorage=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n],l=!!r(e,"options");if(!r(o,i)||l&&r(a,(function(e){if("lang"===e)return!1})))return;if(r(a,i)&&a.splice(s(a,i),1),"all"===i||l&&r(e,"lang"))return[];"options"===i&&(a=["lang"])}return t.concat(a)}(i)}},addRule:function(e){var t=CKEDITOR.plugins.scayt,n=(o=e.dataProcessor)&&o.htmlFilter,i=e._.elementsPath&&e._.elementsPath.filters,o=o&&o.dataFilter,a=e.addRemoveFormatFilter;i&&i.push((function(n){if(e.scayt&&(n.hasAttribute(t.options.data_attribute_name)||n.hasAttribute(t.options.problem_grammar_data_attribute)))return!1})),o&&o.addRules({elements:{span:function(e){var n=e.hasClass(t.options.misspelled_word_class)&&e.attributes[t.options.data_attribute_name],i=e.hasClass(t.options.problem_grammar_class)&&e.attributes[t.options.problem_grammar_data_attribute];return t&&(n||i)&&delete e.name,e}}}),n&&n.addRules({elements:{span:function(e){var n=e.hasClass(t.options.misspelled_word_class)&&e.attributes[t.options.data_attribute_name],i=e.hasClass(t.options.problem_grammar_class)&&e.attributes[t.options.problem_grammar_data_attribute];return t&&(n||i)&&delete e.name,e}}}),a&&a.call(e,(function(n){var i=!0;return e.scayt&&(n.hasAttribute(t.options.data_attribute_name)||n.hasAttribute(t.options.problem_grammar_data_attribute))&&(i=!1),i}))},scaytMenuDefinition:function(e){var t=this,n=CKEDITOR.plugins.scayt;return{scayt:{scayt_ignore:{label:(e=e.scayt).getLocal("btn_ignore"),group:"scayt_control",order:1,exec:function(e){e.scayt.ignoreWord()}},scayt_ignoreall:{label:e.getLocal("btn_ignoreAll"),group:"scayt_control",order:2,exec:function(e){e.scayt.ignoreAllWords()}},scayt_add:{label:e.getLocal("btn_addWord"),group:"scayt_control",order:3,exec:function(e){var t=e.scayt;setTimeout((function(){t.addWordToUserDictionary()}),10)}},scayt_option:{label:e.getLocal("btn_options"),group:"scayt_control",order:4,exec:function(e){e.scayt.tabToOpen="options",n.openDialog(t.dialogName,e)},verification:function(e){return 1==e.config.scayt_uiTabs[0]}},scayt_language:{label:e.getLocal("btn_langs"),group:"scayt_control",order:5,exec:function(e){e.scayt.tabToOpen="langs",n.openDialog(t.dialogName,e)},verification:function(e){return 1==e.config.scayt_uiTabs[1]}},scayt_dictionary:{label:e.getLocal("btn_dictionaries"),group:"scayt_control",order:6,exec:function(e){e.scayt.tabToOpen="dictionaries",n.openDialog(t.dialogName,e)},verification:function(e){return 1==e.config.scayt_uiTabs[2]}},scayt_about:{label:e.getLocal("btn_about"),group:"scayt_control",order:7,exec:function(e){e.scayt.tabToOpen="about",n.openDialog(t.dialogName,e)}}},grayt:{grayt_problemdescription:{label:"Grammar problem description",group:"grayt_description",order:1,state:CKEDITOR.TRISTATE_DISABLED,exec:function(e){}},grayt_ignore:{label:e.getLocal("btn_ignore"),group:"grayt_control",order:2,exec:function(e){e.scayt.ignorePhrase()}},grayt_ignoreall:{label:e.getLocal("btn_ignoreAll"),group:"grayt_control",order:3,exec:function(e){e.scayt.ignoreAllPhrases()}}}}},buildSuggestionMenuItems:function(e,t,n){var i={},o={},a=n?"word":"phrase",r=n?"startGrammarCheck":"startSpellCheck",s=e.scayt;if(0<t.length&&"no_any_suggestions"!==t[0])if(n)for(n=0;n<t.length;n++){var l="scayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[n].replace(" ","_");e.addCommand(l,this.createCommand(CKEDITOR.plugins.scayt.suggestions[n],a,r)),n<e.config.scayt_maxSuggestions?(e.addMenuItem(l,{label:t[n],command:l,group:"scayt_suggest",order:n+1}),i[l]=CKEDITOR.TRISTATE_OFF):(e.addMenuItem(l,{label:t[n],command:l,group:"scayt_moresuggest",order:n+1}),o[l]=CKEDITOR.TRISTATE_OFF,"on"===e.config.scayt_moreSuggestions&&(e.addMenuItem("scayt_moresuggest",{label:s.getLocal("btn_moreSuggestions"),group:"scayt_moresuggest",order:10,getItems:function(){return o}}),i.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(n=0;n<t.length;n++)l="grayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[n].replace(" ","_"),e.addCommand(l,this.createCommand(CKEDITOR.plugins.scayt.suggestions[n],a,r)),e.addMenuItem(l,{label:t[n],command:l,group:"grayt_suggest",order:n+1}),i[l]=CKEDITOR.TRISTATE_OFF;else i.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,e.addCommand("no_scayt_suggest",{exec:function(){}}),e.addMenuItem("no_scayt_suggest",{label:s.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0});return i},menuGenerator:function(e,t){var n,i,o,a,r=e.scayt,s=this.scaytMenuDefinition(e),l={},c=e.config.scayt_contextCommands.split("|"),d=t.getAttribute(r.getLangAttribute())||r.getLang();if(i=r.isScaytNode(t),o=r.isGraytNode(t),i?(s=s.scayt,n=t.getAttribute(r.getScaytNodeAttributeName()),r.fire("getSuggestionsList",{lang:d,word:n}),l=this.buildSuggestionMenuItems(e,CKEDITOR.plugins.scayt.suggestions,i)):o&&(s=s.grayt,l=t.getAttribute(r.getGraytNodeAttributeName()),r.getGraytNodeRuleAttributeName?(n=t.getAttribute(r.getGraytNodeRuleAttributeName()),r.getProblemDescriptionText(l,n,d)):r.getProblemDescriptionText(l,d),a=r.getProblemDescriptionText(l,n,d),s.grayt_problemdescription&&a&&(a=a.replace(/([.!?])\s/g,"$1<br>"),s.grayt_problemdescription.label=a),r.fire("getGrammarSuggestionsList",{lang:d,phrase:l,rule:n}),l=this.buildSuggestionMenuItems(e,CKEDITOR.plugins.scayt.suggestions,i)),i&&"off"==e.config.scayt_contextCommands)return l;for(var u in s)i&&-1==CKEDITOR.tools.indexOf(c,u.replace("scayt_",""))&&"all"!=e.config.scayt_contextCommands||o&&"grayt_problemdescription"!==u&&-1==CKEDITOR.tools.indexOf(c,u.replace("grayt_",""))&&"all"!=e.config.scayt_contextCommands||(l[u]=void 0!==s[u].state?s[u].state:CKEDITOR.TRISTATE_OFF,"function"!=typeof s[u].verification||s[u].verification(e)||delete l[u],e.addCommand(u,{exec:s[u].exec}),e.addMenuItem(u,{label:e.lang.scayt[s[u].label]||s[u].label,command:u,group:s[u].group,order:s[u].order}));return l},createCommand:function(e,t,n){return{exec:function(i){i=i.scayt;var o={};o[t]=e,i.replaceSelectionNode(o),"startGrammarCheck"===n&&i.removeMarkupInSelectionNode({grammarOnly:!0}),i.fire(n)}}}}),CKEDITOR.plugins.scayt={charsToObserve:[{charName:"cke-fillingChar",charCode:function(){var e,t,n=CKEDITOR.version,i=[4,5,6],o=String.fromCharCode(8203),a=Array(8).join(o);if(!n)return o;n=n.split(".");for(var r=0;r<i.length;r++){if(e=i[r],(t=Number(n[r]))>e)return a;if(t<e)break}return o}()}],state:{scayt:{},grayt:{}},warningCounter:0,suggestions:[],options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:"data-scayt-word",misspelled_word_class:"scayt-misspell-word",problem_grammar_data_attribute:"data-grayt-phrase",problem_grammar_class:"gramm-problem"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},openDialog:function(e,t){var n=t.scayt;n.isAllModulesReady&&!1===n.isAllModulesReady()||(t.lockSelection(),t.openDialog(e))},alarmCompatibilityMessage:function(){5>this.warningCounter&&(console.warn("You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at support@webspellchecker.net."),this.warningCounter+=1)},isNewUdSupported:function(e){return!!e.getUserDictionary},reloadMarkup:function(e){var t;e&&(t=e.getScaytLangList(),e.reloadMarkup?e.reloadMarkup():(this.alarmCompatibilityMessage(),t&&t.ltr&&t.rtl&&e.fire("startSpellCheck, startGrammarCheck")))},replaceOldOptionsNames:function(e){for(var t in e)t in this.backCompatibilityMap&&(e[this.backCompatibilityMap[t]]=e[t],delete e[t])},createScayt:function(e){var t=this,n=CKEDITOR.plugins.scayt;this.loadScaytLibrary(e,(function(e){function i(e){return new SCAYT.CKSCAYT(e,(function(){}),(function(){}))}var o;if(e.window&&(o="BODY"==e.editable().$.nodeName?e.window.getFrame():e.editable()),o){var a;o={lang:e.config.scayt_sLang,container:o.$,customDictionary:e.config.scayt_customDictionaryIds,userDictionaryName:e.config.scayt_userDictionaryName,localization:e.langCode,customer_id:e.config.scayt_customerId,customPunctuation:e.config.scayt_customPunctuation,debug:e.config.scayt_debug,data_attribute_name:t.options.data_attribute_name,misspelled_word_class:t.options.misspelled_word_class,problem_grammar_data_attribute:t.options.problem_grammar_data_attribute,problem_grammar_class:t.options.problem_grammar_class,"options-to-restore":e.config.scayt_disableOptionsStorage,focused:e.editable().hasFocus,ignoreElementsRegex:e.config.scayt_elementsToIgnore,ignoreGraytElementsRegex:e.config.grayt_elementsToIgnore,minWordLength:e.config.scayt_minWordLength,graytAutoStartup:e.config.grayt_autoStartup,charsToObserve:n.charsToObserve},e.config.scayt_serviceProtocol&&(o.service_protocol=e.config.scayt_serviceProtocol),e.config.scayt_serviceHost&&(o.service_host=e.config.scayt_serviceHost),e.config.scayt_servicePort&&(o.service_port=e.config.scayt_servicePort),e.config.scayt_servicePath&&(o.service_path=e.config.scayt_servicePath),"boolean"==typeof e.config.scayt_ignoreAllCapsWords&&(o["ignore-all-caps-words"]=e.config.scayt_ignoreAllCapsWords),"boolean"==typeof e.config.scayt_ignoreDomainNames&&(o["ignore-domain-names"]=e.config.scayt_ignoreDomainNames),"boolean"==typeof e.config.scayt_ignoreWordsWithMixedCases&&(o["ignore-words-with-mixed-cases"]=e.config.scayt_ignoreWordsWithMixedCases),"boolean"==typeof e.config.scayt_ignoreWordsWithNumbers&&(o["ignore-words-with-numbers"]=e.config.scayt_ignoreWordsWithNumbers);try{a=i(o)}catch(e){t.alarmCompatibilityMessage(),delete o.charsToObserve,a=i(o)}a.subscribe("suggestionListSend",(function(e){for(var t={},n=[],i=0;i<e.suggestionList.length;i++)t["word_"+e.suggestionList[i]]||(t["word_"+e.suggestionList[i]]=e.suggestionList[i],n.push(e.suggestionList[i]));CKEDITOR.plugins.scayt.suggestions=n})),a.subscribe("selectionIsChanged",(function(t){e.getSelection().isLocked&&"restoreSelection"!==t.action&&e.lockSelection(),"restoreSelection"===t.action&&e.selectionChange(!0)})),a.subscribe("graytStateChanged",(function(t){n.state.grayt[e.name]=t.state})),a.addMarkupHandler&&a.addMarkupHandler((function(t){var n=e.editable(),i=n.getCustomData(t.charName);i&&(i.$=t.node,n.setCustomData(t.charName,i))})),e.scayt=a,e.fire("scaytButtonState",e.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)}else n.state.scayt[e.name]=!1}))},destroy:function(e){e.scayt&&e.scayt.destroy(),delete e.scayt,e.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(e,t){var n,i=function(){CKEDITOR.fireOnce("scaytReady"),e.scayt||"function"==typeof t&&t(e)};void 0===window.SCAYT||"function"!=typeof window.SCAYT.CKSCAYT?(n=e.config.scayt_srcUrl,CKEDITOR.scriptLoader.load(n,(function(e){e&&i()}))):window.SCAYT&&"function"==typeof window.SCAYT.CKSCAYT&&i()}},CKEDITOR.on("dialogDefinition",(function(e){var t=e.data.name;e=e.data.definition.dialog,"scaytDialog"!==t&&"checkspell"!==t&&(e.on("show",(function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!0)})),e.on("hide",(function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!1)}))),"scaytDialog"===t&&e.on("cancel",(function(e){return!1}),this,null,-1),"checkspell"===t&&e.on("cancel",(function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;n&&t.state.scayt[e.name]&&n.setMarkupPaused&&n.setMarkupPaused(!1),e.unlockSelection()}),this,null,-2),"link"===t&&e.on("ok",(function(e){var t=e.sender&&e.sender.getParentEditor();t&&setTimeout((function(){t.fire("reloadMarkupScayt",{removeOptions:{removeInside:!0,forceBookmark:!0},timeout:0})}),0)})),"replace"===t&&e.on("hide",(function(e){e=e.sender&&e.sender.getParentEditor();var t=CKEDITOR.plugins.scayt,n=e.scayt;e&&setTimeout((function(){n&&(n.fire("removeMarkupInDocument",{}),t.reloadMarkup(n))}),0)}))})),CKEDITOR.on("scaytReady",(function(){!0===CKEDITOR.config.scayt_handleCheckDirty&&((e=CKEDITOR.editor.prototype).checkDirty=CKEDITOR.tools.override(e.checkDirty,(function(e){return function(){var t=null,n=this.scayt;if(CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt){if(t="ready"==this.status){var i=n.removeMarkupFromString(this.getSnapshot());n=n.removeMarkupFromString(this._.previousValue),t=t&&n!==i}}else t=e.call(this);return t}})),e.resetDirty=CKEDITOR.tools.override(e.resetDirty,(function(e){return function(){var t=this.scayt;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=t.removeMarkupFromString(this.getSnapshot()):e.call(this)}})));if(!0===CKEDITOR.config.scayt_handleUndoRedo){var e,t="function"==typeof(e=CKEDITOR.plugins.undo.Image.prototype).equalsContent?"equalsContent":"equals";e[t]=CKEDITOR.tools.override(e[t],(function(e){return function(t){var n=t.editor.scayt,i=this.contents,o=t.contents,a=null;return CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[t.editor.name]&&t.editor.scayt&&(this.contents=n.removeMarkupFromString(i)||"",t.contents=n.removeMarkupFromString(o)||""),a=e.apply(this,arguments),this.contents=i,t.contents=o,a}}))}})),CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(e){var t=e.config,n=e.lang.stylescombo,i={},o=[],a=[];e.on("stylesSet",(function(n){if(n=n.data.styles){for(var r,s,l,c=0,d=n.length;c<d;c++)r=n[c],e.blockless&&r.element in CKEDITOR.dtd.$block||"string"==typeof r.type&&!CKEDITOR.style.customHandlers[r.type]||(s=r.name,r=new CKEDITOR.style(r),e.filter.customConfig&&!e.filter.check(r))||(r._name=s,r._.enterMode=t.enterMode,r._.type=l=r.assignedTo||r.type,r._.weight=c+1e3*(l==CKEDITOR.STYLE_OBJECT?1:l==CKEDITOR.STYLE_BLOCK?2:3),i[s]=r,o.push(r),a.push(r));o.sort((function(e,t){return e._.weight-t._.weight}))}})),e.on("stylesRemove",(function(t){var n,o=void 0===(t=t.data&&t.data.type);for(n in i){var a=i[n];(o||a.type===t)&&e.removeStyle(a)}})),e.ui.addRichCombo("Styles",{label:n.label,title:n.panelTitle,toolbar:"styles,10",allowedContent:a,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(t.contentsCss),multiSelect:!0,attributes:{"aria-label":n.panelTitle}},init:function(){var e,t,i,a,r,s;for(r=0,s=o.length;r<s;r++)t=(e=o[r])._name,(a=e._.type)!=i&&(this.startGroup(n["panelTitle"+String(a)]),i=a),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();t.group&&t.removeStylesFromSameGroup(e)?e.applyStyle(t):e[t.checkActive(n,e)?"removeStyle":"applyStyle"](t),e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",(function(t){for(var n,o=this.getValue(),a=0,r=(t=t.data.path.elements).length;a<r;a++)for(var s in n=t[a],i)if(i[s].checkElementRemovable(n,!0,e))return void(s!=o&&this.setValue(s));this.setValue("")}),this)},onOpen:function(){var t=(t=e.getSelection()).getSelectedElement()||t.getStartElement()||e.editable(),o=(t=e.elementPath(t),[0,0,0,0]);for(var a in this.showAll(),this.unmarkAll(),i){var r=i[a],s=r._.type;r.checkApplicable(t,e,e.activeFilter)?o[s]++:this.hideItem(a),r.checkActive(t,e)&&this.mark(a)}o[CKEDITOR.STYLE_BLOCK]||this.hideGroup(n["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]),o[CKEDITOR.STYLE_INLINE]||this.hideGroup(n["panelTitle"+String(CKEDITOR.STYLE_INLINE)]),o[CKEDITOR.STYLE_OBJECT]||this.hideGroup(n["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var t=e.elementPath();if(t){for(var n in i)if(i[n].checkApplicable(t,e,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)){i=t.createRange();if((a=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(!a)return!0;a=new CKEDITOR.dom.element(a),i.moveToElementEditStart(a),i.checkStartOfBlock()&&i.checkEndOfBlock()||i.selectNodeContents(a)}else{for(var o=n.getAscendant("table").$,a=n.getParent().$.cells,r=(o=new CKEDITOR.dom.element(o.insertRow(-1),t.document),0),s=a.length;r<s;r++)o.append(new CKEDITOR.dom.element(a[r],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 a=!1!==o.config.enableTabKeyTools,r=o.config.tabSpaces||0,s="";r--;)s+=" ";s&&o.on("key",(function(e){9==e.data.keyCode&&(o.insertText(s),e.cancel())})),a&&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,a,r,s,l=void 0===t?this.getTabIndex():t;if(0>=l)for(r=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);r;){if(r.isVisible()&&0===r.getTabIndex()){o=r;break}r=r.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(r=this.getDocument().getBody().getFirst();r=r.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!n)if(!i&&r.equals(this)){if(i=!0,e){if(!(r=r.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;n=1}}else i&&!this.contains(r)&&(n=1);if(r.isVisible()&&!(0>(s=r.getTabIndex()))){if(n&&s==l){o=r;break}s>l&&(!o||!a||s<a)?(o=r,a=s):o||0!==s||(o=r,a=s)}}o&&o.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,t){for(var n,i,o,a,r=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>(a=l.getTabIndex())))if(0>=r){if(n&&0===a){o=l;break}a>s&&(o=l,s=a)}else{if(n&&a==r){o=l;break}a<r&&(!o||a>s)&&(o=l,s=a)}}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,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(e){if(e.styles){var t;if(e.styles.border)t=CKEDITOR.tools.style.parse.border(e.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var n=e.styles;n["border-left"]&&n["border-left"]===n["border-right"]&&n["border-right"]===n["border-top"]&&n["border-top"]===n["border-bottom"]&&(t=CKEDITOR.tools.style.parse.border(n["border-top"]))}t&&t.style&&"solid"===t.style&&t.width&&0!==parseFloat(t.width)&&(e.attributes.border=1),"collapse"==e.styles["border-collapse"]&&(e.attributes.cellspacing=0)}}}]]})),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(),i=e.editable();1!=n.getChildCount()||n.is("td","th")||n.equals(i)||(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,t){function n(e){return!t||t.contains(e)&&e.getAscendant("table",!0).equals(t)}function i(e){0<o.length||e.type!=CKEDITOR.NODE_ELEMENT||!/^(?:td|th)$/.test(e.getName())||e.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(a,e,"selected_cell",!0),o.push(e))}var o=[],a={};if(!e)return o;for(var r=e.getRanges(),s=0;s<r.length;s++){var l,c;if((l=r[s]).collapsed)(l=l.getCommonAncestor().getAscendant({td:1,th:1},!0))&&n(l)&&o.push(l);else for((l=new CKEDITOR.dom.walker(l)).guard=i;c=l.next();)c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.table)||(c=c.getAscendant({td:1,th:1},!0))&&!c.getCustomData("selected_cell")&&n(c)&&(CKEDITOR.dom.element.setMarker(a,c,"selected_cell",!0),o.push(c))}return CKEDITOR.dom.element.clearAllMarkers(a),o}function t(t,n){var i=(o=(s=u(t)?t:e(t))[0]).getAscendant("table"),o=o.getDocument(),a=(l=s[0].getParent()).$.rowIndex,r=(s=s[s.length-1]).getParent().$.rowIndex+s.$.rowSpan-1,s=new CKEDITOR.dom.element(i.$.rows[r]),l=(a=n?a:r,n?l:s);for(i=(s=CKEDITOR.tools.buildTableMap(i))[a],a=n?s[a-1]:s[a+1],s=s[0].length,o=o.createElement("tr"),r=0;i[r]&&r<s;r++){var c;1<i[r].rowSpan&&a&&i[r]==a[r]?(c=i[r]).rowSpan+=1:((c=new CKEDITOR.dom.element(i[r]).clone()).removeAttribute("rowSpan"),c.appendBogus(),o.append(c),c=c.$),r+=c.colSpan-1}return n?o.insertBefore(l):o.insertAfter(l),o}function n(e){for(var t=e.getParent().$.cells,n=0,i=0;i<t.length;i++){var o=t[i];n=n+o.colSpan;if(o==e.$)break}return n-1}function i(e,t){for(var i=t?1/0:0,o=0;o<e.length;o++){var a=n(e[o]);(t?a<i:a>i)&&(i=a)}return i}function o(t,n){for(var o=(r=u(t)?t:e(t))[0].getAscendant("table"),a=i(r,1),r=i(r),s=n?a:r,l=CKEDITOR.tools.buildTableMap(o),c=(o=[],a=[],r=[],l.length),d=0;d<c;d++){var h=n?l[d][s-1]:l[d][s+1];o.push(l[d][s]),a.push(h)}for(d=0;d<c;d++)o[d]&&(1<o[d].colSpan&&a[d]==o[d]?(l=o[d]).colSpan+=1:((l=(s=new CKEDITOR.dom.element(o[d])).clone()).removeAttribute("colSpan"),l.appendBogus(),l[n?"insertBefore":"insertAfter"].call(l,s),r.push(l),l=l.$),d+=l.rowSpan-1);return r}function a(e,t){var n=e.getStartElement().getAscendant({td:1,th:1},!0);if(n){var i=n.clone();i.appendBogus(),t?i.insertBefore(n):i.insertAfter(n)}}function r(e,t){var n=e.getDocument(),i=CKEDITOR.document;CKEDITOR.env.ie&&10==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 s(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 l(t,n,i){var o,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 r,l=CKEDITOR.tools.buildTableMap(o),c=l.length,d=l[0].length,u=t.getParent().$.rowIndex,h=s(l,u,t);if(n){var f;try{var g=parseInt(t.getAttribute("rowspan"),10)||1;r=parseInt(t.getAttribute("colspan"),10)||1,f=l["up"==n?u-g:"down"==n?u+g:u]["left"==n?h-r:"right"==n?h+r:h]}catch(e){return!1}if(!f||t.$==f)return!1;a["up"==n||"left"==n?"unshift":"push"](new CKEDITOR.dom.element(f))}n=t.getDocument();var m=u,p=(g=f=0,!i&&new CKEDITOR.dom.documentFragment(n)),E=0;for(n=0;n<a.length;n++){var T=(r=a[n]).getParent(),C=r.getFirst(),I=r.$.colSpan,O=r.$.rowSpan,D=s(l,T=T.$.rowIndex,r);E=E+I*O,g=Math.max(g,D-h+I);f=Math.max(f,T-u+O),i||((O=(I=r).getBogus())&&O.remove(),I.trim(),r.getChildren().count()&&(T==m||!C||C.isBlockBoundary&&C.isBlockBoundary({br:1})||(!(m=p.getLast(CKEDITOR.dom.walker.whitespaces(!0)))||m.is&&m.is("br")||p.append("br")),r.moveChildren(p)),n?r.remove():r.setHtml("")),m=T}if(i)return f*g==E;for(p.moveChildren(t),t.appendBogus(),g>=d?t.removeAttribute("rowSpan"):t.$.rowSpan=f,f>=c?t.removeAttribute("colSpan"):t.$.colSpan=g,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 c(t,n){if(1<(i=e(t)).length)return!1;if(n)return!0;var i,o,a=(d=(i=i[0]).getParent()).getAscendant("table"),r=s(u=CKEDITOR.tools.buildTableMap(a),h=d.$.rowIndex,i);if(1<(c=i.$.rowSpan)){o=Math.ceil(c/2);for(var l,c=Math.floor(c/2),d=h+o,u=(a=new CKEDITOR.dom.element(a.$.rows[d]),s(u,d)),h=(d=i.clone(),0);h<u.length;h++){if((l=u[h]).parentNode==a.$&&h>r){d.insertBefore(new CKEDITOR.dom.element(l));break}l=null}l||a.append(d)}else for(c=o=1,(a=d.clone()).insertAfter(d),a.append(d=i.clone()),l=s(u,h),r=0;r<l.length;r++)l[r].rowSpan++;return d.appendBogus(),i.$.rowSpan=o,d.$.rowSpan=c,1==o&&i.removeAttribute("rowSpan"),1==c&&d.removeAttribute("rowSpan"),d}function d(t,n){if(1<(i=e(t)).length)return!1;if(n)return!0;var i,o=(i=i[0]).getParent(),a=o.getAscendant("table"),r=s(a=CKEDITOR.tools.buildTableMap(a),o.$.rowIndex,i);if(1<(l=i.$.colSpan))o=Math.ceil(l/2),l=Math.floor(l/2);else{for(var l=o=1,c=[],d=0;d<a.length;d++){var u=a[d];c.push(u[r]),1<u[r].rowSpan&&(d+=u[r].rowSpan-1)}for(a=0;a<c.length;a++)c[a].colSpan++}return(a=i.clone()).insertAfter(i),a.appendBogus(),i.$.colSpan=o,a.$.colSpan=l,1==o&&i.removeAttribute("colSpan"),1==l&&a.removeAttribute("colSpan"),a}var u=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(n){function i(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 s(e,t){var i=n.addCommand(e,t);n.addFeature(i)}var u=n.lang.table,h=CKEDITOR.tools.style.parse,f="td{width} td{height} td{border-color} td{background-color} td{white-space} td{vertical-align} td{text-align} td[colspan] td[rowspan] th".split(" ");s("cellProperties",new CKEDITOR.dialogCommand("cellProperties",i({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:f,contentTransformations:[[{element:"td",left:function(e){return e.styles.background&&h.background(e.styles.background).color},right:function(e){e.styles["background-color"]=h.background(e.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(e){return e.attributes&&e.attributes.valign},right:function(e){e.styles["vertical-align"]=e.attributes.valign,delete e.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(e){return e.styles&&e.styles.height},right:function(e){CKEDITOR.tools.array.forEach(e.children,(function(t){t.name in{td:1,th:1}&&(t.attributes["cke-row-height"]=e.styles.height)})),delete e.styles.height}}],[{element:"td",check:"td{height}",left:function(e){return(e=e.attributes)&&e["cke-row-height"]},right:function(e){e.styles.height=e.attributes["cke-row-height"],delete e.attributes["cke-row-height"]}}]]}))),CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js"),s("rowDelete",i({requiredContent:"table",exec:function(t){(t=function t(n){if(n instanceof CKEDITOR.dom.selection){var i=n.getRanges(),o=(l=e(n))[0].getAscendant("table"),a=CKEDITOR.tools.buildTableMap(o),r=l[0].getParent().$.rowIndex,s=(l=l[l.length-1]).getParent().$.rowIndex+l.$.rowSpan-1,l=[];for(n.reset(),n=r;n<=s;n++){for(var c=a[n],d=new CKEDITOR.dom.element(o.$.rows[n]),u=0;u<c.length;u++){var h=new CKEDITOR.dom.element(c[u]),f=h.getParent().$.rowIndex;1==h.$.rowSpan?h.remove():(--h.$.rowSpan,f==n&&((f=a[n+1])[u-1]?h.insertAfter(new CKEDITOR.dom.element(f[u-1])):new CKEDITOR.dom.element(o.$.rows[n+1]).append(h,1))),u+=h.$.colSpan-1}l.push(d)}for(a=o.$.rows,i[0].moveToPosition(o,CKEDITOR.POSITION_BEFORE_START),r=new CKEDITOR.dom.element(a[s+1]||(0<r?a[r-1]:null)||o.$.parentNode),n=l.length;0<=n;n--)t(l[n]);return o.$.parentNode?r:(i[0].select(),null)}return n instanceof CKEDITOR.dom.element&&(1==(o=n.getAscendant("table")).$.rows.length?o.remove():n.remove()),null}(t=t.getSelection()))&&r(t)}})),s("rowInsertBefore",i({requiredContent:"table",exec:function(n){t(n=e(n=n.getSelection()),!0)}})),s("rowInsertAfter",i({requiredContent:"table",exec:function(n){t(n=e(n=n.getSelection()))}})),s("columnDelete",i({requiredContent:"table",exec:function(t){(t=function(t){CKEDITOR.env.webkit&&!t.isFake&&(t=function(e){var t,n,i=e.getRanges();if(1!==i.length)return e;if((i=i[0]).collapsed||0!==i.endOffset)return e;if("td"!==(n=(t=i.endContainer).getName().toLowerCase())&&"th"!==n)return e;for((n=t.getPrevious())||(n=t.getParent().getPrevious().getLast());n.type!==CKEDITOR.NODE_TEXT&&"br"!==n.getName().toLowerCase();)if(!(n=n.getLast()))return e;return i.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),i.select()}(t));var n,i,o=t.getRanges(),a=(s=e(t))[0],r=s[s.length-1],s=a.getAscendant("table"),l=CKEDITOR.tools.buildTableMap(s),c=[];t.reset();var d=0;for(t=l.length;d<t;d++)for(var u=0,h=l[d].length;u<h;u++)void 0===n&&l[d][u]==a.$&&(n=u),l[d][u]==r.$&&(i=u);for(d=n;d<=i;d++)for(u=0;u<l.length;u++)r=l[u],a=new CKEDITOR.dom.element(s.$.rows[u]),(r=new CKEDITOR.dom.element(r[d])).$&&(1==r.$.colSpan?r.remove():--r.$.colSpan,u+=r.$.rowSpan-1,a.$.cells.length||c.push(a));return n=l[0].length-1>i?new CKEDITOR.dom.element(l[0][i+1]):n&&-1!==l[0][n-1].cellIndex?new CKEDITOR.dom.element(l[0][n-1]):new CKEDITOR.dom.element(s.$.parentNode),c.length==t&&(o[0].moveToPosition(s,CKEDITOR.POSITION_AFTER_END),o[0].select(),s.remove()),n}(t=t.getSelection()))&&r(t,!0)}})),s("columnInsertBefore",i({requiredContent:"table",exec:function(t){o(t=e(t=t.getSelection()),!0)}})),s("columnInsertAfter",i({requiredContent:"table",exec:function(t){o(t=e(t=t.getSelection()))}})),s("cellDelete",i({requiredContent:"table",exec:function(t){(function t(n){if(n instanceof CKEDITOR.dom.selection){var i,o=n.getRanges(),a=e(n),s=a[0]&&a[0].getAscendant("table");e:{var l=0;i=a.length-1;for(var c,d,u={};c=a[l++];)CKEDITOR.dom.element.setMarker(u,c,"delete_cell",!0);for(l=0;c=a[l++];)if((d=c.getPrevious())&&!d.getCustomData("delete_cell")||(d=c.getNext())&&!d.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(u),i=d;break e}CKEDITOR.dom.element.clearAllMarkers(u),(l=(l=a[0].getParent()).getPrevious())?i=l.getLast():i=(l=(l=a[i].getParent()).getNext())?l.getChild(0):null}for(n.reset(),n=a.length-1;0<=n;n--)t(a[n]);i?r(i,!0):s&&(o[0].moveToPosition(s,CKEDITOR.POSITION_BEFORE_START),o[0].select(),s.remove())}else n instanceof CKEDITOR.dom.element&&(1==(o=n.getParent()).getChildCount()?o.remove():n.remove())})(t=t.getSelection())}})),s("cellMerge",i({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(e,t){t.cell=l(e.getSelection()),r(t.cell,!0)}})),s("cellMergeRight",i({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e,t){t.cell=l(e.getSelection(),"right"),r(t.cell,!0)}})),s("cellMergeDown",i({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e,t){t.cell=l(e.getSelection(),"down"),r(t.cell,!0)}})),s("cellVerticalSplit",i({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(e){r(d(e.getSelection()))}})),s("cellHorizontalSplit",i({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(e){r(c(e.getSelection()))}})),s("cellInsertBefore",i({requiredContent:"table",exec:function(e){a(e=e.getSelection(),!0)}})),s("cellInsertAfter",i({requiredContent:"table",exec:function(e){a(e=e.getSelection())}})),n.addMenuItems&&n.addMenuItems({tablecell:{label:u.cell.menu,group:"tablecell",order:1,getItems:function(){var t=e(i=n.getSelection()),i={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:l(i,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:l(i,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:l(i,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:d(i,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:c(i,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};return n.filter.check(f)&&(i.tablecell_properties=0<t.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),i}},tablecell_insertBefore:{label:u.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:u.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:u.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:u.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:u.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:u.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:u.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:u.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:u.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:u.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:u.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:u.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:u.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:u.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:u.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:u.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:u.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),n.contextMenu&&n.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}))},getCellColIndex:n,insertRow:t,insertColumn:o,getSelectedCells:e},CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e,t,n,i,o){e=e.$.rows,n=n||0,i="number"==typeof i?i:e.length-1,o="number"==typeof o?o:-1;var a=-1,r=[];for(t=t||0;t<=i;t++){!r[++a]&&(r[a]=[]);for(var s=-1,l=n;l<=(-1===o?e[t].cells.length-1:o);l++){if(!(d=e[t].cells[l]))break;for(s++;r[a][s];)s++;for(var c=isNaN(d.colSpan)?1:d.colSpan,d=isNaN(d.rowSpan)?1:d.rowSpan,u=0;u<d&&!(t+u>i);u++){r[a+u]||(r[a+u]=[]);for(var h=0;h<c;h++)r[a+u][s+h]=e[t].cells[l]}if(s+=c-1,-1!==o&&s>=o)break}}return r},function(){function e(e){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(e)}function t(e,t){var n,i,o=e.getAscendant("table"),r=t.getAscendant("table"),s=CKEDITOR.tools.buildTableMap(o),l=a(e),c=a(t),d=[],u={};for(o.contains(r)&&(c=a(t=t.getAscendant({td:1,th:1}))),l>c&&(o=l,l=c,c=o,o=e,e=t,t=o),o=0;o<s[l].length;o++)if(e.$===s[l][o]){n=o;break}for(o=0;o<s[c].length;o++)if(t.$===s[c][o]){i=o;break}for(n>i&&(o=n,n=i,i=o),o=l;o<=c;o++)for(l=n;l<=i;l++)(r=new CKEDITOR.dom.element(s[o][l])).$&&!r.getCustomData("selected_cell")&&(d.push(r),CKEDITOR.dom.element.setMarker(u,r,"selected_cell",!0));return CKEDITOR.dom.element.clearAllMarkers(u),d}function n(e,t){var n,i=e.editable().find(".cke_table-faked-selection"),o=e.editable().findOne("[data-cke-table-faked-selection-table]");for(e.fire("lockSnapshot"),e.editable().removeClass("cke_table-faked-selection-editor"),n=0;n<i.count();n++)i.getItem(n).removeClass("cke_table-faked-selection");o&&o.data("cke-table-faked-selection-table",!1),e.fire("unlockSnapshot"),t&&(p={active:!1},e.getSelection().isInTable()&&e.getSelection().reset())}function i(e,t){var n,i,o=[];for(i=0;i<t.length;i++)(n=e.createRange()).setStartBefore(t[i]),n.setEndAfter(t[i]),o.push(n);e.getSelection().selectRanges(o)}function o(e){var t,i=(e=e.editor||e.sender.editor)&&e.getSelection(),o=i&&i.getRanges()||[],a=(a=o&&o[0].getEnclosedNode())&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("img");if(i&&(n(e),i.isInTable()&&i.isFake))if(a)e.getSelection().reset();else if(!o[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){for(1===o.length&&o[0]._getTableElement()&&o[0]._getTableElement().is("table")&&(t=o[0]._getTableElement()),t=h(i,t),e.fire("lockSnapshot"),i=0;i<t.length;i++)t[i].addClass("cke_table-faked-selection");0<t.length&&(e.editable().addClass("cke_table-faked-selection-editor"),t[0].getAscendant("table").data("cke-table-faked-selection-table","")),e.fire("unlockSnapshot")}}function a(e){return e.getAscendant("tr",!0).$.rowIndex}function r(o){function a(e){return!e.getAscendant("table",!0)&&e.getDocument().equals(s.document)}if(o.data.getTarget().getName&&("mouseup"===o.name||!e(o.data.getTarget()))){var s=o.editor||o.listenerData.editor,l=s.getSelection(1),c=function(e){return(e=e.editable().findOne(".cke_table-faked-selection"))&&e.getAscendant("table")}(s),d=(u=o.data.getTarget())&&u.getAscendant({td:1,th:1},!0),u=u&&u.getAscendant("table",!0),f={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1};u&&u.hasAttribute("data-cke-tableselection-ignored")||(function(e,t,n,i){return!("mousedown"!==e.name||CKEDITOR.tools.getMouseButton(e)!==CKEDITOR.MOUSE_BUTTON_LEFT&&i)||((t=e.name===(CKEDITOR.env.gecko?"mousedown":"mouseup")&&!a(e.data.getTarget()))&&(t=!((e=e.data.getTarget().getAscendant({td:1,th:1},!0))&&e.hasClass("cke_table-faked-selection"))),t)}(o,l,0,u)&&n(s,!0),!p.active&&"mousedown"===o.name&&CKEDITOR.tools.getMouseButton(o)===CKEDITOR.MOUSE_BUTTON_LEFT&&u&&(p={active:!0},CKEDITOR.document.on("mouseup",r,null,{editor:s})),(d||u)&&function(o,a,r){var s,l=h(o.getSelection(!0));if(a=a.is("table")?null:a,(s=p.active&&!p.first)&&!(s=a)&&(s=o.getSelection().getRanges(),s=!!(1<l.length||s[0]&&!s[0].collapsed)),s)p.first=a||l[0],p.dirty=!a&&1!==l.length;else if(p.active&&a&&p.first.getAscendant("table").equals(a.getAscendant("table"))){if(l=t(p.first,a),!p.dirty&&1===l.length&&!e(r.data.getTarget()))return n(o,"mouseup"===r.name);p.dirty=!0,p.last=a,i(o,l)}}(s,d||u,o),"mouseup"===o.name&&(CKEDITOR.tools.getMouseButton(o)===CKEDITOR.MOUSE_BUTTON_LEFT&&(a(o.data.getTarget())||function(e,t){return!(!e||!t)&&(e.equals(t)||e.contains(t)||t.contains(e)||e.getCommonAncestor(t).is(f))}(c,u))&&function(e){var n=e.editable().find(".cke_table-faked-selection");1>n.count()||i(e,n=t(n.getItem(0),n.getItem(n.count()-1)))}(s),p={active:!1},CKEDITOR.document.removeListener("mouseup",r)))}}function s(e){var t=e.data.getTarget().getAscendant("table",!0);t&&t.hasAttribute("data-cke-tableselection-ignored")||(t=e.data.getTarget().getAscendant({td:1,th:1},!0))&&!t.hasClass("cke_table-faked-selection")&&(e.cancel(),e.data.preventDefault())}function l(e){var t=e.editor||e.sender.editor,n=t.getSelection();n.isInTable()&&(n.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||function(e,t){var n,i,o,a,r=e.getSelection(),s=r.createBookmarks(),l=e.document,c=e.createRange(),d=l.getDocumentElement().$,u=CKEDITOR.env.ie&&9>CKEDITOR.env.version,h=e.blockless||CKEDITOR.env.ie?"span":"div";l.getById("cke_table_copybin")||(n=l.createElement(h),(i=l.createElement(h)).setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),n.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),n.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-5000px"),n.setHtml(e.getSelectedHtml(!0)),e.fire("lockSnapshot"),i.append(n),e.editable().append(i),a=e.on("selectionChange",(function(e){e.cancel()}),null,null,0),u&&(o=d.scrollTop),c.selectNodeContents(n),c.select(),u&&(d.scrollTop=o),setTimeout((function(){i.remove(),r.selectBookmarks(s),a.removeListener(),e.fire("unlockSnapshot"),t&&(e.extractSelectedHtml(),e.fire("saveSnapshot"))}),100))}(t,"cut"===e.name))}function c(e){this._reset(),e&&this.setSelectedCells(e)}function d(e,t,n){e.on("beforeCommandExec",(function(n){-1!==CKEDITOR.tools.array.indexOf(t,n.data.name)&&(n.data.selectedCells=h(e.getSelection()))})),e.on("afterCommandExec",(function(i){-1!==CKEDITOR.tools.array.indexOf(t,i.data.name)&&n(e,i.data)}))}var u,h,f,g,m,p={active:!1};c.prototype={},c.prototype._reset=function(){this.cells={first:null,last:null,all:[]},this.rows={first:null,last:null}},c.prototype.setSelectedCells=function(e){this._reset(),e=e.slice(0),this._arraySortByDOMOrder(e),this.cells.all=e,this.cells.first=e[0],this.cells.last=e[e.length-1],this.rows.first=e[0].getAscendant("tr"),this.rows.last=this.cells.last.getAscendant("tr")},c.prototype.getTableMap=function(){var e,t=f(this.cells.first);e:{var n,i=(e=this.cells.last).getAscendant("table"),o=a(e);i=CKEDITOR.tools.buildTableMap(i);for(n=0;n<i[o].length;n++)if(new CKEDITOR.dom.element(i[o][n]).equals(e)){e=n;break e}e=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),a(this.rows.first),t,a(this.rows.last),e)},c.prototype._getTable=function(){return this.rows.first.getAscendant("table")},c.prototype.insertRow=function(e,t,n){if(void 0===e)e=1;else if(0>=e)return;for(var i,o=this.cells.first.$.cellIndex,a=this.cells.last.$.cellIndex,r=n?[]:this.cells.all,s=0;s<e;s++)i=g(n?this.cells.all:r,t),i=CKEDITOR.tools.array.filter(i.find("td, th").toArray(),(function(e){return!!n||e.$.cellIndex>=o&&e.$.cellIndex<=a})),r=t?i.concat(r):r.concat(i);this.setSelectedCells(r)},c.prototype.insertColumn=function(e){function t(e){return(e=a(e))>=i&&e<=o}if(void 0===e)e=1;else if(0>=e)return;for(var n=(r=this.cells).all,i=a(r.first),o=a(r.last),r=0;r<e;r++)n=n.concat(CKEDITOR.tools.array.filter(m(n),t));this.setSelectedCells(n)},c.prototype.emptyCells=function(e){e=e||this.cells.all;for(var t=0;t<e.length;t++)e[t].setHtml("")},c.prototype._arraySortByDOMOrder=function(e){e.sort((function(e,t){return e.getPosition(t)&CKEDITOR.POSITION_PRECEDING?-1:1}))};var E={onPaste:function(e){function n(e){return Math.max.apply(null,CKEDITOR.tools.array.map(e,(function(e){return e.length}),0))}var o,a,r=e.editor,s=r.getSelection(),l=h(s),d=s.isInTable(!0)&&this.isBoundarySelection(s),u=this.findTableInPastedContent(r,e.data.dataValue);(function(e,t,n,i){var o=(e=e.getRanges()).length&&e[0]._getTableElement({table:1});return!(!t.length||o&&o.hasAttribute("data-cke-tableselection-ignored")||i&&!n)&&((t=!i)&&((t=e[0])?((t=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT),t=(t=t.getEnclosedNode())&&t.is&&t.is(CKEDITOR.dtd.$tableContent)):t=void 0,t=!t),!t)})(s,l,u,d)&&(l=l[0].getAscendant("table"),o=new c(h(s,l)),r.once("afterPaste",(function(){var e;if(a){e=new CKEDITOR.dom.element(a[0][0]);var n=a[a.length-1];e=t(e,new CKEDITOR.dom.element(n[n.length-1]))}else e=o.cells.all;i(r,e)})),u?(e.stop(),d?(o.insertRow(1,1===d,!0),s.selectElement(o.rows.first)):(o.emptyCells(),i(r,o.cells.all)),e=o.getTableMap(),a=CKEDITOR.tools.buildTableMap(u),o.insertRow(a.length-e.length),o.insertColumn(n(a)-n(e)),e=o.getTableMap(),this.pasteTable(o,e,a),r.fire("saveSnapshot"),setTimeout((function(){r.fire("afterPaste")}),0)):(function(e){var t=r.createRange();t.selectNodeContents(e),t.select()}(o.cells.first),r.once("afterPaste",(function(){r.fire("lockSnapshot"),o.emptyCells(o.cells.all.slice(1)),i(r,o.cells.all),r.fire("unlockSnapshot")}))))},isBoundarySelection:function(e){var t=(e=e.getRanges()[0]).endContainer.getAscendant("tr",!0);if(t&&e.collapsed){if(e.checkBoundaryOfElement(t,CKEDITOR.START))return 1;if(e.checkBoundaryOfElement(t,CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(e,t){var n=e.dataProcessor,i=new CKEDITOR.dom.element("body");return n||(n=new CKEDITOR.htmlDataProcessor(e)),i.setHtml(n.toHtml(t),{fixForBody:!1}),1<i.getChildCount()?null:i.findOne("table")},pasteTable:function(e,t,n){var i,o,a,r,s,l=f(e.cells.first),c=e._getTable(),d={};for(r=0;r<n.length;r++)for(o=new CKEDITOR.dom.element(c.$.rows[e.rows.first.$.rowIndex+r]),s=0;s<n[r].length;s++)a=new CKEDITOR.dom.element(n[r][s]),i=t[r]&&t[r][s]?new CKEDITOR.dom.element(t[r][s]):null,a&&!a.getCustomData("processed")?(i&&i.getParent()?a.replace(i):(0===s||n[r][s-1])&&((i=0!==s?new CKEDITOR.dom.element(n[r][s-1]):null)&&o.equals(i.getParent())?a.insertAfter(i):0<l?o.$.cells[l]?a.insertAfter(new CKEDITOR.dom.element(o.$.cells[l])):o.append(a):o.append(a,!0)),CKEDITOR.dom.element.setMarker(d,a,"processed",!0)):a.getCustomData("processed")&&i&&i.remove();CKEDITOR.dom.element.clearAllMarkers(d)}};CKEDITOR.plugins.tableselection={getCellsBetween:t,keyboardIntegration:function(e){function t(e){var t=e.getEnclosedNode();t&&"function"==typeof t.is&&t.is({td:1,th:1})?t.setText(""):e.deleteContents(),CKEDITOR.tools.array.forEach(e._find("td"),(function(e){e.appendBogus()}))}var n=e.editable();n.attachListener(n,"keydown",function(e){function n(t,n){if(!n.length)return null;var i=e.createRange(),a=CKEDITOR.dom.range.mergeRanges(n);CKEDITOR.tools.array.forEach(a,(function(e){e.enlarge(CKEDITOR.ENLARGE_ELEMENT)}));var r=(s=a[0].getBoundaryNodes()).startNode,s=s.endNode;if(r&&r.is&&r.is(o)){for(var l=r.getAscendant("table",!0),c=r.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l),d=!1,u=function(e){return!r.contains(e)&&e.is&&e.is("td","th")};c&&!u(c);)c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l);return!c&&s&&s.is&&!s.is("table")&&s.getNext()&&(c=s.getNext().findOne("td, th"),d=!0),c?i["moveToElementEdit"+(d?"Start":"End")](c):(i.setStartBefore(r.getAscendant("table",!0)),i.collapse(!0)),a[0].deleteContents(),[i]}return r?(i.moveToElementEditablePosition(r),[i]):void 0}var i={37:1,38:1,39:1,40:1,8:1,46:1,13:1},o=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent);return delete o.td,delete o.th,function(o){var a,r,s,l,c=o.data.getKey(),d=o.data.getKeystroke(),u=37===c||38==c;if(i[c]&&!e.readOnly&&(a=e.getSelection())&&a.isInTable()&&a.isFake)if(s=(r=a.getRanges())[0]._getTableElement(),l=r[r.length-1]._getTableElement(),(13!==c||e.plugins.enterkey)&&(o.data.preventDefault(),o.cancel()),36<c&&41>c)r[0].moveToElementEditablePosition(u?s:l,!u),a.selectRanges([r[0]]);else if(13!==c||13===d||d===CKEDITOR.SHIFT+13){for(o=0;o<r.length;o++)t(r[o]);(o=n(0,r))?r=o:r[0].moveToElementEditablePosition(s),a.selectRanges(r),13===c&&e.plugins.enterkey?(e.fire("lockSnapshot"),13===d?e.execCommand("enter"):e.execCommand("shiftEnter"),e.fire("unlockSnapshot"),e.fire("saveSnapshot")):13!==c&&e.fire("saveSnapshot")}}}(e),null,null,-1),n.attachListener(n,"keypress",(function(n){var i,o=e.getSelection(),a=n.data.$.charCode||13===n.data.getKey();if(!e.readOnly&&o&&o.isInTable()&&o.isFake&&a&&!(n.data.getKeystroke()&CKEDITOR.CTRL)){for(a=(n=o.getRanges())[0].getEnclosedNode().getAscendant({td:1,th:1},!0),i=0;i<n.length;i++)t(n[i]);a&&(n[0].moveToElementEditablePosition(a),o.selectRanges([n[0]]))}}),null,null,-1)}},CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&11>CKEDITOR.env.version)},onLoad:function(){u=CKEDITOR.plugins.tabletools,h=u.getSelectedCells,f=u.getCellColIndex,g=u.insertRow,m=u.insertColumn,CKEDITOR.document.appendStyleSheet(this.path+"styles/tableselection.css")},init:function(e){this.isSupportedEnvironment()&&(e.addContentsCss&&e.addContentsCss(this.path+"styles/tableselection.css"),e.on("contentDom",(function(){var t=e.editable(),n=t.isInline()?t:e.document,i={editor:e};t.attachListener(n,"mousedown",r,null,i),t.attachListener(n,"mousemove",r,null,i),t.attachListener(n,"mouseup",r,null,i),t.attachListener(t,"dragstart",s),t.attachListener(e,"selectionCheck",o),CKEDITOR.plugins.tableselection.keyboardIntegration(e),CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(t.attachListener(t,"cut",l),t.attachListener(t,"copy",l))})),e.on("paste",E.onPaste,E),d(e,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),(function(e,t){i(e,t.selectedCells)})),d(e,["cellMerge","cellMergeRight","cellMergeDown"],(function(e,t){i(e,[t.commandData.cell])})),d(e,["cellDelete"],(function(e){n(e,!0)})))}})}(),function(){var e=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],t={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(t){function i(e){r.enabled&&!1!==e.data.command.canUndo&&r.save()}function o(){r.enabled=!t.readOnly&&"wysiwyg"==t.mode,r.onChange()}var r=t.undoManager=new n(t),s=r.editingHandler=new a(r),l=t.addCommand("undo",{exec:function(){r.undo()&&(t.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),c=t.addCommand("redo",{exec:function(){r.redo()&&(t.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});t.setKeystroke([[e[0],"undo"],[e[1],"redo"],[e[2],"redo"]]),r.onChange=function(){l.setState(r.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),c.setState(r.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)},t.on("beforeCommandExec",i),t.on("afterCommandExec",i),t.on("saveSnapshot",(function(e){r.save(e.data&&e.data.contentOnly)})),t.on("contentDom",s.attachListeners,s),t.on("instanceReady",(function(){t.fire("saveSnapshot")})),t.on("beforeModeUnload",(function(){"wysiwyg"==t.mode&&r.save(!0)})),t.on("mode",o),t.on("readOnly",o),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(){r.reset(),t.fire("saveSnapshot")},t.on("updateSnapshot",(function(){r.currentImage&&r.update()})),t.on("lockSnapshot",(function(e){e=e.data,r.lock(e&&e.dontUpdate,e&&e.forceUpdate)})),t.on("unlockSnapshot",r.unlock,r)}}),CKEDITOR.plugins.undo={};var n=CKEDITOR.plugins.undo.UndoManager=function(e){this.strokesRecorded=[0,0],this.locked=null,this.previousKeyGroup=-1,this.limit=e.config.undoStackSize||20,this.strokesLimit=25,this._filterRules=[],this.editor=e,this.reset(),CKEDITOR.env.ie&&this.addFilterRule((function(e){return e.replace(/\s+data-cke-expando=".*?"/g,"")}))};n.prototype={type:function(e,t){var i=n.getKeyGroup(e),o=this.strokesRecorded[i]+1;t=t||o>=this.strokesLimit,this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange()),t?(o=0,this.editor.fire("saveSnapshot")):this.editor.fire("change"),this.strokesRecorded[i]=o,this.previousKeyGroup=i},keyGroupChanged:function(e){return n.getKeyGroup(e)!=this.previousKeyGroup},reset:function(){this.snapshots=[],this.index=-1,this.currentImage=null,this.hasRedo=this.hasUndo=!1,this.locked=null,this.resetType()},resetType:function(){this.strokesRecorded=[0,0],this.typing=!1,this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0),this.hasRedo=!!this.getNextImage(!1),this.resetType(),this.onChange()},save:function(e,t,n){var o=this.editor;if(this.locked||"ready"!=o.status||"wysiwyg"!=o.mode)return!1;var a=o.editable();if(!a||"ready"!=a.status)return!1;if(a=this.snapshots,t||(t=new i(o)),!1===t.contents)return!1;if(this.currentImage)if(t.equalsContent(this.currentImage)){if(e||t.equalsSelection(this.currentImage))return!1}else!1!==n&&o.fire("change");return a.splice(this.index+1,a.length-this.index-1),a.length==this.limit&&a.shift(),this.index=a.push(t)-1,this.currentImage=t,!1!==n&&this.refreshState(),!0},restoreImage:function(e){var t,n=this.editor;e.bookmarks&&(n.focus(),t=n.getSelection()),this.locked={level:999},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=null,this.index=e.index,this.currentImage=this.snapshots[this.index],this.update(),this.refreshState(),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 i(this.editor));for(var t=this.index,n=this.snapshots;0<t&&this.currentImage.equalsContent(n[t-1]);)--t;n.splice(t,this.index-t+1,e),this.index=t,this.currentImage=e}},updateSelection:function(e){if(!this.snapshots.length)return!1;var t=this.snapshots,n=t[t.length-1];return!(!n.equalsContent(e)||n.equalsSelection(e))&&(this.currentImage=t[t.length-1]=e,!0)},lock:function(e,t){if(this.locked)this.locked.level++;else if(e)this.locked={level:1};else{var n=null;if(t)n=!0;else{var o=new i(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(o)&&(n=o)}this.locked={update:n,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var e=this.locked.update;if(this.locked=null,!0===e)this.update();else if(e){var t=new i(this.editor,!0);e.equalsContent(t)||this.update()}}},addFilterRule:function(e){this._filterRules.push(e)}},n.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1},n.keyGroups={PRINTABLE:0,FUNCTIONAL:1},n.isNavigationKey=function(e){return!!n.navigationKeyCodes[e]},n.getKeyGroup=function(e){var i=n.keyGroups;return t[e]?i.FUNCTIONAL:i.PRINTABLE},n.getOppositeKeyGroup=function(e){var t=n.keyGroups;return e==t.FUNCTIONAL?t.PRINTABLE:t.FUNCTIONAL},n.ieFunctionalKeysBug=function(e){return CKEDITOR.env.ie&&n.getKeyGroup(e)==n.keyGroups.FUNCTIONAL};var i=CKEDITOR.plugins.undo.Image=function(e,t){this.editor=e,e.fire("beforeUndoImage");var n=e.getSnapshot();n&&(this.contents=function(e,t){return CKEDITOR.tools.array.reduce(t,(function(e,t){return t(e)}),e)}(n,e.undoManager._filterRules)),t||(this.bookmarks=(n=n&&e.getSelection())&&n.createBookmarks2(!0)),e.fire("afterUndoImage")},o=/\b(?:href|src|name)="[^"]*?"/gi;i.prototype={equalsContent:function(e){var t=this.contents;return e=e.contents,CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(t=t.replace(o,""),e=e.replace(o,"")),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}};var a=CKEDITOR.plugins.undo.NativeEditingHandler=function(e){this.undoManager=e,this.ignoreInputEvent=!1,this.keyEventsStack=new r,this.lastKeydownImage=null};a.prototype={onKeydown:function(t){var o=t.data.getKey();229!==o&&(-1<CKEDITOR.tools.indexOf(e,t.data.getKeystroke())?t.data.preventDefault():(this.keyEventsStack.cleanUp(t),t=this.undoManager,this.keyEventsStack.getLast(o)||this.keyEventsStack.push(o),this.lastKeydownImage=new i(t.editor),(n.isNavigationKey(o)||this.undoManager.keyGroupChanged(o))&&(t.strokesRecorded[0]||t.strokesRecorded[1])&&(t.save(!1,this.lastKeydownImage,!1),t.resetType())))},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var e=this.keyEventsStack.getLast();e||(e=this.keyEventsStack.push(0)),this.keyEventsStack.increment(e.keyCode),this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(e.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(e){var t=this.undoManager;e=e.data.getKey();var o=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(e),n.ieFunctionalKeysBug(e)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new i(t.editor,!0))||(0<o?t.type(e):n.isNavigationKey(e)&&this.onNavigationKey(!0))},onNavigationKey:function(e){var t=this.undoManager;!e&&t.save(!0,null,!1)||t.updateSelection(new i(t.editor)),t.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var e=this.undoManager.editor,t=e.editable(),i=this;t.attachListener(t,"keydown",(function(e){i.onKeydown(e),n.ieFunctionalKeysBug(e.data.getKey())&&i.onInput()}),null,null,999),t.attachListener(t,CKEDITOR.env.ie?"keypress":"input",i.onInput,i,null,999),t.attachListener(t,"keyup",i.onKeyup,i,null,999),t.attachListener(t,"paste",i.ignoreInputEventListener,i,null,999),t.attachListener(t,"drop",i.ignoreInputEventListener,i,null,999),e.on("afterPaste",i.activateInputEventListener,i,null,999),t.attachListener(t.isInline()?t:e.document.getDocumentElement(),"click",(function(){i.onNavigationKey()}),null,null,999),t.attachListener(this.undoManager.editor,"blur",(function(){i.keyEventsStack.remove(9)}),null,null,999)}};var r=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};r.prototype={push:function(e){return e=this.stack.push({keyCode:e,inputs:0}),this.stack[e-1]},getLastIndex:function(e){if("number"!=typeof e)return this.stack.length-1;for(var t=this.stack.length;t--;)if(this.stack[t].keyCode==e)return t;return-1},getLast:function(e){return-1!=(e=this.getLastIndex(e))?this.stack[e]:null},increment:function(e){this.getLast(e).inputs++},remove:function(e){-1!=(e=this.getLastIndex(e))&&this.stack.splice(e,1)},resetInputs:function(e){if("number"==typeof e)this.getLast(e).inputs=0;else for(e=this.stack.length;e--;)this.stack[e].inputs=0},getTotalInputs:function(){for(var e=this.stack.length,t=0;e--;)t+=this.stack[e].inputs;return t},cleanUp:function(e){(e=e.data.$).ctrlKey||e.metaKey||this.remove(17),e.shiftKey||this.remove(16),e.altKey||this.remove(18)}}}(),function(){function e(e,t){CKEDITOR.tools.extend(this,{editor:e,editable:e.editable(),doc:e.document,win:e.window},t,!0),this.inline=this.editable.isInline(),this.inline||(this.frame=this.win.getFrame()),this.target=this[this.inline?"editable":"doc"]}function t(e,t){CKEDITOR.tools.extend(this,t,{editor:e},!0)}function n(e,t){var n=e.editable();CKEDITOR.tools.extend(this,{editor:e,editable:n,inline:n.isInline(),doc:e.document,win:e.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},t,!0),this.hidden={},this.visible={},this.inline||(this.frame=this.win.getFrame()),this.queryViewport();var i=CKEDITOR.tools.bind(this.queryViewport,this),r=CKEDITOR.tools.bind(this.hideVisible,this),s=CKEDITOR.tools.bind(this.removeAll,this);n.attachListener(this.winTop,"resize",i),n.attachListener(this.winTop,"scroll",i),n.attachListener(this.winTop,"resize",r),n.attachListener(this.win,"scroll",r),n.attachListener(this.inline?n:this.frame,"mouseout",(function(e){var t=e.data.$.clientX;e=e.data.$.clientY,this.queryViewport(),(t<=this.rect.left||t>=this.rect.right||e<=this.rect.top||e>=this.rect.bottom)&&this.hideVisible(),(0>=t||t>=this.winTopPane.width||0>=e||e>=this.winTopPane.height)&&this.hideVisible()}),this),n.attachListener(e,"resize",i),n.attachListener(e,"mode",s),e.on("destroy",s),this.lineTpl=new CKEDITOR.template('<div data-cke-lineutils-line="1" class="cke_reset_all" style="{lineStyle}"><span style="{tipLeftStyle}"> </span><span style="{tipRightStyle}"> </span></div>').output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},a,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},o,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},o,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function i(e){var t;return(t=e&&e.type==CKEDITOR.NODE_ELEMENT)&&(t=!(r[e.getComputedStyle("float")]||r[e.getAttribute("align")])),t&&!s[e.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils"),CKEDITOR.LINEUTILS_BEFORE=1,CKEDITOR.LINEUTILS_AFTER=2,CKEDITOR.LINEUTILS_INSIDE=4,e.prototype={start:function(e){var t,n,i,o,a=this,r=this.editor,s=this.doc,l=CKEDITOR.tools.eventsBuffer(50,(function(){r.readOnly||"wysiwyg"!=r.mode||(a.relations={},(n=s.$.elementFromPoint(i,o))&&n.nodeType&&(t=new CKEDITOR.dom.element(n),a.traverseSearch(t),isNaN(i+o)||a.pixelSearch(t,i,o),e&&e(a.relations,i,o)))}));this.listener=this.editable.attachListener(this.target,"mousemove",(function(e){i=e.data.$.clientX,o=e.data.$.clientY,l.input()})),this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",(function(){l.reset()}))},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var e={};return e[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START,e[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END,e[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START,function(t){var n=this.editor.createRange();return n.moveToPosition(this.relations[t.uid].element,e[t.type]),n}}(),store:function(){function e(e,t,n){var i=e.getUniqueId();i in n?n[i].type|=t:n[i]={element:e,type:t}}return function(t,n){var o;n&CKEDITOR.LINEUTILS_AFTER&&i(o=t.getNext())&&o.isVisible()&&(e(o,CKEDITOR.LINEUTILS_BEFORE,this.relations),n^=CKEDITOR.LINEUTILS_AFTER),n&CKEDITOR.LINEUTILS_INSIDE&&i(o=t.getFirst())&&o.isVisible()&&(e(o,CKEDITOR.LINEUTILS_BEFORE,this.relations),n^=CKEDITOR.LINEUTILS_INSIDE),e(t,n,this.relations)}}(),traverseSearch:function(e){var t,n,o;do{if(!(o=e.$["data-cke-expando"])||!(o in this.relations)){if(e.equals(this.editable))break;if(i(e))for(t in this.lookups)(n=this.lookups[t](e))&&this.store(e,n)}}while((!e||e.type!=CKEDITOR.NODE_ELEMENT||"true"!=e.getAttribute("contenteditable"))&&(e=e.getParent()))},pixelSearch:function(){function e(e,n,o,a,r){for(var s,l=0;r(o)&&(o+=a,25!=++l);)if(s=this.doc.$.elementFromPoint(n,o))if(s==e)l=0;else if(t(e,s)&&(l=0,i(s=new CKEDITOR.dom.element(s))))return s}var t=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(e,t){return e.contains(t)}:function(e,t){return!!(16&e.compareDocumentPosition(t))};return function(t,n,o){var a=this.win.getViewPaneSize().height,r=e.call(this,t.$,n,o,-1,(function(e){return 0<e}));if(n=e.call(this,t.$,n,o,1,(function(e){return e<a})),r)for(this.traverseSearch(r);!r.getParent().equals(t);)r=r.getParent();if(n)for(this.traverseSearch(n);!n.getParent().equals(t);)n=n.getParent();for(;(r||n)&&(r&&(r=r.getNext(i)),r&&!r.equals(n))&&(this.traverseSearch(r),n&&(n=n.getPrevious(i)),n&&!n.equals(r));)this.traverseSearch(n)}}(),greedySearch:function(){this.relations={};for(var e,t,n,o=this.editable.getElementsByTag("*"),a=0;e=o.getItem(a++);)if(!e.equals(this.editable)&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasAttribute("contenteditable")||!e.isReadOnly())&&i(e)&&e.isVisible())for(n in this.lookups)(t=this.lookups[n](e))&&this.store(e,t);return this.relations}},t.prototype={locate:function(){function e(e,t){var n=e.element[t===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return n&&i(n)?(e.siblingRect=n.getClientRect(),t==CKEDITOR.LINEUTILS_BEFORE?(e.siblingRect.bottom+e.elementRect.top)/2:(e.elementRect.bottom+e.siblingRect.top)/2):t==CKEDITOR.LINEUTILS_BEFORE?e.elementRect.top:e.elementRect.bottom}return function(t){var n;for(var i in this.locations={},t)(n=t[i]).elementRect=n.element.getClientRect(),n.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(i,CKEDITOR.LINEUTILS_BEFORE,e(n,CKEDITOR.LINEUTILS_BEFORE)),n.type&CKEDITOR.LINEUTILS_AFTER&&this.store(i,CKEDITOR.LINEUTILS_AFTER,e(n,CKEDITOR.LINEUTILS_AFTER)),n.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(i,CKEDITOR.LINEUTILS_INSIDE,(n.elementRect.top+n.elementRect.bottom)/2);return this.locations}}(),sort:function(){var e,t,n,i;return function(o,a){for(var r in e=this.locations,t=[],e)for(var s in e[r])if(n=Math.abs(o-e[r][s]),t.length){for(i=0;i<t.length;i++)if(n<t[i].dist){t.splice(i,0,{uid:+r,type:s,dist:n});break}i==t.length&&t.push({uid:+r,type:s,dist:n})}else t.push({uid:+r,type:s,dist:n});return void 0!==a?t.slice(0,a):t}}(),store:function(e,t,n){this.locations[e]||(this.locations[e]={}),this.locations[e][t]=n}};var o={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},a={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};n.prototype={removeAll:function(){for(var e in this.hidden)this.hidden[e].remove(),delete this.hidden[e];for(e in this.visible)this.visible[e].remove(),delete this.visible[e]},hideLine:function(e){var t=e.getUniqueId();e.hide(),this.hidden[t]=e,delete this.visible[t]},showLine:function(e){var t=e.getUniqueId();e.show(),this.visible[t]=e,delete this.hidden[t]},hideVisible:function(){for(var e in this.visible)this.hideLine(this.visible[e])},placeLine:function(e,t){var n,i,o;if(n=this.getStyle(e.uid,e.type)){for(o in this.visible)if(this.visible[o].getCustomData("hash")!==this.hash){i=this.visible[o];break}if(!i)for(o in this.hidden)if(this.hidden[o].getCustomData("hash")!==this.hash){this.showLine(i=this.hidden[o]);break}i||this.showLine(i=this.addLine()),i.setCustomData("hash",this.hash),this.visible[i.getUniqueId()]=i,i.setStyles(n),t&&t(i)}},getStyle:function(e,t){var n=this.relations[e],i=this.locations[e][t],o={};if(o.width=n.siblingRect?Math.max(n.siblingRect.width,n.elementRect.width):n.elementRect.width,o.top=this.inline?i+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+i,o.top-this.winTopScroll.y<this.rect.top||o.top-this.winTopScroll.y>this.rect.bottom)return!1;for(var a in this.inline?o.left=n.elementRect.left-this.rect.relativeX:(0<n.elementRect.left?o.left=this.rect.left+n.elementRect.left:(o.width+=n.elementRect.left,o.left=this.rect.left),0<(n=o.left+o.width-(this.rect.left+this.winPane.width))&&(o.width-=n)),o.left+=this.winTopScroll.x,o)o[a]=CKEDITOR.tools.cssLength(o[a]);return o},addLine:function(){var e=CKEDITOR.dom.element.createFromHtml(this.lineTpl);return e.appendTo(this.container),e},prepare:function(e,t){this.relations=e,this.locations=t,this.hash=Math.random()},cleanup:function(){var e,t;for(t in this.visible)(e=this.visible[t]).getCustomData("hash")!==this.hash&&this.hideLine(e)},queryViewport:function(){this.winPane=this.win.getViewPaneSize(),this.winTopScroll=this.winTop.getScrollPosition(),this.winTopPane=this.winTop.getViewPaneSize(),this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(e){e=e.getClientRect();var t=this.container.getDocumentPosition(),n=this.container.getComputedStyle("position");return e.relativeX=e.relativeY=0,"static"!=n&&(e.relativeY=t.y,e.relativeX=t.x,e.top-=e.relativeY,e.bottom-=e.relativeY,e.left-=e.relativeX,e.right-=e.relativeX),e}};var r={left:1,right:1,center:1},s={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:e,locator:t,liner:n}}(),function(){function e(e){return e.getName&&!e.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(e){if(CKEDITOR.env.webkit){var t=CKEDITOR.plugins.widgetselection;e.on("contentDom",(function(e){var n=(e=e.editor).editable();n.attachListener(n,"keydown",(function(e){e.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout((function(){t.addFillers(n)||t.removeFillers(n)}),0)}),null,null,-1),e.on("selectionCheck",(function(e){t.removeFillers(e.editor.editable())})),e.on("paste",(function(e){e.data.dataValue=t.cleanPasteData(e.data.dataValue)})),"selectall"in e.plugins&&t.addSelectAllIntegration(e)}))}}}),CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:" ",fillerTagName:"div",addFillers:function(t){var n=t.editor;if(!this.isWholeContentSelected(t)&&0<t.getChildCount()){var i=t.getFirst(e),o=t.getLast(e);if(i&&i.type==CKEDITOR.NODE_ELEMENT&&!i.isEditable()&&(this.startFiller=this.createFiller(),t.append(this.startFiller,1)),o&&o.type==CKEDITOR.NODE_ELEMENT&&!o.isEditable()&&(this.endFiller=this.createFiller(!0),t.append(this.endFiller,0)),this.hasFiller(t))return(n=n.createRange()).selectNodeContents(t),n.select(),!0}return!1},removeFillers:function(e){if(this.hasFiller(e)&&!this.isWholeContentSelected(e)){var t=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"=start]"),n=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"=end]");this.startFiller&&t&&this.startFiller.equals(t)?this.removeFiller(this.startFiller,e):this.startFiller=t,this.endFiller&&n&&this.endFiller.equals(n)?this.removeFiller(this.endFiller,e):this.endFiller=n}},cleanPasteData:function(e){return e&&e.length&&(e=e.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),"")),e},isWholeContentSelected:function(e){var t=e.editor.getSelection().getRanges()[0];return!(!t||t&&t.collapsed)&&((t=t.clone()).enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(t&&e&&t.startContainer&&t.endContainer&&0===t.startOffset&&t.endOffset===e.getChildCount()&&t.startContainer.equals(e)&&t.endContainer.equals(e)))},hasFiller:function(e){return 0<e.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(e){var t=new CKEDITOR.dom.element(this.fillerTagName);return t.setHtml(this.fillerContent),t.setAttribute(this.fillerAttribute,e?"end":"start"),t.setAttribute("data-cke-temp",1),t.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"}),t},removeFiller:function(e,t){if(e){var n,i,o=t.editor,a=t.editor.getSelection().getRanges()[0].startPath(),r=o.createRange();a.contains(e)&&(n=e.getHtml(),i=!0),a="start"==e.getAttribute(this.fillerAttribute),e.remove(),n&&0<n.length&&n!=this.fillerContent?(t.insertHtmlIntoRange(n,o.getSelection().getRanges()[0]),r.setStartAt(t.getChild(t.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),o.getSelection().selectRanges([r])):i&&(a?r.setStartAt(t.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):r.setEndAt(t.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),t.editor.getSelection().selectRanges([r]))}},createFillerRegex:function(e){var t=this.createFiller(e).getOuterHtml().replace(/style="[^"]*"/gi,'style="[^"]*"').replace(/>[^<]*</gi,">[^<]*<");return new RegExp((e?"":"^")+t+(e?"$":""))},addSelectAllIntegration:function(e){var t=this;e.editable().attachListener(e,"beforeCommandExec",(function(n){var i=e.editable();"selectAll"==n.data.name&&i&&t.addFillers(i)}),null,null,9999)}}}(),function(){function e(e){this.editor=e,this.registered={},this.instances={},this.selected=[],this.widgetHoldingFocusedEditable=this.focused=null,this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}},function(e){var n,i,o=e.editor;o.on("toHtml",(function(i){var o,a=function(e){var n=[],i=e._.upcasts,o=e._.upcastCallbacks;return{toBeWrapped:n,iterator:function(e){var a,r,s,l,c;if("data-cke-widget-wrapper"in e.attributes)return(e=e.getFirst(t.isParserWidgetElement))&&n.push([e]),!1;if("data-widget"in e.attributes)return n.push([e]),!1;if(c=i.length){if(e.attributes["data-cke-widget-upcasted"])return!1;for(l=0,a=o.length;l<a;++l)if(!1===o[l](e))return;for(l=0;l<c;++l)if(s={},r=(a=i[l])[0](e,s))return r instanceof CKEDITOR.htmlParser.element&&(e=r),e.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(s)),e.attributes["data-cke-widget-upcasted"]=1,n.push([e,a[1]]),!1}}}}(e);for(i.data.dataValue.forEach(a.iterator,CKEDITOR.NODE_ELEMENT,!0);o=a.toBeWrapped.pop();){var r=o[0],s=r.parent;s.type==CKEDITOR.NODE_ELEMENT&&s.attributes["data-cke-widget-wrapper"]&&s.replaceWith(r),e.wrapElement(o[0],o[1])}n=i.data.protectedWhitespaces?3==i.data.dataValue.children.length&&t.isParserWidgetWrapper(i.data.dataValue.children[1]):1==i.data.dataValue.children.length&&t.isParserWidgetWrapper(i.data.dataValue.children[0])}),null,null,8),o.on("dataReady",(function(){if(i)for(var n,a,r=o.editable().find(".cke_widget_wrapper"),s=0,l=r.count();s<l;++s)(a=(n=r.getItem(s)).getFirst(t.isDomWidgetElement)).type==CKEDITOR.NODE_ELEMENT&&a.data("widget")?(a.replace(n),e.wrapElement(a)):n.remove();i=0,e.destroyAll(!0),e.initOnAll()})),o.on("loadSnapshot",(function(t){/data-cke-widget/.test(t.data)&&(i=1),e.destroyAll(!0)}),null,null,9),o.on("paste",(function(e){(e=e.data).dataValue=e.dataValue.replace(K,f),e.range&&(e=t.getNestedEditable(o.editable(),e.range.startContainer))&&(e=CKEDITOR.filter.instances[e.data("cke-filter")])&&o.setActiveFilter(e)})),o.on("afterInsertHtml",(function(t){t.data.intoRange?e.checkWidgets({initOnlyNew:!0}):(o.fire("lockSnapshot"),e.checkWidgets({initOnlyNew:!0,focusInited:n}),o.fire("unlockSnapshot"))}))}(this),function(e){var n=e.editor,i={};n.on("toDataFormat",(function(n){var o=CKEDITOR.tools.getNextNumber(),a=[];n.data.downcastingSessionId=o,i[o]=a,n.data.dataValue.forEach((function(n){var i,o=n.attributes;if("data-cke-widget-white-space"in o){i=r(n);var l=s(n);i.parent.attributes["data-cke-white-space-first"]&&(i.value=i.value.replace(/^ /g," ")),l.parent.attributes["data-cke-white-space-last"]&&(l.value=l.value.replace(/ $/g," "))}if("data-cke-widget-id"in o)(o=e.instances[o["data-cke-widget-id"]])&&(i=n.getFirst(t.isParserWidgetElement),a.push({wrapper:n,element:i,widget:o,editables:{}}),"1"!=i.attributes["data-cke-widget-keep-attr"]&&delete i.attributes["data-widget"]);else if("data-cke-widget-editable"in o)return 0<a.length&&(a[a.length-1].editables[o["data-cke-widget-editable"]]=n),!1}),CKEDITOR.NODE_ELEMENT,!0)}),null,null,8),n.on("toDataFormat",(function(e){if(e.data.downcastingSessionId)for(var t,n,o,a,r,s,l=i[e.data.downcastingSessionId];t=l.shift();){for(s in n=t.widget,o=t.element,a=n._.downcastFn&&n._.downcastFn.call(n,o),e.data.widgetsCopy&&n.getClipboardHtml&&(a=(a=CKEDITOR.htmlParser.fragment.fromHtml(n.getClipboardHtml())).children[0]),t.editables)delete(r=t.editables[s]).attributes.contenteditable,r.setHtml(n.editables[s].getData());a||(a=o),t.wrapper.replaceWith(a)}}),null,null,13),n.on("contentDomUnload",(function(){e.destroyAll(!0)}))}(this),this.on("checkWidgets",o),this.editor.on("contentDomInvalidated",this.checkWidgets,this),function(e){function n(e){return e?e.type==CKEDITOR.NODE_TEXT?n(e.getParent()):a.widgets.getByElement(e):null}function o(){e.fire("checkSelection")}var a=e.editor;a.on("selectionCheck",o),a.on("contentDom",(function(){a.editable().attachListener(a,"key",(function(){setTimeout(o,10)}))})),CKEDITOR.env.ie||e.on("checkSelection",(function(){var e=a.getSelection();if(e&&(e=e.getRanges()[0])&&!e.collapsed){var t=n(e.startContainer),i=n(e.endContainer);!t&&i?(e.setEndBefore(i.wrapper),e.select()):t&&!i&&(e.setStartAfter(t.wrapper),e.select())}}));e.on("checkSelection",e.checkSelection,e),a.on("selectionChange",(function(n){var i=(n=t.getNestedEditable(a.editable(),n.data.selection.getStartElement()))&&e.getByElement(n),o=e.widgetHoldingFocusedEditable;o?o===i&&o.focusedEditable.equals(n)||(h(e,o,null),i&&n&&h(e,i,n)):i&&n&&h(e,i,n)})),a.on("dataReady",(function(){g(e).commit()})),a.on("blur",(function(){var t;(t=e.focused)&&i(e,t),(t=e.widgetHoldingFocusedEditable)&&h(e,t,null)}))}(this),function(e){var n=e.editor;n.on("contentDom",(function(){var i,o,a=n.editable(),r=a.isInline()?a:n.document;a.attachListener(r,"mousedown",(function(a){var r=a.data.getTarget();i=r instanceof CKEDITOR.dom.element?e.getByElement(r):null,o=0,i&&(i.inline&&r.type==CKEDITOR.NODE_ELEMENT&&r.hasAttribute("data-cke-widget-drag-handler")?(o=1,e.focused!=i&&n.getSelection().removeAllRanges()):t.getNestedEditable(i.wrapper,r)?i=null:(a.data.preventDefault(),CKEDITOR.env.ie||i.focus()))})),a.attachListener(r,"mouseup",(function(){o&&i&&i.wrapper&&(o=0,i.focus())})),CKEDITOR.env.ie&&a.attachListener(r,"mouseup",(function(){setTimeout((function(){i&&i.wrapper&&a.contains(i.wrapper)&&(i.focus(),i=null)}))}))})),n.on("doubleclick",(function(n){var i=e.getByElement(n.data.element);if(i&&!t.getNestedEditable(i.wrapper,n.data.element))return i.fire("doubleclick",{element:n.data.element})}),null,null,1)}(this),function(e){e.editor.on("key",(function(t){var n,i=e.focused,o=e.widgetHoldingFocusedEditable;return i?n=i.fire("key",{keyCode:t.data.keyCode}):o&&(i=t.data.keyCode,t=o.focusedEditable,i==CKEDITOR.CTRL+65?(i=t.getBogus(),(o=o.editor.createRange()).selectNodeContents(t),i&&o.setEndAt(i,CKEDITOR.POSITION_BEFORE_START),o.select(),n=!1):8==i||46==i?(n=o.editor.getSelection().getRanges(),o=n[0],n=!(1==n.length&&o.collapsed&&o.checkBoundaryOfElement(t,CKEDITOR[8==i?"START":"END"]))):n=void 0),n}),null,null,1)}(this),function(e){var n=e.editor,i=CKEDITOR.plugins.lineutils;n.on("dragstart",(function(i){var o=i.data.target;t.isDomDragHandler(o)&&(o=e.getByElement(o),i.data.dataTransfer.setData("cke/widget-id",o.id),n.focus(),o.focus())})),n.on("drop",(function(t){var i=(a=t.data.dataTransfer).getData("cke/widget-id"),o=a.getTransferType(n),a=n.createRange(),r=function(e){return(e=e.getBoundaryNodes().startNode).type!==CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),n.widgets.getByElement(e)}(t.data.dropRange);""!==i&&o===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?t.cancel():o==CKEDITOR.DATA_TRANSFER_INTERNAL&&(""===i&&0<n.widgets.selected.length?t.data.dataTransfer.setData("text/html",O(n)):(i=e.instances[i])&&(!function(e,t){return!(!e||!t)&&(e.wrapper.equals(t.wrapper)||e.wrapper.contains(t.wrapper))}(i,r)?(a.setStartBefore(i.wrapper),a.setEndAfter(i.wrapper),t.data.dragRange=a,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,t.data.dataTransfer.setData("text/html",i.getClipboardHtml()),n.widgets.destroy(i,!0)):t.cancel()))})),n.on("contentDom",(function(){var o=n.editable();CKEDITOR.tools.extend(e,{finder:new i.finder(n,{lookups:{default:function(n){if(!n.is(CKEDITOR.dtd.$listItem)&&n.is(CKEDITOR.dtd.$block)&&!t.isDomNestedEditable(n)&&!e._.draggedWidget.wrapper.contains(n)){var i=t.getNestedEditable(o,n);if(i){if(n=e._.draggedWidget,e.getByElement(i)==n)return;if(i=CKEDITOR.filter.instances[i.data("cke-filter")],n=n.requiredContent,i&&n&&!i.check(n))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new i.locator(n),liner:new i.liner(n,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)}))}(this),function(e){function t(t){1>e.selected.length||E(n,"cut"===t.name)}var n=e.editor;n.on("contentDom",(function(){var e=n.editable();e.attachListener(e,"copy",t),e.attachListener(e,"cut",t)}))}(this)}function t(e,n,i,o,a){var r=e.editor;CKEDITOR.tools.extend(this,o,{editor:r,id:n,inline:"span"==i.getParent().getName(),element:i,data:CKEDITOR.tools.extend({},"function"==typeof o.defaults?o.defaults():o.defaults),dataReady:!1,inited:!1,ready:!1,edit:t.prototype.edit,focusedEditable:null,definition:o,repository:e,draggable:!1!==o.draggable,_:{downcastFn:o.downcast&&"string"==typeof o.downcast?o.downcasts[o.downcast]:o.downcast}},!0),e.fire("instanceCreated",this),function(e,n){(function(e){(e.wrapper=e.element.getParent()).setAttribute("data-cke-widget-id",e.id)})(e),D(e),function(e){var t,n,i=e.editables;if(e.editables={},e.editables)for(t in i)n=i[t],e.initEditable(t,"string"==typeof n?{selector:n}:n)}(e),R(e),function(e){if(e.draggable){var n,i=e.editor,o=e.wrapper.getLast(t.isDomDragHandlerContainer);o?n=o.findOne("img"):((o=new CKEDITOR.dom.element("span",i.document)).setAttributes({class:"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+i.plugins.widget.path+"images/handle.png);display:none;"}),(n=new CKEDITOR.dom.element("img",i.document)).setAttributes({class:"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:i.lang.widget.move,height:15,role:"presentation"}),e.inline&&n.setAttribute("draggable","true"),o.append(n),e.wrapper.append(o)),e.wrapper.on("dragover",(function(e){e.data.preventDefault()})),e.wrapper.on("mouseenter",e.updateDragHandlerPosition,e),setTimeout((function(){e.on("data",e.updateDragHandlerPosition,e)}),50),!e.inline&&(n.on("mousedown",b,e),CKEDITOR.env.ie&&9>CKEDITOR.env.version)&&n.on("dragstart",(function(e){e.data.preventDefault(!0)})),e.dragHandlerContainer=o}}(e),function(e){var t=null;e.on("data",(function(){var e,n=this.data.classes;if(t!=n){for(e in t)n&&n[e]||this.removeClass(e);for(e in n)this.addClass(e);t=n}}))}(e),function(e){e.on("data",(function(){if(e.wrapper){var t=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());e.wrapper.setAttribute("role","region"),e.wrapper.setAttribute("aria-label",t)}}),null,null,9999)}(e),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&e.wrapper.on("dragstart",(function(n){var i=n.data.getTarget();t.getNestedEditable(e,i)||e.inline&&t.isDomDragHandler(i)||n.data.preventDefault()}));e.wrapper.removeClass("cke_widget_new"),e.element.addClass("cke_widget_element"),e.on("key",(function(t){if(13==(t=t.data.keyCode))e.edit();else{if(t==CKEDITOR.CTRL+67||t==CKEDITOR.CTRL+88)return void E(e.editor,t==CKEDITOR.CTRL+88);if(t in k||CKEDITOR.CTRL&t||CKEDITOR.ALT&t)return}return!1}),null,null,999),e.on("doubleclick",(function(t){e.edit()&&t.cancel()})),n.data&&e.on("data",n.data);n.edit&&e.on("edit",n.edit)}(this,o),this.init&&this.init(),this.inited=!0,(e=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(e))),a&&this.setData(a),this.data.classes||this.setData("classes",this.getClasses()),this.dataReady=!0,y(this),this.fire("data",this.data),this.isInited()&&r.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function n(e,t,n){CKEDITOR.dom.element.call(this,t.$),this.editor=e,this._={},t=this.filter=n.filter,CKEDITOR.dtd[this.getName()].p?(this.enterMode=t?t.getAllowedEnterMode(e.enterMode):e.enterMode,this.shiftEnterMode=t?t.getAllowedEnterMode(e.shiftEnterMode,!0):e.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function i(e,t){if(e.focused=null,t.isInited()){var n=t.editor.checkDirty();e.fire("widgetBlurred",{widget:t}),t.setFocused(!1),!n&&t.editor.resetDirty()}}function o(e){if(e=e.data,"wysiwyg"==this.editor.mode){var n,i,o,a,r=this.editor.editable(),s=this.instances;if(r){for(n in s)s[n].isReady()&&!r.contains(s[n].wrapper)&&this.destroy(s[n],!0);if(e&&e.initOnlyNew)s=this.initOnAll();else{var l=r.find(".cke_widget_wrapper");s=[];for(n=0,i=l.count();n<i;n++){if(o=l.getItem(n),a=!this.getByElement(o,!0)){e:{a=u;for(var c=o;c=c.getParent();)if(a(c)){a=!0;break e}a=!1}a=!a}a&&r.contains(o)&&(o.addClass("cke_widget_new"),s.push(this.initOn(o.getFirst(t.isDomWidgetElement))))}}e&&e.focusInited&&1==s.length&&s[0].focus()}}}function a(e){if(void 0!==e.attributes&&e.attributes["data-widget"]){var t=r(e),n=s(e),i=!1;t&&t.value&&t.value.match(/^\s/g)&&(t.parent.attributes["data-cke-white-space-first"]=1,t.value=t.value.replace(/^\s/g," "),i=!0),n&&n.value&&n.value.match(/\s$/g)&&(n.parent.attributes["data-cke-white-space-last"]=1,n.value=n.value.replace(/\s$/g," "),i=!0),i&&(e.attributes["data-cke-widget-white-space"]=1)}}function r(e){return e.find((function(e){return 3===e.type}),!0).shift()}function s(e){return e.find((function(e){return 3===e.type}),!0).pop()}function l(e,t,n){if(!n.allowedContent&&!n.disallowedContent)return null;var i=this._.filters[e];return i||(this._.filters[e]=i={}),(e=i[t])||(e=n.allowedContent?new CKEDITOR.filter(n.allowedContent):this.editor.filter.clone(),i[t]=e,n.disallowedContent&&e.disallow(n.disallowedContent)),e}function c(e,t){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off",class:"cke_widget_wrapper cke_widget_new cke_widget_"+(e?"inline":"block")+(t?" cke_widget_"+t:"")}}function d(e,t){return"boolean"==typeof e.inline?e.inline:!!CKEDITOR.dtd.$inline[t]}function u(e){return e.hasAttribute("data-cke-temp")}function h(e,t,n,i){var o=e.editor;o.fire("lockSnapshot"),n?(i=n.data("cke-widget-editable"),i=t.editables[i],e.widgetHoldingFocusedEditable=t,t.focusedEditable=i,n.addClass("cke_widget_editable_focused"),i.filter&&o.setActiveFilter(i.filter),o.setActiveEnterMode(i.enterMode,i.shiftEnterMode)):(i||t.focusedEditable.removeClass("cke_widget_editable_focused"),t.focusedEditable=null,e.widgetHoldingFocusedEditable=null,o.setActiveFilter(null),o.setActiveEnterMode(null,null)),o.fire("unlockSnapshot")}function f(e,t){return CKEDITOR.tools.trim(t)}function g(e){var t=e.selected,n=[],o=t.slice(0),a=null;return{select:function(e){return 0>CKEDITOR.tools.indexOf(t,e)&&n.push(e),0<=(e=CKEDITOR.tools.indexOf(o,e))&&o.splice(e,1),this},focus:function(e){return a=e,this},commit:function(){var r,s,l=e.focused!==a;for(e.editor.fire("lockSnapshot"),l&&(r=e.focused)&&i(e,r);r=o.pop();)t.splice(CKEDITOR.tools.indexOf(t,r),1),r.isInited()&&(s=r.editor.checkDirty(),r.setSelected(!1),!s&&r.editor.resetDirty());for(l&&a&&(s=e.editor.checkDirty(),e.focused=a,e.fire("widgetFocused",{widget:a}),a.setFocused(!0),!s&&e.editor.resetDirty());r=n.pop();)t.push(r),r.setSelected(!0);e.editor.fire("unlockSnapshot")}}}function m(e,t,n){var i=0;t=T(t);var o,a=e.data.classes||{};if(t){for(a=CKEDITOR.tools.clone(a);o=t.pop();)n?a[o]||(i=a[o]=1):a[o]&&(delete a[o],i=1);i&&e.setData("classes",a)}}function p(e){e.cancel()}function E(e,t){var n,i,o,a=e.widgets.focused;w.hasCopyBin(e)||(i=new w(e,{beforeDestroy:function(){!t&&a&&a.focus(),o&&e.getSelection().selectBookmarks(o),n&&CKEDITOR.plugins.widgetselection.addFillers(e.editable())},afterDestroy:function(){t&&!e.readOnly&&(a?e.widgets.del(a):e.extractSelectedHtml(),e.fire("saveSnapshot"))}}),a||(n=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(e.editable()),o=e.getSelection().createBookmarks(!0)),i.handle(O(e)))}function T(e){return(e=(e=e.getDefinition().attributes)&&e.class)?e.split(/\s+/):null}function C(){var e=CKEDITOR.document.getActive(),t=this.editor,n=t.editable();(n.isInline()?n:t.document.getWindow().getFrame()).equals(e)&&t.focusManager.focus(n)}function I(){CKEDITOR.env.gecko&&this.editor.unlockSelection(),CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function O(e){var t=e.getSelectedHtml(!0);return e.widgets.focused?e.widgets.focused.getClipboardHtml():(e.once("toDataFormat",(function(e){e.data.widgetsCopy=!0}),null,null,-1),e.dataProcessor.toDataFormat(t))}function D(e,t){if(e.partSelectors||(e.partSelectors=e.parts),e.parts){var n,i,o={};for(i in e.partSelectors)t||!e.parts[i]||"string"==typeof e.parts[i]?(n=e.wrapper.findOne(e.partSelectors[i]),o[i]=n):o[i]=e.parts[i];e.parts=o}}function R(e){if(!0===e.mask)!function(e){var t=e.wrapper.findOne(".cke_widget_mask");t||((t=new CKEDITOR.dom.element("img",e.editor.document)).setAttributes({src:CKEDITOR.tools.transparentImageData,class:"cke_reset cke_widget_mask"}),e.wrapper.append(t)),e.mask=t}(e);else if(e.mask){var t,n,i=new CKEDITOR.tools.buffers.throttle(250,v,e),o=CKEDITOR.env.gecko?300:0;if(e.on("focus",(function(){i.input(),t=e.editor.on("change",i.input),n=e.on("blur",(function(){t.removeListener(),n.removeListener()}))})),e.editor.on("instanceReady",(function(){setTimeout((function(){i.input()}),o)})),e.editor.on("mode",(function(){setTimeout((function(){i.input()}),o)})),CKEDITOR.env.gecko){var a=e.element.find("img");CKEDITOR.tools.array.forEach(a.toArray(),(function(e){e.on("load",(function(){i.input()}))}))}for(var r in e.editables)e.editables[r].on("focus",(function(){e.editor.on("change",i.input),n&&n.removeListener()})),e.editables[r].on("blur",(function(){e.editor.removeListener("change",i.input)}));i.input()}}function v(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var e,t=this.parts[this.maskPart];if(t&&"string"!=typeof t){(e=this.wrapper.findOne(".cke_widget_partial_mask"))||((e=new CKEDITOR.dom.element("img",this.editor.document)).setAttributes({src:CKEDITOR.tools.transparentImageData,class:"cke_reset cke_widget_partial_mask"}),this.wrapper.append(e)),this.mask=e;var n=e.$,i=t.$,o=!(n.offsetTop==i.offsetTop&&n.offsetLeft==i.offsetLeft);(n.offsetWidth!=i.offsetWidth||n.offsetHeight!=i.offsetHeight||o)&&(n=t.getParent(),i=CKEDITOR.plugins.widget.isDomWidget(n),e.setStyles({top:t.$.offsetTop+(i?0:n.$.offsetTop)+"px",left:t.$.offsetLeft+(i?0:n.$.offsetLeft)+"px",width:t.$.offsetWidth+"px",height:t.$.offsetHeight+"px"}))}}}function b(e){function t(){var t;for(h.reset();t=c.pop();)t.removeListener();var n=d;t=e.sender;var i=this.repository.finder,o=this.repository.liner,a=this.editor,r=this.editor.editable();CKEDITOR.tools.isEmpty(o.visible)||(n=i.getRange(n[0]),this.focus(),a.fire("drop",{dropRange:n,target:n.startContainer})),r.removeClass("cke_widget_dragging"),o.hideVisible(),a.fire("dragend",{target:t})}if(CKEDITOR.tools.getMouseButton(e)===CKEDITOR.MOUSE_BUTTON_LEFT){var n,i,o=this.repository.finder,a=this.repository.locator,r=this.repository.liner,s=this.editor,l=s.editable(),c=[],d=[];this.repository._.draggedWidget=this;var u=o.greedySearch(),h=CKEDITOR.tools.eventsBuffer(50,(function(){n=a.locate(u),(d=a.sort(i,1)).length&&(r.prepare(u,n),r.placeLine(d[0]),r.cleanup())}));l.addClass("cke_widget_dragging"),c.push(l.on("mousemove",(function(e){i=e.data.$.clientY,h.input()}))),s.fire("dragstart",{target:e.sender}),c.push(s.document.once("mouseup",t,this)),l.isInline()||c.push(CKEDITOR.document.once("mouseup",t,this))}}function y(e){e.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(e.data)))}function _(){function e(){}function n(e,t,n){return!(!n||!this.checkElement(e))&&((e=n.widgets.getByElement(e,!0))&&e.checkStyleActive(this))}function i(e){function t(e,t,n){for(var i=e.length,o=0;o<i;){if(t.call(n,e[o],o,e))return e[o];o++}}function n(e){return function(t){return function e(t,n){var i=CKEDITOR.tools.object.keys(t),o=CKEDITOR.tools.object.keys(n);if(i.length!==o.length)return!1;for(var a in t)if(("object"!=typeof t[a]||"object"!=typeof n[a]||!e(t[a],n[a]))&&t[a]!==n[a])return!1;return!0}(e.getDefinition(),t.getDefinition())}}var i,a=e.widget;o[a]||(o[a]={});for(var r=0,s=e.group.length;r<s;r++)i=e.group[r],o[a][i]||(o[a][i]=[]),t(i=o[a][i],n(e))||i.push(e)}var o={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(e){this.widget=e.widget,(this.group="string"==typeof e.group?[e.group]:e.group)&&i(this)},apply:function(e){var t;e instanceof CKEDITOR.editor&&this.checkApplicable(e.elementPath(),e)&&(t=e.widgets.focused,this.group&&this.removeStylesFromSameGroup(e),t.applyStyle(this))},remove:function(e){e instanceof CKEDITOR.editor&&this.checkApplicable(e.elementPath(),e)&&e.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(e){var t,n,i=!1;if(!(e instanceof CKEDITOR.editor))return!1;if(n=e.elementPath(),this.checkApplicable(n,e))for(var a=0,r=this.group.length;a<r;a++){t=o[this.widget][this.group[a]];for(var s=0;s<t.length;s++)t[s]!==this&&t[s].checkActive(n,e)&&(e.widgets.focused.removeStyle(t[s]),i=!0)}return i},checkActive:function(e,t){return this.checkElementMatch(e.lastElement,0,t)},checkApplicable:function(e,t){return t instanceof CKEDITOR.editor&&this.checkElement(e.lastElement)},checkElementMatch:n,checkElementRemovable:n,checkElement:function(e){return!!t.isDomWidgetWrapper(e)&&((e=e.getFirst(t.isDomWidgetElement))&&e.data("widget")==this.widget)},buildPreview:function(e){return e||this._.definition.name},toAllowedContentRules:function(e){if(!e)return null;var t,n={};return(e=e.widgets.registered[this.widget])?e.styleableElements?(t=this.getClassesArray())?(n[e.styleableElements]={classes:t,propertiesOnly:!0},n):null:e.styleToAllowedContentRules?e.styleToAllowedContentRules(this):null:null},getClassesArray:function(){var e=this._.definition.attributes&&this._.definition.attributes.class;return e?CKEDITOR.tools.trim(e).split(/\s+/):null},applyToRange:e,removeFromRange:e,applyToObject:e})}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss('.cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover>.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused>.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:block;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover>.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable="false"] .cke_widget_drag_handler_container{display:none;}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_widget_partial_mask{position:absolute;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}'),_())},beforeInit:function(t){void 0!==CKEDITOR.document.$.querySelectorAll&&(t.widgets=new e(t))},afterInit:function(e){if(void 0!==CKEDITOR.document.$.querySelectorAll){var t,n,i,o=e.widgets.registered;for(n in o)(i=(t=o[n]).button)&&e.ui.addButton&&e.ui.addButton(CKEDITOR.tools.capitalize(t.name,!0),{label:i,command:t.name,toolbar:"insert,10"});!function(e){e.contextMenu&&e.contextMenu.addListener((function(t){if(t=e.widgets.getByElement(t,!0))return t.fire("contextMenu",{})}))}(e),function(e){e&&e.addFilterRule((function(e){return e.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"").replace(/<span[^>]*cke_widget_drag_handler_container[^>]*.*?<\/span>/gim,"")}))}(e.undoManager)}}}),e.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(e,t){var n=this.editor;if((t=CKEDITOR.tools.prototypedCopy(t)).name=e,t._=t._||{},n.fire("widgetDefinition",t),t.template&&(t.template=new CKEDITOR.template(t.template)),function(e,t){e.addCommand(t.name,{exec:function(e,n){function i(){e.widgets.finalizeCreation(s)}if((a=e.widgets.focused)&&a.name==t.name)a.edit();else if(t.insert)t.insert({editor:e,commandData:n});else if(t.template){var o,a="function"==typeof t.defaults?t.defaults():t.defaults,r=(a=CKEDITOR.dom.element.createFromHtml(t.template.output(a),e.document),e.widgets.wrapElement(a,t.name)),s=new CKEDITOR.dom.documentFragment(r.getDocument());s.append(r),(o=e.widgets.initOn(a,t,n&&n.startupData))?(a=o.once("edit",(function(t){t.data.dialog?o.once("dialog",(function(t){var n,a;t=t.data,n=t.once("ok",i,null,null,20),a=t.once("cancel",(function(t){t.data&&!1===t.data.hide||e.widgets.destroy(o,!0)})),t.once("hide",(function(){n.removeListener(),a.removeListener()}))})):i()}),null,null,999),o.edit(),a.removeListener()):i()}},allowedContent:t.allowedContent,requiredContent:t.requiredContent,contentForms:t.contentForms,contentTransformations:t.contentTransformations})}(n,t),function(e,t){function n(t,n,i){var o=CKEDITOR.tools.getIndex(e._.upcasts,(function(e){return e[2]>i}));0>o&&(o=e._.upcasts.length),e._.upcasts.splice(o,0,[CKEDITOR.tools.bind(t,n),n.name,i])}var i=t.upcast,o=t.upcastPriority||10;i&&n("string"==typeof i?function(e,n){var i,o,a=t.upcast.split(",");for(o=0;o<a.length;o++)if((i=a[o])===e.name)return t.upcasts[i].call(this,e,n);return!1}:i,t,o)}(this,t),this.registered[e]=t,t.dialog&&n.plugins.dialog)var i=CKEDITOR.on("dialogDefinition",(function(e){var o=(e=e.data.definition).dialog;e.getMode||o.getName()!==t.dialog||(e.getMode=function(){var e=o.getModel(n);return e&&e instanceof CKEDITOR.plugins.widget&&e.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE}),i.removeListener()}));return t},addUpcastCallback:function(e){this._.upcastCallbacks.push(e)},checkSelection:function(){if(this.editor.getSelection()){var e,n=this.editor.getSelection(),i=n.getSelectedElement(),o=g(this);if(i&&(e=this.getByElement(i,!0)))return o.focus(e).select(e).commit();if(!(n=n.getRanges()[0])||n.collapsed)return o.commit();for((n=new CKEDITOR.dom.walker(n)).evaluator=t.isDomWidgetWrapper;i=n.next();)o.select(this.getByElement(i));o.commit()}},checkWidgets:function(e){this.fire("checkWidgets",CKEDITOR.tools.copy(e||{}))},del:function(e){if(this.focused===e){var t,n=e.editor,i=n.createRange();(t=i.moveToClosestEditablePosition(e.wrapper,!0))||(t=i.moveToClosestEditablePosition(e.wrapper,!1)),t&&n.getSelection().selectRanges([i])}e.wrapper.remove(),this.destroy(e,!0)},destroy:function(e,t){this.widgetHoldingFocusedEditable===e&&h(this,e,null,t),e.destroy(t),delete this.instances[e.id],this.fire("instanceDestroyed",e)},destroyAll:function(e,t){var n,i,o=this.instances;if(t&&!e){o=(i=t.find(".cke_widget_wrapper")).count();for(var a=0;a<o;++a)(n=this.getByElement(i.getItem(a),!0))&&this.destroy(n)}else for(i in o)n=o[i],this.destroy(n,e)},finalizeCreation:function(e){(e=e.getFirst())&&t.isDomWidgetWrapper(e)&&(this.editor.insertElement(e),(e=this.getByElement(e)).ready=!0,e.fire("ready"),e.focus())},getByElement:function(){function e(e){return e.is(t)&&e.data("cke-widget-id")}var t={div:1,span:1};return function(t,n){if(!t)return null;var i=e(t);if(!n&&!i){var o=this.editor.editable();do{t=t.getParent()}while(t&&!t.equals(o)&&!(i=e(t)))}return this.instances[i]||null}}(),initOn:function(e,n,i){if(n?"string"==typeof n&&(n=this.registered[n]):n=this.registered[e.data("widget")],!n)return null;var o=this.wrapElement(e,n.name);return o?o.hasClass("cke_widget_new")?(e=new t(this,this._.nextId++,e,n,i)).isInited()?this.instances[e.id]=e:null:this.getByElement(e):null},initOnAll:function(e){for(var n,i=[],o=(e=(e||this.editor.editable()).find(".cke_widget_new")).count();o--;)(n=this.initOn(e.getItem(o).getFirst(t.isDomWidgetElement)))&&i.push(n);return i},onWidget:function(e){var t=Array.prototype.slice.call(arguments);for(var n in t.shift(),this.instances){var i=this.instances[n];i.name==e&&i.on.apply(i,t)}this.on("instanceCreated",(function(n){(n=n.data).name==e&&n.on.apply(n,t)}))},parseElementClasses:function(e){if(!e)return null;e=CKEDITOR.tools.trim(e).split(/\s+/);for(var t,n={},i=0;t=e.pop();)-1==t.indexOf("cke_")&&(n[t]=i=1);return i?n:null},wrapElement:function(e,t){var n,i,o=null;if(e instanceof CKEDITOR.dom.element){if(t=t||e.data("widget"),!(n=this.registered[t]))return null;if((o=e.getParent())&&o.type==CKEDITOR.NODE_ELEMENT&&o.data("cke-widget-wrapper"))return o;e.hasAttribute("data-cke-widget-keep-attr")||e.data("cke-widget-keep-attr",e.data("widget")?1:0),e.data("widget",t),(i=d(n,e.getName()))&&a(e),(o=new CKEDITOR.dom.element(i?"span":"div",e.getDocument())).setAttributes(c(i,t)),o.data("cke-display-name",n.pathName?n.pathName:e.getName()),e.getParent(!0)&&o.replace(e),e.appendTo(o)}else if(e instanceof CKEDITOR.htmlParser.element){if(t=t||e.attributes["data-widget"],!(n=this.registered[t]))return null;if((o=e.parent)&&o.type==CKEDITOR.NODE_ELEMENT&&o.attributes["data-cke-widget-wrapper"])return o;var r;"data-cke-widget-keep-attr"in e.attributes||(e.attributes["data-cke-widget-keep-attr"]=e.attributes["data-widget"]?1:0),t&&(e.attributes["data-widget"]=t),(i=d(n,e.name))&&a(e),(o=new CKEDITOR.htmlParser.element(i?"span":"div",c(i,t))).attributes["data-cke-display-name"]=n.pathName?n.pathName:e.name,(n=e.parent)&&(r=e.getIndex(),e.remove()),o.add(e),n&&function e(t,n,i){if(t.type==CKEDITOR.NODE_ELEMENT&&(o=CKEDITOR.dtd[t.name])&&!o[i.name]){var o=t.split(n),a=t.parent;return n=o.getIndex(),t.children.length||(--n,t.remove()),o.children.length||o.remove(),e(a,n,i)}t.add(i,n)}(n,r,o)}return o},_tests_createEditableFilter:l},CKEDITOR.event.implementOn(e.prototype),t.prototype={addClass:function(e){this.element.addClass(e),this.wrapper.addClass(t.WRAPPER_CLASS_PREFIX+e)},applyStyle:function(e){m(this,e,1)},checkStyleActive:function(e){var t;if(!(e=T(e)))return!1;for(;t=e.pop();)if(!this.hasClass(t))return!1;return!0},destroy:function(e){if(this.fire("destroy"),this.editables)for(var t in this.editables)this.destroyEditable(t,e);e||("0"==this.element.data("cke-widget-keep-attr")&&this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper)),this.wrapper=null},destroyEditable:function(e,t){var n=this.editables[e],i=!0;if(n.removeListener("focus",I),n.removeListener("blur",C),this.editor.focusManager.remove(n),n.filter){for(var o in this.repository.instances){var a=this.repository.instances[o];a.editables&&(a=a.editables[e])&&a!==n&&n.filter===a.filter&&(i=!1)}i&&(n.filter.destroy(),(i=this.repository._.filters[this.name])&&delete i[e])}t||(this.repository.destroyAll(!1,n),n.removeClass("cke_widget_editable"),n.removeClass("cke_widget_editable_focused"),n.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"])),delete this.editables[e]},edit:function(){var e={dialog:this.dialog},t=this;return!(!1===this.fire("edit",e)||!e.dialog)&&(this.editor.openDialog(e.dialog,(function(e){var n,i;!1!==t.fire("dialog",e)&&(n=e.on("show",(function(){e.setupContent(t)})),i=e.on("ok",(function(){var n,i=t.on("data",(function(e){n=1,e.cancel()}),null,null,0);t.editor.fire("saveSnapshot"),e.commitContent(t),i.removeListener(),n&&(t.fire("data",t.data),t.editor.fire("saveSnapshot"))})),e.once("hide",(function(){n.removeListener(),i.removeListener()})))}),t),!0)},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var e=this.editor.createRange();return e.setStartBefore(this.wrapper),e.setEndAfter(this.wrapper),this.editor.editable().getHtmlFromRange(e).getHtml()},hasClass:function(e){return this.element.hasClass(e)},initEditable:function(e,t){var i=this._findOneNotNested(t.selector);return!(!i||!i.is(CKEDITOR.dtd.$editable))&&(i=new n(this.editor,i,{filter:l.call(this.repository,this.name,e,t)}),this.editables[e]=i,i.setAttributes({contenteditable:"true","data-cke-widget-editable":e,"data-cke-enter-mode":i.enterMode}),i.filter&&i.data("cke-filter",i.filter.id),i.addClass("cke_widget_editable"),i.removeClass("cke_widget_editable_focused"),t.pathName&&i.data("cke-display-name",t.pathName),this.editor.focusManager.add(i),i.on("focus",I,this),CKEDITOR.env.ie&&i.on("blur",C,this),i._.initialSetData=!0,i.setData(i.getHtml()),!0)},_findOneNotNested:function(e){e=this.wrapper.find(e);for(var n,i,o=0;o<e.count();o++)if(i=(n=e.getItem(o)).getAscendant(t.isDomWidgetWrapper),this.wrapper.equals(i))return n;return null},isInited:function(){return!(!this.wrapper||!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var e=this.editor.getSelection();if(e){var t=this.editor.checkDirty();e.fake(this.wrapper),!t&&this.editor.resetDirty()}this.editor.focus()},refreshMask:function(){R(this)},refreshParts:function(e){D(this,void 0===e||e)},removeClass:function(e){this.element.removeClass(e),this.wrapper.removeClass(t.WRAPPER_CLASS_PREFIX+e)},removeStyle:function(e){m(this,e,0)},setData:function(e,t){var n=this.data,i=0;if("string"==typeof e)n[e]!==t&&(n[e]=t,i=1);else{var o=e;for(e in o)n[e]!==o[e]&&(i=1,n[e]=o[e])}return i&&this.dataReady&&(y(this),this.fire("data",n)),this},setFocused:function(e){return this.wrapper[e?"addClass":"removeClass"]("cke_widget_focused"),this.fire(e?"focus":"blur"),this},setSelected:function(e){return this.wrapper[e?"addClass":"removeClass"]("cke_widget_selected"),this.fire(e?"select":"deselect"),this},updateDragHandlerPosition:function(){var e=this.editor,t=this.element.$,n=this._.dragHandlerOffset;t={x:t.offsetLeft,y:t.offsetTop-15};n&&t.x==n.x&&t.y==n.y||(n=e.checkDirty(),e.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:t.y+"px",left:t.x+"px"}),this.dragHandlerContainer.removeStyle("display"),e.fire("unlockSnapshot"),!n&&e.resetDirty(),this._.dragHandlerOffset=t)}},CKEDITOR.event.implementOn(t.prototype),t.getNestedEditable=function(e,n){return!n||n.equals(e)?null:t.isDomNestedEditable(n)?n:t.getNestedEditable(e,n.getParent())},t.isDomDragHandler=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-drag-handler")},t.isDomDragHandlerContainer=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasClass("cke_widget_drag_handler_container")},t.isDomNestedEditable=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-editable")},t.isDomWidgetElement=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-widget")},t.isDomWidgetWrapper=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-wrapper")},t.isDomWidget=function(e){return!!e&&(this.isDomWidgetWrapper(e)||this.isDomWidgetElement(e))},t.isParserWidgetElement=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&!!e.attributes["data-widget"]},t.isParserWidgetWrapper=function(e){return e.type==CKEDITOR.NODE_ELEMENT&&!!e.attributes["data-cke-widget-wrapper"]},t.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_",n.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(e){this._.initialSetData||this.editor.widgets.destroyAll(!1,this),this._.initialSetData=!1,e=this.editor.dataProcessor.unprotectSource(e),e=this.editor.dataProcessor.toHtml(e,{context:this.getName(),filter:this.filter,enterMode:this.enterMode}),this.setHtml(e),this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var K=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,k={37:1,38:1,39:1,40:1,8:1,46:1};k[CKEDITOR.SHIFT+121]=1;var w=CKEDITOR.tools.createClass({$:function(e,t){this._.createCopyBin(e,t),this._.createListeners(t)},_:{createCopyBin:function(e){var t=e.document,n=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,i=!e.blockless&&!CKEDITOR.env.ie||n?"div":"span";n=t.createElement(i);(t=t.createElement(i)).setAttributes({id:"cke_copybin","data-cke-temp":"1"}),n.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"}),n.setStyle("ltr"==e.config.contentsLangDirection?"left":"right","-5000px"),this.editor=e,this.copyBin=n,this.container=t},createListeners:function(e){e&&(e.beforeDestroy&&(this.beforeDestroy=e.beforeDestroy),e.afterDestroy&&(this.afterDestroy=e.afterDestroy))}},proto:{handle:function(e){var t,n,i,o=this.copyBin,a=this.editor,r=this.container,s=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.document.getDocumentElement().$,c=a.createRange(),d=this,u=CKEDITOR.env.mac&&CKEDITOR.env.webkit,h=u?100:0,f=window.requestAnimationFrame&&!u?requestAnimationFrame:setTimeout;return o.setHtml('<span data-cke-copybin-start="1"></span>'+e+'<span data-cke-copybin-end="1"></span>'),a.fire("lockSnapshot"),r.append(o),a.editable().append(r),t=a.on("selectionChange",p,null,null,0),n=a.widgets.on("checkSelection",p,null,null,0),s&&(i=l.scrollTop),c.selectNodeContents(o),c.select(),s&&(l.scrollTop=i),new CKEDITOR.tools.promise((function(e){f((function(){d.beforeDestroy&&d.beforeDestroy(),r.remove(),t.removeListener(),n.removeListener(),a.fire("unlockSnapshot"),d.afterDestroy&&d.afterDestroy(),e()}),h)}))}},statics:{hasCopyBin:function(e){return!!w.getCopyBin(e)},getCopyBin:function(e){return e.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=t,t.repository=e,t.nestedEditable=n}(),function(){function e(e,t,n){this.editor=e,this.notification=null,this._message=new CKEDITOR.template(t),this._singularMessage=n?new CKEDITOR.template(n):null,this._tasks=[],this._doneTasks=this._doneWeights=this._totalWeights=0}function t(e){this._weight=e||1,this._doneWeight=0,this._isCanceled=!1}CKEDITOR.plugins.add("notificationaggregator",{requires:"notification"}),e.prototype={createTask:function(e){e=e||{};var t,n=!this.notification;return n&&(this.notification=this._createNotification()),(t=this._addTask(e)).on("updated",this._onTaskUpdate,this),t.on("done",this._onTaskDone,this),t.on("canceled",(function(){this._removeTask(t)}),this),this.update(),n&&this.notification.show(),t},update:function(){this._updateNotification(),this.isFinished()&&this.fire("finished")},getPercentage:function(){return 0===this.getTaskCount()?1:this._doneWeights/this._totalWeights},isFinished:function(){return this.getDoneTaskCount()===this.getTaskCount()},getTaskCount:function(){return this._tasks.length},getDoneTaskCount:function(){return this._doneTasks},_updateNotification:function(){this.notification.update({message:this._getNotificationMessage(),progress:this.getPercentage()})},_getNotificationMessage:function(){var e=this.getTaskCount(),t={current:this.getDoneTaskCount(),max:e,percentage:Math.round(100*this.getPercentage())};return(1==e&&this._singularMessage?this._singularMessage:this._message).output(t)},_createNotification:function(){return new CKEDITOR.plugins.notification(this.editor,{type:"progress"})},_addTask:function(e){return e=new t(e.weight),this._tasks.push(e),this._totalWeights+=e._weight,e},_removeTask:function(e){var t=CKEDITOR.tools.indexOf(this._tasks,e);-1!==t&&(e._doneWeight&&(this._doneWeights-=e._doneWeight),this._totalWeights-=e._weight,this._tasks.splice(t,1),this.update())},_onTaskUpdate:function(e){this._doneWeights+=e.data,this.update()},_onTaskDone:function(){this._doneTasks+=1,this.update()}},CKEDITOR.event.implementOn(e.prototype),t.prototype={done:function(){this.update(this._weight)},update:function(e){if(!this.isDone()&&!this.isCanceled()){var t=(e=Math.min(this._weight,e))-this._doneWeight;this._doneWeight=e,this.fire("updated",t),this.isDone()&&this.fire("done")}},cancel:function(){this.isDone()||this.isCanceled()||(this._isCanceled=!0,this.fire("canceled"))},isDone:function(){return this._weight===this._doneWeight},isCanceled:function(){return this._isCanceled}},CKEDITOR.event.implementOn(t.prototype),CKEDITOR.plugins.notificationAggregator=e,CKEDITOR.plugins.notificationAggregator.task=t}(),CKEDITOR.plugins.add("uploadwidget",{requires:"widget,clipboard,filetools,notificationaggregator",init:function(e){e.filter.allow("*[!data-widget,!data-cke-upload-id]")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}}),CKEDITOR.fileTools||(CKEDITOR.fileTools={}),CKEDITOR.tools.extend(CKEDITOR.fileTools,{addUploadWidget:function(e,t,n){var i=CKEDITOR.fileTools,o=e.uploadRepository,a=n.supportedTypes?10:20;n.fileToElement&&e.on("paste",(function(n){n=n.data;var a,r,s=e.widgets.registered[t],l=n.dataTransfer,c=l.getFilesCount(),d=s.loadMethod||"loadAndUpload";if(!n.dataValue&&c)for(r=0;r<c;r++)if(a=l.getFile(r),!s.supportedTypes||i.isTypeSupported(a,s.supportedTypes)){var u=s.fileToElement(a);a=o.create(a,void 0,s.loaderType),u&&(a[d](s.uploadUrl,s.additionalRequestParameters),CKEDITOR.fileTools.markElement(u,t,a.id),"loadAndUpload"!=d&&"upload"!=d||s.skipNotifications||CKEDITOR.fileTools.bindNotifications(e,a),n.dataValue+=u.getOuterHtml())}}),null,null,a),CKEDITOR.tools.extend(n,{downcast:function(){return new CKEDITOR.htmlParser.text("")},init:function(){var t,n,i=this,a=this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),r=o.loaders[a],s=CKEDITOR.tools.capitalize;r.on("update",(function(o){"abort"===r.status&&"function"==typeof i.onAbort&&i.onAbort(r),i.wrapper&&i.wrapper.getParent()?(e.fire("lockSnapshot"),o="on"+s(r.status),"abort"!==r.status&&"function"==typeof i[o]&&!1===i[o](r)||(n="cke_upload_"+r.status,i.wrapper&&n!=t&&(t&&i.wrapper.removeClass(t),i.wrapper.addClass(n),t=n),"error"!=r.status&&"abort"!=r.status||e.widgets.del(i)),e.fire("unlockSnapshot")):(CKEDITOR.instances[e.name]&&e.editable().find('[data-cke-upload-id="'+a+'"]').count()||r.abort(),o.removeListener())})),r.update()},replaceWith:function(t,n){if(""===t.trim())e.widgets.del(this);else{var i,o,a=this==e.widgets.focused,r=e.editable(),s=e.createRange();a||(o=e.getSelection().createBookmarks()),s.setStartBefore(this.wrapper),s.setEndAfter(this.wrapper),a&&(i=s.createBookmark()),r.insertHtmlIntoRange(t,s,n),e.widgets.checkWidgets({initOnlyNew:!0}),e.widgets.destroy(this,!0),a?(s.moveToBookmark(i),s.select()):e.getSelection().selectBookmarks(o)}},_getLoader:function(){var e=this.wrapper.findOne("[data-cke-upload-id]");return e?this.editor.uploadRepository.loaders[e.data("cke-upload-id")]:null}}),e.widgets.add(t,n)},markElement:function(e,t,n){e.setAttributes({"data-cke-upload-id":n,"data-widget":t})},bindNotifications:function(e,t){var n,i=null;t.on("update",(function(){!i&&t.uploadTotal&&((n=e._.uploadWidgetNotificaionAggregator)&&!n.isFinished()||(n=e._.uploadWidgetNotificaionAggregator=new CKEDITOR.plugins.notificationAggregator(e,e.lang.uploadwidget.uploadMany,e.lang.uploadwidget.uploadOne)).once("finished",(function(){var t=n.getTaskCount();0===t?n.notification.hide():n.notification.update({message:1==t?e.lang.uploadwidget.doneOne:e.lang.uploadwidget.doneMany.replace("%1",t),type:"success",important:1})})),i=n.createTask({weight:t.uploadTotal})),i&&"uploading"==t.status&&i.update(t.uploaded)})),t.on("uploaded",(function(){i&&i.done()})),t.on("error",(function(){i&&i.cancel(),e.showNotification(t.message,"warning")})),t.on("abort",(function(){i&&i.cancel(),CKEDITOR.instances[e.name]&&e.showNotification(e.lang.uploadwidget.abort,"info")}))}}),function(){function e(e){return 9>=e&&(e="0"+e),String(e)}function t(t){var i=[(i=new Date).getFullYear(),i.getMonth()+1,i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds()];return n+=1,"image-"+CKEDITOR.tools.array.map(i,e).join("")+"-"+n+"."+t}var n=0;CKEDITOR.plugins.add("uploadimage",{requires:"uploadwidget",onLoad:function(){CKEDITOR.addCss(".cke_upload_uploading img{opacity: 0.3}")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported},init:function(e){if(this.isSupportedEnvironment()){var n=CKEDITOR.fileTools,i=n.getUploadUrl(e.config,"image");i&&(n.addUploadWidget(e,"uploadimage",{supportedTypes:/image\/(jpeg|png|gif|bmp)/,uploadUrl:i,fileToElement:function(){var e=new CKEDITOR.dom.element("img");return e.setAttribute("src","data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs="),e},parts:{img:"img"},onUploading:function(e){this.parts.img.setAttribute("src",e.data)},onUploaded:function(e){var t=this.parts.img.$;this.replaceWith('<img src="'+e.url+'" width="'+(e.responseData.width||t.naturalWidth)+'" height="'+(e.responseData.height||t.naturalHeight)+'">')}}),e.on("paste",(function(o){if(o.data.dataValue.match(/<img[\s\S]+data:/i)){o=o.data;var a,r,s,l=document.implementation.createHTMLDocument("");for((l=new CKEDITOR.dom.element(l.body)).data("cke-editable",1),l.appendHtml(o.dataValue),a=l.find("img"),s=0;s<a.count();s++){var c=(r=a.getItem(s)).getAttribute("src"),d=c&&"data:"==c.substring(0,5),u=null===r.data("cke-realelement");d&&u&&!r.data("cke-upload-id")&&!r.isReadOnly(1)&&(d=(d=c.match(/image\/([a-z]+?);/i))&&d[1]||"jpg",(c=e.uploadRepository.create(c,t(d))).upload(i),n.markElement(r,"uploadimage",c.id),n.bindNotifications(e,c))}o.dataValue=l.getHtml()}})))}}})}(),function(){function e(e){var t=e.widgets,n=e.focusManager.currentActive;if(e.focusManager.hasFocus){if(t.focused)return t.focused;if(n instanceof CKEDITOR.plugins.widget.nestedEditable)return t.getByElement(n)}}function t(e,t){return e.features&&-1!==CKEDITOR.tools.array.indexOf(e.features,t)}function n(e){this.wrapper=CKEDITOR.dom.element.createFromHtml(e||'<div class="cke_loader"></div>')}function i(){n.call(this,'<div class="cke_loader"><div class="cke_bar" styles="transition: width '+s/1e3+'s"></div></div>'),this.bar=this.wrapper.getFirst()}var o,a=!1,r={caption:function(){function n(e){e.parts.caption.data("cke-caption-placeholder",!1)}function i(e,t){e.data("cke-caption-active",t),e.data("cke-caption-hidden",!t)}return{setUp:function(e){function n(n){var o=(n="blur"===n.name?e.elementPath():n.data.path)?n.lastElement:null;if(n=function(e,n){return CKEDITOR.tools.array.reduce(CKEDITOR.tools.object.keys(e),(function(i,o){var a=e[o];return t(a,n)&&i.push(a),i}),[])}(e.widgets.instances,"caption"),!e.filter.check("figcaption"))return CKEDITOR.tools.array.forEach(i,(function(e){e.removeListener()}));CKEDITOR.tools.array.forEach(n,(function(e){e._refreshCaption(o)}))}var i=[];i.push(e.on("selectionChange",n,null,null,9)),i.push(e.on("blur",n))},init:function(){if(this.editor.filter.check("figcaption")){if(!this.parts.caption){var e=this.parts,t=this.element,n=t.getDocument().createElement("figcaption");t.append(n),this.initEditable("caption",this.definition.editables.caption),e.caption=n}this.editables.caption.getData()||this.parts.caption.data("cke-caption-placeholder")||this._refreshCaption()}},_refreshCaption:function(t){var o=e(this.editor)===this,a=this.parts.caption,r=this.editables.caption;o?(r.getData()||t.equals(a)?(!t||t.equals(a)&&t.data("cke-caption-placeholder"))&&n(this):this.parts.caption.data("cke-caption-placeholder",this.editor.lang.imagebase.captionPlaceholder),i(a,!0)):this.editables.caption.getData()&&!this.parts.caption.data("cke-caption-placeholder")||(n(this),i(a,!1))}}}(),upload:(o={progressReporterType:i,setUp:function(e,t){e.on("paste",(function(n){var i=n.data.method,a=n.data.dataTransfer,r=a&&a.getFilesCount();if(!e.readOnly&&("drop"===i||"paste"===i&&r)){var s=[];t=e.widgets.registered[t.name];for(var l=0;l<r;l++)i=a.getFile(l),CKEDITOR.fileTools.isTypeSupported(i,t.supportedTypes)&&s.push(i);s.length&&(n.cancel(),n.stop(),CKEDITOR.tools.array.forEach(s,(function(n,i){var a=o._spawnLoader(e,n,t,n.name);o._insertWidget(e,t,URL.createObjectURL(n),!0,{uploadId:a.id}),i!==s.length-1&&((a=e.getSelection().getRanges())[0].enlarge(CKEDITOR.ENLARGE_ELEMENT),a[0].collapse(!1))})))}}))},init:function(){this.once("ready",(function(){var e=this.data.uploadId;void 0!==e&&(e=this.editor.uploadRepository.loaders[e])&&this._beginUpload(this,e)}))},_isLoaderDone:function(e){return e.xhr&&4===e.xhr.readyState},_spawnLoader:function(e,t,n,i){var o=n.loadMethod||"loadAndUpload";return(e=e.uploadRepository.create(t,i,n.loaderType))[o](n.uploadUrl,n.additionalRequestParameters),e},_beginUpload:function(e,t){function n(){e.isInited()&&e.setData("uploadId",void 0),e.wrapper.removeClass("cke_widget_wrapper_uploading")}function i(){n(),!1!==e.fire("uploadFailed",{loader:t})&&e.editor.widgets.del(e)}var o={uploaded:function(){n(),e.fire("uploadDone",{loader:t})},abort:i,error:i},a=[];a.push(t.on("abort",o.abort)),a.push(t.on("error",o.error)),a.push(t.on("uploaded",o.uploaded)),this.on("destroy",(function(){CKEDITOR.tools.array.filter(a,(function(e){return e.removeListener(),!1}))})),e.setData("uploadId",t.id),!1!==e.fire("uploadStarted",t)&&e.progressReporterType&&(e._isLoaderDone(t)?o[t.status]&&o[t.status]():(e.wrapper.addClass("cke_widget_wrapper_uploading"),o=new e.progressReporterType,e.wrapper.append(o.wrapper),o.bindLoader(t)))},_insertWidget:function(e,t,n,i,o){var a=("function"==typeof t.defaults?t.defaults():t.defaults)||{};(a=CKEDITOR.tools.extend({},a)).src=n,n=CKEDITOR.dom.element.createFromHtml(t.template.output(a)),a=e.widgets.wrapElement(n,t.name);var r=new CKEDITOR.dom.documentFragment(a.getDocument());return r.append(a),!1!==i?(e.widgets.initOn(n,t,o),e.widgets.finalizeCreation(r)):n}},o),link:function(){function n(n,i,o){n.getCommand("unlink").on(i,(function(i){var a=e(n);a&&t(a,"link")&&(i.stop(),o&&"function"==typeof o&&o(this,a,n),i.cancel())}))}return{allowedContent:{a:{attributes:"!href"}},parts:{link:"a"},init:function(){this.editor.plugins.link&&this.editor.contextMenu&&this.on("contextMenu",(function(e){this.parts.link&&(e.data.link=e.data.unlink=CKEDITOR.TRISTATE_OFF)}))},setUp:function(i){i.plugins.link&&(i.contextMenu&&function(e){e.addMenuGroup("imagebase",10),e.addMenuItem("imagebase",{label:e.lang.link.menu,command:"link",group:"imagebase"})}(i),i.on("dialogShow",(function(n){var o,a,r=e(i),s=n.data;r&&t(r,"link")&&"link"===s._.name&&(o=s.getContentElement("info","linkDisplayText").getElement().getParent().getParent(),s.setupContent(r.data.link||{}),o.hide(),a=s.once("ok",function(e,n,i){return function(){if(i&&t(i,"link")){e.stop();var o={};n.commitContent(o),i.setData("link",o)}}}(n,s,r),null,null,9),s.once("hide",(function(){a.removeListener(),o.show()})))})),n(i,"exec",(function(e,t,n){t.setData("link",null),e.refresh(n,n.elementPath())})),n(i,"refresh",(function(e,t){e.setState(t.parts.link?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)})))},data:function(e){var t=this.editor,n=e.data.link,i=this.element.findOne("img");if(void 0===n&&this.parts.link&&this.setData("link",CKEDITOR.plugins.link.parseLinkAttributes(this.editor,this.parts.link)),void 0!==n)if(null===n)this.parts.link.remove(!0),this.parts.link=null,delete e.data.link;else{e=this.parts;var o=i.getAscendant("a")||t.document.createElement("a");t=CKEDITOR.plugins.link.getLinkAttributes(t,n);CKEDITOR.tools.isEmpty(t.set)||o.setAttributes(t.set),t.removed.length&&o.removeAttributes(t.removed),o.contains(i)||(o.replace(i),i.move(o)),e.link=o}}}}()},s=100;n.prototype={updated:function(){},done:function(){this.remove()},aborted:function(){this.remove()},failed:function(){this.remove()},remove:function(){this.wrapper.remove()},bindLoader:function(e){function t(){n&&(CKEDITOR.tools.array.forEach(n,(function(e){e.removeListener()})),n=null)}var n=[],i=CKEDITOR.tools.eventsBuffer(s,(function(){e.uploadTotal&&this.updated(e.uploaded/e.uploadTotal)}),this);n.push(e.on("update",i.input,this)),n.push(e.once("abort",this.aborted,this)),n.push(e.once("uploaded",this.done,this)),n.push(e.once("error",this.failed,this)),n.push(e.once("abort",t)),n.push(e.once("uploaded",t)),n.push(e.once("error",t))}},i.prototype=new n,i.prototype.updated=function(e){e=Math.round(100*e),e=Math.max(e,0),e=Math.min(e,100),this.bar.setStyle("width",e+"%")},CKEDITOR.plugins.add("imagebase",{requires:"widget,filetools",lang:"az,bg,cs,da,de,de-ch,en,en-au,et,fa,fr,gl,hr,hu,it,ku,lt,lv,nb,nl,pl,pt,pt-br,ro,ru,sk,sq,sr,sr-latn,sv,tr,ug,uk,zh,zh-cn",init:function(e){a||(CKEDITOR.document.appendStyleSheet(this.path+"styles/imagebase.css"),a=!0),e.addContentsCss&&e.addContentsCss(this.path+"styles/imagebase.css")}}),CKEDITOR.plugins.imagebase={featuresDefinitions:r,addImageWidget:function(e,t,n){t=e.widgets.add(t,function(e,t){return(t=CKEDITOR.tools.object.merge({pathName:e.lang.imagebase.pathName,defaults:{imageClass:e.config.easyimage_class||"",alt:"",src:"",caption:""},template:'<figure class="{imageClass}"><img alt="{alt}" src="{src}" /><figcaption>{caption}</figcaption></figure>',allowedContent:{img:{attributes:"!src,alt,width,height"},figure:!0,figcaption:!0},requiredContent:"figure; img[!src]",features:[],editables:{caption:{selector:"figcaption",pathName:e.lang.imagebase.pathNameCaption,allowedContent:"br em strong sub sup u s; a[!href,target]"}},parts:{image:"img",caption:"figcaption"},upcasts:{figure:function(e){if(1===e.find("img",!0).length)return e}}},t)).upcast=CKEDITOR.tools.object.keys(t.upcasts).join(","),t}(e,n)),e.addFeature(t)},addFeature:function(e,t,n){function i(e,t){if(e||t)return function(){e&&e.apply(this,arguments),t&&t.apply(this,arguments)}}var o=CKEDITOR.tools.clone(this.featuresDefinitions[t]);return o.init=i(n.init,o.init),o.data=i(n.data,o.data),o.setUp&&(o.setUp(e,n),delete o.setUp),e=CKEDITOR.tools.object.merge(n,o),CKEDITOR.tools.isArray(e.features)||(e.features=[]),e.features.push(t),e},progressBar:i,progressReporter:n}}(),function(){var e=!1;CKEDITOR.plugins.add("balloonpanel",{init:function(){e||(CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/balloonpanel.css"),e=!0)}}),CKEDITOR.ui.balloonPanel=function(e,t){for(var n in this.editor=e,CKEDITOR.tools.extend(this,{width:360,height:"auto",triangleWidth:20,triangleHeight:20,triangleMinDistance:40},t,!0),this.templates={},this.templateDefinitions)this.templates[n]=new CKEDITOR.template(this.templateDefinitions[n]);this.parts={},this.focusables={},this.showListeners={},this.activeShowListeners={},this.rect={visible:!1},this.build(),e.on("destroy",(function(){this.destroy()}),this)},CKEDITOR.ui.balloonPanel.prototype={templateDefinitions:{panel:'<div class="cke {id} cke_reset_all cke_chrome cke_balloon cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'" dir="{langDir}" title="'+(CKEDITOR.env.gecko?" ":"")+'" lang="{langCode}" role="dialog" style="{style}" tabindex="-1" aria-labelledby="cke_{name}_arialbl"></div>',content:'<div class="cke_balloon_content">{content}</div>',title:'<div class="cke_balloon_title" role="presentation">{title}</div>',close:'<a class="cke_balloon_close_button" href="javascript:void(0)" title="Close" role="button" tabindex="-1"><span class="cke_label">X</span></a>',triangleOuter:'<span class="cke_balloon_triangle cke_balloon_triangle_outer"></span>',triangleInner:'<span class="cke_balloon_triangle cke_balloon_triangle_inner">​</span>'},build:function(){var e=this.editor;this.parts={title:CKEDITOR.dom.element.createFromHtml(this.templates.title.output({title:this.title})),close:CKEDITOR.dom.element.createFromHtml(this.templates.close.output()),panel:CKEDITOR.dom.element.createFromHtml(this.templates.panel.output({id:e.id,langDir:e.lang.dir,langCode:e.langCode,name:e.name,style:"display:none;",voiceLabel:e.lang.editorPanel+", "+e.name})),content:CKEDITOR.dom.element.createFromHtml(this.templates.content.output({content:this.content||""})),triangleOuter:CKEDITOR.dom.element.createFromHtml(this.templates.triangleOuter.output()),triangleInner:CKEDITOR.dom.element.createFromHtml(this.templates.triangleInner.output())},this.parts.panel.append(this.parts.title,1),this.parts.panel.append(this.parts.close,1),this.parts.panel.append(this.parts.triangleOuter),this.parts.panel.append(this.parts.content),this.parts.triangleOuter.append(this.parts.triangleInner),this.registerFocusable(this.parts.panel),this.registerFocusable(this.parts.close),this.parts.title.unselectable(),this.parts.close.unselectable(),CKEDITOR.document.getBody().append(this.parts.panel),this.resize(this.width,this.height),this.on("show",this.activateShowListeners,this),this.on("hide",this.deactivateShowListeners,this),this.parts.close.on("click",(function(e){this.hide(),e.data.preventDefault()}),this)},show:function(){this.rect.visible||(this.rect.visible=!0,this.parts.panel.show(),this.fire("show"))},hide:function(){this.rect.visible&&(this.rect.visible=!1,this.parts.panel.hide(),this.blur(),this.fire("hide"))},blur:function(){this.editor.focus()},move:function(e,t){this.rect.left=t,this.rect.top=e,this.parts.panel.setStyles({left:CKEDITOR.tools.cssLength(t),top:CKEDITOR.tools.cssLength(e)})},attach:function(){function e(e,t){return Math.max(0,Math.min(e.right,t.right)-Math.max(e.left,t.left))*Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top))}function t(e,t,n,i){return(e={top:e,left:t}).right=e.left+n,e.bottom=e.top+i,e}function n(e,t){return e.right=t.right,e.width=e.right-e.left,t.y&&(e.y=t.y),e}function i(e){var t=o(e,!0);return e=o(e),t=n(t[0],t.pop()),e=n(e[0],e.pop()),t.bottom=e.bottom,t.height=t.bottom-t.top,e.y&&(t.y=e.y),e.top=t.top,e.height=t.height,[t,e]}function o(e,t){var n=t?e[0]:e[e.length-1],i=t?"top":"bottom";return CKEDITOR.tools.array.filter(e,(function(e){if(e[i]===n[i])return e}))}var a,r,s,l,c={right:"left",top:"bottom",topLeft:"bottomLeft",topRight:"bottomRight",bottom:"top",bottomLeft:"topLeft",bottomRight:"topRight",left:"right"};return function(o,d){if(o instanceof CKEDITOR.dom.selection){var u,h=o.getRanges();u=(f=(h=o.isFake&&o.isInTable()?CKEDITOR.tools.array.map(h,(function(e){return e.getClientRects(!0)[0]})):h[h.length-1].getClientRects(!0))[0])===(E=h[h.length-1])?[f]:f.top===E.top?[n(f,E)]:i(h)}(d instanceof CKEDITOR.dom.element||!d)&&(d={focusElement:d}),!0===(d=CKEDITOR.tools.extend(d,{show:!0})).show&&this.show(),this.fire("attach"),a=CKEDITOR.document.getWindow(),r=this.editor.window.getFrame(),s=this.editor.editable(),!(l=s.isInline())&&CKEDITOR.env.safari&&(r=r.getParent());var f,g,m,p,E=(h=this.getWidth())*(f=this.getHeight());g=o.getClientRect&&o.getClientRect(!0);var T=l?s.getClientRect(!0):r.getClientRect(!0),C=a.getViewPaneSize(),I=a.getScrollPosition(),O={top:Math.max(T.top,I.y),left:Math.max(T.left,I.x),right:Math.min(T.right,C.width+I.x),bottom:Math.min(T.bottom,C.height+I.y)};for(var D in l&&this.editor.elementMode===CKEDITOR.ELEMENT_MODE_INLINE&&((O=this._getViewPaneRect(a)).right+=this.triangleWidth,O.bottom+=this.triangleHeight),u?(CKEDITOR.tools.array.forEach(u,(function(e){this._adjustElementRect(e,l?O:T)}),this),g=this._getAlignments(u[0],h,f),1<u.length&&(g["bottom hcenter"]=this._getAlignments(u[1],h,f)["bottom hcenter"]),p={"top hcenter":!0,"bottom hcenter":!0}):(this._adjustElementRect(g,l?O:T),g=this._getAlignments(g,h,f)),p||g){if(p=t(g[D].top,g[D].left,h,f),0===(p=g[D].areaDifference=E-e(p,O))){m=D;break}m||(m=D),p<g[m].areaDifference&&(m=D)}D=(p=this.parts.panel.getAscendant((function(e){return!(e instanceof CKEDITOR.dom.document)&&"static"!==e.getComputedStyle("position")})))?parseInt(p.getComputedStyle("margin-left"),10):0,p=p?parseInt(p.getComputedStyle("margin-top"),10):0,this.move(g[m].top-p,g[m].left-D),m=m.split(" "),this.setTriangle(c[m[0]],m[1]),!1!==d.focusElement&&(d.focusElement||this.parts.panel).focus()}}(),resize:function(e,t){this.rect.width=e,this.rect.height=t,this.parts.panel.setStyles({width:CKEDITOR.tools.cssLength(e),height:CKEDITOR.tools.cssLength(t)})},getWidth:function(){return"auto"===this.rect.width?this.parts.panel.getClientRect().width:this.rect.width},getHeight:function(){return"auto"===this.rect.height?this.parts.panel.getClientRect().height:this.rect.height},setTriangle:function(e,t){var n=this.parts.triangleOuter,i=this.parts.triangleInner;this.triangleSide&&(n.removeClass("cke_balloon_triangle_"+this.triangleSide),n.removeClass("cke_balloon_triangle_align_"+this.triangleAlign),i.removeClass("cke_balloon_triangle_"+this.triangleSide)),this.triangleSide=e,this.triangleAlign=t,n.addClass("cke_balloon_triangle_"+e),n.addClass("cke_balloon_triangle_align_"+t),i.addClass("cke_balloon_triangle_"+e)},registerFocusable:function(e){this.editor.focusManager.add(e),this.focusables[e.getUniqueId()]=e},deregisterFocusable:function(e){this.editor.focusManager.remove(e),delete this.focusables[e.getUniqueId()]},addShowListener:function(e){var t=CKEDITOR.tools.getNextNumber();this.showListeners[t]=e,this.rect.visible&&this.activateShowListener(t);var n=this;return{removeListener:function(){n.removeShowListener(t)}}},removeShowListener:function(e){this.deactivateShowListener(e),delete this.showListeners[e]},activateShowListener:function(e){this.activeShowListeners[e]=this.showListeners[e].call(this)},deactivateShowListener:function(e){this.activeShowListeners[e]&&this.activeShowListeners[e].removeListener(),delete this.activeShowListeners[e]},activateShowListeners:function(){for(var e in this.showListeners)this.activateShowListener(e)},deactivateShowListeners:function(){for(var e in this.activeShowListeners)this.deactivateShowListener(e)},destroy:function(){this.deactivateShowListeners(),this.parts.panel.remove()},setTitle:function(e){this.parts.title.setHtml(e)},_getAlignments:function(e,t,n){return{"right vcenter":{top:e.top+e.height/2-n/2,left:e.right+this.triangleWidth},"left vcenter":{top:e.top+e.height/2-n/2,left:e.left-t-this.triangleWidth},"top hcenter":{top:e.top-n-this.triangleHeight,left:e.left+e.width/2-t/2},"top left":{top:e.top-n-this.triangleHeight,left:e.left+e.width/2-this.triangleMinDistance},"top right":{top:e.top-n-this.triangleHeight,left:e.right-e.width/2-t+this.triangleMinDistance},"bottom hcenter":{top:e.bottom+this.triangleHeight,left:e.left+e.width/2-t/2},"bottom left":{top:e.bottom+this.triangleHeight,left:e.left+e.width/2-this.triangleMinDistance},"bottom right":{top:e.bottom+this.triangleHeight,left:e.right-e.width/2-t+this.triangleMinDistance}}},_adjustElementRect:function(e,t){e.left=Math.max(t.left,Math.min(t.right-1,e.left)),e.right=Math.max(t.left,Math.min(t.right,e.right)),e.top=Math.max(t.top,Math.min(t.bottom-1,e.top)),e.bottom=Math.max(t.top,Math.min(t.bottom,e.bottom))},_getViewPaneRect:function(e){var t=e.getScrollPosition();return e=e.getViewPaneSize(),{top:t.y,bottom:t.y+e.height,left:t.x,right:t.x+e.width}}},CKEDITOR.event.implementOn(CKEDITOR.ui.balloonPanel.prototype)}(),function(){function e(e,t){this.editor=e,this.options=t,this.toolbar=new CKEDITOR.ui.balloonToolbar(e),this.options&&void 0===this.options.priority&&(this.options.priority=CKEDITOR.plugins.balloontoolbar.PRIORITY.MEDIUM),this._loadButtons()}function t(e){this.editor=e,this._contexts=[],this._listeners=[],this._attachListeners()}var n=CKEDITOR.tools.array.filter(["matches","msMatchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector"],(function(e){return!!window.HTMLElement&&e in HTMLElement.prototype}))[0];CKEDITOR.ui.balloonToolbarView=function(e,t){t=CKEDITOR.tools.extend(t||{},{width:"auto",triangleWidth:7,triangleHeight:7}),CKEDITOR.ui.balloonPanel.call(this,e,t),this._listeners=[]},CKEDITOR.ui.balloonToolbar=function(e,t){this._view=new CKEDITOR.ui.balloonToolbarView(e,t),this._items={}},CKEDITOR.ui.balloonToolbar.prototype.attach=function(e,t){this._view.renderItems(this._items),this._view.attach(e,{focusElement:!1,show:!t})},CKEDITOR.ui.balloonToolbar.prototype.show=function(){this._view.show()},CKEDITOR.ui.balloonToolbar.prototype.hide=function(){this._view.hide()},CKEDITOR.ui.balloonToolbar.prototype.reposition=function(){this._view.reposition()},CKEDITOR.ui.balloonToolbar.prototype.addItem=function(e,t){this._items[e]=t},CKEDITOR.ui.balloonToolbar.prototype.addItems=function(e){for(var t in e)this.addItem(t,e[t])},CKEDITOR.ui.balloonToolbar.prototype.getItem=function(e){return this._items[e]},CKEDITOR.ui.balloonToolbar.prototype.deleteItem=function(e){this._items[e]&&(delete this._items[e],this._view.renderItems(this._items))},CKEDITOR.ui.balloonToolbar.prototype.destroy=function(){for(var e in this._items)this._items[e].destroy&&this._items[e].destroy(),this.deleteItem(e);this._pointedElement=null,this._view.destroy()},CKEDITOR.ui.balloonToolbar.prototype.refresh=function(){for(var e in this._items){var t=this._view.editor.getCommand(this._items[e].command);t&&t.refresh(this._view.editor,this._view.editor.elementPath())}},e.prototype={destroy:function(){this.toolbar&&this.toolbar.destroy()},show:function(e){e&&this.toolbar.attach(e),this.toolbar.show()},hide:function(){this.toolbar.hide()},refresh:function(){this.toolbar.refresh()},_matchRefresh:function(e,t){var n=null;return this.options.refresh&&(n=this.options.refresh(this.editor,e,t)||null)&&!1==n instanceof CKEDITOR.dom.element&&(n=e&&e.lastElement||this.editor.editable()),n},_matchWidget:function(){var e=this.options.widgets,t=null;if(e){var n=this.editor.widgets&&this.editor.widgets.focused&&this.editor.widgets.focused.name;"string"==typeof e&&(e=e.split(",")),-1!==CKEDITOR.tools.array.indexOf(e,n)&&(t=this.editor.widgets.focused.element)}return t},_matchElement:function(e){return this.options.cssSelector&&n&&e.$[n](this.options.cssSelector)?e:null},_loadButtons:function(){var e=this.options.buttons;e&&(e=e.split(","),CKEDITOR.tools.array.forEach(e,(function(e){var t=this.editor.ui.create(e);t&&this.toolbar.addItem(e,t)}),this))}},t.prototype={create:function(e){return e=new CKEDITOR.plugins.balloontoolbar.context(this.editor,e),this.add(e),e},add:function(e){this._contexts.push(e)},check:function(e){function t(e,t,n){a(e,(function(e){if(!o||o.options.priority>e.options.priority){var a=t(e,n);a instanceof CKEDITOR.dom.element&&(i=a,o=e)}}))}function n(e,t){return e._matchElement(t)}if(e||(e=this.editor.getSelection(),CKEDITOR.tools.array.forEach(e.getRanges(),(function(e){e.shrink(CKEDITOR.SHRINK_ELEMENT,!0)}))),e){var i,o,a=CKEDITOR.tools.array.forEach,r=e.getRanges()[0],s=r&&r.startPath();if(t(this._contexts,(function(t){return t._matchRefresh(s,e)})),t(this._contexts,(function(e){return e._matchWidget()})),s)for((r=e.getSelectedElement())&&!r.isReadOnly()&&t(this._contexts,n,r),r=0;r<s.elements.length;r++){var l=s.elements[r];l.isReadOnly()||t(this._contexts,n,l)}this.hide(),o&&o.show(i)}},hide:function(){CKEDITOR.tools.array.forEach(this._contexts,(function(e){e.hide()}))},destroy:function(){CKEDITOR.tools.array.forEach(this._listeners,(function(e){e.removeListener()})),this._listeners.splice(0,this._listeners.length),this._clear()},_clear:function(){CKEDITOR.tools.array.forEach(this._contexts,(function(e){e.destroy()})),this._contexts.splice(0,this._contexts.length)},_refresh:function(){CKEDITOR.tools.array.forEach(this._contexts,(function(e){e.refresh()}))},_attachListeners:function(){this._listeners.push(this.editor.on("destroy",(function(){this.destroy()}),this),this.editor.on("selectionChange",(function(){this.check()}),this),this.editor.on("mode",(function(){this.hide()}),this,null,9999),this.editor.on("blur",(function(){this.hide()}),this,null,9999),this.editor.on("afterInsertHtml",(function(){this.check(),this._refresh()}),this,null,9999))}};var i=!1,o=!1;CKEDITOR.plugins.add("balloontoolbar",{requires:"balloonpanel",isSupportedEnvironment:function(){return!CKEDITOR.env.ie||8<CKEDITOR.env.version},beforeInit:function(e){o||(CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css"),CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/balloontoolbar.css"),o=!0),e.balloonToolbars=new CKEDITOR.plugins.balloontoolbar.contextManager(e)},init:function(e){e.balloonToolbars=new CKEDITOR.plugins.balloontoolbar.contextManager(e),i||(i=!0,CKEDITOR.ui.balloonToolbarView.prototype=CKEDITOR.tools.extend({},CKEDITOR.ui.balloonPanel.prototype),CKEDITOR.ui.balloonToolbarView.prototype.build=function(){CKEDITOR.ui.balloonPanel.prototype.build.call(this),this.parts.panel.addClass("cke_balloontoolbar"),this.parts.title.remove(),this.deregisterFocusable(this.parts.close),this.parts.close.remove()},CKEDITOR.ui.balloonToolbarView.prototype.show=function(){function e(){this.reposition()}if(!this.rect.visible){var t=this.editor,n=t.editable(),i=n.isInline()?n:n.getDocument(),o=CKEDITOR.document.getWindow();CKEDITOR.env.iOS&&!n.isInline()&&(i=t.window.getFrame().getParent()),this._detachListeners(),this._listeners.push(t.on("change",e,this)),this._listeners.push(t.on("resize",e,this)),this._listeners.push(o.on("resize",e,this)),this._listeners.push(o.on("scroll",e,this)),this._listeners.push(i.on("scroll",e,this)),CKEDITOR.ui.balloonPanel.prototype.show.call(this)}},CKEDITOR.ui.balloonToolbarView.prototype.reposition=function(){this.rect.visible&&this.attach(this._pointedElement,{focusElement:!1})},CKEDITOR.ui.balloonToolbarView.prototype.hide=function(){this._detachListeners(),CKEDITOR.ui.balloonPanel.prototype.hide.call(this)},CKEDITOR.ui.balloonToolbarView.prototype.blur=function(e){e&&this.editor.focus()},CKEDITOR.ui.balloonToolbarView.prototype._getAlignments=function(e,t,n){return{"bottom hcenter":(e=CKEDITOR.ui.balloonPanel.prototype._getAlignments.call(this,e,t,n))["bottom hcenter"],"top hcenter":e["top hcenter"]}},CKEDITOR.ui.balloonToolbarView.prototype._detachListeners=function(){this._listeners.length&&(CKEDITOR.tools.array.forEach(this._listeners,(function(e){e.removeListener()})),this._listeners=[])},CKEDITOR.ui.balloonToolbarView.prototype.destroy=function(){this._deregisterItemFocusables(),CKEDITOR.ui.balloonPanel.prototype.destroy.call(this),this._detachListeners()},CKEDITOR.ui.balloonToolbarView.prototype.renderItems=function(e){var t=[],n=CKEDITOR.tools.object.keys(e),i=!1;this._deregisterItemFocusables(),CKEDITOR.tools.array.forEach(n,(function(n){CKEDITOR.ui.richCombo&&e[n]instanceof CKEDITOR.ui.richCombo&&i?(i=!1,t.push("</span>")):CKEDITOR.ui.richCombo&&e[n]instanceof CKEDITOR.ui.richCombo||i||(i=!0,t.push('<span class="cke_toolgroup">')),e[n].render(this.editor,t)}),this),i&&t.push("</span>"),this.parts.content.setHtml(t.join("")),this.parts.content.unselectable(),CKEDITOR.tools.array.forEach(this.parts.content.find("a").toArray(),(function(e){e.setAttribute("draggable","false"),this.registerFocusable(e)}),this)},CKEDITOR.ui.balloonToolbarView.prototype.attach=function(e,t){this._pointedElement=e,CKEDITOR.ui.balloonPanel.prototype.attach.call(this,e,t)},CKEDITOR.ui.balloonToolbarView.prototype._deregisterItemFocusables=function(){var e,t=this.focusables;for(e in t)this.parts.content.contains(t[e])&&this.deregisterFocusable(t[e])})}}),CKEDITOR.plugins.balloontoolbar={context:e,contextManager:t,PRIORITY:{LOW:999,MEDIUM:500,HIGH:10}}}(),CKEDITOR.plugins.add("cloudservices",{requires:"filetools,ajax",onLoad:function(){function e(e,n,i,o){t.call(this,e,n,i),this.customToken=o}var t=CKEDITOR.fileTools.fileLoader;e.prototype=CKEDITOR.tools.extend({},t.prototype),e.prototype.upload=function(e,n){(e=e||this.editor.config.cloudServices_uploadUrl)?t.prototype.upload.call(this,e,n):CKEDITOR.error("cloudservices-no-upload-url")},CKEDITOR.plugins.cloudservices.cloudServicesLoader=e},beforeInit:function(e){var t=e.config.cloudServices_tokenUrl,n={token:null,REFRESH_INTERVAL:e.CLOUD_SERVICES_TOKEN_INTERVAL||36e5,refreshToken:function(){CKEDITOR.ajax.load(t,(function(e){e&&(n.token=e)}))},init:function(){this.refreshToken();var t=window.setInterval(this.refreshToken,this.REFRESH_INTERVAL);e.once("destroy",(function(){window.clearInterval(t)}))}};t?n.init():CKEDITOR.error("cloudservices-no-token-url"),e.on("fileUploadRequest",(function(e){var t=e.data.fileLoader,i=e.data.requestData,o=t.customToken||n.token;t instanceof CKEDITOR.plugins.cloudservices.cloudServicesLoader&&(i.file=i.upload,delete i.upload,o?e.data.fileLoader.xhr.setRequestHeader("Authorization",o):(CKEDITOR.error("cloudservices-no-token"),e.cancel()))}),null,null,6),e.on("fileUploadResponse",(function(e){var t,n=e.data.fileLoader,i=n.xhr;if(n instanceof CKEDITOR.plugins.cloudservices.cloudServicesLoader){e.stop();try{t=JSON.parse(i.responseText),e.data.response=t}catch(e){CKEDITOR.warn("filetools-response-error",{responseText:i.responseText})}}}))}}),CKEDITOR.plugins.cloudservices={cloudServicesLoader:null},function(){function e(e){return CKEDITOR.tools.capitalize(e,!0)}function t(e){var t=e.sender.editor,n=t.config.easyimage_toolbar;n.split&&(n=n.split(",")),CKEDITOR.tools.array.forEach(n,(function(n){n=t.ui.items[n],e.data[n.name]=t.getCommand(n.command).state}))}var n=!1,i=["jpeg","png","gif","bmp"];CKEDITOR.plugins.easyimage={_parseSrcSet:function(e){var t,n=[];for(t in e)"default"!==t&&n.push(e[t]+" "+t+"w");return n.join(", ")}},CKEDITOR.plugins.add("easyimage",{requires:"imagebase,balloontoolbar,button,dialog,cloudservices",lang:"ar,az,bg,cs,da,de,de-ch,en,en-au,et,fa,fr,gl,hr,hu,it,ku,lv,nb,nl,no,pl,pt,pt-br,ro,ru,sk,sq,sr,sr-latn,sv,tr,tt,uk,zh,zh-cn",onLoad:function(){CKEDITOR.dialog.add("easyimageAlt",this.path+"dialogs/easyimagealt.js")},isSupportedEnvironment:function(){return!CKEDITOR.env.ie||11<=CKEDITOR.env.version},init:function(e){this.isSupportedEnvironment()&&(n||(CKEDITOR.document.appendStyleSheet(this.path+"styles/easyimage.css"),n=!0),e.addContentsCss&&e.addContentsCss(this.path+"styles/easyimage.css"))},afterInit:function(n){if(this.isSupportedEnvironment()){var o;for(var a in function(n,o){var a=(r=n.config).easyimage_class,r={name:"easyimage",allowedContent:{figure:{classes:r.easyimage_sideClass},img:{attributes:"!src,srcset,alt,width,sizes"}},requiredContent:"figure; img[!src]",styleableElements:"figure",supportedTypes:new RegExp("image/("+i.join("|")+")","i"),loaderType:CKEDITOR.plugins.cloudservices.cloudServicesLoader,progressReporterType:CKEDITOR.plugins.imagebase.progressBar,upcasts:{figure:function(e){if((!a||e.hasClass(a))&&1===e.find("img",!0).length)return e}},init:function(){function e(t,n){var i=t.$;if(i.complete&&i.naturalWidth)return n(i.naturalWidth);t.once("load",(function(){if(!i.naturalWidth)return i.src=i.src,e(t,n);n(i.naturalWidth)}))}var i=this.parts.image,o=i&&i.$.complete&&!i.$.naturalWidth;(i&&!i.$.complete||o)&&(o&&(i.$.src=i.$.src),e(i,(function(){n._.easyImageToolbarContext.toolbar.reposition()}))),void 0!==(i=this.element.data("cke-upload-id"))&&(this.setData("uploadId",i),this.element.data("cke-upload-id",!1)),this.on("contextMenu",t),n.config.easyimage_class&&this.addClass(n.config.easyimage_class),this.on("uploadStarted",(function(){var t=this;e(t.parts.image,(function(e){t.parts.image.hasAttribute("width")||(t.editor.fire("lockSnapshot"),t.parts.image.setAttribute("width",e),t.editor.fire("unlockSnapshot"))}))})),this.on("uploadDone",(function(e){e=e.data.loader.responseData.response;var t=CKEDITOR.plugins.easyimage._parseSrcSet(e);this.parts.image.setAttributes({"data-cke-saved-src":e.default,src:e.default,srcset:t,sizes:"100vw"})})),this.on("uploadFailed",(function(){alert(this.editor.lang.easyimage.uploadFailed)})),this._loadDefaultStyle()},_loadDefaultStyle:function(){var t,i=!1,a=n.config.easyimage_defaultStyle;for(t in o){var r=n.getCommand("easyimage"+e(t));!i&&r&&r.style&&-1!==CKEDITOR.tools.array.indexOf(r.style.group,"easyimage")&&this.checkStyleActive(r.style)&&(i=!0)}!i&&a&&n.getCommand("easyimage"+e(a))&&this.applyStyle(n.getCommand("easyimage"+e(a)).style)}};a&&(r.requiredContent+="(!"+a+")",r.allowedContent.figure.classes="!"+a+","+r.allowedContent.figure.classes),n.plugins.link&&(r=CKEDITOR.plugins.imagebase.addFeature(n,"link",r)),r=CKEDITOR.plugins.imagebase.addFeature(n,"upload",r),r=CKEDITOR.plugins.imagebase.addFeature(n,"caption",r),CKEDITOR.plugins.imagebase.addImageWidget(n,"easyimage",r)}(n,o=CKEDITOR.tools.object.merge({full:{attributes:{class:"easyimage-full"},label:n.lang.easyimage.commands.fullImage},side:{attributes:{class:"easyimage-side"},label:n.lang.easyimage.commands.sideImage},alignLeft:{attributes:{class:"easyimage-align-left"},label:n.lang.common.alignLeft},alignCenter:{attributes:{class:"easyimage-align-center"},label:n.lang.common.alignCenter},alignRight:{attributes:{class:"easyimage-align-right"},label:n.lang.common.alignRight}},n.config.easyimage_styles)),function(e){var t=new RegExp("<img[^>]*\\ssrc=[\\'\\\"]?data:image/("+i.join("|")+");base64,","i");e.on("paste",(function(n){if(!e.isReadOnly&&t.test(n.data.dataValue)){n=n.data;var i,o,a,r,s=document.implementation.createHTMLDocument(""),l=(s=new CKEDITOR.dom.element(s.body),e.widgets.registered.easyimage),c=0;for(s.data("cke-editable",1),s.appendHtml(n.dataValue),o=s.find("img"),r=0;r<o.count();r++){var d=(i=(a=o.getItem(r)).getAttribute("src"))&&"data:"==i.substring(0,5),u=null===a.data("cke-realelement");d&&u&&!a.isReadOnly(1)&&(1<++c&&((d=e.getSelection().getRanges())[0].enlarge(CKEDITOR.ENLARGE_ELEMENT),d[0].collapse(!1)),i.match(/image\/([a-z]+?);/i),d=l._spawnLoader(e,i,l),(i=l._insertWidget(e,l,i,!1,{uploadId:d.id})).data("cke-upload-id",d.id),i.replace(a))}n.dataValue=s.getHtml()}}))}(n),function(t,n){function i(e){return function(t,n){var i=t.widgets.focused,o=CKEDITOR.TRISTATE_DISABLED;i&&"easyimage"===i.name&&(o=e&&e.call(this,i,t,n)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),this.setState(o)}}function o(e,t,n,o){return n.type="widget",n.widget="easyimage",n.group=n.group||"easyimage",n.element="figure",t=new CKEDITOR.style(n),e.filter.allow(t),(t=new CKEDITOR.styleCommand(t)).contextSensitive=!0,t.refresh=i((function(e,t,n){return this.style.checkActive(n,t)})),e.addCommand(o,t),(t=e.getCommand(o)).enable=function(){},t.refresh(e,e.elementPath()),t}t.addCommand("easyimageAlt",new CKEDITOR.dialogCommand("easyimageAlt",{startDisabled:!0,contextSensitive:!0,refresh:i()})),function(n){function i(e,t){var n=e.match(/^easyimage(.+)$/);if(n){var i=(n[1][0]||"").toLowerCase()+n[1].substr(1);if(n[1]in t)return n[1];if(i in t)return i}return null}for(var a in t.on("afterCommandExec",(function(e){i(e.data.name,n)&&(t.forceNextSelectionCheck(),t.selectionChange(!0))})),t.on("beforeCommandExec",(function(e){i(e.data.name,n)&&e.data.command.style.checkActive(e.editor.elementPath(),t)&&(e.cancel(),t.focus())})),n)o(t,a,n[a],"easyimage"+e(a))}(n)}(n,o),n.ui.addButton("EasyImageAlt",{label:n.lang.easyimage.commands.altText,command:"easyimageAlt",toolbar:"easyimage,3"}),o)n.ui.addButton("EasyImage"+e(a),{label:o[a].label,command:"easyimage"+e(a),toolbar:"easyimage,99",icon:o[a].icon,iconHiDpi:o[a].iconHiDpi});!function(e){var t=e.config.easyimage_toolbar;e.plugins.contextmenu&&(t.split&&(t=t.split(",")),e.addMenuGroup("easyimage"),CKEDITOR.tools.array.forEach(t,(function(t){t=e.ui.items[t],e.addMenuItem(t.name,{label:t.label,command:t.command,group:"easyimage"})})))}(n),o=n.config.easyimage_toolbar,n._.easyImageToolbarContext=n.balloonToolbars.create({buttons:o.join?o.join(","):o,widgets:["easyimage"]}),function(e){e.ui.addButton("EasyImageUpload",{label:e.lang.easyimage.commands.upload,command:"easyimageUpload",toolbar:"insert,1"}),e.addCommand("easyimageUpload",{exec:function(){var t=CKEDITOR.dom.element.createFromHtml('<input type="file" accept="image/*" multiple="multiple">');t.once("change",(function(t){(t=t.data.getTarget()).$.files.length&&e.fire("paste",{method:"paste",dataValue:"",dataTransfer:new CKEDITOR.plugins.clipboard.dataTransfer({files:t.$.files})})})),t.$.click()}})}(n)}}}),CKEDITOR.config.easyimage_class="easyimage",CKEDITOR.config.easyimage_styles={},CKEDITOR.config.easyimage_defaultStyle="full",CKEDITOR.config.easyimage_toolbar=["EasyImageFull","EasyImageSide","EasyImageAlt"]}(),CKEDITOR.config.plugins="dialogui,dialog,about,a11yhelp,dialogadvtab,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,templates,menu,contextmenu,copyformatting,div,editorplaceholder,resize,elementspath,enterkey,entities,exportpdf,popup,filetools,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,forms,format,horizontalrule,htmlwriter,iframe,wysiwygarea,image,indent,indentblock,indentlist,smiley,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetext,xml,ajax,pastetools,pastefromgdocs,pastefromlibreoffice,pastefromword,preview,print,removeformat,save,selectall,showblocks,showborders,sourcearea,specialchar,scayt,stylescombo,tab,table,tabletools,tableselection,undo,lineutils,widgetselection,widget,notificationaggregator,uploadwidget,uploadimage,imagebase,balloonpanel,balloontoolbar,cloudservices,easyimage",CKEDITOR.config.skin="moono-lisa",u=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?u("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,templates-rtl,432,,templates,456,,copyformatting,480,,creatediv,504,,exportpdf,528,,find-rtl,552,,find,576,,replace,600,,flash,624,,button,648,,checkbox,672,,form,696,,hiddenfield,720,,imagebutton,744,,radio,768,,select-rtl,792,,select,816,,textarea-rtl,840,,textarea,864,,textfield-rtl,888,,textfield,912,,horizontalrule,936,,iframe,960,,image,984,,indent-rtl,1008,,indent,1032,,outdent-rtl,1056,,outdent,1080,,smiley,1104,,justifyblock,1128,,justifycenter,1152,,justifyleft,1176,,justifyright,1200,,language,1224,,anchor-rtl,1248,,anchor,1272,,link,1296,,unlink,1320,,bulletedlist-rtl,1344,,bulletedlist,1368,,numberedlist-rtl,1392,,numberedlist,1416,,maximize,1440,,newpage-rtl,1464,,newpage,1488,,pagebreak-rtl,1512,,pagebreak,1536,,pastetext-rtl,1560,,pastetext,1584,,pastefromword-rtl,1608,,pastefromword,1632,,preview-rtl,1656,,preview,1680,,print,1704,,removeformat,1728,,save,1752,,selectall,1776,,showblocks-rtl,1800,,showblocks,1824,,source-rtl,1848,,source,1872,,specialchar,1896,,scayt,1920,,table,1944,,redo-rtl,1968,,redo,1992,,undo-rtl,2016,,undo,2040,,easyimagealigncenter,2064,,easyimagealignleft,2088,,easyimagealignright,2112,,easyimagealt,2136,,easyimagefull,2160,,easyimageside,2184,,easyimageupload,2208,","icons_hidpi.png"):u("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,templates-rtl,432,auto,templates,456,auto,copyformatting,480,auto,creatediv,504,auto,exportpdf,528,auto,find-rtl,552,auto,find,576,auto,replace,600,auto,flash,624,auto,button,648,auto,checkbox,672,auto,form,696,auto,hiddenfield,720,auto,imagebutton,744,auto,radio,768,auto,select-rtl,792,auto,select,816,auto,textarea-rtl,840,auto,textarea,864,auto,textfield-rtl,888,auto,textfield,912,auto,horizontalrule,936,auto,iframe,960,auto,image,984,auto,indent-rtl,1008,auto,indent,1032,auto,outdent-rtl,1056,auto,outdent,1080,auto,smiley,1104,auto,justifyblock,1128,auto,justifycenter,1152,auto,justifyleft,1176,auto,justifyright,1200,auto,language,1224,auto,anchor-rtl,1248,auto,anchor,1272,auto,link,1296,auto,unlink,1320,auto,bulletedlist-rtl,1344,auto,bulletedlist,1368,auto,numberedlist-rtl,1392,auto,numberedlist,1416,auto,maximize,1440,auto,newpage-rtl,1464,auto,newpage,1488,auto,pagebreak-rtl,1512,auto,pagebreak,1536,auto,pastetext-rtl,1560,auto,pastetext,1584,auto,pastefromword-rtl,1608,auto,pastefromword,1632,auto,preview-rtl,1656,auto,preview,1680,auto,print,1704,auto,removeformat,1728,auto,save,1752,auto,selectall,1776,auto,showblocks-rtl,1800,auto,showblocks,1824,auto,source-rtl,1848,auto,source,1872,auto,specialchar,1896,auto,scayt,1920,auto,table,1944,auto,redo-rtl,1968,auto,redo,1992,auto,undo-rtl,2016,auto,undo,2040,auto,easyimagealigncenter,2064,auto,easyimagealignleft,2088,auto,easyimagealignright,2112,auto,easyimagealt,2136,auto,easyimagefull,2160,auto,easyimageside,2184,auto,easyimageupload,2208,auto","icons.png"),CKEDITOR.lang.languages={af:1,sq:1,ar:1,az: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,"de-ch":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,oc: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,"es-mx":1,sv:1,tt:1,th:1,tr:1,ug:1,uk:1,vi:1,cy:1}}}();
|