/*
Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var b=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"L7IK",version:"4.16.2 DEV",revision:"2dd756475",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:b},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var f=document.getElementsByTagName("script"),l=0;l<f.length;l++){var k=f[l].src.match(b);if(k){a=k[1];break}}-1==a.indexOf(":/")&&"//"!=a.slice(0,
2)&&(a=0===a.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+a:location.href.match(/^[^\?]*\/(?:)/)[0]+a);if(!a)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return a}(),getUrl:function(a){function b(f,k){a.match(new RegExp("[\x26?]"+f+"\\b"))||(a+=(0<=a.indexOf("?")?"\x26":"?")+f+"\x3d"+k)}-1===a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);"/"!==a.charAt(a.length-1)&&
(this.timestamp&&b("t",this.timestamp),Object.keys(h.ADDITIONAL_RESOURCE_PARAMS).forEach(function(f){var k=h.ADDITIONAL_RESOURCE_PARAMS[f];/\.css$/.test(a)&&"languageId"===f||b(f,k)}));return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),window.removeEventListener("load",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),window.detachEvent("onload",a),b())}catch(k){}}
function b(){for(var a;a=f.shift();)a()}var f=[];return function(k){function c(){try{document.documentElement.doScroll("left")}catch(e){setTimeout(c,1);return}a()}f.push(k);"complete"===document.readyState&&setTimeout(a,1);if(1==f.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);k=!1;try{k=!window.frameElement}catch(d){}document.documentElement.doScroll&&
k&&c()}}}()},f=window.CKEDITOR_GETURL;if(f){var a=h.getUrl;h.getUrl=function(g){return f.call(h,g)||a.call(h,g)}}return h}()),function(){var b={};CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(b){var f=CKEDITOR.event.prototype,a;for(a in f)null==b[a]&&(b[a]=f[a])},CKEDITOR.event.prototype=function(){function h(g){var b=f(this);return b[g]||(b[g]=new a(g))}var f=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},a=function(a){this.name=
a;this.listeners=[]};a.prototype={getListenerIndex:function(a){for(var b=0,f=this.listeners;b<f.length;b++)if(f[b].fn==a)return b;return-1}};return{define:function(a,b){var f=h.call(this,a);CKEDITOR.tools.extend(f,b,!0)},on:function(a,f,l,k,c){function d(n,c,d,w){n={name:a,sender:this,editor:n,data:c,listenerData:k,stop:d,cancel:w,removeListener:e};return!1===f.call(l,n)?b:n.data}function e(){n&&n.removeListener(a,f)}var n=this,w=h.call(this,a);if(0>w.getListenerIndex(f)){w=w.listeners;l||(l=this);
isNaN(c)&&(c=10);d.fn=f;d.priority=c;for(var x=w.length-1;0<=x;x--)if(w[x].priority<=c)return w.splice(x+1,0,d),{removeListener:e};w.unshift(d)}return{removeListener:e}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,m=function(){a=1},l=0,
k=function(){l=1};return function(c,d,e){var n=f(this)[c];c=a;var w=l;a=l=0;if(n){var x=n.listeners;if(x.length)for(var x=x.slice(0),h,t=0;t<x.length;t++){if(n.errorProof)try{h=x[t].call(this,e,d,m,k)}catch(v){}else h=x[t].call(this,e,d,m,k);h===b?l=1:"undefined"!=typeof h&&(d=h);if(a||l)break}}d=l?!1:"undefined"==typeof d?!0:d;a=c;l=w;return d}}(),fireOnce:function(a,b,l){b=this.fire(a,b,l);delete f(this)[a];return b},removeListener:function(a,b){var l=f(this)[a];if(l){var k=l.getListenerIndex(b);
0<=k&&l.listeners.splice(k,1)}},removeAllListeners:function(){var a=f(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=f(this)[a])&&0<a.listeners.length}}}())}(),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(b,h){b in{instanceReady:1,loaded:1}&&(this[b]=!0);return CKEDITOR.event.prototype.fire.call(this,b,h,this)},CKEDITOR.editor.prototype.fireOnce=function(b,h){b in{instanceReady:1,
loaded:1}&&(this[b]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,b,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),h=b.match(/edge[ \/](\d+.?\d*)/),f=-1<b.indexOf("trident/"),f=!(!h&&!f),f={ie:f,edge:!!h,webkit:!f&&-1<b.indexOf(" applewebkit/"),air:-1<b.indexOf(" adobeair/"),mac:-1<b.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),
mobile:-1<b.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};f.gecko="Gecko"==navigator.product&&!f.webkit&&!f.ie;f.webkit&&(-1<b.indexOf("chrome")?f.chrome=!0:f.safari=!0);var a=0;f.ie&&(a=h?parseFloat(h[1]):f.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode,f.ie9Compat=9==a,f.ie8Compat=8==a,f.ie7Compat=
7==a,f.ie6Compat=7>a||f.quirks);f.gecko&&(h=b.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),a=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));f.air&&(a=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(a=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));f.version=a;f.isCompatible=!(f.ie&&7>a)&&!(f.gecko&&4E4>a)&&!(f.webkit&&534>a);f.hidpi=2<=window.devicePixelRatio;f.needsBrFiller=f.gecko||f.webkit||f.ie&&10<a;f.needsNbspFiller=f.ie&&11>a;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit":
"unknown");f.quirks&&(f.cssClass+=" cke_browser_quirks");f.ie&&(f.cssClass+=" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));f.air&&(f.cssClass+=" cke_browser_air");f.iOS&&(f.cssClass+=" cke_browser_ios");f.hidpi&&(f.cssClass+=" cke_hidpi");return f}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var b=document.createElement("script");
b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;b&&(CKEDITOR.status="basic_ready",b&&b._load?b():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}(),"use strict",
CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(b,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:b,additionalData:h})},CKEDITOR.error=function(b,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:b,additionalData:h})},CKEDITOR.on("log",function(b){if(window.console&&window.console.log){var h=console[b.data.type]?b.data.type:
"log",f=b.data.errorCode;if(b=b.data.additionalData)console[h]("[CKEDITOR] Error code: "+f+".",b);else console[h]("[CKEDITOR] Error code: "+f+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+f)}},null,null,999),CKEDITOR.dom={},function(){function b(e,c,a){this._minInterval=e;this._context=a;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(c,a||{});var d=this;this.input=function(){function e(){d._lastOutput=
(new Date).getTime();d._scheduledTimer=0;d._call()}if(!d._scheduledTimer||!1!==d._reschedule()){var n=(new Date).getTime()-d._lastOutput;n<d._minInterval?d._scheduledTimer=setTimeout(e,d._minInterval-n):e()}}}function h(e,c,a){b.call(this,e,c,a);this._args=[];var d=this;this.input=CKEDITOR.tools.override(this.input,function(e){return function(){d._args=Array.prototype.slice.call(arguments);e.call(this)}})}var f=[],a=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":
"",g=/&/g,m=/>/g,l=/</g,k=/"/g,c=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,d={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},e=function(e,c){return"#"==c[0]?String.fromCharCode(parseInt(c.slice(1),10)):d[c]};CKEDITOR.on("reset",function(){f=[]});CKEDITOR.tools={arrayCompare:function(e,c){if(!e&&!c)return!0;if(!e||!c||e.length!=c.length)return!1;for(var a=0;a<e.length;a++)if(e[a]!=c[a])return!1;return!0},getIndex:function(e,c){for(var a=0;a<e.length;++a)if(c(e[a]))return a;return-1},clone:function(e){var c;
if(e&&e instanceof Array){c=[];for(var a=0;a<e.length;a++)c[a]=CKEDITOR.tools.clone(e[a]);return c}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;c=new e.constructor;for(a in e)c[a]=CKEDITOR.tools.clone(e[a]);return c},capitalize:function(e,c){return e.charAt(0).toUpperCase()+(c?e.slice(1):e.slice(1).toLowerCase())},extend:function(e){var c=arguments.length,a,d;"boolean"==typeof(a=
arguments[c-1])?c--:"boolean"==typeof(a=arguments[c-2])&&(d=arguments[c-1],c-=2);for(var k=1;k<c;k++){var b=arguments[k]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(c){if(!0===a||null==e[c])if(!d||c in d)e[c]=b[c]})}return e},prototypedCopy:function(e){var c=function(){};c.prototype=e;return new c},copy:function(e){var c={},a;for(a in e)c[a]=e[a];return c},isArray:function(e){return"[object Array]"==Object.prototype.toString.call(e)},isEmpty:function(e){for(var c in e)if(e.hasOwnProperty(c))return!1;
return!0},cssVendorPrefix:function(e,c,d){if(d)return a+e+":"+c+";"+e+":"+c;d={};d[e]=c;d[a+e]=c;return d},cssStyleToDomStyle:function(){var e=document.createElement("div").style,c="undefined"!=typeof e.cssFloat?"cssFloat":"undefined"!=typeof e.styleFloat?"styleFloat":"float";return function(e){return"float"==e?c:e.replace(/-./g,function(e){return e.substr(1).toUpperCase()})}}(),buildStyleHtml:function(e){e=[].concat(e);for(var c,a=[],d=0;d<e.length;d++)if(c=e[d])/@import|[{}]/.test(c)?a.push("\x3cstyle\x3e"+
c+"\x3c/style\x3e"):a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+c+'"\x3e');return a.join("")},htmlEncode:function(e){return void 0===e||null===e?"":String(e).replace(g,"\x26amp;").replace(m,"\x26gt;").replace(l,"\x26lt;")},htmlDecode:function(a){return a.replace(c,e)},htmlEncodeAttr:function(e){return CKEDITOR.tools.htmlEncode(e).replace(k,"\x26quot;")},htmlDecodeAttr:function(e){return CKEDITOR.tools.htmlDecode(e)},transformPlainTextToHtml:function(e,c){var a=c==CKEDITOR.ENTER_BR,
d=this.htmlEncode(e.replace(/\r\n/g,"\n")),d=d.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),k=c==CKEDITOR.ENTER_P?"p":"div";if(!a){var b=/\n{2}/g;if(b.test(d))var g="\x3c"+k+"\x3e",f="\x3c/"+k+"\x3e",d=g+d.replace(b,function(){return f+g})+f}d=d.replace(/\n/g,"\x3cbr\x3e");a||(d=d.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+k+"\x3e)"),function(e){return CKEDITOR.tools.repeat(e,2)}));d=d.replace(/^ | $/g,"\x26nbsp;");return d=d.replace(/(>|\s) /g,function(e,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,
"\x26nbsp;")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var e="e",c=0;8>c;c++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e},override:function(e,c){var a=c(e);a.prototype=e.prototype;return a},setTimeout:function(e,c,a,d,k){k||(k=window);a||(a=k);return k.setTimeout(function(){d?e.apply(a,[].concat(d)):e.apply(a)},c||0)},throttle:function(e,c,a){return new this.buffers.throttle(e,
c,a)},trim:function(){var e=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(c){return c.replace(e,"")}}(),ltrim:function(){var e=/^[ \t\n\r]+/g;return function(c){return c.replace(e,"")}}(),rtrim:function(){var e=/[ \t\n\r]+$/g;return function(c){return c.replace(e,"")}}(),indexOf:function(e,c){if("function"==typeof c)for(var a=0,d=e.length;a<d;a++){if(c(e[a]))return a}else{if(e.indexOf)return e.indexOf(c);a=0;for(d=e.length;a<d;a++)if(e[a]===c)return a}return-1},search:function(e,c){var a=CKEDITOR.tools.indexOf(e,
c);return 0<=a?e[a]:null},bind:function(e,c){var a=Array.prototype.slice.call(arguments,2);return function(){return e.apply(c,a.concat(Array.prototype.slice.call(arguments)))}},createClass:function(e){var c=e.$,a=e.base,d=e.privates||e._,k=e.proto;e=e.statics;!c&&(c=function(){a&&this.base.apply(this,arguments)});if(d)var b=c,c=function(){var e=this._||(this._={}),c;for(c in d){var a=d[c];e[c]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}b.apply(this,arguments)};a&&(c.prototype=this.prototypedCopy(a.prototype),
c.prototype.constructor=c,c.base=a,c.baseProto=a.prototype,c.prototype.base=function p(){this.base=a.prototype.base;a.apply(this,arguments);this.base=p});k&&this.extend(c.prototype,k,!0);e&&this.extend(c,e,!0);return c},addFunction:function(e,c){return f.push(function(){return e.apply(c||this,arguments)})-1},removeFunction:function(e){f[e]=null},callFunction:function(e){var c=f[e];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var e=/^-?\d+\.?\d*px$/,c;return function(a){c=
CKEDITOR.tools.trim(a+"")+"px";return e.test(c)?c:a||""}}(),convertToPx:function(){var e;return function(c){e||(e=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(e));if(!/%$/.test(c)){var a=0>parseFloat(c);a&&(c=c.replace("-",""));e.setStyle("width",c);c=e.$.clientWidth;return a?-c:c}return c}}(),repeat:function(e,c){return Array(c+1).join(e)},
tryThese:function(){for(var e,c=0,a=arguments.length;c<a;c++){var d=arguments[c];try{e=d();break}catch(k){}}return e},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(e){return function(){var c=arguments,a=this;window.setTimeout(function(){e.apply(a,c)},0)}},normalizeCssText:function(e,c){var a=[],d,k=CKEDITOR.tools.parseCssText(e,!0,c);for(d in k)a.push(d+":"+k[d]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(e){return e.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(e,c,a,d){e=[c,a,d];for(c=0;3>c;c++)e[c]=("0"+parseInt(e[c],10).toString(16)).slice(-2);return"#"+e.join("")})},normalizeHex:function(e){return e.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(e,c,a,d){e=c.toLowerCase();3==e.length&&(e=e.split(""),e=[e[0],e[0],e[1],e[1],e[2],e[2]].join(""));return"#"+e+d})},_isValidColorFormat:function(e){if(!e)return!1;e=e.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(e)},parseCssText:function(e,c,a){var d={};a&&(e=(new CKEDITOR.dom.element("span")).setAttribute("style",
e).getAttribute("style")||"");e&&(e=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(e)));if(!e||";"==e)return d;e.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,a,n){c&&(a=a.toLowerCase(),"font-family"==a&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));d[a]=n});return d},writeCssText:function(e,c){var a,d=[];for(a in e)d.push(a+":"+e[a]);c&&d.sort();return d.join("; ")},objectCompare:function(e,c,a){var d;if(!e&&!c)return!0;if(!e||!c)return!1;
for(d in e)if(e[d]!=c[d])return!1;if(!a)for(d in c)if(e[d]!=c[d])return!1;return!0},objectKeys:function(e){return CKEDITOR.tools.object.keys(e)},convertArrayToObject:function(e,c){var a={};1==arguments.length&&(c=!0);for(var d=0,k=e.length;d<k;++d)a[e[d]]=c;return a},getStyledSpans:function(e,c){var a=CKEDITOR.env.ie&&8==CKEDITOR.env.version?e.toUpperCase():e,a=c.find("span[style*\x3d"+a+"]").toArray();return CKEDITOR.tools.array.filter(a,function(c){return!!c.getStyle(e)})},fixDomain:function(){for(var e;;)try{e=
window.parent.document.domain;break}catch(c){e=e?e.replace(/.+?(?:\.|$)/,""):document.domain;if(!e)break;document.domain=e}return!!e},eventsBuffer:function(e,c,a){return new this.buffers.event(e,c,a)},enableHtml5Elements:function(e,c){for(var a="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(" "),d=a.length,k;d--;)k=e.createElement(a[d]),c&&e.appendChild(k)},checkIfAnyArrayItemMatches:function(e,
c){for(var a=0,d=e.length;a<d;++a)if(e[a].match(c))return!0;return!1},checkIfAnyObjectPropertyMatches:function(e,c){for(var a in e)if(a.match(c))return!0;return!1},keystrokeToString:function(e,c){var a=this.keystrokeToArray(e,c);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(e,c){var a=c&16711680,d=c&65535,k=CKEDITOR.env.mac,b=[],g=[];a&CKEDITOR.CTRL&&(b.push(k?"⌘":e[17]),g.push(k?e[224]:e[17]));a&CKEDITOR.ALT&&(b.push(k?"⌥":e[18]),g.push(e[18]));a&CKEDITOR.SHIFT&&
(b.push(k?"⇧":e[16]),g.push(e[16]));d&&(e[d]?(b.push(e[d]),g.push(e[d])):(b.push(String.fromCharCode(d)),g.push(String.fromCharCode(d))));return{display:b,aria:g}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(e){e=e.toLowerCase();for(var c=document.cookie.split(";"),a,d,k=0;k<c.length;k++)if(a=c[k].split("\x3d"),d=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),d===e)return decodeURIComponent(1<a.length?
a[1]:"");return null},setCookie:function(e,c){document.cookie=encodeURIComponent(e)+"\x3d"+encodeURIComponent(c)+";path\x3d/"},getCsrfToken:function(){var e=CKEDITOR.tools.getCookie("ckCsrfToken");if(!e||40!=e.length){var e=[],c="";if(window.crypto&&window.crypto.getRandomValues)e=new Uint8Array(40),window.crypto.getRandomValues(e);else for(var a=0;40>a;a++)e.push(Math.floor(256*Math.random()));for(a=0;a<e.length;a++)var d="abcdefghijklmnopqrstuvwxyz0123456789".charAt(e[a]%36),c=c+(.5<Math.random()?
d.toUpperCase():d);e=c;CKEDITOR.tools.setCookie("ckCsrfToken",e)}return e},escapeCss:function(e){if(e)if(window.CSS&&CSS.escape)e=CSS.escape(e);else{e=String(e);for(var c=e.length,a=-1,d,k="",b=e.charCodeAt(0);++a<c;)d=e.charCodeAt(a),k=0==d?k+"�":127==d||1<=d&&31>=d||0==a&&48<=d&&57>=d||1==a&&48<=d&&57>=d&&45==b?k+("\\"+d.toString(16)+" "):0==a&&1==c&&45==d?k+("\\"+e.charAt(a)):128<=d||45==d||95==d||48<=d&&57>=d||65<=d&&90>=d||97<=d&&122>=d?k+e.charAt(a):k+("\\"+e.charAt(a));e=k}else e="";return e},
getMouseButton:function(e){return(e=e&&e.data?e.data.$:e)?CKEDITOR.tools.normalizeMouseButton(e.button):!1},normalizeMouseButton:function(e,c){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return e;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],d=0;d<a.length;d++){var k=a[d];if(k[0]===e&&c)return k[1];if(!c&&k[1]===e)return k[0]}},convertHexStringToBytes:function(e){var c=[],a=e.length/2,d;for(d=0;d<a;d++)c.push(parseInt(e.substr(2*
d,2),16));return c},convertBytesToBase64:function(e){var c="",a=e.length,d;for(d=0;d<a;d+=3){var k=e.slice(d,d+3),b=k.length,g=[],f;if(3>b)for(f=b;3>f;f++)k[f]=0;g[0]=(k[0]&252)>>2;g[1]=(k[0]&3)<<4|k[1]>>4;g[2]=(k[1]&15)<<2|(k[2]&192)>>6;g[3]=k[2]&63;for(f=0;4>f;f++)c=f<=b?c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g[f]):c+"\x3d"}return c},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 c={},a=this._findColor(e);a.length&&(c.color=a[0],CKEDITOR.tools.array.forEach(a,function(c){e=e.replace(c,"")}));if(e=CKEDITOR.tools.trim(e))c.unprocessed=e;return c},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,c){function a(e){d.top=k[e[0]];d.right=k[e[1]];d.bottom=k[e[2]];d.left=k[e[3]]}var d={},k=c?c(e):e.split(/\s+/);switch(k.length){case 1:a([0,0,0,0]);break;case 2:a([0,1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return d},border:function(e){return CKEDITOR.tools.style.border.fromCssRule(e)},_findColor:function(e){var c=[],a=CKEDITOR.tools.array,c=c.concat(e.match(this._rgbaRegExp)||[]),c=c.concat(e.match(this._hslaRegExp)||[]);return c=c.concat(a.filter(e.split(/\s+/),
function(e){return e.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:e.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(e,c,a){var d=[];this.forEach(e,function(k,b){c.call(a,k,b,e)&&d.push(k)});return d},find:function(e,c,a){for(var d=e.length,k=0;k<d;){if(c.call(a,e[k],k,e))return e[k];k++}},forEach:function(e,c,a){var d=e.length,k;for(k=0;k<d;k++)c.call(a,e[k],k,e)},map:function(e,c,a){for(var d=[],k=0;k<e.length;k++)d.push(c.call(a,e[k],k,e));return d},reduce:function(e,
c,a,d){for(var k=0;k<e.length;k++)a=c.call(d,a,e[k],k,e);return a},every:function(e,c,a){if(!e.length)return!0;c=this.filter(e,c,a);return e.length===c.length},some:function(e,c,a){for(var d=0;d<e.length;d++)if(c.call(a,e[d],d,e))return!0;return!1},zip:function(e,c){return CKEDITOR.tools.array.map(e,function(e,a){return[e,c[a]]})},unique:function(e){return this.filter(e,function(c,a){return a===CKEDITOR.tools.array.indexOf(e,c)})}},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(c){return[c,e[c]]})},values:function(e){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(e),function(c){return e[c]})},keys:function(e){var c=Object.prototype.hasOwnProperty,a=[],d=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!e||"object"!==typeof e)){c=[];if("string"===typeof e)for(a=0;a<e.length;a++)c.push(String(a));return c}for(var k in e)a.push(k);if(CKEDITOR.env.ie&&
9>CKEDITOR.env.version)for(k=0;k<d.length;k++)c.call(e,d[k])&&a.push(d[k]);return a},findKey:function(e,c){if("object"!==typeof e)return null;for(var a in e)if(e[a]===c)return a;return null},merge:function(e,c){var a=CKEDITOR.tools,d=a.clone(e),k=a.clone(c);a.array.forEach(a.object.keys(k),function(e){d[e]="object"===typeof k[e]&&"object"===typeof d[e]?a.object.merge(d[e],k[e]):k[e]});return d}},getAbsoluteRectPosition:function(e,c){function a(e){if(e){var c=e.getClientRect();d.top+=c.top;d.left+=
c.left;"x"in d&&"y"in d&&(d.x+=c.x,d.y+=c.y);a(e.getWindow().getFrame())}}var d=CKEDITOR.tools.copy(c);a(e.getFrame());var k=CKEDITOR.document.getWindow().getScrollPosition();d.top+=k.y;d.left+=k.x;"x"in d&&"y"in d&&(d.y+=k.y,d.x+=k.x);d.right=d.left+d.width;d.bottom=d.top+d.height;return d}};b.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}};h.prototype=CKEDITOR.tools.prototypedCopy(b.prototype);h.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};h.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=b;CKEDITOR.tools.buffers.throttle=h;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 c=this[e];c&&(this[e]=CKEDITOR.tools.array.reduce(this._.normalizeMap[e],function(e,c){return e.replace(c[0],c[1])},c))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(e){return!!e}).join(" ")}},statics:{fromCssRule:function(e){var c={},a=e.split(/\s+/g);e=CKEDITOR.tools.style.parse._findColor(e);e.length&&(c.color=e[0]);CKEDITOR.tools.array.forEach(a,function(e){c.style||
-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,e)?!c.width&&CKEDITOR.tools.style.parse._widthRegExp.test(e)&&(c.width=e):c.style=e});return new CKEDITOR.tools.style.border(c)},splitCssValues:function(e,c){c=c||{};var a=CKEDITOR.tools.array.reduce(["width","style","color"],function(a,d){var k=e["border-"+d]||c[d];a[d]=k?CKEDITOR.tools.style.parse.sideShorthand(k):null;return a},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(c,d){var k={},b;for(b in a){var g=
e["border-"+d+"-"+b];k[b]=g?g:a[b]&&a[b][d]}c["border-"+d]=new CKEDITOR.tools.style.border(k);return c},{})}}});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 b=CKEDITOR.tools.extend,h=function(c,e){for(var a=CKEDITOR.tools.clone(c),k=1;k<arguments.length;k++){e=arguments[k];for(var b in e)delete a[b]}return a},f={},a={},
g={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},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={},k={"#":1},c={center:1,dir:1,noframes:1};b(f,{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},k,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});b(a,g,f,c);h={a:h(f,{a:1,button:1}),abbr:f,address:a,area:l,article:a,aside:a,audio:b({source:1,track:1},a),b:f,base:l,bdi:f,bdo:f,blockquote:a,body:a,br:l,button:h(f,{a:1,button:1}),canvas:f,caption:a,cite:f,code:f,col:l,colgroup:{col:1},command:l,
datalist:b({option:1},f),dd:a,del:f,details:b({summary:1},a),dfn:f,div:a,dl:{dt:1,dd:1},dt:a,em:f,embed:l,fieldset:b({legend:1},a),figcaption:a,figure:b({figcaption:1},a),footer:a,form:a,h1:f,h2:f,h3:f,h4:f,h5:f,h6:f,head:b({title:1,base:1},m),header:a,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:b({head:1,body:1},a,m),i:f,iframe:k,img:l,input:l,ins:f,kbd:f,keygen:l,label:f,legend:f,li:a,link:l,main:a,map:a,mark:f,menu:b({li:1},a),meta:l,meter:h(f,{meter:1}),nav:a,noscript:b({link:1,meta:1,style:1},
f),object:b({param:1},f),ol:{li:1},optgroup:{option:1},option:k,output:f,p:f,param:l,pre:f,progress:h(f,{progress:1}),q:f,rp:f,rt:f,ruby:b({rp:1,rt:1},f),s:f,samp:f,script:k,section:a,select:{optgroup:1,option:1},small:f,source:l,span:f,strong:f,style:k,sub:f,summary:b({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},f),sup:f,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:a,textarea:k,tfoot:{tr:1},th:a,thead:{tr:1},time:h(f,{time:1}),title:k,tr:{th:1,td:1},track:l,u:f,ul:{li:1},"var":f,
video:b({source:1,track:1},a),wbr:l,acronym:f,applet:b({param:1},a),basefont:l,big:f,center:a,dialog:l,dir:{li:1},font:f,isindex:l,noframes:a,strike:f,tt:f};b(h,{$block:b({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},g,c),$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:f,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:b({body:1,head:1,html:1},h.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}});return h}(),CKEDITOR.dom.event=function(b){this.$=b},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var b=this.getKey();if(this.$.ctrlKey||this.$.metaKey)b+=CKEDITOR.CTRL;
this.$.shiftKey&&(b+=CKEDITOR.SHIFT);this.$.altKey&&(b+=CKEDITOR.ALT);return b},preventDefault:function(b){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;b&&this.stopPropagation()},stopPropagation:function(){var b=this.$;b.stopPropagation?b.stopPropagation():b.cancelBubble=!0},getTarget:function(){var b=this.$.target||this.$.srcElement;return b?new CKEDITOR.dom.node(b):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var b=this.getTarget().getDocument().$;
return{x:this.$.pageX||this.$.clientX+(b.documentElement.scrollLeft||b.body.scrollLeft),y:this.$.pageY||this.$.clientY+(b.documentElement.scrollTop||b.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(b){b&&(this.$=b)},CKEDITOR.dom.domObject.prototype=function(){var b=function(b,f){return function(a){"undefined"!=typeof CKEDITOR&&b.fire(f,
new CKEDITOR.dom.event(a))}};return{getPrivate:function(){var b;(b=this.getCustomData("_"))||this.setCustomData("_",b={});return b},on:function(h){var f=this.getCustomData("_cke_nativeListeners");f||(f={},this.setCustomData("_cke_nativeListeners",f));f[h]||(f=f[h]=b(this,h),this.$.addEventListener?this.$.addEventListener(h,f,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+h,f));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(b){CKEDITOR.event.prototype.removeListener.apply(this,
arguments);if(!this.hasListeners(b)){var f=this.getCustomData("_cke_nativeListeners"),a=f&&f[b];a&&(this.$.removeEventListener?this.$.removeEventListener(b,a,!1):this.$.detachEvent&&this.$.detachEvent("on"+b,a),delete f[b])}},removeAllListeners:function(){try{var b=this.getCustomData("_cke_nativeListeners"),f;for(f in b){var a=b[f];this.$.detachEvent?this.$.detachEvent("on"+f,a):this.$.removeEventListener&&this.$.removeEventListener(f,a,!1);delete b[f]}}catch(g){if(!CKEDITOR.env.edge||-2146828218!==
g.number)throw g;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(b){var h={};CKEDITOR.on("reset",function(){h={}});b.equals=function(b){try{return b&&b.$===this.$}catch(a){return!1}};b.setCustomData=function(b,a){var g=this.getUniqueId();(h[g]||(h[g]={}))[b]=a;return this};b.getCustomData=function(b){var a=this.$["data-cke-expando"];return(a=a&&h[a])&&b in a?a[b]:null};b.removeCustomData=function(b){var a=this.$["data-cke-expando"],a=a&&h[a],g,m;a&&(g=a[b],m=b in a,delete a[b]);
return m?g:null};b.clearCustomData=function(){this.removeAllListeners();var b=this.getUniqueId();b&&delete h[b]};b.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(b)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(b){return b?new CKEDITOR.dom[b.nodeType==CKEDITOR.NODE_DOCUMENT?"document":b.nodeType==CKEDITOR.NODE_ELEMENT?"element":b.nodeType==CKEDITOR.NODE_TEXT?"text":b.nodeType==CKEDITOR.NODE_COMMENT?
"comment":b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](b):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(b,h){b.append(this,h);return b},clone:function(b,h){function f(a){a["data-cke-expando"]&&(a["data-cke-expando"]=!1);if(a.nodeType==CKEDITOR.NODE_ELEMENT||a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(h||a.nodeType!=CKEDITOR.NODE_ELEMENT||a.removeAttribute("id",!1),b){a=a.childNodes;for(var g=0;g<a.length;g++)f(a[g])}}function a(g){if(g.type==CKEDITOR.NODE_ELEMENT||g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=g.getName();":"==f[0]&&
g.renameNode(f.substring(1))}if(b)for(f=0;f<g.getChildCount();f++)a(g.getChild(f))}}var g=this.$.cloneNode(b);f(g);g=new CKEDITOR.dom.node(g);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(g);return g},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(b){b.$.parentNode.insertBefore(this.$,b.$.nextSibling);return b},insertBefore:function(b){b.$.parentNode.insertBefore(this.$,
b.$);return b},insertBeforeMe:function(b){this.$.parentNode.insertBefore(b.$,this.$);return b},getAddress:function(b){for(var h=[],f=this.getDocument().$.documentElement,a=this;a&&a!=f;){var g=a.getParent();g&&h.unshift(this.getIndex.call(a,b));a=g}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(b){function h(a,b){var k=b?a.getNext():a.getPrevious();return k&&k.type==CKEDITOR.NODE_TEXT?k.isEmpty()?h(k,b):k:
null}var f=this,a=-1,g;if(!this.getParent()||b&&f.type==CKEDITOR.NODE_TEXT&&f.isEmpty()&&!h(f)&&!h(f,!0))return-1;do if(!b||f.equals(this)||f.type!=CKEDITOR.NODE_TEXT||!g&&!f.isEmpty())a++,g=f.type==CKEDITOR.NODE_TEXT;while(f=f.getPrevious());return a},getNextSourceNode:function(b,h,f){if(f&&!f.call){var a=f;f=function(b){return!b.equals(a)}}b=!b&&this.getFirst&&this.getFirst();var g;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;b=this.getNext()}for(;!b&&(g=(g||this).getParent());){if(f&&
!1===f(g,!0))return null;b=g.getNext()}return!b||f&&!1===f(b)?null:h&&h!=b.type?b.getNextSourceNode(!1,h,f):b},getPreviousSourceNode:function(b,h,f){if(f&&!f.call){var a=f;f=function(b){return!b.equals(a)}}b=!b&&this.getLast&&this.getLast();var g;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;b=this.getPrevious()}for(;!b&&(g=(g||this).getParent());){if(f&&!1===f(g,!0))return null;b=g.getPrevious()}return!b||f&&!1===f(b)?null:h&&b.type!=h?b.getPreviousSourceNode(!1,h,f):
b},getPrevious:function(b){var h=this.$,f;do f=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(f&&b&&!b(f));return f},getNext:function(b){var h=this.$,f;do f=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(f&&b&&!b(f));return f},getParent:function(b){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||b&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(b){var h=this,f=[];do f[b?"push":"unshift"](h);while(h=h.getParent());
return f},getCommonAncestor:function(b){if(b.equals(this))return this;if(b.contains&&b.contains(this))return b;var h=this.contains?this:this.getParent();do if(h.contains(b))return h;while(h=h.getParent());return null},getPosition:function(b){var h=this.$,f=b.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(f);if(h==f)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&b.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(f))return CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING;if(f.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>f.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex<f.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();b=b.getAddress();for(var f=Math.min(h.length,b.length),a=0;a<f;a++)if(h[a]!=b[a])return h[a]<b[a]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<b.length?CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(b,h){var f=this.$,a,g;h||(f=f.parentNode);"function"==typeof b?(g=!0,a=b):(g=!1,a=function(a){a="string"==typeof a.nodeName?a.nodeName.toLowerCase():"";return"string"==typeof b?a==b:a in b});for(;f;){if(a(g?new CKEDITOR.dom.node(f):f))return new CKEDITOR.dom.node(f);try{f=f.parentNode}catch(m){f=null}}return null},hasAscendant:function(b,h){var f=this.$;h||(f=f.parentNode);for(;f;){if(f.nodeName&&
f.nodeName.toLowerCase()==b)return!0;f=f.parentNode}return!1},move:function(b,h){b.append(this.remove(),h)},remove:function(b){var h=this.$,f=h.parentNode;if(f){if(b)for(;b=h.firstChild;)f.insertBefore(h.removeChild(b),h);f.removeChild(h)}return this},replace:function(b){this.insertBefore(b);b.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var b;this.getFirst&&(b=this.getFirst());){if(b.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(b.getText()),f=b.getLength();if(h)h.length<
f&&(b.split(f-h.length),this.$.removeChild(this.$.firstChild));else{b.remove();continue}}break}},rtrim:function(){for(var b;this.getLast&&(b=this.getLast());){if(b.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(b.getText()),f=b.getLength();if(h)h.length<f&&(b.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{b.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(b=this.$.lastChild)&&1==b.type&&"br"==b.nodeName.toLowerCase()&&b.parentNode.removeChild(b)},isReadOnly:function(b){var h=
this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(b=!0);if(!b&&h&&"undefined"!=typeof h.$.isContentEditable)return!(h.$.isContentEditable||h.data("cke-editable"));for(;h;){if(h.data("cke-editable"))return!1;if(h.hasAttribute("contenteditable"))return"false"==h.getAttribute("contenteditable");h=h.getParent()}return!0}}),CKEDITOR.dom.window=function(b){CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,
CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var b=this.$.document,h="CSS1Compat"==b.compatMode;return{width:(h?b.documentElement.clientWidth:b.body.clientWidth)||0,height:(h?b.documentElement.clientHeight:b.body.clientHeight)||0}},getScrollPosition:function(){var b=this.$;if("pageXOffset"in b)return{x:b.pageXOffset||0,y:b.pageYOffset||0};b=b.document;return{x:b.documentElement.scrollLeft||b.body.scrollLeft||0,y:b.documentElement.scrollTop||
b.body.scrollTop||0}},getFrame:function(){var b=this.$.frameElement;return b?new CKEDITOR.dom.element.get(b):null}}),CKEDITOR.dom.document=function(b){CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(b){if(this.$.createStyleSheet)this.$.createStyleSheet(b);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",type:"text/css",
href:b});this.getHead().append(h)}},appendStyleText:function(b){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=b}else{var f=new CKEDITOR.dom.element("style",this);f.append(new CKEDITOR.dom.text(b,this));this.getHead().append(f)}return h||f.$.sheet},createElement:function(b,h){var f=new CKEDITOR.dom.element(b,this);h&&(h.attributes&&f.setAttributes(h.attributes),h.styles&&f.setStyles(h.styles));return f},createText:function(b){return new CKEDITOR.dom.text(b,this)},focus:function(){this.getWindow().focus()},
getActive:function(){var b;try{b=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(b)},getById:function(b){return(b=this.$.getElementById(b))?new CKEDITOR.dom.element(b):null},getByAddress:function(b,h){for(var f=this.$.documentElement,a=0;f&&a<b.length;a++){var g=b[a];if(h)for(var m=-1,l=0;l<f.childNodes.length;l++){var k=f.childNodes[l];if(!0!==h||3!=k.nodeType||!k.previousSibling||3!=k.previousSibling.nodeType)if(m++,m==g){f=k;break}}else f=f.childNodes[g]}return f?new CKEDITOR.dom.node(f):
null},getElementsByTag:function(b,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(b=h+":"+b);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b=b?new CKEDITOR.dom.element(b):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(b){this.$.open("text/html","replace");CKEDITOR.env.ie&&(b=b.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(b);this.$.close()},find:function(b){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b))},findOne:function(b){return(b=this.$.querySelector(b))?new CKEDITOR.dom.element(b):null},_getHtml5ShivFrag:function(){var b=this.getCustomData("html5ShivFrag");b||
(b=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(b,!0),this.setCustomData("html5ShivFrag",b));return b}}),CKEDITOR.dom.nodeList=function(b){this.$=b},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(b){return 0>b||b>=this.$.length?null:(b=this.$[b])?new CKEDITOR.dom.node(b):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(b){return new CKEDITOR.dom.node(b)})}},CKEDITOR.dom.element=function(b,h){"string"==typeof b&&
(b=(h?h.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.element.get=function(b){return(b="string"==typeof b?document.getElementById(b)||document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(b,h){var f=new CKEDITOR.dom.element("div",h);f.setHtml(b);return f.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(b,h,f,a){var g=h.getCustomData("list_marker_id")||
h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");b[g]=h;m[f]=1;return h.setCustomData(f,a)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var h in b)CKEDITOR.dom.element.clearMarkers(b,b[h],1)},CKEDITOR.dom.element.clearMarkers=function(b,h,f){var a=h.getCustomData("list_marker_names"),g=h.getCustomData("list_marker_id"),m;for(m in a)h.removeCustomData(m);
h.removeCustomData("list_marker_names");f&&(h.removeCustomData("list_marker_id"),delete b[g])},function(){function b(a,c){return-1<(" "+a+" ").replace(m," ").indexOf(" "+c+" ")}function h(a){var c=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||a.removeAttribute("id")}}function f(a,c){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+c.split(/,\s*/).join(", #"+d+" ")}function a(a){for(var c=0,d=0,e=l[a].length;d<e;d++)c+=parseFloat(this.getComputedStyle(l[a][d])||
0,10)||0;return c}var g=document.createElement("_").classList,g="undefined"!==typeof g&&null!==String(g.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:g?function(a){this.$.classList.add(a);return this}:function(a){var c=this.$.className;c&&(b(c,a)||(c+=" "+a));this.$.className=c||a;return this},removeClass:g?function(a){var c=this.$;c.classList.remove(a);c.className||c.removeAttribute("class");return this}:function(a){var c=
this.getAttribute("class");c&&b(c,a)&&((c=c.replace(new RegExp("(?:^|\\s+)"+a+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(a){return b(this.$.className,a)},append:function(a,c){"string"==typeof a&&(a=this.getDocument().createElement(a));c?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var c=new CKEDITOR.dom.element("div",this.getDocument());
c.setHtml(a);c.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,
c){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);var e=d.extractContents(!1,c||!1),b;d.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");b=e.getFirst();)b.$.style.backgroundColor&&(b.$.style.backgroundColor=b.$.style.backgroundColor),d.append(b);d.insertAfter(this);d.remove(!0)}else e.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&
16)}:function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):c!=a.$&&c.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(c){}}return function(c){c?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));
return a.innerHTML},getClientRect:function(a){var c=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&&(c.height=c.bottom-c.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),c):c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var c=this.$;if(this.getParent())return c.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(c);c.innerHTML=a;d.removeChild(c);return a}catch(e){this.$.innerHTML="";
c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(c){this.$[a?"textContent":"innerText"]=c}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a=
"className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):
null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var c={},d=this.$.attributes,e;a=CKEDITOR.tools.isArray(a)?a:[];for(e=0;e<d.length;e++)-1===CKEDITOR.tools.indexOf(a,d[e].name)&&(c[d[e].name]=d[e].value);return c},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(a){var c=this.getWindow().$.getComputedStyle(this.$,
null);return c?c.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-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 a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var c=this.$.scopeName;"HTML"!=c&&(a=c.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var c=this.$.firstChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getNext(a));
return c},getLast:function(a){var c=this.$.lastChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getPrevious(a));return c},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var c=0;c<arguments.length;c++)if(arguments[c]==a)return!0;return!1},isEditable:function(a){var c=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||
CKEDITOR.dtd.$nonEditable[c]||CKEDITOR.dtd.$empty[c]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[c]||CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var c=this.clone(0,1);a=a.clone(0,1);c.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(c.$.isEqualNode)return c.$.style.cssText=
CKEDITOR.tools.normalizeCssText(c.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),c.$.isEqualNode(a.$);c=c.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var d=this.getParent();d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(c),c=d.getHtml(),d.setHtml(a),a=d.getHtml())}return c==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),c,d;a&&CKEDITOR.env.webkit&&
(c=this.getWindow(),!c.equals(CKEDITOR.document.getWindow())&&(d=c.$.frameElement)&&(a=(new CKEDITOR.dom.element(d)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),c=0,d=a.count();c<d;c++){var e=a.getItem(c);if(e.type!=CKEDITOR.NODE_ELEMENT||!e.data("cke-bookmark"))if(e.type==CKEDITOR.NODE_ELEMENT&&!e.isEmptyInlineRemoveable()||e.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(e.getText()))return!1}return!0},
hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,c=0;c<a.length;c++){var d=a[c];switch(d.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(d.specified)return!0}}return!1}:function(){var a=this.$.attributes,c=a.length,d={"data-cke-expando":1,_moz_dirty:1};return 0<c&&(2<c||!d[a[0].nodeName]||2==c&&!d[a[1].nodeName])},hasAttribute:function(){function a(c){var d=this.$.attributes.getNamedItem(c);
if("input"==this.getName())switch(c){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return c=this.getAttribute("type"),"checkbox"==c||"radio"==c?"on"!=this.$.value:!!this.$.value}return d?d.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(c){return"name"==c?!!this.$.name:a.call(this,c)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var d=this.$;
a=a.$;if(d!=a){var e;if(c)for(;e=d.lastChild;)a.insertBefore(d.removeChild(e),a.firstChild);else for(;e=d.firstChild;)a.appendChild(d.removeChild(e))}},mergeSiblings:function(){function a(c,d,e){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var b=[];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(b.push(d),d=e?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(d)){for(var g=e?c.getLast():c.getFirst();b.length;)b.shift().move(c,!e);d.moveChildren(c,!e);d.remove();
g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(c){if(!1===c||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,d){"class"==c?this.$.className=d:"style"==c?this.$.style.cssText=d:"tabindex"==c?
this.$.tabIndex=d:"checked"==c?this.$.checked=d:"contenteditable"==c?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,d){if("src"==c&&d.match(/^http:\/\//))try{a.apply(this,arguments)}catch(e){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};
return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var c=0;c<a.length;c++)this.removeAttribute(a[c]);else for(c in a=a||this.getAttributes(),a)a.hasOwnProperty(c)&&this.removeAttribute(c)},removeStyle:function(a){var c=this.$.style;if(c.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=
a)c.removeProperty?c.removeProperty(a):c.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var d=["top","left","right","bottom"],e;"border"==a&&(e=["color","style","width"]);for(var c=[],b=0;b<d.length;b++)if(e)for(var g=0;g<e.length;g++)c.push([a,d[b],e[g]].join("-"));else c.push([a,d[b]].join("-"));for(a=0;a<c.length;a++)this.removeStyle(c[a])}},setStyle:function(a,c){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=c;return this},setStyles:function(a){for(var c in a)this.setStyle(c,
a[c]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,c=this.getElementsByTag("*"),d=0,e=c.count();d<e;d++)a=c.getItem(d),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=
this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var c=0,d=0,e=this.getDocument(),b=e.getBody(),g="BackCompat"==e.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var f=this.$.getBoundingClientRect(),m=e.$.documentElement,l=m.clientTop||b.$.clientTop||0,v=m.clientLeft||b.$.clientLeft||0,h=!0;CKEDITOR.env.ie&&(h=e.getDocumentElement().contains(this),
e=e.getBody().contains(this),h=g&&e||!g&&h);h&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(c=b.$.scrollLeft||m.scrollLeft,d=b.$.scrollTop||m.scrollTop):(d=g?b.$:m,c=d.scrollLeft,d=d.scrollTop),c=f.left+c-v,d=f.top+d-l)}else for(l=this,v=null;l&&"body"!=l.getName()&&"html"!=l.getName();){c+=l.$.offsetLeft-l.$.scrollLeft;d+=l.$.offsetTop-l.$.scrollTop;l.equals(this)||(c+=l.$.clientLeft||0,d+=l.$.clientTop||0);for(;v&&!v.equals(l);)c-=v.$.scrollLeft,d-=v.$.scrollTop,v=v.getParent();
v=l;l=(f=l.$.offsetParent)?new CKEDITOR.dom.element(f):null}a&&(f=this.getWindow(),l=a.getWindow(),!f.equals(l)&&f.$.frameElement&&(a=(new CKEDITOR.dom.element(f.$.frameElement)).getDocumentPosition(a),c+=a.x,d+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||g||(c+=this.$.clientLeft?1:0,d+=this.$.clientTop?1:0);return{x:c,y:d}},scrollIntoView:function(a){var c=this.getParent();if(c){do if((c.$.clientWidth&&c.$.clientWidth<c.$.scrollWidth||c.$.clientHeight&&c.$.clientHeight<
c.$.scrollHeight)&&!c.is("body")&&this.scrollIntoParent(c,a,1),c.is("html")){var d=c.getWindow();try{var e=d.$.frameElement;e&&(c=new CKEDITOR.dom.element(e))}catch(b){}}while(c=c.getParent())}},scrollIntoParent:function(a,c,d){var e,b,g,f;function m(e,c){/body|html/.test(a.getName())?a.getWindow().$.scrollBy(e,c):(a.$.scrollLeft+=e,a.$.scrollTop+=c)}function l(a,e){var c={x:0,y:0};if(!a.is(h?"body":"html")){var d=a.$.getBoundingClientRect();c.x=d.left;c.y=d.top}d=a.getWindow();d.equals(e)||(d=l(CKEDITOR.dom.element.get(d.$.frameElement),
e),c.x+=d.x,c.y+=d.y);return c}function v(a,e){return parseInt(a.getComputedStyle("margin-"+e)||0,10)||0}!a&&(a=this.getWindow());g=a.getDocument();var h="BackCompat"==g.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=h?g.getBody():g.getDocumentElement());CKEDITOR.env.webkit&&(g=this.getEditor(!1))&&(g._.previousScrollTop=null);g=a.getWindow();b=l(this,g);var p=l(a,g),y=this.$.offsetHeight;e=this.$.offsetWidth;var q=a.$.clientHeight,u=a.$.clientWidth;g=b.x-v(this,"left")-p.x||0;f=b.y-v(this,"top")-
p.y||0;e=b.x+e+v(this,"right")-(p.x+u)||0;b=b.y+y+v(this,"bottom")-(p.y+q)||0;(0>f||0<b)&&m(0,!0===c?f:!1===c?b:0>f?f:b);d&&(0>g||0<e)&&m(0>g?g:e,0)},setState:function(a,c,d){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+"_off");this.removeClass(c+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on");
d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off"),this.removeClass(c+"_on"),this.removeClass(c+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){var d=this.$.attributes;c=c||{};for(var e=0;e<d.length;e++){var b=
d[e],g=b.nodeName.toLowerCase(),f;if(!(g in c))if("checked"==g&&(f=this.getAttribute(g)))a.setAttribute(g,f);else if(!CKEDITOR.env.ie||this.hasAttribute(g))f=this.getAttribute(g),null===f&&(f=b.nodeValue),a.setAttribute(g,f)}""!==this.$.style.cssText&&(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var c=this.getDocument();a=new CKEDITOR.dom.element(a,c);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);
a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(c,d){var e=c.childNodes;if(0<=d&&d<e.length)return e[d]}return function(c){var d=this.$;if(c.slice)for(c=c.slice();0<c.length&&d;)d=a(d,c.shift());else d=a(d,c);return d?new CKEDITOR.dom.node(d):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT&&c.hasClass("cke_enable_context_menu")}this.on("contextmenu",
function(c){c.data.getTarget().getAscendant(a,!0)||c.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,c){a="data-"+a;if(void 0===c)return this.getAttribute(a);!1===c?this.removeAttribute(a):this.setAttribute(a,c);return null},getEditor:function(a){var c=CKEDITOR.instances,d,e,b;a=
a||void 0===a;for(d in c)if(e=c[d],e.element.equals(this)&&e.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(b=e.editable())&&(b.equals(this)||b.contains(this)))return e;return null},find:function(a){var c=h(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f(this,a)));c();return a},findOne:function(a){var c=h(this);a=this.$.querySelector(f(this,a));c();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,c,d){if(!(d||c&&this.type!=c))var e=a(this);if(!1!==e){d=this.getChildren();
for(var b=0;b<d.count();b++)e=d.getItem(b),e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,c):c&&e.type!=c||a(e)}},fireEventHandler:function(a,c){var d="on"+a,e=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var b=e.ownerDocument.createEventObject(),g;for(g in c)b[g]=c[g];e.fireEvent(d,b)}else e[e[a]?a:d](c)},isDetached:function(){var a=this.getDocument(),c=a.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!a.$.defaultView:
!1:!0}});var l={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(b,c,d){"number"==typeof c&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(c-=a.call(this,b)),this.setStyle(b,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(b,c){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||
0;c&&(d-=a.call(this,b));return d}}(),CKEDITOR.dom.documentFragment=function(b){b=b||CKEDITOR.document;this.$=b.type==CKEDITOR.NODE_DOCUMENT?b.$.createDocumentFragment():b},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(b){b=b.$;b.parentNode.insertBefore(this.$,b.nextSibling)},getHtml:function(){var b=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(b);return b.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 b(a,e){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),
null;c.optimize()}var d,b=c.startContainer;d=c.endContainer;var g=c.startOffset,f=c.endOffset,n,m=this.guard,k=this.type,l=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var h=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),C=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(f):d.getNext();this._.guardLTR=function(a,e){return(!e||!h.equals(a))&&(!C||!a.equals(C))&&(a.type!=CKEDITOR.NODE_ELEMENT||!e||!a.equals(c.root))}}if(a&&!this._.guardRTL){var E=b.type==CKEDITOR.NODE_ELEMENT?b:b.getParent(),
F=b.type==CKEDITOR.NODE_ELEMENT?g?b.getChild(g-1):null:b.getPrevious();this._.guardRTL=function(a,e){return(!e||!E.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!e||!a.equals(c.root))}}var G=a?this._.guardRTL:this._.guardLTR;n=m?function(a,e){return!1===G(a,e)?!1:m(a,e)}:G;this.current?d=this.current[l](!1,k,n):(a?d.type==CKEDITOR.NODE_ELEMENT&&(d=0<f?d.getChild(f-1):!1===n(d,!0)?null:d.getPreviousSourceNode(!0,k,n)):(d=b,d.type==CKEDITOR.NODE_ELEMENT&&((d=d.getChild(g))||(d=!1===
n(b,!0)?null:b.getNextSourceNode(!0,k,n)))),d&&!1===n(d)&&(d=null));for(;d&&!this._.end;){this.current=d;if(!this.evaluator||!1!==this.evaluator(d)){if(!e)return d}else if(e&&this.evaluator)return!1;d=d[l](!1,k,n)}this.end();return this.current=null}function h(a){for(var e,c=null;e=b.call(this,a);)c=e;return c}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return b.call(this)},previous:function(){return b.call(this,
1)},checkForward:function(){return!1!==b.call(this,0,1)},checkBackward:function(){return!1!==b.call(this,1,1)},lastForward:function(){return h.call(this)},lastBackward:function(){return h.call(this,1)},reset:function(){delete this.current;this._={}}}});var f={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},a={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=
function(e){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in a||!f[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||e&&this.is(e)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(e){return!(e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,e){function c(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}
return function(d){var b,g;b=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(g=d.getParent())&&c(g);b=a?b:b||c(d);return!!(e^b)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(e){var c;e&&e.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(e.getText())||CKEDITOR.env.webkit&&e.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var e=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(d){e(d)?d=1:(d.type==CKEDITOR.NODE_TEXT&&
(d=d.getParent()),d=d.$.offsetWidth<=c);return!!(a^d)}};CKEDITOR.dom.walker.nodeType=function(a,e){return function(c){return!!(e^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function e(a){return!m(a)&&!l(a)}return function(c){var d=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&g.test(c.getText());d&&(d=c.getParent(),c=c.getNext(e),d=d.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^d)}};CKEDITOR.dom.walker.temp=function(a){return function(e){e.type!=
CKEDITOR.NODE_ELEMENT&&(e=e.getParent());e=e&&e.hasAttribute("data-cke-temp");return!!(a^e)}};var g=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),k=CKEDITOR.dom.walker.temp(),c=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(a){return function(e){e=m(e)||l(e)||k(e);return!!(a^e)}};var d=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=
function(a){return function(e){for(var c=0,b=e.getChildCount();c<b;++c)if(!d(e.getChild(c)))return!!a;return!a}};var e=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var e={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(e[c]=1);return e}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(c){c=d(c)?!1:c.type==CKEDITOR.NODE_TEXT||c.type==CKEDITOR.NODE_ELEMENT&&(c.is(CKEDITOR.dtd.$inline)||c.is("hr")||
"false"==c.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&c.is(n)&&e(c))?!0:!1;return!!(a^c)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(c(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&g.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(b){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var h=b instanceof CKEDITOR.dom.document;this.document=h?b:b.getDocument();
this.root=h?b.getBody():b},function(){function b(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function h(a,c,d,b,g){function f(a,e,c,d){var b=c?a.getPrevious():a.getNext();if(d&&l)return b;q||d?e.append(a.clone(!0,g),c):(a.remove(),h&&e.append(a,c));return b}function m(){var a,e,c,d=Math.min(I.length,M.length);for(a=0;a<d;a++)if(e=I[a],c=M[a],!e.equals(c))return a;return a-1}function k(){var c=R-1,d=G&&L&&!u.equals(B);c<K-1||
c<H-1||d?(d?a.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START):H==c+1&&F?a.moveToPosition(M[c],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(M[c+1],CKEDITOR.POSITION_BEFORE_START),b&&(c=I[c+1])&&c.type==CKEDITOR.NODE_ELEMENT&&(d=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),d.insertAfter(c),c.mergeSiblings(!1),a.moveToBookmark({startNode:d}))):a.collapse(!0)}a.optimizeBookmark();var l=0===c,h=1==c,q=2==c;c=q||
h;var u=a.startContainer,B=a.endContainer,A=a.startOffset,C=a.endOffset,E,F,G,L,D,O;if(q&&B.type==CKEDITOR.NODE_TEXT&&(u.equals(B)||u.type===CKEDITOR.NODE_ELEMENT&&u.getFirst().equals(B)))d.append(a.document.createText(B.substring(A,C)));else{B.type==CKEDITOR.NODE_TEXT?q?O=!0:B=B.split(C):0<B.getChildCount()?C>=B.getChildCount()?(B=B.getChild(C-1),F=!0):B=B.getChild(C):L=F=!0;u.type==CKEDITOR.NODE_TEXT?q?D=!0:u.split(A):0<u.getChildCount()?0===A?(u=u.getChild(A),E=!0):u=u.getChild(A-1):G=E=!0;for(var I=
u.getParents(),M=B.getParents(),R=m(),K=I.length-1,H=M.length-1,P=d,Y,T,X,da=-1,J=R;J<=K;J++){T=I[J];X=T.getNext();for(J!=K||T.equals(M[J])&&K<H?c&&(Y=P.append(T.clone(0,g))):E?f(T,P,!1,G):D&&P.append(a.document.createText(T.substring(A)));X;){if(X.equals(M[J])){da=J;break}X=f(X,P)}P=Y}P=d;for(J=R;J<=H;J++)if(d=M[J],X=d.getPrevious(),d.equals(I[J]))c&&(P=P.getChild(0));else{J!=H||d.equals(I[J])&&H<K?c&&(Y=P.append(d.clone(0,g))):F?f(d,P,!1,L):O&&P.append(a.document.createText(d.substring(0,C)));if(J>
da)for(;X;)X=f(X,P,!0);P=Y}q||k()}}function f(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),b=CKEDITOR.dom.walker.bogus();return function(g){return d(g)||c(g)?!0:b(g)&&!a?a=!0:g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(m)?!1:!0}}function a(a){var c=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1);return function(b){return d(b)||c(b)?!0:!a&&l(b)||b.type==CKEDITOR.NODE_ELEMENT&&
b.is(CKEDITOR.dtd.$removeEmpty)}}function g(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&d(a)&&(b=a);return c(a)&&!(l(a)&&a.equals(b))})}}var m={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},l=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,c=CKEDITOR.dom.walker.editable(),d=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype=
{clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var c=new CKEDITOR.dom.documentFragment(this.document);
this.collapsed||h(this,2,c,!1,"undefined"==typeof a?!0:a);return c},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,c){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,d,a,"undefined"==typeof c?!0:c);return d},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function c(a){return a.getAscendant(function(a){var e;
if(e=a.data&&a.data("cke-temp"))e=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return e},!0)}var d=this.startContainer,b=this.endContainer,g=this.collapsed,f,m,k,l;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");a&&(k="cke_bm_"+CKEDITOR.tools.getNextNumber(),f.setAttribute("id",k+(g?"C":"S")));g||(m=f.clone(),m.setHtml("\x26nbsp;"),a&&m.setAttribute("id",k+"E"),l=this.clone(),c(b)&&(b=c(b),
l.moveToPosition(b,CKEDITOR.POSITION_AFTER_END)),l.collapse(),l.insertNode(m));l=this.clone();c(d)&&(b=c(d),l.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START));l.collapse(!0);l.insertNode(f);m?(this.setStartAfter(f),this.setEndBefore(m)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:a?k+(g?"C":"S"):f,endNode:a?k+"E":m,serializable:a,collapsed:g}},createBookmark2:function(){function a(e){var c=e.container,b=e.offset,g;g=c;var f=b;g=g.type!=CKEDITOR.NODE_ELEMENT||0===f||f==g.getChildCount()?
0:g.getChild(f-1).type==CKEDITOR.NODE_TEXT&&g.getChild(f).type==CKEDITOR.NODE_TEXT;g&&(c=c.getChild(b-1),b=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0<b){a:{for(g=c;b--;)if(f=g.getChild(b).getIndex(!0),0<=f){b=f;break a}b=-1}b+=1}if(c.type==CKEDITOR.NODE_TEXT){g=c;for(f=0;(g=g.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;)f+=g.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;g=f;c.isEmpty()?(f=c.getPrevious(d),g?(b=g,c=f?f.getNext():c.getParent().getFirst()):(c=c.getParent(),
b=f?f.getIndex(!0)+1:0)):b+=g}e.container=c;e.offset=b}function c(a,e){var d=e.getCustomData("cke-fillingChar");if(d){var b=a.container;d.equals(b)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=b.getIndex(),a.container=b.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(d){var b=this.collapsed,g={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};d&&(a(g),c(g,this.root),
b||(a(f),c(f,this.root)));return{start:g.container.getAddress(d),end:b?null:f.container.getAddress(d),startOffset:g.offset,endOffset:f.offset,normalized:d,collapsed:b,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var c=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,b=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(c,d);b?this.setEnd(b,a):this.collapse(!0)}else c=(d=a.serializable)?this.document.getById(a.startNode):a.startNode,a=d?this.document.getById(a.endNode):
a.endNode,this.setStartBefore(c),c.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,c=this.endContainer,d=this.startOffset,b=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT)if(g=a.getChildCount(),g>d)a=a.getChild(d);else if(1>g)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(c.type==CKEDITOR.NODE_ELEMENT)if(g=c.getChildCount(),g>b)c=c.getChild(b).getPreviousSourceNode(!0);
else if(1>g)c=c.getPreviousSourceNode();else{for(c=c.$;c.lastChild;)c=c.lastChild;c=new CKEDITOR.dom.node(c)}a.getPosition(c)&CKEDITOR.POSITION_FOLLOWING&&(a=c);return{startNode:a,endNode:c}},getCommonAncestor:function(a,c){var d=this.startContainer,b=this.endContainer,d=d.equals(b)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(b);return c&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,c=this.startOffset;
a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;c=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,c=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);c&&c.is&&c.is("span")&&c.data("cke-bookmark")&&this.setEndAt(c,CKEDITOR.POSITION_AFTER_END)},trim:function(a,
c){var d=this.startContainer,b=this.startOffset,g=this.collapsed;if((!a||g)&&d&&d.type==CKEDITOR.NODE_TEXT){if(b)if(b>=d.getLength())b=d.getIndex()+1,d=d.getParent();else{var f=d.split(b),b=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):d.equals(this.endContainer)&&(this.endOffset+=1)}else b=d.getIndex(),d=d.getParent();this.setStart(d,b);if(g){this.collapse(!0);return}}d=this.endContainer;b=this.endOffset;c||g||!d||d.type!=
CKEDITOR.NODE_TEXT||(b?(b>=d.getLength()||d.split(b),b=d.getIndex()+1):b=d.getIndex(),d=d.getParent(),this.setEnd(d,b))},enlarge:function(a,c){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var b=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:var f=function(a,e){var c=new CKEDITOR.dom.range(k);c.setStart(a,e);c.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),d;for(c.guard=
function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};d=c.next();){if(d.type!=CKEDITOR.NODE_TEXT)return!1;E=d!=a?d.getText():d.substring(e);if(b.test(E))return!1}return!0};if(this.collapsed)break;var m=this.getCommonAncestor(),k=this.root,l,h,q,u,B,A=!1,C,E;C=this.startContainer;var F=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(F&&(C=!CKEDITOR.tools.trim(C.substring(0,F)).length&&C,A=!!C),C&&((u=C.getPrevious())||(q=C.getParent()))):(F&&(u=C.getChild(F-1)||C.getLast()),u||(q=C));
for(q=d(q);q||u;){if(q&&!u){!B&&q.equals(m)&&(B=!0);if(g?q.isBlockBoundary():!k.contains(q))break;A&&"inline"==q.getComputedStyle("display")||(A=!1,B?l=q:this.setStartBefore(q));u=q.getPrevious()}for(;u;)if(C=!1,u.type==CKEDITOR.NODE_COMMENT)u=u.getPrevious();else{if(u.type==CKEDITOR.NODE_TEXT)E=u.getText(),b.test(E)&&(u=null),C=/[\s\ufeff]$/.test(E);else if((u.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||c&&u.is("br"))&&!u.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[u.getName()]){E=u.getText();
if(b.test(E))u=null;else for(var F=u.$.getElementsByTagName("*"),G=0,L;L=F[G++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){u=null;break}u&&(C=!!E.length)}else u=null;C&&(A?B?l=q:q&&this.setStartBefore(q):A=!0);if(u){C=u.getPrevious();if(!q&&!C){q=u;u=null;break}u=C}else q=null}q&&(q=d(q.getParent()))}C=this.endContainer;F=this.endOffset;q=u=null;B=A=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(F)).length?A=!0:(A=!C.getLength(),F==C.getLength()?(u=C.getNext())||(q=C.getParent()):
f(C,F)&&(q=C.getParent())):(u=C.getChild(F))||(q=C);for(;q||u;){if(q&&!u){!B&&q.equals(m)&&(B=!0);if(g?q.isBlockBoundary():!k.contains(q))break;A&&"inline"==q.getComputedStyle("display")||(A=!1,B?h=q:q&&this.setEndAfter(q));u=q.getNext()}for(;u;){C=!1;if(u.type==CKEDITOR.NODE_TEXT)E=u.getText(),f(u,0)||(u=null),C=/^[\s\ufeff]/.test(E);else if(u.type==CKEDITOR.NODE_ELEMENT){if((0<u.$.offsetWidth||c&&u.is("br"))&&!u.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[u.getName()]){E=u.getText();if(b.test(E))u=
null;else for(F=u.$.getElementsByTagName("*"),G=0;L=F[G++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){u=null;break}u&&(C=!!E.length)}else u=null}else C=1;C&&A&&(B?h=q:this.setEndAfter(q));if(u){C=u.getNext();if(!q&&!C){q=u;u=null;break}u=C}else q=null}q&&(q=d(q.getParent()))}l&&h&&(m=l.contains(h)?h:l,this.setStartBefore(m),this.setEndAfter(m));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:q=new CKEDITOR.dom.range(this.root);k=this.root;q.setStartAt(k,
CKEDITOR.POSITION_AFTER_START);q.setEnd(this.startContainer,this.startOffset);q=new CKEDITOR.dom.walker(q);var D,O,I=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),M=null,R=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(M){if(M.equals(a)){M=null;return}}else M=a;else if(M)return;var c=I(a);c||(D=a);return c},g=function(a){var c=R(a);!c&&a.is&&a.is("br")&&(O=a);return c};q.guard=R;q=q.lastBackward();D=D||k;this.setStartAt(D,
!D.is("br")&&(!q&&this.checkStartOfBlock()||q&&D.contains(q))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){q=this.clone();q=new CKEDITOR.dom.walker(q);var K=CKEDITOR.dom.walker.whitespaces(),H=CKEDITOR.dom.walker.bookmark();q.evaluator=function(a){return!K(a)&&!H(a)};if((q=q.previous())&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("br"))break}q=this.clone();q.collapse();q.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);q=new CKEDITOR.dom.walker(q);q.guard=
a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:R;D=M=O=null;q=q.lastForward();D=D||k;this.setEndAt(D,!q&&this.checkEndOfBlock()||q&&D.contains(q)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);O&&this.setEndAfter(O)}},shrink:function(a,c,d){var b="boolean"===typeof d?d:d&&"boolean"===typeof d.shrinkOnBlockBoundary?d.shrinkOnBlockBoundary:!0,g=d&&d.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var f=this.clone(),m=this.startContainer,k=this.endContainer,l=this.startOffset,h=this.endOffset,
q=d=1;m&&m.type==CKEDITOR.NODE_TEXT&&(l?l>=m.getLength()?f.setStartAfter(m):(f.setStartBefore(m),d=0):f.setStartBefore(m));k&&k.type==CKEDITOR.NODE_TEXT&&(h?h>=k.getLength()?f.setEndAfter(k):(f.setEndAfter(k),q=0):f.setEndBefore(k));var f=new CKEDITOR.dom.walker(f),u=CKEDITOR.dom.walker.bookmark(),B=CKEDITOR.dom.walker.bogus();f.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var A;f.guard=function(c,d){if(g&&B(c)||u(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&
c.type==CKEDITOR.NODE_TEXT||d&&c.equals(A)||!1===b&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return!1;d||c.type!=CKEDITOR.NODE_ELEMENT||(A=c);return!0};d&&(m=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(m,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);q&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));
return!(!d&&!q)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var c=this.startContainer,d=c.getChild(this.startOffset);d?a.insertBefore(d):c.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,c){this.setStartAt(a,c);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,
a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=c;this.endContainer||(this._setEndContainer(a),this.endOffset=c);b(this)},setEnd:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=c;this.startContainer||(this._setStartContainer(a),
this.startOffset=c);b(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,
a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}b(this)},setEndAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}b(this)},fixBlock:function(a,
c){var d=this.createBookmark(),b=this.document.createElement(c);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(b);b.trim();this.insertNode(b);var g=b.getBogus();g&&g.remove();b.appendBogus();this.moveToBookmark(d);return b},splitBlock:function(a,c){var d=new CKEDITOR.dom.elementPath(this.startContainer,this.root),b=new CKEDITOR.dom.elementPath(this.endContainer,this.root),g=d.block,f=b.block,m=null;if(!d.blockLimit.equals(b.blockLimit))return null;"br"!=
a&&(g||(g=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));d=g&&this.checkStartOfBlock();b=f&&this.checkEndOfBlock();this.deleteContents();g&&g.equals(f)&&(b?(m=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),f=null):d?(m=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g=null):(f=this.splitElement(g,c||
!1),g.is("ul","ol")||g.appendBogus()));return{previousBlock:g,nextBlock:f,wasStartOfBlock:d,wasEndOfBlock:b,elementPath:m}},splitElement:function(a,c){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,c||!1),b=a.clone(!1,c||!1);d.appendTo(b);b.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return b},removeEmptyBlocksAtEnd:function(){function a(e){return function(a){return c(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||
e.is("table")&&a.is("caption")?!1:!0}}var c=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!1);return function(c){for(var d=this.createBookmark(),b=this[c?"endPath":"startPath"](),g=b.block||b.blockLimit,f;g&&!g.equals(b.root)&&!g.getFirst(a(g));)f=g.getParent(),this[c?"setEndAt":"setStartAt"](g,CKEDITOR.POSITION_AFTER_END),g.remove(1),g=f;this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,
this.root)},checkBoundaryOfElement:function(c,d){var b=d==CKEDITOR.START,g=this.clone();g.collapse(b);g[b?"setStartAt":"setEndAt"](c,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);g=new CKEDITOR.dom.walker(g);g.evaluator=a(b);return g[b?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var c=this.startContainer,d=this.startOffset;CKEDITOR.env.ie&&d&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.ltrim(c.substring(0,d)),k.test(c)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,
this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=f();return a.checkBackward()},checkEndOfBlock:function(a){var c=this.endContainer,d=this.endOffset;CKEDITOR.env.ie&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.rtrim(c.substring(d)),k.test(c)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(c);a.evaluator=f();return a.checkForward()},getPreviousNode:function(a,c,d){var b=this.clone();b.collapse(1);b.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(b);d.evaluator=a;d.guard=c;return d.previous()},getNextNode:function(a,c,d){var b=this.clone();b.collapse();b.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(b);d.evaluator=a;d.guard=c;return d.next()},checkReadOnly:function(){function a(c,e){for(;c;){if(c.type==
CKEDITOR.NODE_ELEMENT){if("false"==c.getAttribute("contentEditable")&&!c.data("cke-editable"))return 0;if(c.is("html")||"true"==c.getAttribute("contentEditable")&&(c.contains(e)||c.equals(e)))break}c=c.getParent()}return 1}return function(){var c=this.startContainer,d=this.endContainer;return!(a(c,d)&&a(d,c))}}(),moveToElementEditablePosition:function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
!0;for(var b=0;a;){if(a.type==CKEDITOR.NODE_TEXT){c&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);b=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),b=1;else if(c&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);
else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var g=a,f=b,m=void 0;g.type==CKEDITOR.NODE_ELEMENT&&g.isEditable(!1)&&(m=g[c?"getLast":"getFirst"](d));f||m||(m=g[c?"getPrevious":"getNext"](d));a=m}return!!b},moveToClosestEditablePosition:function(a,c){var d,b=0,g,f,m=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,m[c?0:1])):d=this.clone();if(a&&
!a.is(CKEDITOR.dtd.$block))b=1;else if(g=d[c?"getNextEditableNode":"getPreviousEditableNode"]())b=1,(f=g.type==CKEDITOR.NODE_ELEMENT)&&g.is(CKEDITOR.dtd.$block)&&"false"==g.getAttribute("contenteditable")?(d.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(g,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&g.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(g,0),d.collapse()):d.moveToPosition(g,m[c?1:0]);b&&this.moveToRange(d);return!!b},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},
moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),c=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&c(a)};var b=a.next();a.reset();return b&&b.equals(a.previous())?b:null},getTouchedStartNode:function(){var a=this.startContainer;
return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:g(),getPreviousEditableNode:g(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.getTouchedStartNode(),d=this.getTouchedEndNode(),b=c.getAscendant("table",!0),d=d.getAscendant("table",!0);return b&&!this.root.contains(b)?
null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):b&&d&&(b.equals(d)||b.contains(d)||d.contains(b))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,d,b,g=this.clone();g.optimize();(b=g.startContainer.type==CKEDITOR.NODE_TEXT)?(d=g.startContainer.getText(),c=g.startContainer.split(g.startOffset),a.insertAfter(g.startContainer)):g.insertNode(a);a.scrollIntoView();b&&(g.startContainer.setText(d),
c.remove());a.remove()},getClientRects:function(){function a(c,d){var e=CKEDITOR.tools.array.map(c,function(a){return a}),b=new CKEDITOR.dom.range(d.root),g,f,m;d.startContainer instanceof CKEDITOR.dom.element&&(f=0===d.startOffset&&d.startContainer.hasAttribute("data-widget"));d.endContainer instanceof CKEDITOR.dom.element&&(m=(m=d.endOffset===(d.endContainer.getChildCount?d.endContainer.getChildCount():d.endContainer.length))&&d.endContainer.hasAttribute("data-widget"));f&&b.setStart(d.startContainer.getParent(),
d.startContainer.getIndex());m&&b.setEnd(d.endContainer.getParent(),d.endContainer.getIndex()+1);if(f||m)d=b;b=d.cloneContents().find("[data-cke-widget-id]").toArray();if(b=CKEDITOR.tools.array.map(b,function(a){var c=d.root.editor;a=a.getAttribute("data-cke-widget-id");return c.widgets.instances[a].element}))return b=CKEDITOR.tools.array.map(b,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;g=this.root.getDocument().$.createRange();g.setStart(c.getParent().$,c.getIndex());
g.setEnd(c.getParent().$,c.getIndex()+1);c=g.getClientRects();c.widgetRect=a.getClientRect();return c},d),CKEDITOR.tools.array.forEach(b,function(a){function c(b){CKEDITOR.tools.array.forEach(e,function(c,g){var f=CKEDITOR.tools.objectCompare(a[b],c);f||(f=CKEDITOR.tools.objectCompare(a.widgetRect,c));f&&(Array.prototype.splice.call(e,g,a.length-b,a.widgetRect),d=!0)});d||(b<e.length-1?c(b+1):e.push(a.widgetRect))}var d;c(0)}),e}function c(a,d,e){var g;d.collapsed?e.startContainer instanceof CKEDITOR.dom.element?
(a=e.checkStartOfBlock(),g=new CKEDITOR.dom.text("​"),a?e.startContainer.append(g,!0):0===e.startOffset?g.insertBefore(e.startContainer.getFirst()):(e=e.startContainer.getChildren().getItem(e.startOffset-1),g.insertAfter(e)),d.setStart(g.$,0),d.setEnd(g.$,0),a=d.getClientRects(),g.remove()):e.startContainer instanceof CKEDITOR.dom.text&&(""===e.startContainer.getText()?(e.startContainer.setText("​"),a=d.getClientRects(),e.startContainer.setText("")):a=[b(e.createBookmark())]):a=[b(e.createBookmark())];
return a}function d(a,c,e){a=CKEDITOR.tools.extend({},a);c&&(a=CKEDITOR.tools.getAbsoluteRectPosition(e.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function b(a){var c=a.startNode;a=a.endNode;var d;c.setText("​");c.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),d=[c.getClientRect(),a.getClientRect()],a.remove()):d=[c.getClientRect(),c.getClientRect()];c.remove();return{right:Math.max(d[0].right,d[1].right),bottom:Math.max(d[0].bottom,
d[1].bottom),left:Math.min(d[0].left,d[1].left),top:Math.min(d[0].top,d[1].top),width:Math.abs(d[0].left-d[1].left),height:Math.max(d[0].bottom,d[1].bottom)-Math.min(d[0].top,d[1].top)}}return void 0!==this.document.getSelection?function(b){var g=this.root.getDocument().$.createRange(),f;g.setStart(this.startContainer.$,this.startOffset);g.setEnd(this.endContainer.$,this.endOffset);f=g.getClientRects();f=a(f,this);f.length||(f=c(f,g,this));return CKEDITOR.tools.array.map(f,function(a){return d(a,
b,this)},this)}:function(a){return[d(b(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,c){var d=this.getCommonAncestor(),b=this.getBoundaryNodes(),g=[],f,m,k,l;if(d&&d.find)for(m=d.find(a),f=0;f<m.count();f++)if(d=m.getItem(f),c||!d.isReadOnly())k=d.getPosition(b.startNode)&CKEDITOR.POSITION_FOLLOWING||b.startNode.equals(d),l=d.getPosition(b.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||
b.endNode.equals(d),k&&l&&g.push(d);return g}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,c){var d=a[a.length-1],e=!1;c=c.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(d){var b=new CKEDITOR.dom.range(c.root),e=new CKEDITOR.dom.walker(b),g=CKEDITOR.dom.walker.whitespaces();b.setStart(d.endContainer,d.endOffset);b.setEnd(c.startContainer,c.startOffset);for(b=e.next();g(b)||c.endContainer.equals(b);)b=e.next();e=!b}e?d.setEnd(c.endContainer,c.endOffset):
a.push(c);return a},[])}}(),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,"use strict",function(){function b(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||
(this._={}))}function h(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function f(a,c,b,g){a:{null==g&&(g=h(b));for(var m;m=g.shift();)if(m.getDtd().p){g={element:m,remaining:g};break a}g=null}if(!g)return 0;if((m=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&!m.check(c))return f(a,c,b,g.remaining);c=new CKEDITOR.dom.range(g.element);c.selectNodeContents(g.element);c=c.createIterator();c.enlargeBr=
a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=m;a._.nestedEditable={element:g.element,container:b,remaining:g.remaining,iterator:c};return 1}function a(a,c,b){if(!c)return!1;a=a.clone();a.collapse(!b);return a.checkBoundaryOfElement(c,b?CKEDITOR.START:CKEDITOR.END)}var g=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return m(a)&&l(a)},c={dd:1,dt:1,li:1};b.prototype={getNextParagraph:function(d){var e,b,l,h,r;
d=d||"p";if(this._.nestedEditable){if(e=this._.nestedEditable.iterator.getNextParagraph(d))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,e;this.activeFilter=this.filter;if(f(this,d,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(d);this._.nestedEditable=null}if(!this.range.root.getDtd()[d])return null;if(!this._.started){var t=this.range.clone();
b=t.startPath();var v=t.endPath(),z=!t.collapsed&&a(t,b.block),p=!t.collapsed&&a(t,v.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);z&&t.setStartAt(b.block,CKEDITOR.POSITION_BEFORE_END);p&&t.setEndAt(v.block,CKEDITOR.POSITION_AFTER_START);b=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!b||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(b=new CKEDITOR.dom.walker(t.clone()),v=CKEDITOR.dom.walker.bookmark(!0,
!0),b.evaluator=v,this._.nextNode=b.next(),b=new CKEDITOR.dom.walker(t.clone()),b.evaluator=v,b=b.previous(),this._.lastNode=b.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(v=this.range.clone(),v.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),v.checkEndOfBlock()&&(v=new CKEDITOR.dom.elementPath(v.endContainer,v.root),this._.lastNode=(v.block||
v.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(b)),t=null);this._.started=1;b=t}v=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;v;){var z=0,p=v.hasAscendant("pre"),y=v.type!=CKEDITOR.NODE_ELEMENT,q=0;if(y)v.type==CKEDITOR.NODE_TEXT&&g.test(v.getText())&&(y=0);else{var u=v.getName();if(CKEDITOR.dtd.$block[u]&&"false"==v.getAttribute("contenteditable")){e=
v;f(this,d,e);break}else if(v.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if("br"==u)y=1;else if(!b&&!v.getChildCount()&&"hr"!=u){e=v;l=v.equals(t);break}b&&(b.setEndAt(v,CKEDITOR.POSITION_BEFORE_START),"br"!=u&&(this._.nextNode=v));z=1}else{if(v.getFirst()){b||(b=this.range.clone(),b.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));v=v.getFirst();continue}y=1}}y&&!b&&(b=this.range.clone(),b.setStartAt(v,CKEDITOR.POSITION_BEFORE_START));l=(!z||y)&&v.equals(t);if(b&&!z)for(;!v.getNext(k)&&!l;){u=
v.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){z=1;y=0;l||u.equals(t);b.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}v=u;y=1;l=v.equals(t);q=1}y&&b.setEndAt(v,CKEDITOR.POSITION_AFTER_END);v=this._getNextSourceNode(v,q,t);if((l=!v)||z&&b)break}if(!e){if(!b)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;e=new CKEDITOR.dom.elementPath(b.startContainer,b.root);v=e.blockLimit;z={div:1,th:1,td:1};e=e.block;!e&&v&&!this.enforceRealBlocks&&z[v.getName()]&&
b.checkStartOfBlock()&&b.checkEndOfBlock()&&!v.equals(b.root)?e=v:!e||this.enforceRealBlocks&&e.is(c)?(e=this.range.document.createElement(d),b.extractContents().appendTo(e),e.trim(),b.insertNode(e),h=r=!0):"li"!=e.getName()?b.checkStartOfBlock()&&b.checkEndOfBlock()||(e=e.clone(!1),b.extractContents().appendTo(e),e.trim(),r=b.splitBlock(),h=!r.wasStartOfBlock,r=!r.wasEndOfBlock,b.insertNode(e)):l||(this._.nextNode=e.equals(t)?null:this._getNextSourceNode(b.getBoundaryNodes().endNode,1,t))}h&&(h=
e.getPrevious())&&h.type==CKEDITOR.NODE_ELEMENT&&("br"==h.getName()?h.remove():h.getLast()&&"br"==h.getLast().$.nodeName.toLowerCase()&&h.getLast().remove());r&&(h=e.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&"br"==h.getName()&&(!CKEDITOR.env.needsBrFiller||h.getPrevious(m)||h.getNext(m))&&h.remove();this._.nextNode||(this._.nextNode=l||e.equals(t)||!t?null:this._getNextSourceNode(e,1,t));return e},_getNextSourceNode:function(a,c,b){function g(a){return!(a.equals(b)||a.equals(f))}var f=this.range.root;
for(a=a.getNextSourceNode(c,null,g);!m(a);)a=a.getNextSourceNode(c,null,g);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),CKEDITOR.command=function(b,h){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&b.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,b,a)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||
!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:b})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var f;this.checkAllowed=function(a){return a||"boolean"!=typeof f?f=b.activeFilter.checkFeature(this):f};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.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&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(b){if(this.state==b||b!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=b;this.fire("state");return!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.ADDITIONAL_RESOURCE_PARAMS={},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:"\x3c!DOCTYPE html\x3e",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 b(a,c,d,e,b){var g,f;a=[];for(g in c){f=c[g];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:G(f);"$"!=g.charAt(0)&&(f.elements=g);d&&(f.featureName=d.toLowerCase());var m=f;m.elements=l(m.elements,/\s+/)||null;m.propertiesOnly=m.propertiesOnly||!0===m.elements;var k=
/\s*,\s*/,h=void 0;for(h in O){m[h]=l(m[h],k)||null;var u=m,v=I[h],n=l(m[I[h]],k),H=m[h],p=[],w=!0,K=void 0;n?w=!1:n={};for(K in H)"!"==K.charAt(0)&&(K=K.slice(1),p.push(K),n[K]=!0,w=!1);for(;K=p.pop();)H[K]=H["!"+K],delete H["!"+K];u[v]=(w?!1:n)||null}m.match=m.match||null;e.push(f);a.push(f)}c=b.elements;b=b.generic;var B;d=0;for(e=a.length;d<e;++d){g=G(a[d]);f=!0===g.classes||!0===g.styles||!0===g.attributes;m=g;h=v=k=void 0;for(k in O)m[k]=z(m[k]);u=!0;for(h in I){k=I[h];v=m[k];n=[];H=void 0;
for(H in v)-1<H.indexOf("*")?n.push(new RegExp("^"+H.replace(/\*/g,".*")+"$")):n.push(H);v=n;v.length&&(m[k]=v,u=!1)}m.nothingRequired=u;m.noProperties=!(m.attributes||m.classes||m.styles);if(!0===g.elements||null===g.elements)b[f?"unshift":"push"](g);else for(B in m=g.elements,delete g.elements,m)if(c[B])c[B][f?"unshift":"push"](g);else c[B]=[g]}}function h(a,c,d,e){if(!a.match||a.match(c))if(e||k(a,c))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=f(a.attributes,c.attributes,
d.validAttributes)),d.allStyles||(d.allStyles=f(a.styles,c.styles,d.validStyles)),!d.allClasses){a=a.classes;c=c.classes;e=d.validClasses;if(a)if(!0===a)a=!0;else{for(var b=0,g=c.length,m;b<g;++b)m=c[b],e[m]||(e[m]=a(m));a=!1}else a=!1;d.allClasses=a}}function f(a,c,d){if(!a)return!1;if(!0===a)return!0;for(var e in c)d[e]||(d[e]=a(e));return!1}function a(a,c,d){if(!a.match||a.match(c)){if(a.noProperties)return!1;d.hadInvalidAttribute=g(a.attributes,c.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=
g(a.styles,c.styles)||d.hadInvalidStyle;a=a.classes;c=c.classes;if(a){for(var e=!1,b=!0===a,f=c.length;f--;)if(b||a(c[f]))c.splice(f,1),e=!0;a=e}else a=!1;d.hadInvalidClass=a||d.hadInvalidClass}}function g(a,c){if(!a)return!1;var d=!1,e=!0===a,b;for(b in c)if(e||a(b))delete c[b],d=!0;return d}function m(a,c,d){if(a.disabled||a.customConfig&&!d||!c)return!1;a._.cachedChecks={};return!0}function l(a,c){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=L(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(c));
if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var d={},e=0,b;for(b in a)d[b]=a[b],e++;return e?d:!1}function k(a,d){if(a.nothingRequired)return!0;var e,b,g,f;if(g=a.requiredClasses)for(f=d.classes,e=0;e<g.length;++e)if(b=g[e],"string"==typeof b){if(-1==CKEDITOR.tools.indexOf(f,b))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,b))return!1;return c(d.styles,a.requiredStyles)&&c(d.attributes,a.requiredAttributes)}function c(a,c){if(!c)return!0;
for(var d=0,e;d<c.length;++d)if(e=c[d],"string"==typeof e){if(!(e in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,e))return!1;return!0}function d(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var c={};a.length;)c[a.shift()]="cke-test";return c}function e(a){var c,d,e,b,g={},f=1;for(a=L(a);c=a.match(M);)(d=c[2])?(e=n(d,"styles"),b=n(d,"attrs"),d=n(d,"classes")):e=b=d=null,g["$"+f++]={elements:c[1],classes:d,styles:e,attributes:b},a=a.slice(c[0].length);return g}function n(a,
c){var d=a.match(R[c]);return d?L(d[1]):null}function w(a){var c=a.styleBackup=a.attributes.style,d=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(c||"",1));a.classes||(a.classes=d?d.split(/\s+/):[])}function x(c,d,e,b){var g=0,f;b.toHtml&&(d.name=d.name.replace(K,"$1"));if(b.doCallbacks&&c.elementCallbacks){a:{f=c.elementCallbacks;for(var m=0,k=f.length,l;m<k;++m)if(l=f[m](d)){f=l;break a}f=void 0}if(f)return f}if(b.doTransform&&(f=c._.transformations[d.name])){w(d);
for(m=0;m<f.length;++m)u(c,d,f[m]);t(d)}if(b.doFilter){a:{m=d.name;k=c._;c=k.allowedRules.elements[m];f=k.allowedRules.generic;m=k.disallowedRules.elements[m];k=k.disallowedRules.generic;l=b.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},p,z;if(c||f){w(d);if(m)for(p=0,z=m.length;p<z;++p)if(!1===a(m[p],d,n)){c=null;break a}if(k)for(p=0,z=k.length;p<z;++p)a(k[p],
d,n);if(c)for(p=0,z=c.length;p<z;++p)h(c[p],d,n,l);if(f)for(p=0,z=f.length;p<z;++p)h(f[p],d,n,l);c=n}else c=null}if(!c||!c.valid)return e.push(d),1;z=c.validAttributes;var B=c.validStyles;f=c.validClasses;var m=d.attributes,q=d.styles,k=d.classes;l=d.classBackup;var L=d.styleBackup,Q,F,y=[],n=[],G=/^data-cke-/;p=!1;delete m.style;delete m["class"];delete d.classBackup;delete d.styleBackup;if(!c.allAttributes)for(Q in m)z[Q]||(G.test(Q)?Q==(F=Q.replace(/^data-cke-saved-/,""))||z[F]||(delete m[Q],p=
!0):(delete m[Q],p=!0));if(!c.allStyles||c.hadInvalidStyle){for(Q in q)c.allStyles||B[Q]?y.push(Q+":"+q[Q]):p=!0;y.length&&(m.style=y.sort().join("; "))}else L&&(m.style=L);if(!c.allClasses||c.hadInvalidClass){for(Q=0;Q<k.length;++Q)(c.allClasses||f[k[Q]])&&n.push(k[Q]);n.length&&(m["class"]=n.sort().join(" "));l&&n.length<l.split(/\s+/).length&&(p=!0)}else l&&(m["class"]=l);p&&(g=1);if(!b.skipFinalValidation&&!v(d))return e.push(d),1}b.toHtml&&(d.name=d.name.replace(H,"cke:$1"));return g}function r(a){var c=
[],d;for(d in a)-1<d.indexOf("*")&&c.push(d.replace(/\*/g,".*"));return c.length?new RegExp("^(?:"+c.join("|")+")$"):null}function t(a){var c=a.attributes,d;delete c.style;delete c["class"];if(d=CKEDITOR.tools.writeCssText(a.styles,!0))c.style=d;a.classes.length&&(c["class"]=a.classes.sort().join(" "))}function v(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function z(a){if(!a)return!1;if(!0===
a)return!0;var c=r(a);return function(d){return d in a||c&&d.match(c)}}function p(){return new CKEDITOR.htmlParser.element("br")}function y(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||F.$block[a.name])}function q(a,c,d){var e=a.name;if(F.$empty[e]||!a.children.length)"hr"==e&&"br"==c?a.replaceWith(p()):(a.parent&&d.push({check:"it",el:a.parent}),a.remove());else if(F.$block[e]||"tr"==e)if("br"==c)a.previous&&!y(a.previous)&&(c=p(),c.insertBefore(a)),a.next&&!y(a.next)&&(c=p(),c.insertAfter(a)),
a.replaceWithChildren();else{var e=a.children,b;b:{b=F[c];for(var g=0,f=e.length,m;g<f;++g)if(m=e[g],m.type==CKEDITOR.NODE_ELEMENT&&!b[m.name]){b=!1;break b}b=!0}if(b)a.name=c,a.attributes={},d.push({check:"parent-down",el:a});else{b=a.parent;for(var g=b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==b.name,k,l,f=e.length;0<f;)m=e[--f],g&&(m.type==CKEDITOR.NODE_TEXT||m.type==CKEDITOR.NODE_ELEMENT&&F.$inline[m.name])?(k||(k=new CKEDITOR.htmlParser.element(c),k.insertAfter(a),d.push({check:"parent-down",
el:k})),k.add(m,0)):(k=null,l=F[b.name]||F.span,m.insertAfter(a),b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m.type!=CKEDITOR.NODE_ELEMENT||l[m.name]||d.push({check:"el-up",el:m}));a.remove()}}else e in{style:1,script:1}?a.remove():(a.parent&&d.push({check:"it",el:a.parent}),a.replaceWithChildren())}function u(a,c,d){var e,b;for(e=0;e<d.length;++e)if(b=d[e],!(b.check&&!a.check(b.check,!1)||b.left&&!b.left(c))){b.right(c,P);break}}function B(a,c){var d=c.getDefinition(),e=d.attributes,b=d.styles,g,f,
m,k;if(a.name!=d.element)return!1;for(g in e)if("class"==g)for(d=e[g].split(/\s+/),m=a.classes.join("|");k=d.pop();){if(-1==m.indexOf(k))return!1}else if(a.attributes[g]!=e[g])return!1;for(f in b)if(a.styles[f]!=b[f])return!1;return!0}function A(a,c){var d,e;"string"==typeof a?d=a:a instanceof CKEDITOR.style?e=a:(d=a[0],e=a[1]);return[{element:d,left:e,right:function(a,d){d.transform(a,c)}}]}function C(a){return function(c){return B(c,a)}}function E(a){return function(c,d){d[a](c)}}var F=CKEDITOR.dtd,
G=CKEDITOR.tools.copy,L=CKEDITOR.tools.trim,D=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,c){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 d=this.editor=a instanceof CKEDITOR.editor?a:null;
if(d&&!c){this.customConfig=!0;var e=d.config.allowedContent;!0===e?this.disabled=!0:(e||(this.customConfig=!1),this.allow(e,"config",1),this.allow(d.config.extraAllowedContent,"extra",1),this.allow(D[d.enterMode]+" "+D[d.shiftEnterMode],"default",1),this.disallow(d.config.disallowedContent))}else this.customConfig=!1,this.allow(c||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,c,d){if(!m(this,a,d))return!1;var g,f;if("string"==typeof a)a=e(a);else if(a instanceof
CKEDITOR.style){if(a.toAllowedContentRules)return this.allow(a.toAllowedContentRules(this.editor),c,d);g=a.getDefinition();a={};d=g.attributes;a[g.element]=g={styles:g.styles,requiredStyles:g.styles&&CKEDITOR.tools.object.keys(g.styles)};d&&(d=G(d),g.classes=d["class"]?d["class"].split(/\s+/):null,g.requiredClasses=g.classes,delete d["class"],g.attributes=d,g.requiredAttributes=d&&CKEDITOR.tools.object.keys(d))}else if(CKEDITOR.tools.isArray(a)){for(g=0;g<a.length;++g)f=this.allow(a[g],c,d);return f}b(this,
a,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,c,d,e){if(this.disabled)return!1;var b=this,g=[],f=this.editor&&this.editor.config.protectedSource,m,k=!1,l={doFilter:!d,doTransform:!0,doCallbacks:!0,toHtml:c};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!c||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(m=x(b,a,g,l),m&1)k=!0;else if(m&2)return!1}else if(a.type==
CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var e=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var h,u,v;if(f)for(u=0;u<f.length;++u)if((v=e.match(f[u]))&&v[0].length==e.length){d=!0;break a}e=CKEDITOR.htmlParser.fragment.fromHtml(e);1==e.children.length&&(h=e.children[0]).type==CKEDITOR.NODE_ELEMENT&&x(b,h,d,l);d=!d.length}d||g.push(a)}},null,!0);g.length&&(k=!0);var h;a=[];e=D[e||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var u;d=
g.pop();)d.type==CKEDITOR.NODE_ELEMENT?q(d,e,a):d.remove();for(;h=a.pop();)if(d=h.el,d.parent)switch(u=F[d.parent.name]||F.span,h.check){case "it":F.$removeEmpty[d.name]&&!d.children.length?q(d,e,a):v(d)||q(d,e,a);break;case "el-up":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||u[d.name]||q(d,e,a);break;case "parent-down":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||u[d.name]||q(d.parent,e,a)}return k},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));
return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(a){if(!m(this,a,!0))return!1;"string"==typeof a&&(a=e(a));b(this,a,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var c,d,e=[],b;for(c=0;c<a.length&&!b;++c)d=a[c],("string"==typeof d||d instanceof CKEDITOR.style)&&this.check(d)&&(b=d);if(b){for(c=0;c<a.length;++c)e.push(A(a[c],b));this.addTransformations(e)}}},addElementCallback:function(a){this.elementCallbacks||
(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var c,d;if(!this.disabled&&a){var e=this._.transformations,b;for(b=0;b<a.length;++b){c=
a[b];var g=void 0,f=void 0,m=void 0,k=void 0,l=void 0,h=void 0;d=[];for(f=0;f<c.length;++f)m=c[f],"string"==typeof m?(m=m.split(/\s*:\s*/),k=m[0],l=null,h=m[1]):(k=m.check,l=m.left,h=m.right),g||(g=m,g=g.element?g.element:k?k.match(/^([a-z0-9]+)/i)[0]:g.left.getDefinition().element),l instanceof CKEDITOR.style&&(l=C(l)),d.push({check:k==g?null:k,left:l,right:"string"==typeof h?E(h):h});c=g;e[c]||(e[c]=[]);e[c].push(d)}}},check:function(a,c,b){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var g=
a.length;g--;)if(this.check(a[g],c,b))return!0;return!1}var f,m;if("string"==typeof a){m=a+"\x3c"+(!1===c?"0":"1")+(b?"1":"0")+"\x3e";if(m in this._.cachedChecks)return this._.cachedChecks[m];f=e(a).$1;var k=f.styles,g=f.classes;f.name=f.elements;f.classes=g=g?g.split(/\s*,\s*/):[];f.styles=d(k);f.attributes=d(f.attributes);f.children=[];g.length&&(f.attributes["class"]=g.join(" "));k&&(f.attributes.style=CKEDITOR.tools.writeCssText(f.styles))}else f=a.getDefinition(),k=f.styles,g=f.attributes||{},
k&&!CKEDITOR.tools.isEmpty(k)?(k=G(k),g.style=CKEDITOR.tools.writeCssText(k,!0)):k={},f={name:f.element,attributes:g,classes:g["class"]?g["class"].split(/\s+/):[],styles:k,children:[]};var k=CKEDITOR.tools.clone(f),l=[],h;if(!1!==c&&(h=this._.transformations[f.name])){for(g=0;g<h.length;++g)u(this,f,h[g]);t(f)}x(this,k,l,{doFilter:!0,doTransform:!1!==c,skipRequired:!b,skipFinalValidation:!b});0<l.length?b=!1:((c=f.attributes["class"])&&(f.attributes["class"]=f.attributes["class"].split(" ").sort().join(" ")),
b=CKEDITOR.tools.objectCompare(f.attributes,k.attributes,!0),c&&(f.attributes["class"]=c));"string"==typeof a&&(this._.cachedChecks[m]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],c={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(d,e){var b=a.slice(),g;if(this.check(D[d]))return d;for(e||(b=b.reverse());g=b.pop();)if(this.check(g))return c[g];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,c=CKEDITOR.tools.clone;a.allowedContent=
c(this.allowedContent);a._.allowedRules=c(this._.allowedRules);a.disallowedContent=c(this.disallowedContent);a._.disallowedRules=c(this._.disallowedRules);a._.transformations=c(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var O={styles:1,attributes:1,classes:1},I={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},
M=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,R={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},K=/^cke:(object|embed|param)$/,H=/^(object|embed|param)$/,P;P=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,c,d){d=d||
c;if(!(d in a.styles)){var e=a.attributes[c];e&&(/^\d+$/.test(e)&&(e+="px"),a.styles[d]=e)}delete a.attributes[c]},lengthToAttribute:function(a,c,d){d=d||c;if(!(d in a.attributes)){var e=a.styles[c],b=e&&e.match(/^(\d+)(?:\.\d*)?px$/);b?a.attributes[d]=b[1]:"cke-test"==e&&(a.attributes[d]="cke-test")}delete a.styles[c]},alignmentToStyle:function(a){if(!("float"in a.styles)){var c=a.attributes.align;if("left"==c||"right"==c)a.styles["float"]=c}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in
a.attributes)){var c=a.styles["float"];if("left"==c||"right"==c)a.attributes.align=c}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var c=CKEDITOR.tools.style.parse.border(a.styles.border);c.color&&(a.styles["border-color"]=c.color);c.style&&(a.styles["border-style"]=c.style);c.width&&(a.styles["border-width"]=c.width);delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";
break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function c(e){a.styles["margin-top"]=d[e[0]];a.styles["margin-right"]=d[e[1]];a.styles["margin-bottom"]=d[e[2]];a.styles["margin-left"]=d[e[3]]}if(a.styles.margin){var d=a.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||
["0px"];switch(d.length){case 1:c([0,0,0,0]);break;case 2:c([0,1,0,1]);break;case 3:c([0,1,2,1]);break;case 4:c([0,1,2,3])}delete a.styles.margin}},matchesStyle:B,transform:function(a,c){if("string"==typeof c)a.name=c;else{var d=c.getDefinition(),e=d.styles,b=d.attributes,g,f,m,k;a.name=d.element;for(g in b)if("class"==g)for(d=a.classes.join("|"),m=b[g].split(/\s+/);k=m.pop();)-1==d.indexOf(k)&&a.classes.push(k);else a.attributes[g]=b[g];for(f in e)a.styles[f]=e[f]}}}}(),function(){CKEDITOR.focusManager=
function(b){if(b.focusManager)return b.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:b};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(b){this._.timer&&clearTimeout(this._.timer);b&&(this.currentActive=b);this.hasFocus||this._.locked||((b=CKEDITOR.currentInstance)&&b.focusManager.blur(1),this.hasFocus=!0,(b=this._.editor.container)&&b.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},
blur:function(b){function h(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var f=CKEDITOR.focusManager._.blurDelay;b||!f?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;h.call(this)},f,this)}},add:function(b,h){var f=b.getCustomData("focusmanager");if(!f||f!=this){f&&f.remove(b);var f="focus",a="blur";h&&(CKEDITOR.env.ie?(f="focusin",
a="focusout"):CKEDITOR.event.useCapture=1);var g={blur:function(){b.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(b)}};b.on(f,g.focus,this);b.on(a,g.blur,this);h&&(CKEDITOR.event.useCapture=0);b.setCustomData("focusmanager",this);b.setCustomData("focusmanager_handlers",g)}},remove:function(b){b.removeCustomData("focusmanager");var h=b.removeCustomData("focusmanager_handlers");b.removeListener("blur",h.blur);b.removeListener("focus",h.focus)}}}(),CKEDITOR.keystrokeHandler=function(b){if(b.keystrokeHandler)return b.keystrokeHandler;
this.keystrokes={};this.blockedKeystrokes={};this._={editor:b};return this},function(){var b,h=function(a){a=a.data;var g=a.getKeystroke(),f=this.keystrokes[g],l=this._.editor;b=!1===l.fire("key",{keyCode:g,domEvent:a});b||(f&&(b=!1!==l.execCommand(f,{from:"keystrokeHandler"})),b||(b=!!this.blockedKeystrokes[g]));b&&a.preventDefault(!0);return!b},f=function(a){b&&(b=!1,a.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",h,this);if(CKEDITOR.env.gecko&&
CKEDITOR.env.mac)a.on("keypress",f,this)}}}(),function(){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(b,h,f){b&&CKEDITOR.lang.languages[b]||(b=this.detect(h,b));var a=this;h=function(){a[b].dir=a.rtl[b]?"rtl":"ltr";f(b,a[b])};this[b]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+b+".js"),h,this)},detect:function(b,h){var f=this.languages;h=h||navigator.userLanguage||navigator.language||b;var a=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),g=a[1],a=a[2];f[g+"-"+a]?g=g+"-"+a:f[g]||(g=null);CKEDITOR.lang.detect=g?function(){return g}:function(a){return a};return g||
b}}}(),CKEDITOR.scriptLoader=function(){var b={},h={};return{load:function(f,a,g,m){var l="string"==typeof f;l&&(f=[f]);g||(g=CKEDITOR);var k=f.length,c=k,d=[],e=[],n=function(c){a&&(l?a.call(g,c):a.call(g,d,e))};if(0===c)n(!0);else{var w=function(a,b){(b?d:e).push(a);0>=--c&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(b))},x=function(a,c){b[a]=1;var d=h[a];delete h[a];for(var e=0;e<d.length;e++)d[e](a,c)},r=function(c){if(b[c])w(c,!0);else{var d=h[c]||(h[c]=[]);d.push(w);if(!(1<
d.length)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:c});a&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==e.$.readyState)e.$.onreadystatechange=null,x(c,!0)}:(e.$.onload=function(){setTimeout(function(){e.$.onload=null;e.$.onerror=null;x(c,!0)},0)},e.$.onerror=function(){e.$.onload=null;e.$.onerror=null;x(c,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};m&&
CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<k;t++)r(f[t])}},queue:function(){function b(){var g;(g=a[0])&&this.load(g.scriptUrl,g.callback,CKEDITOR,0)}var a=[];return function(g,m){var l=this;a.push({scriptUrl:g,callback:function(){m&&m.apply(this,arguments);a.shift();b.call(l)}});1==a.length&&b.call(this)}}()}}(),CKEDITOR.resourceManager=function(b,h){this.basePath=b;this.fileName=h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype=
{add:function(b,h){if(this.registered[b])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+b+'" is already registered.');var f=this.registered[b]=h||{};f.name=b;f.path=this.getPath(b);CKEDITOR.fire(b+CKEDITOR.tools.capitalize(this.fileName)+"Ready",f);return this.get(b)},get:function(b){return this.registered[b]||null},getPath:function(b){var h=this.externals[b];return CKEDITOR.getUrl(h&&h.dir||this.basePath+b+"/")},getFilePath:function(b){var h=this.externals[b];return CKEDITOR.getUrl(this.getPath(b)+
(h?h.file:this.fileName+".js"))},addExternal:function(b,h,f){f||(h=h.replace(/[^\/]+$/,function(a){f=a;return""}));f=f||this.fileName+".js";b=b.split(",");for(var a=0;a<b.length;a++)this.externals[b[a]]={dir:h,file:f}},load:function(b,h,f){CKEDITOR.tools.isArray(b)||(b=b?[b]:[]);for(var a=this.loaded,g=this.registered,m=[],l={},k={},c=0;c<b.length;c++){var d=b[c];if(d)if(a[d]||g[d])k[d]=this.get(d);else{var e=this.getFilePath(d);m.push(e);e in l||(l[e]=[]);l[e].push(d)}}CKEDITOR.scriptLoader.load(m,
function(c,d){if(d.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+l[d[0]].join(",")+'" was not found at "'+d[0]+'".');for(var e=0;e<c.length;e++)for(var b=l[c[e]],g=0;g<b.length;g++){var m=b[g];k[m]=this.get(m);a[m]=1}h.call(f,k)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(b){var h={};return function(f,a,g){var m={},l=function(f){b.call(this,f,function(c){CKEDITOR.tools.extend(m,
c);var d=[],e;for(e in c){var b=c[e],f=b&&b.requires;if(!h[e]){if(b.icons)for(var k=b.icons.split(","),r=k.length;r--;)CKEDITOR.skin.addIcon(k[r],b.path+"icons/"+(CKEDITOR.env.hidpi&&b.hidpi?"hidpi/":"")+k[r]+".png");b.isSupportedEnvironment=b.isSupportedEnvironment||function(){return!0};h[e]=1}if(f)for(f.split&&(f=f.split(",")),b=0;b<f.length;b++)m[f[b]]||d.push(f[b])}if(d.length)l.call(this,d);else{for(e in m)b=m[e],b.onLoad&&!b.onLoad._called&&(!1===b.onLoad()&&delete m[e],b.onLoad._called=1);
a&&a.call(g||window,m)}},this)};l.call(this,f)}}),CKEDITOR.plugins.setLang=function(b,h,f){var a=this.get(b);b=a.langEntries||(a.langEntries={});a=a.lang||(a.lang=[]);a.split&&(a=a.split(","));-1==CKEDITOR.tools.indexOf(a,h)&&a.push(h);b[h]=f},CKEDITOR.ui=function(b){if(b.ui)return b.ui;this.items={};this.instances={};this.editor=b;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(b,h,f){f.name=b.toLowerCase();var a=this.items[b]={type:h,command:f.command||null,args:Array.prototype.slice.call(arguments,
2)};CKEDITOR.tools.extend(a,f)},get:function(b){return this.instances[b]},create:function(b){var h=this.items[b],f=h&&this._.handlers[h.type],a=h&&h.command&&this.editor.getCommand(h.command),f=f&&f.create.apply(this,h.args);this.instances[b]=f;a&&a.uiItems.push(f);f&&!f.type&&(f.type=h.type);return f},addHandler:function(b,h){this._.handlers[b]=h},space:function(b){return CKEDITOR.document.getById(this.spaceId(b))},spaceId:function(b){return this.editor.id+"_"+b}},CKEDITOR.event.implementOn(CKEDITOR.ui),
function(){function b(c,d,e){CKEDITOR.event.call(this);c=c&&CKEDITOR.tools.clone(c);if(void 0!==d){if(!(d instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!e)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!f(d,e))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');
this.element=d;this.elementMode=e;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||h();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",
a);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",function(){m(this,this.elementPath(),!0)});this.on("mode",a);CKEDITOR.dom.selection.setupEditorOptimization(this);this.on("instanceReady",function(){if(this.config.startupFocus){if("end"===this.config.startupFocus){var a=this.createRange();a.selectNodeContents(this.editable());a.shrink(CKEDITOR.SHRINK_ELEMENT,!0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",
null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||this.isDetached()||k(this,c)},0,this)}function h(){do var a="editor"+ ++r;while(CKEDITOR.instances[a]);return a}function f(a,c){return c==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):c==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function a(){var a=this.commands,c;for(c in a)g(this,a[c])}function g(a,c){c[c.startDisabled?"disable":a.readOnly&&!c.readOnly?"disable":
c.modes[a.mode]?"enable":"disable"]()}function m(a,c,d){if(c){var e,b,g=a.commands;for(b in g)e=g[b],(d||e.contextSensitive)&&e.refresh(a,c)}}function l(a){var c=a.config.customConfig;if(!c)return!1;var c=CKEDITOR.getUrl(c),d=t[c]||(t[c]={});d.fn?(d.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=c&&l(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(c,function(){d.fn=d.fn||CKEDITOR.editorConfig||function(){};l(a)});return!0}function k(a,d){a.on("customConfigLoaded",function(){if(d){if(d.on)for(var e in d.on)a.on(e,
d.on[e]);CKEDITOR.tools.extend(a.config,d,!0);delete a.config.on}e=a.config;a.readOnly=e.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):
!1;a.tabIndex=e.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:e.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:e.shiftEnterMode;e.skin&&(CKEDITOR.skinName=e.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);c(a)});d&&null!=d.customConfig&&(a.config.customConfig=d.customConfig);l(a)||a.fireOnce("customConfigLoaded")}
function c(a){CKEDITOR.skin.loadPart("editor",function(){d(a)})}function d(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(c,d){var b=a.config.title;a.langCode=c;a.lang=CKEDITOR.tools.prototypedCopy(d);a.title="string"==typeof b||!1===b?b:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");e(a)})}function e(a){a.getStylesSet(function(c){a.once("loaded",
function(){a.fire("stylesSet",{styles:c})},null,null,1);n(a)})}function n(a){function c(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var d=a.config,e=c(d.plugins),b=c(d.extraPlugins),g=c(d.removePlugins);if(b)var f=new RegExp("(?:^|,)(?:"+b.replace(/,/g,"|")+")(?\x3d,|$)","g"),e=e.replace(f,""),e=e+(","+b);if(g)var m=new RegExp("(?:^|,)(?:"+g.replace(/,/g,"|")+")(?\x3d,|$)","g"),e=e.replace(m,"");CKEDITOR.env.air&&(e+=",adobeair");CKEDITOR.plugins.load(e.split(","),
function(c){var e=[],b=[],g=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,c);for(var f in c){var k=c[f],l=k.lang,h=null,u=k.requires,n;CKEDITOR.tools.isArray(u)&&(u=u.join(","));if(u&&(n=u.match(m)))for(;u=n.pop();)CKEDITOR.error("editor-plugin-required",{plugin:u.replace(",",""),requiredBy:f});l&&!a.lang[f]&&(l.split&&(l=l.split(",")),0<=CKEDITOR.tools.indexOf(l,a.langCode)?h=a.langCode:(h=a.langCode.replace(/-.*/,""),h=h!=a.langCode&&0<=CKEDITOR.tools.indexOf(l,h)?h:0<=CKEDITOR.tools.indexOf(l,
"en")?"en":l[0]),k.langEntries&&k.langEntries[h]?(a.lang[f]=k.langEntries[h],h=null):g.push(CKEDITOR.getUrl(k.path+"lang/"+h+".js")));b.push(h);e.push(k)}CKEDITOR.scriptLoader.load(g,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var c=["beforeInit","init","afterInit"],g=0;g<c.length;g++)for(var f=0;f<e.length;f++){var m=e[f];0===g&&b[f]&&m.lang&&m.langEntries&&(a.lang[m.name]=m.langEntries[b[f]]);if(m[c[g]])m[c[g]](a)}a.fireOnce("pluginsLoaded");d.keystrokes&&a.setKeystroke(a.config.keystrokes);
for(f=0;f<a.config.blockedKeystrokes.length;f++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[f]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function w(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var c=this.getData();this.config.htmlEncodeOutput&&(c=CKEDITOR.tools.htmlEncode(c));a.is("textarea")?a.setValue(c):a.setHtml(c);return!0}return!1}function x(a,c){function d(a){var c=a.startContainer,e=a.endContainer;
return c.is&&(c.is("tr")||c.is("td")&&c.equals(e)&&a.endOffset===c.getChildCount())?!0:!1}function e(a){var c=a.startContainer;return c.is("tr")?a.cloneContents():c.clone(!0)}for(var b=new CKEDITOR.dom.documentFragment,g,f,m,k=0;k<a.length;k++){var l=a[k],h=l.startContainer.getAscendant("tr",!0);d(l)?(g||(g=h.getAscendant("table").clone(),g.append(h.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),b.append(g),g=g.findOne("thead, tbody, tfoot")),f&&f.equals(h)||(f=h,m=h.clone(),g.append(m)),m.append(e(l))):
b.append(l.cloneContents())}return g?b:c.getHtmlFromRange(a[0])}b.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=b;var r=0,t={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,c){for(var d=0;d<c.length;d++){var e=c[d];if(this[e])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:e}),!0}return!1}},addCommand:function(a,c){c.name=a.toLowerCase();var d=c instanceof CKEDITOR.command?c:new CKEDITOR.command(this,c);this.mode&&g(this,d);return this.commands[a]=
d},_attachToForm:function(){function a(c){d.updateElement();d._.required&&!e.getValue()&&!1===d.fire("required")&&c.data.preventDefault()}function c(a){return!!(a&&a.call&&a.apply)}var d=this,e=d.element,b=new CKEDITOR.dom.element(e.$.form);e.is("textarea")&&b&&(b.on("submit",a),c(b.$.submit)&&(b.$.submit=CKEDITOR.tools.override(b.$.submit,function(c){return function(){a();c.apply?c.apply(this):c()}})),d.on("destroy",function(){b.removeListener("submit",a)}))},destroy:function(a){var c=CKEDITOR.filter.instances,
d=this;this.fire("beforeDestroy");!a&&w.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(c),function(a){a=c[a];d===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,
this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,c){var d=this.getCommand(a),e={name:a,commandData:c||{},command:d};return d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",e)&&(e.returnValue=d.exec(e.commandData),!d.async&&!1!==this.fire("afterCommandExec",e))?e.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var c=this._.data;
"string"!=typeof c&&(c=(c=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?c.is("textarea")?c.getValue():c.getHtml():"");c={dataValue:c};!a&&this.fire("getData",c);return c.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,c,d){var e=!0,b=c;c&&"object"==
typeof c&&(d=c.internal,b=c.callback,e=!c.noSnapshot);!d&&e&&this.fire("saveSnapshot");if(b||!d)this.once("dataReady",function(a){!d&&e&&this.fire("saveSnapshot");b&&b.call(a.editor)});a={dataValue:a};!d&&this.fire("setData",a);this._.data=a.dataValue;!d&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,c,d){this.fire("insertHtml",
{dataValue:a,mode:c,range:d})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var c=this.editable(),d=this.getSelection(),d=d&&d.getRanges();if(!c||!d||0===d.length)return null;c=x(d,c);return a?c.getHtml():c},extractSelectedHtml:function(a,c){var d=this.editable(),e=this.getSelection().getRanges(),b=new CKEDITOR.dom.documentFragment,g;if(!d||0===e.length)return null;for(g=0;g<e.length;g++)b.append(d.extractHtmlFromRange(e[g],
c));c||this.getSelection().selectRanges([e[0]]);return a?b.getHtml():b},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return w.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,c=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],d,e,b=c.length;b--;)d=c[b],e=0,CKEDITOR.tools.isArray(d)&&
(e=d[1],d=d[0]),e?a[d]=e:delete a[d]},getCommandKeystroke:function(a,c){var d="string"===typeof a?this.getCommand(a):a,e=[];if(d){var b=CKEDITOR.tools.object.findKey(this.commands,d),g=this.keystrokeHandler.keystrokes;if(d.fakeKeystroke)e.push(d.fakeKeystroke);else for(var f in g)g[f]===b&&e.push(f)}return c?e:e[0]||null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),
a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,c){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;c=c?this.blockless?CKEDITOR.ENTER_BR:c:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=c)this.activeEnterMode=a,this.activeShiftEnterMode=c,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)},isDetached:function(){return!!this.container&&
this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}});CKEDITOR.editor._getEditorElement=function(a){if(!CKEDITOR.env.isCompatible)return null;var c=CKEDITOR.dom.element.get(a);return c?c.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:c.getEditor().name}),null):c:(CKEDITOR.error("editor-incorrect-element",{element:a}),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 b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={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(f){for(var a,g,m=0,l;a=this._.htmlPartsRegex.exec(f);){g=a.index;if(g>m)if(m=f.substring(m,g),l)l.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(g=a[1])if(g=g.toLowerCase(),l&&CKEDITOR.dtd.$cdata[g]&&(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(g);continue}if(l)l.push(a[0]);else if(g=a[3]){if(g=g.toLowerCase(),!/="/.test(g)){var k={},c,d=a[4];a=!!a[5];if(d)for(;c=b.exec(d);){var e=c[1].toLowerCase();
c=c[2]||c[3]||c[4]||"";k[e]=!c&&h[e]?e:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(g,k,a);!l&&CKEDITOR.dtd.$cdata[g]&&(l=[])}}else if(g=a[2])this.onComment(g)}if(f.length>m)this.onText(f.substring(m,f.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("\x3c",b)},openTagClose:function(b,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(b,h){"string"==typeof h&&(h=
CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",b,'\x3d"',h,'"')},closeTag:function(b){this._.output.push("\x3c/",b,"\x3e")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("\x3c!--",b,"--\x3e")},write:function(b){this._.output.push(b)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(b){var h=this._.output.join("");b&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype=
{remove:function(){var b=this.parent.children,h=CKEDITOR.tools.indexOf(b,this),f=this.previous,a=this.next;f&&(f.next=a);a&&(a.previous=f);b.splice(h,1);this.parent=null},replaceWith:function(b){var h=this.parent.children,f=CKEDITOR.tools.indexOf(h,this),a=b.previous=this.previous,g=b.next=this.next;a&&(a.next=b);g&&(g.previous=b);h[f]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var h=b.parent.children,f=CKEDITOR.tools.indexOf(h,b),a=b.next;h.splice(f+1,0,this);this.next=b.next;
this.previous=b;b.next=this;a&&(a.previous=this);this.parent=b.parent},insertBefore:function(b){var h=b.parent.children,f=CKEDITOR.tools.indexOf(h,b);h.splice(f,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next=this);b.previous=this;this.parent=b.parent},getAscendant:function(b){var h="function"==typeof b?b:"string"==typeof b?function(a){return a.name==b}:function(a){return a.name in b},f=this.parent;for(;f&&f.type==CKEDITOR.NODE_ELEMENT;){if(h(f))return f;f=f.parent}return null},wrapWith:function(b){this.replaceWith(b);
b.add(this);return b},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(b){return b||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(b){this.value=b;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(b,h){var f=this.value;if(!(f=b.onComment(h,f,this)))return this.remove(),!1;if("string"!=typeof f)return this.replaceWith(f),!1;this.value=
f;return!0},writeHtml:function(b,h){h&&this.filter(h);b.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b,h){if(!(this.value=b.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(b,h){h&&this.filter(h);b.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(b){this.value=
b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function b(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},
CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),f={ol:1,ul:1},a=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),g={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,k){function c(a){var c;if(0<v.length)for(var e=0;e<v.length;e++){var b=v[e],g=b.name,f=CKEDITOR.dtd[g],m=p.name&&CKEDITOR.dtd[p.name];m&&!m[g]||a&&f&&!f[a]&&CKEDITOR.dtd[a]?g==
p.name&&(n(p,p.parent,1),e--):(c||(d(),c=1),b=b.clone(),b.parent=p,p=b,v.splice(e,1),e--)}}function d(){for(;z.length;)n(z.shift(),p)}function e(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var c=a.children.length,d=a.children[c-1],e;d&&d.type==CKEDITOR.NODE_TEXT&&((e=CKEDITOR.tools.rtrim(d.value))?d.value=e:a.children.length=c-1)}}function n(a,c,d){c=c||p||t;var g=p;void 0===a.previous&&(w(c,a)&&(p=c,r.onTagOpen(k,{}),a.returnPoint=c=p),e(a),b(a)&&!a.children.length||c.add(a),"pre"==
a.name&&(q=!1),"textarea"==a.name&&(y=!1));a.returnPoint?(p=a.returnPoint,delete a.returnPoint):p=d?c:g}function w(a,c){if((a==t||"body"==a.name)&&k&&(!a.name||CKEDITOR.dtd[a.name][k])){var d,e;return(d=c.attributes&&(e=c.attributes["data-cke-real-element-type"])?e:c.name)&&d in CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!c.isOrphan||c.type==CKEDITOR.NODE_TEXT}}function x(a,c){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==c||"dt"==a&&"dd"==c||"dd"==a&&"dt"==c:!1}var r=
new CKEDITOR.htmlParser,t=l instanceof CKEDITOR.htmlParser.element?l:"string"==typeof l?new CKEDITOR.htmlParser.element(l):new CKEDITOR.htmlParser.fragment,v=[],z=[],p=t,y="textarea"==t.name,q="pre"==t.name;r.onTagOpen=function(e,g,m,k){g=new CKEDITOR.htmlParser.element(e,g);g.isUnknown&&m&&(g.isEmpty=!0);g.isOptionalClose=k;if(b(g))v.push(g);else{if("pre"==e)q=!0;else{if("br"==e&&q){p.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==e&&(y=!0)}if("br"==e)z.push(g);else{for(;!(k=(m=p.name)?
CKEDITOR.dtd[m]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a,g.isUnknown||p.isUnknown||k[e]);)if(p.isOptionalClose)r.onTagClose(m);else if(e in f&&m in f)m=p.children,(m=m[m.length-1])&&"li"==m.name||n(m=new CKEDITOR.htmlParser.element("li"),p),!g.returnPoint&&(g.returnPoint=p),p=m;else if(e in CKEDITOR.dtd.$listItem&&!x(e,m))r.onTagOpen("li"==e?"ul":"dl",{},0,1);else if(m in h&&!x(e,m))!g.returnPoint&&(g.returnPoint=p),p=p.parent;else if(m in CKEDITOR.dtd.$inline&&v.unshift(p),p.parent)n(p,
p.parent,1);else{g.isOrphan=1;break}c(e);d();g.parent=p;g.isEmpty?n(g):p=g}}};r.onTagClose=function(a){for(var c=v.length-1;0<=c;c--)if(a==v[c].name){v.splice(c,1);return}for(var e=[],b=[],g=p;g!=t&&g.name!=a;)g._.isBlockLike||b.unshift(g),e.push(g),g=g.returnPoint||g.parent;if(g!=t){for(c=0;c<e.length;c++){var f=e[c];n(f,f.parent)}p=g;g._.isBlockLike&&d();n(g,g.parent);g==p&&(p=p.parent);v=v.concat(b)}"body"==a&&(k=!1)};r.onText=function(e){if(!(p._.hasInlineStarted&&!z.length||q||y)&&(e=CKEDITOR.tools.ltrim(e),
0===e.length))return;var b=p.name,f=b?CKEDITOR.dtd[b]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a;if(!y&&!f["#"]&&b in h)r.onTagOpen(g[b]||""),r.onText(e);else{d();c();q||y||(e=e.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));e=new CKEDITOR.htmlParser.text(e);if(w(p,e))this.onTagOpen(k,{},0,1);p.add(e)}};r.onCDATA=function(a){p.add(new CKEDITOR.htmlParser.cdata(a))};r.onComment=function(a){d();c();p.add(new CKEDITOR.htmlParser.comment(a))};r.parse(m);for(d();p!=t;)n(p,p.parent,1);e(t);return t};
CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var g=0<b?this.children[b-1]:null;if(g){if(a._.isBlockLike&&g.type==CKEDITOR.NODE_TEXT&&(g.value=CKEDITOR.tools.rtrim(g.value),0===g.value.length)){this.children.pop();this.add(a);return}g.next=a}a.previous=g;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},
filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,g){if(this.childrenFilteredBy!=a.id){g=this.getFilterContext(g);if(b&&!this.parent)a.onRoot(g,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,g)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,g){var c=this.getFilterContext();if(g&&!this.parent&&b)b.onRoot(c,this);b&&
this.filterChildren(b,!1,c);b=0;g=this.children;for(c=g.length;b<c;b++)g[b].writeHtml(a)},forEach:function(a,b,g){if(!(g||b&&this.type!=b))var c=a(this);if(!1!==c){g=this.children;for(var d=0;d<g.length;d++)c=g[d],c.type==CKEDITOR.NODE_ELEMENT?c.forEach(a,b):b&&c.type!=b||a(c)}},getFilterContext:function(a){return a||{}}}}(),"use strict",function(){function b(){this.rules=[]}function h(f,a,g,m){var l,k;for(l in a)(k=f[l])||(k=f[l]=new b),k.add(a[l],g,m)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(f){this.id=
CKEDITOR.tools.getNextNumber();this.elementNameRules=new b;this.attributeNameRules=new b;this.elementsRules={};this.attributesRules={};this.textRules=new b;this.commentRules=new b;this.rootRules=new b;f&&this.addRules(f,10)},proto:{addRules:function(b,a){var g;"number"==typeof a?g=a:a&&"priority"in a&&(g=a.priority);"number"!=typeof g&&(g=10);"object"!=typeof a&&(a={});b.elementNames&&this.elementNameRules.addMany(b.elementNames,g,a);b.attributeNames&&this.attributeNameRules.addMany(b.attributeNames,
g,a);b.elements&&h(this.elementsRules,b.elements,g,a);b.attributes&&h(this.attributesRules,b.attributes,g,a);b.text&&this.textRules.add(b.text,g,a);b.comment&&this.commentRules.add(b.comment,g,a);b.root&&this.rootRules.add(b.root,g,a)},applyTo:function(b){b.filter(this)},onElementName:function(b,a){return this.elementNameRules.execOnName(b,a)},onAttributeName:function(b,a){return this.attributeNameRules.execOnName(b,a)},onText:function(b,a,g){return this.textRules.exec(b,a,g)},onComment:function(b,
a,g){return this.commentRules.exec(b,a,g)},onRoot:function(b,a){return this.rootRules.exec(b,a)},onElement:function(b,a){for(var g=[this.elementsRules["^"],this.elementsRules[a.name],this.elementsRules.$],m,l=0;3>l;l++)if(m=g[l]){m=m.exec(b,a,this);if(!1===m)return null;if(m&&m!=a)return this.onNode(b,m);if(a.parent&&!a.name)break}return a},onNode:function(b,a){var g=a.type;return g==CKEDITOR.NODE_ELEMENT?this.onElement(b,a):g==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(b,a.value,
a)):g==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(b,a.value,a)):null},onAttribute:function(b,a,g,m){return(g=this.attributesRules[g])?g.exec(b,m,a,this):m}}});CKEDITOR.htmlParser.filterRulesGroup=b;b.prototype={add:function(b,a,g){this.rules.splice(this.findIndex(a),0,{value:b,priority:a,options:g})},addMany:function(b,a,g){for(var m=[this.findIndex(a),0],l=0,k=b.length;l<k;l++)m.push({value:b[l],priority:a,options:g});this.rules.splice.apply(this.rules,m)},findIndex:function(b){for(var a=
this.rules,g=a.length-1;0<=g&&b<a[g].priority;)g--;return g+1},exec:function(b,a){var g=a instanceof CKEDITOR.htmlParser.node||a instanceof CKEDITOR.htmlParser.fragment,m=Array.prototype.slice.call(arguments,1),l=this.rules,k=l.length,c,d,e,h;for(h=0;h<k;h++)if(g&&(c=a.type,d=a.name),e=l[h],!(b.nonEditable&&!e.options.applyToAll||b.nestedEditable&&e.options.excludeNestedEditable)){e=e.value.apply(null,m);if(!1===e||g&&e&&(e.name!=d||e.type!=c))return e;null!=e&&(m[0]=a=e)}return a},execOnName:function(b,
a){for(var g=0,m=this.rules,l=m.length,k;a&&g<l;g++)k=m[g],b.nonEditable&&!k.options.applyToAll||b.nestedEditable&&k.options.excludeNestedEditable||(a=a.replace(k.value[0],k.value[1]));return a}}}(),function(){function b(c,d){function e(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function b(c,d){return function(b){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=[],l=f(b),h,u;if(l)for(k(l,1)&&g.push(l);l;)m(l)&&
(h=a(l))&&k(h)&&((u=a(h))&&!m(u)?g.push(h):(e(n).insertAfter(h),h.remove())),l=l.previous;for(l=0;l<g.length;l++)g[l].remove();if(g=!c||!1!==("function"==typeof d?d(b):d))n||CKEDITOR.env.needsBrFiller||b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||b.name in CKEDITOR.dtd.tr||b.name in CKEDITOR.dtd.$listItem)?(g=f(b),g=!g||"form"==b.name&&"input"==g.name):g=!1:g=!1;g&&b.add(e(c))}}}function k(a,c){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&
"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var d;return a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(z))&&(d.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,d.index))).insertBefore(a),a.value=d[0]),!CKEDITOR.env.needsBrFiller&&n&&(!c||a.parent.name in K)||!n&&((d=a.previous)&&"br"==d.name||!d||m(d)))?!0:!1}var h={elements:{}},n="html"==d,K=CKEDITOR.tools.extend({},u),w;for(w in K)"#"in y[w]||delete K[w];for(w in K)h.elements[w]=b(n,c.config.fillEmptyBlocks);h.root=b(n,!1);h.elements.br=
function(c){return function(d){if(d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var b=d.attributes;if("data-cke-bogus"in b||"data-cke-eol"in b)delete b["data-cke-bogus"];else{for(b=d.next;b&&g(b);)b=b.next;var f=a(d);!b&&m(d.parent)?l(d.parent,e(c)):m(b)&&f&&!m(f)&&e(c).insertBefore(b)}}}}(n);return h}function h(a,c){return a!=CKEDITOR.ENTER_BR&&!1!==c?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function f(a){for(a=a.children[a.children.length-1];a&&g(a);)a=a.previous;return a}function a(a){for(a=a.previous;a&&
g(a);)a=a.previous;return a}function g(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in u||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function l(a,c){var d=a.children[a.children.length-1];a.children.push(c);c.parent=a;d&&(d.next=c,c.previous=d)}function k(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);
a.contenteditable="false"}function c(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function d(a){return a.replace(F,function(a,c,d){return"\x3c"+c+d.replace(G,function(a,c){return L.test(c)&&-1==d.indexOf("data-cke-saved-"+c)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function e(a,c){return a.replace(c,function(a,c,d){0===a.indexOf("\x3ctextarea")&&(a=c+x(d).replace(/</g,"\x26lt;").replace(/>/g,
"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(I,function(a,c){return decodeURIComponent(c)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+p+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function x(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function r(a,c){var d=c._.dataStore;
return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return d&&d[c]||""})}function t(a,c){var d=[],e=c.config.protectedSource,b=c._.dataStore||(c._.dataStore={id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,e=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(e);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-
1)+"--\x3e"});for(var f=0;f<e.length;f++)a=a.replace(e[f],function(a){a=a.replace(g,function(a,c,e){return d[e]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(d.push(a)-1)+"--\x3e"});a=a.replace(g,function(a,c,e){return"\x3c!--"+p+(c?"{C}":"")+encodeURIComponent(d[e]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,c){b[b.id]=
decodeURIComponent(c);return"{cke_protected_"+b.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,e,b){return"\x3c"+d+e+"\x3e"+r(x(b),c)+"\x3c/"+d+"\x3e"})}var v;CKEDITOR.htmlDataProcessor=function(a){var c,g,f=this;this.editor=a;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=g=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(B);c.addRules(A,{applyToAll:!0});c.addRules(b(a,"data"),{applyToAll:!0});
g.addRules(C);g.addRules(E,{applyToAll:!0});g.addRules(b(a,"html"),{applyToAll:!0});a.on("toHtml",function(c){c=c.data;var b=c.dataValue,g,b=v(b),b=t(b,a),b=e(b,O),b=d(b),b=e(b,D),b=b.replace(M,"$1cke:$2"),b=b.replace(K,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),b=b.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),b=b.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");g=c.context||a.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==g&&(g="div",b="\x3cpre\x3e"+
b+"\x3c/pre\x3e",f=1);g=a.document.createElement(g);g.setHtml("a"+b);b=g.getHtml().substr(1);b=b.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(b=b.replace(/^<pre>|<\/pre>$/gi,""));b=b.replace(R,"$1$2");b=n(b);b=x(b);g=!1===c.fixForBody?!1:h(c.enterMode,a.config.autoParagraph);b=CKEDITOR.htmlParser.fragment.fromHtml(b,c.context,g);g&&(f=b,!f.children.length&&CKEDITOR.dtd[f.name][g]&&(g=new CKEDITOR.htmlParser.element(g),f.add(g)));c.dataValue=b},null,null,5);a.on("toHtml",function(c){c.data.filter.applyTo(c.data.dataValue,
!0,c.data.dontFilter,c.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var c=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(d);c=d.getHtml(!0);a.dataValue=w(c)},null,null,15);a.on("toDataFormat",function(c){var d=c.data.dataValue;c.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^<br *\/?>/i,""));c.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,
c.data.context,h(c.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);a.on("toDataFormat",function(c){var d=c.data.dataValue,e=f.writer;e.reset();d.writeChildrenHtml(e);d=e.getHtml(!0);d=x(d);d=r(d,a);c.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,d,e){var b=this.editor,
g,f,m,k;c&&"object"==typeof c?(g=c.context,d=c.fixForBody,e=c.dontFilter,f=c.filter,m=c.enterMode,k=c.protectedWhitespaces):g=c;g||null===g||(g=b.editable().getName());return b.fire("toHtml",{dataValue:a,context:g,fixForBody:d,dontFilter:e,filter:f||b.filter,enterMode:m||b.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,c){var d,e,b;c&&(d=c.context,e=c.filter,b=c.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,
filter:e||this.editor.filter,context:d,enterMode:b||this.editor.enterMode}).dataValue},protectSource:function(a){return t(a,this.editor)},unprotectSource:function(a){return r(a,this.editor)},unprotectRealComments:function(a){return x(a)}};var z=/(?:&nbsp;|\xa0)$/,p="{cke_protected}",y=CKEDITOR.dtd,q="caption colgroup col thead tfoot tbody".split(" "),u=CKEDITOR.tools.extend({},y.$blockLimit,y.$block),B={elements:{input:k,textarea:k}},A={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],
[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var c=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===c.indexOf("javascript")||0===c.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},C={elements:{embed:function(a){var c=a.parent;if(c&&"object"==c.name){var d=c.attributes.width,c=c.attributes.height;d&&(a.attributes.width=d);c&&(a.attributes.height=c)}},a:function(a){var c=a.attributes;if(!(a.children.length||
c.name||c.id||a.attributes["data-cke-saved-name"]))return!1}}},E={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return!1;for(var d=["name","href","src"],e,b=0;b<d.length;b++)e="data-cke-saved-"+d[b],e in c&&delete c[d[b]]}return a},table:function(a){a.children.slice(0).sort(function(a,c){var d,e;a.type==CKEDITOR.NODE_ELEMENT&&c.type==a.type&&
(d=CKEDITOR.tools.indexOf(q,a.name),e=CKEDITOR.tools.indexOf(q,c.name));-1<d&&-1<e&&d!=e||(d=a.parent?a.getIndex():-1,e=c.parent?c.getIndex():-1);return d>e?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var c=a.children[0];
c&&c.value&&(c.value=CKEDITOR.tools.trim(c.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var c=a.children[0];!c&&l(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var F=/<(a|area|img|input|source)\b([^>]*)>/gi,
G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,L=/^(href|src|name)$/i,D=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,O=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,I=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,M=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,R=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,K=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;v=function(){function a(d){return CKEDITOR.tools.array.reduce(d.split(""),
function(a,d){var e=d.toLowerCase(),b=d.toUpperCase(),g=c(e);e!==b&&(g+="|"+c(b));return a+("("+g+")")},"")}function c(a){var d;d=a.charCodeAt(0);var e=d.toString(16);d={htmlCode:"\x26#"+d+";?",hex:"\x26#x0*"+e+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var b in d)d[b]&&(a+="|"+d[b]);return a}var d=new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+"?"+a("cke:encoded\x3e")+")","gi"),e=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+
a("}")+")","gi");return function(a){return a.replace(d,"").replace(e,"")}}()}(),"use strict",CKEDITOR.htmlParser.element=function(b,h){this.name=b;this.attributes=h||{};this.children=[];var f=b||"",a=f.match(/^cke:(.*)/);a&&(f=a[1]);f=!!(CKEDITOR.dtd.$nonBodyContent[f]||CKEDITOR.dtd.$block[f]||CKEDITOR.dtd.$listItem[f]||CKEDITOR.dtd.$tableContent[f]||CKEDITOR.dtd.$nonEditable[f]||"br"==f);this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:f,hasInlineStarted:this.isEmpty||
!f}},CKEDITOR.htmlParser.cssStyle=function(b){var h={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,a,g){"font-family"==a&&(g=g.replace(/["']/g,""));h[a.toLowerCase()]=g});return{rules:h,populate:function(b){var a=this.toString();a&&(b instanceof CKEDITOR.dom.element?b.setAttribute("style",a):b instanceof CKEDITOR.htmlParser.element?b.attributes.style=a:b.style=a)},toString:function(){var b=
[],a;for(a in h)h[a]&&b.push(a,":",h[a],";");return b.join("")}}},function(){function b(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var h=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},f=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:f.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},
filter:function(a,b){var f=this,l,k;b=f.getFilterContext(b);if(!f.parent)a.onRoot(b,f);for(;;){l=f.name;if(!(k=a.onElementName(b,l)))return this.remove(),!1;f.name=k;if(!(f=a.onElement(b,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==l)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f),!1;if(!f.name)return this.replaceWithChildren(),!1}l=f.attributes;var c,d;for(c in l){for(k=l[c];;)if(d=a.onAttributeName(b,c))if(d!=c)delete l[c],c=d;else break;else{delete l[c];
break}d&&(!1===(k=a.onAttribute(b,f,d,k))?delete l[d]:l[d]=k)}f.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:f.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var f=this.name,l=[],k=this.attributes,c,d;a.openTag(f,k);for(c in k)l.push([c,k[c]]);a.sortAttributes&&l.sort(h);c=0;for(d=l.length;c<d;c++)k=l[c],a.attribute(k[0],k[1]);a.openTagClose(f,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(f)},writeChildrenHtml:f.writeChildrenHtml,replaceWithChildren:function(){for(var a=
this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:f.forEach,getFirst:function(a){if(!a)return this.children.length?this.children[0]:null;"function"!=typeof a&&(a=b(a));for(var g=0,f=this.children.length;g<f;++g)if(a(this.children[g]))return this.children[g];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var b=0,
f=a.length;b<f;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),f=this.clone(),l=0;l<b.length;++l)b[l].parent=f;f.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(f,this.getIndex()+1);return f},find:function(a,b){void 0===b&&(b=!1);var f=[],l;for(l=0;l<this.children.length;l++){var k=this.children[l];"function"==
typeof a&&a(k)?f.push(k):"string"==typeof a&&k.name===a&&f.push(k);b&&k.find&&(f=f.concat(k.find(a,b)))}return f},findOne:function(a,b){var f=null,l=CKEDITOR.tools.array.find(this.children,function(k){var c="function"===typeof a?a(k):k.name===a;if(c||!b)return c;k.children&&k.findOne&&(f=k.findOne(a,!0));return!!f});return f||l||null},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];
b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",
!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var f=0;f<b.length;f+=2)a[b[f]]=b[f+1]}return a}},!0)}(),function(){var b=/{([^}]+)}/g;CKEDITOR.template=function(b){this.source="function"===typeof b?b:String(b)};CKEDITOR.template.prototype.output=function(h,f){var a=("function"===typeof this.source?this.source(h):this.source).replace(b,function(a,b){return void 0!==h[b]?h[b]:a});return f?f.push(a):a}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),
CKEDITOR.add=function(b){function h(){CKEDITOR.currentInstance==b&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[b.name]=b;b.on("focus",function(){CKEDITOR.currentInstance!=b&&(CKEDITOR.currentInstance=b,CKEDITOR.fire("currentInstance"))});b.on("blur",h);b.on("destroy",h);CKEDITOR.fire("instance",null,b)},CKEDITOR.remove=function(b){delete CKEDITOR.instances[b.name]},function(){var b={};CKEDITOR.addTemplate=function(h,f){var a=b[h];if(a)return a;a={name:h,source:f};
CKEDITOR.fire("template",a);return b[h]=new CKEDITOR.template(a.source)};CKEDITOR.getTemplate=function(h){return b[h]}}(),function(){var b=[];CKEDITOR.addCss=function(h){b.push(h)};CKEDITOR.getCss=function(){return b.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,function(){CKEDITOR.inline=function(b,h){b=CKEDITOR.editor._getEditorElement(b);if(!b)return null;
var f=new CKEDITOR.editor(h,b,CKEDITOR.ELEMENT_MODE_INLINE),a=b.is("textarea")?b:null;a?(f.setData(a.getValue(),null,!0),b=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!f.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+a.getValue()+"\x3c/div\x3e",CKEDITOR.document),b.insertAfter(a),a.hide(),a.$.form&&f._attachToForm()):(h&&"undefined"!==typeof h.readOnly&&!h.readOnly&&b.setAttribute("contenteditable","true"),f.setData(b.getHtml(),null,!0));f.on("loaded",function(){f.fire("uiReady");
f.editable(b);f.container=b;f.ui.contentsElement=b;f.setData(f.getData(1));f.resetDirty();f.fire("contentDom");f.mode="wysiwyg";f.fire("mode");f.status="ready";f.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,f)},null,null,1E4);f.on("destroy",function(){var b=f.container;a&&b&&(b.clearCustomData(),b.remove());a&&a.show();f.element.clearCustomData();delete f.element});return f};CKEDITOR.inlineAll=function(){var b,h,f;for(f in CKEDITOR.dtd.$editable)for(var a=CKEDITOR.document.getElementsByTag(f),
g=0,m=a.count();g<m;g++)b=a.getItem(g),"true"!=b.getAttribute("contenteditable")||b.getEditor()||(h={element:b,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(b,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function b(a,b,m,l){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var k=new CKEDITOR.editor(b,a,l);l==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),k._.required=
a.hasAttribute("required"),a.removeAttribute("required"));m&&k.setData(m,null,!0);k.on("loaded",function(){k.isDestroyed()||k.isDetached()||(f(k),l==CKEDITOR.ELEMENT_MODE_REPLACE&&k.config.autoUpdateElement&&a.$.form&&k._attachToForm(),k.setMode(k.config.startupMode,function(){k.resetDirty();k.status="ready";k.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,k)}))});k.on("destroy",h);return k}function h(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),
this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function f(a){var b=a.name,f=a.element,l=a.elementMode,k=a.fire("uiSpace",{space:"top",html:""}).html,c=a.fire("uiSpace",{space:"bottom",html:""}).html,d=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+
(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),b=CKEDITOR.dom.element.createFromHtml(d.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,
voiceLabel:a.title,topHtml:k?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+k+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:c?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+c+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));l==CKEDITOR.ELEMENT_MODE_REPLACE?(f.hide(),b.insertAfter(f)):f.append(b);a.container=b;a.ui.contentsElement=
a.ui.space("contents");k&&a.ui.space("top").unselectable();c&&a.ui.space("bottom").unselectable();f=a.config.width;l=a.config.height;f&&b.setStyle("width",CKEDITOR.tools.cssLength(f));l&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(l));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(a,g){return b(a,g,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(a,g,f){return b(a,g,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};
CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var f=null,l=a[b];if(l.name||l.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(l.className))continue}else if("function"==typeof arguments[0]&&(f={},!1===arguments[0](l,f)))continue;this.replace(l,f)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var f=this,
l=this._.modes;if(a!=f.mode&&l&&l[a]){f.fire("beforeSetMode",a);if(f.mode){var k=f.checkDirty(),l=f._.previousModeData,c,d=0;f.fire("beforeModeUnload");f.editable(0);f._.previousMode=f.mode;f._.previousModeData=c=f.getData(1);"source"==f.mode&&l==c&&(f.fire("lockSnapshot",{forceUpdate:!0}),d=1);f.ui.space("contents").setHtml("");f.mode=""}else f._.previousModeData=f.getData(1);this._.modes[a](function(){f.mode=a;void 0!==k&&!k&&f.resetDirty();d?f.fire("unlockSnapshot"):"wysiwyg"==a&&f.fire("saveSnapshot");
setTimeout(function(){f.isDestroyed()||f.isDetached()||(f.fire("mode"),b&&b.call(f))},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,f,l){var k=this.container,c=this.ui.space("contents"),d=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;l=l?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):k;if(a||0===a)a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));l.setSize("width",a,!0);d&&(d.style.width="1%");b=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(b));
var e=(l.$.offsetHeight||0)-(c.$.clientHeight||0),k=Math.max(b-(f?0:e),0);b=f?b+e:b;c.setStyle("height",CKEDITOR.tools.cssLength(k));d&&(d.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:k,outerWidth:a||l.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function b(c){var d=
c.editor,b=c.data.path,e=b.blockLimit,g=c.data.selection,f=g.getRanges()[0],k;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(g=h(g,b))g.appendBogus(),k=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&d._.previousActive;l(d,b.block,e)&&f.collapsed&&!f.getCommonAncestor().isReadOnly()&&(b=f.clone(),b.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),e=new CKEDITOR.dom.walker(b),e.guard=function(c){return!a(c)||c.type==CKEDITOR.NODE_COMMENT||c.isReadOnly()},!e.checkForward()||b.checkStartOfBlock()&&
b.checkEndOfBlock())&&(d=f.fixBlock(!0,d.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(d=d.getFirst(a))&&d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.getText()).match(/^(?:&nbsp;|\xa0)$/)&&d.remove(),k=1,c.cancel());k&&f.select()}function h(c,d){if(c.isFake)return 0;var b=d.block||d.blockLimit,e=b&&b.getLast(a);if(!(!b||!b.isBlockBoundary()||e&&e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()||b.is("pre")||b.getBogus()))return b}function f(a){var c=a.data.getTarget();
c.is("input")&&(c=c.getAttribute("type"),"submit"!=c&&"reset"!=c||a.data.preventDefault())}function a(a){return n(a)&&w(a)}function g(a,c){return function(d){var b=d.data.$.toElement||d.data.$.fromElement||d.data.$.relatedTarget;(b=b&&b.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(b):null)&&(c.equals(b)||c.contains(b))||a.call(this,d)}}function m(c){function d(c){return function(d,e){e&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(g)&&(b=d);if(!(e||!a(d)||c&&r(d)))return!1}}var b,e=c.getRanges()[0];
c=c.root;var g={table:1,ul:1,ol:1,dl:1};if(e.startPath().contains(g)){var f=e.clone();f.collapse(1);f.setStartAt(c,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(f);c.guard=d();c.checkBackward();if(b)return f=e.clone(),f.collapse(),f.setEndAt(b,CKEDITOR.POSITION_AFTER_END),c=new CKEDITOR.dom.walker(f),c.guard=d(!0),b=!1,c.checkForward(),b}return null}function l(a,c,d){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(d)&&!c||c&&"true"==c.getAttribute("contenteditable"))}
function k(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function c(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function d(a){var c=a.editor;c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}function e(a,c,d){var b=a.getCommonAncestor(c);for(c=a=d?c:a;(a=a.getParent())&&!b.equals(a)&&1==a.getChildCount();)c=a;c.remove()}var n,w,x,r,t,v,z,p,y,q;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,
$:function(a,c){this.base(c.$||c);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}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 c=
this.$.scrollTop;this.$.focus();this.$.scrollTop=c}else this.$.focus();else this.$.setActive()}catch(d){if(!CKEDITOR.env.ie)throw d;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,c){var d=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",c=g(c,this),d[0]=a,d[1]=c);return CKEDITOR.dom.element.prototype.on.apply(this,d)},attachListener:function(a){!this._.listeners&&
(this._.listeners=[]);var c=Array.prototype.slice.call(arguments,1),c=a.on.apply(a,c);this._.listeners.push(c);return c},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(c){}},restoreAttrs:function(){var a=this._.attrChanges,c,d;for(d in a)a.hasOwnProperty(d)&&(c=a[d],null!==c?this.setAttribute(d,c):this.removeAttribute(d))},attachClass:function(a){var c=this.getCustomData("classes");this.hasClass(a)||(!c&&(c=[]),c.push(a),this.setCustomData("classes",
c),this.addClass(a))},changeAttr:function(a,c){var d=this.getAttribute(a);c!==d&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=d),this.setAttribute(a,c))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var c=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,
c)},insertHtml:function(a,c,b){var e=this.editor;e.focus();e.fire("saveSnapshot");b||(b=e.getSelection().getRanges()[0]);v(this,c||"html",a,b);b.select();d(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,c,d){v(this,d||"html",a,c);this.editor.fire("afterInsertHtml",{intoRange:c})},insertElement:function(c,b){var e=this.editor;e.focus();e.fire("saveSnapshot");var g=e.activeEnterMode,e=e.getSelection(),f=c.getName(),f=CKEDITOR.dtd.$block[f];b||(b=e.getRanges()[0]);this.insertElementIntoRange(c,
b)&&(b.moveToPosition(c,CKEDITOR.POSITION_AFTER_END),f&&((f=c.getNext(function(c){return a(c)&&!r(c)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)?f.getDtd()["#"]?b.moveToElementEditStart(f):b.moveToElementEditEnd(c):f||g==CKEDITOR.ENTER_BR||(f=b.fixBlock(!0,g==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(f))));e.selectRanges([b]);d(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,d){var b=this.editor,e=b.config.enterMode,
g=a.getName(),f=CKEDITOR.dtd.$block[g];if(d.checkReadOnly())return!1;d.deleteContents(1);d.startContainer.type==CKEDITOR.NODE_ELEMENT&&(d.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?z(d):d.startContainer.is(CKEDITOR.dtd.$list)&&p(d));var k,m;if(f)for(;(k=d.getCommonAncestor(0,1))&&(m=CKEDITOR.dtd[k.getName()])&&(!m||!m[g]);)if(k.getName()in CKEDITOR.dtd.span){var f=d.splitElement(k),l=d.createBookmark();c(k);c(f);d.moveToBookmark(l)}else d.checkStartOfBlock()&&d.checkEndOfBlock()?(d.setStartBefore(k),
d.collapse(!0),k.remove()):d.splitBlock(e==CKEDITOR.ENTER_DIV?"div":"p",b.editable());d.insertNode(a);return!0},setData:function(a,c){c||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var c=this.getHtml();a||(c=this.editor.dataProcessor.toDataFormat(c));return c},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.status="detached";
this.editor.setData(this.editor.getData(),{internal:!0});this.clearListeners();try{this._.cleanCustomData()}catch(a){if(!CKEDITOR.env.ie||-2146828218!==a.number)throw a;}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 a(){var c=d.getDocument().$,b=c.getSelection(),e;a:if(b.anchorNode&&b.anchorNode==d.$)e=!0;else{if(CKEDITOR.env.webkit&&
(e=d.getDocument().getActive())&&e.equals(d)&&!b.anchorNode){e=!0;break a}e=void 0}e&&(e=new CKEDITOR.dom.range(d),e.moveToElementEditStart(d),c=c.createRange(),c.setStart(e.startContainer.$,e.startOffset),c.collapse(!0),b.removeAllRanges(),b.addRange(c))}function c(){var a=d.getDocument().$,b=a.selection,e=d.getDocument().getActive();"None"==b.type&&e.equals(d)&&(b=new CKEDITOR.dom.range(d),a=a.body.createTextRange(),b.moveToElementEditStart(d),b=b.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=
b.getParent()),a.moveToElementText(b.$),a.collapse(!0),a.select())}var d=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),c());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};y.eol.detect(a,this);y.bogus.exclude(a);y.cell.shrink(a);a.fragment=a.range.cloneContents();
y.tree.rebuild(a,this);y.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var d=q,b={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(b);b.bookmark=a.createBookmark();delete b.range;var g=this.editor.createRange();g.moveToPosition(b.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);b.targetBookmark=g.createBookmark();d.list.detectMerge(b,this);
d.table.detectRanges(b,this);d.block.detectMerge(b,this);b.tableContentsRanges?(d.table.deleteRanges(b),a.moveToBookmark(b.bookmark),b.range=a):(a.moveToBookmark(b.bookmark),b.range=a,a.extractContents(d.detectExtractMerge(b)));a.moveToBookmark(b.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(b,this);d.table.purge(b,this);d.block.merge(b,this);if(c){d=a.startPath();if(b=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var b=d.block.getElementsByTag("span"),
g=0,f;if(b)for(;f=b.getItem(g++);)if(!w(f)){b=!0;break a}b=!1}b=!b}b&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),x(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var c=this.editor;this.attachListener(c,"beforeGetData",function(){var a=this.getData();this.is("textarea")||!1!==c.config.ignoreEmptyParagraph&&(a=a.replace(t,function(a,c){return c}));c.setData(a,null,1)},
this);this.attachListener(c,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(c,"afterSetData",function(){this.setData(c.getData(1))},this);this.attachListener(c,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(c,"beforeFocus",function(){var a=c.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},this);this.attachListener(c,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(c,
"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(c,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(c.readOnly);this.attachClass("cke_editable");c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):c.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+c.config.contentsLangDirection);c.keystrokeHandler.blockedKeystrokes[8]=
+c.readOnly;c.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){c._.previousScrollTop=c.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var d=function(){var a=c.editable();null!=c._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=c._.previousScrollTop,c._.previousScrollTop=null,this.removeListener("scroll",
d))};this.on("scroll",d)}c.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,c.once("contentDom",function(){c.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",c.tabIndex);if(!this.is("textarea")){c.document=this.getDocument();c.window=this.getWindow();var b=c.document;this.changeAttr("spellcheck",!c.config.disableNativeSpellChecker);var g=c.config.contentsLangDirection;this.getDirection(1)!=g&&this.changeAttr("dir",g);var k=CKEDITOR.getCss();
if(k){var g=b.getHead(),l=g.getCustomData("stylesheet");l?k!=l.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?l.$.styleSheet.cssText=k:l.setText(k)):(k=b.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),g.setCustomData("stylesheet",k),k.data("cke-temp",1))}g=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",g+1);this.setCustomData("cke_includeReadonly",!c.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var c=
(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");c&&2!=a.$.button&&c.isReadOnly()&&a.preventDefault()});var h={8:1,46:1};this.attachListener(c,"key",function(a){if(c.readOnly)return!0;var d=a.data.domEvent.getKey(),b;a=c.getSelection();if(0!==a.getRanges().length){if(d in h){var e,g=a.getRanges()[0],f=g.startPath(),k,l,w,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=a.getSelectedElement())||(e=m(a))?(c.fire("saveSnapshot"),g.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),
g.select(),c.fire("saveSnapshot"),b=1):g.collapsed&&((k=f.block)&&(w=k[d?"getPrevious":"getNext"](n))&&w.type==CKEDITOR.NODE_ELEMENT&&w.is("table")&&g[d?"checkStartOfBlock":"checkEndOfBlock"]()?(c.fire("saveSnapshot"),g[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),g["moveToElementEdit"+(d?"End":"Start")](w),g.select(),c.fire("saveSnapshot"),b=1):f.blockLimit&&f.blockLimit.is("td")&&(l=f.blockLimit.getAscendant("table"))&&g.checkBoundaryOfElement(l,d?CKEDITOR.START:CKEDITOR.END)&&(w=l[d?
"getPrevious":"getNext"](n))?(c.fire("saveSnapshot"),g["moveToElementEdit"+(d?"End":"Start")](w),g.checkStartOfBlock()&&g.checkEndOfBlock()?w.remove():g.select(),c.fire("saveSnapshot"),b=1):(l=f.contains(["td","th","caption"]))&&g.checkBoundaryOfElement(l,d?CKEDITOR.START:CKEDITOR.END)&&(b=1))}return!b}});c.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(d){d.data.getKeystroke()in h&&!this.getFirst(a)&&(this.appendBogus(),d=c.createRange(),d.moveToPosition(this,
CKEDITOR.POSITION_AFTER_START),d.select())});this.attachListener(this,"dblclick",function(a){if(c.readOnly)return!1;a={element:a.data.getTarget()};c.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",f);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var d=a.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(c.getSelection().selectElement(d),d.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&
this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&c.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(t,""))){var d=c.createRange();d.moveToElementEditStart(a);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),
this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(c,"key",function(a){if(c.readOnly)return!0;var d=a.data.domEvent.getKey();if(d in h&&(a=c.getSelection(),0!==a.getRanges().length)){var d=8==d,b=a.getRanges()[0];a=b.startPath();if(b.collapsed)a:{var g=a.block;if(g&&b[d?"checkStartOfBlock":"checkEndOfBlock"](!0)&&b.moveToClosestEditablePosition(g,!d)&&b.collapsed){if(b.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=
b.startContainer.getChild(b.startOffset-(d?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){c.fire("saveSnapshot");f.remove();a=!0;break a}}b=b.startPath().block;if(!b||b&&b.contains(g))a=void 0;else{c.fire("saveSnapshot");var k;(k=(d?b:g).getBogus())&&k.remove();k=c.getSelection();f=k.createBookmarks();(d?g:b).moveChildren(d?b:g,!1);a.lastElement.mergeSiblings();e(g,b,!d);k.selectBookmarks(f);a=!0}}else a=!1}else d=b,k=a.block,b=d.endPath().block,k&&b&&!k.equals(b)?(c.fire("saveSnapshot"),
(g=k.getBogus())&&g.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),b.getParent()&&(b.moveChildren(k,!1),a.lastElement.mergeSiblings(),e(k,b,!0)),d=c.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),a=!0):a=!1;if(!a)return;c.getSelection().scrollIntoView();c.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(c){a=
this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),c=a.getHead();if(c.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),c.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=
function(a){var c=this._.editable;if(c&&a)return 0;if(!arguments.length)return c;a?c=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),c=null);return this._.editable=c};CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",
!1))});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),b(a),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var c=a.editor;c.on("mode",function(){var a=c.editable();if(a&&a.isInline()){var d=c.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var b=c.fire("ariaEditorHelpLabel",{}).label;if(b&&
(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),b=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+b+"\x3c/span\x3e");d.append(b);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");n=CKEDITOR.dom.walker.whitespaces(!0);w=CKEDITOR.dom.walker.bookmark(!1,!0);x=CKEDITOR.dom.walker.empty();
r=CKEDITOR.dom.walker.bogus();t=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;v=function(){function d(a){return a.type==CKEDITOR.NODE_ELEMENT}function b(a,c){var e,g,f,k,m=[],l=c.range.startContainer;e=c.range.startPath();for(var l=n[l.getName()],h=0,w=a.getChildren(),p=w.count(),v=-1,q=-1,t=0,z=e.contains(n.$list);h<p;++h)e=w.getItem(h),d(e)?(f=e.getName(),z&&f in CKEDITOR.dtd.$list?m=m.concat(b(e,c)):(k=!!l[f],
"br"!=f||!e.data("cke-eol")||h&&h!=p-1||(t=(g=h?m[h-1].node:w.getItem(h+1))&&(!d(g)||!g.is("br")),g=g&&d(g)&&n.$block[g.getName()]),-1!=v||k||(v=h),k||(q=h),m.push({isElement:1,isLineBreak:t,isBlock:e.isBlockBoundary(),hasBlockSibling:g,node:e,name:f,allowed:k}),g=t=0)):m.push({isElement:0,node:e,allowed:1});-1<v&&(m[v].firstNotAllowed=1);-1<q&&(m[q].lastNotAllowed=1);return m}function e(a,c){var b=[],g=a.getChildren(),f=g.count(),k,m=0,l=n[c],h=!a.is(n.$inline)||a.is("br");for(h&&b.push(" ");m<f;m++)k=
g.getItem(m),d(k)&&!k.is(l)?b=b.concat(e(k,c)):b.push(k);h&&b.push(" ");return b}function g(a){return d(a.startContainer)&&a.startContainer.getChild(a.startOffset-1)}function f(a){return a&&d(a)&&(a.is(n.$removeEmpty)||a.is("a")&&!a.isBlockBoundary())}function m(a,c,b,e){var g=a.clone(),f,k;g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(f=(new CKEDITOR.dom.walker(g)).next())&&d(f)&&w[f.getName()]&&(k=f.getPrevious())&&d(k)&&!k.getParent().equals(a.startContainer)&&b.contains(k)&&e.contains(f)&&f.isIdentical(k)&&
(f.moveChildren(k),f.remove(),m(a,c,b,e))}function h(a,c){function b(a,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&d(a)&&a.is("br"))return a.remove(),1}var e=c.endContainer.getChild(c.endOffset),g=c.endContainer.getChild(c.endOffset-1);e&&b(e,a[a.length-1]);g&&b(g,a[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var n=CKEDITOR.dtd,w={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},p={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},v=CKEDITOR.tools.extend({},
n.$inline);delete v.br;return function(w,q,K,H){var z=w.editor,y=!1,x;"unfiltered_html"==q&&(q="html",y=!0);if(!H.checkReadOnly()){var r=(new CKEDITOR.dom.elementPath(H.startContainer,H.root)).blockLimit||H.root;q={type:q,dontFilter:y,editable:w,editor:z,range:H,blockLimit:r,mergeCandidates:[],zombies:[]};var y=q.range,r=q.mergeCandidates,D="html"===q.type,J,S,W,aa,ba;"text"==q.type&&y.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(S=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
y.document),y.insertNode(S),y.setStartAfter(S));W=new CKEDITOR.dom.elementPath(y.startContainer);q.endPath=aa=new CKEDITOR.dom.elementPath(y.endContainer);if(!y.collapsed){J=aa.block||aa.blockLimit;var ca=y.getCommonAncestor();J&&!J.equals(ca)&&!J.contains(ca)&&y.checkEndOfBlock()&&q.zombies.push(J);y.deleteContents()}for(;(ba=g(y))&&d(ba)&&ba.isBlockBoundary()&&W.contains(ba);)y.moveToPosition(ba,CKEDITOR.POSITION_BEFORE_END);m(y,q.blockLimit,W,aa);S&&(y.setEndBefore(S),y.collapse(),S.remove());
S=y.startPath();if(J=S.contains(f,!1,1))x=y.splitElement(J),q.inlineStylesRoot=J,q.inlineStylesPeak=S.lastElement;S=y.createBookmark();D&&(c(J),c(x));(J=S.startNode.getPrevious(a))&&d(J)&&f(J)&&r.push(J);(J=S.startNode.getNext(a))&&d(J)&&f(J)&&r.push(J);for(J=S.startNode;(J=J.getParent())&&f(J);)r.push(J);y.moveToBookmark(S);x=w.getHtml();x=""===x||x.match(t);z.enterMode===CKEDITOR.ENTER_DIV&&x&&((z=w.getFirst())&&z.remove(),H.setStartAt(w,CKEDITOR.POSITION_AFTER_START),H.collapse(!0));if(w=K){w=
q.range;if("text"==q.type&&q.inlineStylesRoot){H=q.inlineStylesPeak;z=H.getDocument().createText("{cke-peak}");for(x=q.inlineStylesRoot.getParent();!H.equals(x);)z=z.appendTo(H.clone()),H=H.getParent();K=z.getOuterHtml().split("{cke-peak}").join(K)}H=q.blockLimit.getName();if(/^\s+|\s+$/.test(K)&&"span"in CKEDITOR.dtd[H]){var Z='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';K=Z+K+Z}K=q.editor.dataProcessor.toHtml(K,{context:null,fixForBody:!1,protectedWhitespaces:!!Z,dontFilter:q.dontFilter,
filter:q.editor.activeFilter,enterMode:q.editor.activeEnterMode});H=w.document.createElement("body");H.setHtml(K);Z&&(H.getFirst().remove(),H.getLast().remove());if((Z=w.startPath().block)&&(1!=Z.getChildCount()||!Z.getBogus()))a:{var U;if(1==H.getChildCount()&&d(U=H.getFirst())&&U.is(p)&&!U.hasAttribute("contenteditable")){Z=U.getElementsByTag("*");w=0;for(x=Z.count();w<x;w++)if(z=Z.getItem(w),!z.is(v))break a;U.moveChildren(U.getParent(1));U.remove()}}q.dataWrapper=H;w=K}if(w){U=q.range;w=U.document;
H=q.blockLimit;x=0;var V,Z=[],ga,N;K=S=0;var Q,z=U.startContainer;ba=q.endPath.elements[0];var ea,y=ba.getPosition(z),r=!!ba.getCommonAncestor(z)&&y!=CKEDITOR.POSITION_IDENTICAL&&!(y&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),z=b(q.dataWrapper,q);for(h(z,U);x<z.length;x++){y=z[x];if(D=y.isLineBreak)D=U,J=H,aa=W=void 0,y.hasBlockSibling?D=1:(W=D.startContainer.getAscendant(n.$block,1))&&W.is({div:1,p:1})?(aa=W.getPosition(J),aa==CKEDITOR.POSITION_IDENTICAL||aa==CKEDITOR.POSITION_CONTAINS?
D=0:(J=D.splitElement(W),D.moveToPosition(J,CKEDITOR.POSITION_AFTER_START),D=1)):D=0;if(D)K=0<x;else{D=U.startPath();!y.isBlock&&l(q.editor,D.block,D.blockLimit)&&(N=k(q.editor))&&(N=w.createElement(N),N.appendBogus(),U.insertNode(N),CKEDITOR.env.needsBrFiller&&(V=N.getBogus())&&V.remove(),U.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END));if((D=U.startPath().block)&&!D.equals(ga)){if(V=D.getBogus())V.remove(),Z.push(D);ga=D}y.firstNotAllowed&&(S=1);if(S&&y.isElement){D=U.startContainer;for(J=null;D&&
!n[D.getName()][y.name];){if(D.equals(H)){D=null;break}J=D;D=D.getParent()}if(D)J&&(Q=U.splitElement(J),q.zombies.push(Q),q.zombies.push(J));else{J=H.getName();ea=!x;D=x==z.length-1;J=e(y.node,J);W=[];aa=J.length;for(var ca=0,ia=void 0,ha=0,fa=-1;ca<aa;ca++)ia=J[ca]," "==ia?(ha||ea&&!ca||(W.push(new CKEDITOR.dom.text(" ")),fa=W.length),ha=1):(W.push(ia),ha=0);D&&fa==W.length&&W.pop();ea=W}}if(ea){for(;D=ea.pop();)U.insertNode(D);ea=0}else U.insertNode(y.node);y.lastNotAllowed&&x<z.length-1&&((Q=r?
ba:Q)&&U.setEndAt(Q,CKEDITOR.POSITION_AFTER_START),S=0);U.collapse()}}1!=z.length?V=!1:(V=z[0],V=V.isElement&&"false"==V.node.getAttribute("contenteditable"));V&&(K=!0,D=z[0].node,U.setStartAt(D,CKEDITOR.POSITION_BEFORE_START),U.setEndAt(D,CKEDITOR.POSITION_AFTER_END));q.dontMoveCaret=K;q.bogusNeededBlocks=Z}V=q.range;var ja;ea=q.bogusNeededBlocks;for(ga=V.createBookmark();N=q.zombies.pop();)N.getParent()&&(Q=V.clone(),Q.moveToElementEditStart(N),Q.removeEmptyBlocksAtEnd());if(ea)for(;N=ea.pop();)CKEDITOR.env.needsBrFiller?
N.appendBogus():N.append(V.document.createText(" "));for(;N=q.mergeCandidates.pop();)N.mergeSiblings();CKEDITOR.env.webkit&&V.startPath()&&(N=V.startPath(),N.block?N.block.$.normalize():N.blockLimit&&N.blockLimit.$.normalize());V.moveToBookmark(ga);if(!q.dontMoveCaret){for(N=g(V);N&&d(N)&&!N.is(n.$empty);){if(N.isBlockBoundary())V.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END);else{if(f(N)&&N.getHtml().match(/(\s|&nbsp;)$/g)){ja=null;break}ja=V.clone();ja.moveToPosition(N,CKEDITOR.POSITION_BEFORE_END)}N=
N.getLast(a)}ja&&V.moveToRange(ja)}}}}();z=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return c}function c(a,d,b){d=a.getDocument().createElement(d);a.append(d,b);return d}function d(a){var c=a.count(),b;for(c;0<c--;)b=a.getItem(c),CKEDITOR.tools.trim(b.getHtml())||(b.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&
b.getChildCount()&&b.getFirst().remove())}return function(b){var e=b.startContainer,g=e.getAscendant("table",1),f=!1;d(g.getElementsByTag("td"));d(g.getElementsByTag("th"));g=b.clone();g.setStart(e,0);g=a(g).lastBackward();g||(g=b.clone(),g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),f=!0);g||(g=e);g.is("table")?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),g.remove()):(g.is({tbody:1,thead:1,tfoot:1})&&(g=c(g,"tr",f)),g.is("tr")&&(g=c(g,g.getParent().is("thead")?
"th":"td",f)),(e=g.getBogus())&&e.remove(),b.moveToPosition(g,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();p=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return c}return function(c){var d=c.startContainer,b=!1,e;e=c.clone();e.setStart(d,0);e=a(e).lastBackward();
e||(e=c.clone(),e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),b=!0);e||(e=d);e.is(CKEDITOR.dtd.$list)?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),e.remove()):((d=e.getBogus())&&d.remove(),c.moveToPosition(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),c.select())}}();y={eol:{detect:function(a,c){var d=a.range,b=d.clone(),e=d.clone(),g=new CKEDITOR.dom.elementPath(d.startContainer,c),f=new CKEDITOR.dom.elementPath(d.endContainer,c);b.collapse(1);
e.collapse();g.block&&b.checkBoundaryOfElement(g.block,CKEDITOR.END)&&(d.setStartAfter(g.block),a.prependEolBr=1);f.block&&e.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(d.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,c){var d=c.getDocument(),b;a.appendEolBr&&(b=this.createEolBr(d),a.fragment.append(b));!a.prependEolBr||b&&!b.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var c=
a.range.getBoundaryNodes(),d=c.startNode,c=c.endNode;!c||!r(c)||d&&d.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var d=a.range,b=d.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(b,c),g=new CKEDITOR.dom.elementPath(d.startContainer,c),d=new CKEDITOR.dom.elementPath(d.endContainer,c),f;b.type==CKEDITOR.NODE_TEXT&&(b=b.getParent());if(e.blockLimit.is({tr:1,table:1})){var k=e.contains("table").getParent();f=function(a){return!a.equals(k)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&
(g=g.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!g.equals(d))){var m=e.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(m)}}f||(f=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,c,b,f)},rebuildFragment:function(a,c,d,b){for(var e;d&&!d.equals(c)&&b(d);)e=d.clone(0,1),a.fragment.appendTo(e),a.fragment=e,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,d=a.endContainer,b=a.startOffset,e=a.endOffset;
c.type==CKEDITOR.NODE_ELEMENT&&c.equals(d)&&c.is("tr")&&++b==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};q=function(){function a(c,d){var b=c.getParent();if(b.is(CKEDITOR.dtd.$inline))c[d?"insertBefore":"insertAfter"](b)}function c(d,b,e){a(b);a(e,1);for(var g;g=e.getNext();)g.insertAfter(b),b=g;x(d)&&d.remove()}function d(a,c){var b=new CKEDITOR.dom.range(a);b.setStartAfter(c.startNode);b.setEndBefore(c.endNode);return b}return{list:{detectMerge:function(a,c){var b=d(c,a.bookmark),e=b.startPath(),g=b.endPath(),
f=e.contains(CKEDITOR.dtd.$list),k=g.contains(CKEDITOR.dtd.$list);a.mergeList=f&&k&&f.getParent().equals(k.getParent())&&!f.equals(k);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)b=b.clone(),b.setStartBefore(a.bookmark.startNode),b.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=b.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var b=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,
g=new CKEDITOR.dom.elementPath(b,d),f=new CKEDITOR.dom.elementPath(e,d);if(a.mergeList){var k=g.contains(CKEDITOR.dtd.$list),m=f.contains(CKEDITOR.dtd.$list);k.equals(m)||(m.moveChildren(k),m.remove())}a.mergeListItems&&(g=g.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),g.equals(f)||c(f,b,e));b.remove();e.remove()}}},block:{detectMerge:function(a,c){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(c);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);
a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var b=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(b,d),f=new CKEDITOR.dom.elementPath(e,d),g=g.block,f=f.block;g&&f&&!g.equals(f)&&c(f,b,e);b.remove();e.remove()}}},table:function(){function a(d){var e=[],g,f=new CKEDITOR.dom.walker(d),k=d.startPath().contains(b),m=d.endPath().contains(b),l={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var h=
"visited_"+(f?"out":"in");if(a.getCustomData(h))return;CKEDITOR.dom.element.setMarker(l,a,h,1)}if(f&&k&&a.equals(k))g=d.clone(),g.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!f&&m&&a.equals(m))g=d.clone(),g.setStartAt(m,CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(h=!f)h=a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&(!k||c(a,k))&&(!m||c(a,m));if(!h&&(h=f))if(a.is(b))var h=k&&k.getAscendant("table",!0),n=m&&m.getAscendant("table",!0),w=a.getAscendant("table",!0),h=h&&h.contains(w)||n&&
n.contains(w);else h=void 0;h&&(g=d.clone(),g.selectNodeContents(a),e.push(g))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return e}function c(a,d){var b=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(d);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&b)}var b={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,d=c.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),e=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&
a.is(b)&&++e};d.checkForward();if(1<e){var d=c.startPath().contains("table"),g=c.endPath().contains("table");d&&g&&c.checkBoundaryOfElement(d,CKEDITOR.START)&&c.checkBoundaryOfElement(g,CKEDITOR.END)&&(c=a.range.clone(),c.setStartBefore(d),c.setEndAfter(g),a.purgeTableBookmark=c.createBookmark())}},detectRanges:function(e,g){var f=d(g,e.bookmark),k=f.clone(),m,l,h=f.getCommonAncestor();h.is(CKEDITOR.dtd.$tableContent)&&!h.is(b)&&(h=h.getAscendant("table",!0));l=h;h=new CKEDITOR.dom.elementPath(f.startContainer,
l);l=new CKEDITOR.dom.elementPath(f.endContainer,l);h=h.contains("table");l=l.contains("table");if(h||l)h&&l&&c(h,l)?(e.tableSurroundingRange=k,k.setStartAt(h,CKEDITOR.POSITION_AFTER_END),k.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),k=f.clone(),k.setEndAt(h,CKEDITOR.POSITION_AFTER_END),m=f.clone(),m.setStartAt(l,CKEDITOR.POSITION_BEFORE_START),m=a(k).concat(a(m))):h?l||(e.tableSurroundingRange=k,k.setStartAt(h,CKEDITOR.POSITION_AFTER_END),f.setEndAt(h,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=
k,k.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(l,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=m?m:a(f)},deleteRanges:function(a){for(var c;c=a.tableContentsRanges.pop();)c.extractContents(),x(c.startContainer)&&c.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var c=a.doc,d=a.range.clone(),c=c.createElement("p");c.insertBefore(a.purgeTableBookmark.startNode);d.moveToBookmark(a.purgeTableBookmark);
d.deleteContents();a.range.moveToPosition(c,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,c){var d=c.startPath(),b;l(a,d.block,d.blockLimit)&&(b=k(a))&&(b=c.document.createElement(b),b.appendBogus(),c.insertNode(b),c.moveToPosition(b,
CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function b(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,c){if(0===a.length||b(a[0].getEnclosedNode()))return!1;var d,e;if((d=!c&&1===a.length)&&!(d=a[0].collapsed)){var g=a[0];d=g.startContainer.getAscendant({td:1,th:1},!0);var f=g.endContainer.getAscendant({td:1,th:1},!0);e=CKEDITOR.tools.trim;d&&d.equals(f)&&!d.findOne("td, th, tr, tbody, table")?(g=g.cloneContents(),d=g.getFirst()?e(g.getFirst().getText())!==
e(d.getText()):!0):d=!1}if(d)return!1;for(e=0;e<a.length;e++)if(d=a[e]._getTableElement(),!d)return!1;return!0}function f(a){function c(a){a=a.find("td, th");var d=[],b;for(b=0;b<a.count();b++)d.push(a.getItem(b));return d}var d=[],b,e;for(e=0;e<a.length;e++)b=a[e]._getTableElement(),b.is&&b.is({td:1,th:1})?d.push(b):d=d.concat(c(b));return d}function a(a){a=f(a);var c="",d=[],b,e;for(e=0;e<a.length;e++)b&&!b.equals(a[e].getAscendant("tr"))?(c+=d.join("\t")+"\n",b=a[e].getAscendant("tr"),d=[]):0===
e&&(b=a[e].getAscendant("tr")),d.push(a[e].getText());return c+=d.join("\t")}function g(c){var d=this.root.editor,b=d.getSelection(1);this.reset();q=!0;b.root.once("selectionchange",function(a){a.cancel()},null,null,0);b.selectRanges([c[0]]);b=this._.cache;b.ranges=new CKEDITOR.dom.rangeList(c);b.type=CKEDITOR.SELECTION_TEXT;b.selectedElement=c[0]._getTableElement();b.selectedText=a(c);b.nativeSel=null;this.isFake=1;this.rev=z++;d._.fakeSelection=this;q=!1;this.root.fire("selectionchange")}function m(){var a=
this._.fakeSelection,c;if(a){c=this.getSelection(1);var d;if(!(d=!c)&&(d=!c.isHidden())){d=a;var e=c.getRanges(),g=d.getRanges(),f=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),k=g.length&&g[0]._getTableElement()&&g[0]._getTableElement().getAscendant("table",!0),m=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table"),l=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table");if(b(d.getSelectedElement()))d=!1;else{var n=1===
e.length&&e[0].collapsed,g=h(e,!!CKEDITOR.env.webkit)&&h(g);f=f&&k?f.equals(k)||k.contains(f):!1;f&&(n||g)?(m&&!l&&d.selectRanges(e),d=!0):d=!1}d=!d}d&&(a.reset(),a=0)}if(!a&&(a=c||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||d||(this._.previousActive=
this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:a,path:c}))}function l(){B=!0;u||(k.call(this),u=CKEDITOR.tools.setTimeout(k,200,this))}function k(){u=null;B&&(CKEDITOR.tools.setTimeout(m,0,this),B=!1)}function c(a){return A(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function d(a){function d(c,b){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(b?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;
var b=a.startContainer,e=a.getPreviousNode(c,null,b),g=a.getNextNode(c,null,b);return d(e)||d(g,1)||!(e||g||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()&&b.getBogus())?!0:!1}function e(a){n(a,!1);var c=a.getDocument().createText(p);a.setCustomData("cke-fillingChar",c);return c}function n(a,c){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==c){var b=a.getDocument().getSelection().getNative(),e=b&&"None"!=b.type&&b.getRangeAt(0),g=p.length;if(d.getLength()>g&&e&&e.intersectsNode(d.$)){var f=
[{node:b.anchorNode,offset:b.anchorOffset},{node:b.focusNode,offset:b.focusOffset}];b.anchorNode==d.$&&b.anchorOffset>g&&(f[0].offset-=g);b.focusNode==d.$&&b.focusOffset>g&&(f[1].offset-=g)}}d.setText(w(d.getText(),1));f&&(d=a.getDocument().$,b=d.getSelection(),d=d.createRange(),d.setStart(f[0].node,f[0].offset),d.collapse(!0),b.removeAllRanges(),b.addRange(d),b.extend(f[1].node,f[1].offset))}}function w(a,c){return c?a.replace(y,function(a,c){return c?" ":""}):a.replace(p,"")}function x(a,c){var d=
c&&CKEDITOR.tools.htmlEncode(c)||"\x26nbsp;",d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+'"\x3e'+d+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var b=a.getSelection(1),e=a.createRange(),g=b.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(d,CKEDITOR.POSITION_AFTER_START);
e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);b.selectRanges([e]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function r(a){var c={37:1,39:1,8:1,46:1};return function(d){var b=d.data.getKeystroke();if(c[b]){var e=a.getSelection(),g=e.getRanges()[0];e.isCollapsed()&&(g=g[38>b?"getPreviousEditableNode":"getNextEditableNode"]())&&g.type==CKEDITOR.NODE_ELEMENT&&"false"==g.getAttribute("contenteditable")&&(e=e.getStartElement(),!e.isBlockBoundary()||""!==(void 0===e.$.textContent?
e.$.innerText:e.$.textContent)||8!==b&&46!==b||(e.remove(),a.fire("saveSnapshot")),a.getSelection().fake(g),d.data.preventDefault(),d.cancel())}}}function t(a){for(var c=0;c<a.length;c++){var d=a[c];d.getCommonAncestor().isReadOnly()&&a.splice(c,1);if(!d.collapsed){if(d.startContainer.isReadOnly())for(var b=d.startContainer,e;b&&!((e=b.type==CKEDITOR.NODE_ELEMENT)&&b.is("body")||!b.isReadOnly());)e&&"false"==b.getAttribute("contentEditable")&&d.setStartAfter(b),b=b.getParent();b=d.startContainer;
e=d.endContainer;var g=d.startOffset,f=d.endOffset,k=d.clone();b&&b.type==CKEDITOR.NODE_TEXT&&(g>=b.getLength()?k.setStartAfter(b):k.setStartBefore(b));e&&e.type==CKEDITOR.NODE_TEXT&&(f?k.setEndAfter(e):k.setEndBefore(e));b=new CKEDITOR.dom.walker(k);b.evaluator=function(b){if(b.type==CKEDITOR.NODE_ELEMENT&&b.isReadOnly()){var e=d.clone();d.setEndBefore(b);d.collapsed&&a.splice(c--,1);b.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(b),e.collapsed||a.splice(c+1,0,e));return!0}return!1};
b.next()}}return a}var v="function"!=typeof window.getSelection,z=1,p=CKEDITOR.tools.repeat("​",7),y=new RegExp(p+"( )?","g"),q,u,B,A=CKEDITOR.dom.walker.invisible(1),C=function(){function a(c){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,c)&&a.editor.getSelection().selectRanges([d]);return!1}}function c(a){return function(c){var d=c.editor,b=d.createRange(),e;if(!d.readOnly)return(e=b.moveToClosestEditablePosition(c.selected,a))||(e=b.moveToClosestEditablePosition(c.selected,
!a)),e&&d.getSelection().selectRanges([b]),d.fire("saveSnapshot"),c.selected.remove(),e||(b.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([b])),d.fire("saveSnapshot"),!1}}var d=a(),b=a(1);return{37:d,38:d,39:b,40:b,8:c(),46:c(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom",function(){function a(){t=new CKEDITOR.dom.selection(d.getSelection());t.lock()}function c(){f.removeListener("mouseup",
c);w.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==g.$&&d.select()}function b(a){var c,d;c=(c=this.document.getActive())?"input"===c.getName()||"textarea"===c.getName():!1;c||(c=this.getSelection(1),(d=e(c))&&!d.equals(k)&&(c.selectElement(d),a.data.preventDefault()))}function e(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},
!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var g=d.document,f=CKEDITOR.document,k=d.editable(),h=g.getBody(),w=g.getDocumentElement(),q=k.isInline(),p,t;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==p&&(a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=d.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(p&&(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)){p=d._.previousActive&&d._.previousActive.equals(g.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=k.$.scrollTop;CKEDITOR.env.webkit&&p&&a&&(k.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(p);p=0},null,null,-1);k.attachListener(k,"mousedown",function(){p=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||q)v?k.attachListener(k,"beforedeactivate",a,null,null,-1):k.attachListener(d,"selectionCheck",a,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit||CKEDITOR.env.gecko?
"focusout":"blur",function(){var a=t&&(t.isFake||2>t.getRanges().length);CKEDITOR.env.gecko&&!q&&a||(d.lockSelection(t),p=1)},null,null,-1),k.attachListener(k,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!q){var z;k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(z=d.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&z&&(d.document.$.documentElement.scrollLeft=z.x,d.document.$.documentElement.scrollTop=
z.y);z=null});if("BackCompat"!=g.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var u,y;w.on("mousedown",function(a){function c(a){a=a.data.$;if(u){var d=h.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(b){}u.setEndPoint(0>y.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);u.select()}}function d(){w.removeListener("mousemove",c);f.removeListener("mouseup",d);w.removeListener("mouseup",d);u.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<w.$.clientHeight&&
a.$.x<w.$.clientWidth){u=h.$.createTextRange();try{u.moveToPoint(a.$.clientX,a.$.clientY)}catch(b){}y=u.duplicate();w.on("mousemove",c);f.on("mouseup",d);w.on("mouseup",d)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)w.on("mousedown",function(a){a.data.getTarget().is("html")&&(f.on("mouseup",c),w.on("mouseup",c))})}}k.attachListener(k,"selectionchange",m,d);k.attachListener(k,"keyup",l,d);k.attachListener(k,"touchstart",l,d);k.attachListener(k,"touchend",l,d);CKEDITOR.env.ie&&k.attachListener(k,
"keydown",b,d);if(q&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var x;k.attachListener(k,"mousedown",function(){x=1});k.attachListener(g.getDocumentElement(),"mouseup",function(){x&&l.call(d);x=0})}else k.attachListener(CKEDITOR.env.ie?k:g.getDocumentElement(),"mouseup",l,d);CKEDITOR.env.webkit&&k.attachListener(g,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:k.hasFocus&&n(k)}},null,null,-1);k.attachListener(k,"keydown",
r(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&c()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",c,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),c=d.editable().getLast(a);c&&c.hasAttribute("data-cke-hidden-sel")&&(c.remove(),CKEDITOR.env.gecko&&
(a=d.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);d.on("key",function(a){if("wysiwyg"==d.mode){var c=d.getSelection();if(c.isFake){var b=C[a.data.keyCode];if(b)return b({editor:d,selected:c.getSelectedElement(),selection:c,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var c=a.editor;c.on("selectionChange",function(){var a=c.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?
(n(a),a.editor.fire("selectionCheck")):d.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",function(){n(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&
"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var c=this.getSelection();return c&&c.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var c=this._.savedSelection;return c?(c.unlock(a),delete this._.savedSelection,
!0):!1};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 a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=
function(a){if(a instanceof CKEDITOR.dom.selection){var c=a;a=a.root}var d=a instanceof CKEDITOR.dom.element;this.rev=c?c.rev:z++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(c)return CKEDITOR.tools.extend(this._.cache,c._.cache),this.isFake=c.isFake,this.isLocked=c.isLocked,this;a=this.getNative();var b,e;if(a)if(a.getRangeAt)b=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);
else{try{e=a.createRange()}catch(g){}b=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!b||b.type!=CKEDITOR.NODE_ELEMENT&&b.type!=CKEDITOR.NODE_TEXT||!this.root.equals(b)&&!this.root.contains(b))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var E={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:w,_createFillingCharSequenceNode:e,FILLING_CHAR_SEQUENCE:p});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=v?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:v?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE;
try{var d=this.getNative(),b=d.type;"Text"==b&&(c=CKEDITOR.SELECTION_TEXT);"Control"==b&&(c=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=c}:function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)c=CKEDITOR.SELECTION_NONE;else if(1==d.rangeCount){var d=d.getRangeAt(0),b=d.startContainer;b==d.endContainer&&1==b.nodeType&&1==d.endOffset-d.startOffset&&E[b.childNodes[d.startOffset].nodeName.toLowerCase()]&&
(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=v?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,d){c=c.duplicate();c.collapse(d);var b=c.parentElement();if(!b.hasChildNodes())return{container:b,offset:0};for(var e=b.children,g,f,k=c.duplicate(),m=0,l=e.length-1,h=-1,n,w;m<=l;)if(h=Math.floor((m+l)/2),g=e[h],k.moveToElementText(g),n=k.compareEndPoints("StartToStart",c),0<n)l=h-1;else if(0>n)m=h+1;else return{container:b,offset:a(g)};
if(-1==h||h==e.length-1&&0>n){k.moveToElementText(b);k.setEndPoint("StartToStart",c);k=k.text.replace(/(\r\n|\r)/g,"\n").length;e=b.childNodes;if(!k)return g=e[e.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:b,offset:e.length}:{container:g,offset:g.nodeValue.length};for(b=e.length;0<k&&0<b;)f=e[--b],f.nodeType==CKEDITOR.NODE_TEXT&&(w=f,k-=f.nodeValue.length);return{container:w,offset:-k}}k.collapse(0<n?!0:!1);k.setEndPoint(0<n?"StartToStart":"EndToStart",c);k=k.text.replace(/(\r\n|\r)/g,"\n").length;
if(!k)return{container:b,offset:a(g)+(0<n?0:1)};for(;0<k;)try{f=g[0<n?"previousSibling":"nextSibling"],f.nodeType==CKEDITOR.NODE_TEXT&&(k-=f.nodeValue.length,w=f),g=f}catch(p){return{container:b,offset:a(g)}}return{container:w,offset:0<n?-k:w.nodeValue.length+k}};return function(){var a=this.getNative(),d=a&&a.createRange(),b=this.getType();if(!a)return[];if(b==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),b=c(d,!0),a.setStart(new CKEDITOR.dom.node(b.container),b.offset),b=c(d),
a.setEnd(new CKEDITOR.dom.node(b.container),b.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(b==CKEDITOR.SELECTION_ELEMENT){for(var b=[],e=0;e<d.length;e++){for(var g=d.item(e),f=g.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<f.childNodes.length&&f.childNodes[k]!=g;k++);a.setStart(new CKEDITOR.dom.node(f),k);a.setEnd(new CKEDITOR.dom.node(f),k+1);b.push(a)}return b}return[]}}():function(){var a=
[],c,d=this.getNative();if(!d)return a;for(var b=0;b<d.rangeCount;b++){var e=d.getRangeAt(b);c=new CKEDITOR.dom.range(this.root);c.setStart(new CKEDITOR.dom.node(e.startContainer),e.startOffset);c.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(c)}return a};return function(c){var d=this._.cache,b=d.ranges;b||(d.ranges=b=new CKEDITOR.dom.rangeList(a.call(this)));return c?t(new CKEDITOR.dom.rangeList(b.slice())):b}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;
var c;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var d=this.getRanges()[0];if(d){if(d.collapsed)c=d.startContainer,c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent());else{for(d.optimize();c=d.startContainer,d.startOffset==(c.getChildCount?c.getChildCount():c.getLength())&&!c.isBlockBoundary();)d.setStartAfter(c);c=d.startContainer;if(c.type!=CKEDITOR.NODE_ELEMENT)return c.getParent();if((c=c.getChild(d.startOffset))&&c.type==
CKEDITOR.NODE_ELEMENT)for(d=c.getFirst();d&&d.type==CKEDITOR.NODE_ELEMENT;)c=d,d=d.getFirst();else c=d.startContainer}c=c.$}}return a.startElement=c?new CKEDITOR.dom.element(c):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var c=this,d=CKEDITOR.tools.tryThese(function(){return c.getNative().createRange().item(0)},function(){for(var a=c.getRanges()[0].clone(),d,b,e=2;e&&!((d=a.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&E[d.getName()]&&
(b=d));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return b&&b.$});return a.selectedElement=d?new CKEDITOR.dom.element(d):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var c=this.getNative(),c=v?"Control"==c.type?"":c.createRange().text:c.toString();return a.selectedText=c},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var c=
this.getSelectedElement(),d=this.getRanges(),b=this.isFake;this.isLocked=0;this.reset();a&&(a=c||d[0]&&d[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&h(d)?g.call(this,d):b?this.fake(c):c&&2>d.length?this.selectElement(c):this.selectRanges(d))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;
var c=a._.hiddenSelectionContainer;if(c){var d=a.checkDirty();a.fire("lockSnapshot");c.remove();a.fire("unlockSnapshot");!d&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=z++},selectElement:function(a){var c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(a){var c=this.root.editor,b=c&&c._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,f,k=0;k<a.length;++k)f=
a[k],f.endContainer.equals(b)&&(f.endOffset=Math.min(f.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var m=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();m&&!m.equals(this.root)&&m.focus()}else{var l;a:{var w,p;if(1==a.length&&!(p=a[0]).collapsed&&(l=p.getEnclosedNode())&&l.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(w=p.getEnclosedNode())&&w.type==CKEDITOR.NODE_ELEMENT&&(l=w),"false"==l.getAttribute("contenteditable")))break a;
l=void 0}if(l)this.fake(l);else if(c&&c.plugins.tableselection&&c.plugins.tableselection.isSupportedEnvironment(c)&&h(a)&&!q&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))g.call(this,a);else{if(v){w=CKEDITOR.dom.walker.whitespaces(!0);l=/\ufeff|\u00a0/;p={table:1,tbody:1,tr:1};1<a.length&&(c=a[a.length-1],a[0].setEnd(c.endContainer,c.endOffset));c=a[0];a=c.collapsed;var t,z,u;if((b=c.getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in E&&(!b.is("a")||
!b.getText()))try{u=b.$.createControlRange();u.addElement(b.$);u.select();return}catch(y){}if(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in p||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in p)c.shrink(CKEDITOR.NODE_ELEMENT,!0),a=c.collapsed;u=c.createBookmark();p=u.startNode;a||(m=u.endNode);u=c.document.$.body.createTextRange();u.moveToElementText(p.$);u.moveStart("character",1);m?(l=c.document.$.body.createTextRange(),l.moveToElementText(m.$),
u.setEndPoint("EndToEnd",l),u.moveEnd("character",-1)):(t=p.getNext(w),z=p.hasAscendant("pre"),t=!(t&&t.getText&&t.getText().match(l))&&(z||!p.hasPrevious()||p.getPrevious().is&&p.getPrevious().is("br")),z=c.document.createElement("span"),z.setHtml("\x26#65279;"),z.insertBefore(p),t&&c.document.createText("﻿").insertBefore(p));c.setStartBefore(p);p.remove();a?(t?(u.moveStart("character",-1),u.select(),c.document.$.selection.clear()):u.select(),c.moveToPosition(z,CKEDITOR.POSITION_BEFORE_START),z.remove()):
(c.setEndBefore(m),m.remove(),u.select())}else{m=this.getNative();if(!m)return;this.removeAllRanges();for(u=0;u<a.length;u++){if(u<a.length-1&&(t=a[u],z=a[u+1],l=t.clone(),l.setStart(t.endContainer,t.endOffset),l.setEnd(z.startContainer,z.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),c=l.getCommonAncestor(),l=l.getEnclosedNode(),c.isReadOnly()||l&&l.isReadOnly()))){z.setStart(t.startContainer,t.startOffset);a.splice(u--,1);continue}c=a[u];z=this.document.$.createRange();c.collapsed&&
d(c)&&(l=e(this.root),c.insertNode(l),(t=l.getNext())&&!l.getPrevious()&&t.type==CKEDITOR.NODE_ELEMENT&&"br"==t.getName()?(n(this.root),c.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START)):c.moveToPosition(l,CKEDITOR.POSITION_AFTER_END));z.setStart(c.startContainer.$,c.startOffset);try{z.setEnd(c.endContainer.$,c.endOffset)}catch(x){if(0<=x.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))c.collapse(1),z.setEnd(c.endContainer.$,c.endOffset);else throw x;}m.addRange(z)}}this.reset();this.root.fire("selectionchange")}}},
fake:function(a,c){var d=this.root.editor;void 0===c&&a.hasAttribute("aria-label")&&(c=a.getAttribute("aria-label"));this.reset();x(d,c);var b=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);b.ranges=new CKEDITOR.dom.rangeList(e);b.selectedElement=b.startElement=a;b.type=CKEDITOR.SELECTION_ELEMENT;b.selectedText=b.nativeSel=null;this.isFake=1;this.rev=z++;d._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();
a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return h(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var c=[],d,b=0;b<a.length;b++){var e=new CKEDITOR.dom.range(this.root);
e.moveToBookmark(a[b]);c.push(e)}a.isFake&&(d=h(c)?c[0]._getTableElement():c[0].getEnclosedNode(),d&&d.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(c)?this.fake(d):this.selectRanges(c);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.getType()!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=
CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[v?"empty":"removeAllRanges"]()}catch(c){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function b(a,c){for(var d,b;(a=a.getParent())&&!a.equals(c);)if(a.getAttribute("data-nostyle"))d=a;else if(!b){var e=a.getAttribute("contentEditable");"false"==e?d=a:"true"==e&&(b=1)}return d}function h(a,c,d,b){return(a.getPosition(c)|b)==b&&(!d.childRule||d.childRule(a))}function f(a){var c=
a.document;if(a.collapsed)c=z(this,c),a.insertNode(c),a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var d=this.element,e=this._.definition,k,m=e.ignoreReadonly,l=m||e.includeReadonly;null==l&&(l=a.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[d];n||(k=!0,n=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var w=a.createBookmark(),p=w.startNode,q=w.endNode,t=p,v;if(!m){var u=a.getCommonAncestor(),m=b(p,u),u=b(q,u);m&&(t=m.getNextSourceNode(!0));u&&(q=u)}for(t.getPosition(q)==
CKEDITOR.POSITION_FOLLOWING&&(t=0);t;){m=!1;if(t.equals(q))t=null,m=!0;else{var y=t.type==CKEDITOR.NODE_ELEMENT?t.getName():null,u=y&&"false"==t.getAttribute("contentEditable"),x=y&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,y),x=y&&(t.getAttribute("data-nostyle")||x);if(y&&t.data("cke-bookmark")||t.type===CKEDITOR.NODE_COMMENT){t=t.getNextSourceNode(!0);continue}if(u&&l&&CKEDITOR.dtd.$block[y])for(var B=t,A=g(B),C=void 0,N=A.length,Q=0,B=N&&new CKEDITOR.dom.range(B.getDocument());Q<
N;++Q){var C=A[Q],ea=CKEDITOR.filter.instances[C.data("cke-filter")];if(ea?ea.check(this):1)B.selectNodeContents(C),f.call(this,B)}A=y?!n[y]||x?0:u&&!l?0:h(t,q,e,O):1;if(A)if(C=t.getParent(),A=e,N=d,Q=k,!C||!(C.getDtd()||CKEDITOR.dtd.span)[N]&&!Q||A.parentRule&&!A.parentRule(C))m=!0;else{if(v||y&&CKEDITOR.dtd.$removeEmpty[y]&&(t.getPosition(q)|O)!=O||(v=a.clone(),v.setStartBefore(t)),y=t.type,y==CKEDITOR.NODE_TEXT||u||y==CKEDITOR.NODE_ELEMENT&&!t.getChildCount()){for(var y=t,ia;(m=!y.getNext(L))&&
(ia=y.getParent(),n[ia.getName()])&&h(ia,p,e,I);)y=ia;v.setEndAfter(y)}}else m=!0;t=t.getNextSourceNode(x||u)}if(m&&v&&!v.collapsed){for(var m=z(this,c),u=m.hasAttributes(),x=v.getCommonAncestor(),y={},A={},C={},N={},ha,fa,E;m&&x;){if(x.getName()==d){for(ha in e.attributes)!N[ha]&&(E=x.getAttribute(fa))&&(m.getAttribute(ha)==E?A[ha]=1:N[ha]=1);for(fa in e.styles)!C[fa]&&(E=x.getStyle(fa))&&(m.getStyle(fa)==E?y[fa]=1:C[fa]=1)}x=x.getParent()}for(ha in A)m.removeAttribute(ha);for(fa in y)m.removeStyle(fa);
u&&!m.hasAttributes()&&(m=null);m?(v.extractContents().appendTo(m),v.insertNode(m),r.call(this,m),m.mergeSiblings(),CKEDITOR.env.ie||m.$.normalize()):(m=new CKEDITOR.dom.element("span"),v.extractContents().appendTo(m),v.insertNode(m),r.call(this,m),m.remove(!0));v=null}}a.moveToBookmark(w);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function a(a){function c(){for(var a=new CKEDITOR.dom.elementPath(b.getParent()),d=new CKEDITOR.dom.elementPath(h.getParent()),e=null,g=null,f=
0;f<a.elements.length;f++){var k=a.elements[f];if(k==a.block||k==a.blockLimit)break;n.checkElementRemovable(k,!0)&&(e=k)}for(f=0;f<d.elements.length;f++){k=d.elements[f];if(k==d.block||k==d.blockLimit)break;n.checkElementRemovable(k,!0)&&(g=k)}g&&h.breakParent(g);e&&b.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var d=a.createBookmark(),b=d.startNode,e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var g=new CKEDITOR.dom.elementPath(b.getParent(),a.root),f,k=0,m;k<g.elements.length&&
(m=g.elements[k])&&m!=g.block&&m!=g.blockLimit;k++)if(this.checkElementRemovable(m)){var l;!e&&a.collapsed&&(a.checkBoundaryOfElement(m,CKEDITOR.END)||(l=a.checkBoundaryOfElement(m,CKEDITOR.START)))?(f=m,f.match=l?"start":"end"):(m.mergeSiblings(),m.is(this.element)?x.call(this,m):t(m,q(this)[m.getName()]))}if(f){e=b;for(k=0;;k++){m=g.elements[k];if(m.equals(f))break;else if(m.match)continue;else m=m.clone();m.append(e);e=m}e["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var h=d.endNode,
n=this;c();for(g=b;!g.equals(h);)f=g.getNextSourceNode(),g.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(g)&&(g.getName()==this.element?x.call(this,g):t(g,q(this)[g.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(b)&&(c(),f=b.getNext())),g=f}a.moveToBookmark(d);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function g(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function m(a){var c=a.getEnclosedNode()||a.getCommonAncestor(!1,
!0);(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1))&&!a.isReadOnly()&&p(a,this)}function l(a){var c=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1)){var c=this._.definition,d=c.attributes;if(d)for(var b in d)a.removeAttribute(b,d[b]);if(c.styles)for(var e in c.styles)c.styles.hasOwnProperty(e)&&a.removeStyle(e)}}function k(a){var c=a.createBookmark(!0),b=a.createIterator();b.enforceRealBlocks=!0;this._.enterMode&&(b.enlargeBr=
this._.enterMode!=CKEDITOR.ENTER_BR);for(var e,g=a.document,f;e=b.getNextParagraph();)!e.isReadOnly()&&(b.activeFilter?b.activeFilter.check(this):1)&&(f=z(this,g,e),d(e,f));a.moveToBookmark(c)}function c(a){var c=a.createBookmark(1),b=a.createIterator();b.enforceRealBlocks=!0;b.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var e,g;e=b.getNextParagraph();)this.checkElementRemovable(e)&&(e.is("pre")?((g=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))&&e.copyAttributes(g),d(e,g)):x.call(this,e));a.moveToBookmark(c)}function d(a,c){var d=!c;d&&(c=a.getDocument().createElement("div"),a.copyAttributes(c));var b=c&&c.is("pre"),g=a.is("pre"),f=!b&&g;if(b&&!g){g=c;(f=a.getBogus())&&f.remove();f=a.getHtml();f=n(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+|&nbsp;)/g," ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var k=a.getDocument().createElement("div");
k.append(g);g.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";g.copyAttributes(k.getFirst());g=k.getFirst().remove()}else g.setHtml(f);c=g}else f?c=w(d?[a.getHtml()]:e(a),c):a.moveChildren(c);c.replace(a);if(b){var d=c,m;(m=d.getPrevious(D))&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("pre")&&(b=n(m.getHtml(),/\n$/,"")+"\n\n"+n(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+b+"\x3c/pre\x3e":d.setHtml(b),m.remove())}else d&&v(c)}function e(a){var c=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
function(a,c,d){return c+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,d){c.push(d)});return c}function n(a,c,d){var b="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,c,d){c&&(b=c);d&&(e=d);return""});return b+a.replace(c,d)+e}function w(a,c){var d;1<a.length&&(d=new CKEDITOR.dom.documentFragment(c.getDocument()));for(var b=0;b<a.length;b++){var e=a[b],e=e.replace(/(\r\n|\r)/g,"\n"),e=n(e,/^[ \t]*\n/,
""),e=n(e,/\n$/,""),e=n(e,/^[ \t]+|[ \t]+$/g,function(a,c){return 1==a.length?"\x26nbsp;":c?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(d){var g=c.clone();g.setHtml(e);d.append(g)}else c.setHtml(e)}return d||c}function x(a,c){var d=this._.definition,b=d.attributes,d=d.styles,e=q(this)[a.getName()],g=CKEDITOR.tools.isEmpty(b)&&
CKEDITOR.tools.isEmpty(d),f;for(f in b)if("class"!=f&&!this._.definition.fullMatch||a.getAttribute(f)==u(f,b[f]))c&&"data-"==f.slice(0,5)||(g=a.hasAttribute(f),a.removeAttribute(f));for(var k in d)this._.definition.fullMatch&&a.getStyle(k)!=u(k,d[k],!0)||(g=g||!!a.getStyle(k),a.removeStyle(k));t(a,e,C[a.getName()]);g&&(this._.definition.alwaysRemoveElement?v(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?v(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))}function r(a){for(var c=q(this),d=a.getElementsByTag(this.element),b,e=d.count();0<=--e;)b=d.getItem(e),b.isReadOnly()||x.call(this,b,!0);for(var g in c)if(g!=this.element)for(d=a.getElementsByTag(g),e=d.count()-1;0<=e;e--)b=d.getItem(e),b.isReadOnly()||t(b,c[g])}function t(a,c,d){if(c=c&&c.attributes)for(var b=0;b<c.length;b++){var e=c[b][0],g;if(g=a.getAttribute(e)){var f=c[b][1];(null===f||f.test&&f.test(g)||"string"==typeof f&&g==f)&&a.removeAttribute(e)}}d||v(a)}function v(a,c){if(!a.hasAttributes()||
c)if(CKEDITOR.dtd.$block[a.getName()]){var d=a.getPrevious(D),b=a.getNext(D);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br",1);!b||b.type!=CKEDITOR.NODE_TEXT&&b.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else d=a.getFirst(),b=a.getLast(),a.remove(!0),d&&(d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings(),b&&!d.equals(b)&&b.type==CKEDITOR.NODE_ELEMENT&&b.mergeSiblings())}function z(a,c,d){var b;b=a.element;"*"==b&&(b="span");b=new CKEDITOR.dom.element(b,c);d&&d.copyAttributes(b);
b=p(b,a);c.getCustomData("doc_processing_style")&&b.hasAttribute("id")?b.removeAttribute("id"):c.setCustomData("doc_processing_style",1);return b}function p(a,c){var d=c._.definition,b=d.attributes,d=CKEDITOR.style.getStyleText(d);if(b)for(var e in b)a.setAttribute(e,b[e]);d&&a.setAttribute("style",d);a.getDocument().removeCustomData("doc_processing_style");return a}function y(a,c){for(var d in a)a[d]=a[d].replace(G,function(a,d){return c[d]})}function q(a){if(a._.overrides)return a._.overrides;var c=
a._.overrides={},d=a._.definition.overrides;if(d){CKEDITOR.tools.isArray(d)||(d=[d]);for(var b=0;b<d.length;b++){var e=d[b],g,f;"string"==typeof e?g=e.toLowerCase():(g=e.element?e.element.toLowerCase():a.element,f=e.attributes);e=c[g]||(c[g]={});if(f){var e=e.attributes=e.attributes||[],k;for(k in f)e.push([k.toLowerCase(),f[k]])}}}return c}function u(a,c,d){var b=new CKEDITOR.dom.element("span");b[d?"setStyle":"setAttribute"](a,c);return b[d?"getStyle":"getAttribute"](a)}function B(a,c){function d(a,
c){return"font-family"==c.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof c&&(c=CKEDITOR.tools.parseCssText(c,!0));for(var b in a)if(!(b in c)||d(c[b],b)!=d(a[b],b)&&"inherit"!=a[b]&&"inherit"!=c[b])return!1;return!0}function A(a,c,d){var b=a.getRanges();c=c?this.removeFromRange:this.applyToRange;for(var e,g=b.createIterator();e=g.getNextRange();)c.call(this,e,d);a.selectRanges(b)}var C={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},E={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},F=/\s*(?:;\s*|$)/,G=/#\((.+?)\)/g,L=CKEDITOR.dom.walker.bookmark(0,1),D=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,c){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);
var d=a.attributes;d&&d.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(d.style)),delete d.style);c&&(a=CKEDITOR.tools.clone(a),y(a.attributes,c),y(a.styles,c));d=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(C[d]?CKEDITOR.STYLE_BLOCK:E[d]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof
CKEDITOR.dom.document)return A.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);A.call(this,a.getSelection(),0,a);this._.enterMode=c}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return A.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);A.call(this,a.getSelection(),1,a);this._.enterMode=c}},applyToRange:function(a){this.applyToRange=
this.type==CKEDITOR.STYLE_INLINE?f:this.type==CKEDITOR.STYLE_BLOCK?k:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(d){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?a:this.type==CKEDITOR.STYLE_BLOCK?c:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.removeFromRange(d)},applyToObject:function(a){p(a,this)},checkActive:function(a,c){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,c);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var d=
a.elements,b=0,e;b<d.length;b++)if(e=d[b],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var g=e.getName();if(!("string"==typeof this.element?g==this.element:g in this.element))continue}if(this.checkElementRemovable(e,!0,c))return!0}}return!1},checkApplicable:function(a,c,d){c&&c instanceof CKEDITOR.filter&&(d=c);if(d&&!d.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},
checkElementMatch:function(a,c){var d=this._.definition;if(!a||!d.ignoreReadonly&&a.isReadOnly())return!1;var b=a.getName();if("string"==typeof this.element?b==this.element:b in this.element){if(!c&&!a.hasAttributes())return!0;if(b=d._AC)d=b;else{var b={},e=0,g=d.attributes;if(g)for(var f in g)e++,b[f]=g[f];if(f=CKEDITOR.style.getStyleText(d))b.style||e++,b.style=f;b._length=e;d=d._AC=b}if(d._length){for(var k in d)if("_length"!=k)if(b=a.getAttribute(k)||"","style"==k?B(d[k],b):d[k]==b){if(!c)return!0}else if(c)return!1;
if(c)return!0}else return!0}return!1},checkElementRemovable:function(a,c,d){if(this.checkElementMatch(a,c,d))return!0;if(c=q(this)[a.getName()]){var b;if(!(c=c.attributes))return!0;for(d=0;d<c.length;d++)if(b=c[d][0],b=a.getAttribute(b)){var e=c[d][1];if(null===e)return!0;if("string"==typeof e){if(b==e)return!0}else if(e.test(b))return!0}}return!1},buildPreview:function(a){var c=this._.definition,d=[],b=c.element;"bdo"==b&&(b="span");var d=["\x3c",b],e=c.attributes;if(e)for(var g in e)d.push(" ",
g,'\x3d"',e[g],'"');(e=CKEDITOR.style.getStyleText(c))&&d.push(' style\x3d"',e,'"');d.push("\x3e",a||c.name,"\x3c/",b,"\x3e");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var c=a._ST;if(c)return c;var c=a.styles,d=a.attributes&&a.attributes.style||"",b="";d.length&&(d=d.replace(F,";"));for(var e in c){var g=c[e],f=(e+":"+g).replace(F,";");"inherit"==g?b+=f:d+=f}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,!0));return a._ST=d+b};CKEDITOR.style.customHandlers=
{};CKEDITOR.style.unstylableElements=[];CKEDITOR.style.addCustomHandler=function(a){var c=function(a){this._={definition:a};this.setup&&this.setup(a)};c.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=c};var O=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),
CKEDITOR.styleCommand=function(b,h){this.requiredContent=this.allowedContent=this.style=b;CKEDITOR.tools.extend(this,h,!0)},CKEDITOR.styleCommand.prototype.exec=function(b){b.focus();this.state==CKEDITOR.TRISTATE_OFF?b.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&b.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(b,h,f){CKEDITOR.stylesSet.addExternal(b,
h,"");CKEDITOR.stylesSet.load(b,f)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(b,h){var f=this._.styleStateChangeCallbacks;f||(f=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var b=0;b<f.length;b++){var m=f[b],l=m.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;m.fn.call(this,l)}}));f.push({style:b,fn:h})},applyStyle:function(b){b.apply(this)},removeStyle:function(b){b.remove(this)},getStylesSet:function(b){if(this._.stylesDefinitions)b(this._.stylesDefinitions);
else{var h=this,f=h.config.stylesCombo_stylesSet||h.config.stylesSet;if(!1===f)b(null);else if(f instanceof Array)h._.stylesDefinitions=f,b(f);else{f||(f="default");var f=f.split(":"),a=f[0];CKEDITOR.stylesSet.addExternal(a,f[1]?f.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(a,function(g){h._.stylesDefinitions=g[a];b(h._.stylesDefinitions)})}}}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var b=CKEDITOR.getUrl("vendor/promise.js");if("function"===
typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([b],function(b){CKEDITOR.tools.promise=b});CKEDITOR.scriptLoader.load(b,function(h){if(!h)return CKEDITOR.error("no-vendor-lib",{path:b});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}}(),function(){function b(a,b,m){a.once("selectionCheck",function(a){if(!h){var k=a.data.getRanges()[0];m.equals(k)?a.cancel():b.equals(k)&&(f=!0)}},null,null,-1)}var h=!0,f=!1;CKEDITOR.dom.selection.setupEditorOptimization=
function(a){a.on("selectionCheck",function(a){a.data&&!f&&a.data.optimizeInElementEnds();f=!1});a.on("contentDom",function(){var b=a.editable();b&&(b.attachListener(b,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),b.attachListener(b,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var a=this.getRanges()[0],g=this.root.editor,f;if(this.root.editor._.shiftPressed||this.isFake||a.isCollapsed||a.startContainer.equals(a.endContainer))f=
!1;else if(0===a.endOffset)f=!0;else{f=a.startContainer.type===CKEDITOR.NODE_TEXT;var l=a.endContainer.type===CKEDITOR.NODE_TEXT,k=f?a.startContainer.getLength():a.startContainer.getChildCount();f=a.startOffset===k||f^l}f&&(f=a.clone(),a.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),h=!1,b(g,a,f),a.select(),h=!0)}}(),function(){function b(a,b){f(a)?a=Math.round(b*(parseFloat(a)/100)):"string"===typeof a&&a.match(/^\d+$/gm)&&(a=parseInt(a,10));return a}function h(a,b){f(a)?a=b*(parseFloat(a)/
100):"string"===typeof a&&a.match(/^\d?\.\d+/gm)&&(a=parseFloat(a));return a}function f(a){return"string"===typeof a&&a.match(/^((\d*\.\d+)|(\d+))%{1}$/gm)}function a(a,b,g){return!isNaN(a)&&a>=b&&a<=g}function g(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,b){this._.initialColorCode=a;this._.defaultValue=b;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,
this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue;var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",a[0],a[1],
a[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 a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]);return this._.formatHslString("hsl",a[0],a[1],a[2])},getHsla:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.rgbToHsl(this._.red,this._.green,
this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,b,g,c){return CKEDITOR.tools.array.map([a,b,g],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-c*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,b,f,c){a="#"+g(a)+g(b)+g(f);void 0!==c&&(a+=g(c));return a.toUpperCase()},
formatRgbString:function(a,b,g,c,d){b=[b,g,c];void 0!==d&&b.push(d);return a+"("+b.join(",")+")"},formatHslString:function(a,b,g,c,d){return a+"("+b+","+g+"%,"+c+"%"+(void 0!==d?","+d:"")+")"},parseInput:function(a){if("string"!==typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var b=this._.matchStringToNamedColor(a);b&&(a=b);var b=this._.extractColorChannelsFromHex(a),g=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=b||g||a)?(this._.red=a[0],this._.green=
a[1],this._.blue=a[2],this._.alpha=a[3]):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||null},extractColorChannelsFromHex:function(a){a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var b=1;a[7]&&a[8]&&(b=parseInt(a[7]+a[8],16),b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,b=Number(b.toFixed(1)));
return[parseInt(a[1]+a[2],16),parseInt(a[3]+a[4],16),parseInt(a[5]+a[6],16),b]},extractColorChannelsFromRgba:function(a){var g=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!g||(a=0===a.indexOf("rgba"))&&4!==g.length||!a&&3!==g.length)return null;var f=b(g[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),c=b(g[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),d=b(g[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),e=1;a&&(e=h(g[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));
return this._.areColorChannelsValid(f,c,d,e)?[f,c,d,e]:null},extractColorChannelsFromHsla:function(a){var g=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.hslRegExp);if(!g||(a=0===a.indexOf("hsla"))&&4!==g.length||!a&&3!==g.length)return null;var f=b(g[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),c=h(g[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),d=h(g[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),e=1,f=this._.hslToRgb(f,c,d);a&&(e=h(g[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));
f.push(e);return this._.areColorChannelsValid(f[0],f[1],f[2],f[3])?f:null},hex3ToHex6:function(a){a=a.split("");return"#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]},extractColorChannelsByPattern:function(a,b){var g=a.match(b);if(!g)return null;g=g[2].split(",");return g=CKEDITOR.tools.array.map(g,function(a){return CKEDITOR.tools.trim(a)})},areColorChannelsValid:function(b,g,f,c){return a(b,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(g,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(f,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&
a(c,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},hslToRgb:function(a,b,g){var c=function(c){var e=(c+a/30)%12;c=b*Math.min(g,1-g);e=Math.min(e-3,9-e,1);e=Math.max(-1,e);return Math.round((g-c*e)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[c(0),c(8),c(4)]},rgbToHsl:function(a,b,g){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var c=g/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,d=Math.max(a,b,c),e=Math.min(a,b,c);g=d-e;var f=0;switch(d){case a:f=
(b-c)/g%6;break;case b:f=(c-a)/g+2;break;case c:f=(a-b)/g+4}a=0===g?0:60*f;b=(d+e)/2;d=0;1!==b&&0!==b&&(d=g/(1-Math.abs(2*b-1)));a=Math.round(a);d=100*Math.round(d);return[a,d,100*b]}},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(b,h){"string"==typeof b&&(b=(h?h.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)},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"}}),"use strict",function(){var b={},h={},f;for(f in CKEDITOR.dtd.$blockLimit)f in CKEDITOR.dtd.$list||(b[f]=1);for(f in CKEDITOR.dtd.$block)f in CKEDITOR.dtd.$blockLimit||f in CKEDITOR.dtd.$empty||
(h[f]=1);CKEDITOR.dom.elementPath=function(a,g){var f=null,l=null,k=[],c=a,d;g=g||a.getDocument().getBody();c||(c=g);do if(c.type==CKEDITOR.NODE_ELEMENT){k.push(c);if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)||"false"==c.getAttribute("contenteditable")))continue;if(c.equals(g))break;if(!l&&(d=c.getName(),"true"==c.getAttribute("contenteditable")?l=c:!f&&h[d]&&(f=c),b[d])){if(d=!f&&"div"==d){a:{d=c.getChildren();for(var e=0,n=d.count();e<n;e++){var w=d.getItem(e);if(w.type==
CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[w.getName()]){d=!0;break a}}d=!1}d=!d}d?f=c:l=c}}while(c=c.getParent());l||(l=g);this.block=f;this.blockLimit=l;this.root=g;this.elements=k}}(),CKEDITOR.dom.elementPath.prototype={compare:function(b){var h=this.elements;b=b&&b.elements;if(!b||h.length!=b.length)return!1;for(var f=0;f<h.length;f++)if(!h[f].equals(b[f]))return!1;return!0},contains:function(b,h,f){var a=0,g;"string"==typeof b&&(g=function(a){return a.getName()==b});b instanceof CKEDITOR.dom.element?
g=function(a){return a.equals(b)}:CKEDITOR.tools.isArray(b)?g=function(a){return-1<CKEDITOR.tools.indexOf(b,a.getName())}:"function"==typeof b?g=b:"object"==typeof b&&(g=function(a){return a.getName()in b});var m=this.elements,l=m.length;h&&(f?a+=1:--l);f&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;a<l;a++)if(g(m[a]))return m[a];return null},isContextFor:function(b){var h;return b in CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||
this.blockLimit,!!h.getDtd()[b]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(b,h){"string"==typeof b&&(b=(h?h.$:document).createTextNode(b));this.$=b},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(b){this.$.nodeValue=b},isEmpty:function(b){var h=
this.getText();b&&(h=CKEDITOR.tools.trim(h));return!h||h===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(b){var h=this.$.parentNode,f=h.childNodes.length,a=this.getLength(),g=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(b),g);h.childNodes.length==f&&(b>=a?(m=g.createText(""),m.insertAfter(this)):(b=g.createText(""),b.insertAfter(m),b.remove()));return m},substring:function(b,h){return"number"!=typeof h?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,h)}}),function(){function b(b,
a,g){var h=b.serializable,l=a[g?"endContainer":"startContainer"],k=g?"endOffset":"startOffset",c=h?a.document.getById(b.startNode):b.startNode;b=h?a.document.getById(b.endNode):b.endNode;l.equals(c.getPrevious())?(a.startOffset=a.startOffset-l.getLength()-b.getPrevious().getLength(),l=b.getNext()):l.equals(b.getPrevious())&&(a.startOffset-=l.getLength(),l=b.getNext());l.equals(c.getParent())&&a[k]++;l.equals(b.getParent())&&a[k]++;a[g?"endContainer":"startContainer"]=l;return a}CKEDITOR.dom.rangeList=
function(b){if(b instanceof CKEDITOR.dom.rangeList)return b;b?b instanceof CKEDITOR.dom.range&&(b=[b]):b=[];return CKEDITOR.tools.extend(b,h)};var h={createIterator:function(){var b=this,a=CKEDITOR.dom.walker.bookmark(),g=[],h;return{getNextRange:function(l){h=void 0===h?0:h+1;var k=b[h];if(k&&1<b.length){if(!h)for(var c=b.length-1;0<=c;c--)g.unshift(b[c].createBookmark(!0));if(l)for(var d=0;b[h+d+1];){var e=k.document;l=0;c=e.getById(g[d].endNode);for(e=e.getById(g[d+1].startNode);;){c=c.getNextSourceNode(!1);
if(e.equals(c))l=1;else if(a(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!l)break;d++}for(k.moveToBookmark(g.shift());d--;)c=b[++h],c.moveToBookmark(g.shift()),k.setEnd(c.endContainer,c.endOffset)}return k}}},createBookmarks:function(f){for(var a=[],g,h=0;h<this.length;h++){a.push(g=this[h].createBookmark(f,!0));for(var l=h+1;l<this.length;l++)this[l]=b(g,this[l]),this[l]=b(g,this[l],!0)}return a},createBookmarks2:function(b){for(var a=[],g=0;g<this.length;g++)a.push(this[g].createBookmark2(b));
return a},moveToBookmarks:function(b){for(var a=0;a<this.length;a++)this[a].moveToBookmark(b[a])}}}(),function(){function b(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(a){var c=CKEDITOR.skin["ua_"+a],g=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,c){return a>c?-1:1}),f=0,k;f<c.length;f++)if(k=c[f],g.ie&&(k.replace(/^ie/,"")==g.version||g.quirks&&"iequirks"==k)&&(k="ie"),g[k]){a+="_"+c[f];break}return CKEDITOR.getUrl(b()+
a+".css")}function f(a,c){m[a]||(CKEDITOR.document.appendStyleSheet(h(a)),m[a]=1);c&&c()}function a(a){var c=a.getById(l);c||(c=a.getHead().append("style"),c.setAttribute("id",l),c.setAttribute("type","text/css"));return c}function g(a,c,b){var g,f,k;if(CKEDITOR.env.webkit)for(c=c.split("}").slice(0,-1),f=0;f<c.length;f++)c[f]=c[f].split("{");for(var h=0;h<a.length;h++)if(CKEDITOR.env.webkit)for(f=0;f<c.length;f++){k=c[f][1];for(g=0;g<b.length;g++)k=k.replace(b[g][0],b[g][1]);a[h].$.sheet.addRule(c[f][0],
k)}else{k=c;for(g=0;g<b.length;g++)k=k.replace(b[g][0],b[g][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[h].$.styleSheet.cssText+=k:a[h].$.innerHTML+=k}}var m={};CKEDITOR.skin={path:b,loadPart:function(a,c){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(b()+"skin.js"),function(){f(a,c)}):f(a,c)},getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,c,b,g){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:c,offset:b||0,bgsize:g||
"16px"})},getIconStyle:function(a,c,b,g,f){var k;a&&(a=a.toLowerCase(),c&&(k=this.icons[a+"-rtl"]),k||(k=this.icons[a]));a=b||k&&k.path||"";g=g||k&&k.offset;f=f||k&&k.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+g+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(d){var b=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=
a;var d=CKEDITOR.skin.chameleon,f="",h="";"function"==typeof d&&(f=d(this,"editor"),h=d(this,"panel"));a=[[c,a]];g([b],f,a);g(k,h,a)}).call(this,d)}});var l="cke_ui_color",k=[],c=/\$color/g;CKEDITOR.on("instanceLoaded",function(d){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=d.editor;d=function(d){d=(d.data[0]||d.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!d.getById("cke_ui_color")){var f=a(d);k.push(f);b.on("destroy",function(){k=CKEDITOR.tools.array.filter(k,function(a){return f!==
a})});(d=b.getUiColor())&&g([f],CKEDITOR.skin.chameleon(b,"panel"),[[c,d]])}};b.on("panelShow",d);b.on("menuShow",d);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){var b=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);b.appendTo(CKEDITOR.document.getHead());try{var h=b.getComputedStyle("border-top-color"),f=b.getComputedStyle("border-right-color");
CKEDITOR.env.hc=!(!h||h!=f)}catch(a){CKEDITOR.env.hc=!1}b.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(b=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<b.length;h++)CKEDITOR.editor.prototype.constructor.apply(b[h][0],b[h][1]),CKEDITOR.add(b[h][0])}(),CKEDITOR.skin.name="moono-lexicon",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",
CKEDITOR.skin.chameleon=function(){var b=function(){return function(b,a){for(var g=b.match(/[^#]./g),h=0;3>h;h++){var l=h,k;k=parseInt(g[h],16);k=("0"+(0>a?0|k*(1+a):0|k+(255-k)*a).toString(16)).slice(-2);g[l]=k}return"#"+g.join("")}}(),h={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(f,a){var g=b(f.uiColor,.4),g={id:"."+f.id,defaultBorder:b(g,-.2),toolbarElementsBorder:b(g,-.25),defaultBackground:g,lightBackground:b(g,.8),darkBackground:b(g,-.15),ckeButtonOn:b(g,.4),ckeResizer:b(g,-.4),ckeColorauto:b(g,.8),dialogBody:b(g,.7),dialogTab:b(g,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:b(g,-.6),menubuttonHover:b(g,.1),menubuttonIcon:b(g,.5),menubuttonIconHover:b(g,.3)};return h[a].output(g).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var b=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var d=[this._],b=1;b<arguments.length;b++)d.push(arguments[b]);d.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,d);return this._},h={build:function(a,d,b){return new CKEDITOR.ui.dialog.textInput(a,d,b)}},f={build:function(a,d,b){return new CKEDITOR.ui.dialog[d.type](a,d,b)}},a={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},g=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,d){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
this)},this),this._.domOnChangeRegistered=!0);this.on("change",d)}},!0),m=/^on([A-Z]\w+)/,l=function(a){for(var d in a)(m.test(d)||"title"==d||"type"==d)&&delete a[d];return a},k=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(a,d,e,g){if(!(4>arguments.length)){var f=b.call(this,d);f.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var k={role:d.role||"presentation"};d.includeLabel&&(k["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,d,e,"div",null,k,function(){var b=[],e=d.required?" cke_required":"";"horizontal"!=d.labelLayout?b.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',g.call(this,a,d),"\x3c/div\x3e"):(e={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" id\x3d"'+f.labelId+'" for\x3d"'+f.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(d.controlStyle?' style\x3d"'+d.controlStyle+
'"':"")+"\x3e"+g.call(this,a,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,e,b));return b.join("")})}},textInput:function(a,d,e){if(!(3>arguments.length)){b.call(this,d);var g=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",f={"class":"cke_dialog_ui_input_"+d.type,id:g,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(f.maxlength=d.maxLength);d.size&&(f.size=d.size);d.inputStyle&&(f.style=d.inputStyle);var h=this,l=!1;a.on("load",function(){h.getInputElement().on("keydown",
function(a){13==a.data.getKeystroke()&&(l=!0)});h.getInputElement().on("keyup",function(d){13==d.data.getKeystroke()&&l&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),l=!1);h.bidi&&k.call(h,d)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,d,e,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"'];d.width&&a.push('style\x3d"width:'+d.width+'" ');a.push("\x3e\x3cinput ");f["aria-labelledby"]=this._.labelId;this._.required&&
(f["aria-required"]=this._.required);for(var c in f)a.push(c+'\x3d"'+f[c]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,d,e){if(!(3>arguments.length)){b.call(this,d);var g=this,f=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};d.validate&&(this.validate=d.validate);h.rows=d.rows||5;h.cols=d.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(h.style=d.inputStyle);d.dir&&(h.dir=d.dir);if(g.bidi)a.on("load",
function(){g.getInputElement().on("keyup",k)},g);CKEDITOR.ui.dialog.labeledElement.call(this,a,d,e,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',f,'" '],c;for(c in h)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(h[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(g._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(a,
d,e){if(!(3>arguments.length)){var g=b.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,d,e,"span",null,null,function(){var b=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],f=CKEDITOR.tools.getNextId()+"_label",k={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};l(b);d["default"]&&(k.checked="checked");"undefined"!=typeof b.inputStyle&&(b.style=b.inputStyle);
g.checkbox=new CKEDITOR.ui.dialog.uiElement(a,b,e,"input",null,k);e.push(' \x3clabel id\x3d"',f,'" for\x3d"',k.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return e.join("")})}},radio:function(a,d,e){if(!(3>arguments.length)){b.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var g=[],f=this;d.role="radiogroup";d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,
a,d,e,function(){for(var b=[],e=[],k=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",h=0;h<d.items.length;h++){var m=d.items[h],p=void 0!==m[2]?m[2]:m[0],y=void 0!==m[1]?m[1]:m[0],q=CKEDITOR.tools.getNextId()+"_radio_input",u=q+"_label",q=CKEDITOR.tools.extend({},d,{id:q,title:null,type:null},!0),p=CKEDITOR.tools.extend({},q,{title:p},!0),B={type:"radio","class":"cke_dialog_ui_radio_input",name:k,value:y,"aria-labelledby":u},A=[];f._["default"]==y&&(B.checked="checked");l(q);l(p);"undefined"!=typeof q.inputStyle&&
(q.style=q.inputStyle);q.keyboardFocusable=!0;g.push(new CKEDITOR.ui.dialog.uiElement(a,q,A,"input",null,B));A.push(" ");new CKEDITOR.ui.dialog.uiElement(a,p,A,"label",null,{id:u,"for":B.id},m[0]);b.push(A.join(""))}new CKEDITOR.ui.dialog.hbox(a,g,b,e);return e.join("")});this._.children=g}},button:function(a,d,e){if(arguments.length){"function"==typeof d&&(d=d(a.getParentEditor()));b.call(this,d,{disabled:d.disabled||!1});CKEDITOR.event.implementOn(this);var g=this;a.on("load",function(){var a=this.getElement();
(function(){a.on("click",function(a){g.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(g.click(),a.data.preventDefault())})})();a.unselectable()},this);var f=CKEDITOR.tools.extend({},d);delete f.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"a",null,{style:d.style,href:"javascript:void(0)",title:d.label,hidefocus:"true","class":d["class"],role:"button","aria-labelledby":k},'\x3cspan id\x3d"'+k+'" class\x3d"cke_dialog_ui_button"\x3e'+
CKEDITOR.tools.htmlEncode(d.label)+"\x3c/span\x3e")}},select:function(a,d,e){if(!(3>arguments.length)){var g=b.call(this,d);d.validate&&(this.validate=d.validate);g.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,d,e,function(){var b=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],f=[],k={id:g.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_',
d.type,'" role\x3d"presentation"');d.width&&e.push('style\x3d"width:'+d.width+'" ');e.push("\x3e");void 0!==d.size&&(k.size=d.size);void 0!==d.multiple&&(k.multiple=d.multiple);l(b);for(var h=0,m;h<d.items.length&&(m=d.items[h]);h++)f.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==m[1]?m[1]:m[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(m[0]));"undefined"!=typeof b.inputStyle&&(b.style=b.inputStyle);g.select=new CKEDITOR.ui.dialog.uiElement(a,b,e,"select",null,
k,f.join(""));e.push("\x3c/div\x3e");return e.join("")})}},file:function(a,d,e){if(!(3>arguments.length)){void 0===d["default"]&&(d["default"]="");var g=CKEDITOR.tools.extend(b.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);a.on("load",function(){CKEDITOR.document.getById(g.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,d,e,function(){g.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',
g.frameId,'" title\x3d"',d.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(a,d,e){var g=this;if(!(3>arguments.length)){b.call(this,d);d.validate&&(this.validate=d.validate);var f=CKEDITOR.tools.extend({},d),k=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(b){var e=
d["for"];b=k?k.call(this,b):!1;!1!==b&&("xhr"!==b&&a.getContentElement(e[0],e[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(d["for"][0],d["for"][1])._.buttons.push(g)});CKEDITOR.ui.dialog.button.call(this,a,f,e)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,b=/\/$/;return function(g,f,k){if(!(3>arguments.length)){var h=[],l=f.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var m=f.focus;if(m){var z=this.focus;
this.focus=function(){("function"==typeof m?m:z).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,g,f,h,"span",null,null,"");h=h.join("").match(a);l=l.match(d)||["","",""];b.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);k.push([l[1]," ",h[1]||"",l[2]].join(""))}}}(),fieldset:function(a,d,b,g,f){var k=f.label;this._={children:d};CKEDITOR.ui.dialog.uiElement.call(this,a,f,g,"fieldset",null,null,function(){var a=
[];k&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+k+"\x3c/legend\x3e");for(var c=0;c<b.length;c++)a.push(b[c]);return a.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(a){var d=CKEDITOR.document.getById(this._.labelId);1>d.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(d):d.getChild(0).$.nodeValue=
a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:g},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.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(a,d){this.on("click",function(){d.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 a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&d.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var d=a.getInputElement();d&&(d.$.focus(),d.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var d=a&&a.charAt(0);(d="‪"==d?"ltr":"‫"==d?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(d)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},
getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var d=this.getDirectionMarker();d&&(a=("ltr"==d?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var d=this.getInputElement();a?d.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&d.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},a,!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(a,d,b){var g=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),f=this.getInputElement().$;g.$.text=a;g.$.value=void 0===d||null===d?a:d;void 0===b||null===b?CKEDITOR.env.ie?f.add(g.$):f.add(g.$,null):f.add(g.$,b);return this},remove:function(a){this.getInputElement().$.remove(a);
return this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,d){this.getInputElement().$.checked=a;!d&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,
d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return g.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(c){c=c.data.$;"checked"==c.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",d);return null}},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,d){for(var b=this._.children,g,f=0;f<b.length&&(g=b[f]);f++)g.getElement().$.checked=
g.getValue()==a;!d&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,d=0;d<a.length;d++)if(a[d].getElement().$.checked)return a[d].getValue();return null},accessKeyUp:function(){var a=this._.children,d;for(d=0;d<a.length;d++)if(a[d].getElement().$.checked){a[d].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,d){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return g.onChange.apply(this,arguments);a.on("load",function(){for(var a=
this._.children,c=this,d=0;d<a.length;d++)a[d].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&c.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",d);return null}}},a,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,a,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):
this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var d=/^on([A-Z]\w+)/,b,g=function(a,c,d,b){a.on("formLoaded",function(){a.getInputElement().on(d,b,a)})},f;for(f in a)if(b=f.match(d))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):g(this,this._.dialog,b[1].toLowerCase(),a[f]);return this},reset:function(){function a(){b.$.open();
var c="";g.size&&(c=g.size-(CKEDITOR.env.ie?7:0));var p=d.frameId+"_input";b.$.write(['\x3chtml dir\x3d"'+l+'" lang\x3d"'+m+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+l+'" lang\x3d"'+m+'" action\x3d"',CKEDITOR.tools.htmlEncode(g.action),'"\x3e\x3clabel id\x3d"',d.labelId,'" for\x3d"',p,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(g.label),
'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',p,'" aria-labelledby\x3d"',d.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(g.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<c?c:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+k+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+h+")}","\x3c/script\x3e"].join(""));
b.$.close();for(c=0;c<f.length;c++)f[c].enable()}var d=this._,b=CKEDITOR.document.getById(d.frameId).getFrameDocument(),g=d.definition,f=d.buttons,k=this.formLoadedNumber,h=this.formUnloadNumber,l=d.dialog._.editor.lang.dir,m=d.dialog._.editor.langCode;k||(k=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),h=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(k);
CKEDITOR.tools.removeFunction(h)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,d){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",d)}},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",h);CKEDITOR.dialog.addUIElement("password",h);CKEDITOR.dialog.addUIElement("tel",h);CKEDITOR.dialog.addUIElement("textarea",f);CKEDITOR.dialog.addUIElement("checkbox",f);CKEDITOR.dialog.addUIElement("radio",f);CKEDITOR.dialog.addUIElement("button",f);CKEDITOR.dialog.addUIElement("select",f);CKEDITOR.dialog.addUIElement("file",f);CKEDITOR.dialog.addUIElement("fileButton",
f);CKEDITOR.dialog.addUIElement("html",f);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,d,b){for(var g=d.children,f,k=[],h=[],l=0;l<g.length&&(f=g[l]);l++){var m=[];k.push(m);h.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,m))}return new CKEDITOR.ui.dialog[d.type](a,h,k,b,d)}})}}),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 b(a){a._.tabBarMode=
!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function h(){for(var a=this._.tabIdList.length,c=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,d=c-1;d>c-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function f(){for(var a=this._.tabIdList.length,c=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=c+1;d<c+a;d++)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];
return null}function a(a,c){for(var d=a.$.getElementsByTagName("input"),b=0,e=d.length;b<e;b++){var g=new CKEDITOR.dom.element(d[b]);"text"==g.getAttribute("type").toLowerCase()&&(c?(g.setAttribute("value",g.getCustomData("fake_value")||""),g.removeCustomData("fake_value")):(g.setCustomData("fake_value",g.getAttribute("value")),g.setAttribute("value","")))}}function g(a,c){var d=this.getInputElement();d&&(a?d.removeAttribute("aria-invalid"):d.setAttribute("aria-invalid",!0));a||(this.select?this.select():
this.focus());c&&alert(c);this.fire("validated",{valid:a,msg:c})}function m(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function l(a){var c=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",L).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),d=c.getChild([0,0,0,0,0]),b=d.getChild(0),
e=d.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(d);!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(d.getParent()));b.unselectable();e.unselectable();return{element:c,
parts:{dialog:c.getChild(0),title:b,close:e,tabs:d.getChild(2),contents:d.getChild([3,0,0,0]),footer:d.getChild([3,0,1,0])}}}function k(a,c,d){this.element=c;this.focusIndex=d;this.tabIndex=0;this.isFocusable=function(){return!c.getAttribute("disabled")&&c.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};c.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});c.on("focus",function(){this.fire("mouseover")});c.on("blur",function(){this.fire("mouseout")})}
function c(a){function c(){a.layout()}var d=CKEDITOR.document.getWindow();d.on("resize",c);a.on("hide",function(){d.removeListener("resize",c)})}function d(a,c){this.dialog=a;for(var d=c.contents,b=0,g;g=d[b];b++)d[b]=g&&new e(a,g);CKEDITOR.tools.extend(this,c)}function e(a,c){this._={dialog:a};CKEDITOR.tools.extend(this,c)}function n(a){function c(d){var h=a.getSize(),l=a.parts.dialog.getParent().getClientSize(),m=d.data.$.screenX,n=d.data.$.screenY,p=m-b.x,q=n-b.y;b={x:m,y:n};e.x+=p;e.y+=q;m=e.x+
k[3]<f?-k[3]:e.x-k[1]>l.width-h.width-f?l.width-h.width+("rtl"==g.lang.dir?0:k[1]):e.x;h=e.y+k[0]<f?-k[0]:e.y-k[2]>l.height-h.height-f?l.height-h.height+k[2]:e.y;m=Math.floor(m);h=Math.floor(h);a.move(m,h,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove",c);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mousemove",c);a.removeListener("mouseup",d)}}var b=null,e=null,g=a.getParentEditor(),
f=g.config.dialog_magnetDistance,k=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(g){if(!a._.moved){var f=a._.element;f.getFirst().setStyle("position","absolute");f.removeStyle("display");a._.moved=!0;a.layout()}b={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",c);CKEDITOR.document.on("mouseup",d);e=a.getPosition();CKEDITOR.env.ie6Compat&&(f=E.getChild(0).getFrameDocument(),f.on("mousemove",c),f.on("mouseup",d));g.data.preventDefault()},
a)}function w(a){function c(d){var n="rtl"==g.lang.dir,p=m.width,q=m.height,w=p+(d.data.$.screenX-l.x)*(n?-1:1)*(a._.moved?1:2),Q=q+(d.data.$.screenY-l.y)*(a._.moved?1:2),v=a._.element.getFirst(),v=n&&parseInt(v.getComputedStyle("right"),10),u=a.getPosition();u.x=u.x||0;u.y=u.y||0;u.y+Q>h.height&&(Q=h.height-u.y);(n?v:u.x)+w>h.width&&(w=h.width-(n?v:u.x));Q=Math.floor(Q);w=Math.floor(w);if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(b.minWidth||0,w-f);if(e==CKEDITOR.DIALOG_RESIZE_HEIGHT||
e==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(b.minHeight||0,Q-k);a.resize(p,q);a._.moved&&x(a,a._.position.x,a._.position.y);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",c);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",c)}}var b=a.definition,e=b.resizable;if(e!=CKEDITOR.DIALOG_RESIZE_NONE){var g=
a.getParentEditor(),f,k,h,l,m,n,p=CKEDITOR.tools.addFunction(function(b){function e(a){return a.isVisible()}m=a.getSize();var g=a.parts.contents,p=g.$.getElementsByTagName("iframe").length,q=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);p&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),g.append(n));k=m.height-a.parts.contents.getFirst(e).getSize("height",q);
f=m.width-a.parts.contents.getFirst(e).getSize("width",1);l={x:b.screenX,y:b.screenY};h=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",c);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(g=E.getChild(0).getFrameDocument(),g.on("mousemove",c),g.on("mouseup",d));b.preventDefault&&b.preventDefault()});a.on("load",function(){var c="";e==CKEDITOR.DIALOG_RESIZE_WIDTH?c=" cke_resizer_horizontal":e==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(c=" cke_resizer_vertical");c=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+
c+" cke_resizer_"+g.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event )"\x3e'+("ltr"==g.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(c,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function x(a,c,d){var b=a.parts.dialog.getParent().getClientSize(),e=a.getSize(),g=a._.viewportRatio,f=Math.max(b.width-e.width,0),b=Math.max(b.height-e.height,0);g.width=f?c/f:g.width;g.height=b?d/b:g.height;
a._.viewportRatio=g}function r(a){a.data.preventDefault(1)}function t(a){var c=a.config,d=CKEDITOR.skinName||a.config.skin,b=c.dialog_backgroundCoverColor||("moono-lisa"==d?"black":"white"),d=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(b,d,e),g=M[c];CKEDITOR.document.getBody().addClass("cke_dialog_open");g?g.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",
CKEDITOR.env.ie6Compat?"":"background-color: "+b,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(b="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+b+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+b+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),
e.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(e.join("")),g.setOpacity(void 0!==d?d:.5),g.on("keydown",r),g.on("keypress",r),g.on("keyup",r),g.appendTo(CKEDITOR.document.getBody()),M[c]=g);a.focusManager.add(g);E=g;CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus()}function v(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");E&&(a.focusManager.remove(E),E.hide())}function z(a){var c=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,b=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);
(c=R[(c?"CTRL+":"")+(d?"ALT+":"")+(b?"SHIFT+":"")+e])&&c.length&&(c=c[c.length-1],c.keydown&&c.keydown.call(c.uiElement,c.dialog,c.key),a.data.preventDefault())}function p(a){var c=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,b=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(c=R[(c?"CTRL+":"")+(d?"ALT+":"")+(b?"SHIFT+":"")+e])&&c.length&&(c=c[c.length-1],c.keyup&&(c.keyup.call(c.uiElement,c.dialog,c.key),a.data.preventDefault()))}function y(a,c,d,b,e){(R[d]||(R[d]=[])).push({uiElement:a,
dialog:c,key:d,keyup:e||a.accessKeyUp,keydown:b||a.accessKeyDown})}function q(a){for(var c in R){for(var d=R[c],b=d.length-1;0<=b;b--)d[b].dialog!=a&&d[b].uiElement!=a||d.splice(b,1);0===d.length&&delete R[c]}}function u(a,c){a._.accessKeyMap[c]&&a.selectPage(a._.accessKeyMap[c])}function B(){}var A=CKEDITOR.tools.cssLength,C,E,F=!1,G=!CKEDITOR.env.ie||CKEDITOR.env.edge,L='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(G?
"display:flex":"")+'" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"'+(G?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e';
CKEDITOR.dialog=function(a,c){function e(){var a=A._.focusList;a.sort(function(a,c){return a.tabIndex!=c.tabIndex?c.tabIndex-a.tabIndex:a.focusIndex-c.focusIndex});for(var c=a.length,d=0;d<c;d++)a[d].focusIndex=d}function k(a){var c=A._.focusList;a=a||0;if(!(1>c.length)){var d=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(d=0);try{c[d].getInputElement().$.blur()}catch(b){}var e=d,g=1<A._.pageCount;do{e+=a;if(g&&!A._.tabBarMode&&(e==c.length||-1==e)){A._.tabBarMode=!0;A._.tabs[A._.currentTabId][0].focus();
A._.currentFocusIndex=-1;return}e=(e+c.length)%c.length;if(e==d)break}while(a&&!c[e].isFocusable());c[e].focus();"text"==c[e].type&&c[e].select()}}function p(c){if(A==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),e="rtl"==a.lang.dir,g=[37,38,39,40];B=x=0;if(9==d||d==CKEDITOR.SHIFT+9)k(d==CKEDITOR.SHIFT+9?-1:1),B=1;else if(d==CKEDITOR.ALT+121&&!A._.tabBarMode&&1<A.getPageCount())b(A),B=1;else if(-1!=CKEDITOR.tools.indexOf(g,d)&&A._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([e?39:37,38],d)?
h.call(A):f.call(A),A.selectPage(d),A._.tabs[d][0].focus(),B=1;else if(13!=d&&32!=d||!A._.tabBarMode)if(13==d)d=c.data.getTarget(),d.is("a","button","select","textarea")||d.is("input")&&"button"==d.$.type||((d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d),B=1),x=1;else if(27==d)(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),x=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
-1,k(1),B=1;q(c)}}function q(a){B?a.data.preventDefault(1):x&&a.data.stopPropagation()}var v=CKEDITOR.dialog._.dialogDefinitions[c],u=CKEDITOR.tools.clone(C),t=a.config.dialog_buttonsOrder||"OS",z=a.lang.dir,y={},B,x;("OS"==t&&CKEDITOR.env.mac||"rtl"==t&&"ltr"==z||"ltr"==t&&"rtl"==z)&&u.buttons.reverse();v=CKEDITOR.tools.extend(v(a),u);v=CKEDITOR.tools.clone(v);v=new d(this,v);u=l(a);this._={editor:a,element:u.element,name:c,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=u.parts;CKEDITOR.tools.setTimeout(function(){a.fire("ariaWidget",this.parts.contents)},0,this);u={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(u.position="absolute");u["rtl"==z?"right":"left"]=0;this.parts.dialog.setStyles(u);CKEDITOR.event.call(this);this.definition=v=CKEDITOR.fire("dialogDefinition",
{name:c,definition:v,dialog:this},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){u=a.config.removeDialogTabs.split(";");for(z=0;z<u.length;z++)if(t=u[z].split(":"),2==t.length){var r=t[0];y[r]||(y[r]=[]);y[r].push(t[1])}a._.removeDialogTabs=y}if(a._.removeDialogTabs&&(y=a._.removeDialogTabs[c]))for(z=0;z<y.length;z++)v.removeContents(y[z]);if(v.onLoad)this.on("load",v.onLoad);if(v.onShow)this.on("show",v.onShow);if(v.onHide)this.on("hide",v.onHide);if(v.onOk)this.on("ok",
function(c){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0);!1===v.onOk.call(this,c)&&(c.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(v.onCancel)this.on("cancel",function(a){!1===v.onCancel.call(this,a)&&(a.data.hide=!1)});var A=this,E=function(a){var c=A._.contents,d=!1,b;for(b in c)for(var e in c[b])if(d=a.call(this,c[b][e]))return};this.on("ok",function(a){E(function(c){if(c.validate){var d=c.validate(this),b="string"==typeof d||!1===d;b&&(a.data.hide=!1,a.stop());
g.call(c,!b,"string"==typeof d?d:void 0);return b}})},this,null,0);this.on("cancel",function(c){E(function(d){if(d.isChanged())return a.config.dialog_noConfirmCancel||confirm(a.lang.common.confirmCancel)||(c.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=k;var G=this._.element;a.focusManager.add(G,1);this.on("show",function(){G.on("keydown",p,this);if(CKEDITOR.env.gecko)G.on("keypress",
q,this)});this.on("hide",function(){G.removeListener("keydown",p);CKEDITOR.env.gecko&&G.removeListener("keypress",q);E(function(a){m.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",p,this,null,0)});this.on("show",function(){e();var c=1<A._.pageCount;a.config.dialog_startupFocusTab&&c?(A._.tabBarMode=!0,A._.tabs[A._.currentTabId][0].focus(),A._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=c?-1:this._.focusList.length-
1,v.onFocus?(c=v.onFocus.call(this))&&c.focus():k(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),c=a.getFirst();c.remove();c.appendTo(a)},this);n(this);w(this);(new CKEDITOR.dom.text(v.title,CKEDITOR.document)).appendTo(this.parts.title);for(z=0;z<v.contents.length;z++)(y=v.contents[z])&&this.addPage(y);this.parts.tabs.on("click",function(a){var c=a.data.getTarget();c.hasClass("cke_dialog_tab")&&(c=c.$.id,this.selectPage(c.substring(4,c.lastIndexOf("_"))),
b(this),a.data.preventDefault())},this);z=[];y=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:v.buttons},z).getChild();this.parts.footer.setHtml(z.join(""));for(z=0;z<y.length;z++)this._.buttons[y[z].id]=y[z]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,c){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=c){CKEDITOR.dialog.fire("resize",
{dialog:this,width:a,height:c},this._.editor);this.fire("resize",{width:a,height:c},this._.editor);this.parts.contents.setStyles({width:a+"px",height:c+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var d=this.parts.dialog.getParent().getClientSize().width;this._.position.x=d-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:c}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
0}},move:function(a,c,d){var b=this._.element.getFirst(),e="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&b.setStyle("zoom","100%");var g=this.parts.dialog.getParent().getClientSize(),f=this.getSize(),k=this._.viewportRatio,h=Math.max(g.width-f.width,0),g=Math.max(g.height-f.height,0);this._.position&&this._.position.x==a&&this._.position.y==c?(a=Math.floor(h*k.width),c=Math.floor(g*k.height)):x(this,a,c);this._.position={x:a,y:c};e&&(a=h-a);c={top:(0<c?c:0)+"px"};c[e?"right":"left"]=(0<a?a:0)+"px";
b.setStyles(c);d&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,d=this.definition,b=CKEDITOR.document.getBody(),e=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(b)?a.setStyle("display",G?"flex":"block"):a.appendTo(b);this.resize(this._.contentSize&&this._.contentSize.width||d.width||d.minWidth,this._.contentSize&&this._.contentSize.height||d.height||d.minHeight);this.reset();null===this._.currentTabId&&
this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=e);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,t(this._.editor)):CKEDITOR.dialog._.currentTop!==this&&(this._.parentDialog=CKEDITOR.dialog._.currentTop,b=this._.parentDialog.getElement().getFirst(),
b.$.style.zIndex-=Math.floor(e/2),this._.parentDialog.getElement().setStyle("z-index",b.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",z);a.on("keyup",p);this._.hasFocus=!1;for(var g in d.contents)if(d.contents[g]){var a=d.contents[g],e=this._.tabs[a.id],b=a.requiredContent,f=0;if(e){for(var k in this._.contents[a.id]){var h=this._.contents[a.id][k];"hbox"!=h.type&&"vbox"!=h.type&&h.getInputElement()&&(h.requiredContent&&!this._.editor.activeFilter.check(h.requiredContent)?h.disable():
(h.enable(),f++))}!f||b&&!this._.editor.activeFilter.check(b)?e[0].addClass("cke_dialog_tab_disabled"):e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();c(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(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=
this.parts.dialog;if(this._.moved||!G){var c=this.getSize(),d=CKEDITOR.document.getWindow().getViewPaneSize(),b;this._.moved&&this._.position?(b=this._.position.x,c=this._.position.y):(b=(d.width-c.width)/2,c=(d.height-c.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));b=Math.floor(b);c=Math.floor(c);this.move(b,c)}},foreach:function(a){for(var c in this._.contents)for(var d in this._.contents[c])a.call(this,this._.contents[c][d]);return this},reset:function(){var a=
function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(c){c.setup&&c.setup.apply(c,a)})},commitContent:function(){var a=arguments;this.foreach(function(c){CKEDITOR.env.ie&&this._.currentFocusIndex==c.focusIndex&&c.getInputElement().$.blur();c.commit&&c.commit.apply(c,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);
var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(q(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var c=this._.parentDialog.getElement().getFirst();this._.parentDialog.getElement().removeStyle("z-index");c.setStyle("z-index",parseInt(c.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=
10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",z);a.removeListener("keyup",p);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var c=[],d=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",b=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: inherit;"},c),e=this._.contents[a.id]={},g=b.getChild(),f=0;b=g.shift();)b.notAllowed||"hbox"==b.type||"vbox"==b.type||f++,e[b.id]=b,"function"==typeof b.getChild&&g.push.apply(g,b.getChild());f||(a.hidden=!0);c=CKEDITOR.dom.element.createFromHtml(c.join(""));c.setAttribute("role","tabpanel");c.setStyle("min-height",
"100%");b=CKEDITOR.env;e="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",d,a.hidden?' style\x3d"display:none"':"",' id\x3d"',e,'"',b.gecko&&!b.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));c.setAttribute("aria-labelledby",e);this._.tabs[a.id]=[d,c];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=d;this.updateStyle();c.setAttribute("name",a.id);c.appendTo(this.parts.contents);d.unselectable();this.parts.tabs.append(d);a.accessKey&&(y(this,this,"CTRL+"+a.accessKey,B,u),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(c){if(this._.currentTabId!=c&&!this._.tabs[c][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:c,currentPage:this._.currentTabId})){for(var d in this._.tabs){var b=this._.tabs[d][0],e=this._.tabs[d][1];d!=c&&(b.removeClass("cke_dialog_tab_selected"),
b.removeAttribute("aria-selected"),e.hide());e.setAttribute("aria-hidden",d!=c)}var g=this._.tabs[c];g[0].addClass("cke_dialog_tab_selected");g[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(a(g[1]),g[1].show(),setTimeout(function(){a(g[1],1)},0)):g[1].show();this._.currentTabId=c;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,c)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var c=
this._.tabs[a]&&this._.tabs[a][0];c&&1!=this._.pageCount&&c.isVisible()&&(a==this._.currentTabId&&this.selectPage(h.call(this)),c.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,c){var d=this._.contents[a];return d&&d[c]},getValueOf:function(a,c){return this.getContentElement(a,c).getValue()},
setValueOf:function(a,c,d){return this.getContentElement(a,c).setValue(d)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,
c){if("undefined"==typeof c)c=this._.focusList.length,this._.focusList.push(new k(this,a,c));else{this._.focusList.splice(c,0,new k(this,a,c));for(var d=c+1;d<this._.focusList.length;d++)this._.focusList[d].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var c=this.getParentEditor().lang.dir,d={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==c?"right":"left"}};d.styles["margin-"+("rtl"==c?"left":"right")]=
"8px";this.parts.spinner=CKEDITOR.document.createElement("div",d);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",a)}},getModel:function(a){return this._.model?this._.model:this.definition.getModel?this.definition.getModel(a):null},setModel:function(a){this._.model=a},getMode:function(a){if(this.definition.getMode)return this.definition.getMode(a);
a=this.getModel(a);return!a||a instanceof CKEDITOR.dom.element&&!a.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}};CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,add:function(a,c){this._.dialogDefinitions[a]&&"function"!=typeof c||(this._.dialogDefinitions[a]=c)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(a,c,d){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+
c+":"+d+"(?:$|;)","i")))},okButton:function(){var a=function(a,c){c=c||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},c,!0)};a.type="button";a.override=function(c){return CKEDITOR.tools.extend(function(d){return a(d,c)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=function(a,c){c=c||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",
label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},c,!0)};a.type="button";a.override=function(c){return CKEDITOR.tools.extend(function(d){return a(d,c)},{type:"button"},!0)};return a}(),addUIElement:function(a,c){this._.uiElementBuilders[a]=c}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);
C={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var D=function(a,c,d){for(var b=0,e;e=a[b];b++)if(e.id==c||d&&e[d]&&(e=D(e[d],c,d)))return e;return null},O=function(a,c,d,b,e){if(d){for(var g=0,f;f=a[g];g++){if(f.id==d)return a.splice(g,0,c),c;if(b&&f[b]&&(f=O(f[b],c,d,b,!0)))return f}if(e)return null}a.push(c);return c},I=function(a,c,d){for(var b=0,e;e=a[b];b++){if(e.id==c)return a.splice(b,1);if(d&&e[d]&&(e=I(e[d],
c,d)))return e}return null};d.prototype={getContents:function(a){return D(this.contents,a)},getButton:function(a){return D(this.buttons,a)},addContents:function(a,c){return O(this.contents,a,c)},addButton:function(a,c){return O(this.buttons,a,c)},removeContents:function(a){I(this.contents,a)},removeButton:function(a){I(this.buttons,a)}};e.prototype={get:function(a){return D(this.elements,a,"children")},add:function(a,c){return O(this.elements,a,c,"children")},remove:function(a){I(this.elements,a,
"children")}};var M={},R={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,c,d,b,e,g,f){if(!(4>arguments.length)){var k=(b.call?b(c):b)||"div",h=["\x3c",k," "],l=(e&&e.call?e(c):e)||{},m=(g&&g.call?g(c):g)||{},n=(f&&f.call?f.call(this,a,c):f)||"",p=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";c.requiredContent&&!a.getParentEditor().filter.check(c.requiredContent)&&(l.display="none",this.notAllowed=!0);m.id=p;var q={};c.type&&(q["cke_dialog_ui_"+c.type]=1);c.className&&(q[c.className]=
1);c.disabled&&(q.cke_disabled=1);for(var w=m["class"]&&m["class"].split?m["class"].split(" "):[],p=0;p<w.length;p++)w[p]&&(q[w[p]]=1);w=[];for(p in q)w.push(p);m["class"]=w.join(" ");c.title&&(m.title=c.title);q=(c.style||"").split(";");c.align&&(w=c.align,l["margin-left"]="left"==w?0:"auto",l["margin-right"]="right"==w?0:"auto");for(p in l)q.push(p+":"+l[p]);c.hidden&&q.push("display:none");for(p=q.length-1;0<=p;p--)""===q[p]&&q.splice(p,1);0<q.length&&(m.style=(m.style?m.style+"; ":"")+q.join("; "));
for(p in m)h.push(p+'\x3d"'+CKEDITOR.tools.htmlEncode(m[p])+'" ');h.push("\x3e",n,"\x3c/",k,"\x3e");d.push(h.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof c.isChanged&&(this.isChanged=function(){return c.isChanged});"function"==typeof c.isChanged&&(this.isChanged=c.isChanged);"function"==typeof c.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(d){a.call(this,c.setValue.call(this,d))}}));"function"==typeof c.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,
function(a){return function(){return c.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(c);this.accessKeyUp&&this.accessKeyDown&&c.accessKey&&y(this,a,"CTRL+"+c.accessKey);var v=this;a.on("load",function(){var c=v.getInputElement();if(c){var d=v.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";c.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;v.fire("focus");d&&this.addClass(d)});c.on("blur",function(){v.fire("blur");
d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,c);this.keyboardFocusable&&(this.tabIndex=c.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=v.focusIndex}))}},hbox:function(a,c,d,b,e){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=c,f=e&&e.widths||null,k=e&&e.height||null,h,l={role:"presentation"};e&&e.align&&(l.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},b,"table",{},l,function(){var a=
['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(h=0;h<d.length;h++){var c="cke_dialog_ui_hbox_child",b=[];0===h&&(c="cke_dialog_ui_hbox_first");h==d.length-1&&(c="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',c,'" role\x3d"presentation" ');f?f[h]&&b.push("width:"+A(f[h])):b.push("width:"+Math.floor(100/d.length)+"%");k&&b.push("height:"+A(k));e&&void 0!==e.padding&&b.push("padding:"+A(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[h].align&&b.push("text-align:"+g[h].align);
0<b.length&&a.push('style\x3d"'+b.join("; ")+'" ');a.push("\x3e",d[h],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,c,d,b,e){if(!(3>arguments.length)){this._||(this._={});var g=this._.children=c,f=e&&e.width||null,k=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},b,"div",null,{role:"presentation"},function(){var c=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];c.push('style\x3d"');e&&e.expand&&c.push("height:100%;");
c.push("width:"+A(f||"100%"),";");CKEDITOR.env.webkit&&c.push("float:none;");c.push('"');c.push('align\x3d"',CKEDITOR.tools.htmlEncode(e&&e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');c.push("\x3e\x3ctbody\x3e");for(var b=0;b<d.length;b++){var h=[];c.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');f&&h.push("width:"+A(f||"100%"));k?h.push("height:"+A(k[b])):e&&e.expand&&h.push("height:"+Math.floor(100/d.length)+"%");e&&void 0!==e.padding&&h.push("padding:"+A(e.padding));CKEDITOR.env.ie&&
CKEDITOR.env.quirks&&g[b].align&&h.push("text-align:"+g[b].align);0<h.length&&c.push('style\x3d"',h.join("; "),'" ');c.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',d[b],"\x3c/td\x3e\x3c/tr\x3e")}c.push("\x3c/tbody\x3e\x3c/table\x3e");return c.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(a,c){this.getInputElement().setValue(a);
!c&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var c=
/^on([A-Z]\w+)/,d,b=function(a,c,d,b){c.on("load",function(){a.getInputElement().on(d,b,a)})},e;for(e in a)if(d=e.match(c))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):b(this,this._.dialog,d[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,c){a.on("load",c,this)},onShow:function(a,c){a.on("show",c,this)},onHide:function(a,c){a.on("hide",c,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement();
this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,c,d){for(var b=c.children,e,g=[],f=[],k=0;k<b.length&&(e=b[k]);k++){var h=[];g.push(h);f.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,h))}return new CKEDITOR.ui.dialog[c.type](a,
f,g,d,c)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,c){this.dialogName=a;CKEDITOR.tools.extend(this,c,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var c=this.tabId;a.openDialog(this.dialogName,function(a){c&&a.selectPage(c)})},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,c=/^\d*$/,d=/^\d*(?:\.\d+)?$/,b=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
g=/^(--|-?([a-zA-Z_]|\\))(\\|[a-zA-Z0-9-_])*\s*?:\s*?[^:;]+$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var c=this&&this.getValue?this.getValue():a[0],d,b=CKEDITOR.VALIDATE_AND,e=[],g;for(g=0;g<a.length;g++)if("function"==typeof a[g])e.push(a[g]);else break;g<a.length&&"string"==typeof a[g]&&(d=a[g],g++);g<a.length&&"number"==typeof a[g]&&(b=a[g]);var f=b==CKEDITOR.VALIDATE_AND?!0:!1;for(g=0;g<e.length;g++)f=b==
CKEDITOR.VALIDATE_AND?f&&e[g](c):f||e[g](c);return f?!0:d}},regex:function(a,c){return function(d){d=this&&this.getValue?this.getValue():d;return a.test(d)?!0:c}},notEmpty:function(c){return this.regex(a,c)},integer:function(a){return this.regex(c,a)},number:function(a){return this.regex(d,a)},cssLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return b.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){a=
CKEDITOR.tools.trim(a).split(";");""===a[a.length-1]&&a.pop();return CKEDITOR.tools.array.every(a,function(a){return g.test(CKEDITOR.tools.trim(a))})},a)},equals:function(a,c){return this.functions(function(c){return c==a},c)},notEqual:function(a,c){return this.functions(function(c){return c!=a},c)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var c;c=CKEDITOR.dialog._.currentTop;)c.hide();for(var d in M)M[d].remove();M={}}a=a.editor._.storedDialogs;
for(var b in a)a[b].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,c,d){var b=null,e=CKEDITOR.dialog._.dialogDefinitions[a];null===CKEDITOR.dialog._.currentTop&&t(this);if("function"==typeof e)e=this._.storedDialogs||(this._.storedDialogs={}),b=e[a]||(e[a]=new CKEDITOR.dialog(this,a)),b.setModel(d),c&&c.call(b,b),b.show();else{if("failed"==e)throw v(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&
CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,c,d)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(b)b.once("hide",function(){b.setModel(null)},null,null,999);return b}});CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){F||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),F=!0);a.on("doubleclick",function(c){c.data.dialog&&a.openDialog(c.data.dialog)},
null,null,999)}})}(),function(){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(b){var h=this;b.addCommand("a11yHelp",
{exec:function(){var f=b.langCode,f=h.availableLangs[f]?f:h.availableLangs[f.replace(/-.*/,"")]?f.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+f+".js"),function(){b.lang.a11yhelp=h.langEntries[f];b.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});b.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");b.on("ariaEditorHelpLabel",function(f){f.data.label=b.lang.common.editorHelp})}})}(),
CKEDITOR.plugins.add("basicstyles",{init:function(b){var h=0,f=function(g,f,c,d){if(d){d=new CKEDITOR.style(d);var e=a[c];e.unshift(d);b.attachStyleStateChange(d,function(a){!b.readOnly&&b.getCommand(c).setState(a)});b.addCommand(c,new CKEDITOR.styleCommand(d,{contentForms:e}));b.ui.addButton&&b.ui.addButton(g,{label:f,command:c,toolbar:"basicstyles,"+(h+=10)})}},a={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==
a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},g=b.config,m=b.lang.basicstyles;f("Bold",m.bold,"bold",g.coreStyles_bold);f("Italic",m.italic,"italic",g.coreStyles_italic);f("Underline",m.underline,"underline",g.coreStyles_underline);f("Strike",m.strike,"strike",g.coreStyles_strike);f("Subscript",m.subscript,
"subscript",g.coreStyles_subscript);f("Superscript",m.superscript,"superscript",g.coreStyles_superscript);b.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(){var b={exec:function(b){var f=b.getCommand("blockquote").state,a=b.getSelection(),g=a&&a.getRanges()[0];if(g){var m=a.createBookmarks();if(CKEDITOR.env.ie){var l=m[0].startNode,k=m[0].endNode,c;if(l&&"blockquote"==l.getParent().getName())for(c=l;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){l.move(c,!0);break}if(k&&"blockquote"==k.getParent().getName())for(c=k;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&
c.isBlockBoundary()){k.move(c);break}}var d=g.createIterator();d.enlargeBr=b.config.enterMode!=CKEDITOR.ENTER_BR;if(f==CKEDITOR.TRISTATE_OFF){for(l=[];f=d.getNextParagraph();)l.push(f);1>l.length&&(f=b.document.createElement(b.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),k=m.shift(),g.insertNode(f),f.append(new CKEDITOR.dom.text("﻿",b.document)),g.moveToBookmark(k),g.selectNodeContents(f),g.collapse(!0),k=g.createBookmark(),l.push(f),m.unshift(k));c=l[0].getParent();g=[];for(k=0;k<l.length;k++)f=
l[k],c=c.getCommonAncestor(f.getParent());for(f={table:1,tbody:1,tr:1,ol:1,ul:1};f[c.getName()];)c=c.getParent();for(k=null;0<l.length;){for(f=l.shift();!f.getParent().equals(c);)f=f.getParent();f.equals(k)||g.push(f);k=f}for(;0<g.length;)if(f=g.shift(),"blockquote"==f.getName()){for(k=new CKEDITOR.dom.documentFragment(b.document);f.getFirst();)k.append(f.getFirst().remove()),l.push(k.getLast());k.replace(f)}else l.push(f);g=b.document.createElement("blockquote");for(g.insertBefore(l[0]);0<l.length;)f=
l.shift(),g.append(f)}else if(f==CKEDITOR.TRISTATE_ON){k=[];for(c={};f=d.getNextParagraph();){for(l=g=null;f.getParent();){if("blockquote"==f.getParent().getName()){g=f.getParent();l=f;break}f=f.getParent()}g&&l&&!l.getCustomData("blockquote_moveout")&&(k.push(l),CKEDITOR.dom.element.setMarker(c,l,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(c);f=[];l=[];for(c={};0<k.length;)d=k.shift(),g=d.getParent(),d.getPrevious()?d.getNext()?(d.breakParent(d.getParent()),l.push(d.getNext())):
d.remove().insertAfter(g):d.remove().insertBefore(g),g.getCustomData("blockquote_processed")||(l.push(g),CKEDITOR.dom.element.setMarker(c,g,"blockquote_processed",!0)),f.push(d);CKEDITOR.dom.element.clearAllMarkers(c);for(k=l.length-1;0<=k;k--){g=l[k];a:{c=g;for(var d=0,e=c.getChildCount(),n=void 0;d<e&&(n=c.getChild(d));d++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){c=!1;break a}c=!0}c&&g.remove()}if(b.config.enterMode==CKEDITOR.ENTER_BR)for(g=!0;f.length;)if(d=f.shift(),"div"==d.getName()){k=
new CKEDITOR.dom.documentFragment(b.document);!g||!d.getPrevious()||d.getPrevious().type==CKEDITOR.NODE_ELEMENT&&d.getPrevious().isBlockBoundary()||k.append(b.document.createElement("br"));for(g=d.getNext()&&!(d.getNext().type==CKEDITOR.NODE_ELEMENT&&d.getNext().isBlockBoundary());d.getFirst();)d.getFirst().remove().appendTo(k);g&&k.append(b.document.createElement("br"));k.replace(d);g=!1}}a.selectBookmarks(m);b.focus()}},refresh:function(b,f){this.setState(b.elementPath(f.block||f.blockLimit).contains("blockquote",
1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(h){h.blockless||(h.addCommand("blockquote",b),h.ui.addButton&&h.ui.addButton("Blockquote",{label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function b(b,a){CKEDITOR.tools.extend(this,a,{editor:b,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:b._.notificationArea});a.type||
(this.type="info");this.element=this._createElement();b.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function h(b){var a=this;this.editor=b;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);b.on("destroy",function(){a._removeListeners();a.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(b){function a(a){var b=
new CKEDITOR.dom.element("div");b.setStyles({position:"fixed","margin-left":"-9999px"});b.setAttributes({"aria-live":"assertive","aria-atomic":"true"});b.setText(a);CKEDITOR.document.getBody().append(b);setTimeout(function(){b.remove()},100)}b._.notificationArea=new h(b);b.showNotification=function(a,h,l){var k,c;"progress"==h?k=l:c=l;a=new CKEDITOR.plugins.notification(b,{message:a,type:h,progress:k,duration:c});a.show();return a};b.on("key",function(g){if(27==g.data.keyCode){var h=b._.notificationArea.notifications;
h.length&&(a(b.lang.notification.closed),h[h.length-1].hide(),g.cancel())}})}});b.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(b){var a=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:b})&&(a=!1);var g=this.element,h=g.findOne(".cke_notification_message"),l=g.findOne(".cke_notification_progress"),k=b.type;g.removeAttribute("role");b.progress&&"progress"!=this.type&&
(k="progress");k&&(g.removeClass(this._getClass()),g.removeAttribute("aria-label"),this.type=k,g.addClass(this._getClass()),g.setAttribute("aria-label",this.type),"progress"!=this.type||l?"progress"!=this.type&&l&&l.remove():(l=this._createProgressElement(),l.insertBefore(h)));void 0!==b.message&&(this.message=b.message,h.setHtml(this.message));void 0!==b.progress&&(this.progress=b.progress,l&&l.setStyle("width",this._getPercentageProgress()));a&&b.important&&(g.setAttribute("role","alert"),this.isVisible()||
this.area.add(this));this.duration=b.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 b=this,a,g,h=this.editor.lang.common.close;a=new CKEDITOR.dom.element("div");a.addClass("cke_notification");a.addClass(this._getClass());a.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==
this.type&&a.append(this._createProgressElement());g=new CKEDITOR.dom.element("p");g.addClass("cke_notification_message");g.setHtml(this.message);a.append(g);g=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+h+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');a.append(g);g.on("click",function(){b.editor.focus();b.hide()});return a},_getClass:function(){return"progress"==this.type?
"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var b=new CKEDITOR.dom.element("span");b.addClass("cke_notification_progress");b.setStyle("width",this._getPercentageProgress());return b},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var b=this,a;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)a=this.duration;else if("info"==this.type||"success"==this.type)a=
"number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;a&&(b._hideTimeoutId=setTimeout(function(){b.hide()},a))}};h.prototype={add:function(b){this.notifications.push(b);this.element.append(b.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(b){var a=CKEDITOR.tools.indexOf(this.notifications,b);0>a||(this.notifications.splice(a,1),b.element.remove(),this.element.getChildCount()||
(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,a=b.config,g=new CKEDITOR.dom.element("div");g.addClass("cke_notifications_area");g.setAttribute("id","cke_notifications_area_"+b.name);g.setStyle("z-index",a.baseFloatZIndex-2);return g},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input);a.on("change",this._changeBuffer.input);a.on("floatingSpaceLayout",this._layout,
this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left",z(p+h.width-n-w))}var a=this.element,g=this.editor,h=g.ui.contentsElement.getClientRect(),
l=g.ui.contentsElement.getDocumentPosition(),k,c,d=a.getClientRect(),e,n=this._notificationWidth,w=this._notificationMargin;e=CKEDITOR.document.getWindow();var x=e.getScrollPosition(),r=e.getViewPaneSize(),t=CKEDITOR.document.getBody(),v=t.getDocumentPosition(),z=CKEDITOR.tools.cssLength;n&&w||(e=this.element.getChild(0),n=this._notificationWidth=e.getClientRect().width,w=this._notificationMargin=parseInt(e.getComputedStyle("margin-left"),10)+parseInt(e.getComputedStyle("margin-right"),10));g.toolbar&&
(k=g.ui.space(g.config.toolbarLocation),c=k.getClientRect());k&&k.isVisible()&&c.bottom>h.top&&c.bottom<h.bottom-d.height?a.setStyles({position:"fixed",top:z(c.bottom)}):0<h.top?a.setStyles({position:"absolute",top:z(l.y)}):l.y+h.height-d.height>x.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:z(l.y+h.height-d.height)});var p="fixed"==a.getStyle("position")?h.left:"static"!=t.getComputedStyle("position")?l.x-v.x:l.x;h.width<n+w?l.x+n+w>x.x+r.width?b():a.setStyle("left",
z(p)):l.x+n+w>x.x+r.width?a.setStyle("left",z(p)):l.x+h.width/2+n/2+w>x.x+r.width?a.setStyle("left",z(p-l.x+x.x+r.width-n-w)):0>h.left+h.width-n-w?b():0>h.left+h.width/2-n/2?a.setStyle("left",z(p-l.x+x.x)):a.setStyle("left",z(p+h.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=b}(),function(){var b='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';
CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var b=b+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+
'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',f=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),a=CKEDITOR.addTemplate("button",b);CKEDITOR.plugins.add("button",
{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(b,h){function l(){var a=b.mode;a&&(a=this.modes[a]?void 0!==k[a]?k[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
a=b.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var k=null,c=CKEDITOR.env,d="",e=this.command,n,w,x,r=this._.id;r||(r=CKEDITOR.tools.getNextId(),this._.id=r);this._.editor=b;var t={id:r,button:this,editor:b,focus:function(){CKEDITOR.document.getById(r).focus()},execute:function(){this.button.click(b)},attach:function(a){this.button.attach(a)}},v=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t,
a.getKeystroke())}),z=CKEDITOR.tools.addFunction(function(a){var c;t.onfocus&&(c=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return c}),p=0;t.clickFn=n=CKEDITOR.tools.addFunction(function(){p&&(b.unlockSelection(1),p=0);t.execute();c.iOS&&b.focus()});this.modes?(k={},b.on("beforeModeUnload",function(){b.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(k[b.mode]=this._.state)},this),b.on("activeFilterChange",l,this),b.on("mode",l,this),!this.readOnly&&b.on("readOnly",l,this)):e&&(e=b.getCommand(e))&&
(e.on("state",function(){this.setState(e.state)},this),d+=e.state==CKEDITOR.TRISTATE_ON?"on":e.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var y;if(this.directional)b.on("contentDirChanged",function(a){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();a=a.data;a!=b.lang.dir?c.addClass("cke_"+a):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(y,"rtl"==a,this.icon,this.iconOffset))},this);e?(w=b.getCommandKeystroke(e))&&(x=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,
w)):d+="off";w=this.name||this.command;var q=null,u=this.icon;y=w;this.icon&&!/\./.test(this.icon)?(y=this.icon,u=null):(this.icon&&(q=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(q=this.iconHiDpi));q?(CKEDITOR.skin.addIcon(q,q),u=null):q=y;d={id:r,name:w,iconName:y,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:d,ariaDisabled:"disabled"==d?"true":"false",title:this.title+(x?" ("+x.display+")":""),ariaShortcutSpace:x?"\x26nbsp;":"",ariaShortcut:x?b.lang.common.keyboardShortcut+
" "+x.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:v,focusFn:z,clickFn:n,style:CKEDITOR.skin.getIconStyle(q,"rtl"==b.lang.dir,u,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};a.output(d,h);if(this.onRender)this.onRender();return t},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),
b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?b.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,
b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function b(a){function b(){for(var c=f(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),e=0;e<d.length;e++){var m=d[e];if("/"!=m){"string"==typeof m&&(m=d[e]={name:m});var t,v=m.groups;if(v)for(var z=0;z<v.length;z++)t=v[z],(t=c[t])&&k(m,t);(t=c[m.name])&&k(m,t)}}return d}function f(){var c={},d,b,e;for(d in a.ui.items)b=a.ui.items[d],e=b.toolbar||"others",e=e.split(","),b=e[0],e=parseInt(e[1]||-1,10),c[b]||(c[b]=[]),c[b].push({name:d,order:e});
for(b in c)c[b]=c[b].sort(function(a,c){return a.order==c.order?0:0>c.order?-1:0>a.order?1:a.order<c.order?-1:1});return c}function k(c,b){if(b.length){c.items?c.items.push(a.ui.create("-")):c.items=[];for(var e;e=b.shift();)e="string"==typeof e?e:e.name,d&&-1!=CKEDITOR.tools.indexOf(d,e)||(e=a.ui.create(e))&&a.addFeature(e)&&c.items.push(e)}}function c(a){var c=[],d,b,e;for(d=0;d<a.length;++d)b=a[d],e={},"/"==b?c.push(b):CKEDITOR.tools.isArray(b)?(k(e,CKEDITOR.tools.clone(b)),c.push(e)):b.items&&
(k(e,CKEDITOR.tools.clone(b.items)),e.name=b.name,c.push(e));return c}var d=a.config.removeButtons,d=d&&d.split(","),e=a.config.toolbar;"string"==typeof e&&(e=a.config["toolbar_"+e]);return a.toolbar=e?c(e):b()}function h(a){return a._.toolbarGroups||(a._.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 f=function(){this.toolbars=[];this.focusCommandExecuted=!1};f.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var f=0,k;k=b.items[f++];)if(k.focus){k.focus();return}};var a={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){a.toolbox&&(a.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?
setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(g){var h,l=function(a,c){var b,e="rtl"==g.lang.dir,f=g.config.toolbarGroupCycling,w=e?37:39,e=e?39:37,f=void 0===f||f;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!b||!b.items.length;)if(b=9==c?(b?b.next:a.toolbar.next)||g.toolbox.toolbars[0]:(b?b.previous:a.toolbar.previous)||g.toolbox.toolbars[g.toolbox.toolbars.length-1],b.items.length)for(a=b.items[h?b.items.length-
1:0];a&&!a.focus;)(a=h?a.previous:a.next)||(b=0);a&&a.focus();return!1;case w:b=a;do b=b.next,!b&&f&&(b=a.toolbar.items[0]);while(b&&!b.focus);b?b.focus():l(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():l(a,40==c?w:e),!1;case e:case 38:b=a;do b=b.previous,!b&&f&&(b=a.toolbar.items[a.toolbar.items.length-1]);while(b&&!b.focus);b?b.focus():(h=1,l(a,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return g.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};g.on("uiSpace",function(a){if(a.data.space==
g.config.toolbarLocation){a.removeListener();g.toolbox=new f;var c=CKEDITOR.tools.getNextId(),d=['\x3cspan id\x3d"',c,'" class\x3d"cke_voice_label"\x3e',g.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+g.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',c,'" onmousedown\x3d"return false;"\x3e'],c=!1!==g.config.toolbarStartupExpanded,e,h;g.config.toolbarCanCollapse&&g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&d.push('\x3cspan class\x3d"cke_toolbox_main"'+
(c?"\x3e":' style\x3d"display:none"\x3e'));for(var m=g.toolbox.toolbars,x=b(g),r=x.length,t=0;t<r;t++){var v,z=0,p,y=x[t],q="/"!==y&&("/"===x[t+1]||t==r-1),u;if(y)if(e&&(d.push("\x3c/span\x3e"),h=e=0),"/"===y)d.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{u=y.items||y;for(var B=0;B<u.length;B++){var A=u[B],C;if(A){var E=function(a){a=a.render(g,d);F=z.items.push(a)-1;0<F&&(a.previous=z.items[F-1],a.previous.next=a);a.toolbar=z;a.onkey=l;a.onfocus=function(){g.toolbox.focusCommandExecuted||
g.focus()}};if(A.type==CKEDITOR.UI_SEPARATOR)h=e&&A;else{C=!1!==A.canGroup;if(!z){v=CKEDITOR.tools.getNextId();z={id:v,items:[]};p=y.name&&(g.lang.toolbar.toolbarGroups[y.name]||y.name);d.push('\x3cspan id\x3d"',v,'" class\x3d"cke_toolbar'+(q?' cke_toolbar_last"':'"'),p?' aria-labelledby\x3d"'+v+'_label"':"",' role\x3d"toolbar"\x3e');p&&d.push('\x3cspan id\x3d"',v,'_label" class\x3d"cke_voice_label"\x3e',p,"\x3c/span\x3e");d.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var F=m.push(z)-
1;0<F&&(z.previous=m[F-1],z.previous.next=z)}C?e||(d.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),e=1):e&&(d.push("\x3c/span\x3e"),e=0);h&&(E(h),h=0);E(A)}}}e&&(d.push("\x3c/span\x3e"),h=e=0);z&&d.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}g.config.toolbarCanCollapse&&d.push("\x3c/span\x3e");if(g.config.toolbarCanCollapse&&g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var G=CKEDITOR.tools.addFunction(function(){g.execCommand("toolbarCollapse")});
g.on("destroy",function(){CKEDITOR.tools.removeFunction(G)});g.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var c=a.ui.space("toolbar_collapser"),b=c.getPrevious(),d=a.ui.space("contents"),e=b.getParent(),g=parseInt(d.$.style.height,10),f=e.$.offsetHeight,k=c.hasClass("cke_toolbox_collapser_min");k?(b.show(),c.removeClass("cke_toolbox_collapser_min"),c.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(b.hide(),c.addClass("cke_toolbox_collapser_min"),c.setAttribute("title",a.lang.toolbar.toolbarExpand));
c.getFirst().setText(k?"▲":"◀");d.setStyle("height",g-(e.$.offsetHeight-f)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});g.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");d.push('\x3ca title\x3d"'+(c?g.lang.toolbar.toolbarCollapse:g.lang.toolbar.toolbarExpand)+'" id\x3d"'+g.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
c||d.push(" cke_toolbox_collapser_min");d.push('" onclick\x3d"CKEDITOR.tools.callFunction('+G+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}d.push("\x3c/span\x3e");a.data.html+=d.join("")}});g.on("destroy",function(){if(this.toolbox){var a,c=0,b,e,g;for(a=this.toolbox.toolbars;c<a.length;c++)for(e=a[c].items,b=0;b<e.length;b++)g=e[b],g.clickFn&&CKEDITOR.tools.removeFunction(g.clickFn),g.keyDownFn&&CKEDITOR.tools.removeFunction(g.keyDownFn)}});g.on("uiReady",function(){var a=
g.ui.space("toolbox");a&&g.focusManager.add(a,1)});g.addCommand("toolbarFocus",a);g.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");g.ui.add("-",CKEDITOR.UI_SEPARATOR,{});g.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,f){var k=h(this.editor),c=0===b,d={name:a};if(f){if(f=CKEDITOR.tools.search(k,function(a){return a.name==
f})){!f.groups&&(f.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(f.groups,b),0<=b)){f.groups.splice(b+1,0,a);return}c?f.groups.splice(0,0,a):f.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(k,function(a){return a.name==b}));c?k.splice(0,0,a):"number"==typeof b?k.splice(b+1,0,d):k.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function b(a,c,b){c.type||(c.type="auto");if(b&&!1===a.fire("beforePaste",c)||!c.dataValue&&c.dataTransfer.isEmpty())return!1;
c.dataValue||(c.dataValue="");if(CKEDITOR.env.gecko&&"drop"==c.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});return a.fire("paste",c)}function h(a){function c(){var b=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(c){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==c.name||C.initPasteDataTransfer(c,a),c.data.preventDefault())};b.on("copy",d);b.on("cut",d);b.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}b.on(C.mainPasteEvent,
function(a){"beforepaste"==C.mainPasteEvent&&E||u(a)});"beforepaste"==C.mainPasteEvent&&(b.on("paste",function(a){F||(f(),a.data.preventDefault(),u(a),h("paste"))}),b.on("contextmenu",k,null,null,0),b.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||k()},null,null,0));b.on("beforecut",function(){!E&&l(a)});var g;b.attachListener(CKEDITOR.env.ie?b:a.document.getDocumentElement(),"mouseup",function(){g=setTimeout(B,0)});a.on("destroy",function(){clearTimeout(g)});b.on("keyup",
B)}function d(c){return{type:c,canUndo:"cut"==c,startDisabled:!0,fakeKeystroke:"cut"==c?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var c;var b=this.type;if(CKEDITOR.env.ie)c=h(b);else try{c=a.document.$.execCommand(b,!1,null)}catch(d){c=!1}c||a.showNotification(a.lang.clipboard[this.type+"Error"]);return c}}}function g(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,c){function d(c,f){f="undefined"!==typeof f?f:!0;c?(c.method="paste",c.dataTransfer||
(c.dataTransfer=C.initPasteDataTransfer()),b(a,c,f)):g&&!a._.forcePasteDialog&&a.showNotification(h,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:e,returnValue:!!c})}c="undefined"!==typeof c&&null!==c?c:{};var e=this,g="undefined"!==typeof c.notification?c.notification:!0,f=c.type,k=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),h="string"===typeof g?g:a.lang.clipboard.pasteNotification.replace(/%1/,
'\x3ckbd aria-label\x3d"'+k.aria+'"\x3e'+k.display+"\x3c/kbd\x3e"),k="string"===typeof c?c:c.dataValue;f&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=f:delete a._.nextPasteType;"string"===typeof k?d({dataValue:k}):a.getClipboardData(d)}}}function f(){F=1;setTimeout(function(){F=0},100)}function k(){E=1;setTimeout(function(){E=0},10)}function h(c){var b=a.document,d=b.getBody(),g=!1,f=function(){g=!0};d.on(c,f);7<CKEDITOR.env.version?b.$.execCommand(c):
b.$.selection.createRange().execCommand(c);d.removeListener(c,f);return g}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var c=a.getSelection(),b,d,g;c.getType()==CKEDITOR.SELECTION_ELEMENT&&(b=c.getSelectedElement())&&(d=c.getRanges()[0],g=a.document.createText(""),g.insertBefore(b),d.setStartBefore(g),d.setEndAfter(b),c.selectRanges([d]),setTimeout(function(){b.getParent()&&(g.remove(),c.selectElement(b))},0))}}function m(c,b){var d=a.document,g=a.editable(),f=function(a){a.cancel()},k;
if(!d.getById("cke_pastebin")){var h=a.getSelection(),l=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!g.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var p=0,d=d.getWindow();CKEDITOR.env.webkit?(g.append(n),n.addClass("cke_editable"),g.is("body")||(p="static"!=g.getComputedStyle("position")?g:CKEDITOR.dom.element.get(g.$.offsetParent),p=p.getDocumentPosition().y)):g.getAscendant(CKEDITOR.env.ie?
"body":"html",1).append(n);n.setStyles({position:"absolute",top:d.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(p=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)k=g.once("blur",f,null,null,-100);p&&n.focus();p=new CKEDITOR.dom.range(n);p.selectNodeContents(n);var q=p.select();CKEDITOR.env.ie&&(k=g.once("blur",function(){a.lockSelection(q)}));var v=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=v);k&&k.removeListener();CKEDITOR.env.ie&&g.focus();h.selectBookmarks(l);n.remove();var c;CKEDITOR.env.webkit&&(c=n.getFirst())&&c.is&&c.hasClass("Apple-style-span")&&
(n=c);a.removeListener("selectionChange",f);b(n.getHtml())},0)}}function y(){if("paste"==C.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();f();var c=a.focusManager;c.lock();if(a.editable().fire(C.mainPasteEvent)&&!h("paste"))return c.unlock(),!1;c.unlock();return!0}function q(c){if("wysiwyg"==a.mode)switch(c.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:c=a.editable();f();"paste"==C.mainPasteEvent&&c.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function u(c){var d={type:"auto",method:"paste",dataTransfer:C.initPasteDataTransfer(c)};d.dataTransfer.cacheData();var g=!1!==a.fire("beforePaste",d);g&&C.canClipboardApiBeTrusted(d.dataTransfer,a)?(c.data.preventDefault(),setTimeout(function(){b(a,d)},0)):m(c,function(c){d.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");g&&b(a,d)})}function B(){if("wysiwyg"==a.mode){var c=A("paste");a.getCommand("cut").setState(A("cut"));
a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(c);a.fire("pasteState",c)}}function A(c){var b=a.getSelection(),b=b&&b.getRanges()[0];if((a.readOnly||b&&b.checkReadOnly())&&c in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==c)return CKEDITOR.TRISTATE_OFF;c=a.getSelection();b=c.getRanges();return c.getType()==CKEDITOR.SELECTION_NONE||1==b.length&&b[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,E=0,F=0;(function(){a.on("key",
q);a.on("contentDom",c);a.on("selectionChange",B);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:A("cut"),copy:A("copy"),paste:A("paste")}});var b=null;a.on("menuShow",function(){b&&(b.removeListener(),b=null);var c=a.contextMenu.findItemByCommandName("paste");c&&c.element&&(b=c.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(c){if(c=a.ui.get(c))if(c=
CKEDITOR.document.getById(c._.id))c.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function c(b,d,g,f,k){var h=a.lang.clipboard[d];a.addCommand(d,g);a.ui.addButton&&a.ui.addButton(b,{label:h,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:h,command:d,group:"clipboard",order:k})}c("Cut","cut",d("cut"),10,1);c("Copy","copy",d("copy"),20,4);c("Paste","paste",g(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=
function(c,b){function d(a){a.removeListener();a.cancel();b(a.data)}function g(a){a.removeListener();a.cancel();b({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,k="auto";b||(b=c,c=null);a.on("beforePaste",function(a){a.removeListener();f=!0;k=a.data.type},null,null,1E3);a.on("paste",d,null,null,0);!1===y()&&(a.removeListener("paste",d),a._.forcePasteDialog&&f&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",g),a.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",g);a.data._.committed||b(null)})):b(null))}}function f(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function a(a,c){function b(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}c=c.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");c=c.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(c.match(/^[^<]$/))return c;CKEDITOR.env.webkit&&-1<c.indexOf("\x3cdiv\x3e")&&(c=c.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),c.match(/<div>(<br>|)<\/div>/)&&(c="\x3cp\x3e"+c.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return b(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),c=c.replace(/<\/div><div>/g,"\x3cbr\x3e"),c=c.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(c=c.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<c.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(c="\x3cp\x3e"+c.replace(/(<br>){2,}/g,function(a){return b(a.length/4)})+"\x3c/p\x3e"));return l(a,c)}function g(a){function c(){var a={},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=
b&&(a[b]=1);return a}var b={};return{get:function(d){return"plain-text"==d?b.plainText||(b.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=b.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:c(),attributes:!0,styles:!1,classes:!1}}),d=b.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function m(a,c,b){c=CKEDITOR.htmlParser.fragment.fromHtml(c);var d=new CKEDITOR.htmlParser.basicWriter;b.applyTo(c,!0,!1,a.activeEnterMode);c.writeHtml(d);return d.getHtml()}
function l(a,c){a.enterMode==CKEDITOR.ENTER_BR?c=c.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(c=c.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return c}function k(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function c(a){var c=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function d(c,g,f){g.select();b(a,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot");
f.sourceEditor.editable().extractHtmlFromRange(c);f.sourceEditor.getSelection().selectRanges([c]);f.sourceEditor.fire("saveSnapshot")}function g(d,f){d.select();b(a,{dataTransfer:f,method:"drop"},1);c.resetDragDataTransfer()}function f(c,b,d){var g={$:c.data.$,target:c.data.getTarget()};b&&(g.dragRange=b);d&&(g.dropRange=d);!1===a.fire(c.name,g)&&c.data.preventDefault()}function k(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var h=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a),
m=a.ui.space("top"),y=a.ui.space("bottom");c.preventDefaultDropOnElement(m);c.preventDefaultDropOnElement(y);h.attachListener(l,"dragstart",f);h.attachListener(a,"dragstart",c.resetDragDataTransfer,c,null,1);h.attachListener(a,"dragstart",function(b){c.initDragDataTransfer(b,a)},null,null,2);h.attachListener(a,"dragstart",function(){var b=c.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=b?k(b.startContainer):null,c.dragEndContainerChildCount=
b?k(b.endContainer):null)},null,null,100);h.attachListener(l,"dragend",f);h.attachListener(a,"dragend",c.initDragDataTransfer,c,null,1);h.attachListener(a,"dragend",c.resetDragDataTransfer,c,null,100);h.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var c=a.data.getTarget();c&&c.is&&c.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});
h.attachListener(l,"drop",function(b){if(!b.data.$.defaultPrevented&&(b.data.preventDefault(),!a.readOnly)){var d=b.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(b,a),g=c.dragRange;d&&f(b,g,d)}}},null,null,9999);h.attachListener(a,"drop",c.initDragDataTransfer,c,null,1);h.attachListener(a,"drop",function(b){if(b=b.data){var f=b.dropRange,k=b.dragRange,h=b.dataTransfer;h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(k,
f,h,a)},0):h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(k,f,h):g(f,h)}},null,null,9999)})}var d;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(b){function d(a){if(!a||t===a.id)return!1;var c=a.getTypes(),c=1===c.length&&"Files"===c[0];a=1===a.getFilesCount();return c&&a}var k,l=g(b);b.config.forcePasteAsPlainText?k="plain-text":b.config.pasteFilter?k=b.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in b.config||(k="semantic-content");
b.pasteFilter=l.get(k);h(b);c(b);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var r=["image/png","image/jpeg","image/gif"],t;b.on("paste",function(a){var c=a.data,g=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d(g)&&(g=g.getFile(0),-1!=CKEDITOR.tools.indexOf(r,g.type))){var f=new FileReader;f.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+f.result+'" /\x3e';b.fire("paste",a.data)},!1);f.addEventListener("abort",function(){b.fire("paste",
a.data)},!1);f.addEventListener("error",function(){b.fire("paste",a.data)},!1);f.readAsDataURL(g);t=c.dataTransfer.id;a.stop()}},null,null,1)}b.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var c=a.data.dataTransfer,d=c.getData("text/html");if(d)a.data.dataValue=d,a.data.type="html";else if(d=c.getData("text/plain"))a.data.dataValue=b.editable().transformPlainTextToHtml(d),a.data.type="text"}},null,null,1);b.on("paste",
function(a){var c=a.data.dataValue,b=CKEDITOR.dtd.$block;-1<c.indexOf("Apple-")&&(c=c.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(c=c.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,c){return c.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<c.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",c=c.replace(/<br class="Apple-interchange-newline">/,"")),c=c.replace(/(<[^>]+) class="Apple-[^"]*"/gi,
"$1"));if(c.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,g=new CKEDITOR.dom.element("div");for(g.setHtml(c);1==g.getChildCount()&&(d=g.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)g=e=d;e&&(c=e.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?c=c.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(c,d){return d.toLowerCase()in b?(a.data.preSniffing="html","\x3c"+d):c}):CKEDITOR.env.webkit?c=c.replace(/<\/(\w+)><div><br><\/div>$/,function(c,d){return d in
b?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):c}):CKEDITOR.env.gecko&&(c=c.replace(/(\s)<br>$/,"$1"));a.data.dataValue=c},null,null,3);b.on("paste",function(c){c=c.data;var d=b._.nextPasteType||c.type,g=c.dataValue,k,h=b.config.clipboard_defaultContentType||"html",n=c.dataTransfer.getTransferType(b)==CKEDITOR.DATA_TRANSFER_EXTERNAL,w=!0===b.config.forcePasteAsPlainText;k="html"==d||"html"==c.preSniffing?"html":f(g);delete b._.nextPasteType;"htmlifiedtext"==k&&(g=a(b.config,g));if("text"==d&&"html"==k)g=
m(b,g,l.get("plain-text"));else if(n&&b.pasteFilter&&!c.dontFilter||w)g=m(b,g,b.pasteFilter);c.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);c.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==k||"html"==h?"html":"text");c.type=d;c.dataValue=g;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);b.on("paste",function(a){a=a.data;a.dataValue&&(b.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){b.fire("afterPaste")},0))},null,null,
1E3);b.on("pasteDialog",function(a){setTimeout(function(){b.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,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(a,c,b){a.ui.addButton&&(a.ui.addButton(c,
b),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(c))},canClipboardApiBeTrusted:function(a,c){return a.getTransferType(c)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.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?!0:!1},getDropTarget:function(a){var c=a.editable();return CKEDITOR.env.ie&&
9>CKEDITOR.env.version||c.isInline()?c:a.document},fixSplitNodesAfterDrop:function(a,c,b,d){function g(a,b,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(b)&&d!=b.getChildCount())return a=c.startContainer.getChild(c.startOffset-1),b=c.startContainer.getChild(c.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&b&&b.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+b.getText()),b.remove(),c.setStart(a,d),c.collapse(!0)),!0}var f=c.startContainer;"number"==typeof d&&"number"==
typeof b&&f.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,f,b)||g(a.endContainer,f,d))},isDropRangeAffectedByDragRange:function(a,c){var b=c.startContainer,d=c.endOffset;return a.endContainer.equals(b)&&a.endOffset<=d||a.startContainer.getParent().equals(b)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(b)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(a,c,d,g){var f=CKEDITOR.plugins.clipboard,k=g.editable(),h,l;g.fire("saveSnapshot");g.fire("lockSnapshot",{dontUpdate:1});
CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,c,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,c))||(h=a.createBookmark(!1));f=c.clone().createBookmark(!1);l&&(h=a.createBookmark(!1));a=h.startNode;c=h.endNode;l=f.startNode;c&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=g.createRange();a.moveToBookmark(h);k.extractHtmlFromRange(a,1);c=g.createRange();
f.startNode.getCommonAncestor(k)||(f=g.getSelection().createBookmarks()[0]);c.moveToBookmark(f);b(g,{dataTransfer:d,method:"drop",range:c},1);g.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,c){var b=a.data.$,d=b.clientX,g=b.clientY,f=c.getSelection(!0).getRanges()[0],k=c.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&c.document.$.caretRangeFromPoint(d,g))b=c.document.$.caretRangeFromPoint(d,g),k.setStart(CKEDITOR.dom.node(b.startContainer),b.startOffset),
k.collapse(!0);else if(b.rangeParent)k.setStart(CKEDITOR.dom.node(b.rangeParent),b.rangeOffset),k.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&f&&c.editable().hasFocus)return f;if(document.body.createTextRange){c.focus();b=c.document.getBody().$.createTextRange();try{for(var h=!1,l=0;20>l&&!h;l++){if(!h)try{b.moveToPoint(d,g-l),h=!0}catch(m){}if(!h)try{b.moveToPoint(d,g+l),h=!0}catch(q){}}if(h){var u="cke-temp-"+(new Date).getTime();b.pasteHTML('\x3cspan id\x3d"'+u+'"\x3e​\x3c/span\x3e');
var B=c.document.getById(u);k.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START);B.remove()}else{var A=c.document.$.elementFromPoint(d,g),C=new CKEDITOR.dom.element(A),E;if(C.equals(c.editable())||"html"==C.getName())return f&&f.startContainer&&!f.startContainer.equals(c.editable())?f:null;E=C.getClientRect();d<E.left?k.setStartAt(C,CKEDITOR.POSITION_AFTER_START):k.setStartAt(C,CKEDITOR.POSITION_BEFORE_END);k.collapse(!0)}}catch(F){return null}}else return null}return k},initDragDataTransfer:function(a,
c){var b=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(b,c);"dragstart"===a.name&&d.storeId();b?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,c){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var b=a.data.$.clipboardData,d=new this.dataTransfer(b,c);"copy"!==a.name&&"cut"!==a.name||d.storeId();this.copyCutData&&
d.id==this.copyCutData.id?(d=this.copyCutData,d.$=b):this.copyCutData=d;return d}return new this.dataTransfer(null,c)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,c)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",k)}};d=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,c){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,
data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(d);this.id||(this.id="Text"==d?"":"cke-"+CKEDITOR.tools.getUniqueId());c&&(this.sourceEditor=c,this.setData("text/html",c.getSelectedHtml(1)),"Text"==d||this.getData("text/plain")||this.setData("text/plain",c.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(a,c){a=this._.normalizeType(a);var b="text/html"==a&&c?this._.nativeHtmlCache:this._.data[a];if(void 0===b||null===b||""===b){if(this._.fallbackDataTransfer.isRequired())b=this._.fallbackDataTransfer.getData(a,c);else try{b=this.$.getData(a)||""}catch(d){b=""}"text/html"!=a||c||(b=this._stripHtml(b))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==
b.substring(0,7)&&(b="");if("string"===typeof b)var g=b.indexOf("\x3c/html\x3e"),b=-1!==g?b.substring(0,g+7):b;return b},setData:function(a,c){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(c),this._.nativeHtmlCache=c):this._.data[a]=c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==d&&"Text"==a&&(this.id=c),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,c);else try{this.$.setData(a,c)}catch(b){}},storeId:function(){"Text"!==
d&&this.setData(d,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(b){b=c._.normalizeType(b);var d=c.getData(b);"text/html"==b&&(c._.nativeHtmlCache=c.getData(b,!0),d=c._stripHtml(d));d&&(c._.data[b]=d)}if(this.$){var c=this,b,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(b=0;b<this.$.types.length;b++)a(this.$.types[b])}else a("Text"),
a("URL");d=this._getImageFromClipboard();if(this.$&&this.$.files||d){this._.files=[];if(this.$.files&&this.$.files.length)for(b=0;b<this.$.files.length;b++)this._.files.push(this.$.files[b]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length?
this.$.files[a]:0===a?this._getImageFromClipboard():void 0},isEmpty:function(){var a={},c;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(c){a[c]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var b=0;b<this.$.types.length;b++)a[this.$.types[b]]=1}else a.Text=1,a.URL=1;"Text"!=d&&(a[d]=0);for(c in a)if(a[c]&&""!==this.getData(c))return!1;return!0},getTypes:function(){return this.$&&this.$.types?
[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var a;try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&a.type)return a}catch(c){}},_stripHtml:function(a){function c(a){var b=new CKEDITOR.htmlParser,d,e;b.onTagOpen=function(a){"body"===a&&(d=b._.htmlPartsRegex.lastIndex)};b.onTagClose=function(a){"body"===a&&(e=b._.htmlPartsRegex.lastIndex)};b.parse(a);return"number"!==typeof d||"number"!==typeof e?a:a.substring(d,e).replace(/<\/body\s*>$/gi,"")}a&&a.length&&
(a=c(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,c=this._dataTransfer.$;
if(null===a._isCustomMimeTypeSupported)if(c){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{c.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===c.getData("cke/mimetypetest"),c.clearData("cke/mimetypetest")}catch(b){}}else return!1;return!a._isCustomMimeTypeSupported},getData:function(a,c){var b=this._getData(this._customDataFallbackType,!0);if(c)return b;var b=this._extractDataComment(b),d=null,d=a===this._customDataFallbackType?
b.content:b.data&&b.data[a]?b.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,c){var b=a===this._customDataFallbackType;b&&(c=this._applyDataComment(c,this._getFallbackTypeData()));var d=c,g=this._dataTransfer.$;try{g.setData(a,d),b&&(this._dataTransfer._.nativeHtmlCache=d)}catch(f){if(this._isUnsupportedMimeTypeError(f)){b=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(b._customTypes,a)&&b._customTypes.push(a);var b=this._getFallbackTypeContent(),
k=this._getFallbackTypeData();k[a]=d;try{d=this._applyDataComment(b,k),g.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(h){d=""}}}return d},_getData:function(a,c){var b=this._dataTransfer._.data;if(!c&&b[a])return b[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a=this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);
return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,c=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},b=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==b[a]?c[a]=b[a]:void 0!==c[a]&&(c[a]=c[a])},this);return c},_isUnsupportedMimeTypeError:function(a){return a.message&&-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var c={data:null,content:a||""};if(a&&
16<a.length){var b;(b=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&b[1]&&(c.data=JSON.parse(decodeURIComponent(b[1])),c.content=a.replace(b[0],""))}return c},_applyDataComment:function(a,c){var b="";c&&CKEDITOR.tools.object.keys(c).length&&(b="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(c))+"--\x3e");return b+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,function(){var b=!1;CKEDITOR.plugins.add("codemirror",{_createCodeMirrorEditor:function(b){var a=this;b.addMode("source",
function(g){var m=this,l=b.ui.space("contents"),k=l.getDocument().createElement("textarea");l.append(k);m.codeMirrorEditor=CodeMirror.fromTextArea(k.$,{lineNumbers:!0,lineWrapping:!0,mode:"text/html"});l=b.getData(1);k=b.editable(new h(b,k));k.setData(l);m.codeMirrorEditor.setValue(l);m.codeMirrorEditor.getWrapperElement().classList.add("cke_enable_context_menu");k=k.getParent().getClientSize();k.height&&m.codeMirrorEditor.setSize(null,k.height);m.codeMirrorEditor.on("change",a._handleCodeMirrorChange.bind(m,
b,l));b.on("resize",a._handleEditorResize.bind(m));b.on("dataReady",function(a){a=a.data;var b=m.codeMirrorEditor.getValue();a&&a!==b&&m.codeMirrorEditor.setValue(a)});b.fire("ariaWidget",this);g()})},_handleCodeMirrorChange:function(b,a){var g=this.codeMirrorEditor.getValue();g!==a&&b.setData(g)},_handleEditorResize:function(b){this.codeMirrorEditor.setSize(null,b.data.contentsHeight)},hidpi:!0,icons:"source,source-rtl",init:function(f){var a=this;f.plugins.detectConflict("codemirror",["sourcearea"])||
f.elementMode===CKEDITOR.ELEMENT_MODE_INLINE||(b||(CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css"),CKEDITOR.document.appendStyleSheet(this.path+"vendors/vendors.css"),b=!0),CKEDITOR.scriptLoader.load(this.path+"vendors/vendors.js",function(){a._createCodeMirrorEditor(f)}),f.addCommand("codemirror",CKEDITOR.plugins.codemirror.commands.source),f.addCommand("codemirrordialog",CKEDITOR.tools.extend(new CKEDITOR.dialogCommand("codemirrordialog"),{modes:{source:1,wysiwyg:0},state:CKEDITOR.TRISTATE_OFF})),
CKEDITOR.dialog.add("codemirrordialog",this.path+"dialogs/codemirrordialog.js"),f.ui.addButton&&(f.ui.addButton("Source",{label:f.lang.codemirror.source,command:"codemirror",toolbar:"mode,10"}),f.ui.addButton("Expand",{label:f.lang.common.preview,command:"codemirrordialog",toolbar:"mode,11"})),f.on("mode",function(){f.getCommand("codemirror").setState("source"===f.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}))}});var h=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(b){this.setValue(b);
this.status="ready";this.editor.fire("dataReady",b)},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(b){this[(b?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){h.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.codemirror={commands:{source:{modes:{source:1,wysiwyg:1},editorFocus:!0,exec:function(b){"wysiwyg"===b.mode&&b.fire("saveSnapshot");b.getCommand("codemirror").setState(CKEDITOR.TRISTATE_DISABLED);
b.setMode("source"===b.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function b(b){var f=this._;f.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(b),f.on?f.panel.hide():f.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){var f=h.panel||{};delete h.panel;this.base(h);this.document=f.parent&&f.parent.getDocument()||CKEDITOR.document;
f.block={attributes:f.attributes};f.toolbarRelated=!0;this.hasArrow="listbox";this.click=b;this._={panelDefinition:f}},statics:{handler:{create:function(b){return new CKEDITOR.ui.panelButton(b)}}},proto:{createPanel:function(b){var f=this._;if(!f.panel){var a=this._.panelDefinition,g=this._.panelDefinition.block,m=a.parent||CKEDITOR.document.getBody(),l=this._.panel=new CKEDITOR.ui.floatPanel(b,m,a),a=l.addBlock(f.id,g),k=this,c=b.getCommand(this.command);l.onShow=function(){k.className&&this.element.addClass(k.className+
"_panel");k.setState(CKEDITOR.TRISTATE_ON);f.on=1;k.editorFocus&&b.focus();if(k.onOpen)k.onOpen()};l.onHide=function(a){k.className&&this.element.getFirst().removeClass(k.className+"_panel");!k.modes&&c?k.setStateFromCommand(c):k.setState(k.modes&&k.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);f.on=0;if(!a&&k.onClose)k.onClose()};l.onEscape=function(){l.hide(1);k.document.getById(f.id).focus()};if(this.onBlock)this.onBlock(l,a);a.onHide=function(){f.on=0;!k.modes&&k.command?k.setStateFromCommand(c):
k.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(b){this.setState(b.state)}}})},beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});
this.id=CKEDITOR.tools.getNextId();this.document=a;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var b=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),h=CKEDITOR.addTemplate("panel-frame",'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),
f=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e');CKEDITOR.ui.panel.prototype={render:function(a,g){var m={editorId:a.id,id:this.id,langCode:a.langCode,dir:a.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":a.config.baseFloatZIndex+1};
this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),c=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&c.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));a.write(f.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+
c+");"},m)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var c=a.data.getKeystroke(),b=this.document.getById(this.id).getAttribute("dir");if("input"!==a.data.getTarget().getName()||37!==c&&39!==c)this._.onKeyDown&&!1===this._.onKeyDown(c)?"input"===a.data.getTarget().getName()&&32===c||a.data.preventDefault():(27==c||c==("rtl"==b?39:37))&&this.onEscape&&!1===this.onEscape(c)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else a=
this.document.getById(this.id);this._.holder=a}return a};if(this.isFramed){var l=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";m.frame=h.output({id:this.id+"_frame",src:l})}l=b.output(m);g&&g.push(l);return l},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);
this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var b=this._.currentBlock,f=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",f);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(a,
b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);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(a){-1!=a&&(a=this._.getItems().getItem(this._.focusIndex=a),CKEDITOR.env.webkit&&
a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var b=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},f=this._.getItems(),h,k,c=f.count()-1;0<=c;c--)if(h=f.getItem(c),h.getAscendant(b)||(k=h,this._.focusIndex=c),"true"==h.getAttribute("aria-selected")){k=h;this._.focusIndex=c;break}k&&(a&&a(),CKEDITOR.env.webkit&&k.getDocument().getWindow().focus(),k.focus(),this.onMark&&this.onMark(k))},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(a,b){var f=this.keys[a];switch(f){case "next":for(var h=this._.focusIndex,f=this._.getItems(),k;k=f.getItem(++h);)if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=h;k.focus(!0);break}return k||b?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":h=this._.focusIndex;for(f=this._.getItems();0<h&&(k=
f.getItem(--h));){if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=h;k.focus(!0);break}k=null}return k||b?!1:(this._.focusIndex=f.count(),this.onKeyDown(a,1));case "click":case "mouseup":return h=this._.focusIndex,(k=0<=h&&this._.getItems().getItem(h))&&k.fireEventHandler(f,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function b(b,a,g,m,l){l=CKEDITOR.tools.genKey(a.getUniqueId(),
g.getUniqueId(),b.lang.dir,b.uiColor||"",m.css||"",l||"");var k=h[l];k||(k=h[l]=new CKEDITOR.ui.panel(a,m),k.element=g.append(CKEDITOR.dom.element.createFromHtml(k.render(b),a)),k.element.setStyles({display:"none",position:"absolute"}));return k}var h={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(f,a,g,h){function l(){e.hide()}g.forceIFrame=1;g.toolbarRelated&&f.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a=CKEDITOR.document.getById("cke_"+f.name));var k=a.getDocument();h=b(f,k,
a,g,h||0);var c=h.element,d=c.getFirst(),e=this;c.disableContextMenu();this.element=c;this._={editor:f,panel:h,parentElement:a,definition:g,document:k,iframe:d,children:[],dir:f.lang.dir,showBlockParams:null,markFirst:void 0!==g.markFirst?g.markFirst:!0};f.on("mode",l);f.on("resize",l);k.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(b,a){return this._.panel.addBlock(b,a)},addListBlock:function(b,a){return this._.panel.addListBlock(b,a)},getBlock:function(b){return this._.panel.getBlock(b)},
showBlock:function(b,a,g,h,l,k){var c=this._.panel,d=c.showBlock(b);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var e=this._.editor.editable();this._.returnFocus=e.hasFocus?e:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,e=this._.iframe,e=CKEDITOR.env.ie&&!CKEDITOR.env.edge?e:new CKEDITOR.dom.window(e.$.contentWindow),w=n.getDocument(),x=this._.parentElement.getPositionedAncestor(),r=a.getDocumentPosition(w),w=x?x.getDocumentPosition(w):
{x:0,y:0},t="rtl"==this._.dir,v=r.x+(h||0)-w.x,z=r.y+(l||0)-w.y;!t||1!=g&&4!=g?t||2!=g&&3!=g||(v+=a.$.offsetWidth-1):v+=a.$.offsetWidth;if(3==g||4==g)z+=a.$.offsetHeight-1;this._.panel._.offsetParentId=a.getId();n.setStyles({top:z+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(e);this._.blurSet||(CKEDITOR.event.useCapture=!0,e.on("blur",function(a){function c(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&
this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(c,0,this)):c.call(this))},this),e.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(e.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),e.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);c.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&
!1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(d.autoSize){var b=d.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?d.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=d.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||
0)+3);a.setStyle("height",b+"px");c._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");t&&(v-=n.$.offsetWidth);n.setStyle("left",v+"px");var b=c.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),e=a.width||a.right-a.left,g=a.height||a.bottom-a.top,f=t?a.right:b.width-a.left,h=t?b.width-a.right:a.left;t?f<e&&(v=h>e?v+e:b.width>e?v-a.left:v-a.right+b.width):f<e&&(v=h>e?v-e:b.width>e?v-a.right+b.width:v-a.left);e=a.top;b.height-
a.top<g&&(z=e>g?z-g:b.height>g?z-a.bottom+b.height:z-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&(v=CKEDITOR.env.ie8Compat?v-2*n.getDocument().getDocumentElement().$.scrollLeft:v-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);
n.setStyles({top:z+"px",left:v+"px"});n.setOpacity(1);k&&k()},this);c.isLoaded?a():c.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();d.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){d.markFirstDisplayed?d.markFirstDisplayed():d._.markFirstDisplayed()},0):d.markFirstDisplayed?d.markFirstDisplayed():
d._.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 b=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,b))},focus:function(){if(CKEDITOR.env.webkit){var b=CKEDITOR.document.getActive();b&&!b.equals(this._.iframe)&&b.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var b=
this._.iframe.getFrameDocument().getActive();b&&b.is("a")&&(this._.lastFocused=b)},hide:function(b){if(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");if(b=b&&this._.returnFocus)CKEDITOR.env.webkit&&b.type&&b.getWindow().$.focus(),b.focus();delete this._.lastFocused;this._.showBlockParams=
null;this._.editor.fire("panelHide",this)}},allowBlur:function(b){var a=this._.panel;void 0!==b&&(a.allowBlur=b);return a.allowBlur},showAsChild:function(b,a,g,h,l,k){if(this._.activeChild!=b||b._.panel._.offsetParentId!=g.getId())this.hideChild(),b.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=b,this._.focused=!1,b.showBlock(a,g,h,l,k),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){b.element.getChild(0).$.style.cssText+=
""},100)},hideChild:function(b){var a=this._.activeChild;a&&(delete a.onHide,delete this._.activeChild,a.hide(),b&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var b=CKEDITOR.tools.isEmpty(CKEDITOR.instances),a;for(a in h){var g=h[a];b?g.destroy():g.element.hide()}b&&(h={})})}(),function(){var b,h,f;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function g(e){function g(){var c=a.config["colorButton_"+v+"Style"];c.childRule="back"==v?function(a){return l(a)}:
function(a){return!(a.is("a")||a.getElementsByTag("a").count())||l(a)};return c}function n(c,b,d){var e={};c&&(e.color=c);b&&(e.colorName=b);b=!CKEDITOR.tools.isEmpty(e)&&new CKEDITOR.style(g(),e);a.execCommand(y,{newStyle:b});if(c&&d)for(d.addColor(c.substr(1).toUpperCase()),c=F.element.find("[role\x3doption]").toArray(),d=0;d<c.length;d++)c[d].setAttributes({"aria-posinset":d+1,"aria-setsize":c.length})}var t=e.name,v=e.type,z=e.title,p=e.order,y=e.commandName;e=e.contentTransformations||{};var q=
new CKEDITOR.style(c["colorButton_"+v+"Style"]),u=CKEDITOR.tools.getNextId()+"_colorBox",B={type:v},A=new CKEDITOR.style(c["colorButton_"+v+"Style"],{color:"inherit"}),C=function(){return CKEDITOR.tools.addFunction(function(c,b,d){a.focus();a.fire("saveSnapshot");"?"==c?a.getColorFromDialog(function(a){a&&n(a,b,E)},null,B):n(c&&"#"+c,b,E);d&&(d.setAttribute("cke_colorlast",!0),a.once("selectionChange",function(){d.removeAttribute("cke_colorlast")}))})}(),E=f.getRowLimit(a)?new f(a,"back"==v?"background-color":
"color",C):void 0,F;a.addCommand(y,{contextSensitive:!0,exec:function(a,c){if(!a.readOnly){var b=c.newStyle;a.removeStyle(A);a.focus();b&&a.applyStyle(b);a.fire("saveSnapshot")}},refresh:function(a,c){A.checkApplicable(c,a,a.activeFilter)?A.checkActive(c,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});a.ui.add(t,CKEDITOR.UI_PANELBUTTON,{label:z,title:z,command:y,editorFocus:0,toolbar:"colors,"+p,allowedContent:q,requiredContent:q,
contentTransformations:e,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":d.panelTitle}},select:function(a){var d=c.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(d,a);a=b.normalizeColor(a);k(F,a);F._.markFirstDisplayed()},onBlock:function(c,b){F=b;b.autoSize=!0;b.element.addClass("cke_colorblock");b.element.setHtml(h(u,C,E?E.getLength():0));b.element.getDocument().getBody().setStyle("overflow","hidden");b.element.getAscendant({html:1}).setStyle("overflow",
"hidden");CKEDITOR.ui.fire("ready",this);var d=b.keys,e="rtl"==a.lang.dir;d[e?37:39]="next";d[40]="next";d[9]="next";d[e?39:37]="prev";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]="click";E&&E.setContainer(b.element.findOne(".cke_colorhistory"))},onOpen:function(){var d=a.getSelection(),e=d&&d.getStartElement(),g=a.elementPath(e),f="back"==v?"background-color":"color";if(g){e=g.block||g.blockLimit||a.document.getBody();do g=e&&e.getComputedStyle(f)||"transparent";while("back"==v&&"transparent"==
g&&e&&(e=e.getParent()));g&&"transparent"!=g||(g="#ffffff");c.colorButton_enableAutomatic&&F.element.findOne("#"+u).setStyle("background-color",g);if(e=d&&d.getRanges()[0]){for(var d=new CKEDITOR.dom.walker(e),h=e.collapsed?e.startContainer:d.next(),e="";h;){h.type!==CKEDITOR.NODE_ELEMENT&&(h=h.getParent());h=b.normalizeColor(h.getComputedStyle(f));e=e||h;if(e!==h){e="";break}h=d.next()}"transparent"==e&&(e="");"fore"==v&&(B.automaticTextColor="#"+b.normalizeColor(g));B.selectionColor=e?"#"+e:"";
k(F,e)}return g}}})}function h(e,g,k){var l=[],m=c.colorButton_colors.split(","),n=a.plugins.colordialog&&c.colorButton_enableMore;k=m.length+k+(n?1:0);var p=1;c.colorButton_enableAutomatic&&(k+=1,p+=1,l.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',d.auto,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',g,',null);return false;"'," href\x3d\"javascript:void('",d.auto,"')\"",' role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',
k,'"\x3e','\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',a.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3cspan class\x3d"cke_colorbox" id\x3d"',e,'"\x3e\x3c/span\x3e',d.auto,"\x3c/td\x3e","\x3c/tr\x3e","\x3c/table\x3e","\x3c/a\x3e"));l.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctbody\x3e');for(e=0;e<m.length;e++){0===e%a.config.colorButton_colorsPerRow&&
l.push("\x3c/tr\x3e\x3ctr\x3e");var y=m[e].split("/"),q=y[0],y=new b(a,{color:y[1]||q,label:y[1]?q:void 0},g);y.setPositionIndex(p+e,k);l.push(y.getHtml())}f.getRowLimit(a)&&f.renderContainer(l,a);n&&l.push("\x3c/tr\x3e","\x3ctr\x3e",'\x3ctd colspan\x3d"',a.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e','\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue',' title\x3d"',d.more,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',
g,",'?');return false;\""," href\x3d\"javascript:void('",d.more,"')\"",' role\x3d"option" aria-posinset\x3d"',k,'" aria-setsize\x3d"',k,'"\x3e',d.more,"\x3c/a\x3e","\x3c/td\x3e");l.push("\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e");return l.join("")}function l(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function k(a,c){var d=a._.getItems(),e=a.element.findOne("[aria-selected]"),g=a.element.findOne("[cke_colorlast]");e&&e.removeAttribute("aria-selected");if(g)g.setAttribute("aria-selected",
!0);else for(e=0;e<d.count();e++)if(g=d.getItem(e),c&&c==b.normalizeColor(g.getAttribute("data-value"))){g.setAttribute("aria-selected",!0);break}}var c=a.config,d=a.lang.colorbutton;if(!CKEDITOR.env.hc){g({name:"TextColor",type:"fore",commandName:"textColor",title:d.textColorTitle,order:10,contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});
var e,n=a.config.colorButton_normalizeBackground;if(void 0===n||n)e=[[{element:"span",left:function(a){var c=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=c.style.parse.background(a.styles.background);return a.color&&1===c.object.keys(a).length},right:function(c){var b=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:c.styles.background})).getDefinition();c.name=b.element;c.styles=b.styles;c.attributes=b.attributes||{};return c}}]];g({name:"BGColor",type:"back",
commandName:"bgColor",title:d.bgColorTitle,order:20,contentTransformations:e})}}});b=CKEDITOR.tools.createClass({$:function(a,g,f){this.$=new CKEDITOR.dom.element("td");this.color=CKEDITOR.tools._isValidColorFormat(g.color)?g.color:"";this.clickFn=f;this.label=g.label||b.colorNames(a)[this.color]||this.color;this.setHtml()},statics:{colorNames:function(a){return a.lang.colorbutton.colors},normalizeColor:function(a){var b=/^(rgb|hsl)a\(/g.test(a),f=/^rgba\((\s*0\s*,?){4}\)$/g.test(a);return b&&!f?
(a=new CKEDITOR.tools.color(a),CKEDITOR.tools.normalizeHex(a.getHex()||"").replace(/#/g,"")):CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}},proto:{getElement:function(){return this.$},getHtml:function(){return this.getElement().getOuterHtml()},setHtml:function(){this.getElement().setHtml('\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"'+this.label+'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction('+
this.clickFn+",'"+this.color+"','"+this.label+"', this); return false;\" href\x3d\"javascript:void('"+this.color+'\')" data-value\x3d"'+this.color+'" role\x3d"option"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#'+this.color+'"\x3e\x3c/span\x3e\x3c/a\x3e')},setPositionIndex:function(a,b){this.getElement().getChild(0).setAttributes({"aria-posinset":a,"aria-setsize":b})}}});h=CKEDITOR.tools.createClass({$:function(){this.$=new CKEDITOR.dom.element("tr");this.$.addClass("cke_colorhistory_row");
this.boxes=[]},proto:{getElement:function(){return this.$},removeLastColor:function(){this.getElement().getLast().remove();return this.boxes.pop()},addNewColor:function(a){this.boxes.unshift(a);this.getElement().append(a.getElement(),!0)},extractColorBox:function(a){var b=CKEDITOR.tools.getIndex(this.boxes,function(b){return b.color===a});if(0>b)return null;this.boxes[b].getElement().remove();return this.boxes.splice(b,1)[0]}}});f=CKEDITOR.tools.createClass({$:function(a,b,f){this.editor=a;this.cssProperty=
b;this.clickFn=f;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,b){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',b.config.colorButton_colorsPerRow,'" align\x3d"center"\x3e',"\x3cspan\x3e\x3chr\x3e\x3c/span\x3e","\x3c/td\x3e","\x3c/tr\x3e","\x3c/tbody\x3e\x3ctbody\x3e")},
getRowLimit:function(a){return a.config.colorButton_historyRowLimit},getCapacity:function(a){return f.getRowLimit(a)*a.config.colorButton_colorsPerRow},colorList:CKEDITOR.tools.style.parse._colors},_:{countColors:function(){var a=CKEDITOR.tools.getStyledSpans(this.cssProperty,this.editor.editable());return CKEDITOR.tools.array.reduce(a,function(a,b){var h=this._.getHexCode(b,this.cssProperty,f.colorList);a[h]=a[h]||0;a[h]+=1;return a},{},this)},getHexCode:function(a,g,f){var h=a.getStyle(g);return h in
f?f[h].substr(1):b.normalizeColor(a.getComputedStyle(g)).toUpperCase()},sortByOccurrencesAscending:function(a,b){var f=[],h;for(h in a){var k={};k[b]=h;k.frequency=a[h];f.push(k)}f.sort(function(a,b){return b.frequency-a.frequency});this._.trimToCapacity(f);return f.reverse()},trimToCapacity:function(a){a.splice(f.getCapacity(this.editor))},addColors:function(a){CKEDITOR.tools.array.forEach(a,function(a){this.addColor(a.colorCode)},this)},extractColorBox:function(a){for(var b=0;b<this.rows.length;b++){var f=
this.rows[b].extractColorBox(a);if(f)return f}return null},moveToBeginning:function(a){this.rows[0].addNewColor(a)},createAtBeginning:function(a){this._.moveToBeginning(new b(this.editor,{color:a},this.clickFn))},addNewRow:function(){this.rows.push(new h);this.container&&this.container.append(this.rows[this.rows.length-1].getElement())},alignRows:function(){for(var a=0;a<f.getRowLimit(this.editor)&&!(this.rows[a].boxes.length<=this.editor.config.colorButton_colorsPerRow);a++)this.rows[a+1]?this._.moveLastBoxToNextRow(a):
a<f.getRowLimit(this.editor)-1?(this._.addNewRow(),this._.moveLastBoxToNextRow(a)):this.rows[a].removeLastColor()},moveLastBoxToNextRow:function(a){this.rows[a+1].addNewColor(this.rows[a].removeLastColor())},refreshPositions:function(){var a=this._.countPanelElements(),b=this._.calculateFirstPosition(a);CKEDITOR.tools.array.forEach(this.rows,function(f){CKEDITOR.tools.array.forEach(f.boxes,function(f){f.setPositionIndex(b,a);b+=1})})},countPanelElements:function(){var a=this.editor.config.colorButton_colors.split(",").length+
this.getLength();this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore&&(a+=1);this.editor.config.colorButton_enableAutomatic&&(a+=1);return a},calculateFirstPosition:function(a){return this.editor.plugins.colordialog&&this.editor.config.colorButton_enableMore?a-this.getLength():a-this.getLength()+1},attachRows:function(){CKEDITOR.tools.array.forEach(this.rows,function(a){this.container.append(a.getElement())},this)}},proto:{setContainer:function(a){this.container=a;this._.attachRows();
this.getLength()&&this.show()},show:function(){this.container&&this.container.show()},renderContentColors:function(){var a=this._.countColors();CKEDITOR.tools.isEmpty(a)||(a=this._.sortByOccurrencesAscending(a,"colorCode"),this._.addColors(a),this._.refreshPositions())},addColor:function(a){var b=this._.extractColorBox(a);this.container&&!this.container.isVisible()&&this.show();b?this._.moveToBeginning(b):this._.createAtBeginning(a);this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,
function(a,b){return a+b.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.add("menu",{requires:"floatpanel",beforeInit:function(b){for(var h=b.config.menu_groups.split(","),f=b._.menuGroups={},a=b._.menuItems={},g=0;g<h.length;g++)f[h[g]]=g+1;b.addMenuGroup=function(a,b){f[a]=b||100};b.addMenuItem=function(b,g){f[g.group]&&(a[b]=new CKEDITOR.menuItem(this,b,g))};b.addMenuItems=
function(a){for(var b in a)this.addMenuItem(b,a[b])};b.getMenuItem=function(b){return a[b]};b.removeMenuItem=function(b){delete a[b]}}}),function(){function b(a){a.sort(function(a,c){return a.group<c.group?-1:a.group>c.group?1:a.order<c.order?-1:a.order>c.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"',
f="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(f='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+f+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+
'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',a=CKEDITOR.addTemplate("menuItem",h),g=CKEDITOR.addTemplate("menuArrow",
'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-
1,block:{}}),d=c.block.attributes=c.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var e=0;e<d.length;e++){var g=d[e](b,a,c);if(g)for(var f in g){var h=this.editor.getMenuItem(f);!h||h.command&&!this.editor.getCommand(h.command).state||(h.state=g[f],this.add(h))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&
this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var d in c){var e=this.editor.getMenuItem(d);
e&&(e.state=c[d],b.add(e))}var g=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){b.show(g,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(a,g,c,d){if(!this.parent&&(this._.onShow(),!this.items.length))return;g=g||("rtl"==this.editor.lang.dir?2:1);var e=this.items,f=this.editor,h=this._.panel,m=this._.element;if(!h){h=this._.panel=
new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);h.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);h.onShow=function(){h._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};h.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);m=h.addBlock(this.id,this._.panelDefinition.block);m.autoSize=!0;var r=m.keys;r[40]="next";r[9]="next";r[38]="prev";r[CKEDITOR.SHIFT+
9]="prev";r["rtl"==f.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";r[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(r[13]="mouseup");m=this._.element=m.element;r=m.getDocument();r.getBody().setStyle("overflow","hidden");r.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,f.config.menu_subMenuDelay||400,this,[a])},
this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var c=this.items[a];if(c.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(c.getItems)this._.showSubMenu(a);else this._.onClick(c)},this)}b(e);for(var r=f.elementPath(),r=['\x3cdiv class\x3d"cke_menu'+(r&&r.direction()!=f.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],t=e.length,v=t&&e[0].group,z=0;z<t;z++){var p=
e[z];v!=p.group&&(r.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),v=p.group);p.render(this,z,r)}r.push("\x3c/div\x3e");m.setHtml(r.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,a,g,c,d):h.showBlock(this.id,a,g,c,d);f.fire("menuShow",[h])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)},findItemByCommandName:function(a){var b=CKEDITOR.tools.array.filter(this.items,
function(c){return a===c.command});return b.length?(b=b[0],{item:b,element:this._.element.findOne("."+b.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(b,f,c){var d=b.id+String(f),e="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,h="",w=this.editor,x,r,t=e==CKEDITOR.TRISTATE_ON?"on":e==CKEDITOR.TRISTATE_DISABLED?
"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(h=' aria-checked\x3d"'+(e==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var v=this.getItems,z="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",p=this.name;this.icon&&!/\./.test(this.icon)&&(p=this.icon);this.command&&(x=w.getCommand(this.command),(x=w.getCommandKeystroke(x))&&(r=CKEDITOR.tools.keystrokeToString(w.lang.common.keyboard,x)));x=CKEDITOR.tools.htmlEncodeAttr(this.label);b={id:d,name:this.name,iconName:p,label:this.label,
attrLabel:x,cls:this.className||"",state:t,hasPopup:v?"true":"false",disabled:e==CKEDITOR.TRISTATE_DISABLED,title:x+(r?" ("+r.display+")":""),ariaShortcut:r?w.lang.common.keyboardShortcut+" "+r.aria:"",href:"javascript:void('"+(x||"").replace("'")+"')",hoverFn:b._.itemOverFn,moveOutFn:b._.itemOutFn,clickFn:b._.itemClickFn,index:f,iconStyle:CKEDITOR.skin.getIconStyle(p,"rtl"==this.editor.lang.dir,p==this.icon?null:this.icon,this.iconOffset),shortcutHtml:r?m.output({shortcut:r.display}):"",arrowHtml:v?
g.output({label:z}):"",role:this.role?this.role:"menuitem",ariaChecked:h};a.output(b,c)}}})}(),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(b){this.base.call(this,b,{panel:{css:b.config.contextmenu_contentsCss,
className:"cke_menu_panel",attributes:{"aria-label":b.lang.contextmenu.options}}})},proto:{addTarget:function(b,h){function f(){g=!1}var a,g;b.on("contextmenu",function(b){b=b.data;var f=CKEDITOR.env.webkit?a:CKEDITOR.env.mac?b.$.metaKey:b.$.ctrlKey;if(!h||!f)if(b.preventDefault(),!g){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var f=this.editor,c=(new CKEDITOR.dom.elementPath(b.getTarget(),f.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);c&&"false"==c.getAttribute("contenteditable")&&
f.getSelection().fake(c)}var c=b.getTarget().getDocument(),d=b.getTarget().getDocument().getDocumentElement(),f=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),e=f?b.$.clientX:b.$.pageX||c.x+b.$.clientX,m=f?b.$.clientY:b.$.pageY||c.y+b.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(d,null,e,m)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var m=function(){a=0};b.on("keydown",function(b){a=CKEDITOR.env.mac?b.data.$.metaKey:b.data.$.ctrlKey});b.on("keyup",m);
b.on("contextmenu",m)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(b.on("keydown",function(a){a.data.$.shiftKey&&121===a.data.$.keyCode&&(g=!0)},null,null,0),b.on("keyup",f),b.on("contextmenu",f))},open:function(b,h,f,a){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),b=b||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(b,h,f,a))}}})},beforeInit:function(b){var h=b.contextMenu=new CKEDITOR.plugins.contextMenu(b);
b.on("contentDom",function(){h.addTarget(b.editable(),!1!==b.config.browserContextMenuOnCtrl)});b.addCommand("contextMenu",{exec:function(b){var a=0,g=0,h=b.getSelection().getRanges(),h=h[h.length-1].getClientRects(b.editable().isInline());if(h=h[h.length-1])a=h["rtl"===b.lang.dir?"left":"right"],g=h.bottom;b.contextMenu.open(b.document.getBody().getParent(),null,a,g)}});b.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");b.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function b(a){var b=
this.att;a=a&&a.hasAttribute(b)&&a.getAttribute(b)||"";void 0!==a&&this.setValue(a)}function h(){for(var a,b=0;b<arguments.length;b++)if(arguments[b]instanceof CKEDITOR.dom.element){a=arguments[b];break}if(a){var b=this.att,f=this.getValue();f?a.setAttribute(b,f):a.removeAttribute(b,f)}}var f={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=f);var b=[];a.id&&b.push("id");a.dir&&b.push("dir");var h="";b.length&&(h+="["+b.join(",")+
"]");a.classes&&(h+="(*)");a.styles&&(h+="{*}");return h},createAdvancedTab:function(a,g,m){g||(g=f);var l=a.lang.common,k={id:"advanced",label:l.advancedTab,title:l.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},c=[];if(g.id||g.dir)g.id&&c.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:l.id,setup:b,commit:h}),g.dir&&c.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+"[dir]":null,label:l.langDir,"default":"",style:"width:100%",items:[[l.notSet,
""],[l.langDirLTR,"ltr"],[l.langDirRTL,"rtl"]],setup:b,commit:h}),k.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});if(g.styles||g.classes)c=[],g.styles&&c.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:l.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(l.invalidInlineStyle),onChange:function(){},getStyle:function(a,c){var b=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return b?
b[1]:c},updateStyle:function(c,b){var g=this.getValue(),f=a.document.createElement("span");f.setAttribute("style",g);f.setStyle(c,b);g=CKEDITOR.tools.normalizeCssText(f.getAttribute("style"));this.setValue(g,1)},setup:b,commit:h}),g.classes&&c.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:l.cssClasses,"default":"",setup:b,commit:h}]}),k.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});
return k}})}(),function(){function b(a,c,b){b=a.config.forceEnterMode||b;if("wysiwyg"==a.mode){c||(c=a.activeEnterMode);var g=a.elementPath();g&&!g.isContextFor("p")&&(c=CKEDITOR.ENTER_BR,b=1);a.fire("saveSnapshot");c==CKEDITOR.ENTER_BR?l(a,c,null,b):k(a,c,null,b);a.fire("saveSnapshot")}}function h(a){a=a.getSelection().getRanges(!0);for(var c=a.length-1;0<c;c--)a[c].deleteContents();return a[0]}function f(a){var c=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==
a.getAttribute("contenteditable")},!0);if(a.root.equals(c))return a;c=new CKEDITOR.dom.range(c);c.moveToRange(a);return c}CKEDITOR.plugins.add("enterkey",{init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){b(a)}});a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){b(a,a.activeShiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var a=CKEDITOR.dom.walker.whitespaces(),g=CKEDITOR.dom.walker.bookmark(),
m,l,k,c;CKEDITOR.plugins.enterkey={enterBlock:function(b,e,k,m){function x(a){var c;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],z.lastElement.getName())||1!==z.lastElement.getChildCount())return!1;a=z.lastElement.getChild(0).clone(!0);(c=a.getBogus())&&c.remove();return a.getText().length?!1:!0}if(k=k||h(b)){k=f(k);var r=k.document,t=k.checkStartOfBlock(),v=k.checkEndOfBlock(),z=b.elementPath(k.startContainer),p=z.block,y=e==CKEDITOR.ENTER_DIV?"div":"p",q;if(p&&t&&v){t=p.getParent();
if(t.is("li")&&1<t.getChildCount()){r=new CKEDITOR.dom.element("li");q=b.createRange();r.insertAfter(t);p.remove();q.setStart(r,0);b.getSelection().selectRanges([q]);return}if(p.is("li")||p.getParent().is("li")){p.is("li")||(p=p.getParent(),t=p.getParent());q=t.getParent();k=!p.hasPrevious();var u=!p.hasNext();m=b.getSelection();var y=m.createBookmarks(),B=p.getDirection(1),v=p.getAttribute("class"),A=p.getAttribute("style"),C=q.getDirection(1)!=B;b=b.enterMode!=CKEDITOR.ENTER_BR||C||A||v;if(q.is("li"))k||
u?(k&&u&&t.remove(),p[u?"insertAfter":"insertBefore"](q)):p.breakParent(q);else{if(b)if(z.block.is("li")?(q=r.createElement(e==CKEDITOR.ENTER_P?"p":"div"),C&&q.setAttribute("dir",B),A&&q.setAttribute("style",A),v&&q.setAttribute("class",v),p.moveChildren(q)):q=z.block,k||u)q[k?"insertBefore":"insertAfter"](t);else p.breakParent(t),q.insertAfter(t);else if(p.appendBogus(!0),k||u)for(;r=p[k?"getFirst":"getLast"]();)r[k?"insertBefore":"insertAfter"](t);else for(p.breakParent(t);r=p.getLast();)r.insertAfter(t);
p.remove()}m.selectBookmarks(y);return}if(p&&p.getParent().is("blockquote")){p.breakParent(p.getParent());p.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||p.getPrevious().remove();p.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||p.getNext().remove();k.moveToElementEditStart(p);k.select();return}}else if(p&&p.is("pre")&&!v){l(b,e,k,m);return}if(A=k.splitBlock(y)){b=A.previousBlock;p=A.nextBlock;t=A.wasStartOfBlock;v=A.wasEndOfBlock;p?(u=p.getParent(),u.is("li")&&(p.breakParent(u),
p.move(p.getNext(),1))):b&&(u=b.getParent())&&u.is("li")&&(b.breakParent(u),u=b.getNext(),k.moveToElementEditStart(u),b.move(b.getPrevious()));if(t||v)if(x(e))k.moveToElementEditStart(k.getTouchedStartNode());else{if(b){if(b.is("li")||!c.test(b.getName())&&!b.is("pre"))q=b.clone()}else p&&(q=p.clone());q?m&&!q.is("li")&&q.renameNode(y):u&&u.is("li")?q=u:(q=r.createElement(y),b&&(B=b.getDirection())&&q.setAttribute("dir",B));if(r=A.elementPath)for(e=0,m=r.elements.length;e<m;e++){y=r.elements[e];if(y.equals(r.block)||
y.equals(r.blockLimit))break;CKEDITOR.dtd.$removeEmpty[y.getName()]&&(y=y.clone(),q.moveChildren(y),q.append(y))}q.appendBogus();q.getParent()||k.insertNode(q);q.is("li")&&q.removeAttribute("value");!CKEDITOR.env.ie||!t||v&&b.getChildCount()||(k.moveToElementEditStart(v?b:q),k.select());k.moveToElementEditStart(t&&!v?p:q)}else p.is("li")&&(q=k.clone(),q.selectNodeContents(p),q=new CKEDITOR.dom.walker(q),q.evaluator=function(c){return!(g(c)||a(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in CKEDITOR.dtd.$inline&&
!(c.getName()in CKEDITOR.dtd.$empty))},(u=q.next())&&u.type==CKEDITOR.NODE_ELEMENT&&u.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?r.createElement("br"):r.createText(" ")).insertBefore(u)),p&&k.moveToElementEditStart(p);k.select();k.scrollIntoView()}}},enterBr:function(a,b,g,f){if(g=g||h(a)){var l=g.document,m=g.checkEndOfBlock(),t=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),v=t.block,z=v&&t.block.getName();f||"li"!=z?(!f&&m&&c.test(z)?(m=v.getDirection())?(l=l.createElement("div"),
l.setAttribute("dir",m),l.insertAfter(v),g.setStart(l,0)):(l.createElement("br").insertAfter(v),CKEDITOR.env.gecko&&l.createText("").insertAfter(v),g.setStartAt(v.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==z&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?l.createText("\r"):l.createElement("br"),g.deleteContents(),g.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("﻿").insertAfter(a),m&&(v||t.blockLimit).appendBogus(),a.getNext().$.nodeValue=
"",g.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):g.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),g.collapse(!0),g.select(),g.scrollIntoView()):k(a,b,g,f)}}};m=CKEDITOR.plugins.enterkey;l=m.enterBr;k=m.enterBlock;c=/^h[1-6]$/}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var b=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')"  onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),
f=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),a=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var f=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&
(f["aria-multiselectable"]=!0);!f.role&&(f.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",f.role);f=this.keys;f[40]="next";f[9]="next";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(f[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=b.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);
delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(b,f,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[b]=k;var c;c=CKEDITOR.tools.htmlEncodeAttr(b).replace(a,"\\'");b={id:k,val:c,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26':
"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||b),text:f||b};this._.pendingList.push(h.output(b))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(f.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=
this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,f=this.element.getDocument(),k;for(k in a)f.getById(a[k]).setStyle("display","");for(var c in b)a=f.getById(b[c]),k=a.getNext(),a.setStyle("display",""),k&&"ul"==k.getName()&&k.setStyle("display",
"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var f=b.getById(a);f.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");
this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),f;for(f in a){var k=a[f];b.getById(k).removeClass("cke_selected");b.getById(k+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),f,k=-1;if(a)for(f=this.element.getDocument().getById(this._.items[a]).getFirst();a=
b.getItem(++k);){if(a.equals(f)){this._.focusIndex=k;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var b='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+
(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var b=b+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+
h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),f=CKEDITOR.addTemplate("combo",b);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,
a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{},listeners:[]}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c=
this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=CKEDITOR.env,k,c,d="cke_"+this.id,e=CKEDITOR.tools.addFunction(function(b){c&&(a.unlockSelection(1),c=0);k.execute(b)},this),n=this;k={id:d,combo:this,focus:function(){CKEDITOR.document.getById(d).getChild(1).focus()},execute:function(c){var b=n._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a),
b.on)b.panel.hide();else{n.commit();var d=n.getValue();d?b.list.mark(d):b.list.unmarkAll();b.panel.showBlock(n.id,new CKEDITOR.dom.element(c),4)}},clickFn:e};this._.listeners.push(a.on("activeFilterChange",h,this));this._.listeners.push(a.on("mode",h,this));this._.listeners.push(a.on("selectionChange",h,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",h,this));var w=CKEDITOR.tools.addFunction(function(a,c){a=new CKEDITOR.dom.event(a);var b=a.getKeystroke();switch(b){case 13:case 32:case 40:CKEDITOR.tools.callFunction(e,
c);break;default:k.onkey(k,b)}a.preventDefault()}),x=CKEDITOR.tools.addFunction(function(){k.onfocus&&k.onfocus()});c=0;k.keyDownFn=w;l={id:d,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:w,focusFn:x,clickFn:e};f.output(l,b);if(this.onRender)this.onRender();return k},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,f=this._.panelDefinition.block,h=b.parent||CKEDITOR.document.getBody(),
k="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,h,b),b=c.addListBlock(this.id,f),d=this;c.onShow=function(){this.element.addClass(k);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen()};c.onHide=function(c){this.element.removeClass(k);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!c&&d.onClose)d.onClose()};c.onEscape=function(){c.hide(1)};b.onClick=function(a,b){d.onClick&&
d.onClick.call(d,a,b);c.hide()};this._.panel=c;this._.list=b;c.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var f=this.document.getById("cke_"+this.id+"_text");f&&(a||b?f.removeClass("cke_combo_inlinelabel"):(b=this.label,f.addClass("cke_combo_inlinelabel")),f.setText("undefined"!=typeof b?b:a));var f="undefined"!=typeof b?b:a,h=this.label,f=f===h?f:f+", "+h;(h=this.document.getById("cke_"+this.id+"_label"))&&
h.setText(f)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,f){this._.items[a]=f||a;this._.list.add(a,b,f)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));
this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id),f=b.getElementsByTag("a").getItem(0);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");f&&f.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON);this._.state=a}},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(a){a.removeListener()});this._.listeners=[]},select:function(a){if(!CKEDITOR.tools.isEmpty(this._.items))for(var b in this._.items)if(a({value:b,text:this._.items[b]})){this.setValue(b);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,
CKEDITOR.UI_RICHCOMBO,b)}}(),function(){function b(a,b){var k=a.config,c=b.lang,d=new CKEDITOR.style(b.styleDefinition),e=new g({entries:b.entries,styleVariable:b.styleVariable,styleDefinition:b.styleDefinition}),n;a.addCommand(b.commandName,{exec:function(a,c){var b=c.newStyle,d=c.oldStyle,e=a.getSelection().getRanges()[0],g=void 0===b;if(d||b)d&&e.collapsed&&f({editor:a,range:e,style:d}),g?a.removeStyle(d):(d&&!h(d,b)&&a.removeStyle(d),a.applyStyle(b))},refresh:function(a,c){d.checkApplicable(c,
a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});n=a.getCommand(b.commandName);a.ui.addRichCombo(b.comboName,{label:c.label,title:c.panelTitle,command:b.commandName,toolbar:"styles,"+b.order,defaultValue:"cke-default",allowedContent:d,requiredContent:d,contentTransformations:"span"===b.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var c=" x-small small medium large x-large xx-large 48px".split(" ");
a.name="span";a.attributes.size&&(a.styles["font-size"]=c[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(k.contentsCss),multiSelect:!1,attributes:{"aria-label":c.panelTitle}},init:function(){var b="("+a.lang.common.optionDefault+")";this.startGroup(c.panelTitle);this.add(this.defaultValue,
b,b);e.addToCombo(this)},onClick:function(c){var d=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(b.commandName,{newStyle:e.getStyle(c),oldStyle:e.getStyle(d)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var d=this.getValue();(c=e.getMatchingValue(a,c.data.path))?c!=d&&this.setValue(c):this.setValue("",b.defaultLabel)},this);n.on("state",function(){this.setState(n.state)},this)},refresh:function(){this.setState(n.state)}})}function h(a,b){if(!(a instanceof
CKEDITOR.style&&b instanceof CKEDITOR.style))return!1;var g=function(a,c){var b=a.getDefinition().attributes,g=c.getDefinition().attributes;return CKEDITOR.tools.objectCompare(b,g)}(a,b),c=function(a,c){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(c.getDefinition())}(a,b);return g&&c}function f(b){var g=b.editor,f=b.range,c=b.style,d,e,h;d=g.elementPath();if(b=d.contains(function(a){return c.checkElementRemovable(a)})){e=f.checkBoundaryOfElement(b,CKEDITOR.START);
h=f.checkBoundaryOfElement(b,CKEDITOR.END);if(e&&h){for(e=f.createBookmark();d=b.getFirst();)d.insertBefore(b);b.remove();f.moveToBookmark(e)}else e||h?f.moveToPosition(b,e?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(f.splitElement(b),f.moveToPosition(b,CKEDITOR.POSITION_AFTER_END)),a(f,d.elements.slice(),b);g.getSelection().selectRanges([f])}}function a(b,g,f){var c=g.pop();if(c){if(f)return a(b,g,c.equals(f)?null:f);f=c.clone();b.insertNode(f);b.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);
a(b,g)}}var g=CKEDITOR.tools.createClass({$:function(a){var b=a.entries.split(";");this._.data={};this._.names=[];for(var g=0;g<b.length;g++){var c=b[g],d,e;c?(c=c.split("/"),d=c[0],c=c[1],e={},e[a.styleVariable]=c||d,this._.data[d]=new CKEDITOR.style(a.styleDefinition,e),this._.data[d]._.definition.name=d,this._.names.push(d)):(b.splice(g,1),g--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var b=0;b<this._.names.length;b++){var g=this._.names[b];a.add(g,this.getStyle(g).buildPreview(),
g)}},getMatchingValue:function(a,b){for(var g=b.elements,c=0,d;c<g.length;c++)if(d=g[c],d=this._.findMatchingStyleName(a,d))return d;return null}},_:{findMatchingStyleName:function(a,b){return CKEDITOR.tools.array.find(this._.names,function(g){return this.getStyle(g).checkElementMatch(b,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(a){var g=a.config;b(a,{comboName:"Font",commandName:"font",styleVariable:"family",lang:a.lang.font,entries:g.font_names,defaultLabel:g.font_defaultLabel,
styleDefinition:g.font_style,order:30});b(a,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:a.lang.font.fontSize,entries:g.fontSize_sizes,defaultLabel:g.fontSize_defaultLabel,styleDefinition:g.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("format",
{requires:"richcombo",init:function(b){if(!b.blockless){for(var h=b.config,f=b.lang.format,a=h.format_tags.split(";"),g={},m=0,l=[],k=0;k<a.length;k++){var c=a[k],d=new CKEDITOR.style(h["format_"+c]);if(!b.filter.customConfig||b.filter.check(d))m++,g[c]=d,g[c]._.enterMode=b.config.enterMode,l.push(d)}0!==m&&b.ui.addRichCombo("Format",{label:f.label,title:f.panelTitle,toolbar:"styles,20",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!1,attributes:{"aria-label":f.panelTitle}},
init:function(){this.startGroup(f.panelTitle);for(var a in g){var c=f["tag_"+a];this.add(a,g[a].buildPreview(c),c)}},onClick:function(a){b.focus();b.fire("saveSnapshot");a=g[a];var c=b.elementPath();b.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK});a.checkActive(c,b)||b.applyStyle(a);setTimeout(function(){b.fire("saveSnapshot")},0)},onRender:function(){b.on("selectionChange",function(a){var c=this.getValue();a=a.data.path;this.refresh();for(var d in g)if(g[d].checkActive(a,b)){d!=c&&this.setValue(d,
b.lang.format["tag_"+d]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in g)b.activeFilter.check(g[a])||this.hideItem(a)},refresh:function(){var a=b.elementPath();if(a){if(a.isContextFor("p"))for(var c in g)if(b.activeFilter.check(g[c]))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 b={canUndo:!1,exec:function(b){var f=b.document.createElement("hr");b.insertElement(f)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||
(h.addCommand("horizontalrule",b),h.ui.addButton&&h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(b){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=b.config.forceSimpleAmpersand;h.indentationChars="string"===typeof b.config.dataIndentationChars?b.config.dataIndentationChars:"\t";b.dataProcessor.writer=h}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,
$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var b=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},b.$nonBodyContent,b.$block,b.$listItem,b.$tableContent))this.setRules(h,{indent:!b[h]["#"],breakBeforeOpen:1,breakBeforeClose:!b[h]["#"],breakAfterClose:1,needsSpace:h in b.$block&&!(h 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(b){var h=this._.rules[b];this._.afterCloser&&h&&h.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():h&&h.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",b);this._.afterCloser=0},openTagClose:function(b,h){var f=this._.rules[b];h?(this._.output.push(this.selfClosingEnd),f&&
f.breakAfterClose&&(this._.needsSpace=f.needsSpace)):(this._.output.push("\x3e"),f&&f.indent&&(this._.indentation+=this.indentationChars));f&&f.breakAfterOpen&&this.lineBreak();"pre"==b&&(this._.inPre=1)},attribute:function(b,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h),this.forceSimpleAmpersand&&(h=h.replace(/&amp;/g,"\x26")));this._.output.push(" ",b,'\x3d"',h,'"')},closeTag:function(b){var h=this._.rules[b];h&&h.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));
this._.indent?this.indentation():h&&h.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",b,"\x3e");"pre"==b&&(this._.inPre=0);h&&h.breakAfterClose&&(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(b){this._.indent&&(this.indentation(),!this._.inPre&&(b=CKEDITOR.tools.ltrim(b)));this._.output.push(b)},comment:function(b){this._.indent&&this.indentation();this._.output.push("\x3c!--",b,"--\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(b,h){var f=this._.rules[b];f?CKEDITOR.tools.extend(f,h,!0):this._.rules[b]=h}}}),"use strict",function(){function b(a,b){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),
doc:a.document,win:a.window},b,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function h(a,b){CKEDITOR.tools.extend(this,b,{editor:a},!0)}function f(a,b){var e=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:e,inline:e.isInline(),doc:a.document,win:a.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},b,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());
this.queryViewport();var f=CKEDITOR.tools.bind(this.queryViewport,this),h=CKEDITOR.tools.bind(this.hideVisible,this),k=CKEDITOR.tools.bind(this.removeAll,this);e.attachListener(this.winTop,"resize",f);e.attachListener(this.winTop,"scroll",f);e.attachListener(this.winTop,"resize",h);e.attachListener(this.win,"scroll",h);e.attachListener(this.inline?e:this.frame,"mouseout",function(a){var c=a.data.$.clientX;a=a.data.$.clientY;this.queryViewport();(c<=this.rect.left||c>=this.rect.right||a<=this.rect.top||
a>=this.rect.bottom)&&this.hideVisible();(0>=c||c>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);e.attachListener(a,"resize",f);e.attachListener(a,"mode",k);a.on("destroy",k);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},
m,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function a(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(l[a.getComputedStyle("float")]||l[a.getAttribute("align")]);return b&&
!k[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;b.prototype={start:function(a){var b=this,e=this.editor,g=this.doc,f,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){e.readOnly||"wysiwyg"!=e.mode||(b.relations={},(h=g.$.elementFromPoint(k,l))&&h.nodeType&&(f=new CKEDITOR.dom.element(h),b.traverseSearch(f),isNaN(k+l)||b.pixelSearch(f,k,l),a&&a(b.relations,k,l)))});this.listener=this.editable.attachListener(this.target,
"mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;m.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){m.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var e=this.editor.createRange();e.moveToPosition(this.relations[b.uid].element,
a[b.type]);return e}}(),store:function(){function c(a,c,b){var g=a.getUniqueId();g in b?b[g].type|=c:b[g]={element:a,type:c}}return function(b,e){var g;e&CKEDITOR.LINEUTILS_AFTER&&a(g=b.getNext())&&g.isVisible()&&(c(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_AFTER);e&CKEDITOR.LINEUTILS_INSIDE&&a(g=b.getFirst())&&g.isVisible()&&(c(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_INSIDE);c(b,e,this.relations)}}(),traverseSearch:function(c){var b,e,g;do if(g=c.$["data-cke-expando"],
!(g&&g in this.relations)){if(c.equals(this.editable))break;if(a(c))for(b in this.lookups)(e=this.lookups[b](c))&&this.store(c,e)}while((!c||c.type!=CKEDITOR.NODE_ELEMENT||"true"!=c.getAttribute("contenteditable"))&&(c=c.getParent()))},pixelSearch:function(){function c(c,g,f,h,k){for(var l=0,m;k(f);){f+=h;if(25==++l)break;if(m=this.doc.$.elementFromPoint(g,f))if(m==c)l=0;else if(b(c,m)&&(l=0,a(m=new CKEDITOR.dom.element(m))))return m}}var b=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,c){return a.contains(c)}:
function(a,c){return!!(a.compareDocumentPosition(c)&16)};return function(b,d,g){var f=this.win.getViewPaneSize().height,h=c.call(this,b.$,d,g,-1,function(a){return 0<a});d=c.call(this,b.$,d,g,1,function(a){return a<f});if(h)for(this.traverseSearch(h);!h.getParent().equals(b);)h=h.getParent();if(d)for(this.traverseSearch(d);!d.getParent().equals(b);)d=d.getParent();for(;h||d;){h&&(h=h.getNext(a));if(!h||h.equals(d))break;this.traverseSearch(h);d&&(d=d.getPrevious(a));if(!d||d.equals(h))break;this.traverseSearch(d)}}}(),
greedySearch:function(){this.relations={};for(var c=this.editable.getElementsByTag("*"),b=0,e,g,f;e=c.getItem(b++);)if(!e.equals(this.editable)&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasAttribute("contenteditable")||!e.isReadOnly())&&a(e)&&e.isVisible())for(f in this.lookups)(g=this.lookups[f](e))&&this.store(e,g);return this.relations}};h.prototype={locate:function(){function c(c,b){var g=c.element[b===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return g&&a(g)?(c.siblingRect=g.getClientRect(),
b==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):b==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(a){var b;this.locations={};for(var g in a)b=a[g],b.elementRect=b.element.getClientRect(),b.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(g,CKEDITOR.LINEUTILS_BEFORE,c(b,CKEDITOR.LINEUTILS_BEFORE)),b.type&CKEDITOR.LINEUTILS_AFTER&&this.store(g,CKEDITOR.LINEUTILS_AFTER,c(b,CKEDITOR.LINEUTILS_AFTER)),b.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(g,CKEDITOR.LINEUTILS_INSIDE,(b.elementRect.top+b.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,b,e,g;return function(f,h){a=this.locations;b=[];for(var k in a)for(var l in a[k])if(e=Math.abs(f-a[k][l]),b.length){for(g=0;g<b.length;g++)if(e<b[g].dist){b.splice(g,0,{uid:+k,type:l,dist:e});break}g==b.length&&b.push({uid:+k,type:l,dist:e})}else b.push({uid:+k,type:l,dist:e});return"undefined"!=typeof h?b.slice(0,h):b}}(),store:function(a,
b,e){this.locations[a]||(this.locations[a]={});this.locations[a][b]=e}};var g={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},m={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};f.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var b=a.getUniqueId();
a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,b){var e,g,f;if(e=this.getStyle(a.uid,a.type)){for(f in this.visible)if(this.visible[f].getCustomData("hash")!==this.hash){g=this.visible[f];break}if(!g)for(f in this.hidden)if(this.hidden[f].getCustomData("hash")!==this.hash){this.showLine(g=this.hidden[f]);
break}g||this.showLine(g=this.addLine());g.setCustomData("hash",this.hash);this.visible[g.getUniqueId()]=g;g.setStyles(e);b&&b(g)}},getStyle:function(a,b){var e=this.relations[a],g=this.locations[a][b],f={};f.width=e.siblingRect?Math.max(e.siblingRect.width,e.elementRect.width):e.elementRect.width;f.top=this.inline?g+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+g;if(f.top-this.winTopScroll.y<this.rect.top||f.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
f.left=e.elementRect.left-this.rect.relativeX:(0<e.elementRect.left?f.left=this.rect.left+e.elementRect.left:(f.width+=e.elementRect.left,f.left=this.rect.left),0<(e=f.left+f.width-(this.rect.left+this.winPane.width))&&(f.width-=e));f.left+=this.winTopScroll.x;for(var h in f)f[h]=CKEDITOR.tools.cssLength(f[h]);return f},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,b){this.relations=a;this.locations=b;this.hash=Math.random()},
cleanup:function(){var a,b;for(b in this.visible)a=this.visible[b],a.getCustomData("hash")!==this.hash&&this.hideLine(a)},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(a){a=a.getClientRect();var b=this.container.getDocumentPosition(),e=this.container.getComputedStyle("position");a.relativeX=a.relativeY=
0;"static"!=e&&(a.relativeY=b.y,a.relativeX=b.x,a.top-=a.relativeY,a.bottom-=a.relativeY,a.left-=a.relativeX,a.right-=a.relativeX);return a}};var l={left:1,right:1,center:1},k={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:b,locator:h,liner:f}}(),function(){function b(b){return b.getName&&!b.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(b){if(CKEDITOR.env.webkit){var f=CKEDITOR.plugins.widgetselection;b.on("contentDom",function(a){a=a.editor;var b=a.editable();
b.attachListener(b,"keydown",function(a){a.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){f.addFillers(b)||f.removeFillers(b)},0)},null,null,-1);a.on("selectionCheck",function(a){f.removeFillers(a.editor.editable())});a.on("paste",function(a){a.data.dataValue=f.cleanPasteData(a.data.dataValue)});"selectall"in a.plugins&&f.addSelectAllIntegration(a)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",
fillerTagName:"div",addFillers:function(h){var f=h.editor;if(!this.isWholeContentSelected(h)&&0<h.getChildCount()){var a=h.getFirst(b),g=h.getLast(b);a&&a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));g&&g.type==CKEDITOR.NODE_ELEMENT&&!g.isEditable()&&(this.endFiller=this.createFiller(!0),h.append(this.endFiller,0));if(this.hasFiller(h))return f=f.createRange(),f.selectNodeContents(h),f.select(),!0}return!1},removeFillers:function(b){if(this.hasFiller(b)&&
!this.isWholeContentSelected(b)){var f=b.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),a=b.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&f&&this.startFiller.equals(f)?this.removeFiller(this.startFiller,b):this.startFiller=f;this.endFiller&&a&&this.endFiller.equals(a)?this.removeFiller(this.endFiller,b):this.endFiller=a}},cleanPasteData:function(b){b&&b.length&&(b=b.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));
return b},isWholeContentSelected:function(b){var f=b.editor.getSelection().getRanges()[0];return!f||f&&f.collapsed?!1:(f=f.clone(),f.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(f&&b&&f.startContainer&&f.endContainer&&0===f.startOffset&&f.endOffset===b.getChildCount()&&f.startContainer.equals(b)&&f.endContainer.equals(b)))},hasFiller:function(b){return 0<b.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(b){var f=new CKEDITOR.dom.element(this.fillerTagName);f.setHtml(this.fillerContent);
f.setAttribute(this.fillerAttribute,b?"end":"start");f.setAttribute("data-cke-temp",1);f.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return f},removeFiller:function(b,f){if(b){var a=f.editor,g=f.editor.getSelection().getRanges()[0].startPath(),m=a.createRange(),l,k;g.contains(b)&&(l=b.getHtml(),k=!0);g="start"==b.getAttribute(this.fillerAttribute);b.remove();l&&0<l.length&&l!=this.fillerContent?(f.insertHtmlIntoRange(l,
a.getSelection().getRanges()[0]),m.setStartAt(f.getChild(f.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),a.getSelection().selectRanges([m])):k&&(g?m.setStartAt(f.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):m.setEndAt(f.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),f.editor.getSelection().selectRanges([m]))}},createFillerRegex:function(b){var f=this.createFiller(b).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((b?
"":"^")+f+(b?"$":""))},addSelectAllIntegration:function(b){var f=this;b.editable().attachListener(b,"beforeCommandExec",function(a){var g=b.editable();"selectAll"==a.data.name&&g&&f.addFillers(g)},null,null,9999)}}}(),"use strict",function(){function b(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};E(this);C(this);this.on("checkWidgets",l);this.editor.on("contentDomInvalidated",
this.checkWidgets,this);A(this);q(this);u(this);y(this);B(this)}function h(a,b,c,d,e){var g=a.editor;CKEDITOR.tools.extend(this,d,{editor:g,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:h.prototype.edit,focusedEditable:null,definition:d,repository:a,draggable:!1!==d.draggable,_:{downcastFn:d.downcast&&"string"==typeof d.downcast?d.downcasts[d.downcast]:d.downcast}},!0);
a.fire("instanceCreated",this);H(this,d);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;ca(this);this.fire("data",this.data);this.isInited()&&g.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function f(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?
(this.enterMode=b?b.getAllowedEnterMode(a.enterMode):a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function a(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(k)}var e=a.widgets.focused;if(e&&e.name==b.name)e.edit();else if(b.insert)b.insert({editor:a,commandData:c});else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.dom.element.createFromHtml(b.template.output(e),
a.document),g,f=a.widgets.wrapElement(e,b.name),k=new CKEDITOR.dom.documentFragment(f.getDocument());k.append(f);(g=a.widgets.initOn(e,b,c&&c.startupData))?(e=g.once("edit",function(b){if(b.data.dialog)g.once("dialog",function(b){b=b.data;var c,e;c=b.once("ok",d,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(g,!0)});b.once("hide",function(){c.removeListener();e.removeListener()})});else d()},null,null,999),g.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent,
requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function g(a,b){function c(a,d){var e=b.upcast.split(","),g,f;for(f=0;f<e.length;f++)if(g=e[f],g===a.name)return b.upcasts[g].call(this,a,d);return!1}function d(b,c,e){var g=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>g&&(g=a._.upcasts.length);a._.upcasts.splice(g,0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,g=b.upcastPriority||10;e&&("string"==typeof e?d(c,
b,g):d(e,b,g))}function m(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function l(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,g,f;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();d<e;d++){g=k.getItem(d);if(f=!this.getByElement(g,
!0)){a:{f=t;for(var l=g;l=l.getParent();)if(f(l)){f=!0;break a}f=!1}f=!f}f&&b.contains(g)&&(g.addClass("cke_widget_new"),c.push(this.initOn(g.getFirst(h.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function k(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=c(a),e=d(a),g=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=1,b.value=b.value.replace(/^\s/g,"\x26nbsp;"),g=!0);e&&e.value&&e.value.match(/\s$/g)&&(e.parent.attributes["data-cke-white-space-last"]=
1,e.value=e.value.replace(/\s$/g,"\x26nbsp;"),g=!0);g&&(a.attributes["data-cke-widget-white-space"]=1)}}function c(a){return a.find(function(a){return 3===a.type},!0).shift()}function d(a){return a.find(function(a){return 3===a.type},!0).pop()}function e(a,b,c){if(!c.allowedContent&&!c.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[b];a||(a=c.allowedContent?new CKEDITOR.filter(c.allowedContent):this.editor.filter.clone(),d[b]=a,c.disallowedContent&&a.disallow(c.disallowedContent));
return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,g,f,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(h.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(e=d.length;k<e;++k)if(!1===d[k](a))return;for(k=0;k<l;++k)if(e=c[k],f={},g=e[0](a,f))return g instanceof CKEDITOR.htmlParser.element&&(a=g),a.attributes["data-cke-widget-data"]=
encodeURIComponent(JSON.stringify(f)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,e[1]]),!1}}}}function w(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function x(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||
d.remove();return x(e,b,c)}}a.add(c,b)}function r(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function t(a){return a.hasAttribute("data-cke-temp")}function v(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),
b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function z(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function p(a,b){return CKEDITOR.tools.trim(b)}function y(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;h.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id",
d.id),b.focus(),d.focus())});b.on("drop",function(c){function d(a,b){return a&&b?a.wrapper.equals(b.wrapper)||a.wrapper.contains(b.wrapper):!1}var e=c.data.dataTransfer,g=e.getData("cke/widget-id"),f=e.getTransferType(b),e=b.createRange(),k=function(a){a=a.getBoundaryNodes().startNode;a.type!==CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return b.widgets.getByElement(a)}(c.data.dropRange);if(""!==g&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS)c.cancel();else if(f==CKEDITOR.DATA_TRANSFER_INTERNAL)if(""===
g&&0<b.widgets.selected.length)c.data.dataTransfer.setData("text/html",K(b));else if(g=a.instances[g])d(g,k)?c.cancel():(e.setStartBefore(g.wrapper),e.setEndAfter(g.wrapper),c.data.dragRange=e,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",g.getClipboardHtml()),b.widgets.destroy(g,!0))});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,
{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!h.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=h.getNestedEditable(d,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},
tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function q(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,g;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();e=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;g=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(g=1,a.focused!=e&&b.getSelection().removeAllRanges()):h.getNestedEditable(e.wrapper,
d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){g&&e&&e.wrapper&&(g=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!h.getNestedEditable(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function u(a){a.editor.on("key",
function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function B(a){function b(d){1>
a.selected.length||O(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function A(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),g=c(a.endContainer);!d&&g?(a.setEndBefore(g.wrapper),a.select()):d&&!g&&(a.setStartAfter(d.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")}
var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(v(a,d,null),c&&b&&v(a,c,b)):c&&b&&v(a,c,b)});e.on("dataReady",function(){F(a).commit()});
e.on("blur",function(){var b;(b=a.focused)&&m(a,b);(b=a.widgetHoldingFocusedEditable)&&v(a,b,null)})}function C(a){var b=a.editor,e={};b.on("toDataFormat",function(b){var g=CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=g;e[g]=f;b.data.dataValue.forEach(function(b){var e=b.attributes,g;if("data-cke-widget-white-space"in e){g=c(b);var k=d(b);g.parent.attributes["data-cke-white-space-first"]&&(g.value=g.value.replace(/^&nbsp;/g," "));k.parent.attributes["data-cke-white-space-last"]&&
(k.value=k.value.replace(/&nbsp;$/g," "))}if("data-cke-widget-id"in e){if(e=a.instances[e["data-cke-widget-id"]])g=b.getFirst(h.isParserWidgetElement),f.push({wrapper:b,element:g,widget:e,editables:{}}),"1"!=g.attributes["data-cke-widget-keep-attr"]&&delete g.attributes["data-widget"]}else if("data-cke-widget-editable"in e)return 0<f.length&&(f[f.length-1].editables[e["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=
e[a.data.downcastingSessionId],c,d,g,f,k,h;c=b.shift();){d=c.widget;g=c.element;f=d._.downcastFn&&d._.downcastFn.call(d,g);a.data.widgetsCopy&&d.getClipboardHtml&&(f=CKEDITOR.htmlParser.fragment.fromHtml(d.getClipboardHtml()),f=f.children[0]);for(h in c.editables)k=c.editables[h],delete k.attributes.contenteditable,k.setHtml(d.editables[h].getData());f||(f=g);c.wrapper.replaceWith(f)}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function E(a){var b=a.editor,c,d;b.on("toHtml",
function(b){var d=n(a),e;for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);e=d.toBeWrapped.pop();){var g=e[0],f=g.parent;f.type==CKEDITOR.NODE_ELEMENT&&f.attributes["data-cke-widget-wrapper"]&&f.replaceWith(g);a.wrapElement(e[0],e[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=
b.editable().find(".cke_widget_wrapper"),e,g,f=0,k=c.count();f<k;++f)e=c.getItem(f),g=e.getFirst(h.isDomWidgetElement),g.type==CKEDITOR.NODE_ELEMENT&&g.data("widget")?(g.replace(e),a.wrapElement(g)):e.remove();d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(U,p);a.range&&(a=h.getNestedEditable(b.editable(),a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&
b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}function F(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var g=a.focused!==e,f,k;a.editor.fire("lockSnapshot");for(g&&
(f=a.focused)&&m(a,f);f=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,f),1),f.isInited()&&(k=f.editor.checkDirty(),f.setSelected(!1),!k&&f.editor.resetDirty());g&&e&&(k=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!k&&a.editor.resetDirty());for(;f=c.pop();)b.push(f),f.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function G(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function L(a,
b,c){var d=0;b=I(b);var e=a.data.classes||{},g;if(b){for(e=CKEDITOR.tools.clone(e);g=b.pop();)c?e[g]||(d=e[g]=1):e[g]&&(delete e[g],d=1);d&&a.setData("classes",e)}}function D(a){a.cancel()}function O(a,b){var c=a.widgets.focused,d,e,g;ga.hasCopyBin(a)||(e=new ga(a,{beforeDestroy:function(){!b&&c&&c.focus();g&&a.getSelection().selectBookmarks(g);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),
c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),g=a.getSelection().createBookmarks(!0)),e.handle(K(a)))}function I(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function M(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function R(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),
this.editor.selectionChange(1))}function K(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function H(a,b){P(a);Y(a);T(a);X(a);S(a);aa(a);ba(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");
a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){O(a.editor,b==CKEDITOR.CTRL+88);return}if(b in V||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function P(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function Y(a,b){a.partSelectors||(a.partSelectors=
a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function T(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function X(a){if(!0===a.mask)da(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,J,a),c=CKEDITOR.env.gecko?300:0,d,e;a.on("focus",function(){b.input();d=a.editor.on("change",
b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var g=a.element.find("img");CKEDITOR.tools.array.forEach(g.toArray(),function(a){a.on("load",function(){b.input()})})}for(var f in a.editables)a.editables[f].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[f].on("blur",
function(){a.editor.removeListener("change",b.input)});b.input()}}function da(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function J(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");b||(b=new CKEDITOR.dom.element("img",
this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+"px",height:a.$.offsetHeight+
"px"})}}}function S(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",
src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",W,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});
a.dragHandlerContainer=c}}function W(a){function b(){var c;for(q.reset();c=k.pop();)c.removeListener();var d=h;c=a.sender;var e=this.repository.finder,g=this.repository.liner,f=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(g.visible)||(d=e.getRange(d[0]),this.focus(),f.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");g.hideVisible();f.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=this.repository.finder,
d=this.repository.locator,e=this.repository.liner,g=this.editor,f=g.editable(),k=[],h=[],l,m;this.repository._.draggedWidget=this;var p=c.greedySearch(),q=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(p);h=d.sort(m,1);h.length&&(e.prepare(p,l),e.placeLine(h[0]),e.cleanup())});f.addClass("cke_widget_dragging");k.push(f.on("mousemove",function(a){m=a.data.$.clientY;q.input()}));g.fire("dragstart",{target:a.sender});k.push(g.document.once("mouseup",b,this));f.isInline()||k.push(CKEDITOR.document.once("mouseup",
b,this))}}function aa(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function ba(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function ca(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}
function Z(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,g=0;g<e;){if(c.call(d,a[g],g,a))return a[g];g++}}function e(a){function b(a,c){var d=CKEDITOR.tools.object.keys(a),e=CKEDITOR.tools.object.keys(c);if(d.length!==e.length)return!1;for(var g in a)if(("object"!==typeof a[g]||"object"!==typeof c[g]||!b(a[g],c[g]))&&a[g]!==c[g])return!1;return!0}return function(c){return b(a.getDefinition(),
c.getDefinition())}}var g=a.widget,f;d[g]||(d[g]={});for(var k=0,h=a.group.length;k<h;k++)f=a.group[k],d[g][f]||(d[g][f]=[]),f=d[g][f],b(f,e(a))||f.push(a)}var d={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget;(this.group="string"==typeof a.group?[a.group]:a.group)&&c(this)},apply:function(a){var b;a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&(b=a.widgets.focused,this.group&&this.removeStylesFromSameGroup(a),b.applyStyle(this))},remove:function(a){a instanceof
CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(a){var b=!1,c,e;if(!(a instanceof CKEDITOR.editor))return!1;e=a.elementPath();if(this.checkApplicable(e,a))for(var g=0,f=this.group.length;g<f;g++){c=d[this.widget][this.group[g]];for(var k=0;k<c.length;k++)c[k]!==this&&c[k].checkActive(e,a)&&(a.widgets.focused.removeStyle(c[k]),b=!0)}return b},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},
checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return h.isDomWidgetWrapper(a)?(a=a.getFirst(h.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];var b,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;
c[a.styleableElements]={classes:b,propertiesOnly:!0};return c}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})}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\x3e.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\x3e.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\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable\x3d"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}'),
Z())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new b(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});z(a);G(a.undoManager)}}});b.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(b,c){var d=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=b;
c._=c._||{};d.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));a(d,c);g(this,c);this.registered[b]=c;if(c.dialog&&d.plugins.dialog)var e=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var b=a.dialog;a.getMode||b.getName()!==c.dialog||(a.getMode=function(){var a=b.getModel(d);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});e.removeListener()});return c},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},
checkSelection:function(){if(this.editor.getSelection()){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=F(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=h.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()}},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,
c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&v(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),g=0;g<e;++g)(c=this.getByElement(d.getItem(g),
!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&h.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(),
initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new h(this,this._.nextId++,a,b,c),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");for(var b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(h.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=
Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var c=null,d,e;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");d=this.registered[b];if(!d)return null;
if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);(e=r(d,a.getName()))&&k(a);c=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());c.setAttributes(w(e,b));c.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(!0)&&c.replace(a);a.appendTo(c)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"];
d=this.registered[b];if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&&c.attributes["data-cke-widget-wrapper"])return c;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);b&&(a.attributes["data-widget"]=b);(e=r(d,a.name))&&k(a);c=new CKEDITOR.htmlParser.element(e?"span":"div",w(e,b));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var g;d&&(g=a.getIndex(),a.remove());c.add(a);d&&x(d,
g,c)}return c},_tests_createEditableFilter:e};CKEDITOR.event.implementOn(b.prototype);h.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(h.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){L(this,a,1)},checkStyleActive:function(a){a=I(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("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(a,b){var c=this.editables[a],d=!0;c.removeListener("focus",R);c.removeListener("blur",M);this.editor.focusManager.remove(c);if(c.filter){for(var e in this.repository.instances){var g=this.repository.instances[e];g.editables&&(g=g.editables[a])&&g!==
c&&c.filter===g.filter&&(d=!1)}d&&(c.filter.destroy(),(d=this.repository._.filters[this.name])&&delete d[a])}b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),c.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var c,d;!1!==b.fire("dialog",
a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);d.removeListener();c&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){c.removeListener();d.removeListener()}))},b);return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var a=this.editor.createRange();
a.setStartBefore(this.wrapper);a.setEndAfter(this.wrapper);return this.editor.editable().getHtmlFromRange(a).getHtml()},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(a,b){var c=this._findOneNotNested(b.selector);return c&&c.is(CKEDITOR.dtd.$editable)?(c=new f(this.editor,c,{filter:e.call(this.repository,this.name,a,b)}),this.editables[a]=c,c.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":c.enterMode}),c.filter&&c.data("cke-filter",
c.filter.id),c.addClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),b.pathName&&c.data("cke-display-name",b.pathName),this.editor.focusManager.add(c),c.on("focus",R,this),CKEDITOR.env.ie&&c.on("blur",M,this),c._.initialSetData=!0,c.setData(c.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=a.getItem(d),c=b.getAscendant(h.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper||
!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},refreshMask:function(){X(this)},refreshParts:function(a){Y(this,"undefined"!==typeof a?a:!0)},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(h.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){L(this,a,0)},setData:function(a,b){var c=this.data,
d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=e[a])}d&&this.dataReady&&(ca(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset,
b={x:b.offsetLeft,y:b.offsetTop-15};CKEDITOR.env.ie&&(b.y=0);c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(h.prototype);h.getNestedEditable=function(a,b){return!b||b.equals(a)?null:h.isDomNestedEditable(b)?b:h.getNestedEditable(a,b.getParent())};h.isDomDragHandler=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};h.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};h.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};h.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};h.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};
h.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};h.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};h.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};h.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";f.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData||
this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.unprotectRealComments(a);a=this.editor.dataProcessor.unprotectSource(a);a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var U=/^(?:<(?: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,
V={37:1,38:1,39:1,40:1,8:1,46:1};V[CKEDITOR.SHIFT+121]=1;var ga=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection?
"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,g=c.document.getDocumentElement().$,f=c.createRange(),k=this,h=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=h?100:0,m=window.requestAnimationFrame&&!h?requestAnimationFrame:setTimeout,
p,q,u;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);p=c.on("selectionChange",D,null,null,0);q=c.widgets.on("checkSelection",D,null,null,0);e&&(u=g.scrollTop);f.selectNodeContents(b);f.select();e&&(g.scrollTop=u);return new CKEDITOR.tools.promise(function(a){m(function(){k.beforeDestroy&&k.beforeDestroy();d.remove();p.removeListener();q.removeListener();c.fire("unlockSnapshot");
k.afterDestroy&&k.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!ga.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=b;h.nestedEditable=f}(),"use strict",function(){function b(a){function b(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget),this.deflated=!0)}function c(){var b=a.editable(),d=a.document;if(this.deflated)this.widget=a.widgets.initOn(this.element,
"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,b)).block&&(b=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),b.replace(this.widget.wrapper),this.widget.wrapper.move(b)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var e=this.widget,b=g,d=e.wrapper,f=e.data.align,e=e.data.hasCaption;if(b){for(var k=3;k--;)d.removeClass(b[k]);"center"==f?e&&d.addClass(b[1]):"none"!=f&&d.addClass(b[x[f]])}else"center"==
f?(e?d.setStyle("text-align","center"):d.removeStyle("text-align"),d.removeStyle("float")):("none"==f?d.removeStyle("float"):d.setStyle("float",f),d.removeStyle("text-align"))}}var g=a.config.image2_alignClasses,k=a.config.image2_captionedClass;return{allowedContent:d(a),requiredContent:"img[src,alt]",features:e(a),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},
parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var d=this.features;this.data.hasCaption&&!a.filter.checkFeature(d.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||a.filter.checkFeature(d.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:b,inflate:c});this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&&
delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var e in this.data.classes)this.parts.image.removeClass(e);if(a.filter.checkFeature(d.dimension)){d=this.data;d={width:d.width,height:d.height};e=this.parts.image;for(var g in d)d[g]?e.setAttribute(g,d[g]):e.removeAttribute(g)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var b=CKEDITOR.plugins.image2,
c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.getAttribute("width")||"",height:c.getAttribute("height")||"",lock:this.ready?b.checkHasNaturalRatio(c):!0},e=c.getAscendant("a");e&&this.wrapper.contains(e)&&(this.parts.link=e);d.align||(c=d.hasCaption?this.element:c,g?(c.hasClass(g[0])?d.align="left":c.hasClass(g[2])&&(d.align="right"),d.align?c.removeClass(g[x[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float")));
a.plugins.link&&this.parts.link&&(d.link=b.getLinkAttributesParser()(a,this.parts.link),(c=d.link.advanced)&&c.advCSSClasses&&(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(d);a.filter.checkFeature(this.features.dimension)&&!0!==a.config.image2_disableResizer&&m(this);this.shiftState=b.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF;
if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF})},addClass:function(a){n(this).addClass(a)},hasClass:function(a){return n(this).hasClass(a)},removeClass:function(a){n(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+[].concat(k,g).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(a),downcast:f(a),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,
(this.data.alt||"")+" "+this.pathName)}}}function h(b){var c=a(b),d=b.config.image2_captionedClass;return function(a,b){var e={width:1,height:1},f=a.name,k;if(!a.attributes["data-cke-realelement"]&&(c(a)?("div"==f&&(k=a.getFirst("figure"))&&(a.replaceWith(k),a=k),b.align="center",k=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==f&&a.hasClass(d)?k=a.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:g(a)&&(k="a"==a.name?a.children[0]:
a),k)){for(var h in e)(e=k.attributes[h])&&e.match(r)&&delete k.attributes[h];return a}}}function f(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var g=a.getFirst("span");g&&g.replaceWith(g.getFirst({img:1,a:1}))}e&&"none"!=e&&(g=CKEDITOR.tools.parseCssText(d.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1,
right:1}&&(b?c.addClass(b[x[e]]):g["float"]=e),b||CKEDITOR.tools.isEmpty(g)||(d.style=CKEDITOR.tools.writeCssText(g)));return a}}function a(a){var b=a.config.image2_captionedClass,c=a.config.image2_alignClasses,d={figure:1,a:1,img:1};return function(e){if(!(e.name in{div:1,p:1}))return!1;var f=e.children;if(1!==f.length)return!1;f=f[0];if(!(f.name in d))return!1;if("p"==e.name){if(!g(f))return!1}else if("figure"==f.name){if(!f.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!g(f))return!1;
return(c?e.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(e.attributes.style||"",!0)["text-align"])?!0:!1}}function g(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function m(a){var b=a.editor,c=b.editable(),d=b.document,e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("​",d));if(a.inline)a.wrapper.append(e);else{var g=a.parts.link||a.parts.image,f=g.getParent(),
k=d.createElement("span");k.addClass("cke_image_resizer_wrapper");k.append(g);k.append(e);a.element.append(k,!0);f.is("span")&&f.remove()}e.on("mousedown",function(g){function f(a,b,c){var e=CKEDITOR.document,g=[];d.equals(e)||g.push(e.on(a,b));g.push(d.on(a,b));if(c)for(a=g.length;a--;)c.push(g.pop())}function k(){T=w+q*J;X=Math.round(T/x)}function h(){X=B-S;T=Math.round(X*x)}var l=a.parts.image,m=function(){var a=b.config.image2_maxSize,c;if(!a)return null;a=CKEDITOR.tools.copy(a);c=CKEDITOR.plugins.image2.getNatural(l);
a.width=Math.max("natural"===a.width?c.width:a.width,15);a.height=Math.max("natural"===a.height?c.height:a.height,15);return a}(),q="right"==a.data.align?-1:1,u=g.data.$.screenX,n=g.data.$.screenY,w=l.$.clientWidth,B=l.$.clientHeight,x=w/B,r=[],P="cke_image_s"+(~q?"e":"w"),Y,T,X,da,J,S,W;b.fire("saveSnapshot");f("mousemove",function(a){Y=a.data.$;J=Y.screenX-u;S=n-Y.screenY;W=Math.abs(J/S);1==q?0>=J?0>=S?k():W>=x?k():h():0>=S?W>=x?h():k():h():0>=J?0>=S?W>=x?h():k():h():0>=S?k():W>=x?k():h();a=m&&
(T>m.width||X>m.height);15>T||15>X||a||(da={width:T,height:X},l.setAttributes(da))},r);f("mouseup",function(){for(var d;d=r.pop();)d.removeListener();c.removeClass(P);e.removeClass("cke_image_resizing");da&&(a.setData(da),b.fire("saveSnapshot"));da=!1},r);c.addClass(P);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function l(a){var b=[],d;return function(e){var g=a.getCommand("justify"+e);if(g){b.push(function(){g.refresh(a,
a.elementPath())});if(e in{right:1,left:1,center:1})g.on("exec",function(d){var g=c(a);if(g){g.setData("align",e);for(g=b.length;g--;)b[g]();d.cancel()}});g.on("refresh",function(b){var g=c(a),f={right:1,left:1,center:1};g&&(void 0===d&&(d=a.filter.checkFeature(a.widgets.registered.image.features.align)),d?this.setState(g.data.align==e?CKEDITOR.TRISTATE_ON:e in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function k(a){if(a.plugins.link){var b=
CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var d=b.onShow,e=b.onOk;b.onShow=function(){var b=c(a),e=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),e.hide()):(e.show(),d.apply(this,arguments))};b.onOk=function(){var b=c(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);b.setData("link",d)}else e.apply(this,
arguments)}}});a.on("destroy",function(){b.removeListener()});a.getCommand("unlink").on("exec",function(b){var d=c(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())});a.getCommand("unlink").on("refresh",function(b){var d=c(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}function c(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function d(b){var c=b.config.image2_alignClasses;
b={div:{match:a(b)},p:{match:a(b)},img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+b.config.image2_captionedClass},figcaption:!0};c?(b.div.classes=c[1],b.p.classes=b.div.classes,b.img.classes=c[0]+","+c[2],b.figure.classes+=","+b.img.classes):(b.div.styles="text-align",b.p.styles="text-align",b.img.styles="float",b.figure.styles="float,display");return b}function e(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a?
"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}}function n(a){return a.data.hasCaption?a.element:a.parts.image}var w=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),x={left:0,center:1,right:2},r=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')},
init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var c=a.config,d=a.lang.image2,e=b(a);c.filebrowserImage2BrowseUrl=c.filebrowserImageBrowseUrl;c.filebrowserImage2UploadUrl=c.filebrowserImageUploadUrl;e.pathName=d.pathName;e.editables.caption.pathName=d.pathNameCaption;a.widgets.add("image",e);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:d.menu,command:"image",
group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=l(a),d;for(d in b)c(d);k(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,g){var f={};e?f.attributes={"class":e[1]}:f.styles={"text-align":"center"};f=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",f);c(f,g);g.move(f);return f}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);
d.remove();f.insertElementIntoRange(b,e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,g=a.config.image2_captionedClass,f=a.editable(),k=["hasCaption","align","link"],h={align:function(c,d,g){var f=c.element;c.changed.align?c.newData.hasCaption||("center"==g&&(c.deflate(),c.element=b(a,f)),c.changed.hasCaption||"center"!=d||"center"==g||(c.deflate(),d=f.findOne("a,img"),d.replace(f),c.element=d)):"center"==g&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element=
b(a,f));!e&&f.is("figure")&&("center"==g?f.setStyle("display","inline-block"):f.removeStyle("display"))},hasCaption:function(b,e,f){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),f?(f=CKEDITOR.dom.element.createFromHtml(w.output({captionedClass:g,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(f,b.element),e.replace(f.findOne("img")),b.element=f):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var g=b.element.is("img")?
b.element:b.element.findOne("img"),f=b.element.is("a")?b.element:b.element.findOne("a"),k=b.element.is("a")&&!e||b.element.is("img")&&e,h;k&&b.deflate();e?(c||(h=d.createElement("a",{attributes:{href:b.newData.link.url}}),h.replace(g),g.move(h)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(h||f).setAttributes(e.set),e.removed.length&&(h||f).removeAttributes(e.removed)):(e=f.findOne("img"),e.replace(f),h=e);k&&(b.element=h)}}};return function(a){var b,c;
a.changed={};for(c=0;c<k.length;c++)b=k[c],a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:!1;for(c=0;c<k.length;c++)b=k[c],h[b](a,a.oldData?a.oldData[b]:null,a.newData[b]);a.inflate()}},checkHasNaturalRatio:function(a){var b=a.$;a=this.getNatural(a);return Math.round(b.clientWidth/a.width*a.height)==b.clientHeight||Math.round(b.clientHeight/a.height*a.width)==b.clientWidth},getNatural:function(a){if(a.$.naturalWidth)a={width:a.$.naturalWidth,height:a.$.naturalHeight};else{var b=new Image;b.src=
a.getAttribute("src");a={width:b.width,height:b.height}}return a},getLinkAttributesGetter:function(){return CKEDITOR.plugins.link.getLinkAttributes},getLinkAttributesParser:function(){return CKEDITOR.plugins.link.parseLinkAttributes}}}(),CKEDITOR.config.image2_captionedClass="image",function(){CKEDITOR.plugins.add("imagespacingbox",{init:function(b){CKEDITOR.on("dialogDefinition",function(h){var f=h.data.definition;"image2"===h.data.dialog.getName()&&(h=f.getContents("info"),h.get("spacingBox")||
(f={children:[{children:[{onShow:function(){var a=this.getDialog().getParentEditor().widgets.focused;if(a){var b=a.parts.image.$.style,f="";b&&(f=parseInt(b.marginLeft,10)||parseInt(b.marginRight,10));a.setData("hspace",f)}},commit:function(a){a.setData("hspace",this.getValue());var b=a.data.hspace?a.data.hspace:0;(a=a.parts.image)&&a.setStyles({"margin-left":b+"px","margin-right":b+"px"})},id:"hspace",label:b.lang.image.hSpace,requiredContent:"img{margin-left,margin-right}",setup:function(a){this.setValue(a.data.hspace)},
type:"text",validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateHSpace)}],type:"hbox"},{children:[{onShow:function(){var a=this.getDialog().getParentEditor().widgets.focused;if(a){var b=a.parts.image.$.style,f="";b&&(f=parseInt(b.marginTop,10)||parseInt(b.marginBottom,10));a.setData("vspace",f)}},commit:function(a){a.setData("vspace",this.getValue());var b=a.data.vspace?a.data.vspace:0;(a=a.parts.image)&&a.setStyles({"margin-bottom":b+"px","margin-top":b+"px"})},id:"vspace",label:b.lang.image.vSpace,
requiredContent:"img{margin-top,margin-bottom}",setup:function(a){this.setValue(a.data.vspace)},type:"text",validate:CKEDITOR.dialog.validate.integer(b.lang.image.validateVSpace)}],type:"hbox"}],id:"spacingBox",type:"hbox"},h.add(f)))})}})}(),function(){function b(a,b){var m,l;b.on("refresh",function(a){var b=[h],d;for(d in a.data.states)b.push(a.data.states[d]);this.setState(CKEDITOR.tools.search(b,f)?f:h)},b,null,100);b.on("exec",function(b){m=a.getSelection();l=m.createBookmarks(1);b.data||(b.data=
{});b.data.done=!1},b,null,0);b.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(l)},b,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,f=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(a){var g=CKEDITOR.plugins.indent.genericDefinition;b(a,a.addCommand("indent",new g(!0)));b(a,a.addCommand("outdent",new g));a.ui.addButton&&(a.ui.addButton("Indent",{label:a.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),a.ui.addButton("Outdent",{label:a.lang.indent.outdent,
command:"outdent",directional:!0,toolbar:"indent,10"}));a.on("dirChanged",function(b){var g=a.createRange(),f=b.data.node;g.setStartBefore(f);g.setEndAfter(f);for(var c=new CKEDITOR.dom.walker(g),d;d=c.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(f)&&d.getDirection())g.setStartAfter(d),c=new CKEDITOR.dom.walker(g);else{var e=a.config.indentClasses;if(e)for(var h="ltr"==b.data.dir?["_rtl",""]:["","_rtl"],w=0;w<e.length;w++)d.hasClass(e[w]+h[0])&&(d.removeClass(e[w]+h[0]),d.addClass(e[w]+h[1]));
e=d.getStyle("margin-right");h=d.getStyle("margin-left");e?d.setStyle("margin-left",e):d.removeStyle("margin-left");h?d.setStyle("margin-right",h):d.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,f){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!f;this.relatedGlobal=f?"indent":"outdent";this.indentKey=f?9:CKEDITOR.SHIFT+
9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var c=a.getCommand(b.relatedGlobal),d;for(d in b.jobs)c.on("exec",function(c){c.data.done||(a.fire("lockSnapshot"),b.execJob(a,d)&&(c.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,d),c.on("refresh",function(c){c.data.states||(c.data.states={});c.data.states[b.name+"@"+d]=b.refreshJob(a,d,c.data.path)},this,null,d);a.addFeature(b)})(this,
b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var f=this.jobs[b];if(f.state!=h)return f.exec.call(this,a)},refreshJob:function(a,b,f){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,f):b.state=h;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function b(a){function b(c){for(var h=l.startContainer,m=l.endContainer;h&&
!h.getParent().equals(c);)h=h.getParent();for(;m&&!m.getParent().equals(c);)m=m.getParent();if(!h||!m)return!1;for(var y=[],q=!1;!q;)h.equals(m)&&(q=!0),y.push(h),h=h.getNext();if(1>y.length)return!1;h=c.getParents(!0);for(m=0;m<h.length;m++)if(h[m].getName&&g[h[m].getName()]){c=h[m];break}for(var h=d.isIndent?1:-1,m=y[0],y=y[y.length-1],q=CKEDITOR.plugins.list.listToArray(c,e),u=q[y.getCustomData("listarray_index")].indent,m=m.getCustomData("listarray_index");m<=y.getCustomData("listarray_index");m++)if(q[m].indent+=
h,0<h){for(var t=q[m].parent,A=m-1;0<=A;A--)if(q[A].indent===h){t=q[A].parent;break}q[m].parent=new CKEDITOR.dom.element(t.getName(),t.getDocument())}for(m=y.getCustomData("listarray_index")+1;m<q.length&&q[m].indent>u;m++)q[m].indent+=h;h=CKEDITOR.plugins.list.arrayToList(q,e,null,a.config.enterMode,c.getDirection());if(!d.isIndent){var C;if((C=c.getParent())&&C.is("li"))for(var y=h.listNode.getChildren(),E=[],r,m=y.count()-1;0<=m;m--)(r=y.getItem(m))&&r.is&&r.is("li")&&E.push(r)}h&&h.listNode.replace(c);
if(E&&E.length)for(m=0;m<E.length;m++){for(r=c=E[m];(r=r.getNext())&&r.is&&r.getName()in g;)CKEDITOR.env.needsNbspFiller&&!c.getFirst(f)&&c.append(l.document.createText(" ")),c.append(r);c.insertAfter(C)}h&&a.fire("contentDomInvalidated");return!0}for(var d=this,e=this.database,g=this.context,l,m=a.getSelection(),m=(m&&m.getRanges()).createIterator();l=m.getNextRange();){for(var r=l.getCommonAncestor();r&&(r.type!=CKEDITOR.NODE_ELEMENT||!g[r.getName()]);){if(a.editable().equals(r)){r=!1;break}r=r.getParent()}r||
(r=l.startPath().contains(g))&&l.setEndAt(r,CKEDITOR.POSITION_BEFORE_END);if(!r){var t=l.getEnclosedNode();t&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in g&&(l.setStartAt(t,CKEDITOR.POSITION_AFTER_START),l.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),r=t)}r&&l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in g&&(t=new CKEDITOR.dom.walker(l),t.evaluator=h,l.startContainer=t.next());r&&l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in g&&(t=new CKEDITOR.dom.walker(l),
t.evaluator=h,l.endContainer=t.previous());if(r)return b(r)}return 0}function h(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function f(b){return a(b)&&g(b)}var a=CKEDITOR.dom.walker.whitespaces(!0),g=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(a){function c(a){d.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];a.on("key",function(b){var c=a.elementPath();
if("wysiwyg"==a.mode&&b.data.keyCode==this.indentKey&&c){var d=this.getContext(c);!d||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d)||(a.execCommand(this.relatedGlobal),b.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?l:m}:function(a,b){return!this.getContext(b)||this.isIndent?m:l},exec:CKEDITOR.tools.bind(b,this)}}
var d=CKEDITOR.plugins.indent;d.registerCommands(a,{indentlist:new c(a,"indentlist",!0),outdentlist:new c(a,"outdentlist")});CKEDITOR.tools.extend(c.prototype,d.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,d){var e=b.contains(h);d||(d=b.contains(a));return d&&e&&e.equals(d.getFirst(h))}}(),function(){function b(a,b,c){if(!a.getCustomData("indent_processed")){var d=this.editor,e=this.isIndent;if(b){d=
a.$.className.match(this.classNameRegex);c=0;d&&(d=d[1],c=CKEDITOR.tools.indexOf(b,d)+1);if(0>(c+=e?1:-1))return;c=Math.min(c,b.length);c=Math.max(c,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<c&&a.addClass(b[c-1])}else{b=h(a,c);c=parseInt(a.getStyle(b),10);var g=d.config.indentOffset||40;isNaN(c)&&(c=0);c+=(e?1:-1)*g;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/g)*g;a.setStyle(b,c?c+(d.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,
a,"indent_processed",1)}}function h(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var f=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,g=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(l){function k(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:d?null:"margin-left,margin-right",classes:d||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")+(d?"("+d.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var c=b.block||
b.blockLimit;if(!c.is(f))var k=c.getAscendant(f),c=k&&b.contains(k)||c;c.is(f)&&(c=c.getParent());if(this.enterBr||this.getContext(b)){if(d){var k=d,c=c.$.className.match(this.classNameRegex),l=this.isIndent,k=c?l?c[1]!=k.slice(-1):!0:l;return k?m:g}return this.isIndent?m:c?CKEDITOR[0>=(parseInt(c.getStyle(h(c)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:g}return g},exec:function(c){var g=c.getSelection(),g=g&&g.getRanges()[0],f;if(f=c.elementPath().contains(a))b.call(this,f,d);else for(g=g.createIterator(),
c=c.config.enterMode,g.enforceRealBlocks=!0,g.enlargeBr=c!=CKEDITOR.ENTER_BR;f=g.getNextParagraph(c==CKEDITOR.ENTER_P?"p":"div");)f.isReadOnly()||b.call(this,f,d);return!0}}}}var c=CKEDITOR.plugins.indent,d=l.config.indentClasses;c.registerCommands(l,{indentblock:new k(l,"indentblock",!0),outdentblock:new k(l,"outdentblock")});CKEDITOR.tools.extend(k.prototype,c.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:d?new RegExp("(?:^|\\s+)("+
d.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function b(a,b){b=void 0===b||b;var f;if(b)f=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){f=a.getParent();if(!f)break;a=f}f=a.getStyle("text-align")||a.getAttribute("align")||""}f&&(f=f.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!f&&b&&(f="rtl"==a.getComputedStyle("direction")?"right":"left");return f}function h(a,b,f){this.editor=a;this.name=b;this.value=f;this.context=
"p";b=a.config.justifyClasses;var h=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(f){case "left":this.cssClassName=b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=h+"{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}};a.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function f(a){var b=a.editor,f=b.createRange();f.setStartBefore(a.data.node);f.setEndAfter(a.data.node);for(var h=new CKEDITOR.dom.walker(f),k;k=h.next();)if(k.type==CKEDITOR.NODE_ELEMENT)if(!k.equals(a.data.node)&&k.getDirection())f.setStartAfter(k),h=new CKEDITOR.dom.walker(f);else{var c=b.config.justifyClasses;c&&(k.hasClass(c[0])?(k.removeClass(c[0]),
k.addClass(c[2])):k.hasClass(c[2])&&(k.removeClass(c[2]),k.addClass(c[0])));c=k.getStyle("text-align");"left"==c?k.setStyle("text-align","right"):"right"==c&&k.setStyle("text-align","left")}}h.prototype={exec:function(a){var g=a.getSelection(),f=a.config.enterMode;if(g){for(var h=g.createBookmarks(),k=g.getRanges(),c=this.cssClassName,d,e,n=a.config.useComputedState,n=void 0===n||n,w=k.length-1;0<=w;w--)for(d=k[w].createIterator(),d.enlargeBr=f!=CKEDITOR.ENTER_BR;e=d.getNextParagraph(f==CKEDITOR.ENTER_P?
"p":"div");)if(!e.isReadOnly()){var x=e.getName(),r;r=a.activeFilter.check(x+"{text-align}");if((x=a.activeFilter.check(x+"("+c+")"))||r){e.removeAttribute("align");e.removeStyle("text-align");var t=c&&(e.$.className=CKEDITOR.tools.ltrim(e.$.className.replace(this.cssClassRegex,""))),v=this.state==CKEDITOR.TRISTATE_OFF&&(!n||b(e,!0)!=this.value);c&&x?v?e.addClass(c):t||e.removeAttribute("class"):v&&r&&e.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();g.selectBookmarks(h)}},
refresh:function(a,g){var f=g.block||g.blockLimit,h=f.getName(),k=f.equals(a.editable()),h=this.cssClassName?a.activeFilter.check(h+"("+this.cssClassName+")"):a.activeFilter.check(h+"{text-align}");k&&!CKEDITOR.dtd.$list[g.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!k&&h?this.setState(b(f,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var b=
new h(a,"justifyleft","left"),m=new h(a,"justifycenter","center"),l=new h(a,"justifyright","right"),k=new h(a,"justifyblock","justify");a.addCommand("justifyleft",b);a.addCommand("justifycenter",m);a.addCommand("justifyright",l);a.addCommand("justifyblock",k);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{label:a.lang.common.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",
{label:a.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{label:a.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));a.on("dirChanged",f)}}})}(),function(){function b(a,b){var c=m.exec(a),d=m.exec(b);if(c){if(!c[2]&&"px"==d[2])return d[1];if("px"==c[2]&&!d[2])return d[1]+"px"}return b}function h(g){return{elements:{$:function(h){var c=h.attributes,c=c&&c["data-cke-realelement"],d=f(g,decodeURIComponent(c));if((c=(c=c&&new CKEDITOR.htmlParser.fragment.fromHtml(d))&&
c.children[0])&&h.attributes["data-cke-resizable"]){var e=(new a(h)).rules;h=c.attributes;d=e.width;e=e.height;d&&(h.width=b(h.width,d));e&&(h.height=b(h.height,e))}return c}}}}function f(a,b){var c=[],d=/^cke:/i,e=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){d.test(a.name)&&(a.name=a.name.replace(d,""),c.push(a))},iframe:function(a){a.children=[]}}}),g=a.activeFilter,f=new CKEDITOR.htmlParser.basicWriter,h=CKEDITOR.htmlParser.fragment.fromHtml(b);e.applyTo(h);g.applyTo(h);CKEDITOR.tools.array.forEach(c,
function(a){a.name="cke:"+a.name});h.writeHtml(f);return f.getHtml()}var a=CKEDITOR.htmlParser.cssStyle,g=CKEDITOR.tools.cssLength,m=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i;CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){var b=a.dataProcessor;(b=b&&b.htmlFilter)&&b.addRules(h(a),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(b,f,c,d){var e=this.lang.fakeobjects,e=e[c]||
e.unknown;f={"class":f,"data-cke-realelement":encodeURIComponent(b.getOuterHtml()),"data-cke-real-node-type":b.type,alt:e,title:e,align:b.getAttribute("align")||""};CKEDITOR.env.hc||(f.src=CKEDITOR.tools.transparentImageData);c&&(f["data-cke-real-element-type"]=c);d&&(f["data-cke-resizable"]=d,c=new a,d=b.getAttribute("width"),b=b.getAttribute("height"),d&&(c.rules.width=g(d)),b&&(c.rules.height=g(b)),c.populate(f));return this.document.createElement("img",{attributes:f})};CKEDITOR.editor.prototype.createFakeParserElement=
function(b,f,c,d){var e=this.lang.fakeobjects,e=e[c]||e.unknown,h;h=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(h);h=h.getHtml();f={"class":f,"data-cke-realelement":encodeURIComponent(h),"data-cke-real-node-type":b.type,alt:e,title:e,align:b.attributes.align||""};CKEDITOR.env.hc||(f.src=CKEDITOR.tools.transparentImageData);c&&(f["data-cke-real-element-type"]=c);d&&(f["data-cke-resizable"]=d,d=b.attributes,b=new a,c=d.width,d=d.height,void 0!==c&&(b.rules.width=g(c)),void 0!==d&&(b.rules.height=
g(d)),b.populate(f));return new CKEDITOR.htmlParser.element("img",f)};CKEDITOR.editor.prototype.restoreRealElement=function(a){if(a.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var g=decodeURIComponent(a.data("cke-realelement")),g=f(this,g),g=CKEDITOR.dom.element.createFromHtml(g,this.document);if(a.data("cke-resizable")){var c=a.getStyle("width");a=a.getStyle("height");c&&g.setAttribute("width",b(g.getAttribute("width"),c));a&&g.setAttribute("height",b(g.getAttribute("height"),a))}return g}}(),
"use strict",function(){function b(a){return a.replace(/'/g,"\\$\x26")}function h(a){for(var b=a.length,c=[],d,e=0;e<b;e++)d=a.charCodeAt(e),c.push(d);return"String.fromCharCode("+c.join(",")+")"}function f(a,c){for(var d=a.plugins.link,e=d.compiledProtectionFunction.params,d=[d.compiledProtectionFunction.name,"("],g,f,h=0;h<e.length;h++)g=e[h].toLowerCase(),f=c[g],0<h&&d.push(","),d.push("'",f?b(encodeURIComponent(c[g])):"","'");d.push(")");return d.join("")}function a(a){a=a.config.emailProtection||
"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,c,d){b.name=c;b.params=[];d.replace(/[^,\s]+/g,function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return c.replace(/%1/g,"rtl"==b?"right":"left").replace(/%2/g,"cke_contents_"+b)}var b="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",
c=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(b){var c="a[!href]";CKEDITOR.dialog.isTabEnabled(b,"link","advanced")&&(c=c.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(b,"link","target")&&
(c=c.replace("]",",target,onclick]"));b.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:c,requiredContent:"a[href]"}));b.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));b.addCommand("unlink",new CKEDITOR.unlinkCommand);b.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);b.setKeystroke(CKEDITOR.CTRL+76,"link");b.setKeystroke(CKEDITOR.CTRL+75,"link");b.ui.addButton&&(b.ui.addButton("Link",{label:b.lang.link.toolbar,
command:"link",toolbar:"links,10"}),b.ui.addButton("Unlink",{label:b.lang.link.unlink,command:"unlink",toolbar:"links,20"}),b.ui.addButton("Anchor",{label:b.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");b.on("doubleclick",function(a){var c=a.data.element.getAscendant({a:1,img:1},!0);c&&!c.isReadOnly()&&(c.is("a")?(a.data.dialog=!c.getAttribute("name")||c.getAttribute("href")&&
c.getChildCount()?"link":"anchor",a.data.link=c):CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,c)&&(a.data.dialog="anchor"))},null,null,0);b.on("doubleclick",function(a){a.data.dialog in{link:1,anchor:1}&&a.data.link&&b.getSelection().selectElement(a.data.link)},null,null,20);b.addMenuItems&&b.addMenuItems({anchor:{label:b.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:b.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:b.lang.link.menu,
command:"link",group:"link",order:1},unlink:{label:b.lang.link.unlink,command:"unlink",group:"link",order:5}});b.contextMenu&&b.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;a=CKEDITOR.plugins.link.tryRestoreFakeAnchor(b,a);if(!a&&!(a=CKEDITOR.plugins.link.getSelectedLink(b)))return null;var c={};a.getAttribute("href")&&a.getChildCount()&&(c={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});a&&a.hasAttribute("name")&&(c.anchor=c.removeAnchor=CKEDITOR.TRISTATE_OFF);
return c});this.compiledProtectionFunction=a(b)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var g=/^javascript:/,m=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,
l=/subject=([^;?:@&=$,\/]*)/i,k=/body=([^;?:@&=$,\/]*)/i,c=/^#(.*)$/,d=/^((?:http|https|ftp|news):\/\/)?(.*)$/,e=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,w=/^javascript:([^(]+)\(([^)]+)\)$/,x=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,r=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,t=/^tel:(.*)$/,v={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(a,b){var c=a.getSelection(),d=c.getSelectedElement(),e=c.getRanges(),g=[],f;if(!b&&d&&d.is("a"))return d;for(d=0;d<e.length;d++)if(f=c.getRanges()[d],f.shrink(CKEDITOR.SHRINK_ELEMENT,!0,{skipBogus:!0}),(f=a.elementPath(f.getCommonAncestor()).contains("a",1))&&b)g.push(f);else if(f)return f;return b?
g:null},getEditorAnchors:function(a){for(var b=a.editable(),c=b.isInline()&&!a.plugins.divarea?a.document:b,b=c.getElementsByTag("a"),c=c.getElementsByTag("img"),d=[],e=0,g;g=b.getItem(e++);)(g.data("cke-saved-name")||g.hasAttribute("name"))&&d.push({name:g.data("cke-saved-name")||g.getAttribute("name"),id:g.getAttribute("id")});for(e=0;g=c.getItem(e++);)(g=this.tryRestoreFakeAnchor(a,g))&&d.push({name:g.getAttribute("name"),id:g.getAttribute("id")});return d},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,
b){if(b&&b.data("cke-real-element-type")&&"anchor"==b.data("cke-real-element-type")){var c=a.restoreRealElement(b);if(c.data("cke-saved-name"))return c}},parseLinkAttributes:function(a,b){var f=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",h=a.plugins.link.compiledProtectionFunction,u=a.config.emailProtection,B={},A;f.match(g)&&("encode"==u?f=f.replace(n,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):u&&f.replace(w,function(a,
b,c){if(b==h.name){B.type="email";a=B.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,e,g,f=0;f<d;f++)e=decodeURIComponent,g=c[f].replace(b,"").replace(/\\'/g,"'"),g=e(g),e=h.params[f].toLowerCase(),a[e]=g;a.address=[a.name,a.domain].join("@")}}));if(!B.type)if(u=f.match(c))B.type="anchor",B.anchor={},B.anchor.name=B.anchor.id=u[1];else if(u=f.match(t))B.type="tel",B.tel=u[1];else if(u=f.match(m)){A=f.match(l);var f=f.match(k),C=B.email={};B.type="email";C.address=u[0].replace("mailto:",
"");A&&(C.subject=decodeURIComponent(A[1]));f&&(C.body=decodeURIComponent(f[1]))}else f&&(A=f.match(d))&&(B.type="url",B.url={},B.url.protocol=A[1],B.url.url=A[2]);if(b){if(f=b.getAttribute("target"))B.target={type:f.match(e)?f:"frame",name:f};else if(f=(f=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&f.match(x))for(B.target={type:"popup",name:f[1]};u=r.exec(f[2]);)"yes"!=u[2]&&"1"!=u[2]||u[1]in{height:1,width:1,top:1,left:1}?isFinite(u[2])&&(B.target[u[1]]=u[2]):B.target[u[1]]=!0;null!==
b.getAttribute("download")&&(B.download=!0);var f={},E;for(E in v)(u=b.getAttribute(E))&&(f[v[E]]=u);if(E=b.data("cke-saved-name")||f.advName)f.advName=E;CKEDITOR.tools.isEmpty(f)||(B.advanced=f)}return B},getLinkAttributes:function(a,c){var d=a.config.emailProtection||"",e={};switch(c.type){case "url":var d=c.url&&void 0!==c.url.protocol?c.url.protocol:"http://",g=c.url&&CKEDITOR.tools.trim(c.url.url)||"";e["data-cke-saved-href"]=0===g.indexOf("/")?g:d+g;break;case "anchor":d=c.anchor&&c.anchor.id;
e["data-cke-saved-href"]="#"+(c.anchor&&c.anchor.name||d||"");break;case "email":var k=c.email,g=k.address;switch(d){case "":case "encode":var l=encodeURIComponent(k.subject||""),m=encodeURIComponent(k.body||""),k=[];l&&k.push("subject\x3d"+l);m&&k.push("body\x3d"+m);k=k.length?"?"+k.join("\x26"):"";"encode"==d?(d=["javascript:void(location.href\x3d'mailto:'+",h(g)],k&&d.push("+'",b(k),"'"),d.push(")")):d=["mailto:",g,k];break;default:d=g.split("@",2),k.name=d[0],k.domain=d[1],d=["javascript:",f(a,
k)]}e["data-cke-saved-href"]=d.join("");break;case "tel":e["data-cke-saved-href"]="tel:"+c.tel}if(c.target)if("popup"==c.target.type){for(var d=["window.open(this.href, '",c.target.name||"","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),g=n.length,l=function(a){c.target[a]&&n.push(a+"\x3d"+c.target[a])},k=0;k<g;k++)n[k]+=c.target[n[k]]?"\x3dyes":"\x3dno";l("width");l("left");l("height");l("top");d.push(n.join(","),"'); return false;");e["data-cke-pa-onclick"]=
d.join("")}else"notSet"!=c.target.type&&c.target.name&&(e.target=c.target.name);c.download&&(e.download="");if(c.advanced){for(var t in v)(d=c.advanced[v[t]])&&(e[t]=d);e.name&&(e["data-cke-saved-name"]=e.name)}e["data-cke-saved-href"]&&(e.href=e["data-cke-saved-href"]);t={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};c.advanced&&CKEDITOR.tools.extend(t,v);for(var w in e)delete t[w];return{set:e,removed:CKEDITOR.tools.object.keys(t)}},showDisplayTextForElement:function(a,
b){var c={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},d=b.getSelection();return b.widgets&&b.widgets.focused||d&&1<d.getRanges().length?!1:!a||!a.getName||!a.is(c)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var b=a.getSelection().getRanges()[0],c=b.getPreviousEditableNode()&&b.getPreviousEditableNode().getAscendant("a",!0)||b.getNextEditableNode()&&b.getNextEditableNode().getAscendant("a",!0),d;b.collapsed&&c&&
(d=b.createBookmark(),b.selectNodeContents(c),b.select())}c=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(c);d&&(b.moveToBookmark(d),b.select())},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant("a",!0);c&&"a"==c.getName()&&c.getAttribute("href")&&c.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(a){var b=a.getSelection(),c=b.createBookmarks(),d;if(b&&(d=b.getSelectedElement())&&(d.getChildCount()?d.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))d.hasAttribute("href")?(d.removeAttributes({name:1,"data-cke-saved-name":1}),d.removeClass("cke_anchor")):d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,
linkShowTargetTab:!0,linkDefaultProtocol:"http://"})}(),function(){function b(a,b,c,d){for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),g=[],f=0;f<b.contents.length;f++){var h=b.contents[f];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(g.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,l,f=0;f<g.length;f++){var m=g[f].getCustomData("listarray_index");k=e[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,
{start:1,type:1}),l.removeStyle("list-style-type"),e[m].parent=l)}c=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode);for(var n,e=c.listNode.getChildCount(),f=0;f<e&&(n=c.listNode.getChild(f));f++)n.getName()==this.type&&d.push(n);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function h(a,b,c){var d=b.contents,e=b.root.getDocument(),g=[];if(1==d.length&&d[0].equals(b.root)){var f=e.createElement("div");d[0].moveChildren&&d[0].moveChildren(f);d[0].append(f);d[0]=f}b=b.contents[0].getParent();
for(f=0;f<d.length;f++)b=b.getCommonAncestor(d[f].getParent());a=a.config.useComputedState;var h,k;a=void 0===a||a;for(f=0;f<d.length;f++)for(var l=d[f],m;m=l.getParent();){if(m.equals(b)){g.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>g.length)){d=g[g.length-1].getNext();f=e.createElement(this.type);for(c.push(f);g.length;)c=g.shift(),a=e.createElement("li"),l=c,l.is("pre")||r.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):
(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(f);h&&k&&f.setAttribute("dir",h);d?f.insertBefore(d):f.appendTo(b)}}function f(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,
c),g=[],f=0;f<b.contents.length;f++){var h=b.contents[f];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(g.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(f=0;f<g.length;f++)h=g[f].getCustomData("listarray_index"),e[h].indent=-1;for(f=h+1;f<e.length;f++)if(e[f].indent>e[f-1].indent+1){g=e[f-1].indent+1-e[f].indent;for(h=e[f].indent;e[f]&&e[f].indent>=h;)e[f].indent+=g,f++;f--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,
b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function a(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function g(a,b,c,d){for(var e,g;e=a[d?"getLast":"getFirst"](t);)(g=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",g),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function m(a){function b(c){var d=a[c?"getPrevious":"getNext"](w);d&&d.type==CKEDITOR.NODE_ELEMENT&&
d.is(a.getName())&&(g(a,d,null,!c),a.remove(),a=d)}b();b(1)}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function k(a,b,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var e=d.extractContents();b.trim(!1,!0);var f=b.createBookmark(),h=new CKEDITOR.dom.elementPath(b.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,l=new CKEDITOR.dom.elementPath(d.startContainer),
n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(w))&&x(k)&&k.remove();(k=e.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?e.insertBefore(k):b.startContainer.append(e);n&&(e=c(n))&&(h.contains(n)?(g(e,n.getParent(),n),e.remove()):h.append(e));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){l=d.startPath();e=l.block;if(!e)break;e.is("li")&&(h=e.getParent(),e.equals(h.getLast(w))&&
e.equals(h.getFirst(w))&&(e=h));d.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove()}d=d.clone();e=a.editable();d.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return w(a)&&!x(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&m(d);b.moveToBookmark(f);b.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(w))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:null}var d={ol:1,ul:1},e=CKEDITOR.dom.walker.whitespaces(),
n=CKEDITOR.dom.walker.bookmark(),w=function(a){return!(e(a)||n(a))},x=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,e,g){if(!d[a.getName()])return[];e||(e=0);c||(c=[]);for(var f=0,h=a.getChildCount();f<h;f++){var k=a.getChild(f);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(k,b,c,e+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:k,contents:[]};g?l.grandparent=g:(l.grandparent=a.getParent(),
l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",c.length);c.push(l);for(var m=0,n=k.getChildCount(),t;m<n;m++)t=k.getChild(m),t.type==CKEDITOR.NODE_ELEMENT&&d[t.getName()]?CKEDITOR.plugins.list.listToArray(t,b,c,e+1,l.grandparent):l.contents.push(t)}}return c},arrayToList:function(a,b,c,e,g){c||(c=0);if(!a||a.length<c+1)return null;for(var f,h=a[c].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(h),
l=null,m=c,t=Math.max(a[c].indent,0),r=null,x,D,O=e==CKEDITOR.ENTER_P?"p":"div";;){var I=a[m];f=I.grandparent;x=I.element.getDirection(1);if(I.indent==t){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),g&&l.setAttribute("dir",g),k.append(l));r=l.append(I.element.clone(0,1));x!=l.getDirection(1)&&r.setAttribute("dir",x);for(f=0;f<I.contents.length;f++)r.append(I.contents[f].clone(1,1));m++}else if(I.indent==Math.max(t,0)+1)I=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,
null,m,e,I!=x?x:null),!r.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=h.$.documentMode&&r.append(h.createText(" ")),r.append(m.listNode),m=m.nextIndex;else if(-1==I.indent&&!c&&f){d[f.getName()]?(r=I.element.clone(!1,!0),x!=f.getDirection(1)&&r.setAttribute("dir",x)):r=new CKEDITOR.dom.documentFragment(h);var l=f.getDirection(1)!=x,M=I.element,R=M.getAttribute("class"),K=M.getAttribute("style"),H=r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||l||K||R),P,Y=I.contents.length,T;
for(f=0;f<Y;f++)if(P=I.contents[f],n(P)&&1<Y)H?T=P.clone(1,1):r.append(P.clone(1,1));else if(P.type==CKEDITOR.NODE_ELEMENT&&P.isBlockBoundary()){l&&!P.getDirection()&&P.setAttribute("dir",x);D=P;var X=M.getAttribute("style");X&&D.setAttribute("style",X.replace(/([^;])$/,"$1;")+(D.getAttribute("style")||""));R&&P.addClass(R);D=null;T&&(r.append(T),T=null);r.append(P.clone(1,1))}else H?(D||(D=h.createElement(O),r.append(D),l&&D.setAttribute("dir",x)),K&&D.setAttribute("style",K),R&&D.setAttribute("class",
R),T&&(D.append(T),T=null),D.append(P.clone(1,1))):r.append(P.clone(1,1));T&&((D||r).append(T),T=null);r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(x=r.getLast())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("br")&&x.remove(),(x=r.getLast(w))&&x.type==CKEDITOR.NODE_ELEMENT&&x.is(CKEDITOR.dtd.$block)||r.append(h.createElement("br")));x=r.$.nodeName.toLowerCase();"div"!=x&&"p"!=x||r.appendBogus();k.append(r);l=null;m++}else return null;D=null;if(a.length<=m||Math.max(a[m].indent,
0)<t)break}if(b)for(a=k.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,h=g=e=void 0,e=c.getDirection()))){for(g=c.getParent();g&&!(h=g.getDirection());)g=g.getParent();e==h&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,nextIndex:m}}};var r=/^h[1-6]$/,t=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);a.prototype={exec:function(a){function c(a){return d[a.root.getName()]&&!e(a.root,[CKEDITOR.NODE_COMMENT])}
function e(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function g(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(a,a.elementPath());var k=a.config,l=a.getSelection(),n=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var t=a.editable();if(t.getFirst(w)){var r=1==n.length&&n[0];(k=r&&r.getEnclosedNode())&&
k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else k.enterMode==CKEDITOR.ENTER_BR?t.appendBogus():n[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(n)}for(var k=l.createBookmarks(!0),t=[],x={},n=n.createIterator(),F=0;(r=n.getNextRange())&&++F;){var G=r.getBoundaryNodes(),L=G.startNode,D=G.endNode;L.type==CKEDITOR.NODE_ELEMENT&&"td"==L.getName()&&r.setStartAt(G.startNode,CKEDITOR.POSITION_AFTER_START);D.type==CKEDITOR.NODE_ELEMENT&&"td"==D.getName()&&r.setEndAt(G.endNode,
CKEDITOR.POSITION_BEFORE_END);r=r.createIterator();for(r.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;G=r.getNextParagraph();)if(!G.getCustomData("list_block")&&!g(G)){CKEDITOR.dom.element.setMarker(x,G,"list_block",1);for(var O=a.elementPath(G),L=O.elements,D=0,O=O.blockLimit,I,M=L.length-1;0<=M&&(I=L[M]);M--)if(d[I.getName()]&&O.contains(I)){O.removeCustomData("list_group_object_"+F);(L=I.getCustomData("list_group_object"))?L.contents.push(G):(L={root:I,contents:[G]},t.push(L),CKEDITOR.dom.element.setMarker(x,
I,"list_group_object",L));D=1;break}D||(D=O,D.getCustomData("list_group_object_"+F)?D.getCustomData("list_group_object_"+F).contents.push(G):(L={root:D,contents:[G]},CKEDITOR.dom.element.setMarker(x,D,"list_group_object_"+F,L),t.push(L)))}}for(I=[];0<t.length;)L=t.shift(),this.state==CKEDITOR.TRISTATE_OFF?c(L)||(d[L.root.getName()]?b.call(this,a,L,x,I):h.call(this,a,L,I)):this.state==CKEDITOR.TRISTATE_ON&&d[L.root.getName()]&&!c(L)&&f.call(this,a,L,x);for(M=0;M<I.length;M++)m(I[M]);CKEDITOR.dom.element.clearAllMarkers(x);
l.selectBookmarks(k);a.focus()},refresh:function(a,b){var c=b.contains(d,1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(b){b.blockless||(b.addCommand("numberedlist",new a("numberedlist","ol")),b.addCommand("bulletedlist",new a("bulletedlist","ul")),b.ui.addButton&&(b.ui.addButton("NumberedList",{label:b.lang.list.numberedlist,
command:"numberedlist",directional:!0,toolbar:"list,10"}),b.ui.addButton("BulletedList",{label:b.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),b.on("key",function(a){var e=a.data.domEvent.getKey(),f;if("wysiwyg"==b.mode&&e in{8:1,46:1}){var g=b.getSelection().getRanges()[0],h=g&&g.startPath();if(g&&g.collapsed){var m=8==e,n=b.editable(),t=new CKEDITOR.dom.walker(g.clone());t.evaluator=function(a){return w(a)&&!x(a)};t.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&
a.is("table"))};e=g.clone();if(m){var r;(r=h.contains(d))&&g.checkBoundaryOfElement(r,CKEDITOR.START)&&(r=r.getParent())&&r.is("li")&&(r=c(r))?(f=r,r=r.getPrevious(w),e.moveToPosition(r&&x(r)?r:f,CKEDITOR.POSITION_BEFORE_START)):(t.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),t.range.setEnd(g.startContainer,g.startOffset),(r=t.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&(r.getName()in d||r.is("li"))&&(r.is("li")||(t.range.selectNodeContents(r),t.reset(),t.evaluator=l,r=t.previous()),f=r,e.moveToElementEditEnd(f),
e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)k(b,e,g),a.cancel();else{var F=h.contains(d);F&&g.checkBoundaryOfElement(F,CKEDITOR.START)&&(f=F.getFirst(w),g.checkBoundaryOfElement(f,CKEDITOR.START)&&(r=F.getPrevious(w),c(f)?r&&(g.moveToElementEditEnd(r),g.select()):b.execCommand("outdent"),a.cancel()))}}else if(f=h.contains("li")){if(t.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),m=(n=f.getLast(w))&&l(n)?n:f,h=0,(r=t.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in
d&&r.equals(n)?(h=1,r=t.next()):g.checkBoundaryOfElement(m,CKEDITOR.END)&&(h=2),h&&r){g=g.clone();g.moveToElementEditStart(r);if(1==h&&(e.optimize(),!e.startContainer.equals(f))){for(f=e.startContainer;f.is(CKEDITOR.dtd.$inline);)F=f,f=f.getParent();F&&e.moveToPosition(F,CKEDITOR.POSITION_AFTER_END)}2==h&&(e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));k(b,e,g);a.cancel()}}else t.range.setEndAt(n,
CKEDITOR.POSITION_BEFORE_END),(r=t.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(d)&&(r=r.getFirst(w),h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(h.block.remove(),g.moveToElementEditStart(r),g.select()):c(r)?(g.moveToElementEditStart(r),g.select()):(g=g.clone(),g.moveToElementEditStart(r),k(b,e,g)),a.cancel());setTimeout(function(){b.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(b){if(!b.blockless){var h;h=new CKEDITOR.dialogCommand("numberedListStyle",
{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]});h=b.addCommand("numberedListStyle",h);b.addFeature(h);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");h=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});h=b.addCommand("bulletedListStyle",h);b.addFeature(h);CKEDITOR.dialog.add("bulletedListStyle",
this.path+"dialogs/liststyle.js");b.addMenuGroup("list",108);b.addMenuItems({numberedlist:{label:b.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:b.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});b.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;for(;b;){var a=b.getName();if("ol"==a)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==a)return{bulletedlist:CKEDITOR.TRISTATE_OFF};b=b.getParent()}return null})}}};
CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function b(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(U(a)||V(a)||w(a))}))}function h(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function f(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=l(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function a(a,b,c){q(a,b);q(a,c);
a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function g(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!U(b)||n(b)&&!w(b)&&!e(a,b)})}function m(a,b,c){return a>b&&a<c}function l(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function k(a){var b=a.doc,d=F('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+
aa+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),e=CKEDITOR.getUrl(this.path+"images/"+(G.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");C(d,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[C(F('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:aa+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+
a.boxColor+";cursor:pointer;"+(G.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(G.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;"]}),C(F(ca,b),{base:ba+"left:0px;border-left-color:"+a.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"]}),C(F(ca,b),{base:ba+"right:0px;border-right-color:"+
a.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(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){q(a,this);var b=a.holdDistance,c=this.size;return c&&m(a.mouse.y,c.top-b,c.bottom+b)&&m(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,e=d.upper,g=d.lower,f=e||g,h=f.getParent(),k={};this.trigger=d;e&&q(a,e,!0);g&&q(a,g,!0);q(a,
h,!0);a.inInlineMode&&u(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=f.size.left-f.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=f.size.outerWidth+f.size.margin.left+f.size.margin.right+b.scroll.x,k.right="");e&&g?k.top=e.size.margin.bottom===g.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<g.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-g.size.margin.top:
e?g||(k.top=e.size.bottom+e.size.margin.bottom):k.top=g.size.top-g.size.margin.top;d.is(H)||m(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(H)):d.is(P)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1,this.look(P)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(Y));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);
for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new E("span",a.doc)});for(b=d.lineChildren.length;b--;)d.lineChildren[b].appendTo(d);d.look(Y);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(b){d.detach();c(a,function(b){var c=a.line.trigger;b[c.is(I)?"insertBefore":"insertAfter"](c.is(I)?
c.lower:c.upper)},!0);a.editor.focus();G.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});d.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=d}function c(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,g;G.ie&&a.enterMode==CKEDITOR.ENTER_BR?g=a.doc.createText(T):(g=(g=l(a.element,!0))&&g.data("cke-enter-mode")||a.enterMode,g=new E(O[g],a.doc),g.is("br")||a.doc.createText(T).appendTo(g));c&&e.fire("saveSnapshot");b(g);d.moveToPosition(g,
CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=g;c&&e.fire("saveSnapshot")}function d(a,b){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function d(e){var g=G.ie&&9>G.version?" ":T,f=a.hotNode&&a.hotNode.getText()==g&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;c(a,function(c){f&&a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](e);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});G.ie||a.enterMode==
CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(c){c=c.getSelection().getStartElement();var e;c=c.getAscendant(S,1);if(!t(a,c)&&c&&!c.equals(a.editable)&&!c.contains(a.editable)){(e=l(c))&&"false"==e.getAttribute("contenteditable")&&(c=e);a.element=c;e=g(a,c,!b);var h;n(e)&&e.is(a.triggers)&&e.is(J)&&(!g(a,e,!b)||(h=g(a,e,!b))&&n(h)&&h.is(a.triggers))?d(e):(h=f(a,c),n(h)&&(g(a,h,!b)?(c=g(a,h,!b))&&n(c)&&c.is(a.triggers)&&d(h):d(h)))}}}()}}function e(a,b){if(!b||b.type!=
CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!n(a))return!1;var b;(b=x(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function x(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function r(a,b){return n(b)?b.is(a.triggers):null}function t(a,b){if(!b)return!1;for(var c=b.getParents(1),d=
c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function v(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(da)});if(!b)return!1;q(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function z(a){var b=a.editable,c=a.mouse,d=a.view,g=a.triggerOffset;u(a);var f=c.y>(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[f?"getLast":"getFirst"](function(a){return!(U(a)||
V(a))});if(!b)return null;e(a,b)&&(b=a.line.wrap[f?"getPrevious":"getNext"](function(a){return!(U(a)||V(a))}));if(!n(b)||w(b)||!r(a,b))return null;q(a,b);return!f&&0<=b.size.top&&m(c.y,0,b.size.top+g)?(a=a.inInlineMode||0===d.scroll.y?H:Y,new h([null,b,I,K,a])):f&&b.size.bottom<=d.pane.height&&m(c.y,b.size.bottom-g,d.pane.height)?(a=a.inInlineMode||m(b.size.bottom,d.pane.height-g,d.pane.height)?P:Y,new h([b,null,M,K,a])):null}function p(a){var b=a.mouse,c=a.view,d=a.triggerOffset,e=f(a);if(!e)return null;
q(a,e);var d=Math.min(d,0|e.size.outerHeight/2),k=[],l,p;if(m(b.y,e.size.top-1,e.size.top+d))p=!1;else if(m(b.y,e.size.bottom-d,e.size.bottom+1))p=!0;else return null;if(w(e)||v(a,e,p)||e.getParent().is(X))return null;var t=g(a,e,!p);if(t){if(t&&t.type==CKEDITOR.NODE_TEXT)return null;if(n(t)){if(w(t)||!r(a,t)||t.getParent().is(X))return null;k=[t,e][p?"reverse":"concat"]().concat([R,K])}}else e.equals(a.editable[p?"getLast":"getFirst"](a.isRelevant))?(u(a),p&&m(b.y,e.size.bottom-d,c.pane.height)&&
m(e.size.bottom,c.pane.height-d,c.pane.height)?l=P:m(b.y,0,e.size.top+d)&&(l=H)):l=Y,k=[null,e][p?"reverse":"concat"]().concat([p?M:I,K,l,e.equals(a.editable[p?"getLast":"getFirst"](a.isRelevant))?p?P:H:Y]);return 0 in k?new h(k):null}function y(a,b,c,d){for(var e=b.getDocumentPosition(),g={},f={},h={},k={},l=N.length;l--;)g[N[l]]=parseInt(b.getComputedStyle.call(b,"border-"+N[l]+"-width"),10)||0,h[N[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+N[l]),10)||0,f[N[l]]=parseInt(b.getComputedStyle.call(b,
"margin-"+N[l]),10)||0;c&&!d||B(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+g.top+g.bottom);k.width=k.outerWidth-(h.left+h.right+g.left+g.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return C({border:g,padding:h,margin:f,ignoreScroll:c},k,!0)}function q(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size=
{};else if(b.size.ignoreScroll==c&&b.size.date>new Date-W)return null;return C(b.size,y(a,b,c),{date:+new Date},!0)}function u(a,b){a.view.editable=y(a,a.editable,b,!0)}function B(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-W)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();C(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},
!0)}}function A(a,b,c,d){for(var e=d,g=d,f=0,k=!1,l=!1,m=a.view.pane.height,u=a.mouse;u.y+f<m&&0<u.y-f;){k||(k=b(e,d));l||(l=b(g,d));!k&&0<u.y-f&&(e=c(a,{x:u.x,y:u.y-f}));!l&&u.y+f<m&&(g=c(a,{x:u.x,y:u.y+f}));if(k&&l)break;f+=2}return new h([e,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var b=a.config,l=b.magicline_triggerOffset||30,m={editor:a,enterMode:b.enterMode,triggerOffset:l,holdDistance:0|l*(b.magicline_holdDistance||.5),boxColor:b.magicline_color||"#ff0000",rtl:"rtl"==
b.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(b.magicline_tabuList||[]),triggers:b.magicline_everywhere?S:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},q,v,r;m.isRelevant=function(a){return n(a)&&!e(m,a)&&!w(a)};a.on("contentDom",function(){var l=a.editable(),n=a.document,w=a.window;C(m,{editable:l,inInlineMode:l.isInline(),doc:n,win:w,hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();l.is(D.$inline)||(m.inInlineMode&&!x(l)&&l.setStyles({position:"relative",
top:null,left:null}),k.call(this,m),B(m),l.attachListener(a,"beforeUndoImage",function(){m.line.detach()}),l.attachListener(a,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),a.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),l.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==a.mode)if(m.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;B(m);u(m,!0);var d=m.view.editable,e=m.view.scroll;c>d.left-e.x&&c<
d.right-e.x&&b>d.top-e.y&&b<d.bottom-e.y||(clearTimeout(r),r=null,m.line.detach())}else clearTimeout(r),r=null,m.line.detach()}),l.attachListener(l,"keyup",function(){m.hiddenMode=0}),l.attachListener(l,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),l.attachListener(m.inInlineMode?l:n,"mousemove",function(b){v=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!r){var c={x:b.data.$.clientX,y:b.data.$.clientY};r=setTimeout(function(){m.mouse=
c;r=m.trigger=null;B(m);v&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=Z(m,!0))&&((m.trigger=z(m)||p(m)||ga(m))&&!t(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),v=!1)},30)}}),l.attachListener(w,"scroll",function(){"wysiwyg"==a.mode&&(m.line.detach(),G.webkit&&(m.hiddenMode=1,clearTimeout(q),q=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),l.attachListener(L?n:w,"mousedown",function(){"wysiwyg"==a.mode&&(m.line.detach(),
m.hiddenMode=1,m.mouseDown=1)}),l.attachListener(L?n:w,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),a.addCommand("accessPreviousSpace",d(m)),a.addCommand("accessNextSpace",d(m,!0)),a.setKeystroke([[b.magicline_keystrokePrevious,"accessPreviousSpace"],[b.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,e;for(e in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(e),d=b.count();d--;)if((c=b.getItem(d)).data("cke-magicline-hot")){m.hotNode=c;m.lastCmdDirection=
"true"===c.data("cke-magicline-dir")?!0:!1;return}}),a._.magiclineBackdoor={accessFocusSpace:c,boxTrigger:h,isLine:e,getAscendantTrigger:f,getNonEmptyNeighbour:g,getSize:y,that:m,triggerEdge:p,triggerEditable:z,triggerExpand:ga})},this)}});var C=CKEDITOR.tools.extend,E=CKEDITOR.dom.element,F=E.createFromHtml,G=CKEDITOR.env,L=CKEDITOR.env.ie&&9>CKEDITOR.env.version,D=CKEDITOR.dtd,O={},I=128,M=64,R=32,K=16,H=4,P=2,Y=1,T=" ",X=D.$listItem,da=D.$tableContent,J=C({},D.$nonEditable,D.$empty),S=D.$block,
W=100,aa="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",ba=aa+"border-color:transparent;display:block;border-style:solid;",ca="\x3cspan\x3e"+T+"\x3c/span\x3e";O[CKEDITOR.ENTER_BR]="br";O[CKEDITOR.ENTER_P]="p";O[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties=a+b+(c||Y);return this},is:function(a){return(this.properties&a)==a}};var Z=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,
c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var g=b.doc,f=b.line.wrap;d=d||b.mouse;var h=a(g,d);c&&e(b,h)&&(f.hide(),h=a(g,d),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||G.ie&&9>G.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),U=CKEDITOR.dom.walker.whitespaces(),V=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ga=function(){function c(e){var g=e.element,f,h,k;if(!n(g)||g.contains(e.editable)||g.isReadOnly())return null;
k=A(e,function(a,b){return!b.equals(a)},function(a,b){return Z(a,!0,b)},g);f=k.upper;h=k.lower;if(b(e,f,h))return k.set(R,8);if(f&&g.contains(f))for(;!f.getParent().equals(g);)f=f.getParent();else f=g.getFirst(function(a){return d(e,a)});if(h&&g.contains(h))for(;!h.getParent().equals(g);)h=h.getParent();else h=g.getLast(function(a){return d(e,a)});if(!f||!h)return null;q(e,f);q(e,h);if(!m(e.mouse.y,f.size.top,h.size.bottom))return null;for(var g=Number.MAX_VALUE,l,u,p,t;h&&!h.equals(f)&&(u=f.getNext(e.isRelevant));)l=
Math.abs(a(e,f,u)-e.mouse.y),l<g&&(g=l,p=f,t=u),f=u,q(e,f);if(!p||!t||!m(e.mouse.y,p.size.top,t.size.bottom))return null;k.upper=p;k.lower=t;return k.set(R,8)}function d(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||V(b)||w(b)||e(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(a){var d=c(a),e;if(e=d){e=d.upper;var g=d.lower;e=!e||!g||w(g)||w(e)||g.equals(e)||e.equals(g)||g.contains(e)||e.contains(g)?!1:r(a,e)&&r(a,g)&&b(a,e,g)?!0:!1}return e?d:null}}(),N=["top","left","right",
"bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,"use strict",function(){function b(b){return{"aria-label":b,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:b}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var b=("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{"+b+"}")},init:function(b){b.blockless||(b.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),b.ui.addButton&&b.ui.addButton("PageBreak",{label:b.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&b.on("contentDom",function(){b.document.on("click",function(f){f=
f.data.getTarget();f.is("div")&&f.hasClass("cke_pagebreak")&&b.getSelection().selectElement(f)})}))},afterInit:function(h){function f(a){CKEDITOR.tools.extend(a.attributes,b(h.lang.pagebreak.alt),!0);a.children.length=0}var a=h.dataProcessor,g=a&&a.dataFilter,a=a&&a.htmlFilter,m=/page-break-after\s*:\s*always/i,l=/display\s*:\s*none/i;a&&a.addRules({attributes:{"class":function(a,b){var d=a.replace("cke_pagebreak","");if(d!=a){var e=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];
b.children.length=0;b.add(e);e=b.attributes;delete e["aria-label"];delete e.contenteditable;delete e.title}return d}}},{applyToAll:!0,priority:5});g&&g.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])f(a);else if(m.test(a.attributes.style)){var b=a.children[0];b&&"span"==b.name&&l.test(b.attributes.style)&&f(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(b){b.insertElement(CKEDITOR.plugins.pagebreak.createElement(b))},context:"div",allowedContent:{div:{styles:"!page-break-after"},
span:{match:function(b){return(b=b.parent)&&"div"==b.name&&b.styles&&b.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(h){return h.document.createElement("div",{attributes:b(h.lang.pagebreak.alt)})}}}(),function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(b){var h=0,f=CKEDITOR.plugins.getPath("pastetools"),a=this.path,g=void 0===b.config.pasteFromWord_inlineImages?!0:b.config.pasteFromWord_inlineImages,
f=[CKEDITOR.getUrl(f+"filter/common.js"),CKEDITOR.getUrl(f+"filter/image.js"),CKEDITOR.getUrl(a+"filter/default.js")];b.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,b){h=1;a.execCommand("paste",{type:"html",notification:b&&"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(b,"PasteFromWord",{label:b.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});b.pasteTools.register({filters:b.config.pasteFromWordCleanupFile?
[b.config.pasteFromWordCleanupFile]:f,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var b=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),g=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,b=b?"microsoft"===b:g.test(a);return a&&(h||b)},handle:function(a,f){var k=a.data,c=CKEDITOR.plugins.pastetools.getClipboardData(k,"text/html"),d=CKEDITOR.plugins.pastetools.getClipboardData(k,"text/rtf"),c={dataValue:c,dataTransfer:{"text/rtf":d}};
if(!1!==b.fire("pasteFromWord",c)||h){k.dontFilter=!0;if(h||!b.config.pasteFromWordPromptCleanup||confirm(b.lang.pastefromword.confirmCleanup))c.dataValue=CKEDITOR.cleanWord(c.dataValue,b),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&g&&CKEDITOR.pasteFilters.image&&(c.dataValue=CKEDITOR.pasteFilters.image(c.dataValue,b,d)),b.fire("afterPasteFromWord",c),k.dataValue=c.dataValue,!0===b.config.forcePasteAsPlainText?k.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==
b.config.forcePasteAsPlainText||(k.type="html");h=0;f()}}})}})}(),function(){var b={canUndo:!1,async:!0,exec:function(b,f){var a=b.lang,g=CKEDITOR.tools.keystrokeToString(a.common.keyboard,b.getCommandKeystroke(CKEDITOR.env.ie?b.commands.paste:this)),m=f&&"undefined"!==typeof f.notification?f.notification:!f||!f.from||"keystrokeHandler"===f.from&&CKEDITOR.env.ie,a=m&&"string"===typeof m?m:a.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+g.aria+'"\x3e'+g.display+"\x3c/kbd\x3e");
b.execCommand("paste",{type:"text",notification:m?a:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var f=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",b);h.setKeystroke(f,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",function(a){"html"!=a.data.type&&
(a.data.type="text")});h.on("pasteState",function(a){h.getCommand("pastetext").setState(a.data)})}})}(),function(){CKEDITOR.plugins.add("xml",{});CKEDITOR.xml=function(b){var h=null;if("object"==typeof b)h=b;else if(b=(b||"").replace(/&nbsp;/g," "),"ActiveXObject"in window){try{h=new ActiveXObject("MSXML2.DOMDocument")}catch(f){try{h=new ActiveXObject("Microsoft.XmlDom")}catch(a){}}h&&(h.async=!1,h.resolveExternals=!1,h.validateOnParse=!1,h.loadXML(b))}else window.DOMParser&&(h=(new DOMParser).parseFromString(b,
"text/xml"));this.baseXml=h};CKEDITOR.xml.prototype={selectSingleNode:function(b,h){var f=this.baseXml;if(h||(h=f)){if("selectSingleNode"in h)return h.selectSingleNode(b);if(f.evaluate)return(f=f.evaluate(b,h,null,9,null))&&f.singleNodeValue||null}return null},selectNodes:function(b,h){var f=this.baseXml,a=[];if(h||(h=f)){if("selectNodes"in h)return h.selectNodes(b);if(f.evaluate&&(f=f.evaluate(b,h,null,5,null)))for(var g;g=f.iterateNext();)a.push(g)}return a},getInnerXml:function(b,h){var f=this.selectSingleNode(b,
h),a=[];if(f)for(f=f.firstChild;f;)f.xml?a.push(f.xml):window.XMLSerializer&&a.push((new XMLSerializer).serializeToString(f)),f=f.nextSibling;return a.length?a.join(""):null}}}(),function(){CKEDITOR.plugins.add("ajax",{requires:"xml"});CKEDITOR.ajax=function(){function b(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(b){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}return null}function h(a,
b){if(4!=a.readyState||!(200<=a.status&&300>a.status||304==a.status||0===a.status||1223==a.status))return null;switch(b){case "text":return a.responseText;case "xml":var f=a.responseXML;return new CKEDITOR.xml(f&&f.firstChild?f:a.responseText);case "arraybuffer":return a.response;default:return null}}function f(a,f,l){var k=!!f,c=b();if(!c)return null;k&&"text"!==l&&"xml"!==l&&(c.responseType=l);c.open("GET",a,k);k&&(c.onreadystatechange=function(){4==c.readyState&&(f(h(c,l)),c=null)});c.send(null);
return k?"":h(c,l)}function a(a,f,l,k,c){var d=b();if(!d)return null;d.open("POST",a,!0);d.onreadystatechange=function(){4==d.readyState&&(k&&k(h(d,c)),d=null)};d.setRequestHeader("Content-type",l||"application/x-www-form-urlencoded; charset\x3dUTF-8");d.send(f)}return{load:function(a,b,h){return f(a,b,h||"text")},post:function(b,f,h,k){return a(b,f,h,k,"text")},loadXml:function(a,b){return f(a,b,"xml")},loadText:function(a,b){return f(a,b,"text")},loadBinary:function(a,b){return f(a,b,"arraybuffer")}}}()}(),
function(){function b(a,b){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(b)}).sort(function(a,b){return a.priority===b.priority?0:a.priority-b.priority})}function h(a,b){var c=a.shift();c&&c.handle(b,function(){h(a,b)})}function f(a){var b=CKEDITOR.tools.array.reduce(a,function(a,b){return CKEDITOR.tools.array.isArray(b.filters)?a.concat(b.filters):a},[]);return CKEDITOR.tools.array.filter(b,function(a,d){return CKEDITOR.tools.array.indexOf(b,a)===d})}function a(a,b){var c=0,
d,e;if(!CKEDITOR.tools.array.isArray(a)||0===a.length)return!0;d=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(g,a)});if(0<d.length)for(e=0;e<d.length;e++)(function(a){CKEDITOR.scriptLoader.queue(a,function(e){e&&g.push(a);++c===d.length&&b()})})(d[e]);return 0===d.length}var g=[],m=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(g){g.on("paste",
function(k){var c=b(this.handlers,k),d;if(0!==c.length){d=f(c);d=a(d,function(){return g.fire("paste",k.data)});if(!d)return k.cancel();h(c,k)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:["clipboard","ajax"],beforeInit:function(a){a.pasteTools=new m;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:a,createFilter:function(a){var b=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],c=a.additionalTransforms;return function(a,e){var g=new CKEDITOR.htmlParser.basicWriter,
f=new CKEDITOR.htmlParser.filter,h;c&&(a=c(a,e));CKEDITOR.tools.array.forEach(b,function(b){f.addRules(b(a,e,f))});h=CKEDITOR.htmlParser.fragment.fromHtml(a);f.applyTo(h);h.writeHtml(g);return g.getHtml()}},getClipboardData:function(a,b){var c;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===b?(c=a.dataTransfer.getData(b,!0))||"text/html"!==b?c:a.dataValue:null},getConfigValue:function(a,b){if(a&&a.config){var c=CKEDITOR.tools,d=a.config,e=c.object.keys(d),g=["pasteTools_"+
b,"pasteFromWord_"+b,"pasteFromWord"+c.capitalize(b,!0)],g=c.array.find(g,function(a){return-1!==c.array.indexOf(e,a)});return d[g]}},getContentGeneratorName:function(a){if((a=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(a))&&a.length)return a=a[1].toLowerCase(),0===a.indexOf("microsoft")?"microsoft":0===a.indexOf("libreoffice")?"libreoffice":"unknown"}};CKEDITOR.pasteFilters=CKEDITOR.plugins.pastetools.filters}(),CKEDITOR.plugins.add("removeformat",{init:function(b){b.addCommand("removeFormat",
CKEDITOR.plugins.removeformat.commands.removeformat);b.ui.addButton&&b.ui.addButton("RemoveFormat",{label:b.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(b){for(var h=b._.removeFormatRegex||(b._.removeFormatRegex=new RegExp("^(?:"+b.config.removeFormatTags.replace(/,/g,"|")+")$","i")),f=b._.removeAttributes||(b._.removeAttributes=b.config.removeFormatAttributes.split(",")),a=CKEDITOR.plugins.removeformat.filter,
g=b.getSelection().getRanges(),m=g.createIterator(),l=function(a){return a.type==CKEDITOR.NODE_ELEMENT},k;k=m.getNextRange();){k.enlarge(CKEDITOR.ENLARGE_INLINE);var c=k.createBookmark(),d=c.startNode,e=c.endNode,n=function(c){for(var d=b.elementPath(c),e=d.elements,g=1,f;(f=e[g])&&!f.equals(d.block)&&!f.equals(d.blockLimit);g++)h.test(f.getName())&&a(b,f)&&c.breakParent(f)};n(d);if(e)for(n(e),d=d.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);d&&!d.equals(e);)if(d.isReadOnly()){if(d.getPosition(e)&
CKEDITOR.POSITION_CONTAINS)break;d=d.getNext(l)}else n=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==d.getName()&&d.data("cke-realelement")||!a(b,d)||(h.test(d.getName())?d.remove(1):(d.removeAttributes(f),b.fire("removeFormatCleanup",d))),d=n;k.moveToBookmark(c)}b.forceNextSelectionCheck();b.getSelection().selectRanges(g)}}},filter:function(b,h){for(var f=b._.removeFormatFilters||[],a=0;a<f.length;a++)if(!1===f[a](h))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(b){this._.removeFormatFilters||
(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(b)},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",CKEDITOR.plugins.add("resize",{init:function(b){function h(g){var f=c.width,h=c.height,l=f+(g.data.$.screenX-k.x)*("rtl"==m?-1:1);g=h+(g.data.$.screenY-k.y);d&&(f=Math.max(a.resize_minWidth,Math.min(l,a.resize_maxWidth)));
e&&(h=Math.max(a.resize_minHeight,Math.min(g,a.resize_maxHeight)));b.resize(d?f:null,h)}function f(){CKEDITOR.document.removeListener("mousemove",h);CKEDITOR.document.removeListener("mouseup",f);b.document&&(b.document.removeListener("mousemove",h),b.document.removeListener("mouseup",f))}var a=b.config,g=b.ui.spaceId("resizer"),m=b.element?b.element.getDirection(1):"ltr";!a.resize_dir&&(a.resize_dir="vertical");void 0===a.resize_maxWidth&&(a.resize_maxWidth=3E3);void 0===a.resize_maxHeight&&(a.resize_maxHeight=
3E3);void 0===a.resize_minWidth&&(a.resize_minWidth=750);void 0===a.resize_minHeight&&(a.resize_minHeight=250);if(!1!==a.resize_enabled){var l=null,k,c,d=("both"==a.resize_dir||"horizontal"==a.resize_dir)&&a.resize_minWidth!=a.resize_maxWidth,e=("both"==a.resize_dir||"vertical"==a.resize_dir)&&a.resize_minHeight!=a.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(d){l||(l=b.getResizable());c={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0};k={x:d.screenX,y:d.screenY};a.resize_minWidth>
c.width&&(a.resize_minWidth=c.width);a.resize_minHeight>c.height&&(a.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",f);b.document&&(b.document.on("mousemove",h),b.document.on("mouseup",f));d.preventDefault&&d.preventDefault()});b.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});b.on("uiSpace",function(a){if("bottom"==a.data.space){var c="";d&&!e&&(c=" cke_resizer_horizontal");!d&&e&&(c=" cke_resizer_vertical");var f='\x3cspan id\x3d"'+g+'" class\x3d"cke_resizer'+
c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?a.data.html+=f:a.data.html=f+a.data.html}},b,null,100);b.on("maximize",function(a){b.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){function b(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var f=b.getSelection(),
h;if(h=(new CKEDITOR.dom.elementPath(f.getCommonAncestor(),f.root)).contains({td:1,th:1},1)){var f=b.createRange(),c=CKEDITOR.tools.tryThese(function(){var b=h.getParent().$.cells[h.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=h.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(c||a)if(c)c=new CKEDITOR.dom.element(c),f.moveToElementEditStart(c),f.checkStartOfBlock()&&f.checkEndOfBlock()||f.selectNodeContents(c);
else return!0;else{for(var d=h.getAscendant("table").$,c=h.getParent().$.cells,d=new CKEDITOR.dom.element(d.insertRow(-1),b.document),e=0,n=c.length;e<n;e++)d.append((new CKEDITOR.dom.element(c[e],b.document)).clone(!1,!1)).appendBogus();f.moveToElementEditStart(d)}f.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},f={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},a={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(g){for(var m=
!1!==g.config.enableTabKeyTools,l=g.config.tabSpaces||0,k="";l--;)k+=" ";if(k)g.on("key",function(a){9==a.data.keyCode&&(g.insertText(k),a.cancel())});if(m)g.on("key",function(a){(9==a.data.keyCode&&g.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&g.execCommand("selectPreviousCell"))&&a.cancel()});g.addCommand("blur",CKEDITOR.tools.extend(f,h));g.addCommand("blurBack",CKEDITOR.tools.extend(a,h));g.addCommand("selectNextCell",b());g.addCommand("selectPreviousCell",b(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=
function(b,h){var f=void 0===h?this.getTabIndex():h,a,g,m,l,k,c;if(0>=f)for(k=this.getNextSourceNode(b,CKEDITOR.NODE_ELEMENT);k;){if(k.isVisible()&&0===k.getTabIndex()){m=k;break}k=k.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(k=this.getDocument().getBody().getFirst();k=k.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!g&&k.equals(this)){if(g=!0,b){if(!(k=k.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else g&&!this.contains(k)&&(a=1);if(k.isVisible()&&!(0>(c=k.getTabIndex()))){if(a&&
c==f){m=k;break}c>f&&(!m||!l||c<l)?(m=k,l=c):m||0!==c||(m=k,l=c)}}m&&m.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(b,h){for(var f=void 0===h?this.getTabIndex():h,a,g,m,l=0,k,c=this.getDocument().getBody().getLast();c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!g&&c.equals(this)){if(g=!0,b){if(!(c=c.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else g&&!this.contains(c)&&(a=1);if(c.isVisible()&&!(0>(k=c.getTabIndex())))if(0>=f){if(a&&0===k){m=c;break}k>
l&&(m=c,l=k)}else{if(a&&k==f){m=c;break}k<f&&(!m||k>l)&&(m=c,l=k)}}m&&m.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(b){function h(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!b.blockless){var f=b.lang.table;b.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+
(b.plugins.dialogadvtab?"table"+b.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var b;if(a.styles.border)b=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var f=a.styles;f["border-left"]&&f["border-left"]===f["border-right"]&&f["border-right"]===f["border-top"]&&
f["border-top"]===f["border-bottom"]&&(b=CKEDITOR.tools.style.parse.border(f["border-top"]))}b&&b.style&&"solid"===b.style&&b.width&&0!==parseFloat(b.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));b.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));b.addCommand("tableDelete",h({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var f=b.getParent(),h=a.editable();1!=f.getChildCount()||f.is("td",
"th")||f.equals(h)||(b=f);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));b.ui.addButton&&b.ui.addButton("Table",{label:f.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");b.addMenuItems&&b.addMenuItems({table:{label:f.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:f.deleteTable,command:"tableDelete",group:"table",
order:1}});b.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});b.contextMenu&&b.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function b(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!b.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(f,
a,"selected_cell",!0),e.push(a))}var e=[],f={};if(!a)return e;for(var g=a.getRanges(),h=0;h<g.length;h++){var k=g[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&e.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(f,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(f);
return e}function h(a,c){for(var d=r(a)?a:b(a),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),g=d[0].getParent(),h=g.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[k]),h=c?h:k,g=c?g:d,d=CKEDITOR.tools.buildTableMap(f),f=d[h],h=c?d[h-1]:d[h+1],d=d[0].length,e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&h&&f[k]==h[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),
e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(g):e.insertAfter(g);return e}function f(a){if(a instanceof CKEDITOR.dom.selection){var c=a.getRanges(),d=b(a),e=d[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(e),h=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[];a.reset();for(a=h;a<=k;a++){for(var l=g[a],m=new CKEDITOR.dom.element(e.$.rows[a]),n=0;n<l.length;n++){var r=new CKEDITOR.dom.element(l[n]),w=r.getParent().$.rowIndex;1==r.$.rowSpan?r.remove():
(--r.$.rowSpan,w==a&&(w=g[a+1],w[n-1]?r.insertAfter(new CKEDITOR.dom.element(w[n-1])):(new CKEDITOR.dom.element(e.$.rows[a+1])).append(r,1)));n+=r.$.colSpan-1}d.push(m)}g=e.$.rows;c[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||e.$.parentNode);for(a=d.length;0<=a;a--)f(d[a]);return e.$.parentNode?h:(c[0].select(),null)}a instanceof CKEDITOR.dom.element&&(e=a.getAscendant("table"),1==e.$.rows.length?e.remove():a.remove());return null}function a(a){for(var b=
a.getParent().$.cells,c=0,d=0;d<b.length;d++){var e=b[d],c=c+e.colSpan;if(e==a.$)break}return c-1}function g(b,c){for(var d=c?Infinity:0,e=0;e<b.length;e++){var f=a(b[e]);if(c?f<d:f>d)d=f}return d}function m(a,c){for(var d=r(a)?a:b(a),e=d[0].getAscendant("table"),f=g(d,1),d=g(d),h=c?f:d,k=CKEDITOR.tools.buildTableMap(e),e=[],f=[],d=[],l=k.length,m=0;m<l;m++){var n=c?k[m][h-1]:k[m][h+1];e.push(k[m][h]);f.push(n)}for(m=0;m<l;m++)e[m]&&(1<e[m].colSpan&&f[m]==e[m]?(k=e[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(e[m]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[c?"insertBefore":"insertAfter"].call(k,h),d.push(k),k=k.$),m+=k.rowSpan-1);return d}function l(a){function c(a){var b=a.getRanges(),d,e;if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;d=b.endContainer;e=d.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=d.getPrevious())||(e=d.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;
b.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=c(a));var d=a.getRanges(),e=b(a),f=e[0],g=e[e.length-1],e=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(e),k,l,m=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var r=0,w=h[n].length;r<w;r++)void 0===k&&h[n][r]==f.$&&(k=r),h[n][r]==g.$&&(l=r);for(n=k;n<=l;n++)for(r=0;r<h.length;r++)g=h[r],f=new CKEDITOR.dom.element(e.$.rows[r]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,
r+=g.$.rowSpan-1,f.$.cells.length||m.push(f));k=h[0].length-1>l?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==a&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),d[0].select(),e.remove());return k}function k(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function c(a){if(a instanceof CKEDITOR.dom.selection){var e=
a.getRanges(),f=b(a),g=f[0]&&f[0].getAscendant("table"),h;a:{var k=0;h=f.length-1;for(var l={},m,n;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=f[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a=
f.length-1;0<=a;a--)c(f[a]);h?d(h,!0):g&&(e[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),e[0].select(),g.remove())}else a instanceof CKEDITOR.dom.element&&(e=a.getParent(),1==e.getChildCount()?e.remove():a.remove())}function d(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function e(a,b,c){a=a[b];
if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function n(a,c,d){var f=b(a),g;if((c?1!=f.length:2>f.length)||(g=a.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;a=f[0];g=a.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(g),k=h.length,l=h[0].length,m=a.getParent().$.rowIndex,n=e(h,m,a),r;if(c){var w;try{var x=parseInt(a.getAttribute("rowspan"),10)||1;r=parseInt(a.getAttribute("colspan"),
10)||1;w=h["up"==c?m-x:"down"==c?m+x:m]["left"==c?n-r:"right"==c?n+r:n]}catch(L){return!1}if(!w||a.$==w)return!1;f["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(w))}c=a.getDocument();var D=m,x=w=0,O=!d&&new CKEDITOR.dom.documentFragment(c),I=0;for(c=0;c<f.length;c++){r=f[c];var M=r.getParent(),R=r.getFirst(),K=r.$.colSpan,H=r.$.rowSpan,M=M.$.rowIndex,P=e(h,M,r),I=I+K*H,x=Math.max(x,P-n+K);w=Math.max(w,M-m+H);d||(K=r,(H=K.getBogus())&&H.remove(),K.trim(),r.getChildren().count()&&(M==
D||!R||R.isBlockBoundary&&R.isBlockBoundary({br:1})||(D=O.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!D||D.is&&D.is("br")||O.append("br")),r.moveChildren(O)),c?r.remove():r.setHtml(""));D=M}if(d)return w*x==I;O.moveChildren(a);a.appendBogus();x>=l?a.removeAttribute("rowSpan"):a.$.rowSpan=w;w>=k?a.removeAttribute("colSpan"):a.$.colSpan=x;d=new CKEDITOR.dom.nodeList(g.$.rows);f=d.count();for(c=f-1;0<=c;c--)g=d.getItem(c),g.$.cells.length||(g.remove(),f++);return a}function w(a,c){var d=b(a);if(1<
d.length)return!1;if(c)return!0;var d=d[0],f=d.getParent(),g=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=f.$.rowIndex,l=e(h,k,d),m=d.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),f=k+n,g=new CKEDITOR.dom.element(g.$.rows[f]),h=e(h,f),r,f=d.clone(),k=0;k<h.length;k++)if(r=h[k],r.parentNode==g.$&&k>l){f.insertBefore(new CKEDITOR.dom.element(r));break}else r=null;r||g.append(f)}else for(m=n=1,g=f.clone(),g.insertAfter(f),g.append(f=d.clone()),r=e(h,k),l=0;l<r.length;l++)r[l].rowSpan++;
f.appendBogus();d.$.rowSpan=n;f.$.rowSpan=m;1==n&&d.removeAttribute("rowSpan");1==m&&f.removeAttribute("rowSpan");return f}function x(a,c){var d=b(a);if(1<d.length)return!1;if(c)return!0;var d=d[0],f=d.getParent(),g=f.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=e(g,f.$.rowIndex,d),k=d.$.colSpan;if(1<k)f=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=f=1,l=[],m=0;m<g.length;m++){var n=g[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(g=0;g<l.length;g++)l[g].colSpan++}g=d.clone();
g.insertAfter(d);g.appendBogus();d.$.colSpan=f;g.$.colSpan=k;1==f&&d.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var r=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function e(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function g(b,c){var d=a.addCommand(b,c);a.addFeature(d)}var p=a.lang.table,
r=CKEDITOR.tools.style.parse,q="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(" ");g("cellProperties",new CKEDITOR.dialogCommand("cellProperties",e({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:q,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&r.background(a.styles.background).color},
right:function(a){a.styles["background-color"]=r.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&(b.attributes["cke-row-height"]=a.styles.height)});
delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");g("rowDelete",e({requiredContent:"table",exec:function(a){a=a.getSelection();(a=f(a))&&d(a)}}));g("rowInsertBefore",e({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);h(a,!0)}}));
g("rowInsertAfter",e({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);h(a)}}));g("columnDelete",e({requiredContent:"table",exec:function(a){a=a.getSelection();(a=l(a))&&d(a,!0)}}));g("columnInsertBefore",e({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);m(a,!0)}}));g("columnInsertAfter",e({requiredContent:"table",exec:function(a){a=a.getSelection();a=b(a);m(a)}}));g("cellDelete",e({requiredContent:"table",exec:function(a){a=a.getSelection();c(a)}}));g("cellMerge",
e({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());d(b.cell,!0)}}));g("cellMergeRight",e({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");d(b.cell,!0)}}));g("cellMergeDown",e({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");d(b.cell,!0)}}));g("cellVerticalSplit",e({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",
exec:function(a){d(x(a.getSelection()))}}));g("cellHorizontalSplit",e({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){d(w(a.getSelection()))}}));g("cellInsertBefore",e({requiredContent:"table",exec:function(a){a=a.getSelection();k(a,!0)}}));g("cellInsertAfter",e({requiredContent:"table",exec:function(a){a=a.getSelection();k(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",order:1,getItems:function(){var c=a.getSelection(),d=b(c),c=
{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(c,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(c,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(c,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:x(c,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:w(c,!0)?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED};a.filter.check(q)&&(c.tablecell_properties=0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return c}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,group:"tablecell",command:"cellMerge",
order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,group:"tablecellproperties",command:"cellProperties",
order:21},tablerow:{label:p.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:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},
tablecolumn:{label:p.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:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,group:"tablecolumn",
command:"columnDelete",order:15}});a.contextMenu&&a.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:a,insertRow:h,insertColumn:m,getSelectedCells:b};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(b,h,f,a,g){b=b.$.rows;f=f||0;a="number"===typeof a?a:b.length-1;g="number"===typeof g?
g:-1;var m=-1,l=[];for(h=h||0;h<=a;h++){m++;!l[m]&&(l[m]=[]);for(var k=-1,c=f;c<=(-1===g?b[h].cells.length-1:g);c++){var d=b[h].cells[c];if(!d)break;for(k++;l[m][k];)k++;for(var e=isNaN(d.colSpan)?1:d.colSpan,d=isNaN(d.rowSpan)?1:d.rowSpan,n=0;n<d&&!(h+n>a);n++){l[m+n]||(l[m+n]=[]);for(var w=0;w<e;w++)l[m+n][k+w]=b[h].cells[c]}k+=e-1;if(-1!==g&&k>=g)break}}return l},"use strict",function(){function b(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+
89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],f={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function d(a){f.enabled&&!1!==a.data.command.canUndo&&f.save()}function e(){f.enabled=b.readOnly?!1:"wysiwyg"==b.mode;f.onChange()}var f=b.undoManager=new a(b),g=f.editingHandler=new l(f),k=b.addCommand("undo",{exec:function(){f.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=b.addCommand("redo",{exec:function(){f.redo()&&(b.selectionChange(),this.fire("afterRedo"))},
startDisabled:!0,canUndo:!1});b.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);f.onChange=function(){k.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",d);b.on("afterCommandExec",d);b.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});b.on("contentDom",g.attachListeners,g);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload",
function(){"wysiwyg"==b.mode&&f.save(!0)});b.on("mode",e);b.on("readOnly",e);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));b.resetUndo=function(){f.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){f.currentImage&&f.update()});b.on("lockSnapshot",function(a){a=a.data;f.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.on("unlockSnapshot",f.unlock,f)}});CKEDITOR.plugins.undo=
{};var a=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};a.prototype={type:function(b,d){var e=a.getKeyGroup(b),f=this.strokesRecorded[e]+1;d=d||f>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());
d?(f=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[e]=f;this.previousKeyGroup=e},keyGroupChanged:function(b){return a.getKeyGroup(b)!=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(a,b,e){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;b||(b=new g(f));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==e&&f.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(b)-1;this.currentImage=
b;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,e;a.bookmarks&&(b.focus(),e=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?e.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(e=this.editor.document.getBody().$.createTextRange(),e.collapse(!0),e.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,
e=this.currentImage,f;if(e)if(a)for(f=this.index-1;0<=f;f--){if(a=b[f],!e.equalsContent(a))return a.index=f,a}else for(f=this.index+1;f<b.length;f++)if(a=b[f],!e.equalsContent(a))return a.index=f,a;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 a=this.getNextImage(!0);if(a)return this.restoreImage(a),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=
this.getNextImage(!1);if(a)return this.restoreImage(a),!0}return!1},update:function(a){if(!this.locked){a||(a=new g(this.editor));for(var b=this.index,e=this.snapshots;0<b&&this.currentImage.equalsContent(e[b-1]);)--b;e.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var b=this.snapshots,e=b[b.length-1];return e.equalsContent(a)&&!e.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;
else if(a)this.locked={level:1};else{var e=null;if(b)e=!0;else{var f=new g(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(f)&&(e=f)}this.locked={update:e,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=new g(this.editor,!0);a.equalsContent(b)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};a.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};a.keyGroups=
{PRINTABLE:0,FUNCTIONAL:1};a.isNavigationKey=function(b){return!!a.navigationKeyCodes[b]};a.getKeyGroup=function(b){var d=a.keyGroups;return f[b]?d.FUNCTIONAL:d.PRINTABLE};a.getOppositeKeyGroup=function(b){var d=a.keyGroups;return b==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};a.ieFunctionalKeysBug=function(b){return CKEDITOR.env.ie&&a.getKeyGroup(b)==a.keyGroups.FUNCTIONAL};var g=CKEDITOR.plugins.undo.Image=function(a,d){this.editor=a;a.fire("beforeUndoImage");var e=a.getSnapshot();e&&(this.contents=
b(e,a.undoManager._filterRules));d||(this.bookmarks=(e=e&&a.getSelection())&&e.createBookmarks2(!0));a.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;g.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(m,""),a=a.replace(m,""));return b!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var e=0;e<b.length;e++){var f=b[e],
g=a[e];if(f.startOffset!=g.startOffset||f.endOffset!=g.endOffset||!CKEDITOR.tools.arrayCompare(f.start,g.start)||!CKEDITOR.tools.arrayCompare(f.end,g.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new k;this.lastKeydownImage=null};l.prototype={onKeydown:function(b){var d=b.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(h,b.data.getKeystroke()))b.data.preventDefault();else if(this.keyEventsStack.cleanUp(b),
b=this.undoManager,this.keyEventsStack.getLast(d)||this.keyEventsStack.push(d),this.lastKeydownImage=new g(b.editor),a.isNavigationKey(d)||this.undoManager.keyGroupChanged(d))if(b.strokesRecorded[0]||b.strokesRecorded[1])b.save(!1,this.lastKeydownImage,!1),b.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&
(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var d=this.undoManager;b=b.data.getKey();var e=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(a.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new g(d.editor,!0))))if(0<e)d.type(b);else if(a.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new g(b.editor));
b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var b=this.undoManager.editor,d=b.editable(),e=this;d.attachListener(d,"keydown",function(b){e.onKeydown(b);if(a.ieFunctionalKeysBug(b.data.getKey()))e.onInput()},null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",e.onInput,e,null,999);d.attachListener(d,"keyup",e.onKeyup,e,null,999);d.attachListener(d,"paste",e.ignoreInputEventListener,
e,null,999);d.attachListener(d,"drop",e.ignoreInputEventListener,e,null,999);b.on("afterPaste",e.activateInputEventListener,e,null,999);d.attachListener(d.isInline()?d:b.document.getDocumentElement(),"click",function(){e.onNavigationKey()},null,null,999);d.attachListener(this.undoManager.editor,"blur",function(){e.keyEventsStack.remove(9)},null,null,999)}};var k=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};k.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-
1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=
this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),function(){function b(a){function b(a){var c=!1;e.attachListener(e,"keydown",function(){var b=k.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);e.attachListener(e,"keyup",function(){var b=k.getElementsByTag(a);c&&(1==b.count()&&!b.getItem(0).getCustomData("retain")&&
CKEDITOR.tools.isEmpty(b.getItem(0).getAttributes())&&b.getItem(0).remove(1),c=!1)})}var f=this.editor;if(f&&!f.isDetached()){var k=a.document,c=k.body,d=k.getElementById("cke_actscrpt");d&&d.parentNode.removeChild(d);(d=k.getElementById("cke_shimscrpt"))&&d.parentNode.removeChild(d);(d=k.getElementById("cke_basetagscrpt"))&&d.parentNode.removeChild(d);c.contentEditable=!0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;k=new CKEDITOR.dom.document(k);
this.setup();this.fixInitialSelection();var e=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&k.getDocumentElement().addClass(k.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&f.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&f.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)k.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){f.editable().focus()})});h(f);try{f.document.$.execCommand("2D-position",
!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==f.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){f.getSelection().scrollIntoView()},0);else if(f.window.$.innerHeight>this.$.offsetHeight){var c=f.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(k,"blur",function(){try{k.$.selection.empty()}catch(a){}});
CKEDITOR.env.iOS&&this.attachListener(k,"touchend",function(){a.focus()});c=f.document.getElementsByTag("title").getItem(0);c.data("cke-title",c.getText());CKEDITOR.env.ie&&(f.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");f.fire("contentDom");this._.isPendingFocus&&(f.focus(),this._.isPendingFocus=!1);setTimeout(function(){f.fire("dataReady")},0)},0,this)}}function h(a){function b(){var c;a.editable().attachListener(a,"selectionChange",
function(){var b=a.getSelection().getSelectedElement();b&&(c&&(c.detachEvent("onresizestart",f),c=null),b.$.attachEvent("onresizestart",f),c=b.$)})}function f(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var h=a.document.$;h.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);h.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(c){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function f(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
var b=[],f;for(f in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+f+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var a;CKEDITOR.plugins.add("wysiwygarea",{init:function(b){b.config.fullPage&&b.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});b.addMode("wysiwyg",function(f){function h(d){d&&d.removeListener();b.isDestroyed()||b.isDetached()||(b.editable(new a(b,c.$.contentWindow.document.body)),b.setData(b.getData(1),f))}var k="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(k)+"}())":"",c=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+
k+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');c.setStyles({width:"100%",height:"100%"});c.addClass("cke_wysiwyg_frame").addClass("cke_reset");k=b.ui.space("contents");k.append(c);var d=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(d)c.on("load",h);var e=b.title,n=b.fire("ariaEditorHelpLabel",{}).label;e&&(CKEDITOR.env.ie&&n&&(e+=", "+n),c.setAttribute("title",e));if(n){var e=CKEDITOR.tools.getNextId(),w=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+
n+"\x3c/span\x3e");k.append(w,1);c.setAttribute("aria-describedby",e)}b.on("beforeModeUnload",function(a){a.removeListener();w&&w.remove()});c.setAttributes({tabIndex:b.tabIndex,allowTransparency:"true"});!d&&h();b.fire("ariaWidget",c)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,f=b.contentsCss;CKEDITOR.tools.isArray(f)||(b.contentsCss=f?[f]:[]);b.contentsCss.push(a)};a=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=
CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(b,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,b){var h=this.editor;if(b)this.setHtml(a),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var k=h.config,c=k.fullPage,d=k.docType,e=CKEDITOR.tools.buildStyleHtml(f()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');c||(e+=CKEDITOR.tools.buildStyleHtml(h.config.contentsCss));
var n=k.baseHref?'\x3cbase href\x3d"'+k.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";c&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){h.docType=d=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){h.xmlDeclaration=a;return""}));a=h.dataProcessor.toHtml(a);c?(/<body[\s|>]/.test(a)||(a="\x3cbody\x3e"+a),/<html[\s|>]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),
n&&(a=a.replace(/<head[^>]*?>/,"$\x26"+n)),a=a.replace(/<\/head\s*>/,e+"$\x26"),a=d+a):a=k.docType+'\x3chtml dir\x3d"'+k.contentsLangDirection+'" lang\x3d"'+(k.contentsLanguage||h.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+e+"\x3c/head\x3e\x3cbody"+(k.bodyId?' id\x3d"'+k.bodyId+'"':"")+(k.bodyClass?' class\x3d"'+k.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&
(a=a.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));k='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(k+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(k+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,k);this.clearCustomData();this.clearListeners();h.fire("contentDomUnload");var w=this.getDocument();try{w.write(a)}catch(x){setTimeout(function(){w.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,f=b.fullPage,h=f&&a.docType,c=f&&a.xmlDeclaration,
d=this.getDocument(),f=f?d.getDocumentElement().getOuterHtml():d.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(f=f.replace(/<br>(?=\s*(:?$|<\/body>))/,""));f=a.dataProcessor.toDataFormat(f);c&&(f=c+"\n"+f);h&&(f=h+"\n"+f);return f},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:a.baseProto.focus.call(this)},detach:function(){var b=this.editor,f=b.document,b=b.container.findOne("iframe.cke_wysiwyg_frame");a.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);
f.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);b&&(b.clearCustomData(),(f=b.removeCustomData("onResize"))&&f.removeListener(),b.isDetached()||b.remove())}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,basicstyles,blockquote,notification,button,toolbar,clipboard,codemirror,panelbutton,panel,floatpanel,colorbutton,menu,contextmenu,dialogadvtab,enterkey,listblock,richcombo,font,format,horizontalrule,htmlwriter,lineutils,widgetselection,widget,image2,imagespacingbox,indent,indentlist,indentblock,justify,fakeobjects,link,list,liststyle,magicline,pagebreak,pastefromword,pastetext,xml,ajax,pastetools,removeformat,resize,tab,table,tabletools,undo,wysiwygarea",
CKEDITOR.config.skin="moono-lexicon",function(){var b=function(b,f){var a=CKEDITOR.getUrl("plugins/"+f);b=b.split(",");for(var g=0;g<b.length;g++)CKEDITOR.skin.icons[b[g]]={path:a,offset:-b[++g],bgsize:b[++g]}};CKEDITOR.env.hidpi?b("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,,codesnippet,384,,bgcolor,408,,textcolor,432,,copyformatting,456,,creatediv,480,,docprops-rtl,504,,docprops,528,,easyimagealigncenter,552,,easyimagealignleft,576,,easyimagealignright,600,,easyimagealt,624,,easyimagefull,648,,easyimageside,672,,easyimageupload,696,,embed,720,,embedsemantic,744,,emojipanel,768,,find-rtl,792,,find,816,,replace,840,,flash,864,,button,888,,checkbox,912,,form,936,,hiddenfield,960,,imagebutton,984,,radio,1008,,select-rtl,1032,,select,1056,,textarea-rtl,1080,,textarea,1104,,textfield-rtl,1128,,textfield,1152,,horizontalrule,1176,,iframe,1200,,image,1224,,indent-rtl,1248,,indent,1272,,outdent-rtl,1296,,outdent,1320,,justifyblock,1344,,justifycenter,1368,,justifyleft,1392,,justifyright,1416,,language,1440,,anchor-rtl,1464,,anchor,1488,,link,1512,,unlink,1536,,bulletedlist-rtl,1560,,bulletedlist,1584,,numberedlist-rtl,1608,,numberedlist,1632,,mathjax,1656,,maximize,1680,,newpage-rtl,1704,,newpage,1728,,pagebreak-rtl,1752,,pagebreak,1776,,pastefromword-rtl,1800,,pastefromword,1824,,pastetext-rtl,1848,,pastetext,1872,,placeholder,1896,,preview-rtl,1920,,preview,1944,,print,1968,,removeformat,1992,,save,2016,,scayt,2040,,selectall,2064,,showblocks-rtl,2088,,showblocks,2112,,smiley,2136,,source-rtl,2160,,source,2184,,sourcedialog-rtl,2208,,sourcedialog,2232,,specialchar,2256,,table,2280,,templates-rtl,2304,,templates,2328,,uicolor,2352,,redo-rtl,2376,,redo,2400,,undo-rtl,2424,,undo,2448,,simplebox,4944,auto,spellchecker,2496,",
"icons_hidpi.png"):b("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,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,copyformatting,456,auto,creatediv,480,auto,docprops-rtl,504,auto,docprops,528,auto,easyimagealigncenter,552,auto,easyimagealignleft,576,auto,easyimagealignright,600,auto,easyimagealt,624,auto,easyimagefull,648,auto,easyimageside,672,auto,easyimageupload,696,auto,embed,720,auto,embedsemantic,744,auto,emojipanel,768,auto,find-rtl,792,auto,find,816,auto,replace,840,auto,flash,864,auto,button,888,auto,checkbox,912,auto,form,936,auto,hiddenfield,960,auto,imagebutton,984,auto,radio,1008,auto,select-rtl,1032,auto,select,1056,auto,textarea-rtl,1080,auto,textarea,1104,auto,textfield-rtl,1128,auto,textfield,1152,auto,horizontalrule,1176,auto,iframe,1200,auto,image,1224,auto,indent-rtl,1248,auto,indent,1272,auto,outdent-rtl,1296,auto,outdent,1320,auto,justifyblock,1344,auto,justifycenter,1368,auto,justifyleft,1392,auto,justifyright,1416,auto,language,1440,auto,anchor-rtl,1464,auto,anchor,1488,auto,link,1512,auto,unlink,1536,auto,bulletedlist-rtl,1560,auto,bulletedlist,1584,auto,numberedlist-rtl,1608,auto,numberedlist,1632,auto,mathjax,1656,auto,maximize,1680,auto,newpage-rtl,1704,auto,newpage,1728,auto,pagebreak-rtl,1752,auto,pagebreak,1776,auto,pastefromword-rtl,1800,auto,pastefromword,1824,auto,pastetext-rtl,1848,auto,pastetext,1872,auto,placeholder,1896,auto,preview-rtl,1920,auto,preview,1944,auto,print,1968,auto,removeformat,1992,auto,save,2016,auto,scayt,2040,auto,selectall,2064,auto,showblocks-rtl,2088,auto,showblocks,2112,auto,smiley,2136,auto,source-rtl,2160,auto,source,2184,auto,sourcedialog-rtl,2208,auto,sourcedialog,2232,auto,specialchar,2256,auto,table,2280,auto,templates-rtl,2304,auto,templates,2328,auto,uicolor,2352,auto,redo-rtl,2376,auto,redo,2400,auto,undo-rtl,2424,auto,undo,2448,auto,simplebox,2472,auto,spellchecker,2496,auto",
"icons.png")}())})();