/*
Copyright (c) 2003-2022, 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 e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"M0OF",version:"4.17.1 DEV",revision:"f793f2bc2c",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var d=window.CKEDITOR_BASEPATH||"";if(!d)for(var a=document.getElementsByTagName("script"),f=0;f<a.length;f++){var m=a[f].src.match(e);if(m){d=m[1];break}}-1==d.indexOf(":/")&&"//"!=
d.slice(0,2)&&(d=0===d.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+d:location.href.match(/^[^\?]*\/(?:)/)[0]+d);if(!d)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d}(),getUrl:function(d){function a(e,m){d.match(new RegExp("[\x26?]"+e+"\\b"))||(d+=(0<=d.indexOf("?")?"\x26":"?")+e+"\x3d"+m)}-1===d.indexOf(":/")&&0!==d.indexOf("/")&&(d=this.basePath+d);"/"!==d.charAt(d.length-
1)&&(this.timestamp&&a("t",this.timestamp),Object.keys(h.ADDITIONAL_RESOURCE_PARAMS).forEach(function(e){var m=h.ADDITIONAL_RESOURCE_PARAMS[e];/\.css$/.test(d)&&"languageId"===e||a(e,m)}));return d},domReady:function(){function d(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",d,!1),window.removeEventListener("load",d,!1),a()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",d),window.detachEvent("onload",d),a())}catch(m){}}
function a(){for(var d;d=e.shift();)d()}var e=[];return function(a){function b(){try{document.documentElement.doScroll("left")}catch(g){setTimeout(b,1);return}d()}e.push(a);"complete"===document.readyState&&setTimeout(d,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",d,!1),window.addEventListener("load",d,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",d);window.attachEvent("onload",d);a=!1;try{a=!window.frameElement}catch(c){}document.documentElement.doScroll&&
a&&b()}}}()},f=window.CKEDITOR_GETURL;if(f){var a=h.getUrl;h.getUrl=function(d){return f.call(h,d)||a.call(h,d)}}return h}()),function(){var e={};CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(e){var f=CKEDITOR.event.prototype,a;for(a in f)null==e[a]&&(e[a]=f[a])},CKEDITOR.event.prototype=function(){function h(d){var e=f(this);return e[d]||(e[d]=new a(d))}var f=function(d){d=d.getPrivate&&d.getPrivate()||d._||(d._={});return d.events||(d.events={})},a=function(d){this.name=
d;this.listeners=[]};a.prototype={getListenerIndex:function(d){for(var a=0,e=this.listeners;a<e.length;a++)if(e[a].fn==d)return a;return-1}};return{define:function(d,a){var e=h.call(this,d);CKEDITOR.tools.extend(e,a,!0)},on:function(d,a,f,m,b){function c(n,b,c,w){n={name:d,sender:this,editor:n,data:b,listenerData:m,stop:c,cancel:w,removeListener:g};return!1===a.call(f,n)?e:n.data}function g(){n&&n.removeListener(d,a)}var n=this,w=h.call(this,d);if(0>w.getListenerIndex(a)){w=w.listeners;f||(f=this);
isNaN(b)&&(b=10);c.fn=a;c.priority=b;for(var x=w.length-1;0<=x;x--)if(w[x].priority<=b)return w.splice(x+1,0,c),{removeListener:g};w.unshift(c)}return{removeListener:g}},once:function(){var a=Array.prototype.slice.call(arguments),e=a[1];a[1]=function(a){a.removeListener();return e.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,k=function(){a=1},l=0,
m=function(){l=1};return function(b,c,g){var n=f(this)[b];b=a;var w=l;a=l=0;if(n){var x=n.listeners;if(x.length)for(var x=x.slice(0),h,r=0;r<x.length;r++){if(n.errorProof)try{h=x[r].call(this,g,c,k,m)}catch(u){}else h=x[r].call(this,g,c,k,m);h===e?l=1:"undefined"!=typeof h&&(c=h);if(a||l)break}}c=l?!1:"undefined"==typeof c?!0:c;a=b;l=w;return c}}(),fireOnce:function(a,e,l){e=this.fire(a,e,l);delete f(this)[a];return e},removeListener:function(a,e){var l=f(this)[a];if(l){var m=l.getListenerIndex(e);
0<=m&&l.listeners.splice(m,1)}},removeAllListeners:function(){var a=f(this),e;for(e in a)delete a[e]},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(e,h){e in{instanceReady:1,loaded:1}&&(this[e]=!0);return CKEDITOR.event.prototype.fire.call(this,e,h,this)},CKEDITOR.editor.prototype.fireOnce=function(e,h){e in{instanceReady:1,
loaded:1}&&(this[e]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,e,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var e=navigator.userAgent.toLowerCase(),h=e.match(/edge[ \/](\d+.?\d*)/),f=-1<e.indexOf("trident/"),f=!(!h&&!f),f={ie:f,edge:!!h,webkit:!f&&-1<e.indexOf(" applewebkit/"),air:-1<e.indexOf(" adobeair/"),mac:-1<e.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),
mobile:-1<e.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(e),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,e=window.location.hostname;return a!=e&&a!="["+e+"]"},secure:"https:"==location.protocol};f.gecko="Gecko"==navigator.product&&!f.webkit&&!f.ie;f.webkit&&(-1<e.indexOf("chrome")?f.chrome=!0:f.safari=!0);var a=0;f.ie&&(a=h?parseFloat(h[1]):f.quirks||!document.documentMode?parseFloat(e.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=e.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),a=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));f.air&&(a=parseFloat(e.match(/ adobeair\/(\d+)/)[1]));f.webkit&&(a=parseFloat(e.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 e=document.createElement("script");
e.type="text/javascript";e.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(e)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)};(function(){CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():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(e,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:h})},CKEDITOR.error=function(e,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:e,additionalData:h})},CKEDITOR.on("log",function(e){if(window.console&&window.console.log){var h=console[e.data.type]?e.data.type:
"log",f=e.data.errorCode;if(e=e.data.additionalData)console[h]("[CKEDITOR] Error code: "+f+".",e);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 e(n,g,b){this._minInterval=n;this._context=b;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(g,b||{});var a=this;this.input=function(){function g(){a._lastOutput=
(new Date).getTime();a._scheduledTimer=0;a._call()}if(!a._scheduledTimer||!1!==a._reschedule()){var n=(new Date).getTime()-a._lastOutput;n<a._minInterval?a._scheduledTimer=setTimeout(g,a._minInterval-n):g()}}}function h(g,b,a){e.call(this,g,b,a);this._args=[];var c=this;this.input=CKEDITOR.tools.override(this.input,function(g){return function(){c._args=Array.prototype.slice.call(arguments);g.call(this)}})}var f=[],a=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":
"",d=/&/g,k=/>/g,l=/</g,m=/"/g,b=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,c={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},g=function(g,b){return"#"==b[0]?String.fromCharCode(parseInt(b.slice(1),10)):c[b]};CKEDITOR.on("reset",function(){f=[]});CKEDITOR.tools={arrayCompare:function(g,b){if(!g&&!b)return!0;if(!g||!b||g.length!=b.length)return!1;for(var a=0;a<g.length;a++)if(g[a]!=b[a])return!1;return!0},getIndex:function(g,b){for(var a=0;a<g.length;++a)if(b(g[a]))return a;return-1},clone:function(g){var b;
if(g&&g instanceof Array){b=[];for(var a=0;a<g.length;a++)b[a]=CKEDITOR.tools.clone(g[a]);return b}if(null===g||"object"!=typeof g||g instanceof String||g instanceof Number||g instanceof Boolean||g instanceof Date||g instanceof RegExp||g.nodeType||g.window===g)return g;b=new g.constructor;for(a in g)b[a]=CKEDITOR.tools.clone(g[a]);return b},capitalize:function(g,b){return g.charAt(0).toUpperCase()+(b?g.slice(1):g.slice(1).toLowerCase())},extend:function(g){var b=arguments.length,a,c;"boolean"==typeof(a=
arguments[b-1])?b--:"boolean"==typeof(a=arguments[b-2])&&(c=arguments[b-1],b-=2);for(var d=1;d<b;d++){var e=arguments[d]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(e),function(b){if(!0===a||null==g[b])if(!c||b in c)g[b]=e[b]})}return g},prototypedCopy:function(g){var b=function(){};b.prototype=g;return new b},copy:function(g){var b={},a;for(a in g)b[a]=g[a];return b},isArray:function(g){return"[object Array]"==Object.prototype.toString.call(g)},isEmpty:function(g){for(var b in g)if(g.hasOwnProperty(b))return!1;
return!0},cssVendorPrefix:function(g,b,c){if(c)return a+g+":"+b+";"+g+":"+b;c={};c[g]=b;c[a+g]=b;return c},cssStyleToDomStyle:function(){var g=document.createElement("div").style,b="undefined"!=typeof g.cssFloat?"cssFloat":"undefined"!=typeof g.styleFloat?"styleFloat":"float";return function(g){return"float"==g?b:g.replace(/-./g,function(g){return g.substr(1).toUpperCase()})}}(),buildStyleHtml:function(g){g=[].concat(g);for(var b,a=[],c=0;c<g.length;c++)if(b=g[c])/@import|[{}]/.test(b)?a.push("\x3cstyle\x3e"+
b+"\x3c/style\x3e"):a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+b+'"\x3e');return a.join("")},htmlEncode:function(g){return void 0===g||null===g?"":String(g).replace(d,"\x26amp;").replace(k,"\x26gt;").replace(l,"\x26lt;")},htmlDecode:function(n){return n.replace(b,g)},htmlEncodeAttr:function(g){return CKEDITOR.tools.htmlEncode(g).replace(m,"\x26quot;")},htmlDecodeAttr:function(g){return CKEDITOR.tools.htmlDecode(g)},transformPlainTextToHtml:function(g,b){var a=b==CKEDITOR.ENTER_BR,
c=this.htmlEncode(g.replace(/\r\n/g,"\n")),c=c.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),d=b==CKEDITOR.ENTER_P?"p":"div";if(!a){var e=/\n{2}/g;if(e.test(c))var m="\x3c"+d+"\x3e",f="\x3c/"+d+"\x3e",c=m+c.replace(e,function(){return f+m})+f}c=c.replace(/\n/g,"\x3cbr\x3e");a||(c=c.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+d+"\x3e)"),function(g){return CKEDITOR.tools.repeat(g,2)}));c=c.replace(/^ | $/g,"\x26nbsp;");return c=c.replace(/(>|\s) /g,function(g,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g,
"\x26nbsp;")},getNextNumber:function(){var g=0;return function(){return++g}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var g="e",b=0;8>b;b++)g+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return g},override:function(g,b){var a=b(g);a.prototype=g.prototype;return a},setTimeout:function(g,b,a,c,d){d||(d=window);a||(a=d);return d.setTimeout(function(){c?g.apply(a,[].concat(c)):g.apply(a)},b||0)},throttle:function(g,b,a){return new this.buffers.throttle(g,
b,a)},trim:function(){var g=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(g,"")}}(),ltrim:function(){var g=/^[ \t\n\r]+/g;return function(b){return b.replace(g,"")}}(),rtrim:function(){var g=/[ \t\n\r]+$/g;return function(b){return b.replace(g,"")}}(),indexOf:function(g,b){if("function"==typeof b)for(var a=0,c=g.length;a<c;a++){if(b(g[a]))return a}else{if(g.indexOf)return g.indexOf(b);a=0;for(c=g.length;a<c;a++)if(g[a]===b)return a}return-1},search:function(g,b){var a=CKEDITOR.tools.indexOf(g,
b);return 0<=a?g[a]:null},bind:function(g,b){var a=Array.prototype.slice.call(arguments,2);return function(){return g.apply(b,a.concat(Array.prototype.slice.call(arguments)))}},createClass:function(g){var b=g.$,a=g.base,c=g.privates||g._,d=g.proto;g=g.statics;!b&&(b=function(){a&&this.base.apply(this,arguments)});if(c)var e=b,b=function(){var g=this._||(this._={}),b;for(b in c){var a=c[b];g[b]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}e.apply(this,arguments)};a&&(b.prototype=this.prototypedCopy(a.prototype),
b.prototype.constructor=b,b.base=a,b.baseProto=a.prototype,b.prototype.base=function p(){this.base=a.prototype.base;a.apply(this,arguments);this.base=p});d&&this.extend(b.prototype,d,!0);g&&this.extend(b,g,!0);return b},addFunction:function(g,b){return f.push(function(){return g.apply(b||this,arguments)})-1},removeFunction:function(g){f[g]=null},callFunction:function(g){var b=f[g];return b&&b.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var g=/^-?\d+\.?\d*px$/,b;return function(a){b=
CKEDITOR.tools.trim(a+"")+"px";return g.test(b)?b:a||""}}(),convertToPx:function(){var g;return function(b){g||(g=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(g));if(!/%$/.test(b)){var a=0>parseFloat(b);a&&(b=b.replace("-",""));g.setStyle("width",b);b=g.$.clientWidth;return a?-b:b}return b}}(),repeat:function(g,b){return Array(b+1).join(g)},
tryThese:function(){for(var g,b=0,a=arguments.length;b<a;b++){var c=arguments[b];try{g=c();break}catch(d){}}return g},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(g){return function(){var b=arguments,a=this;window.setTimeout(function(){g.apply(a,b)},0)}},normalizeCssText:function(g,b){var a=[],c,d=CKEDITOR.tools.parseCssText(g,!0,b);for(c in d)a.push(c+":"+d[c]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(g){return g.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(g,b,a,c){g=[b,a,c];for(b=0;3>b;b++)g[b]=("0"+parseInt(g[b],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(g){return g.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(g,b,a,c){g=b.toLowerCase();3==g.length&&(g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+c})},_isValidColorFormat:function(g){if(!g)return!1;g=g.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(g)},parseCssText:function(g,b,a){var c={};a&&(g=(new CKEDITOR.dom.element("span")).setAttribute("style",
g).getAttribute("style")||"");g&&(g=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(g)));if(!g||";"==g)return c;g.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(g,a,n){b&&(a=a.toLowerCase(),"font-family"==a&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));c[a]=n});return c},writeCssText:function(g,b){var a,c=[];for(a in g)c.push(a+":"+g[a]);b&&c.sort();return c.join("; ")},objectCompare:function(g,b,a){var c;if(!g&&!b)return!0;if(!g||!b)return!1;
for(c in g)if(g[c]!=b[c])return!1;if(!a)for(c in b)if(g[c]!=b[c])return!1;return!0},objectKeys:function(g){return CKEDITOR.tools.object.keys(g)},convertArrayToObject:function(g,b){var a={};1==arguments.length&&(b=!0);for(var c=0,d=g.length;c<d;++c)a[g[c]]=b;return a},getStyledSpans:function(g,b){var a=CKEDITOR.env.ie&&8==CKEDITOR.env.version?g.toUpperCase():g,a=b.find("span[style*\x3d"+a+"]").toArray();return CKEDITOR.tools.array.filter(a,function(b){return!!b.getStyle(g)})},fixDomain:function(){for(var g;;)try{g=
window.parent.document.domain;break}catch(b){g=g?g.replace(/.+?(?:\.|$)/,""):document.domain;if(!g)break;document.domain=g}return!!g},eventsBuffer:function(g,b,a){return new this.buffers.event(g,b,a)},enableHtml5Elements:function(g,b){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(" "),c=a.length,d;c--;)d=g.createElement(a[c]),b&&g.appendChild(d)},checkIfAnyArrayItemMatches:function(g,
b){for(var a=0,c=g.length;a<c;++a)if(g[a].match(b))return!0;return!1},checkIfAnyObjectPropertyMatches:function(g,b){for(var a in g)if(a.match(b))return!0;return!1},keystrokeToString:function(g,b){var a=this.keystrokeToArray(g,b);a.display=a.display.join("+");a.aria=a.aria.join("+");return a},keystrokeToArray:function(g,b){var a=b&16711680,c=b&65535,d=CKEDITOR.env.mac,e=[],m=[];a&CKEDITOR.CTRL&&(e.push(d?"⌘":g[17]),m.push(d?g[224]:g[17]));a&CKEDITOR.ALT&&(e.push(d?"⌥":g[18]),m.push(g[18]));a&CKEDITOR.SHIFT&&
(e.push(d?"⇧":g[16]),m.push(g[16]));c&&(g[c]?(e.push(g[c]),m.push(g[c])):(e.push(String.fromCharCode(c)),m.push(String.fromCharCode(c))));return{display:e,aria:m}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(g){g=g.toLowerCase();for(var b=document.cookie.split(";"),a,c,d=0;d<b.length;d++)if(a=b[d].split("\x3d"),c=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),c===g)return decodeURIComponent(1<a.length?
a[1]:"");return null},setCookie:function(g,b){document.cookie=encodeURIComponent(g)+"\x3d"+encodeURIComponent(b)+";path\x3d/"},getCsrfToken:function(){var g=CKEDITOR.tools.getCookie("ckCsrfToken");if(!g||40!=g.length){var g=[],b="";if(window.crypto&&window.crypto.getRandomValues)g=new Uint8Array(40),window.crypto.getRandomValues(g);else for(var a=0;40>a;a++)g.push(Math.floor(256*Math.random()));for(a=0;a<g.length;a++)var c="abcdefghijklmnopqrstuvwxyz0123456789".charAt(g[a]%36),b=b+(.5<Math.random()?
c.toUpperCase():c);g=b;CKEDITOR.tools.setCookie("ckCsrfToken",g)}return g},escapeCss:function(g){if(g)if(window.CSS&&CSS.escape)g=CSS.escape(g);else{g=String(g);for(var b=g.length,a=-1,c,d="",e=g.charCodeAt(0);++a<b;)c=g.charCodeAt(a),d=0==c?d+"�":127==c||1<=c&&31>=c||0==a&&48<=c&&57>=c||1==a&&48<=c&&57>=c&&45==e?d+("\\"+c.toString(16)+" "):0==a&&1==b&&45==c?d+("\\"+g.charAt(a)):128<=c||45==c||95==c||48<=c&&57>=c||65<=c&&90>=c||97<=c&&122>=c?d+g.charAt(a):d+("\\"+g.charAt(a));g=d}else g="";return g},
getMouseButton:function(g){return(g=g&&g.data?g.data.$:g)?CKEDITOR.tools.normalizeMouseButton(g.button):!1},normalizeMouseButton:function(g,b){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return g;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],c=0;c<a.length;c++){var d=a[c];if(d[0]===g&&b)return d[1];if(!b&&d[1]===g)return d[0]}},convertHexStringToBytes:function(g){var b=[],a=g.length/2,c;for(c=0;c<a;c++)b.push(parseInt(g.substr(2*
c,2),16));return b},convertBytesToBase64:function(g){var b="",a=g.length,c;for(c=0;c<a;c+=3){var d=g.slice(c,c+3),e=d.length,m=[],f;if(3>e)for(f=e;3>f;f++)d[f]=0;m[0]=(d[0]&252)>>2;m[1]=(d[0]&3)<<4|d[1]>>4;m[2]=(d[1]&15)<<2|(d[2]&192)>>6;m[3]=d[2]&63;for(f=0;4>f;f++)b=f<=e?b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m[f]):b+"\x3d"}return b},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(g){var b={},a=this._findColor(g);a.length&&(b.color=a[0],CKEDITOR.tools.array.forEach(a,function(b){g=g.replace(b,"")}));if(g=CKEDITOR.tools.trim(g))b.unprocessed=g;return b},margin:function(g){return CKEDITOR.tools.style.parse.sideShorthand(g,function(g){return g.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||
["0px"]})},sideShorthand:function(g,b){function a(g){c.top=d[g[0]];c.right=d[g[1]];c.bottom=d[g[2]];c.left=d[g[3]]}var c={},d=b?b(g):g.split(/\s+/);switch(d.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 c},border:function(g){return CKEDITOR.tools.style.border.fromCssRule(g)},_findColor:function(g){var b=[],a=CKEDITOR.tools.array,b=b.concat(g.match(this._rgbaRegExp)||[]),b=b.concat(g.match(this._hslaRegExp)||[]);return b=b.concat(a.filter(g.split(/\s+/),
function(g){return g.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:g.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(g,b,a){var c=[];this.forEach(g,function(d,e){b.call(a,d,e,g)&&c.push(d)});return c},find:function(g,b,a){for(var c=g.length,d=0;d<c;){if(b.call(a,g[d],d,g))return g[d];d++}},forEach:function(g,b,a){var c=g.length,d;for(d=0;d<c;d++)b.call(a,g[d],d,g)},map:function(g,b,a){for(var c=[],d=0;d<g.length;d++)c.push(b.call(a,g[d],d,g));return c},reduce:function(g,
b,a,c){for(var d=0;d<g.length;d++)a=b.call(c,a,g[d],d,g);return a},every:function(g,b,a){if(!g.length)return!0;b=this.filter(g,b,a);return g.length===b.length},some:function(g,b,a){for(var c=0;c<g.length;c++)if(b.call(a,g[c],c,g))return!0;return!1},zip:function(g,b){return CKEDITOR.tools.array.map(g,function(g,a){return[g,b[a]]})},unique:function(g){return this.filter(g,function(b,a){return a===CKEDITOR.tools.array.indexOf(g,b)})}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),
entries:function(g){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(g),function(b){return[b,g[b]]})},values:function(g){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(g),function(b){return g[b]})},keys:function(g){var b=Object.prototype.hasOwnProperty,a=[],c=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!g||"object"!==typeof g)){b=[];if("string"===typeof g)for(a=0;a<g.length;a++)b.push(String(a));return b}for(var d in g)a.push(d);if(CKEDITOR.env.ie&&
9>CKEDITOR.env.version)for(d=0;d<c.length;d++)b.call(g,c[d])&&a.push(c[d]);return a},findKey:function(g,b){if("object"!==typeof g)return null;for(var a in g)if(g[a]===b)return a;return null},merge:function(g,b){var a=CKEDITOR.tools,c=a.clone(g),d=a.clone(b);a.array.forEach(a.object.keys(d),function(g){c[g]="object"===typeof d[g]&&"object"===typeof c[g]?a.object.merge(c[g],d[g]):d[g]});return c}},getAbsoluteRectPosition:function(g,b){function a(g){if(g){var b=g.getClientRect();c.top+=b.top;c.left+=
b.left;"x"in c&&"y"in c&&(c.x+=b.x,c.y+=b.y);a(g.getWindow().getFrame())}}var c=CKEDITOR.tools.copy(b);a(g.getFrame());var d=CKEDITOR.document.getWindow().getScrollPosition();c.top+=d.y;c.left+=d.x;"x"in c&&"y"in c&&(c.y+=d.y,c.x+=d.x);c.right=c.left+c.width;c.bottom=c.top+c.height;return c}};e.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);
this._scheduledTimer=0}};h.prototype=CKEDITOR.tools.prototypedCopy(e.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=e;CKEDITOR.tools.buffers.throttle=h;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(g){g=g||{};this.width=g.width;this.style=g.style;this.color=g.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,
"black"]]},normalize:function(){for(var g in this._.normalizeMap){var b=this[g];b&&(this[g]=CKEDITOR.tools.array.reduce(this._.normalizeMap[g],function(g,b){return g.replace(b[0],b[1])},b))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(g){return!!g}).join(" ")}},statics:{fromCssRule:function(g){var b={},a=g.split(/\s+/g);g=CKEDITOR.tools.style.parse._findColor(g);g.length&&(b.color=g[0]);CKEDITOR.tools.array.forEach(a,function(g){b.style||
-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,g)?!b.width&&CKEDITOR.tools.style.parse._widthRegExp.test(g)&&(b.width=g):b.style=g});return new CKEDITOR.tools.style.border(b)},splitCssValues:function(g,b){b=b||{};var a=CKEDITOR.tools.array.reduce(["width","style","color"],function(a,c){var d=g["border-"+c]||b[c];a[c]=d?CKEDITOR.tools.style.parse.sideShorthand(d):null;return a},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(b,c){var d={},e;for(e in a){var m=
g["border-"+c+"-"+e];d[e]=m?m:a[e]&&a[e][c]}b["border-"+c]=new CKEDITOR.tools.style.border(d);return b},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=1;CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),CKEDITOR.dtd=function(){var e=CKEDITOR.tools.extend,h=function(b,g){for(var a=CKEDITOR.tools.clone(b),d=1;d<arguments.length;d++){g=arguments[d];for(var e in g)delete a[e]}return a},f={},a={},
d={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},k={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={},m={"#":1},b={center:1,dir:1,noframes:1};e(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},m,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});e(a,d,f,b);h={a:h(f,{a:1,button:1}),abbr:f,address:a,area:l,article:a,aside:a,audio:e({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:e({option:1},f),dd:a,del:f,details:e({summary:1},a),dfn:f,div:a,dl:{dt:1,dd:1},dt:a,em:f,embed:l,fieldset:e({legend:1},a),figcaption:a,figure:e({figcaption:1},a),footer:a,form:a,h1:f,h2:f,h3:f,h4:f,h5:f,h6:f,head:e({title:1,base:1},k),header:a,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:e({head:1,body:1},a,k),i:f,iframe:m,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:e({li:1},a),meta:l,meter:h(f,{meter:1}),nav:a,noscript:e({link:1,meta:1,style:1},
f),object:e({param:1},f),ol:{li:1},optgroup:{option:1},option:m,output:f,p:f,param:l,pre:f,progress:h(f,{progress:1}),q:f,rp:f,rt:f,ruby:e({rp:1,rt:1},f),s:f,samp:f,script:m,section:a,select:{optgroup:1,option:1},small:f,source:l,span:f,strong:f,style:m,sub:f,summary:e({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:m,tfoot:{tr:1},th:a,thead:{tr:1},time:h(f,{time:1}),title:m,tr:{th:1,td:1},track:l,u:f,ul:{li:1},"var":f,
video:e({source:1,track:1},a),wbr:l,acronym:f,applet:e({param:1},a),basefont:l,big:f,center:a,dialog:l,dir:{li:1},font:f,isindex:l,noframes:a,strike:f,tt:f};e(h,{$block:e({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,b),$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:e({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(e){this.$=e},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var e=this.getKey();if(this.$.ctrlKey||this.$.metaKey)e+=CKEDITOR.CTRL;
this.$.shiftKey&&(e+=CKEDITOR.SHIFT);this.$.altKey&&(e+=CKEDITOR.ALT);return e},preventDefault:function(e){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;e&&this.stopPropagation()},stopPropagation:function(){var e=this.$;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getTarget:function(){var e=this.$.target||this.$.srcElement;return e?new CKEDITOR.dom.node(e):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var e=this.getTarget().getDocument().$;
return{x:this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),y:this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.HISTORY_NATIVE=1,CKEDITOR.HISTORY_HASH=2,CKEDITOR.HISTORY_OFF=0,CKEDITOR.dom.domObject=function(e){e&&(this.$=e)},CKEDITOR.dom.domObject.prototype=function(){var e=
function(e,f){return function(a){"undefined"!=typeof CKEDITOR&&e.fire(f,new CKEDITOR.dom.event(a))}};return{getPrivate:function(){var e;(e=this.getCustomData("_"))||this.setCustomData("_",e={});return e},on:function(h){var f=this.getCustomData("_cke_nativeListeners");f||(f={},this.setCustomData("_cke_nativeListeners",f));f[h]||(f=f[h]=e(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(e){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(e)){var f=this.getCustomData("_cke_nativeListeners"),a=f&&f[e];a&&(this.$.removeEventListener?this.$.removeEventListener(e,a,!1):this.$.detachEvent&&this.$.detachEvent("on"+e,a),delete f[e])}},removeAllListeners:function(){try{var e=this.getCustomData("_cke_nativeListeners"),f;for(f in e){var a=e[f];this.$.detachEvent?this.$.detachEvent("on"+f,a):this.$.removeEventListener&&this.$.removeEventListener(f,
a,!1);delete e[f]}}catch(d){if(!CKEDITOR.env.edge||-2146828218!==d.number)throw d;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(e){var h={};CKEDITOR.on("reset",function(){h={}});e.equals=function(e){try{return e&&e.$===this.$}catch(a){return!1}};e.setCustomData=function(e,a){var d=this.getUniqueId();(h[d]||(h[d]={}))[e]=a;return this};e.getCustomData=function(e){var a=this.$["data-cke-expando"];return(a=a&&h[a])&&e in a?a[e]:null};e.removeCustomData=function(e){var a=this.$["data-cke-expando"],
a=a&&h[a],d,k;a&&(d=a[e],k=e in a,delete a[e]);return k?d:null};e.clearCustomData=function(){this.removeAllListeners();var e=this.getUniqueId();e&&delete h[e]};e.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(e)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(e){return e?new CKEDITOR.dom[e.nodeType==CKEDITOR.NODE_DOCUMENT?"document":e.nodeType==CKEDITOR.NODE_ELEMENT?"element":e.nodeType==
CKEDITOR.NODE_TEXT?"text":e.nodeType==CKEDITOR.NODE_COMMENT?"comment":e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](e):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=
16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(e,h){e.append(this,h);return e},clone:function(e,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),e){a=a.childNodes;for(var d=0;d<a.length;d++)f(a[d])}}function a(d){if(d.type==CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var f=
d.getName();":"==f[0]&&d.renameNode(f.substring(1))}if(e)for(f=0;f<d.getChildCount();f++)a(d.getChild(f))}}var d=this.$.cloneNode(e);f(d);d=new CKEDITOR.dom.node(d);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&a(d);return d},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){e.$.parentNode.insertBefore(this.$,e.$.nextSibling);return e},insertBefore:function(e){e.$.parentNode.insertBefore(this.$,
e.$);return e},insertBeforeMe:function(e){this.$.parentNode.insertBefore(e.$,this.$);return e},getAddress:function(e){for(var h=[],f=this.getDocument().$.documentElement,a=this;a&&a!=f;){var d=a.getParent();d&&h.unshift(this.getIndex.call(a,e));a=d}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){function h(a,d){var e=d?a.getNext():a.getPrevious();return e&&e.type==CKEDITOR.NODE_TEXT?e.isEmpty()?h(e,d):e:
null}var f=this,a=-1,d;if(!this.getParent()||e&&f.type==CKEDITOR.NODE_TEXT&&f.isEmpty()&&!h(f)&&!h(f,!0))return-1;do if(!e||f.equals(this)||f.type!=CKEDITOR.NODE_TEXT||!d&&!f.isEmpty())a++,d=f.type==CKEDITOR.NODE_TEXT;while(f=f.getPrevious());return a},getNextSourceNode:function(e,h,f){if(f&&!f.call){var a=f;f=function(d){return!d.equals(a)}}e=!e&&this.getFirst&&this.getFirst();var d;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;e=this.getNext()}for(;!e&&(d=(d||this).getParent());){if(f&&
!1===f(d,!0))return null;e=d.getNext()}return!e||f&&!1===f(e)?null:h&&h!=e.type?e.getNextSourceNode(!1,h,f):e},getPreviousSourceNode:function(e,h,f){if(f&&!f.call){var a=f;f=function(d){return!d.equals(a)}}e=!e&&this.getLast&&this.getLast();var d;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;e=this.getPrevious()}for(;!e&&(d=(d||this).getParent());){if(f&&!1===f(d,!0))return null;e=d.getPrevious()}return!e||f&&!1===f(e)?null:h&&e.type!=h?e.getPreviousSourceNode(!1,h,f):
e},getPrevious:function(e){var h=this.$,f;do f=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(f&&e&&!e(f));return f},getNext:function(e){var h=this.$,f;do f=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(f&&e&&!e(f));return f},getParent:function(e){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||e&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(e){var h=this,f=[];do f[e?"push":"unshift"](h);while(h=h.getParent());
return f},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;var h=this.contains?this:this.getParent();do if(h.contains(e))return h;while(h=h.getParent());return null},getPosition:function(e){var h=this.$,f=e.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(f);if(h==f)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.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();e=e.getAddress();for(var f=Math.min(h.length,e.length),a=0;a<f;a++)if(h[a]!=e[a])return h[a]<e[a]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<e.length?CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(e,h){var f=this.$,a,d;h||(f=f.parentNode);"function"==typeof e?(d=!0,a=e):(d=!1,a=function(a){a="string"==typeof a.nodeName?a.nodeName.toLowerCase():"";return"string"==typeof e?a==e:a in e});for(;f;){if(a(d?new CKEDITOR.dom.node(f):f))return new CKEDITOR.dom.node(f);try{f=f.parentNode}catch(k){f=null}}return null},hasAscendant:function(e,h){var f=this.$;h||(f=f.parentNode);for(;f;){if(f.nodeName&&
f.nodeName.toLowerCase()==e)return!0;f=f.parentNode}return!1},move:function(e,h){e.append(this.remove(),h)},remove:function(e){var h=this.$,f=h.parentNode;if(f){if(e)for(;e=h.firstChild;)f.insertBefore(h.removeChild(e),h);f.removeChild(h)}return this},replace:function(e){this.insertBefore(e);e.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var e;this.getFirst&&(e=this.getFirst());){if(e.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(e.getText()),f=e.getLength();if(h)h.length<
f&&(e.split(f-h.length),this.$.removeChild(this.$.firstChild));else{e.remove();continue}}break}},rtrim:function(){for(var e;this.getLast&&(e=this.getLast());){if(e.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(e.getText()),f=e.getLength();if(h)h.length<f&&(e.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{e.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(e=this.$.lastChild)&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)},isReadOnly:function(e){var h=
this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(e=!0);if(!e&&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(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,
CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var e=this.$.document,h="CSS1Compat"==e.compatMode;return{width:(h?e.documentElement.clientWidth:e.body.clientWidth)||0,height:(h?e.documentElement.clientHeight:e.body.clientHeight)||0}},getScrollPosition:function(){var e=this.$;if("pageXOffset"in e)return{x:e.pageXOffset||0,y:e.pageYOffset||0};e=e.document;return{x:e.documentElement.scrollLeft||e.body.scrollLeft||0,y:e.documentElement.scrollTop||
e.body.scrollTop||0}},getFrame:function(){var e=this.$.frameElement;return e?new CKEDITOR.dom.element.get(e):null}}),CKEDITOR.dom.document=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(e){if(this.$.createStyleSheet)this.$.createStyleSheet(e);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",type:"text/css",
href:e});this.getHead().append(h)}},appendStyleText:function(e){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=e}else{var f=new CKEDITOR.dom.element("style",this);f.append(new CKEDITOR.dom.text(e,this));this.getHead().append(f)}return h||f.$.sheet},createElement:function(e,h){var f=new CKEDITOR.dom.element(e,this);h&&(h.attributes&&f.setAttributes(h.attributes),h.styles&&f.setStyles(h.styles));return f},createText:function(e){return new CKEDITOR.dom.text(e,this)},focus:function(){this.getWindow().focus()},
getActive:function(){var e;try{e=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(e)},getById:function(e){return(e=this.$.getElementById(e))?new CKEDITOR.dom.element(e):null},getByAddress:function(e,h){for(var f=this.$.documentElement,a=0;f&&a<e.length;a++){var d=e[a];if(h)for(var k=-1,l=0;l<f.childNodes.length;l++){var m=f.childNodes[l];if(!0!==h||3!=m.nodeType||!m.previousSibling||3!=m.previousSibling.nodeType)if(k++,k==d){f=m;break}}else f=f.childNodes[d]}return f?new CKEDITOR.dom.node(f):
null},getElementsByTag:function(e,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(e=h+":"+e);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e=e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||
this.$.defaultView)},write:function(e){this.$.open("text/html","replace");CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(e);this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");e||
(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,!0),this.setCustomData("html5ShivFrag",e));return e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(e){return new CKEDITOR.dom.node(e)})}},CKEDITOR.dom.element=function(e,h){"string"==typeof e&&
(e=(h?h.$:document).createElement(e));CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,h){var f=new CKEDITOR.dom.element("div",h);f.setHtml(e);return f.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,h,f,a){var d=h.getCustomData("list_marker_id")||
h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),k=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");e[d]=h;k[f]=1;return h.setCustomData(f,a)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var h in e)CKEDITOR.dom.element.clearMarkers(e,e[h],1)},CKEDITOR.dom.element.clearMarkers=function(e,h,f){var a=h.getCustomData("list_marker_names"),d=h.getCustomData("list_marker_id"),k;for(k in a)h.removeCustomData(k);
h.removeCustomData("list_marker_names");f&&(h.removeCustomData("list_marker_id"),delete e[d])},function(){function e(a,b){return-1<(" "+a+" ").replace(k," ").indexOf(" "+b+" ")}function h(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function f(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function a(a){for(var b=0,c=0,g=l[a].length;c<g;c++)b+=parseFloat(this.getComputedStyle(l[a][c])||
0,10)||0;return b}var d=document.createElement("_").classList,d="undefined"!==typeof d&&null!==String(d.add).match(/\[Native code\]/gi),k=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:d?function(a){this.$.classList.add(a);return this}:function(a){var b=this.$.className;b&&(e(b,a)||(b+=" "+a));this.$.className=b||a;return this},removeClass:d?function(a){var b=this.$;b.classList.remove(a);b.className||b.removeAttribute("class");return this}:function(a){var b=
this.getAttribute("class");b&&e(b,a)&&((b=b.replace(new RegExp("(?:^|\\s+)"+a+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",b):this.removeAttribute("class"));return this},hasClass:function(a){return e(this.$.className,a)},append:function(a,b){"string"==typeof a&&(a=this.getDocument().createElement(a));b?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var b=new CKEDITOR.dom.element("div",this.getDocument());
b.setHtml(a);b.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,
b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a);var g=c.extractContents(!1,b||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=g.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&
16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$):b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?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 b=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!b.width&&(b.width=b.right-b.left);!b.height&&(b.height=b.bottom-b.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),b):b},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(g){this.$.innerHTML="";
b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.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(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b=
"className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":return b=this.$.getAttribute(b,2),0!==b&&0===this.$.tabIndex&&(b=null),b;case "checked":return b=this.$.attributes.getNamedItem(b),(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):
null}return this.$.getAttribute(b,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g<c.length;g++)-1===CKEDITOR.tools.indexOf(a,c[g].name)&&(b[c[g].name]=c[g].value);return b},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 b=this.getWindow().$.getComputedStyle(this.$,
null);return b?b.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 b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));
return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},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 b=0;b<arguments.length;b++)if(arguments[b]==a)return!0;return!1},isEditable:function(a){var b=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||
CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[b]||CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var b=this.clone(0,1);a=a.clone(0,1);b.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(b.$.isEqualNode)return b.$.style.cssText=
CKEDITOR.tools.normalizeCssText(b.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),b.$.isEqualNode(a.$);b=b.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,c;a&&CKEDITOR.env.webkit&&
(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),b=0,c=a.count();b<c;b++){var g=a.getItem(b);if(g.type!=CKEDITOR.NODE_ELEMENT||!g.data("cke-bookmark"))if(g.type==CKEDITOR.NODE_ELEMENT&&!g.isEmptyInlineRemoveable()||g.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(g.getText()))return!1}return!0},
hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,b=0;b<a.length;b++){var c=a[b];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(c.specified)return!0}}return!1}:function(){var a=this.$.attributes,b=a.length,c={"data-cke-expando":1,_moz_dirty:1};return 0<b&&(2<b||!c[a[0].nodeName]||2==b&&!c[a[1].nodeName])},hasAttribute:function(){function a(b){var c=this.$.attributes.getNamedItem(b);
if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return c?c.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;
a=a.$;if(c!=a){var g;if(b)for(;g=c.lastChild;)a.insertBefore(c.removeChild(g),a.firstChild);else for(;g=c.firstChild;)a.appendChild(c.removeChild(g))}},mergeSiblings:function(){function a(b,c,g){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=g?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var e=g?b.getLast():b.getFirst();d.length;)d.shift().move(b,!g);c.moveChildren(b,!g);c.remove();
e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||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,c){this.$.setAttribute(a,c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?
this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){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 b=0;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a=a||this.getAttributes(),a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=
a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],g;"border"==a&&(g=["color","style","width"]);for(var b=[],d=0;d<c.length;d++)if(g)for(var e=0;e<g.length;e++)b.push([a,c[d],g[e]].join("-"));else b.push([a,c[d]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,
a[b]);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,b=this.getElementsByTag("*"),c=0,g=b.count();c<g;c++)a=b.getItem(c),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 b=0,c=0,g=this.getDocument(),d=g.getBody(),e="BackCompat"==g.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var f=this.$.getBoundingClientRect(),k=g.$.documentElement,l=k.clientTop||d.$.clientTop||0,u=k.clientLeft||d.$.clientLeft||0,h=!0;CKEDITOR.env.ie&&(h=g.getDocumentElement().contains(this),
g=g.getBody().contains(this),h=e&&g||!e&&h);h&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=d.$.scrollLeft||k.scrollLeft,c=d.$.scrollTop||k.scrollTop):(c=e?d.$:k,b=c.scrollLeft,c=c.scrollTop),b=f.left+b-u,c=f.top+c-l)}else for(l=this,u=null;l&&"body"!=l.getName()&&"html"!=l.getName();){b+=l.$.offsetLeft-l.$.scrollLeft;c+=l.$.offsetTop-l.$.scrollTop;l.equals(this)||(b+=l.$.clientLeft||0,c+=l.$.clientTop||0);for(;u&&!u.equals(l);)b-=u.$.scrollLeft,c-=u.$.scrollTop,u=u.getParent();
u=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),b+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||e||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<
b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var c=b.getWindow();try{var g=c.$.frameElement;g&&(b=new CKEDITOR.dom.element(g))}catch(d){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,c){var g,d,e,f;function k(g,b){/body|html/.test(a.getName())?a.getWindow().$.scrollBy(g,b):(a.$.scrollLeft+=g,a.$.scrollTop+=b)}function l(g,a){var b={x:0,y:0};if(!g.is(h?"body":"html")){var c=g.$.getBoundingClientRect();b.x=c.left;b.y=c.top}c=g.getWindow();c.equals(a)||(c=l(CKEDITOR.dom.element.get(c.$.frameElement),
a),b.x+=c.x,b.y+=c.y);return b}function u(g,a){return parseInt(g.getComputedStyle("margin-"+a)||0,10)||0}!a&&(a=this.getWindow());e=a.getDocument();var h="BackCompat"==e.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=h?e.getBody():e.getDocumentElement());CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=a.getWindow();d=l(this,e);var p=l(a,e),y=this.$.offsetHeight;g=this.$.offsetWidth;var v=a.$.clientHeight,q=a.$.clientWidth;e=d.x-u(this,"left")-p.x||0;f=d.y-u(this,"top")-
p.y||0;g=d.x+g+u(this,"right")-(p.x+q)||0;d=d.y+y+u(this,"bottom")-(p.y+v)||0;(0>f||0<d)&&k(0,!0===b?f:!1===b?d:0>f?f:d);c&&(0>e||0<g)&&k(0>e?e:g,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");
c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var g=0;g<c.length;g++){var d=
c[g],e=d.nodeName.toLowerCase(),f;if(!(e in b))if("checked"==e&&(f=this.getAttribute(e)))a.setAttribute(e,f);else if(!CKEDITOR.env.ie||this.hasAttribute(e))f=this.getAttribute(e),null===f&&(f=d.nodeValue),a.setAttribute(e,f)}""!==this.$.style.cssText&&(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);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(b,c){var g=b.childNodes;if(0<=c&&c<g.length)return g[c]}return function(b){var c=this.$;if(b.slice)for(b=b.slice();0<b.length&&c;)c=a(c,b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",
function(b){b.data.getTarget().getAscendant(a,!0)||b.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,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,c,g,d;a=
a||void 0===a;for(c in b)if(g=b[c],g.element.equals(this)&&g.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(d=g.editable())&&(d.equals(this)||d.contains(this)))return g;return null},find:function(a){var b=h(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f(this,a)));b();return a},findOne:function(a){var b=h(this);a=this.$.querySelector(f(this,a));b();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var g=a(this);if(!1!==g){c=this.getChildren();
for(var d=0;d<c.count();d++)g=c.getItem(d),g.type==CKEDITOR.NODE_ELEMENT?g.forEach(a,b):b&&g.type!=b||a(g)}},fireEventHandler:function(a,b){var c="on"+a,g=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var d=g.ownerDocument.createEventObject(),e;for(e in b)d[e]=b[e];g.fireEvent(c,d)}else g[g[a]?a:c](b)},isDetached:function(){var a=this.getDocument(),b=a.getDocumentElement();return b.equals(this)||b.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(d,b,c){"number"==typeof b&&(!c||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=a.call(this,d)),this.setStyle(d,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(d,b){var c=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(d)],this.$["client"+CKEDITOR.tools.capitalize(d)])||
0;b&&(c-=a.call(this,d));return c}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document;this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){e=e.$;e.parentNode.insertBefore(this.$,e.nextSibling)},getHtml:function(){var e=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(e);return e.getHtml().replace(/\s*data-cke-expando=".*?"/g,
"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1}),CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1}),function(){function e(a,g){var b=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(b.collapsed)return this.end(),
null;b.optimize()}var c,d=b.startContainer;c=b.endContainer;var e=b.startOffset,f=b.endOffset,n,k=this.guard,q=this.type,l=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var h=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),m=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(f):c.getNext();this._.guardLTR=function(a,g){return(!g||!h.equals(a))&&(!m||!a.equals(m))&&(a.type!=CKEDITOR.NODE_ELEMENT||!g||!a.equals(b.root))}}if(a&&!this._.guardRTL){var E=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),
F=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,g){return(!g||!E.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!g||!a.equals(b.root))}}var H=a?this._.guardRTL:this._.guardLTR;n=k?function(a,g){return!1===H(a,g)?!1:k(a,g)}:H;this.current?c=this.current[l](!1,q,n):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<f?c.getChild(f-1):!1===n(c,!0)?null:c.getPreviousSourceNode(!0,q,n)):(c=d,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(e))||(c=!1===
n(d,!0)?null:d.getNextSourceNode(!0,q,n)))),c&&!1===n(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!g)return c}else if(g&&this.evaluator)return!1;c=c[l](!1,q,n)}this.end();return this.current=null}function h(a){for(var g,b=null;g=e.call(this,a);)b=g;return b}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return e.call(this)},previous:function(){return e.call(this,
1)},checkForward:function(){return!1!==e.call(this,0,1)},checkBackward:function(){return!1!==e.call(this,1,1)},lastForward:function(){return 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(g){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in a||!f[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||g&&this.is(g)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(g){return!(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,g){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}
return function(c){var d,e;d=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(e=c.getParent())&&b(e);d=a?d:d||b(c);return!!(g^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(g){var b;g&&g.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(g.getText())||CKEDITOR.env.webkit&&g.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^b)}};CKEDITOR.dom.walker.invisible=function(a){var g=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(c){g(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&
(c=c.getParent()),c=c.$.offsetWidth<=b);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,g){return function(b){return!!(g^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function g(a){return!k(a)&&!l(a)}return function(b){var c=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&d.test(b.getText());c&&(c=b.getParent(),b=b.getNext(g),c=c.isBlockBoundary()&&(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^c)}};CKEDITOR.dom.walker.temp=function(a){return function(g){g.type!=
CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=g&&g.hasAttribute("data-cke-temp");return!!(a^g)}};var d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,k=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),m=CKEDITOR.dom.walker.temp(),b=function(a){return l(a)||k(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(a){return function(g){g=k(g)||l(g)||m(g);return!!(a^g)}};var c=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=
function(a){return function(g){for(var b=0,d=g.getChildCount();b<d;++b)if(!c(g.getChild(b)))return!!a;return!a}};var g=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var g={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(g[b]=1);return g}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(a){return function(b){b=c(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||
"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&g(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(b(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&d.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var h=e instanceof CKEDITOR.dom.document;this.document=h?e:e.getDocument();
this.root=h?e.getBody():e},function(){function e(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function h(a,b,c,d,e){function f(a,g,b,c){var d=b?a.getPrevious():a.getNext();if(c&&h)return d;v||c?g.append(a.clone(!0,e),b):(a.remove(),m&&g.append(a,b));return d}function k(){var a,g,b,c=Math.min(I.length,M.length);for(a=0;a<c;a++)if(g=I[a],b=M[a],!g.equals(b))return a;return a-1}function l(){var b=R-1,c=H&&L&&!q.equals(B);b<K-1||
b<G-1||c?(c?a.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START):G==b+1&&F?a.moveToPosition(M[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(M[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=I[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var h=0===b,m=1==b,v=2==b;b=v||
m;var q=a.startContainer,B=a.endContainer,A=a.startOffset,C=a.endOffset,E,F,H,L,D,N;if(v&&B.type==CKEDITOR.NODE_TEXT&&(q.equals(B)||q.type===CKEDITOR.NODE_ELEMENT&&q.getFirst().equals(B)))c.append(a.document.createText(B.substring(A,C)));else{B.type==CKEDITOR.NODE_TEXT?v?N=!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;q.type==CKEDITOR.NODE_TEXT?v?D=!0:q.split(A):0<q.getChildCount()?0===A?(q=q.getChild(A),E=!0):q=q.getChild(A-1):H=E=!0;for(var I=
q.getParents(),M=B.getParents(),R=k(),K=I.length-1,G=M.length-1,O=c,Y,S,X,ca=-1,J=R;J<=K;J++){S=I[J];X=S.getNext();for(J!=K||S.equals(M[J])&&K<G?b&&(Y=O.append(S.clone(0,e))):E?f(S,O,!1,H):D&&O.append(a.document.createText(S.substring(A)));X;){if(X.equals(M[J])){ca=J;break}X=f(X,O)}O=Y}O=c;for(J=R;J<=G;J++)if(c=M[J],X=c.getPrevious(),c.equals(I[J]))b&&(O=O.getChild(0));else{J!=G||c.equals(I[J])&&G<K?b&&(Y=O.append(c.clone(0,e))):F?f(c,O,!1,L):N&&O.append(a.document.createText(c.substring(0,C)));if(J>
ca)for(;X;)X=f(X,O,!0);O=Y}v||l()}}function f(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(k)?!1:!0}}function a(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&l(d)||d.type==CKEDITOR.NODE_ELEMENT&&
d.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var d;return this[a?"getPreviousNode":"getNextNode"](function(a){!d&&c(a)&&(d=a);return b(a)&&!(l(a)&&a.equals(d))})}}var k={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(),m=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,b=CKEDITOR.dom.walker.editable(),c=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 b=new CKEDITOR.dom.documentFragment(this.document);
this.collapsed||h(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,c,a,"undefined"==typeof b?!0:b);return c},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 b(a){return a.getAscendant(function(a){var g;
if(g=a.data&&a.data("cke-temp"))g=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return g},!0)}var c=this.startContainer,d=this.endContainer,e=this.collapsed,f,k,l,h;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");a&&(l="cke_bm_"+CKEDITOR.tools.getNextNumber(),f.setAttribute("id",l+(e?"C":"S")));e||(k=f.clone(),k.setHtml("\x26nbsp;"),a&&k.setAttribute("id",l+"E"),h=this.clone(),b(d)&&(d=b(d),
h.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),h.collapse(),h.insertNode(k));h=this.clone();b(c)&&(d=b(c),h.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START));h.collapse(!0);h.insertNode(f);k?(this.setStartAfter(f),this.setEndBefore(k)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:a?l+(e?"C":"S"):f,endNode:a?l+"E":k,serializable:a,collapsed:e}},createBookmark2:function(){function a(g){var b=g.container,d=g.offset,e;e=b;var f=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===f||f==e.getChildCount()?
0:e.getChild(f-1).type==CKEDITOR.NODE_TEXT&&e.getChild(f).type==CKEDITOR.NODE_TEXT;e&&(b=b.getChild(d-1),d=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(e=b;d--;)if(f=e.getChild(d).getIndex(!0),0<=f){d=f;break a}d=-1}d+=1}if(b.type==CKEDITOR.NODE_TEXT){e=b;for(f=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)f+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;e=f;b.isEmpty()?(f=b.getPrevious(c),e?(d=e,b=f?f.getNext():b.getParent().getFirst()):(b=b.getParent(),
d=f?f.getIndex(!0)+1:0)):d+=e}g.container=b;g.offset=d}function b(a,g){var c=g.getCustomData("cke-fillingChar");if(c){var d=a.container;c.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,e={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root),
d||(a(f),b(f,this.root)));return{start:e.container.getAddress(c),end:d?null:f.container.getAddress(c),startOffset:e.offset,endOffset:f.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):
a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0);
else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;
a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,
b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var f=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!=
CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var f=function(a,b){var g=new CKEDITOR.dom.range(l);g.setStart(a,b);g.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);var g=new CKEDITOR.dom.walker(g),c;for(g.guard=
function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};c=g.next();){if(c.type!=CKEDITOR.NODE_TEXT)return!1;E=c!=a?c.getText():c.substring(b);if(d.test(E))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),l=this.root,h,m,v,q,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&&((q=C.getPrevious())||(v=C.getParent()))):(F&&(q=C.getChild(F-1)||C.getLast()),q||(v=C));
for(v=c(v);v||q;){if(v&&!q){!B&&v.equals(k)&&(B=!0);if(e?v.isBlockBoundary():!l.contains(v))break;A&&"inline"==v.getComputedStyle("display")||(A=!1,B?h=v:this.setStartBefore(v));q=v.getPrevious()}for(;q;)if(C=!1,q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT)E=q.getText(),d.test(E)&&(q=null),C=/[\s\ufeff]$/.test(E);else if((q.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&q.is("br"))&&!q.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[q.getName()]){E=q.getText();
if(d.test(E))q=null;else for(var F=q.$.getElementsByTagName("*"),H=0,L;L=F[H++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){q=null;break}q&&(C=!!E.length)}else q=null;C&&(A?B?h=v:v&&this.setStartBefore(v):A=!0);if(q){C=q.getPrevious();if(!v&&!C){v=q;q=null;break}q=C}else v=null}v&&(v=c(v.getParent()))}C=this.endContainer;F=this.endOffset;v=q=null;B=A=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(F)).length?A=!0:(A=!C.getLength(),F==C.getLength()?(q=C.getNext())||(v=C.getParent()):
f(C,F)&&(v=C.getParent())):(q=C.getChild(F))||(v=C);for(;v||q;){if(v&&!q){!B&&v.equals(k)&&(B=!0);if(e?v.isBlockBoundary():!l.contains(v))break;A&&"inline"==v.getComputedStyle("display")||(A=!1,B?m=v:v&&this.setEndAfter(v));q=v.getNext()}for(;q;){C=!1;if(q.type==CKEDITOR.NODE_TEXT)E=q.getText(),f(q,0)||(q=null),C=/^[\s\ufeff]/.test(E);else if(q.type==CKEDITOR.NODE_ELEMENT){if((0<q.$.offsetWidth||b&&q.is("br"))&&!q.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[q.getName()]){E=q.getText();if(d.test(E))q=
null;else for(F=q.$.getElementsByTagName("*"),H=0;L=F[H++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){q=null;break}q&&(C=!!E.length)}else q=null}else C=1;C&&A&&(B?m=v:this.setEndAfter(v));if(q){C=q.getNext();if(!v&&!C){v=q;q=null;break}q=C}else v=null}v&&(v=c(v.getParent()))}h&&m&&(k=h.contains(m)?m:h,this.setStartBefore(k),this.setEndAfter(k));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:v=new CKEDITOR.dom.range(this.root);l=this.root;v.setStartAt(l,
CKEDITOR.POSITION_AFTER_START);v.setEnd(this.startContainer,this.startOffset);v=new CKEDITOR.dom.walker(v);var D,N,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 b=I(a);b||(D=a);return b},e=function(a){var b=R(a);!b&&a.is&&a.is("br")&&(N=a);return b};v.guard=R;v=v.lastBackward();D=D||l;this.setStartAt(D,
!D.is("br")&&(!v&&this.checkStartOfBlock()||v&&D.contains(v))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){v=this.clone();v=new CKEDITOR.dom.walker(v);var K=CKEDITOR.dom.walker.whitespaces(),G=CKEDITOR.dom.walker.bookmark();v.evaluator=function(a){return!K(a)&&!G(a)};if((v=v.previous())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("br"))break}v=this.clone();v.collapse();v.setEndAt(l,CKEDITOR.POSITION_BEFORE_END);v=new CKEDITOR.dom.walker(v);v.guard=
a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:R;D=M=N=null;v=v.lastForward();D=D||l;this.setEndAt(D,!v&&this.checkEndOfBlock()||v&&D.contains(v)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);N&&this.setEndAfter(N)}},shrink:function(a,b,c){var d="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:!0,e=c&&c.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var f=this.clone(),k=this.startContainer,l=this.endContainer,h=this.startOffset,m=this.endOffset,
v=c=1;k&&k.type==CKEDITOR.NODE_TEXT&&(h?h>=k.getLength()?f.setStartAfter(k):(f.setStartBefore(k),c=0):f.setStartBefore(k));l&&l.type==CKEDITOR.NODE_TEXT&&(m?m>=l.getLength()?f.setEndAfter(l):(f.setEndAfter(l),v=0):f.setEndBefore(l));var f=new CKEDITOR.dom.walker(f),q=CKEDITOR.dom.walker.bookmark(),B=CKEDITOR.dom.walker.bogus();f.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var A;f.guard=function(b,c){if(e&&B(b)||q(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&
b.type==CKEDITOR.NODE_TEXT||c&&b.equals(A)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(A=b);return!0};c&&(k=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);v&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));
return!(!c&&!v)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);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,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||(this._setEndContainer(a),this.endOffset=b);e(this)},setEnd:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a),
this.startOffset=b);e(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,b){switch(b){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)}e(this)},setEndAt:function(a,b){switch(b){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)}e(this)},fixBlock:function(a,
b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var e=d.getBogus();e&&e.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,f=d.block,k=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=
a&&(e||(e=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=f&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(f)&&(d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END),f=null):c?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(f=this.splitElement(e,b||
!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:f,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:k}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||
g.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,f;e&&!e.equals(d.root)&&!e.getFirst(a(e));)f=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=f;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,
this.root)},checkBoundaryOfElement:function(b,c){var d=c==CKEDITOR.START,e=this.clone();e.collapse(d);e[d?"setStartAt":"setEndAt"](b,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=a(d);return e[d?"checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var b=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.ltrim(b.substring(0,c)),m.test(b)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,
this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=f();return a.checkBackward()},checkEndOfBlock:function(a){var b=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&b.type==CKEDITOR.NODE_TEXT&&(b=CKEDITOR.tools.rtrim(b.substring(c)),m.test(b)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
a=new CKEDITOR.dom.walker(b);a.evaluator=f();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,g){for(;b;){if(b.type==
CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(g)||b.equals(g)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
!0;for(var d=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&m.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);d=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),d=1;else if(b&&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 e=a,f=d,k=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(k=e[b?"getLast":"getFirst"](c));f||k||(k=e[b?"getPrevious":"getNext"](c));a=k}return!!d},moveToClosestEditablePosition:function(a,b){var c,d=0,e,f,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,k[b?0:1])):c=this.clone();if(a&&
!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(f=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&f&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,k[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},
moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d: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:d(),getPreviousEditableNode:d(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),c=this.getTouchedEndNode(),d=b.getAscendant("table",!0),c=c.getAscendant("table",!0);return d&&!this.root.contains(d)?
null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&c&&(d.equals(c)||d.contains(c)||c.contains(d))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c),
b.remove());a.remove()},getClientRects:function(){function a(b,c){var g=CKEDITOR.tools.array.map(b,function(a){return a}),d=new CKEDITOR.dom.range(c.root),e,f,k;c.startContainer instanceof CKEDITOR.dom.element&&(f=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(k=(k=c.endOffset===(c.endContainer.getChildCount?c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));f&&d.setStart(c.startContainer.getParent(),
c.startContainer.getIndex());k&&d.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(f||k)c=d;d=c.cloneContents().find("[data-cke-widget-id]").toArray();if(d=CKEDITOR.tools.array.map(d,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return d=CKEDITOR.tools.array.map(d,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;e=this.root.getDocument().$.createRange();e.setStart(b.getParent().$,b.getIndex());
e.setEnd(b.getParent().$,b.getIndex()+1);b=e.getClientRects();b.widgetRect=a.getClientRect();return b},c),CKEDITOR.tools.array.forEach(d,function(a){function b(d){CKEDITOR.tools.array.forEach(g,function(b,e){var f=CKEDITOR.tools.objectCompare(a[d],b);f||(f=CKEDITOR.tools.objectCompare(a.widgetRect,b));f&&(Array.prototype.splice.call(g,e,a.length-d,a.widgetRect),c=!0)});c||(d<g.length-1?b(d+1):g.push(a.widgetRect))}var c;b(0)}),g}function b(a,c,g){var e;c.collapsed?g.startContainer instanceof CKEDITOR.dom.element?
(a=g.checkStartOfBlock(),e=new CKEDITOR.dom.text("​"),a?g.startContainer.append(e,!0):0===g.startOffset?e.insertBefore(g.startContainer.getFirst()):(g=g.startContainer.getChildren().getItem(g.startOffset-1),e.insertAfter(g)),c.setStart(e.$,0),c.setEnd(e.$,0),a=c.getClientRects(),e.remove()):g.startContainer instanceof CKEDITOR.dom.text&&(""===g.startContainer.getText()?(g.startContainer.setText("​"),a=c.getClientRects(),g.startContainer.setText("")):a=[d(g.createBookmark())]):a=[d(g.createBookmark())];
return a}function c(a,b,g){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(g.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function d(a){var b=a.startNode;a=a.endNode;var c;b.setText("​");b.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),c=[b.getClientRect(),a.getClientRect()],a.remove()):c=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(c[0].right,c[1].right),bottom:Math.max(c[0].bottom,
c[1].bottom),left:Math.min(c[0].left,c[1].left),top:Math.min(c[0].top,c[1].top),width:Math.abs(c[0].left-c[1].left),height:Math.max(c[0].bottom,c[1].bottom)-Math.min(c[0].top,c[1].top)}}return void 0!==this.document.getSelection?function(d){var e=this.root.getDocument().$.createRange(),f;e.setStart(this.startContainer.$,this.startOffset);e.setEnd(this.endContainer.$,this.endOffset);f=e.getClientRects();f=a(f,this);f.length||(f=b(f,e,this));return CKEDITOR.tools.array.map(f,function(a){return c(a,
d,this)},this)}:function(a){return[c(d(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],f,k,l,h;if(c&&c.find)for(k=c.find(a),f=0;f<k.count();f++)if(c=k.getItem(f),b||!c.isReadOnly())l=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||d.startNode.equals(c),h=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||
d.endNode.equals(c),l&&h&&e.push(c);return e}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],g=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var d=new CKEDITOR.dom.range(b.root),g=new CKEDITOR.dom.walker(d),e=CKEDITOR.dom.walker.whitespaces();d.setStart(c.endContainer,c.endOffset);d.setEnd(b.startContainer,b.startOffset);for(d=g.next();e(d)||b.endContainer.equals(d);)d=g.next();g=!d}g?c.setEnd(b.endContainer,b.endOffset):
a.push(b);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 e(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||
(this._={}))}function h(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function f(a,b,d,e){a:{null==e&&(e=h(d));for(var k;k=e.shift();)if(k.getDtd().p){e={element:k,remaining:e};break a}e=null}if(!e)return 0;if((k=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!k.check(b))return f(a,b,d,e.remaining);b=new CKEDITOR.dom.range(e.element);b.selectNodeContents(e.element);b=b.createIterator();b.enlargeBr=
a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:e.element,container:d,remaining:e.remaining,iterator:b};return 1}function a(a,b,d){if(!b)return!1;a=a.clone();a.collapse(!d);return a.checkBoundaryOfElement(b,d?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,k=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),m=function(a){return k(a)&&l(a)},b={dd:1,dt:1,li:1};e.prototype={getNextParagraph:function(c){var g,e,l,h,t;
c=c||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(c))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(f(this,c,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(c);this._.nestedEditable=null}if(!this.range.root.getDtd()[c])return null;if(!this._.started){var r=this.range.clone();
e=r.startPath();var u=r.endPath(),z=!r.collapsed&&a(r,e.block),p=!r.collapsed&&a(r,u.block,1);r.shrink(CKEDITOR.SHRINK_ELEMENT,!0);z&&r.setStartAt(e.block,CKEDITOR.POSITION_BEFORE_END);p&&r.setEndAt(u.block,CKEDITOR.POSITION_AFTER_START);e=r.endContainer.hasAscendant("pre",!0)||r.startContainer.hasAscendant("pre",!0);r.enlarge(this.forceBrBreak&&!e||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);r.collapsed||(e=new CKEDITOR.dom.walker(r.clone()),u=CKEDITOR.dom.walker.bookmark(!0,
!0),e.evaluator=u,this._.nextNode=e.next(),e=new CKEDITOR.dom.walker(r.clone()),e.evaluator=u,e=e.previous(),this._.lastNode=e.getNextSourceNode(!0,null,r.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(u=this.range.clone(),u.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),u.checkEndOfBlock()&&(u=new CKEDITOR.dom.elementPath(u.endContainer,u.root),this._.lastNode=(u.block||
u.blockLimit).getNextSourceNode(!0))),this._.lastNode&&r.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=r.document.createText(""),this._.lastNode.insertAfter(e)),r=null);this._.started=1;e=r}u=this._.nextNode;r=this._.lastNode;for(this._.nextNode=null;u;){var z=0,p=u.hasAscendant("pre"),y=u.type!=CKEDITOR.NODE_ELEMENT,v=0;if(y)u.type==CKEDITOR.NODE_TEXT&&d.test(u.getText())&&(y=0);else{var q=u.getName();if(CKEDITOR.dtd.$block[q]&&"false"==u.getAttribute("contenteditable")){g=
u;f(this,c,g);break}else if(u.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if("br"==q)y=1;else if(!e&&!u.getChildCount()&&"hr"!=q){g=u;l=u.equals(r);break}e&&(e.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=u));z=1}else{if(u.getFirst()){e||(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));u=u.getFirst();continue}y=1}}y&&!e&&(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));l=(!z||y)&&u.equals(r);if(e&&!z)for(;!u.getNext(m)&&!l;){q=
u.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){z=1;y=0;l||q.equals(r);e.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}u=q;y=1;l=u.equals(r);v=1}y&&e.setEndAt(u,CKEDITOR.POSITION_AFTER_END);u=this._getNextSourceNode(u,v,r);if((l=!u)||z&&e)break}if(!g){if(!e)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(e.startContainer,e.root);u=g.blockLimit;z={div:1,th:1,td:1};g=g.block;!g&&u&&!this.enforceRealBlocks&&z[u.getName()]&&
e.checkStartOfBlock()&&e.checkEndOfBlock()&&!u.equals(e.root)?g=u:!g||this.enforceRealBlocks&&g.is(b)?(g=this.range.document.createElement(c),e.extractContents().appendTo(g),g.trim(),e.insertNode(g),h=t=!0):"li"!=g.getName()?e.checkStartOfBlock()&&e.checkEndOfBlock()||(g=g.clone(!1),e.extractContents().appendTo(g),g.trim(),t=e.splitBlock(),h=!t.wasStartOfBlock,t=!t.wasEndOfBlock,e.insertNode(g)):l||(this._.nextNode=g.equals(r)?null:this._getNextSourceNode(e.getBoundaryNodes().endNode,1,r))}h&&(h=
g.getPrevious())&&h.type==CKEDITOR.NODE_ELEMENT&&("br"==h.getName()?h.remove():h.getLast()&&"br"==h.getLast().$.nodeName.toLowerCase()&&h.getLast().remove());t&&(h=g.getLast())&&h.type==CKEDITOR.NODE_ELEMENT&&"br"==h.getName()&&(!CKEDITOR.env.needsBrFiller||h.getPrevious(k)||h.getNext(k))&&h.remove();this._.nextNode||(this._.nextNode=l||g.equals(r)||!r?null:this._getNextSourceNode(g,1,r));return g},_getNextSourceNode:function(a,b,d){function e(a){return!(a.equals(d)||a.equals(f))}var f=this.range.root;
for(a=a.getNextSourceNode(b,null,e);!k(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,h){this.uiItems=[];this.exec=function(a){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&e.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,e,a)};this.refresh=function(a,d){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!d.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:d})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var f;this.checkAllowed=function(a){return a||"boolean"!=typeof f?f=e.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(e){if(this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=e;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 e(a,b,c,g,d){var e,f;a=[];for(e in b){f=b[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:H(f);"$"!=e.charAt(0)&&(f.elements=e);c&&(f.featureName=c.toLowerCase());var k=f;k.elements=l(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h=
/\s*,\s*/,q=void 0;for(q in N){k[q]=l(k[q],h)||null;var m=k,n=I[q],u=l(k[I[q]],h),G=k[q],p=[],Q=!0,w=void 0;u?Q=!1:u={};for(w in G)"!"==w.charAt(0)&&(w=w.slice(1),p.push(w),u[w]=!0,Q=!1);for(;w=p.pop();)G[w]=G["!"+w],delete G["!"+w];m[n]=(Q?!1:u)||null}k.match=k.match||null;g.push(f);a.push(f)}b=d.elements;d=d.generic;var K;c=0;for(g=a.length;c<g;++c){e=H(a[c]);f=!0===e.classes||!0===e.styles||!0===e.attributes;k=e;q=n=h=void 0;for(h in N)k[h]=z(k[h]);m=!0;for(q in I){h=I[q];n=k[h];u=[];G=void 0;
for(G in n)-1<G.indexOf("*")?u.push(new RegExp("^"+G.replace(/\*/g,".*")+"$")):u.push(G);n=u;n.length&&(k[h]=n,m=!1)}k.nothingRequired=m;k.noProperties=!(k.attributes||k.classes||k.styles);if(!0===e.elements||null===e.elements)d[f?"unshift":"push"](e);else for(K in k=e.elements,delete e.elements,k)if(b[K])b[K][f?"unshift":"push"](e);else b[K]=[e]}}function h(a,b,c,g){if(!a.match||a.match(b))if(g||m(a,b))if(a.propertiesOnly||(c.valid=!0),c.allAttributes||(c.allAttributes=f(a.attributes,b.attributes,
c.validAttributes)),c.allStyles||(c.allStyles=f(a.styles,b.styles,c.validStyles)),!c.allClasses){a=a.classes;b=b.classes;g=c.validClasses;if(a)if(!0===a)a=!0;else{for(var d=0,e=b.length,k;d<e;++d)k=b[d],g[k]||(g[k]=a(k));a=!1}else a=!1;c.allClasses=a}}function f(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var g in b)c[g]||(c[g]=a(g));return!1}function a(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=d(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=
d(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var g=!1,e=!0===a,f=b.length;f--;)if(e||a(b[f]))b.splice(f,1),g=!0;a=g}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function d(a,b){if(!a)return!1;var c=!1,g=!0===a,d;for(d in b)if(g||a(d))delete b[d],c=!0;return c}function k(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function l(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=L(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));
if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},g=0,d;for(d in a)c[d]=a[d],g++;return g?c:!1}function m(a,c){if(a.nothingRequired)return!0;var g,d,e,f;if(e=a.requiredClasses)for(f=c.classes,g=0;g<e.length;++g)if(d=e[g],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(f,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return!1;return b(c.styles,a.requiredStyles)&&b(c.attributes,a.requiredAttributes)}function b(a,b){if(!b)return!0;
for(var c=0,g;c<b.length;++c)if(g=b[c],"string"==typeof g){if(!(g in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,g))return!1;return!0}function c(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function g(a){var b,c,g,d,e={},f=1;for(a=L(a);b=a.match(M);)(c=b[2])?(g=n(c,"styles"),d=n(c,"attrs"),c=n(c,"classes")):g=d=c=null,e["$"+f++]={elements:b[1],classes:c,styles:g,attributes:d},a=a.slice(b[0].length);return e}function n(a,
b){var c=a.match(R[b]);return c?L(c[1]):null}function w(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function x(b,c,g,d){var e=0,f;d.toHtml&&(c.name=c.name.replace(K,"$1"));if(d.doCallbacks&&b.elementCallbacks){a:{f=b.elementCallbacks;for(var k=0,l=f.length,m;k<l;++k)if(m=f[k](c)){f=m;break a}f=void 0}if(f)return f}if(d.doTransform&&(f=b._.transformations[c.name])){w(c);
for(k=0;k<f.length;++k)q(b,c,f[k]);r(c)}if(d.doFilter){a:{k=c.name;l=b._;b=l.allowedRules.elements[k];f=l.allowedRules.generic;k=l.disallowedRules.elements[k];l=l.disallowedRules.generic;m=d.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},p,B;if(b||f){w(c);if(k)for(p=0,B=k.length;p<B;++p)if(!1===a(k[p],c,n)){b=null;break a}if(l)for(p=0,B=l.length;p<B;++p)a(l[p],
c,n);if(b)for(p=0,B=b.length;p<B;++p)h(b[p],c,n,m);if(f)for(p=0,B=f.length;p<B;++p)h(f[p],c,n,m);b=n}else b=null}if(!b||!b.valid)return g.push(c),1;B=b.validAttributes;var v=b.validStyles;f=b.validClasses;var k=c.attributes,z=c.styles,l=c.classes;m=c.classBackup;var L=c.styleBackup,Q,y,F=[],n=[],H=/^data-cke-/;p=!1;delete k.style;delete k["class"];delete c.classBackup;delete c.styleBackup;if(!b.allAttributes)for(Q in k)B[Q]||(H.test(Q)?Q==(y=Q.replace(/^data-cke-saved-/,""))||B[y]||(delete k[Q],p=
!0):(delete k[Q],p=!0));if(!b.allStyles||b.hadInvalidStyle){for(Q in z)b.allStyles||v[Q]?F.push(Q+":"+z[Q]):p=!0;F.length&&(k.style=F.sort().join("; "))}else L&&(k.style=L);if(!b.allClasses||b.hadInvalidClass){for(Q=0;Q<l.length;++Q)(b.allClasses||f[l[Q]])&&n.push(l[Q]);n.length&&(k["class"]=n.sort().join(" "));m&&n.length<m.split(/\s+/).length&&(p=!0)}else m&&(k["class"]=m);p&&(e=1);if(!d.skipFinalValidation&&!u(c))return g.push(c),1}d.toHtml&&(c.name=c.name.replace(G,"cke:$1"));return e}function t(a){var b=
[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function r(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function u(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 b=t(a);return function(c){return c in a||b&&c.match(b)}}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 v(a,b,c){var g=a.name;if(F.$empty[g]||!a.children.length)"hr"==g&&"br"==b?a.replaceWith(p()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(F.$block[g]||"tr"==g)if("br"==b)a.previous&&!y(a.previous)&&(b=p(),b.insertBefore(a)),a.next&&!y(a.next)&&(b=p(),b.insertAfter(a)),
a.replaceWithChildren();else{var g=a.children,d;b:{d=F[b];for(var e=0,f=g.length,k;e<f;++e)if(k=g[e],k.type==CKEDITOR.NODE_ELEMENT&&!d[k.name]){d=!1;break b}d=!0}if(d)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{d=a.parent;for(var e=d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==d.name,l,h,f=g.length;0<f;)k=g[--f],e&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&F.$inline[k.name])?(l||(l=new CKEDITOR.htmlParser.element(b),l.insertAfter(a),c.push({check:"parent-down",
el:l})),l.add(k,0)):(l=null,h=F[d.name]||F.span,k.insertAfter(a),d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||h[k.name]||c.push({check:"el-up",el:k}));a.remove()}}else g in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function q(a,b,c){var g,d;for(g=0;g<c.length;++g)if(d=c[g],!(d.check&&!a.check(d.check,!1)||d.left&&!d.left(b))){d.right(b,O);break}}function B(a,b){var c=b.getDefinition(),g=c.attributes,d=c.styles,e,f,
k,l;if(a.name!=c.element)return!1;for(e in g)if("class"==e)for(c=g[e].split(/\s+/),k=a.classes.join("|");l=c.pop();){if(-1==k.indexOf(l))return!1}else if(a.attributes[e]!=g[e])return!1;for(f in d)if(a.styles[f]!=d[f])return!1;return!0}function A(a,b){var c,g;"string"==typeof a?c=a:a instanceof CKEDITOR.style?g=a:(c=a[0],g=a[1]);return[{element:c,left:g,right:function(a,c){c.transform(a,b)}}]}function C(a){return function(b){return B(b,a)}}function E(a){return function(b,c){c[a](b)}}var F=CKEDITOR.dtd,
H=CKEDITOR.tools.copy,L=CKEDITOR.tools.trim,D=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,b){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 c=this.editor=a instanceof CKEDITOR.editor?a:null;
if(c&&!b){this.customConfig=!0;var g=c.config.allowedContent;!0===g?this.disabled=!0:(g||(this.customConfig=!1),this.allow(g,"config",1),this.allow(c.config.extraAllowedContent,"extra",1),this.allow(D[c.enterMode]+" "+D[c.shiftEnterMode],"default",1),this.disallow(c.config.disallowedContent))}else this.customConfig=!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(a,b,c){if(!k(this,a,c))return!1;var d,f;if("string"==typeof a)a=g(a);else if(a instanceof
CKEDITOR.style){if(a.toAllowedContentRules)return this.allow(a.toAllowedContentRules(this.editor),b,c);d=a.getDefinition();a={};c=d.attributes;a[d.element]=d={styles:d.styles,requiredStyles:d.styles&&CKEDITOR.tools.object.keys(d.styles)};c&&(c=H(c),d.classes=c["class"]?c["class"].split(/\s+/):null,d.requiredClasses=d.classes,delete c["class"],d.attributes=c,d.requiredAttributes=c&&CKEDITOR.tools.object.keys(c))}else if(CKEDITOR.tools.isArray(a)){for(d=0;d<a.length;++d)f=this.allow(a[d],b,c);return f}e(this,
a,b,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,g){if(this.disabled)return!1;var d=this,e=[],f=this.editor&&this.editor.config.protectedSource,k,l=!1,h={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(k=x(d,a,e,h),k&1)l=!0;else if(k&2)return!1}else if(a.type==
CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var g=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var q,m,n;if(f)for(m=0;m<f.length;++m)if((n=g.match(f[m]))&&n[0].length==g.length){c=!0;break a}g=CKEDITOR.htmlParser.fragment.fromHtml(g);1==g.children.length&&(q=g.children[0]).type==CKEDITOR.NODE_ELEMENT&&x(d,q,c,h);c=!c.length}c||e.push(a)}},null,!0);e.length&&(l=!0);var q;a=[];g=D[g||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var m;c=
e.pop();)c.type==CKEDITOR.NODE_ELEMENT?v(c,g,a):c.remove();for(;q=a.pop();)if(c=q.el,c.parent)switch(m=F[c.parent.name]||F.span,q.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?v(c,g,a):u(c)||v(c,g,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[c.name]||v(c,g,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[c.name]||v(c.parent,g,a)}return l},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(!k(this,a,!0))return!1;"string"==typeof a&&(a=g(a));e(this,a,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,g=[],d;for(b=0;b<a.length&&!d;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(d=c);if(d){for(b=0;b<a.length;++b)g.push(A(a[b],d));this.addTransformations(g)}}},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 b,c;if(!this.disabled&&a){var g=this._.transformations,d;for(d=0;d<a.length;++d){b=
a[d];var e=void 0,f=void 0,k=void 0,l=void 0,q=void 0,h=void 0;c=[];for(f=0;f<b.length;++f)k=b[f],"string"==typeof k?(k=k.split(/\s*:\s*/),l=k[0],q=null,h=k[1]):(l=k.check,q=k.left,h=k.right),e||(e=k,e=e.element?e.element:l?l.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),q instanceof CKEDITOR.style&&(q=C(q)),c.push({check:l==e?null:l,left:q,right:"string"==typeof h?E(h):h});b=e;g[b]||(g[b]=[]);g[b].push(c)}}},check:function(a,b,d){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var e=
a.length;e--;)if(this.check(a[e],b,d))return!0;return!1}var f,k;if("string"==typeof a){k=a+"\x3c"+(!1===b?"0":"1")+(d?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];f=g(a).$1;var l=f.styles,e=f.classes;f.name=f.elements;f.classes=e=e?e.split(/\s*,\s*/):[];f.styles=c(l);f.attributes=c(f.attributes);f.children=[];e.length&&(f.attributes["class"]=e.join(" "));l&&(f.attributes.style=CKEDITOR.tools.writeCssText(f.styles))}else f=a.getDefinition(),l=f.styles,e=f.attributes||{},
l&&!CKEDITOR.tools.isEmpty(l)?(l=H(l),e.style=CKEDITOR.tools.writeCssText(l,!0)):l={},f={name:f.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:l,children:[]};var l=CKEDITOR.tools.clone(f),h=[],m;if(!1!==b&&(m=this._.transformations[f.name])){for(e=0;e<m.length;++e)q(this,f,m[e]);r(f)}x(this,l,h,{doFilter:!0,doTransform:!1!==b,skipRequired:!d,skipFinalValidation:!d});0<h.length?d=!1:((b=f.attributes["class"])&&(f.attributes["class"]=f.attributes["class"].split(" ").sort().join(" ")),
d=CKEDITOR.tools.objectCompare(f.attributes,l.attributes,!0),b&&(f.attributes["class"]=b));"string"==typeof a&&(this._.cachedChecks[k]=d);return d},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,g){var d=a.slice(),e;if(this.check(D[c]))return c;for(g||(d=d.reverse());e=d.pop();)if(this.check(e))return b[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=
b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(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 N={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)$/,G=/^(object|embed|param)$/,O;O=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,b,c){c=c||
b;if(!(c in a.styles)){var g=a.attributes[b];g&&(/^\d+$/.test(g)&&(g+="px"),a.styles[c]=g)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var g=a.styles[b],d=g&&g.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[c]=d[1]:"cke-test"==g&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in
a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var b=CKEDITOR.tools.style.parse.border(a.styles.border);b.color&&(a.styles["border-color"]=b.color);b.style&&(a.styles["border-style"]=b.style);b.width&&(a.styles["border-width"]=b.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 b(g){a.styles["margin-top"]=c[g[0]];a.styles["margin-right"]=c[g[1]];a.styles["margin-bottom"]=c[g[2]];a.styles["margin-left"]=c[g[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(auto|0|(?:\-?[\.\d]+(?:\w+|%)))/g)||
["0px"];switch(c.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:B,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),g=c.styles,d=c.attributes,e,f,k,l;a.name=c.element;for(e in d)if("class"==e)for(c=a.classes.join("|"),k=d[e].split(/\s+/);l=k.pop();)-1==c.indexOf(l)&&a.classes.push(l);else a.attributes[e]=d[e];for(f in g)a.styles[f]=g[f]}}}}(),function(){CKEDITOR.focusManager=
function(e){if(e.focusManager)return e.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:e};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(e){this._.timer&&clearTimeout(this._.timer);e&&(this.currentActive=e);this.hasFocus||this._.locked||((e=CKEDITOR.currentInstance)&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},
blur:function(e){function 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;e||!f?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;h.call(this)},f,this)}},add:function(e,h){var f=e.getCustomData("focusmanager");if(!f||f!=this){f&&f.remove(e);var f="focus",a="blur";h&&(CKEDITOR.env.ie?(f="focusin",
a="focusout"):CKEDITOR.event.useCapture=1);var d={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(e)}};e.on(f,d.focus,this);e.on(a,d.blur,this);h&&(CKEDITOR.event.useCapture=0);e.setCustomData("focusmanager",this);e.setCustomData("focusmanager_handlers",d)}},remove:function(e){e.removeCustomData("focusmanager");var h=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",h.blur);e.removeListener("focus",h.focus)}}}(),CKEDITOR.keystrokeHandler=function(e){if(e.keystrokeHandler)return e.keystrokeHandler;
this.keystrokes={};this.blockedKeystrokes={};this._={editor:e};return this},function(){var e,h=function(a){a=a.data;var d=a.getKeystroke(),f=this.keystrokes[d],l=this._.editor;e=!1===l.fire("key",{keyCode:d,domEvent:a});e||(f&&(e=!1!==l.execCommand(f,{from:"keystrokeHandler"})),e||(e=!!this.blockedKeystrokes[d]));e&&a.preventDefault(!0);return!e},f=function(a){e&&(e=!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(e,h,f){e&&CKEDITOR.lang.languages[e]||(e=this.detect(h,e));var a=this;h=function(){a[e].dir=a.rtl[e]?"rtl":"ltr";f(e,a[e])};this[e]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),h,this)},detect:function(e,h){var f=this.languages;h=h||navigator.userLanguage||navigator.language||e;var a=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=a[1],a=a[2];f[d+"-"+a]?d=d+"-"+a:f[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(a){return a};return d||
e}}}(),CKEDITOR.scriptLoader=function(){var e={},h={};return{load:function(f,a,d,k){var l="string"==typeof f;l&&(f=[f]);d||(d=CKEDITOR);var m=f.length,b=m,c=[],g=[],n=function(b){a&&(l?a.call(d,b):a.call(d,c,g))};if(0===b)n(!0);else{var w=function(a,d){(d?c:g).push(a);0>=--b&&(k&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(d))},x=function(a,b){e[a]=1;var c=h[a];delete h[a];for(var g=0;g<c.length;g++)c[g](a,b)},t=function(b){if(e[b])w(b,!0);else{var c=h[b]||(h[b]=[]);c.push(w);if(!(1<
c.length)){var g=new CKEDITOR.dom.element("script");g.setAttributes({type:"text/javascript",src:b});a&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?g.$.onreadystatechange=function(){if("loaded"==g.$.readyState||"complete"==g.$.readyState)g.$.onreadystatechange=null,x(b,!0)}:(g.$.onload=function(){setTimeout(function(){g.$.onload=null;g.$.onerror=null;x(b,!0)},0)},g.$.onerror=function(){g.$.onload=null;g.$.onerror=null;x(b,!1)}));g.appendTo(CKEDITOR.document.getHead())}}};k&&
CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r<m;r++)t(f[r])}},queue:function(){function e(){var d;(d=a[0])&&this.load(d.scriptUrl,d.callback,CKEDITOR,0)}var a=[];return function(d,k){var l=this;a.push({scriptUrl:d,callback:function(){k&&k.apply(this,arguments);a.shift();e.call(l)}});1==a.length&&e.call(this)}}()}}(),CKEDITOR.resourceManager=function(e,h){this.basePath=e;this.fileName=h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype=
{add:function(e,h){if(this.registered[e])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.');var f=this.registered[e]=h||{};f.name=e;f.path=this.getPath(e);CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",f);return this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var h=this.externals[e];return CKEDITOR.getUrl(h&&h.dir||this.basePath+e+"/")},getFilePath:function(e){var h=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+
(h?h.file:this.fileName+".js"))},addExternal:function(e,h,f){f||(h=h.replace(/[^\/]+$/,function(a){f=a;return""}));f=f||this.fileName+".js";e=e.split(",");for(var a=0;a<e.length;a++)this.externals[e[a]]={dir:h,file:f}},load:function(e,h,f){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var a=this.loaded,d=this.registered,k=[],l={},m={},b=0;b<e.length;b++){var c=e[b];if(c)if(a[c]||d[c])m[c]=this.get(c);else{var g=this.getFilePath(c);k.push(g);g in l||(l[g]=[]);l[g].push(c)}}CKEDITOR.scriptLoader.load(k,
function(b,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+l[c[0]].join(",")+'" was not found at "'+c[0]+'".');for(var g=0;g<b.length;g++)for(var d=l[b[g]],e=0;e<d.length;e++){var k=d[e];m[k]=this.get(k);a[k]=1}h.call(f,m)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(e){var h={};return function(f,a,d){var k={},l=function(f){e.call(this,f,function(b){CKEDITOR.tools.extend(k,
b);var c=[],g;for(g in b){var e=b[g],f=e&&e.requires;if(!h[g]){if(e.icons)for(var m=e.icons.split(","),t=m.length;t--;)CKEDITOR.skin.addIcon(m[t],e.path+"icons/"+(CKEDITOR.env.hidpi&&e.hidpi?"hidpi/":"")+m[t]+".png");e.isSupportedEnvironment=e.isSupportedEnvironment||function(){return!0};h[g]=1}if(f)for(f.split&&(f=f.split(",")),e=0;e<f.length;e++)k[f[e]]||c.push(f[e])}if(c.length)l.call(this,c);else{for(g in k)e=k[g],e.onLoad&&!e.onLoad._called&&(!1===e.onLoad()&&delete k[g],e.onLoad._called=1);
a&&a.call(d||window,k)}},this)};l.call(this,f)}}),CKEDITOR.plugins.setLang=function(e,h,f){var a=this.get(e);e=a.langEntries||(a.langEntries={});a=a.lang||(a.lang=[]);a.split&&(a=a.split(","));-1==CKEDITOR.tools.indexOf(a,h)&&a.push(h);e[h]=f},CKEDITOR.ui=function(e){if(e.ui)return e.ui;this.items={};this.instances={};this.editor=e;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(e,h,f){f.name=e.toLowerCase();var a=this.items[e]={type:h,command:f.command||null,args:Array.prototype.slice.call(arguments,
2)};CKEDITOR.tools.extend(a,f)},get:function(e){return this.instances[e]},create:function(e){var h=this.items[e],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[e]=f;a&&a.uiItems.push(f);f&&!f.type&&(f.type=h.type);return f},addHandler:function(e,h){this._.handlers[e]=h},space:function(e){return CKEDITOR.document.getById(this.spaceId(e))},spaceId:function(e){return this.editor.id+"_"+e}},CKEDITOR.event.implementOn(CKEDITOR.ui),
function(){function e(b,c,g){CKEDITOR.event.call(this);b=b&&CKEDITOR.tools.clone(b);if(void 0!==c){if(!(c instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!g)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!f(c,g))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".');
this.element=c;this.elementMode=g;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.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){k(this,a.data.path)});this.on("activeFilterChange",function(){k(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()||m(this,b)},0,this)}function h(){do var a="editor"+ ++t;while(CKEDITOR.instances[a]);return a}function f(a,b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function a(){var a=this.commands,b;for(b in a)d(this,a[b])}function d(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":
b.modes[a.mode]?"enable":"disable"]()}function k(a,b,c){if(b){var g,d,e=a.commands;for(d in e)g=e[d],(c||g.contextSensitive)&&g.refresh(a,b)}}function l(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=r[b]||(r[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&l(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=c.fn||CKEDITOR.editorConfig||function(){};l(a)});return!0}function m(a,c){a.on("customConfigLoaded",function(){if(c){if(c.on)for(var g in c.on)a.on(g,
c.on[g]);CKEDITOR.tools.extend(a.config,c,!0);delete a.config.on}g=a.config;a.readOnly=g.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=g.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:g.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:g.shiftEnterMode;g.skin&&(CKEDITOR.skinName=g.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);b(a)});c&&null!=c.customConfig&&(a.config.customConfig=c.customConfig);l(a)||a.fireOnce("customConfigLoaded")}
function b(a){CKEDITOR.skin.loadPart("editor",function(){c(a)})}function c(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[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");g(a)})}function g(a){a.getStylesSet(function(b){a.once("loaded",
function(){a.fire("stylesSet",{styles:b})},null,null,1);n(a)})}function n(a){function b(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,g=b(c.plugins),d=b(c.extraPlugins),e=b(c.removePlugins);if(d)var f=new RegExp("(?:^|,)(?:"+d.replace(/,/g,"|")+")(?\x3d,|$)","g"),g=g.replace(f,""),g=g+(","+d);if(e)var k=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),g=g.replace(k,"");CKEDITOR.env.air&&(g+=",adobeair");CKEDITOR.plugins.load(g.split(","),
function(b){var g=[],d=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var f in b){var l=b[f],h=l.lang,q=null,m=l.requires,n;CKEDITOR.tools.isArray(m)&&(m=m.join(","));if(m&&(n=m.match(k)))for(;m=n.pop();)CKEDITOR.error("editor-plugin-required",{plugin:m.replace(",",""),requiredBy:f});h&&!a.lang[f]&&(h.split&&(h=h.split(",")),0<=CKEDITOR.tools.indexOf(h,a.langCode)?q=a.langCode:(q=a.langCode.replace(/-.*/,""),q=q!=a.langCode&&0<=CKEDITOR.tools.indexOf(h,q)?q:0<=CKEDITOR.tools.indexOf(h,
"en")?"en":h[0]),l.langEntries&&l.langEntries[q]?(a.lang[f]=l.langEntries[q],q=null):e.push(CKEDITOR.getUrl(l.path+"lang/"+q+".js")));d.push(q);g.push(l)}CKEDITOR.scriptLoader.load(e,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],e=0;e<b.length;e++)for(var f=0;f<g.length;f++){var k=g[f];0===e&&d[f]&&k.lang&&k.langEntries&&(a.lang[k.name]=k.langEntries[d[f]]);if(k[b[e]])k[b[e]](a)}a.fireOnce("pluginsLoaded");c.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 b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function x(a,b){function c(a){var b=a.startContainer,g=a.endContainer;
return b.is&&(b.is("tr")||b.is("td")&&b.equals(g)&&a.endOffset===b.getChildCount())?!0:!1}function g(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var d=new CKEDITOR.dom.documentFragment,e,f,k,l=0;l<a.length;l++){var h=a[l],m=h.startContainer.getAscendant("tr",!0);c(h)?(e||(e=m.getAscendant("table").clone(),e.append(m.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),d.append(e),e=e.findOne("thead, tbody, tfoot")),f&&f.equals(m)||(f=m,k=m.clone(),e.append(k)),k.append(g(h))):
d.append(h.cloneContents())}return e?d:b.getHtmlFromRange(a[0])}e.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=e;var t=0,r={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var c=0;c<b.length;c++){var g=b[c];if(this[g])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:g}),!0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var c=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&d(this,c);return this.commands[a]=
c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!g.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,g=c.element,d=new CKEDITOR.dom.element(g.$.form);g.is("textarea")&&d&&(d.on("submit",a),b(d.$.submit)&&(d.$.submit=CKEDITOR.tools.override(d.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){d.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,
c=this;this.fire("beforeDestroy");!a&&w.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];c===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,b){var c=this.getCommand(a),g={name:a,commandData:b||{},command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",g)&&(g.returnValue=c.exec(g.commandData),!c.async&&!1!==this.fire("afterCommandExec",g))?g.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;
"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.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,b,c){var g=!0,d=b;b&&"object"==
typeof b&&(c=b.internal,d=b.callback,g=!b.noSnapshot);!c&&g&&this.fire("saveSnapshot");if(d||!c)this.once("dataReady",function(a){!c&&g&&this.fire("saveSnapshot");d&&d.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&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,b,c){this.fire("insertHtml",
{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;b=x(c,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),g=this.getSelection().getRanges(),d=new CKEDITOR.dom.documentFragment,e;if(!c||0===g.length)return null;for(e=0;e<g.length;e++)d.append(c.extractHtmlFromRange(g[e],
b));b||this.getSelection().selectRanges([g[0]]);return a?d.getHtml():d},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,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,g,d=b.length;d--;)c=b[d],g=0,CKEDITOR.tools.isArray(c)&&
(g=c[1],c=c[0]),g?a[c]=g:delete a[c]},getCommandKeystroke:function(a,b){var c="string"===typeof a?this.getCommand(a):a,g=[];if(c){var d=CKEDITOR.tools.object.findKey(this.commands,c),e=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)g.push(c.fakeKeystroke);else for(var f in e)e[f]===d&&g.push(f)}return b?g:g[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,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,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 b=CKEDITOR.dom.element.get(a);return b?b.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:b.getEditor().name}),null):b:(CKEDITOR.error("editor-incorrect-element",{element:a}),null)};CKEDITOR.editor.initializeDelayedEditorCreation=function(a,b,c){if(b.delayIfDetached_callback)CKEDITOR.warn("editor-delayed-creation",
{method:"callback"}),b.delayIfDetached_callback(function(){CKEDITOR[c](a,b);CKEDITOR.warn("editor-delayed-creation-success",{method:"callback"})});else{var g=void 0===b.delayIfDetached_interval?CKEDITOR.config.delayIfDetached_interval:b.delayIfDetached_interval,d;CKEDITOR.warn("editor-delayed-creation",{method:"interval - "+g+" ms"});d=setInterval(function(){a.isDetached()||(clearInterval(d),CKEDITOR[c](a,b),CKEDITOR.warn("editor-delayed-creation-success",{method:"interval - "+g+" ms"}))},g)}};CKEDITOR.editor.shouldDelayEditorCreation=
function(a,b){CKEDITOR.editor.mergeDelayedCreationConfigs(b);return b&&b.delayIfDetached&&a.isDetached()};CKEDITOR.editor.mergeDelayedCreationConfigs=function(a){a&&(a.delayIfDetached="boolean"===typeof a.delayIfDetached?a.delayIfDetached:CKEDITOR.config.delayIfDetached,a.delayIfDetached_interval=isNaN(a.delayIfDetached_interval)?CKEDITOR.config.delayIfDetached_interval:a.delayIfDetached_interval,a.delayIfDetached_callback=a.delayIfDetached_callback||CKEDITOR.config.delayIfDetached_callback)}}(),
CKEDITOR.ELEMENT_MODE_NONE=0,CKEDITOR.ELEMENT_MODE_REPLACE=1,CKEDITOR.ELEMENT_MODE_APPENDTO=2,CKEDITOR.ELEMENT_MODE_INLINE=3,CKEDITOR.config.delayIfDetached=!1,CKEDITOR.config.delayIfDetached_callback=void 0,CKEDITOR.config.delayIfDetached_interval=50,CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var e=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,
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,d,k=0,l;a=this._.htmlPartsRegex.exec(f);){d=a.index;if(d>k)if(k=f.substring(k,d),l)l.push(k);else this.onText(k);k=this._.htmlPartsRegex.lastIndex;if(d=a[1])if(d=d.toLowerCase(),l&&CKEDITOR.dtd.$cdata[d]&&
(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(d);continue}if(l)l.push(a[0]);else if(d=a[3]){if(d=d.toLowerCase(),!/="/.test(d)){var m={},b,c=a[4];a=!!a[5];if(c)for(;b=e.exec(c);){var g=b[1].toLowerCase();b=b[2]||b[3]||b[4]||"";m[g]=!b&&h[g]?g:CKEDITOR.tools.htmlDecodeAttr(b)}this.onTagOpen(d,m,a);!l&&CKEDITOR.dtd.$cdata[d]&&(l=[])}}else if(d=a[2])this.onComment(d)}if(f.length>k)this.onText(f.substring(k,f.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._=
{output:[]}},proto:{openTag:function(e){this._.output.push("\x3c",e)},openTagClose:function(e,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(e,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",e,'\x3d"',h,'"')},closeTag:function(e){this._.output.push("\x3c/",e,"\x3e")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("\x3c!--",e,"--\x3e")},write:function(e){this._.output.push(e)},reset:function(){this._.output=
[];this._.indent=!1},getHtml:function(e){var h=this._.output.join("");e&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,h=CKEDITOR.tools.indexOf(e,this),f=this.previous,a=this.next;f&&(f.next=a);a&&(a.previous=f);e.splice(h,1);this.parent=null},replaceWith:function(e){var h=this.parent.children,f=CKEDITOR.tools.indexOf(h,this),a=e.previous=this.previous,d=e.next=this.next;a&&(a.next=
e);d&&(d.previous=e);h[f]=e;e.parent=this.parent;this.parent=null},insertAfter:function(e){var h=e.parent.children,f=CKEDITOR.tools.indexOf(h,e),a=e.next;h.splice(f+1,0,this);this.next=e.next;this.previous=e;e.next=this;a&&(a.previous=this);this.parent=e.parent},insertBefore:function(e){var h=e.parent.children,f=CKEDITOR.tools.indexOf(h,e);h.splice(f,0,this);this.next=e;(this.previous=e.previous)&&(e.previous.next=this);e.previous=this;this.parent=e.parent},getAscendant:function(e){var h="function"==
typeof e?e:"string"==typeof e?function(a){return a.name==e}:function(a){return a.name in e},f=this.parent;for(;f&&f.type==CKEDITOR.NODE_ELEMENT;){if(h(f))return f;f=f.parent}return null},wrapWith:function(e){this.replaceWith(e);e.add(this);return e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(e){this.value=e;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=
CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e,h){var f=this.value;if(!(f=e.onComment(h,f,this)))return this.remove(),!1;if("string"!=typeof f)return this.replaceWith(f),!1;this.value=f;return!0},writeHtml:function(e,h){h&&this.filter(h);e.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(e){this.value=e;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,
filter:function(e,h){if(!(this.value=e.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(e,h){h&&this.filter(h);e.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(e){this.value=e};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e){var h=this.getAscendant("style");if(h&&h.getAscendant({math:1,svg:1})){var h=CKEDITOR.htmlParser.fragment.fromHtml(this.value),f=new CKEDITOR.htmlParser.basicWriter;
e.applyTo(h);h.writeHtml(f);this.value=f.getHtml()}},writeHtml:function(e){e.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(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}),d={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(k,l,m){function b(a){var b;if(0<u.length)for(var g=0;g<u.length;g++){var d=u[g],e=d.name,f=CKEDITOR.dtd[e],k=p.name&&CKEDITOR.dtd[p.name];k&&!k[e]||a&&f&&!f[a]&&CKEDITOR.dtd[a]?e==p.name&&(n(p,p.parent,1),g--):(b||(c(),b=1),d=d.clone(),d.parent=p,p=d,u.splice(g,
1),g--)}}function c(){for(;z.length;)n(z.shift(),p)}function g(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],g;c&&c.type==CKEDITOR.NODE_TEXT&&((g=CKEDITOR.tools.rtrim(c.value))?c.value=g:a.children.length=b-1)}}function n(a,b,c){b=b||p||r;var d=p;void 0===a.previous&&(w(b,a)&&(p=b,t.onTagOpen(m,{}),a.returnPoint=b=p),g(a),e(a)&&!a.children.length||b.add(a),"pre"==a.name&&(v=!1),"textarea"==a.name&&(y=!1));a.returnPoint?(p=a.returnPoint,delete a.returnPoint):
p=c?b:d}function w(a,b){if((a==r||"body"==a.name)&&m&&(!a.name||CKEDITOR.dtd[a.name][m])){var c,g;return(c=b.attributes&&(g=b.attributes["data-cke-real-element-type"])?g:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function x(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var t=new CKEDITOR.htmlParser,r=l instanceof CKEDITOR.htmlParser.element?l:"string"==typeof l?new CKEDITOR.htmlParser.element(l):
new CKEDITOR.htmlParser.fragment,u=[],z=[],p=r,y="textarea"==r.name,v="pre"==r.name;t.onTagOpen=function(g,d,k,l){d=new CKEDITOR.htmlParser.element(g,d);d.isUnknown&&k&&(d.isEmpty=!0);d.isOptionalClose=l;if(e(d))u.push(d);else{if("pre"==g)v=!0;else{if("br"==g&&v){p.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==g&&(y=!0)}if("br"==g)z.push(d);else{for(;!(l=(k=p.name)?CKEDITOR.dtd[k]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a,d.isUnknown||p.isUnknown||l[g]);)if(p.isOptionalClose)t.onTagClose(k);
else if(g in f&&k in f)k=p.children,(k=k[k.length-1])&&"li"==k.name||n(k=new CKEDITOR.htmlParser.element("li"),p),!d.returnPoint&&(d.returnPoint=p),p=k;else if(g in CKEDITOR.dtd.$listItem&&!x(g,k))t.onTagOpen("li"==g?"ul":"dl",{},0,1);else if(k in h&&!x(g,k))!d.returnPoint&&(d.returnPoint=p),p=p.parent;else if(k in CKEDITOR.dtd.$inline&&u.unshift(p),p.parent)n(p,p.parent,1);else{d.isOrphan=1;break}b(g);c();d.parent=p;d.isEmpty?n(d):p=d}}};t.onTagClose=function(a){for(var b=u.length-1;0<=b;b--)if(a==
u[b].name){u.splice(b,1);return}for(var g=[],d=[],e=p;e!=r&&e.name!=a;)e._.isBlockLike||d.unshift(e),g.push(e),e=e.returnPoint||e.parent;if(e!=r){for(b=0;b<g.length;b++){var f=g[b];n(f,f.parent)}p=e;e._.isBlockLike&&c();n(e,e.parent);e==p&&(p=p.parent);u=u.concat(d)}"body"==a&&(m=!1)};t.onText=function(g){if(!(p._.hasInlineStarted&&!z.length||v||y)&&(g=CKEDITOR.tools.ltrim(g),0===g.length))return;var e=p.name,f=e?CKEDITOR.dtd[e]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):a;if(!y&&!f["#"]&&
e in h)t.onTagOpen(d[e]||""),t.onText(g);else{c();b();v||y||(g=g.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));g=new CKEDITOR.htmlParser.text(g);if(w(p,g))this.onTagOpen(m,{},0,1);p.add(g)}};t.onCDATA=function(a){p.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){c();b();p.add(new CKEDITOR.htmlParser.comment(a))};t.parse(k);for(c();p!=r;)n(p,p.parent,1);g(r);return r};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,d){isNaN(d)&&(d=this.children.length);
var e=0<d?this.children[d-1]:null;if(e){if(a._.isBlockLike&&e.type==CKEDITOR.NODE_TEXT&&(e.value=CKEDITOR.tools.rtrim(e.value),0===e.value.length)){this.children.pop();this.add(a);return}e.next=a}a.previous=e;a.parent=this;this.children.splice(d,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,d){d=this.getFilterContext(d);a.onRoot(d,this);this.filterChildren(a,!1,d)},filterChildren:function(a,d,
e){if(this.childrenFilteredBy!=a.id){e=this.getFilterContext(e);if(d&&!this.parent)a.onRoot(e,this);this.childrenFilteredBy=a.id;for(d=0;d<this.children.length;d++)!1===this.children[d].filter(a,e)&&d--}},writeHtml:function(a,d){d&&this.filter(d);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,d,e){var b=this.getFilterContext();if(e&&!this.parent&&d)d.onRoot(b,this);d&&this.filterChildren(d,!1,b);d=0;e=this.children;for(b=e.length;d<b;d++)e[d].writeHtml(a)},forEach:function(a,d,e){if(!(e||
d&&this.type!=d))var b=a(this);if(!1!==b){e=this.children;for(var c=0;c<e.length;c++)b=e[c],b.type==CKEDITOR.NODE_ELEMENT?b.forEach(a,d):d&&b.type!=d||a(b)}},getFilterContext:function(a){return a||{}}}}(),"use strict",function(){function e(){this.rules=[]}function h(f,a,d,k){var l,h;for(l in a)(h=f[l])||(h=f[l]=new e),h.add(a[l],d,k)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(f){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new e;this.attributeNameRules=new e;
this.elementsRules={};this.attributesRules={};this.textRules=new e;this.commentRules=new e;this.rootRules=new e;f&&this.addRules(f,10)},proto:{addRules:function(e,a){var d;"number"==typeof a?d=a:a&&"priority"in a&&(d=a.priority);"number"!=typeof d&&(d=10);"object"!=typeof a&&(a={});e.elementNames&&this.elementNameRules.addMany(e.elementNames,d,a);e.attributeNames&&this.attributeNameRules.addMany(e.attributeNames,d,a);e.elements&&h(this.elementsRules,e.elements,d,a);e.attributes&&h(this.attributesRules,
e.attributes,d,a);e.text&&this.textRules.add(e.text,d,a);e.comment&&this.commentRules.add(e.comment,d,a);e.root&&this.rootRules.add(e.root,d,a)},applyTo:function(e){e.filter(this)},onElementName:function(e,a){return this.elementNameRules.execOnName(e,a)},onAttributeName:function(e,a){return this.attributeNameRules.execOnName(e,a)},onText:function(e,a,d){return this.textRules.exec(e,a,d)},onComment:function(e,a,d){return this.commentRules.exec(e,a,d)},onRoot:function(e,a){return this.rootRules.exec(e,
a)},onElement:function(e,a){for(var d=[this.elementsRules["^"],this.elementsRules[a.name],this.elementsRules.$],k,l=0;3>l;l++)if(k=d[l]){k=k.exec(e,a,this);if(!1===k)return null;if(k&&k!=a)return this.onNode(e,k);if(a.parent&&!a.name)break}return a},onNode:function(e,a){var d=a.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(e,a):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,a.value,a)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,a.value,a)):null},
onAttribute:function(e,a,d,k){return(d=this.attributesRules[d])?d.exec(e,k,a,this):k}}});CKEDITOR.htmlParser.filterRulesGroup=e;e.prototype={add:function(e,a,d){this.rules.splice(this.findIndex(a),0,{value:e,priority:a,options:d})},addMany:function(e,a,d){for(var k=[this.findIndex(a),0],l=0,h=e.length;l<h;l++)k.push({value:e[l],priority:a,options:d});this.rules.splice.apply(this.rules,k)},findIndex:function(e){for(var a=this.rules,d=a.length-1;0<=d&&e<a[d].priority;)d--;return d+1},exec:function(e,
a){var d=a instanceof CKEDITOR.htmlParser.node||a instanceof CKEDITOR.htmlParser.fragment,k=Array.prototype.slice.call(arguments,1),l=this.rules,h=l.length,b,c,g,n;for(n=0;n<h;n++)if(d&&(b=a.type,c=a.name),g=l[n],!(e.nonEditable&&!g.options.applyToAll||e.nestedEditable&&g.options.excludeNestedEditable)){g=g.value.apply(null,k);if(!1===g||d&&g&&(g.name!=c||g.type!=b))return g;null!=g&&(k[0]=a=g)}return a},execOnName:function(e,a){for(var d=0,k=this.rules,l=k.length,h;a&&d<l;d++)h=k[d],e.nonEditable&&
!h.options.applyToAll||e.nestedEditable&&h.options.excludeNestedEditable||(a=a.replace(h.value[0],h.value[1]));return a}}}(),function(){function e(b,c){function g(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function e(b,c){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=[],l=f(d),m,q;if(l)for(h(l,1)&&e.push(l);l;)k(l)&&(m=a(l))&&h(m)&&((q=a(m))&&!k(q)?e.push(m):(g(n).insertAfter(m),m.remove())),
l=l.previous;for(l=0;l<e.length;l++)e[l].remove();if(e=!b||!1!==("function"==typeof c?c(d):c))n||CKEDITOR.env.needsBrFiller||d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem)?(e=f(d),e=!e||"form"==d.name&&"input"==e.name):e=!1:e=!1;e&&d.add(g(b))}}}function h(a,b){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;
return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(z))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&n&&(!b||a.parent.name in w)||!n&&((c=a.previous)&&"br"==c.name||!c||k(c)))?!0:!1}var m={elements:{}},n="html"==c,w=CKEDITOR.tools.extend({},q),K;for(K in w)"#"in y[K]||delete w[K];for(K in w)m.elements[K]=e(n,b.config.fillEmptyBlocks);m.root=e(n,!1);m.elements.br=function(b){return function(c){if(c.parent.type!=
CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=c.attributes;if("data-cke-bogus"in e||"data-cke-eol"in e)delete e["data-cke-bogus"];else{for(e=c.next;e&&d(e);)e=e.next;var f=a(c);!e&&k(c.parent)?l(c.parent,g(b)):k(e)&&f&&!k(f)&&g(b).insertBefore(e)}}}}(n);return m}function h(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function f(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function a(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==
CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function k(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in q||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function l(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function m(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function b(a){a=a.attributes;
switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function c(a){return a.replace(F,function(a,b,c){return"\x3c"+b+c.replace(H,function(a,b){return L.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function g(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+x(c).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,b){return decodeURIComponent(b)})}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,b){return decodeURIComponent(b)})}function t(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,
function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function r(a,b){var c=[],g=b.config.protectedSource,d=b._.dataStore||(b._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,g=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(g);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-1)+"--\x3e"});for(var f=0;f<g.length;f++)a=a.replace(g[f],
function(a){a=a.replace(e,function(a,b,g){return c[g]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,b,g){return"\x3c!--"+p+(b?"{C}":"")+encodeURIComponent(c[g]).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,b){d[d.id]=decodeURIComponent(b);return"{cke_protected_"+d.id++ +
"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,g,d){return"\x3c"+c+g+"\x3e"+t(x(d),b)+"\x3c/"+c+"\x3e"})}var u;CKEDITOR.htmlDataProcessor=function(a){var b,d,f=this;this.editor=a;this.dataFilter=b=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;b.addRules(B);b.addRules(A,{applyToAll:!0});b.addRules(e(a,"data"),{applyToAll:!0});d.addRules(C);d.addRules(E,{applyToAll:!0});d.addRules(e(a,
"html"),{applyToAll:!0});a.on("toHtml",function(b){b=b.data;var d=b.dataValue,e,d=u(d),d=r(d,a),d=g(d,N),d=c(d),d=g(d,D),d=d.replace(M,"$1cke:$2"),d=d.replace(K,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),d=d.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),d=d.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=b.context||a.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",d="\x3cpre\x3e"+d+"\x3c/pre\x3e",f=1);e=a.document.createElement(e);e.setHtml("a"+
d);d=e.getHtml().substr(1);d=d.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(d=d.replace(/^<pre>|<\/pre>$/gi,""));d=d.replace(R,"$1$2");d=n(d);d=x(d);e=!1===b.fixForBody?!1:h(b.enterMode,a.config.autoParagraph);d=CKEDITOR.htmlParser.fragment.fromHtml(d,b.context,e);e&&(f=d,!f.children.length&&CKEDITOR.dtd[f.name][e]&&(e=new CKEDITOR.htmlParser.element(e),f.add(e)));b.dataValue=d},null,null,5);a.on("toHtml",function(b){b.data.filter.applyTo(b.data.dataValue,!0,b.data.dontFilter,b.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 b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=w(b)},null,null,15);a.on("toDataFormat",function(b){var c=b.data.dataValue;b.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));b.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,b.data.context,h(b.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(b){var c=b.data.dataValue,d=f.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=x(c);c=t(c,a);b.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var g=this.editor,e,f,k,l;b&&"object"==typeof b?
(e=b.context,c=b.fixForBody,d=b.dontFilter,f=b.filter,k=b.enterMode,l=b.protectedWhitespaces):e=b;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d,filter:f||g.filter,enterMode:k||g.enterMode,protectedWhitespaces:l}).dataValue},toDataFormat:function(a,b){var c,d,g;b&&(c=b.context,d=b.filter,g=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,
enterMode:g||this.editor.enterMode}).dataValue},protectSource:function(a){return r(a,this.editor)},unprotectSource:function(a){return t(a,this.editor)},unprotectRealComments:function(a){return x(a)}};var z=/(?:&nbsp;|\xa0)$/,p="{cke_protected}",y=CKEDITOR.dtd,v="caption colgroup col thead tfoot tbody".split(" "),q=CKEDITOR.tools.extend({},y.$blockLimit,y.$block),B={elements:{input:m,textarea:m}},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 b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},C={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.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 b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,g=0;g<c.length;g++)d="data-cke-saved-"+c[g],d in b&&delete b[c[g]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(v,a.name),d=CKEDITOR.tools.indexOf(v,
b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?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 b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||
(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:b,textarea:b},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,H=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,
L=/^(href|src|name)$/i,D=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,N=/(<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;u=function(){function a(b,c){for(var d=0;d<b.length;d++){var g=b[d];g.lastIndex=0;if(g.test(c))return!0}return!1}function b(a){return CKEDITOR.tools.array.reduce(a.split(""),
function(a,b){var d=b.toLowerCase(),g=b.toUpperCase(),e=c(d);d!==g&&(e+="|"+c(g));return a+("("+e+")")},"")}function c(a){var b;b=a.charCodeAt(0);var d=b.toString(16);b={htmlCode:"\x26#"+b+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var g in b)b[g]&&(a+="|"+b[g]);return a}var d=[new RegExp("("+b("\x3ccke:encoded\x3e")+"(.*?)"+b("\x3c/cke:encoded\x3e")+")|("+b("\x3c")+b("/")+"?"+b("cke:encoded\x3e")+")","gi"),new RegExp("(("+b("{cke_protected")+")(_[0-9]*)?"+
b("}")+")","gi"),/<!(?:\s*-\s*){2,3}!?\s*>/g];return function(b){for(;a(d,b);)for(var c=d,g=0;g<c.length;g++)b=b.replace(c[g],"");return b}}()}(),"use strict",CKEDITOR.htmlParser.element=function(e,h){this.name=e;this.attributes=h||{};this.children=[];var f=e||"",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[e];this.isUnknown=
!CKEDITOR.dtd[e];this._={isBlockLike:f,hasInlineStarted:this.isEmpty||!f}},CKEDITOR.htmlParser.cssStyle=function(e){var h={};((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,a,d){"font-family"==a&&(d=d.replace(/["']/g,""));h[a.toLowerCase()]=d});return{rules:h,populate:function(e){var a=this.toString();a&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",a):e instanceof CKEDITOR.htmlParser.element?
e.attributes.style=a:e.style=a)},toString:function(){var e=[],a;for(a in h)h[a]&&e.push(a,":",h[a],";");return e.join("")}}},function(){function e(a){return function(d){return d.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?d.name==a:d.name in a)}}var h=function(a,d){a=a[0];d=d[0];return a<d?-1:a>d?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,d){var e=this,f,h;d=e.getFilterContext(d);if(!e.parent)a.onRoot(d,e);for(;;){f=e.name;if(!(h=a.onElementName(d,f)))return this.remove(),!1;e.name=h;if(!(e=a.onElement(d,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==f)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),!1}f=e.attributes;var b,c;for(b in f){for(h=f[b];;)if(c=a.onAttributeName(d,b))if(c!=b)delete f[b],
b=c;else break;else{delete f[b];break}c&&(!1===(h=a.onAttribute(d,e,c,h))?delete f[c]:f[c]=h)}e.isEmpty||this.filterChildren(a,!1,d);return!0},filterChildren:f.filterChildren,writeHtml:function(a,d){d&&this.filter(d);var e=this.name,f=[],m=this.attributes,b,c;a.openTag(e,m);for(b in m)f.push([b,m[b]]);a.sortAttributes&&f.sort(h);b=0;for(c=f.length;b<c;b++)m=f[b],a.attribute(m[0],m[1]);a.openTagClose(e,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(e)},writeChildrenHtml:f.writeChildrenHtml,
replaceWithChildren:function(){for(var a=this.children,d=a.length;d;)a[--d].insertAfter(this);this.remove()},forEach:f.forEach,getFirst:function(a){if(!a)return this.children.length?this.children[0]:null;"function"!=typeof a&&(a=e(a));for(var d=0,f=this.children.length;d<f;++d)if(a(this.children[d]))return this.children[d];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 d=0,e=a.length;d<e;++d)a[d].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var d=this.children.splice(a,this.children.length-a),e=this.clone(),f=0;f<d.length;++f)d[f].parent=e;e.children=d;d[0]&&(d[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(e,this.getIndex()+1);return e},find:function(a,d){void 0===d&&(d=!1);var e=[],f;for(f=0;f<this.children.length;f++){var h=this.children[f];
"function"==typeof a&&a(h)?e.push(h):"string"==typeof a&&h.name===a&&e.push(h);d&&h.find&&(e=e.concat(h.find(a,d)))}return e},findOne:function(a,d){var e=null,f=CKEDITOR.tools.array.find(this.children,function(f){var b="function"===typeof a?a(f):f.name===a;if(b||!d)return b;f.children&&f.findOne&&(e=f.findOne(a,!0));return!!e});return e||f||null},addClass:function(a){if(!this.hasClass(a)){var d=this.attributes["class"]||"";this.attributes["class"]=d+(d?" ":"")+a}},removeClass:function(a){var d=this.attributes["class"];
d&&((d=CKEDITOR.tools.trim(d.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=d:delete this.attributes["class"])},hasClass:function(a){var d=this.attributes["class"];return d?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(d):!1},getFilterContext:function(a){var d=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&d.push("nestedEditable",!0):d.push("nonEditable",
!0);if(d.length){a=CKEDITOR.tools.copy(a);for(var e=0;e<d.length;e+=2)a[d[e]]=d[e+1]}return a}},!0)}(),function(){var e=/{([^}]+)}/g;CKEDITOR.template=function(e){this.source="function"===typeof e?e:String(e)};CKEDITOR.template.prototype.output=function(h,f){var a=("function"===typeof this.source?this.source(h):this.source).replace(e,function(a,e){return void 0!==h[e]?h[e]:a});return f?f.push(a):a}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),
CKEDITOR.add=function(e){function h(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[e.name]=e;e.on("focus",function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))});e.on("blur",h);e.on("destroy",h);CKEDITOR.fire("instance",null,e)},CKEDITOR.remove=function(e){delete CKEDITOR.instances[e.name]},function(){var e={};CKEDITOR.addTemplate=function(h,f){var a=e[h];if(a)return a;a={name:h,source:f};
CKEDITOR.fire("template",a);return e[h]=new CKEDITOR.template(a.source)};CKEDITOR.getTemplate=function(h){return e[h]}}(),function(){var e=[];CKEDITOR.addCss=function(h){e.push(h)};CKEDITOR.getCss=function(){return e.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(e,h){e=CKEDITOR.editor._getEditorElement(e);if(!e)return null;
if(CKEDITOR.editor.shouldDelayEditorCreation(e,h))return CKEDITOR.editor.initializeDelayedEditorCreation(e,h,"inline"),null;var f=e.is("textarea")?e:null,a=f?f.getValue():e.getHtml(),d=new CKEDITOR.editor(h,e,CKEDITOR.ELEMENT_MODE_INLINE);f?(d.setData(a,null,!0),e=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!d.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+f.getValue()+"\x3c/div\x3e",CKEDITOR.document),e.insertAfter(f),f.hide(),f.$.form&&d._attachToForm()):(h&&"undefined"!==
typeof h.readOnly&&!h.readOnly&&e.setAttribute("contenteditable","true"),d.setData(a,null,!0));d.on("loaded",function(){d.fire("uiReady");d.editable(e);d.container=e;d.ui.contentsElement=e;d.setData(d.getData(1));d.resetDirty();d.fire("contentDom");d.mode="wysiwyg";d.fire("mode");d.status="ready";d.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,d)},null,null,1E4);d.on("destroy",function(){var a=d.container;f&&a&&(a.clearCustomData(),a.remove());f&&f.show();d.element.clearCustomData();
delete d.element});return d};CKEDITOR.inlineAll=function(){var e,h,f;for(f in CKEDITOR.dtd.$editable)for(var a=CKEDITOR.document.getElementsByTag(f),d=0,k=a.count();d<k;d++)e=a.getItem(d),"true"!=e.getAttribute("contenteditable")||e.getEditor()||(h={element:e,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(e,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function e(a,d,e,l){a=CKEDITOR.editor._getEditorElement(a);
if(!a)return null;if(CKEDITOR.editor.shouldDelayEditorCreation(a,d))return CKEDITOR.editor.initializeDelayedEditorCreation(a,d,"replace"),null;var m=new CKEDITOR.editor(d,a,l);l==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),m._.required=a.hasAttribute("required"),a.removeAttribute("required"));e&&m.setData(e,null,!0);m.on("loaded",function(){m.isDestroyed()||m.isDetached()||(f(m),l==CKEDITOR.ELEMENT_MODE_REPLACE&&m.config.autoUpdateElement&&a.$.form&&m._attachToForm(),m.setMode(m.config.startupMode,
function(){m.resetDirty();m.status="ready";m.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,m)}))});m.on("destroy",h);return m}function h(){var a=this.container,d=this.element;a&&(a.clearCustomData(),a.remove());d&&(d.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(d.show(),this._.required&&d.setAttribute("required","required")),delete this.element)}function f(a){var d=a.name,e=a.element,f=a.elementMode,h=a.fire("uiSpace",{space:"top",html:""}).html,b=a.fire("uiSpace",
{space:"bottom",html:""}).html,c=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'),
d=CKEDITOR.dom.element.createFromHtml(c.output({id:a.id,name:d,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:h?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+h+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:b?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+b+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));f==CKEDITOR.ELEMENT_MODE_REPLACE?
(e.hide(),d.insertAfter(e)):e.append(d);a.container=d;a.ui.contentsElement=a.ui.space("contents");h&&a.ui.space("top").unselectable();b&&a.ui.space("bottom").unselectable();e=a.config.width;f=a.config.height;e&&d.setStyle("width",CKEDITOR.tools.cssLength(e));f&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));d.disableContextMenu();CKEDITOR.env.webkit&&d.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(a,d){return e(a,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
CKEDITOR.appendTo=function(a,d,f){return e(a,d,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),d=0;d<a.length;d++){var e=null,f=a[d];if(f.name||f.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(f.className))continue}else if("function"==typeof arguments[0]&&(e={},!1===arguments[0](f,e)))continue;this.replace(f,e)}}};CKEDITOR.editor.prototype.addMode=function(a,d){(this._.modes||(this._.modes=
{}))[a]=d};CKEDITOR.editor.prototype.setMode=function(a,d){var e=this,f=this._.modes;if(a!=e.mode&&f&&f[a]){e.fire("beforeSetMode",a);if(e.mode){var h=e.checkDirty(),f=e._.previousModeData,b,c=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=b=e.getData(1);"source"==e.mode&&f==b&&(e.fire("lockSnapshot",{forceUpdate:!0}),c=1);(e.ui.space("contents")||e.ui.contentsElement).setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[a](function(){e.mode=
a;void 0!==h&&!h&&e.resetDirty();c?e.fire("unlockSnapshot"):"wysiwyg"==a&&e.fire("saveSnapshot");setTimeout(function(){e.isDestroyed()||e.isDetached()||(e.fire("mode"),d&&d.call(e))},0)})}};CKEDITOR.editor.prototype.resize=function(a,d,e,f){var h=this.container,b=this.ui.space("contents"),c=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;f=f?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):h;if(a||0===a)a=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(a));
f.setSize("width",a,!0);c&&(c.style.width="1%");d=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(d));var g=(f.$.offsetHeight||0)-(b.$.clientHeight||0),h=Math.max(d-(e?0:g),0);d=e?d+g:d;b.setStyle("height",CKEDITOR.tools.cssLength(h));c&&(c.style.width="100%");this.fire("resize",{outerHeight:d,contentsHeight:h,outerWidth:a||f.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 e(b){var c=b.editor,d=b.data.path,g=d.blockLimit,e=b.data.selection,f=e.getRanges()[0],k;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(e=h(e,d))e.appendBogus(),k=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&c._.previousActive;l(c,d.block,g)&&f.collapsed&&!f.getCommonAncestor().isReadOnly()&&(d=f.clone(),d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),g=new CKEDITOR.dom.walker(d),
g.guard=function(b){return!a(b)||b.type==CKEDITOR.NODE_COMMENT||b.isReadOnly()},!g.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock())&&(c=f.fixBlock(!0,c.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(c=c.getFirst(a))&&c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?:&nbsp;|\xa0)$/)&&c.remove(),k=1,b.cancel());k&&f.select()}function h(b,c){if(b.isFake)return 0;var d=c.block||c.blockLimit,g=d&&d.getLast(a);if(!(!d||!d.isBlockBoundary()||
g&&g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function f(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function a(a){return n(a)&&w(a)}function d(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function k(b){function c(b){return function(c,
g){g&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(e)&&(d=c);if(!(g||!a(c)||b&&t(c)))return!1}}var d,g=b.getRanges()[0];b=b.root;var e={table:1,ul:1,ol:1,dl:1};if(g.startPath().contains(e)){var f=g.clone();f.collapse(1);f.setStartAt(b,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(f);b.guard=c();b.checkBackward();if(d)return f=g.clone(),f.collapse(),f.setEndAt(d,CKEDITOR.POSITION_AFTER_END),b=new CKEDITOR.dom.walker(f),b.guard=c(!0),d=!1,b.checkForward(),d}return null}function l(a,b,c){return!1!==
a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function m(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function c(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function g(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?
b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var n,w,x,t,r,u,z,p,y,v;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);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 b=this.$.scrollTop;this.$.focus();this.$.scrollTop=b}else this.$.focus();else this.$.setActive()}catch(c){if(!CKEDITOR.env.ie)throw c;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},
on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=d(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=
this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,b){var c=this.getAttribute(a);b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),
"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,d){var g=this.editor;g.focus();g.fire("saveSnapshot");d||(d=g.getSelection().getRanges()[0]);u(this,b||"html",a,d);d.select();c(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){u(this,c||"html",a,b);this.editor.fire("afterInsertHtml",
{intoRange:b})},insertElement:function(b,d){var g=this.editor;g.focus();g.fire("saveSnapshot");var e=g.activeEnterMode,g=g.getSelection(),f=b.getName(),f=CKEDITOR.dtd.$block[f];d||(d=g.getRanges()[0]);this.insertElementIntoRange(b,d)&&(d.moveToPosition(b,CKEDITOR.POSITION_AFTER_END),f&&((f=b.getNext(function(b){return a(b)&&!t(b)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)?f.getDtd()["#"]?d.moveToElementEditStart(f):d.moveToElementEditEnd(b):f||e==CKEDITOR.ENTER_BR||(f=d.fixBlock(!0,
e==CKEDITOR.ENTER_DIV?"div":"p"),d.moveToElementEditStart(f))));g.selectRanges([d]);c(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,c){var d=this.editor,g=d.config.enterMode,e=a.getName(),f=CKEDITOR.dtd.$block[e];if(c.checkReadOnly())return!1;c.deleteContents(1);c.startContainer.type==CKEDITOR.NODE_ELEMENT&&(c.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?z(c):c.startContainer.is(CKEDITOR.dtd.$list)&&p(c));var k,h;if(f)for(;(k=c.getCommonAncestor(0,
1))&&(h=CKEDITOR.dtd[k.getName()])&&(!h||!h[e]);)if(k.getName()in CKEDITOR.dtd.span){var f=c.splitElement(k),l=c.createBookmark();b(k);b(f);c.moveToBookmark(l)}else c.checkStartOfBlock()&&c.checkEndOfBlock()?(c.setStartBefore(k),c.collapse(!0),k.remove()):c.splitBlock(g==CKEDITOR.ENTER_DIV?"div":"p",d.editable());c.insertNode(a);return!0},setData:function(a,b){b||(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 b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},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 b=c.getDocument().$,d=b.getSelection(),g;a:if(d.anchorNode&&d.anchorNode==c.$)g=!0;else{if(CKEDITOR.env.webkit&&(g=c.getDocument().getActive())&&g.equals(c)&&!d.anchorNode){g=!0;break a}g=void 0}g&&(g=new CKEDITOR.dom.range(c),g.moveToElementEditStart(c),b=b.createRange(),b.setStart(g.startContainer.$,g.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,g=c.getDocument().getActive();"None"==
d.type&&g.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());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,b){var c=v,d={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var e=this.editor.createRange();
e.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=e.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);
if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),e=0,f;if(d)for(;f=d.getItem(e++);)if(!w(f)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),x(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return g},setup:function(){var b=this.editor;this.attachListener(b,"beforeGetData",function(){var a=
this.getData();this.is("textarea")||!1!==b.config.ignoreEmptyParagraph&&(a=a.replace(r,function(a,b){return b}));b.setData(a,null,1)},this);this.attachListener(b,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(b,"afterSetData",function(){this.setData(b.getData(1))},this);this.attachListener(b,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(b,"beforeFocus",function(){var a=b.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},
this);this.attachListener(b,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(b,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(b,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(b.readOnly);this.attachClass("cke_editable");b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):b.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||
this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+b.config.contentsLangDirection);b.keystrokeHandler.blockedKeystrokes[8]=+b.readOnly;b.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(){b._.previousScrollTop=b.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var c=function(){var a=b.editable();
null!=b._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=b._.previousScrollTop,b._.previousScrollTop=null,this.removeListener("scroll",c))};this.on("scroll",c)}b.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,b.once("contentDom",function(){b.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",b.tabIndex);if(!this.is("textarea")){b.document=this.getDocument();b.window=this.getWindow();var d=b.document;this.changeAttr("spellcheck",
!b.config.disableNativeSpellChecker);var e=b.config.contentsLangDirection;this.getDirection(1)!=e&&this.changeAttr("dir",e);var h=CKEDITOR.getCss();if(h){var e=d.getHead(),l=e.getCustomData("stylesheet");l?h!=l.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?l.$.styleSheet.cssText=h:l.setText(h)):(h=d.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),e.setCustomData("stylesheet",h),h.data("cke-temp",1))}e=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",
e+1);this.setCustomData("cke_includeReadonly",!b.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var m={8:1,46:1};this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var c=a.data.domEvent.getKey(),d;a=b.getSelection();if(0!==a.getRanges().length){if(c in m){var g,e=a.getRanges()[0],f=e.startPath(),h,l,w,c=8==c;CKEDITOR.env.ie&&
11>CKEDITOR.env.version&&(g=a.getSelectedElement())||(g=k(a))?(b.fire("saveSnapshot"),e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g.remove(),e.select(),b.fire("saveSnapshot"),d=1):e.collapsed&&((h=f.block)&&(w=h[c?"getPrevious":"getNext"](n))&&w.type==CKEDITOR.NODE_ELEMENT&&w.is("table")&&e[c?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),e[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),e["moveToElementEdit"+(c?"End":"Start")](w),e.select(),b.fire("saveSnapshot"),
d=1):f.blockLimit&&f.blockLimit.is("td")&&(l=f.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(w=l[c?"getPrevious":"getNext"](n))?(b.fire("saveSnapshot"),e["moveToElementEdit"+(c?"End":"Start")](w),e.checkStartOfBlock()&&e.checkEndOfBlock()?w.remove():e.select(),b.fire("saveSnapshot"),d=1):(l=f.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});b.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
this.attachListener(this,"keyup",function(c){c.data.getKeystroke()in m&&!this.getFirst(a)&&(this.appendBogus(),c=b.createRange(),c.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),c.select())});this.attachListener(this,"dblclick",function(a){if(b.readOnly)return!1;a={element:a.data.getTarget()};b.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",f);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var c=a.data.getTarget();c.is("img","hr",
"input","textarea","select")&&!c.isReadOnly()&&(b.getSelection().selectElement(c),c.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()&&b.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(r,""))){var c=b.createRange();c.moveToElementEditStart(a);
c.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(b,"key",function(a){if(b.readOnly)return!0;var c=a.data.domEvent.getKey();if(c in m&&(a=b.getSelection(),0!==a.getRanges().length)){var c=8==c,d=a.getRanges()[0];a=d.startPath();if(d.collapsed)a:{var e=
a.block;if(e&&d[c?"checkStartOfBlock":"checkEndOfBlock"](!0)&&d.moveToClosestEditablePosition(e,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(c?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){b.fire("saveSnapshot");f.remove();a=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))a=void 0;else{b.fire("saveSnapshot");var k;(k=(c?d:e).getBogus())&&k.remove();k=b.getSelection();f=k.createBookmarks();(c?e:d).moveChildren(c?
d:e,!1);a.lastElement.mergeSiblings();g(e,d,!c);k.selectBookmarks(f);a=!0}}else a=!1}else c=d,k=a.block,d=c.endPath().block,k&&d&&!k.equals(d)?(b.fire("saveSnapshot"),(e=k.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(k,!1),a.lastElement.mergeSiblings(),g(k,d,!0)),c=b.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),a=!0):a=!1;if(!a)return;b.getSelection().scrollIntoView();
b.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){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(),b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");
--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.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))});b.on("selectionChange",function(a){if(!b.readOnly){var c=b.getSelection();c&&!c.isLocked&&(c=b.checkDirty(),b.fire("lockSnapshot"),e(a),b.fire("unlockSnapshot"),!c&&b.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role",
"textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var g=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",g)}}})});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();t=CKEDITOR.dom.walker.bogus();r=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;u=function(){function c(a){return a.type==CKEDITOR.NODE_ELEMENT}function d(a,b){var g,e,f,k,h=[],l=b.range.startContainer;g=b.range.startPath();for(var l=n[l.getName()],m=0,w=a.getChildren(),p=w.count(),v=-1,r=-1,u=0,F=g.contains(n.$list);m<
p;++m)g=w.getItem(m),c(g)?(f=g.getName(),F&&f in CKEDITOR.dtd.$list?h=h.concat(d(g,b)):(k=!!l[f],"br"!=f||!g.data("cke-eol")||m&&m!=p-1||(u=(e=m?h[m-1].node:w.getItem(m+1))&&(!c(e)||!e.is("br")),e=e&&c(e)&&n.$block[e.getName()]),-1!=v||k||(v=m),k||(r=m),h.push({isElement:1,isLineBreak:u,isBlock:g.isBlockBoundary(),hasBlockSibling:e,node:g,name:f,allowed:k}),e=u=0)):h.push({isElement:0,node:g,allowed:1});-1<v&&(h[v].firstNotAllowed=1);-1<r&&(h[r].lastNotAllowed=1);return h}function g(a,b){var d=[],
e=a.getChildren(),f=e.count(),k,h=0,l=n[b],m=!a.is(n.$inline)||a.is("br");for(m&&d.push(" ");h<f;h++)k=e.getItem(h),c(k)&&!k.is(l)?d=d.concat(g(k,b)):d.push(k);m&&d.push(" ");return d}function e(a){return c(a.startContainer)&&a.startContainer.getChild(a.startOffset-1)}function f(a){return a&&c(a)&&(a.is(n.$removeEmpty)||a.is("a")&&!a.isBlockBoundary())}function k(a,b,d,g){var e=a.clone(),f,h;e.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);(f=(new CKEDITOR.dom.walker(e)).next())&&c(f)&&w[f.getName()]&&
(h=f.getPrevious())&&c(h)&&!h.getParent().equals(a.startContainer)&&d.contains(h)&&g.contains(f)&&f.isIdentical(h)&&(f.moveChildren(h),f.remove(),k(a,b,d,g))}function h(a,b){function d(a,b){if(b.isBlock&&b.isElement&&!b.node.is("br")&&c(a)&&a.is("br"))return a.remove(),1}var g=b.endContainer.getChild(b.endOffset),e=b.endContainer.getChild(b.endOffset-1);g&&d(g,a[a.length-1]);e&&d(e,a[0])&&(b.setEnd(b.endContainer,b.endOffset-1),b.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,u,K,G){var y=w.editor,z=!1,x;"unfiltered_html"==u&&(u="html",z=!0);if(!G.checkReadOnly()){var t=(new CKEDITOR.dom.elementPath(G.startContainer,G.root)).blockLimit||G.root;u={type:u,dontFilter:z,editable:w,editor:y,range:G,blockLimit:t,mergeCandidates:[],zombies:[]};var z=u.range,t=u.mergeCandidates,D="html"===u.type,J,T,W,aa,ba;"text"==u.type&&
z.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(T=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",z.document),z.insertNode(T),z.setStartAfter(T));W=new CKEDITOR.dom.elementPath(z.startContainer);u.endPath=aa=new CKEDITOR.dom.elementPath(z.endContainer);if(!z.collapsed){J=aa.block||aa.blockLimit;var da=z.getCommonAncestor();J&&!J.equals(da)&&!J.contains(da)&&z.checkEndOfBlock()&&u.zombies.push(J);z.deleteContents()}for(;(ba=e(z))&&c(ba)&&ba.isBlockBoundary()&&W.contains(ba);)z.moveToPosition(ba,
CKEDITOR.POSITION_BEFORE_END);k(z,u.blockLimit,W,aa);T&&(z.setEndBefore(T),z.collapse(),T.remove());T=z.startPath();if(J=T.contains(f,!1,1))x=z.splitElement(J),u.inlineStylesRoot=J,u.inlineStylesPeak=T.lastElement;T=z.createBookmark();D&&(b(J),b(x));(J=T.startNode.getPrevious(a))&&c(J)&&f(J)&&t.push(J);(J=T.startNode.getNext(a))&&c(J)&&f(J)&&t.push(J);for(J=T.startNode;(J=J.getParent())&&f(J);)t.push(J);z.moveToBookmark(T);x=w.getHtml();x=""===x||x.match(r);y.enterMode===CKEDITOR.ENTER_DIV&&x&&((y=
w.getFirst())&&y.remove(),G.setStartAt(w,CKEDITOR.POSITION_AFTER_START),G.collapse(!0));if(w=K){w=u.range;if("text"==u.type&&u.inlineStylesRoot){G=u.inlineStylesPeak;y=G.getDocument().createText("{cke-peak}");for(x=u.inlineStylesRoot.getParent();!G.equals(x);)y=y.appendTo(G.clone()),G=G.getParent();K=y.getOuterHtml().split("{cke-peak}").join(K)}G=u.blockLimit.getName();if(/^\s+|\s+$/.test(K)&&"span"in CKEDITOR.dtd[G]){var Z='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';K=Z+K+Z}K=u.editor.dataProcessor.toHtml(K,
{context:null,fixForBody:!1,protectedWhitespaces:!!Z,dontFilter:u.dontFilter,filter:u.editor.activeFilter,enterMode:u.editor.activeEnterMode});G=w.document.createElement("body");G.setHtml(K);Z&&(G.getFirst().remove(),G.getLast().remove());if((Z=w.startPath().block)&&(1!=Z.getChildCount()||!Z.getBogus()))a:{var U;if(1==G.getChildCount()&&c(U=G.getFirst())&&U.is(p)&&!U.hasAttribute("contenteditable")){Z=U.getElementsByTag("*");w=0;for(x=Z.count();w<x;w++)if(y=Z.getItem(w),!y.is(v))break a;U.moveChildren(U.getParent(1));
U.remove()}}u.dataWrapper=G;w=K}if(w){U=u.range;w=U.document;G=u.blockLimit;x=0;var V,Z=[],ha,P;K=T=0;var Q,y=U.startContainer;ba=u.endPath.elements[0];var ea,z=ba.getPosition(y),t=!!ba.getCommonAncestor(y)&&z!=CKEDITOR.POSITION_IDENTICAL&&!(z&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),y=d(u.dataWrapper,u);for(u.editor.enterMode!==CKEDITOR.ENTER_BR&&h(y,U);x<y.length;x++){z=y[x];if(D=z.isLineBreak)D=U,J=G,aa=W=void 0,z.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();!z.isBlock&&l(u.editor,D.block,D.blockLimit)&&(P=m(u.editor))&&(P=w.createElement(P),P.appendBogus(),U.insertNode(P),CKEDITOR.env.needsBrFiller&&(V=P.getBogus())&&V.remove(),U.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END));if((D=U.startPath().block)&&!D.equals(ha)){if(V=D.getBogus())V.remove(),
Z.push(D);ha=D}z.firstNotAllowed&&(T=1);if(T&&z.isElement){D=U.startContainer;for(J=null;D&&!n[D.getName()][z.name];){if(D.equals(G)){D=null;break}J=D;D=D.getParent()}if(D)J&&(Q=U.splitElement(J),u.zombies.push(Q),u.zombies.push(J));else{J=G.getName();ea=!x;D=x==y.length-1;J=g(z.node,J);W=[];aa=J.length;for(var da=0,ja=void 0,ga=0,fa=-1;da<aa;da++)ja=J[da]," "==ja?(ga||ea&&!da||(W.push(new CKEDITOR.dom.text(" ")),fa=W.length),ga=1):(W.push(ja),ga=0);D&&fa==W.length&&W.pop();ea=W}}if(ea){for(;D=ea.pop();)U.insertNode(D);
ea=0}else U.insertNode(z.node);z.lastNotAllowed&&x<y.length-1&&((Q=t?ba:Q)&&U.setEndAt(Q,CKEDITOR.POSITION_AFTER_START),T=0);U.collapse()}}1!=y.length?V=!1:(V=y[0],V=V.isElement&&"false"==V.node.getAttribute("contenteditable"));V&&(K=!0,D=y[0].node,U.setStartAt(D,CKEDITOR.POSITION_BEFORE_START),U.setEndAt(D,CKEDITOR.POSITION_AFTER_END));u.dontMoveCaret=K;u.bogusNeededBlocks=Z}V=u.range;var ia;ea=u.bogusNeededBlocks;for(ha=V.createBookmark();P=u.zombies.pop();)P.getParent()&&(Q=V.clone(),Q.moveToElementEditStart(P),
Q.removeEmptyBlocksAtEnd());if(ea)for(;P=ea.pop();)CKEDITOR.env.needsBrFiller?P.appendBogus():P.append(V.document.createText(" "));for(;P=u.mergeCandidates.pop();)P.mergeSiblings();CKEDITOR.env.webkit&&V.startPath()&&(P=V.startPath(),P.block?P.block.$.normalize():P.blockLimit&&P.blockLimit.$.normalize());V.moveToBookmark(ha);if(!u.dontMoveCaret){for(P=e(V);P&&c(P)&&!P.is(n.$empty);){if(P.isBlockBoundary())V.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END);else{if(f(P)&&P.getHtml().match(/(\s|&nbsp;)$/g)){ia=
null;break}ia=V.clone();ia.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END)}P=P.getLast(a)}ia&&V.moveToRange(ia)}}}}();z=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||
(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var g=d.startContainer,e=g.getAscendant("table",1),f=!1;c(e.getElementsByTag("td"));c(e.getElementsByTag("th"));e=d.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=d.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),f=!0);e||(e=g);e.is("table")?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=
b(e,"tr",f)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",f)),(g=e.getBogus())&&g.remove(),d.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();p=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=
b.startContainer,d=!1,g;g=b.clone();g.setStart(c,0);g=a(g).lastBackward();g||(g=b.clone(),g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),d=!0);g||(g=c);g.is(CKEDITOR.dtd.$list)?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),g.remove()):((c=g.getBogus())&&c.remove(),b.moveToPosition(g,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();y={eol:{detect:function(a,b){var c=a.range,d=c.clone(),g=c.clone(),e=new CKEDITOR.dom.elementPath(c.startContainer,
b),f=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);g.collapse();e.block&&d.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(c.setStartAfter(e.block),a.prependEolBr=1);f.block&&g.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(c.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",
{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!t(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(d,b),e=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),f;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(g.blockLimit.is({tr:1,table:1})){var k=g.contains("table").getParent();f=function(a){return!a.equals(k)}}else if(g.block&&
g.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!e.equals(c))){var h=g.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(h)}}f||(f=function(a){return!a.equals(g.block)&&!a.equals(g.blockLimit)});this.rebuildFragment(a,b,d,f)},rebuildFragment:function(a,b,c,d){for(var g;c&&!c.equals(b)&&d(c);)g=c.clone(0,1),a.fragment.appendTo(g),a.fragment=g,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,
d=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};v=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,g){a(d);a(g,1);for(var e;e=g.getNext();)e.insertAfter(d),d=e;x(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),
g=d.startPath(),e=d.endPath(),f=g.contains(CKEDITOR.dtd.$list),k=e.contains(CKEDITOR.dtd.$list);a.mergeList=f&&k&&f.getParent().equals(k.getParent())&&!f.equals(k);a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,
g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(g,c);if(a.mergeList){var k=e.contains(CKEDITOR.dtd.$list),h=f.contains(CKEDITOR.dtd.$list);k.equals(h)||(h.moveChildren(k),h.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),e.equals(f)||b(f,d,g));d.remove();g.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);
c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,c),f=new CKEDITOR.dom.elementPath(g,c),e=e.block,f=f.block;e&&f&&!e.equals(f)&&b(f,d,g);d.remove();g.remove()}}},table:function(){function a(c){var g=[],e,f=new CKEDITOR.dom.walker(c),k=c.startPath().contains(d),h=c.endPath().contains(d),l={};f.guard=function(a,
f){if(a.type==CKEDITOR.NODE_ELEMENT){var m="visited_"+(f?"out":"in");if(a.getCustomData(m))return;CKEDITOR.dom.element.setMarker(l,a,m,1)}if(f&&k&&a.equals(k))e=c.clone(),e.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!f&&h&&a.equals(h))e=c.clone(),e.setStartAt(h,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(m=!f)m=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!k||b(a,k))&&(!h||b(a,h));if(!m&&(m=f))if(a.is(d))var m=k&&k.getAscendant("table",!0),n=h&&h.getAscendant("table",!0),w=a.getAscendant("table",
!0),m=m&&m.contains(w)||n&&n.contains(w);else m=void 0;m&&(e=c.clone(),e.selectNodeContents(a),g.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return g}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(c);return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),g=0;c.evaluator=function(a){a.type==
CKEDITOR.NODE_ELEMENT&&a.is(d)&&++g};c.checkForward();if(1<g){var c=b.startPath().contains("table"),e=b.endPath().contains("table");c&&e&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(e,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(e),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(g,e){var f=c(e,g.bookmark),k=f.clone(),h,l,m=f.getCommonAncestor();m.is(CKEDITOR.dtd.$tableContent)&&!m.is(d)&&(m=m.getAscendant("table",!0));l=m;m=new CKEDITOR.dom.elementPath(f.startContainer,
l);l=new CKEDITOR.dom.elementPath(f.endContainer,l);m=m.contains("table");l=l.contains("table");if(m||l)m&&l&&b(m,l)?(g.tableSurroundingRange=k,k.setStartAt(m,CKEDITOR.POSITION_AFTER_END),k.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),k=f.clone(),k.setEndAt(m,CKEDITOR.POSITION_AFTER_END),h=f.clone(),h.setStartAt(l,CKEDITOR.POSITION_BEFORE_START),h=a(k).concat(a(h))):m?l||(g.tableSurroundingRange=k,k.setStartAt(m,CKEDITOR.POSITION_AFTER_END),f.setEndAt(m,CKEDITOR.POSITION_AFTER_END)):(g.tableSurroundingRange=
k,k.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(l,CKEDITOR.POSITION_AFTER_START)),g.tableContentsRanges=h?h:a(f)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),x(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);
c.deleteContents();a.range.moveToPosition(b,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,b){var c=b.startPath(),d;l(a,c.block,c.blockLimit)&&(d=m(a))&&(d=b.document.createElement(d),d.appendBogus(),b.insertNode(d),b.moveToPosition(d,
CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function e(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,b){if(0===a.length||e(a[0].getEnclosedNode()))return!1;var c,d;if((c=!b&&1===a.length)&&!(c=a[0].collapsed)){var g=a[0];c=g.startContainer.getAscendant({td:1,th:1},!0);var f=g.endContainer.getAscendant({td:1,th:1},!0);d=CKEDITOR.tools.trim;c&&c.equals(f)&&!c.findOne("td, th, tr, tbody, table")?(g=g.cloneContents(),c=g.getFirst()?d(g.getFirst().getText())!==
d(c.getText()):!0):c=!1}if(c)return!1;for(d=0;d<a.length;d++)if(c=a[d]._getTableElement(),!c)return!1;return!0}function f(a){function b(a){a=a.find("td, th");var c=[],d;for(d=0;d<a.count();d++)c.push(a.getItem(d));return c}var c=[],d,g;for(g=0;g<a.length;g++)d=a[g]._getTableElement(),d.is&&d.is({td:1,th:1})?c.push(d):c=c.concat(b(d));return c}function a(a){a=f(a);var b="",c=[],d,g;for(g=0;g<a.length;g++)d&&!d.equals(a[g].getAscendant("tr"))?(b+=c.join("\t")+"\n",d=a[g].getAscendant("tr"),c=[]):0===
g&&(d=a[g].getAscendant("tr")),c.push(a[g].getText());return b+=c.join("\t")}function d(b){var c=this.root.editor,d=c.getSelection(1);this.reset();v=!0;d.root.once("selectionchange",function(a){a.cancel()},null,null,0);d.selectRanges([b[0]]);d=this._.cache;d.ranges=new CKEDITOR.dom.rangeList(b);d.type=CKEDITOR.SELECTION_TEXT;d.selectedElement=b[0]._getTableElement();d.selectedText=a(b);d.nativeSel=null;this.isFake=1;this.rev=z++;c._.fakeSelection=this;v=!1;this.root.fire("selectionchange")}function k(){var a=
this._.fakeSelection,b;if(a){b=this.getSelection(1);var c;if(!(c=!b)&&(c=!b.isHidden())){c=a;var d=b.getRanges(),g=c.getRanges(),f=d.length&&d[0]._getTableElement()&&d[0]._getTableElement().getAscendant("table",!0),k=g.length&&g[0]._getTableElement()&&g[0]._getTableElement().getAscendant("table",!0),l=1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table"),m=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table");if(e(c.getSelectedElement()))c=!1;else{var n=1===
d.length&&d[0].collapsed,g=h(d,!!CKEDITOR.env.webkit)&&h(g);f=f&&k?f.equals(k)||k.contains(f):!1;f&&(n||g)?(l&&!m&&c.selectRanges(d),c=!0):c=!1}c=!c}c&&(a.reset(),a=0)}if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(c=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||c||(this._.previousActive=
this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:a,path:b}))}function l(){B=!0;q||(m.call(this),q=CKEDITOR.tools.setTimeout(m,200,this))}function m(){q=null;B&&(CKEDITOR.tools.setTimeout(k,0,this),B=!1)}function b(a){return A(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function c(a){function c(b,d){return b&&b.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(d?"End":"Start")](b):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;
var d=a.startContainer,g=a.getPreviousNode(b,null,d),e=a.getNextNode(b,null,d);return c(g)||c(e,1)||!(g||e||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function g(a){n(a,!1);var b=a.getDocument().createText(p);a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var d=a.getDocument().getSelection().getNative(),g=d&&"None"!=d.type&&d.getRangeAt(0),e=p.length;if(c.getLength()>e&&g&&g.intersectsNode(c.$)){var f=
[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==c.$&&d.anchorOffset>e&&(f[0].offset-=e);d.focusNode==c.$&&d.focusOffset>e&&(f[1].offset-=e)}}c.setText(w(c.getText(),1));f&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(f[0].node,f[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(f[1].node,f[1].offset))}}function w(a,b){return b?a.replace(y,function(a,b){return b?" ":""}):a.replace(p,"")}function x(a,b){var c=
b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",c=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'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),g=a.createRange(),e=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);g.setStartAt(c,CKEDITOR.POSITION_AFTER_START);
g.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([g]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function t(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var g=a.getSelection(),e=g.getRanges()[0];g.isCollapsed()&&(e=e[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable")&&(g=g.getStartElement(),!g.isBlockBoundary()||""!==(void 0===g.$.textContent?
g.$.innerText:g.$.textContent)||8!==d&&46!==d||(g.remove(),a.fire("saveSnapshot")),a.getSelection().fake(e),c.data.preventDefault(),c.cancel())}}}function r(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,g;d&&!((g=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)g&&"false"==d.getAttribute("contentEditable")&&c.setStartAfter(d),d=d.getParent();d=c.startContainer;
g=c.endContainer;var e=c.startOffset,f=c.endOffset,k=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(e>=d.getLength()?k.setStartAfter(d):k.setStartBefore(d));g&&g.type==CKEDITOR.NODE_TEXT&&(f?k.setEndAfter(g):k.setEndBefore(g));d=new CKEDITOR.dom.walker(k);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var g=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(d),g.collapsed||a.splice(b+1,0,g));return!0}return!1};
d.next()}}return a}var u="function"!=typeof window.getSelection,z=1,p=CKEDITOR.tools.repeat("​",7),y=new RegExp(p+"( )?","g"),v,q,B,A=CKEDITOR.dom.walker.invisible(1),C=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),g;if(!c.readOnly)return(g=d.moveToClosestEditablePosition(b.selected,a))||(g=d.moveToClosestEditablePosition(b.selected,
!a)),g&&c.getSelection().selectRanges([d]),c.fire("saveSnapshot"),b.selected.remove(),g||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d])),c.fire("saveSnapshot"),!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){r=new CKEDITOR.dom.selection(c.getSelection());r.lock()}function b(){f.removeListener("mouseup",
b);w.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==e.$&&c.select()}function d(a){var b,c;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(c=g(b))&&!c.equals(h)&&(b.selectElement(c),a.data.preventDefault()))}function g(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 e=c.document,f=CKEDITOR.document,h=c.editable(),m=e.getBody(),w=e.getDocumentElement(),p=h.isInline(),v,r;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==v&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$&&(a=c.createRange(),a.moveToElementEditStart(h),a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(v&&(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)){v=c._.previousActive&&c._.previousActive.equals(e.getActive());var a=null!=c._.previousScrollTop&&c._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&v&&a&&(h.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(v);v=0},null,null,-1);h.attachListener(h,"mousedown",function(){v=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||p)u?h.attachListener(h,"beforedeactivate",a,null,null,-1):h.attachListener(c,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?
"focusout":"blur",function(){var a=r&&(r.isFake||2>r.getRanges().length);CKEDITOR.env.gecko&&!p&&a||(c.lockSelection(r),v=1)},null,null,-1),h.attachListener(h,"mousedown",function(){v=0});if(CKEDITOR.env.ie&&!p){var q;h.attachListener(h,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(q=c.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&q&&(c.document.$.documentElement.scrollLeft=q.x,c.document.$.documentElement.scrollTop=
q.y);q=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var y,z;w.on("mousedown",function(a){function b(a){a=a.data.$;if(y){var c=m.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}y.setEndPoint(0>z.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);y.select()}}function c(){w.removeListener("mousemove",b);f.removeListener("mouseup",c);w.removeListener("mouseup",c);y.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<w.$.clientHeight&&
a.$.x<w.$.clientWidth){y=m.$.createTextRange();try{y.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}z=y.duplicate();w.on("mousemove",b);f.on("mouseup",c);w.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)w.on("mousedown",function(a){a.data.getTarget().is("html")&&(f.on("mouseup",b),w.on("mouseup",b))})}}h.attachListener(h,"selectionchange",k,c);h.attachListener(h,"keyup",l,c);h.attachListener(h,"touchstart",l,c);h.attachListener(h,"touchend",l,c);CKEDITOR.env.ie&&h.attachListener(h,
"keydown",d,c);if(p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var x;h.attachListener(h,"mousedown",function(){x=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){x&&l.call(c);x=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",l,c);CKEDITOR.env.webkit&&h.attachListener(e,"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:h.hasFocus&&n(h)}},null,null,-1);h.attachListener(h,"keydown",
t(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&
(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var d=C[a.data.keyCode];if(d)return d({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar");c&&(c.getCustomData("ready")?
(n(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?k:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&
"wysiwyg"==this.mode&&"recreating"!==this.status?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();return b&&b.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 b=this._.savedSelection;return b?
(b.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 b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:z++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,g;if(a)if(a.getRangeAt)d=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer);
else{try{g=a.createRange()}catch(e){}d=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))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:g,FILLING_CHAR_SEQUENCE:p});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=u?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:u?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;
try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(g){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&E[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&
(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=u?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var g=d.children,e,f,k=b.duplicate(),h=0,l=g.length-1,m=-1,n,w;h<=l;)if(m=Math.floor((h+l)/2),e=g[m],k.moveToElementText(e),n=k.compareEndPoints("StartToStart",b),0<n)l=m-1;else if(0>n)h=m+1;else return{container:d,offset:a(e)};
if(-1==m||m==g.length-1&&0>n){k.moveToElementText(d);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;g=d.childNodes;if(!k)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:g.length}:{container:e,offset:e.nodeValue.length};for(d=g.length;0<k&&0<d;)f=g[--d],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",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;
if(!k)return{container:d,offset:a(e)+(0<n?0:1)};for(;0<k;)try{f=e[0<n?"previousSibling":"nextSibling"],f.nodeType==CKEDITOR.NODE_TEXT&&(k-=f.nodeValue.length,w=f),e=f}catch(p){return{container:d,offset:a(e)}}return{container:w,offset:0<n?-k:w.nodeValue.length+k}};return function(){var a=this.getNative(),c=a&&a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),
a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],g=0;g<c.length;g++){for(var e=c.item(g),f=e.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<f.childNodes.length&&f.childNodes[k]!=e;k++);a.setStart(new CKEDITOR.dom.node(f),k);a.setEnd(new CKEDITOR.dom.node(f),k+1);d.push(a)}return d}return[]}}():function(){var a=
[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var g=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(g.startContainer),g.startOffset);b.setEnd(new CKEDITOR.dom.node(g.endContainer),g.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=d=new CKEDITOR.dom.rangeList(a.call(this)));return b?r(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;
var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=c.startContainer,c.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==
CKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),c,d,g=2;g&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&E[c.getName()]&&
(d=c));g--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=u?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},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 b=
this.getSelectedElement(),c=this.getRanges(),g=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&h(c)?d.call(this,c):g?this.fake(b):b&&2>c.length?this.selectElement(b):this.selectRanges(c))}},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 b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=z++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,e=b&&b._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,f,k=0;k<a.length;++k)f=
a[k],f.endContainer.equals(e)&&(f.endOffset=Math.min(f.endOffset,e.getChildCount()));if(a.length)if(this.isLocked){var l=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();l&&!l.equals(this.root)&&l.focus()}else{var m;a:{var w,p;if(1==a.length&&!(p=a[0]).collapsed&&(m=p.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(w=p.getEnclosedNode())&&w.type==CKEDITOR.NODE_ELEMENT&&(m=w),"false"==m.getAttribute("contenteditable")))break a;
m=void 0}if(m)this.fake(m);else if(b&&b.plugins.tableselection&&b.plugins.tableselection.isSupportedEnvironment(b)&&h(a)&&!v&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))d.call(this,a);else{if(u){w=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;p={table:1,tbody:1,tr:1};1<a.length&&(b=a[a.length-1],a[0].setEnd(b.endContainer,b.endOffset));b=a[0];a=b.collapsed;var r,q,y;if((e=b.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in E&&(!e.is("a")||
!e.getText()))try{y=e.$.createControlRange();y.addElement(e.$);y.select();return}catch(z){}if(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in p||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in p)b.shrink(CKEDITOR.NODE_ELEMENT,!0),a=b.collapsed;y=b.createBookmark();p=y.startNode;a||(l=y.endNode);y=b.document.$.body.createTextRange();y.moveToElementText(p.$);y.moveStart("character",1);l?(m=b.document.$.body.createTextRange(),m.moveToElementText(l.$),
y.setEndPoint("EndToEnd",m),y.moveEnd("character",-1)):(r=p.getNext(w),q=p.hasAscendant("pre"),r=!(r&&r.getText&&r.getText().match(m))&&(q||!p.hasPrevious()||p.getPrevious().is&&p.getPrevious().is("br")),q=b.document.createElement("span"),q.setHtml("\x26#65279;"),q.insertBefore(p),r&&b.document.createText("﻿").insertBefore(p));b.setStartBefore(p);p.remove();a?(r?(y.moveStart("character",-1),y.select(),b.document.$.selection.clear()):y.select(),b.moveToPosition(q,CKEDITOR.POSITION_BEFORE_START),q.remove()):
(b.setEndBefore(l),l.remove(),y.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(y=0;y<a.length;y++){if(y<a.length-1&&(r=a[y],q=a[y+1],m=r.clone(),m.setStart(r.endContainer,r.endOffset),m.setEnd(q.startContainer,q.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),b=m.getCommonAncestor(),m=m.getEnclosedNode(),b.isReadOnly()||m&&m.isReadOnly()))){q.setStart(r.startContainer,r.startOffset);a.splice(y--,1);continue}b=a[y];q=this.document.$.createRange();b.collapsed&&
c(b)&&(m=g(this.root),b.insertNode(m),(r=m.getNext())&&!m.getPrevious()&&r.type==CKEDITOR.NODE_ELEMENT&&"br"==r.getName()?(n(this.root),b.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START)):b.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));q.setStart(b.startContainer.$,b.startOffset);try{q.setEnd(b.endContainer.$,b.endOffset)}catch(x){if(0<=x.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))b.collapse(1),q.setEnd(b.endContainer.$,b.endOffset);else throw x;}l.addRange(q)}}this.reset();this.root.fire("selectionchange")}}},
fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();x(c,b);var d=this._.cache,g=new CKEDITOR.dom.range(this.root);g.setStartBefore(a);g.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(g);d.selectedElement=d.startElement=a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=z++;c._.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 b=[],c,d=0;d<a.length;d++){var g=new CKEDITOR.dom.range(this.root);
g.moveToBookmark(a[d]);b.push(g)}a.isFake&&(c=h(b)?b[0]._getTableElement():b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(b)?this.fake(c):this.selectRanges(b);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[u?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function e(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var g=a.getAttribute("contentEditable");"false"==g?c=a:"true"==g&&(d=1)}return c}function h(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function f(a){var b=
a.document;if(a.collapsed)b=z(this,b),a.insertNode(b),a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_END);else{var c=this.element,g=this._.definition,k,l=g.ignoreReadonly,m=l||g.includeReadonly;null==m&&(m=a.root.getCustomData("cke_includeReadonly"));var n=CKEDITOR.dtd[c];n||(k=!0,n=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var w=a.createBookmark(),p=w.startNode,v=w.endNode,r=p,q;if(!l){var u=a.getCommonAncestor(),l=e(p,u),u=e(v,u);l&&(r=l.getNextSourceNode(!0));u&&(v=u)}for(r.getPosition(v)==
CKEDITOR.POSITION_FOLLOWING&&(r=0);r;){l=!1;if(r.equals(v))r=null,l=!0;else{var y=r.type==CKEDITOR.NODE_ELEMENT?r.getName():null,u=y&&"false"==r.getAttribute("contentEditable"),x=y&&-1!==CKEDITOR.tools.array.indexOf(CKEDITOR.style.unstylableElements,y),x=y&&(r.getAttribute("data-nostyle")||x);if(y&&r.data("cke-bookmark")||r.type===CKEDITOR.NODE_COMMENT){r=r.getNextSourceNode(!0);continue}if(u&&m&&CKEDITOR.dtd.$block[y])for(var B=r,A=d(B),C=void 0,E=A.length,Q=0,B=E&&new CKEDITOR.dom.range(B.getDocument());Q<
E;++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&&!m?0:h(r,v,g,N):1;if(A)if(C=r.getParent(),A=g,E=c,Q=k,!C||!(C.getDtd()||CKEDITOR.dtd.span)[E]&&!Q||A.parentRule&&!A.parentRule(C))l=!0;else{if(q||y&&CKEDITOR.dtd.$removeEmpty[y]&&(r.getPosition(v)|N)!=N||(q=a.clone(),q.setStartBefore(r)),y=r.type,y==CKEDITOR.NODE_TEXT||u||y==CKEDITOR.NODE_ELEMENT&&!r.getChildCount()){for(var y=r,ja;(l=!y.getNext(L))&&
(ja=y.getParent(),n[ja.getName()])&&h(ja,p,g,I);)y=ja;q.setEndAfter(y)}}else l=!0;r=r.getNextSourceNode(x||u)}if(l&&q&&!q.collapsed){for(var l=z(this,b),u=l.hasAttributes(),x=q.getCommonAncestor(),y={},A={},C={},E={},ga,fa,ia;l&&x;){if(x.getName()==c){for(ga in g.attributes)!E[ga]&&(ia=x.getAttribute(fa))&&(l.getAttribute(ga)==ia?A[ga]=1:E[ga]=1);for(fa in g.styles)!C[fa]&&(ia=x.getStyle(fa))&&(l.getStyle(fa)==ia?y[fa]=1:C[fa]=1)}x=x.getParent()}for(ga in A)l.removeAttribute(ga);for(fa in y)l.removeStyle(fa);
u&&!l.hasAttributes()&&(l=null);l?(q.extractContents().appendTo(l),q.insertNode(l),t.call(this,l),l.mergeSiblings(),CKEDITOR.env.ie||l.$.normalize()):(l=new CKEDITOR.dom.element("span"),q.extractContents().appendTo(l),q.insertNode(l),t.call(this,l),l.remove(!0));q=null}}a.moveToBookmark(w);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function a(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(m.getParent()),g=null,e=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)&&(g=k)}for(f=0;f<c.elements.length;f++){k=c.elements[f];if(k==c.block||k==c.blockLimit)break;n.checkElementRemovable(k,!0)&&(e=k)}e&&m.breakParent(e);g&&d.breakParent(g)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),d=c.startNode,g=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(d.getParent(),a.root),f,k=0,h;k<e.elements.length&&
(h=e.elements[k])&&h!=e.block&&h!=e.blockLimit;k++)if(this.checkElementRemovable(h)){var l;!g&&a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(l=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(f=h,f.match=l?"start":"end"):(h.mergeSiblings(),h.is(this.element)?x.call(this,h):r(h,v(this)[h.getName()]))}if(f){g=d;for(k=0;;k++){h=e.elements[k];if(h.equals(f))break;else if(h.match)continue;else h=h.clone();h.append(g);g=h}g["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var m=c.endNode,
n=this;b();for(e=d;!e.equals(m);)f=e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?x.call(this,e):r(e,v(this)[e.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(d)&&(b(),f=d.getNext())),e=f}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function k(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,
!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&p(a,this)}function l(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var g in b.styles)b.styles.hasOwnProperty(g)&&a.removeStyle(g)}}function m(a){var b=a.createBookmark(!0),d=a.createIterator();d.enforceRealBlocks=!0;this._.enterMode&&(d.enlargeBr=
this._.enterMode!=CKEDITOR.ENTER_BR);for(var g,e=a.document,f;g=d.getNextParagraph();)!g.isReadOnly()&&(d.activeFilter?d.activeFilter.check(this):1)&&(f=z(this,e,g),c(g,f));a.moveToBookmark(b)}function b(a){var b=a.createBookmark(1),d=a.createIterator();d.enforceRealBlocks=!0;d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var g,e;g=d.getNextParagraph();)this.checkElementRemovable(g)&&(g.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))&&g.copyAttributes(e),c(g,e)):x.call(this,g));a.moveToBookmark(b)}function c(a,b){var c=!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),f=!d&&e;if(d&&!e){e=b;(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(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(k.getFirst());e=k.getFirst().remove()}else e.setHtml(f);b=e}else f?b=w(c?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,h;(h=c.getPrevious(D))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(d=n(h.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":c.setHtml(d),h.remove())}else c&&u(b)}function g(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function n(a,b,c){var d="",g="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(g=c);return""});return d+a.replace(b,c)+g}function w(a,b){var c;1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var g=a[d],g=g.replace(/(\r\n|\r)/g,"\n"),g=n(g,/^[ \t]*\n/,
""),g=n(g,/\n$/,""),g=n(g,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),g=g.replace(/\n/g,"\x3cbr\x3e"),g=g.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var e=b.clone();e.setHtml(g);c.append(e)}else b.setHtml(g)}return c||b}function x(a,b){var c=this._.definition,d=c.attributes,c=c.styles,g=v(this)[a.getName()],e=CKEDITOR.tools.isEmpty(d)&&
CKEDITOR.tools.isEmpty(c),f;for(f in d)if("class"!=f&&!this._.definition.fullMatch||a.getAttribute(f)==q(f,d[f]))b&&"data-"==f.slice(0,5)||(e=a.hasAttribute(f),a.removeAttribute(f));for(var k in c)this._.definition.fullMatch&&a.getStyle(k)!=q(k,c[k],!0)||(e=e||!!a.getStyle(k),a.removeStyle(k));r(a,g,C[a.getName()]);e&&(this._.definition.alwaysRemoveElement?u(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?u(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))}function t(a){for(var b=v(this),c=a.getElementsByTag(this.element),d,g=c.count();0<=--g;)d=c.getItem(g),d.isReadOnly()||x.call(this,d,!0);for(var e in b)if(e!=this.element)for(c=a.getElementsByTag(e),g=c.count()-1;0<=g;g--)d=c.getItem(g),d.isReadOnly()||r(d,b[e])}function r(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var g=b[d][0],e;if(e=a.getAttribute(g)){var f=b[d][1];(null===f||f.test&&f.test(e)||"string"==typeof f&&e==f)&&a.removeAttribute(g)}}c||u(a)}function u(a,b){if(!a.hasAttributes()||
b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(D),d=a.getNext(D);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),d=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function z(a,b,c){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);
d=p(d,a);b.getCustomData("doc_processing_style")&&d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function p(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var g in d)a.setAttribute(g,d[g]);c&&a.setAttribute("style",c);a.getDocument().removeCustomData("doc_processing_style");return a}function y(a,b){for(var c in a)a[c]=a[c].replace(H,function(a,c){return b[c]})}function v(a){if(a._.overrides)return a._.overrides;var b=
a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var g=c[d],e,f;"string"==typeof g?e=g.toLowerCase():(e=g.element?g.element.toLowerCase():a.element,f=g.attributes);g=b[e]||(b[e]={});if(f){var g=g.attributes=g.attributes||[],k;for(k in f)g.push([k.toLowerCase(),f[k]])}}}return b}function q(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function B(a,b){function c(a,
b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var d in a)if(!(d in b)||c(b[d],d)!=c(a[d],d)&&"inherit"!=a[d]&&"inherit"!=b[d])return!1;return!0}function A(a,b,c){var d=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var g,e=d.createIterator();g=e.getNextRange();)b.call(this,g,c);a.selectRanges(d)}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*|$)/,H=/#\((.+?)\)/g,L=CKEDITOR.dom.walker.bookmark(0,1),D=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);
var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),y(a.attributes,b),y(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(C[c]?CKEDITOR.STYLE_BLOCK:E[c]?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 b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);A.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return A.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);A.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=
this.type==CKEDITOR.STYLE_INLINE?f:this.type==CKEDITOR.STYLE_BLOCK?m:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.applyToRange(a)},removeFromRange:function(c){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?a:this.type==CKEDITOR.STYLE_BLOCK?b:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.removeFromRange(c)},applyToObject:function(a){p(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=
a.elements,d=0,g;d<c.length;d++)if(g=c[d],this.type!=CKEDITOR.STYLE_INLINE||g!=a.block&&g!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var e=g.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(g,!0,b))return!0}}return!1},checkApplicable:function(a,b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.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,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},g=0,e=c.attributes;if(e)for(var f in e)g++,d[f]=e[f];if(f=CKEDITOR.style.getStyleText(c))d.style||g++,d.style=f;d._length=g;c=c._AC=d}if(c._length){for(var k in c)if("_length"!=k)if(d=a.getAttribute(k)||"","style"==k?B(c[k],d):c[k]==d){if(!b)return!0}else if(b)return!1;
if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=v(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var g=b[c][1];if(null===g)return!0;if("string"==typeof g){if(d==g)return!0}else if(g.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;"bdo"==d&&(d="span");var c=["\x3c",d],g=b.attributes;if(g)for(var e in g)c.push(" ",
e,'\x3d"',g[e],'"');(g=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',g,'"');c.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(F,";"));for(var g in b){var e=b[g],f=(g+":"+e).replace(F,";");"inherit"==e?d+=f:c+=f}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers=
{};CKEDITOR.style.unstylableElements=[];CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var N=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),
CKEDITOR.styleCommand=function(e,h){this.requiredContent=this.allowedContent=this.style=e;CKEDITOR.tools.extend(this,h,!0)},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus();this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,h,f){CKEDITOR.stylesSet.addExternal(e,
h,"");CKEDITOR.stylesSet.load(e,f)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(e,h){var f=this._.styleStateChangeCallbacks;f||(f=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var d=0;d<f.length;d++){var e=f[d],h=e.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;e.fn.call(this,h)}}));f.push({style:e,fn:h})},applyStyle:function(e){e.apply(this)},removeStyle:function(e){e.remove(this)},getStylesSet:function(e){if(this._.stylesDefinitions)e(this._.stylesDefinitions);
else{var h=this,f=h.config.stylesCombo_stylesSet||h.config.stylesSet;if(!1===f)e(null);else if(f instanceof Array)h._.stylesDefinitions=f,e(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(d){h._.stylesDefinitions=d[a];e(h._.stylesDefinitions)})}}}}),function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var e=CKEDITOR.getUrl("vendor/promise.js");if("function"===
typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([e],function(e){CKEDITOR.tools.promise=e});CKEDITOR.scriptLoader.load(e,function(h){if(!h)return CKEDITOR.error("no-vendor-lib",{path:e});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}}(),function(){function e(a,d,e){a.once("selectionCheck",function(a){if(!h){var m=a.data.getRanges()[0];e.equals(m)?a.cancel():d.equals(m)&&(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 d=a.editable();d&&(d.attachListener(d,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),d.attachListener(d,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var a=this.getRanges()[0],d=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,m=f?a.startContainer.getLength():a.startContainer.getChildCount();f=a.startOffset===m||f^l}f&&(f=a.clone(),a.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),h=!1,e(d,a,f),a.select(),h=!0)}}(),function(){function e(a,d){if(f(a))a=Math.round(d*(parseFloat(a)/100));else if("string"===typeof a&&a.match(/^\d+$/gm)||"string"===typeof a&&a.match(/^\d+(?:deg)?$/gm))a=
parseInt(a,10);return a}function h(a,d){f(a)?a=d*(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,d,e){return!isNaN(a)&&a>=d&&a<=e}function d(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,d){this._.initialColorCode=a;this._.defaultValue=d;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(){var a=0===this._.alpha||1===this._.alpha;if(!this._.isValidColor)return this._.defaultValue;this._.type===CKEDITOR.tools.color.TYPE_HSL&&a?a=[this._.hue,this._.saturation,this._.lightness]:(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(){var a;if(!this._.isValidColor)return this._.defaultValue;a=this._.type===CKEDITOR.tools.color.TYPE_HSL?[this._.hue,this._.saturation,this._.lightness]: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,type:0,hue:0,saturation:0,lightness:0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a,d,
e,b){return CKEDITOR.tools.array.map([a,d,e],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-b*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(a,e,f,b){a="#"+d(a)+d(e)+d(f);void 0!==b&&(a+=d(b));return a.toUpperCase()},formatRgbString:function(a,d,e,b,c){d=[d,e,b];void 0!==c&&d.push(c);return a+"("+d.join(",")+")"},formatHslString:function(a,d,e,b,c){return a+"("+d+","+e+"%,"+b+"%"+(void 0!==c?","+c:"")+")"},parseInput:function(a){if("string"!==
typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var d=this._.matchStringToNamedColor(a);d&&(a=d);var d=this._.extractColorChannelsFromHex(a),e=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=d||e||a)?(this._.type=a.type,this._.red=a.red,this._.green=a.green,this._.blue=a.blue,this._.alpha=a.alpha,a.type===CKEDITOR.tools.color.TYPE_HSL&&(this._.hue=a.hue,this._.saturation=a.saturation,this._.lightness=a.lightness)):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||
null},extractColorChannelsFromHex:function(a){-1===a.indexOf("#")&&(a="#"+a);a.match(CKEDITOR.tools.color.hex3CharsRegExp)&&(a=this._.hex3ToHex6(a));a.match(CKEDITOR.tools.color.hex4CharsRegExp)&&(a=this._.hex4ToHex8(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var d=1;a[7]&&a[8]&&(d=parseInt(a[7]+a[8],16),d/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,d=Number(d.toFixed(1)));return{type:CKEDITOR.tools.color.TYPE_RGB,
red:parseInt(a[1]+a[2],16),green:parseInt(a[3]+a[4],16),blue:parseInt(a[5]+a[6],16),alpha:d}},extractColorChannelsFromRgba:function(a){var d=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!d||3>d.length||4<d.length)return null;var f=4===d.length;a=e(d[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);var b=e(d[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),c=e(d[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),g=1;f&&(g=h(d[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));d=
{type:CKEDITOR.tools.color.TYPE_RGB,red:a,green:b,blue:c,alpha:g};return this._.areColorChannelsValid(a,b,c,g)?d:null},extractColorChannelsFromHsla:function(a){var d=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.hslRegExp);if(!d||3>d.length||4<d.length)return null;var f=4===d.length,b=e(d[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),c=h(d[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),g=h(d[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),n=1;a=this._.hslToRgb(b,
c,g);f&&(n=h(d[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));a.push(n);d={type:CKEDITOR.tools.color.TYPE_HSL,red:a[0],green:a[1],blue:a[2],alpha:a[3],hue:b,saturation:Math.round(100*c),lightness:Math.round(100*g)};return this._.areColorChannelsValid(a[0],a[1],a[2],a[3])?d:null},hex3ToHex6:function(a){a=a.split("");return"#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]},hex4ToHex8:function(a){return this._.hex3ToHex6(a.substr(0,4))+CKEDITOR.tools.repeat(a[4],2)},extractColorChannelsByPattern:function(a,d){var e=
a.match(d);if(!e)return null;var b=-1===e[1].indexOf(",")?/\s/:",",b=e[1].split(b),b=CKEDITOR.tools.array.reduce(b,function(a,b){var d=CKEDITOR.tools.trim(b);return 0===d.length?a:a.concat([d])},[]);e[2]&&(e=CKEDITOR.tools.trim(e[2].replace(/[\/,]/,"")),b.push(e));return b},areColorChannelsValid:function(d,e,f,b){return a(d,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(e,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(f,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&a(b,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},
hslToRgb:function(a,d,e){var b=function(b){var g=(b+a/30)%12;b=d*Math.min(e,1-e);g=Math.min(g-3,9-g,1);g=Math.max(-1,g);return Math.round((e-b*g)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[b(0),b(8),b(4)]},rgbToHsl:function(a,d,e){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;d/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var b=e/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,c=Math.max(a,d,b),g=Math.min(a,d,b);e=c-g;var f=0;switch(c){case a:f=(d-b)/e%6;break;case d:f=(b-a)/e+2;break;case b:f=
(a-d)/e+4}a=0===e?0:60*f;d=(c+g)/2;c=0;1!==d&&0!==d&&(c=e/(1-Math.abs(2*d-1)));a=Math.round(a);c=Math.round(100*c);d=Math.round(100*d);return[a,c,d]}},statics:{TYPE_RGB:1,TYPE_HSL:2,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,hex4CharsRegExp:/#([0-9a-f]{4}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/rgba?\(([.,\d\s%]*)(\s*\/\s*[\d.%]+)?\s*\)/i,
hslRegExp:/hsla?\((\s*(?:[.\d]+(?:deg)?)(?:\s*,?\s*[.\d]+%){2})((?:(?:\s*\/\s*)|(?:\s*,\s*))[\d.]+%?)?\s*\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",
cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",
firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",
lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",
mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",
red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",
yellowgreen:"#9ACD32"}}});CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors}(),CKEDITOR.dom.comment=function(e,h){"string"==typeof e&&(e=(h?h.$:document).createComment(e));CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),"use strict",function(){var e={},h={},f;for(f in CKEDITOR.dtd.$blockLimit)f in
CKEDITOR.dtd.$list||(e[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,d){var f=null,l=null,m=[],b=a,c;d=d||a.getDocument().getBody();b||(b=d);do if(b.type==CKEDITOR.NODE_ELEMENT){m.push(b);if(!this.lastElement&&(this.lastElement=b,b.is(CKEDITOR.dtd.$object)||"false"==b.getAttribute("contenteditable")))continue;if(b.equals(d))break;if(!l&&(c=b.getName(),"true"==b.getAttribute("contenteditable")?l=b:!f&&h[c]&&
(f=b),e[c])){if(c=!f&&"div"==c){a:{c=b.getChildren();for(var g=0,n=c.count();g<n;g++){var w=c.getItem(g);if(w.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[w.getName()]){c=!0;break a}}c=!1}c=!c}c?f=b:l=b}}while(b=b.getParent());l||(l=d);this.block=f;this.blockLimit=l;this.root=d;this.elements=m}}(),CKEDITOR.dom.elementPath.prototype={compare:function(e){var h=this.elements;e=e&&e.elements;if(!e||h.length!=e.length)return!1;for(var f=0;f<h.length;f++)if(!h[f].equals(e[f]))return!1;return!0},contains:function(e,
h,f){var a=0,d;"string"==typeof e&&(d=function(a){return a.getName()==e});e instanceof CKEDITOR.dom.element?d=function(a){return a.equals(e)}:CKEDITOR.tools.isArray(e)?d=function(a){return-1<CKEDITOR.tools.indexOf(e,a.getName())}:"function"==typeof e?d=e:"object"==typeof e&&(d=function(a){return a.getName()in e});var k=this.elements,l=k.length;h&&(f?a+=1:--l);f&&(k=Array.prototype.slice.call(k,0),k.reverse());for(;a<l;a++)if(d(k[a]))return k[a];return null},isContextFor:function(e){var h;return e in
CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!h.getDtd()[e]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(e,h){"string"==typeof e&&(e=(h?h.$:document).createTextNode(e));this.$=e},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},
getText:function(){return this.$.nodeValue},setText:function(e){this.$.nodeValue=e},isEmpty:function(e){var h=this.getText();e&&(h=CKEDITOR.tools.trim(h));return!h||h===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(e){var h=this.$.parentNode,f=h.childNodes.length,a=this.getLength(),d=this.getDocument(),k=new CKEDITOR.dom.text(this.$.splitText(e),d);h.childNodes.length==f&&(e>=a?(k=d.createText(""),k.insertAfter(this)):(e=d.createText(""),e.insertAfter(k),e.remove()));return k},substring:function(e,
h){return"number"!=typeof h?this.$.nodeValue.substr(e):this.$.nodeValue.substring(e,h)}}),function(){function e(e,a,d){var h=e.serializable,l=a[d?"endContainer":"startContainer"],m=d?"endOffset":"startOffset",b=h?a.document.getById(e.startNode):e.startNode;e=h?a.document.getById(e.endNode):e.endNode;l.equals(b.getPrevious())?(a.startOffset=a.startOffset-l.getLength()-e.getPrevious().getLength(),l=e.getNext()):l.equals(e.getPrevious())&&(a.startOffset-=l.getLength(),l=e.getNext());l.equals(b.getParent())&&
a[m]++;l.equals(e.getParent())&&a[m]++;a[d?"endContainer":"startContainer"]=l;return a}CKEDITOR.dom.rangeList=function(e){if(e instanceof CKEDITOR.dom.rangeList)return e;e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[];return CKEDITOR.tools.extend(e,h)};var h={createIterator:function(){var e=this,a=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(l){h=void 0===h?0:h+1;var m=e[h];if(m&&1<e.length){if(!h)for(var b=e.length-1;0<=b;b--)d.unshift(e[b].createBookmark(!0));if(l)for(var c=
0;e[h+c+1];){var g=m.document;l=0;b=g.getById(d[c].endNode);for(g=g.getById(d[c+1].startNode);;){b=b.getNextSourceNode(!1);if(g.equals(b))l=1;else if(a(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary())continue;break}if(!l)break;c++}for(m.moveToBookmark(d.shift());c--;)b=e[++h],b.moveToBookmark(d.shift()),m.setEnd(b.endContainer,b.endOffset)}return m}}},createBookmarks:function(f){for(var a=[],d,h=0;h<this.length;h++){a.push(d=this[h].createBookmark(f,!0));for(var l=h+1;l<this.length;l++)this[l]=
e(d,this[l]),this[l]=e(d,this[l],!0)}return a},createBookmarks2:function(e){for(var a=[],d=0;d<this.length;d++)a.push(this[d].createBookmark2(e));return a},moveToBookmarks:function(e){for(var a=0;a<this.length;a++)this[a].moveToBookmark(e[a])}}}(),function(){function e(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(a){var b=CKEDITOR.skin["ua_"+a],d=CKEDITOR.env;if(b)for(var b=b.split(",").sort(function(a,b){return a>b?-1:1}),f=0,
h;f<b.length;f++)if(h=b[f],d.ie&&(h.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==h)&&(h="ie"),d[h]){a+="_"+b[f];break}return CKEDITOR.getUrl(e()+a+".css")}function f(a,b){k[a]||(CKEDITOR.document.appendStyleSheet(h(a)),k[a]=1);b&&b()}function a(a){var b=a.getById(l);b||(b=a.getHead().append("style"),b.setAttribute("id",l),b.setAttribute("type","text/css"));return b}function d(a,b,d){var e,f,h;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),f=0;f<b.length;f++)b[f]=b[f].split("{");for(var k=
0;k<a.length;k++)if(CKEDITOR.env.webkit)for(f=0;f<b.length;f++){h=b[f][1];for(e=0;e<d.length;e++)h=h.replace(d[e][0],d[e][1]);a[k].$.sheet.addRule(b[f][0],h)}else{h=b;for(e=0;e<d.length;e++)h=h.replace(d[e][0],d[e][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var k={};CKEDITOR.skin={path:e,loadPart:function(a,b){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e()+"skin.js"),function(){f(a,b)}):f(a,b)},
getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,b,d,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:d||0,bgsize:e||"16px"})},getIconStyle:function(a,b,d,e,f){var h;a&&(a=a.toLowerCase(),b&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=d||h&&h.path||"";e=e||h&&h.offset;f=f||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{getUiColor:function(){return this.uiColor},setUiColor:function(c){var g=a(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof c&&(e=c(this,"editor"),f=c(this,"panel"));a=[[b,a]];d([g],e,a);d(m,f,a)}).call(this,c)}});var l="cke_ui_color",m=[],b=/\$color/g;CKEDITOR.on("instanceLoaded",function(c){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var g=c.editor;c=function(c){c=(c.data[0]||c.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();
if(!c.getById("cke_ui_color")){var e=a(c);m.push(e);g.on("destroy",function(){m=CKEDITOR.tools.array.filter(m,function(a){return e!==a})});(c=g.getUiColor())&&d([e],CKEDITOR.skin.chameleon(g,"panel"),[[b,c]])}};g.on("panelShow",c);g.on("menuShow",c);g.config.uiColor&&g.setUiColor(g.config.uiColor)}})}(),function(){var e=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);
e.appendTo(CKEDITOR.document.getHead());try{var h=e.getComputedStyle("border-top-color"),f=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=f)}catch(a){CKEDITOR.env.hc=!1}e.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<e.length;h++)CKEDITOR.editor.prototype.constructor.apply(e[h][0],e[h][1]),CKEDITOR.add(e[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 e=function(){return function(e,a){for(var d=e.match(/[^#]./g),h=0;3>h;h++){var l=h,m;m=parseInt(d[h],16);m=("0"+(0>a?0|m*(1+a):0|m+(255-m)*a).toString(16)).slice(-2);d[l]=m}return"#"+d.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 d=e(f.uiColor,.4),d={id:"."+f.id,defaultBorder:e(d,-.2),toolbarElementsBorder:e(d,-.25),defaultBackground:d,lightBackground:e(d,.8),darkBackground:e(d,-.15),ckeButtonOn:e(d,.4),ckeResizer:e(d,-.4),ckeColorauto:e(d,.8),dialogBody:e(d,.7),dialogTab:e(d,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:e(d,-.6),menubuttonHover:e(d,.1),menubuttonIcon:e(d,.5),menubuttonIconHover:e(d,.3)};return h[a].output(d).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var e=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var c=[this._],d=1;d<arguments.length;d++)c.push(arguments[d]);c.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,c);return this._},h={build:function(a,c,d){return new CKEDITOR.ui.dialog.textInput(a,c,d)}},f={build:function(a,c,d){return new CKEDITOR.ui.dialog[c.type](a,c,d)}},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}},d=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,c){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",c)}},!0),k=/^on([A-Z]\w+)/,l=function(a){for(var c in a)(k.test(c)||"title"==c||"type"==c)&&delete a[c];return a},m=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,c,d,f){if(!(4>arguments.length)){var h=e.call(this,c);h.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var k={role:c.role||"presentation"};c.includeLabel&&(k["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,c,d,"div",null,k,function(){var d=[],e=c.required?" cke_required":"";"horizontal"!=c.labelLayout?d.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.required?c.label+'\x3cspan class\x3d"cke_dialog_ui_labeled_required" aria-hidden\x3d"true"\x3e*\x3c/span\x3e':
c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,a,c),"\x3c/div\x3e"):(e={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+
(c.controlStyle?' style\x3d"'+c.controlStyle+'"':"")+"\x3e"+f.call(this,a,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,e,d));return d.join("")})}},textInput:function(a,c,d){if(!(3>arguments.length)){e.call(this,c);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+c.type,id:f,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(h.maxlength=c.maxLength);c.size&&(h.size=c.size);c.inputStyle&&(h.style=c.inputStyle);var k=
this,l=!1;a.on("load",function(){k.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(l=!0)});k.getInputElement().on("keyup",function(c){13==c.data.getKeystroke()&&l&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),l=!1);k.bidi&&m.call(k,c)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");
h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,c,d){if(!(3>arguments.length)){e.call(this,c);var f=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};c.validate&&(this.validate=c.validate);k.rows=c.rows||5;k.cols=c.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(k.style=c.inputStyle);
c.dir&&(k.dir=c.dir);if(f.bidi)a.on("load",function(){f.getInputElement().on("keyup",m)},f);CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],b;for(b in k)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(k[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");
return a.join("")})}},checkbox:function(a,c,d){if(!(3>arguments.length)){var f=e.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,c,d,"span",null,null,function(){var d=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(d);c["default"]&&(h.checked="checked");"undefined"!=
typeof d.inputStyle&&(d.style=d.inputStyle);f.checkbox=new CKEDITOR.ui.dialog.uiElement(a,d,e,"input",null,h);e.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return e.join("")})}},radio:function(a,c,d){if(!(3>arguments.length)){e.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var f=[],h=this;c.role="radiogroup";
c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){for(var d=[],e=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<c.items.length;k++){var m=c.items[k],p=void 0!==m[2]?m[2]:m[0],y=void 0!==m[1]?m[1]:m[0],v=CKEDITOR.tools.getNextId()+"_radio_input",q=v+"_label",v=CKEDITOR.tools.extend({},c,{id:v,title:null,type:null},!0),p=CKEDITOR.tools.extend({},v,{title:p},!0),B={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:y,"aria-labelledby":q},A=[];h._["default"]==
y&&(B.checked="checked");l(v);l(p);"undefined"!=typeof v.inputStyle&&(v.style=v.inputStyle);v.keyboardFocusable=!0;f.push(new CKEDITOR.ui.dialog.uiElement(a,v,A,"input",null,B));A.push(" ");new CKEDITOR.ui.dialog.uiElement(a,p,A,"label",null,{id:q,"for":B.id},m[0]);d.push(A.join(""))}new CKEDITOR.ui.dialog.hbox(a,f,d,e);return e.join("")});this._.children=f}},button:function(a,c,d){if(arguments.length){"function"==typeof c&&(c=c(a.getParentEditor()));e.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);
var f=this;a.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var h=CKEDITOR.tools.extend({},c);delete h.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,a,h,d,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button",
"aria-labelledby":k},'\x3cspan id\x3d"'+k+'" class\x3d"cke_dialog_ui_button"\x3e'+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/span\x3e")}},select:function(a,c,d){if(!(3>arguments.length)){var f=e.call(this,c);c.validate&&(this.validate=c.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,function(){var d=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],g=[],h={id:f.inputId,"class":"cke_dialog_ui_input_select",
"aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"');c.width&&e.push('style\x3d"width:'+c.width+'" ');e.push("\x3e");void 0!==c.size&&(h.size=c.size);void 0!==c.multiple&&(h.multiple=c.multiple);l(d);for(var k=0,m;k<c.items.length&&(m=c.items[k]);k++)g.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 d.inputStyle&&
(d.style=d.inputStyle);f.select=new CKEDITOR.ui.dialog.uiElement(a,d,e,"select",null,h,g.join(""));e.push("\x3c/div\x3e");return e.join("")})}},file:function(a,c,d){if(!(3>arguments.length)){void 0===c["default"]&&(c["default"]="");var f=CKEDITOR.tools.extend(e.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);a.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,c,d,
function(){f.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"',f.frameId,'" title\x3d"',c.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,c,d){var f=this;if(!(3>arguments.length)){e.call(this,
c);c.validate&&(this.validate=c.validate);var h=CKEDITOR.tools.extend({},c),k=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(d){var e=c["for"];d=k?k.call(this,d):!1;!1!==d&&("xhr"!==d&&a.getContentElement(e[0],e[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(c["for"][0],c["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,a,h,d)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,c=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,
d=/\/$/;return function(e,f,h){if(!(3>arguments.length)){var k=[],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,e,f,k,"span",null,null,"");k=k.join("").match(a);l=l.match(c)||["","",""];d.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);h.push([l[1],
" ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,c,d,e,f){var h=f.label;this._={children:c};CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"fieldset",null,null,function(){var a=[];h&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var b=0;b<d.length;b++)a.push(d[b]);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 c=CKEDITOR.document.getById(this._.labelId);1>c.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(c):c.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:d},!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,c){this.on("click",function(){c.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 c=a.getInputElement();c&&c.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var c=a.getInputElement();c&&(c.$.focus(),c.$.select())},0)},accessKeyUp:function(){this.select()},
setValue:function(a){if(this.bidi){var c=a&&a.charAt(0);(c="‪"==c?"ltr":"‫"==c?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(c)}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 c=this.getDirectionMarker();c&&(a=("ltr"==c?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var c=this.getInputElement();a?c.setAttributes({dir:a,"data-cke-dir-marker":a}):
this.getDirectionMarker()&&c.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,c,d){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),
f=this.getInputElement().$;e.$.text=a;e.$.value=void 0===c||null===c?a:c;void 0===d||null===d?CKEDITOR.env.ie?f.add(e.$):f.add(e.$,null):f.add(e.$,d);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,c){this.getInputElement().$.checked=a;!c&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},
this)},this);this.on("change",c);return null}},keyboardFocusable:!0},a,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,c){for(var d=this._.children,e,f=0;f<d.length&&(e=d[f]);f++)e.getElement().$.checked=e.getValue()==a;!c&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,c=0;c<a.length;c++)if(a[c].getElement().$.checked)return a[c].getValue();return null},accessKeyUp:function(){var a=this._.children,c;
for(c=0;c<a.length;c++)if(a[c].getElement().$.checked){a[c].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);a.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",c);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 c=/^on([A-Z]\w+)/,d,e=function(a,
b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(d=f.match(c))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):e(this,this._.dialog,d[1].toLowerCase(),a[f]);return this},reset:function(){function a(){d.$.open();var b="";e.size&&(b=e.size-(CKEDITOR.env.ie?7:0));var p=c.frameId+"_input";d.$.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(e.action),'"\x3e\x3clabel id\x3d"',c.labelId,'" for\x3d"',p,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(e.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',p,'" aria-labelledby\x3d"',c.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<b?b:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',
CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+h+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join(""));d.$.close();for(b=0;b<f.length;b++)f[b].enable()}var c=this._,d=CKEDITOR.document.getById(c.frameId).getFrameDocument(),e=c.definition,f=c.buttons,h=this.formLoadedNumber,k=this.formUnloadNumber,l=c.dialog._.editor.lang.dir,m=c.dialog._.editor.langCode;h||(h=this.formLoadedNumber=
CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),k=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(h);CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,c){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",c)}},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,c,d){for(var e=c.children,f,h=[],k=[],l=0;l<e.length&&(f=e[l]);l++){var m=[];h.push(m);k.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,
f,m))}return new CKEDITOR.ui.dialog[c.type](a,k,h,d,c)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function e(a){a._.tabBarMode=!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function h(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%
a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function a(a,b){for(var c=a.$.getElementsByTagName("input"),d=0,e=c.length;d<e;d++){var g=new CKEDITOR.dom.element(c[d]);"text"==g.getAttribute("type").toLowerCase()&&(b?(g.setAttribute("value",g.getCustomData("fake_value")||
""),g.removeCustomData("fake_value")):(g.setCustomData("fake_value",g.getAttribute("value")),g.setAttribute("value","")))}}function d(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function k(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function l(a){var b=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":""})),c=b.getChild([0,0,0,0,0]),d=c.getChild(0),e=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!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(c.getParent()));d.unselectable();e.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:e,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function m(a,b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&
b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function b(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function c(a,b){this.dialog=a;for(var c=b.contents,d=0,e;e=c[d];d++)c[d]=e&&new g(a,
e);CKEDITOR.tools.extend(this,b)}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function n(a){function b(c){var k=a.getSize(),l=a.parts.dialog.getParent().getClientSize(),m=c.data.$.screenX,n=c.data.$.screenY,p=m-d.x,w=n-d.y;d={x:m,y:n};e.x+=p;e.y+=w;m=e.x+h[3]<f?-h[3]:e.x-h[1]>l.width-k.width-f?l.width-k.width+("rtl"==g.lang.dir?0:h[1]):e.x;k=e.y+h[0]<f?-h[0]:e.y-h[2]>l.height-k.height-f?l.height-k.height+h[2]:e.y;m=Math.floor(m);k=Math.floor(k);a.move(m,k,1);c.data.preventDefault()}
function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,e=null,g=a.getParentEditor(),f=g.config.dialog_magnetDistance,h=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()}d={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);e=a.getPosition();CKEDITOR.env.ie6Compat&&(f=E.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));g.data.preventDefault()},a)}function w(a){function b(c){var n="rtl"==g.lang.dir,p=m.width,w=m.height,v=p+(c.data.$.screenX-l.x)*(n?-1:1)*(a._.moved?1:2),Q=w+(c.data.$.screenY-l.y)*(a._.moved?1:2),q=a._.element.getFirst(),q=n&&parseInt(q.getComputedStyle("right"),
10),u=a.getPosition();u.x=u.x||0;u.y=u.y||0;u.y+Q>k.height&&(Q=k.height-u.y);(n?q:u.x)+v>k.width&&(v=k.width-(n?q:u.x));Q=Math.floor(Q);v=Math.floor(v);if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||e==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(d.minWidth||0,v-f);if(e==CKEDITOR.DIALOG_RESIZE_HEIGHT||e==CKEDITOR.DIALOG_RESIZE_BOTH)w=Math.max(d.minHeight||0,Q-h);a.resize(p,w);a._.moved&&x(a,a._.position.x,a._.position.y);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",
c);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var d=a.definition,e=d.resizable;if(e!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),f,h,k,l,m,n,p=CKEDITOR.tools.addFunction(function(d){function e(a){return a.isVisible()}m=a.getSize();var g=a.parts.contents,p=g.$.getElementsByTagName("iframe").length,w=!(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));h=m.height-a.parts.contents.getFirst(e).getSize("height",w);f=m.width-a.parts.contents.getFirst(e).getSize("width",1);l={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&
(g=E.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";e==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":e==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" 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(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function x(a,b,c){var d=a.parts.dialog.getParent().getClientSize(),e=a.getSize(),g=a._.viewportRatio,f=Math.max(d.width-e.width,0),d=Math.max(d.height-e.height,0);g.width=f?b/f:g.width;g.height=d?c/d:g.height;a._.viewportRatio=g}function t(a){a.data.preventDefault(1)}function r(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,d=b.dialog_backgroundCoverColor||("moono-lisa"==
c?"black":"white"),c=b.dialog_backgroundCoverOpacity,e=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(d,c,e),g=M[b];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: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+
d+";\\'\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( '"+d+"' );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!==c?c:.5),g.on("keydown",t),g.on("keypress",t),g.on("keyup",t),g.appendTo(CKEDITOR.document.getBody()),M[b]=g);a.focusManager.add(g);E=g;CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus()}function u(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");E&&(a.focusManager.remove(E),E.hide())}function z(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=R[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+
e])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function p(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=R[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+e])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function y(a,b,c,d,e){(R[c]||(R[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:e||a.accessKeyUp,keydown:d||
a.accessKeyDown})}function v(a){for(var b in R){for(var c=R[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete R[b]}}function q(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function B(){}var A=CKEDITOR.tools.cssLength,C,E,F=!1,H=!CKEDITOR.env.ie||CKEDITOR.env.edge,L='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(H?"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"'+(H?"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,b){function g(){var a=A._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function m(a){var b=A._.focusList;a=a||0;if(!(1>b.length)){var c=A._.currentFocusIndex;A._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,g=1<A._.pageCount;do{e+=a;if(g&&!A._.tabBarMode&&(e==b.length||-1==e)){A._.tabBarMode=!0;A._.tabs[A._.currentTabId][0].focus();
A._.currentFocusIndex=-1;return}e=(e+b.length)%b.length;if(e==c)break}while(a&&!b[e].isFocusable());b[e].focus();"text"==b[e].type&&b[e].select()}}function p(b){if(A==CKEDITOR.dialog._.currentTop){var c=b.data.getKeystroke(),d="rtl"==a.lang.dir,g=[37,38,39,40];B=x=0;if(9==c||c==CKEDITOR.SHIFT+9)m(c==CKEDITOR.SHIFT+9?-1:1),B=1;else if(c==CKEDITOR.ALT+121&&!A._.tabBarMode&&1<A.getPageCount())e(A),B=1;else if(-1!=CKEDITOR.tools.indexOf(g,c)&&A._.tabBarMode)c=-1!=CKEDITOR.tools.indexOf([d?39:37,38],c)?
h.call(A):f.call(A),A.selectPage(c),A._.tabs[c][0].focus(),B=1;else if(13!=c&&32!=c||!A._.tabBarMode)if(13==c)c=b.data.getTarget(),c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||((c=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(c.click,0,c),B=1),x=1;else if(27==c)(c=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(c.click,0,c):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),x=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex=
-1,m(1),B=1;v(b)}}function v(a){B?a.data.preventDefault(1):x&&a.data.stopPropagation()}var q=CKEDITOR.dialog._.dialogDefinitions[b],u=CKEDITOR.tools.clone(C),y=a.config.dialog_buttonsOrder||"OS",r=a.lang.dir,z={},B,x;("OS"==y&&CKEDITOR.env.mac||"rtl"==y&&"ltr"==r||"ltr"==y&&"rtl"==r)&&u.buttons.reverse();q=CKEDITOR.tools.extend(q(a),u);q=CKEDITOR.tools.clone(q);q=new c(this,q);u=l(a);this._={editor:a,element:u.element,name:b,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"==r?"right":"left"]=0;this.parts.dialog.setStyles(u);CKEDITOR.event.call(this);this.definition=q=CKEDITOR.fire("dialogDefinition",
{name:b,definition:q,dialog:this},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){u=a.config.removeDialogTabs.split(";");for(r=0;r<u.length;r++)if(y=u[r].split(":"),2==y.length){var t=y[0];z[t]||(z[t]=[]);z[t].push(y[1])}a._.removeDialogTabs=z}if(a._.removeDialogTabs&&(z=a._.removeDialogTabs[b]))for(r=0;r<z.length;r++)q.removeContents(z[r]);if(q.onLoad)this.on("load",q.onLoad);if(q.onShow)this.on("show",q.onShow);if(q.onHide)this.on("hide",q.onHide);if(q.onOk)this.on("ok",
function(b){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0);!1===q.onOk.call(this,b)&&(b.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(q.onCancel)this.on("cancel",function(a){!1===q.onCancel.call(this,a)&&(a.data.hide=!1)});var A=this,E=function(a){var b=A._.contents,c=!1,d;for(d in b)for(var e in b[d])if(c=a.call(this,b[d][e]))return};this.on("ok",function(a){E(function(b){if(b.validate){var c=b.validate(this),e="string"==typeof c||!1===c;e&&(a.data.hide=!1,a.stop());
d.call(b,!e,"string"==typeof c?c:void 0);return e}})},this,null,0);this.on("cancel",function(b){E(function(c){if(c.isChanged())return a.config.dialog_noConfirmCancel||confirm(a.lang.common.confirmCancel)||(b.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=m;var H=this._.element;a.focusManager.add(H,1);this.on("show",function(){H.on("keydown",p,this);if(CKEDITOR.env.gecko)H.on("keypress",
v,this)});this.on("hide",function(){H.removeListener("keydown",p);CKEDITOR.env.gecko&&H.removeListener("keypress",v);E(function(a){k.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(){g();var b=1<A._.pageCount;a.config.dialog_startupFocusTab&&b?(A._.tabBarMode=!0,A._.tabs[A._.currentTabId][0].focus(),A._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=b?-1:this._.focusList.length-
1,q.onFocus?(b=q.onFocus.call(this))&&b.focus():m(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);n(this);w(this);(new CKEDITOR.dom.text(q.title,CKEDITOR.document)).appendTo(this.parts.title);for(r=0;r<q.contents.length;r++)(z=q.contents[r])&&this.addPage(z);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
e(this),a.data.preventDefault())},this);r=[];z=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:q.buttons},r).getChild();this.parts.footer.setHtml(r.join(""));for(r=0;r<z.length;r++)this._.buttons[z[r].id]=z[r]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,b){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=b){CKEDITOR.dialog.fire("resize",
{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var c=this.parts.dialog.getParent().getClientSize().width;this._.position.x=c-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:b}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||
0}},move:function(a,b,c){var d=this._.element.getFirst(),e="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&d.setStyle("zoom","100%");var g=this.parts.dialog.getParent().getClientSize(),f=this.getSize(),h=this._.viewportRatio,k=Math.max(g.width-f.width,0),g=Math.max(g.height-f.height,0);this._.position&&this._.position.x==a&&this._.position.y==b?(a=Math.floor(k*h.width),b=Math.floor(g*h.height)):x(this,a,b);this._.position={x:a,y:b};e&&(a=k-a);b={top:(0<b?b:0)+"px"};b[e?"right":"left"]=(0<a?a:0)+"px";
d.setStyles(b);c&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,c=this.definition,d=CKEDITOR.document.getBody(),e=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(d)?a.setStyle("display",H?"flex":"block"):a.appendTo(d);this.resize(this._.contentSize&&this._.contentSize.width||c.width||c.minWidth,this._.contentSize&&this._.contentSize.height||c.height||c.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,r(this._.editor)):CKEDITOR.dialog._.currentTop!==this&&(this._.parentDialog=CKEDITOR.dialog._.currentTop,d=this._.parentDialog.getElement().getFirst(),
d.$.style.zIndex-=Math.floor(e/2),this._.parentDialog.getElement().setStyle("z-index",d.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",z);a.on("keyup",p);this._.hasFocus=!1;for(var g in c.contents)if(c.contents[g]){var a=c.contents[g],e=this._.tabs[a.id],d=a.requiredContent,f=0;if(e){for(var h in this._.contents[a.id]){var k=this._.contents[a.id][h];"hbox"!=k.type&&"vbox"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():
(k.enable(),f++))}!f||d&&!this._.editor.activeFilter.check(d)?e[0].addClass("cke_dialog_tab_disabled"):e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();b(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||!H){var b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),d;this._.moved&&this._.position?(d=this._.position.x,b=this._.position.y):(d=(c.width-b.width)/2,b=(c.height-b.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));d=Math.floor(d);b=Math.floor(b);this.move(d,b)}},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);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(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,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(v(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();this._.parentDialog.getElement().removeStyle("z-index");b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else u(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 c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.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 b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",d=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;"},b),e=this._.contents[a.id]={},g=d.getChild(),f=0;d=g.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||f++,e[d.id]=d,"function"==typeof d.getChild&&g.push.apply(g,d.getChild());f||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height",
"100%");d=CKEDITOR.env;e="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',e,'"',d.gecko&&!d.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",e);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(y(this,this,"CTRL+"+a.accessKey,B,q),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(b){if(this._.currentTabId!=b&&!this._.tabs[b][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:b,currentPage:this._.currentTabId})){for(var c in this._.tabs){var d=this._.tabs[c][0],e=this._.tabs[c][1];c!=b&&(d.removeClass("cke_dialog_tab_selected"),
d.removeAttribute("aria-selected"),e.hide());e.setAttribute("aria-hidden",c!=b)}var g=this._.tabs[b];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=b;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,b)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=
this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(h.call(this)),b.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,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},
setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,
b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new m(this,a,b));else{this._.focusList.splice(b,0,new m(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]=
"8px";this.parts.spinner=CKEDITOR.document.createElement("div",c);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok")&&this.getButton("ok").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok")&&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,b){this._.dialogDefinitions[a]&&"function"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},
isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};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()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=
function(a,b){b=b||{};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()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});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,b,c){for(var d=0,e;e=a[d];d++)if(e.id==b||c&&e[c]&&(e=D(e[c],b,c)))return e;return null},N=function(a,b,c,d,e){if(c){for(var g=0,f;f=a[g];g++){if(f.id==c)return a.splice(g,0,b),b;if(d&&f[d]&&(f=N(f[d],b,c,d,!0)))return f}if(e)return null}a.push(b);return b},
I=function(a,b,c){for(var d=0,e;e=a[d];d++){if(e.id==b)return a.splice(d,1);if(c&&e[c]&&(e=I(e[c],b,c)))return e}return null};c.prototype={getContents:function(a){return D(this.contents,a)},getButton:function(a){return D(this.buttons,a)},addContents:function(a,b){return N(this.contents,a,b)},addButton:function(a,b){return N(this.buttons,a,b)},removeContents:function(a){I(this.contents,a)},removeButton:function(a){I(this.buttons,a)}};g.prototype={get:function(a){return D(this.elements,a,"children")},
add:function(a,b){return N(this.elements,a,b,"children")},remove:function(a){I(this.elements,a,"children")}};var M={},R={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,e,g,f){if(!(4>arguments.length)){var h=(d.call?d(b):d)||"div",k=["\x3c",h," "],l=(e&&e.call?e(b):e)||{},m=(g&&g.call?g(b):g)||{},n=(f&&f.call?f.call(this,a,b):f)||"",p=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed=
!0);m.id=p;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var v=m["class"]&&m["class"].split?m["class"].split(" "):[],p=0;p<v.length;p++)v[p]&&(q[v[p]]=1);v=[];for(p in q)v.push(p);m["class"]=v.join(" ");b.title&&(m.title=b.title);q=(b.style||"").split(";");b.align&&(v=b.align,l["margin-left"]="left"==v?0:"auto",l["margin-right"]="right"==v?0:"auto");for(p in l)q.push(p+":"+l[p]);b.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)k.push(p+'\x3d"'+CKEDITOR.tools.htmlEncode(m[p])+'" ');k.push("\x3e",n,"\x3c/",h,"\x3e");c.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,
b.setValue.call(this,c))}}));"function"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&y(this,a,"CTRL+"+b.accessKey);var w=this;a.on("load",function(){var b=w.getInputElement();if(b){var c=w.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",
function(){a._.tabBarMode=!1;a._.hasFocus=!0;w.fire("focus");c&&this.addClass(c)});b.on("blur",function(){w.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=w.focusIndex}))}},hbox:function(a,b,c,d,e){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=b,f=e&&e.widths||null,h=e&&e.height||null,k,l={role:"presentation"};
e&&e.align&&(l.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"hbox"},d,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<c.length;k++){var b="cke_dialog_ui_hbox_child",d=[];0===k&&(b="cke_dialog_ui_hbox_first");k==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');f?f[k]&&d.push("width:"+A(f[k])):d.push("width:"+Math.floor(100/c.length)+"%");h&&d.push("height:"+A(h));e&&void 0!==e.padding&&
d.push("padding:"+A(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[k].align&&d.push("text-align:"+g[k].align);0<d.length&&a.push('style\x3d"'+d.join("; ")+'" ');a.push("\x3e",c[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,d,e){if(!(3>arguments.length)){this._||(this._={});var g=this._.children=b,f=e&&e.width||null,h=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=
['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');e&&e.expand&&b.push("height:100%;");b.push("width:"+A(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(e&&e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;d<c.length;d++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');f&&k.push("width:"+A(f||"100%"));h?k.push("height:"+
A(h[d])):e&&e.expand&&k.push("height:"+Math.floor(100/c.length)+"%");e&&void 0!==e.padding&&k.push("padding:"+A(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[d].align&&k.push("text-align:"+g[d].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[d],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.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,b){this.getInputElement().setValue(a);!b&&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 b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},e;for(e in a)if(c=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):d(this,this._.dialog,c[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",
b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){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,
b,c){for(var d=b.children,e,g=[],f=[],h=0;h<d.length&&(e=d[h]);h++){var k=[];g.push(k);f.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,k))}return new CKEDITOR.ui.dialog[b.type](a,f,g,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},
canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\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 b=this&&this.getValue?this.getValue():a[0],c,d=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]&&(c=a[g],g++);g<a.length&&"number"==typeof a[g]&&(d=a[g]);var f=d==CKEDITOR.VALIDATE_AND?!0:!1;for(g=0;g<e.length;g++)f=d==CKEDITOR.VALIDATE_AND?f&&e[g](b):f||e[g](b);return f?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,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 d.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,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=
CKEDITOR.dialog._.currentTop;)b.hide();for(var c in M)M[c].remove();M={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,c){var d=null,e=CKEDITOR.dialog._.dialogDefinitions[a];null===CKEDITOR.dialog._.currentTop&&r(this);if("function"==typeof e)e=this._.storedDialogs||(this._.storedDialogs={}),d=e[a]||(e[a]=new CKEDITOR.dialog(this,a)),d.setModel(c),b&&b.call(d,d),d.show();else{if("failed"==e)throw u(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,b,c)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(d)d.once("hide",function(){d.setModel(null)},null,null,999);return d}});CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){F||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),
F=!0);a.on("doubleclick",function(b){b.data.dialog&&a.openDialog(b.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(e){var h=this;e.addCommand("a11yHelp",{exec:function(){var f=e.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(){e.lang.a11yhelp=h.langEntries[f];e.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});e.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");
e.on("ariaEditorHelpLabel",function(f){f.data.label=e.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(e){var h=0,f=function(d,f,b,c){if(c){c=new CKEDITOR.style(c);var g=a[b];g.unshift(c);e.attachStyleStateChange(c,function(a){!e.readOnly&&e.getCommand(b).setState(a)});e.addCommand(b,new CKEDITOR.styleCommand(c,{contentForms:g}));e.ui.addButton&&e.ui.addButton(d,{label:f,command:b,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"]},d=e.config,k=e.lang.basicstyles;f("Bold",k.bold,"bold",d.coreStyles_bold);f("Italic",k.italic,"italic",d.coreStyles_italic);f("Underline",k.underline,"underline",d.coreStyles_underline);
f("Strike",k.strike,"strike",d.coreStyles_strike);f("Subscript",k.subscript,"subscript",d.coreStyles_subscript);f("Superscript",k.superscript,"superscript",d.coreStyles_superscript);e.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike=
{element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var e={exec:function(e){var f=e.getCommand("blockquote").state,a=e.getSelection(),d=a&&a.getRanges()[0];if(d){var k=a.createBookmarks();if(CKEDITOR.env.ie){var l=k[0].startNode,m=k[0].endNode,b;if(l&&"blockquote"==l.getParent().getName())for(b=l;b=b.getNext();)if(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()){l.move(b,!0);break}if(m&&"blockquote"==
m.getParent().getName())for(b=m;b=b.getPrevious();)if(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()){m.move(b);break}}var c=d.createIterator();c.enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR;if(f==CKEDITOR.TRISTATE_OFF){for(l=[];f=c.getNextParagraph();)l.push(f);1>l.length&&(f=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),m=k.shift(),d.insertNode(f),f.append(new CKEDITOR.dom.text("﻿",e.document)),d.moveToBookmark(m),d.selectNodeContents(f),d.collapse(!0),m=d.createBookmark(),
l.push(f),k.unshift(m));b=l[0].getParent();d=[];for(m=0;m<l.length;m++)f=l[m],b=b.getCommonAncestor(f.getParent());for(f={table:1,tbody:1,tr:1,ol:1,ul:1};f[b.getName()];)b=b.getParent();for(m=null;0<l.length;){for(f=l.shift();!f.getParent().equals(b);)f=f.getParent();f.equals(m)||d.push(f);m=f}for(;0<d.length;)if(f=d.shift(),"blockquote"==f.getName()){for(m=new CKEDITOR.dom.documentFragment(e.document);f.getFirst();)m.append(f.getFirst().remove()),l.push(m.getLast());m.replace(f)}else l.push(f);d=
e.document.createElement("blockquote");for(d.insertBefore(l[0]);0<l.length;)f=l.shift(),d.append(f)}else if(f==CKEDITOR.TRISTATE_ON){m=[];for(b={};f=c.getNextParagraph();){for(l=d=null;f.getParent();){if("blockquote"==f.getParent().getName()){d=f.getParent();l=f;break}f=f.getParent()}d&&l&&!l.getCustomData("blockquote_moveout")&&(m.push(l),CKEDITOR.dom.element.setMarker(b,l,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(b);f=[];l=[];for(b={};0<m.length;)c=m.shift(),d=c.getParent(),
c.getPrevious()?c.getNext()?(c.breakParent(c.getParent()),l.push(c.getNext())):c.remove().insertAfter(d):c.remove().insertBefore(d),d.getCustomData("blockquote_processed")||(l.push(d),CKEDITOR.dom.element.setMarker(b,d,"blockquote_processed",!0)),f.push(c);CKEDITOR.dom.element.clearAllMarkers(b);for(m=l.length-1;0<=m;m--){d=l[m];a:{b=d;for(var c=0,g=b.getChildCount(),n=void 0;c<g&&(n=b.getChild(c));c++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){b=!1;break a}b=!0}b&&d.remove()}if(e.config.enterMode==
CKEDITOR.ENTER_BR)for(d=!0;f.length;)if(c=f.shift(),"div"==c.getName()){m=new CKEDITOR.dom.documentFragment(e.document);!d||!c.getPrevious()||c.getPrevious().type==CKEDITOR.NODE_ELEMENT&&c.getPrevious().isBlockBoundary()||m.append(e.document.createElement("br"));for(d=c.getNext()&&!(c.getNext().type==CKEDITOR.NODE_ELEMENT&&c.getNext().isBlockBoundary());c.getFirst();)c.getFirst().remove().appendTo(m);d&&m.append(e.document.createElement("br"));m.replace(c);d=!1}}a.selectBookmarks(k);e.focus()}},refresh:function(e,
f){this.setState(e.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",e),h.ui.addButton&&h.ui.addButton("Blockquote",{label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function e(e,a){CKEDITOR.tools.extend(this,a,{editor:e,
id:"cke-"+CKEDITOR.tools.getUniqueId(),area:e._.notificationArea});a.type||(this.type="info");this.element=this._createElement();e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function h(e){var a=this;this.editor=e;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);e.on("destroy",function(){a._removeListeners();a.element.remove()})}
CKEDITOR.plugins.add("notification",{init:function(e){function a(a){var e=new CKEDITOR.dom.element("div");e.setStyles({position:"fixed","margin-left":"-9999px"});e.setAttributes({"aria-live":"assertive","aria-atomic":"true"});e.setText(a);CKEDITOR.document.getBody().append(e);setTimeout(function(){e.remove()},100)}e._.notificationArea=new h(e);e.showNotification=function(a,h,l){var m,b;"progress"==h?m=l:b=l;a=new CKEDITOR.plugins.notification(e,{message:a,type:h,progress:m,duration:b});a.show();return a};
e.on("key",function(d){if(27==d.data.keyCode){var h=e._.notificationArea.notifications;h.length&&(a(e.lang.notification.closed),h[h.length-1].hide(),d.cancel())}})}});e.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(e){var a=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:e})&&(a=!1);var d=this.element,h=d.findOne(".cke_notification_message"),l=d.findOne(".cke_notification_progress"),
m=e.type;d.removeAttribute("role");e.progress&&"progress"!=this.type&&(m="progress");m&&(d.removeClass(this._getClass()),d.removeAttribute("aria-label"),this.type=m,d.addClass(this._getClass()),d.setAttribute("aria-label",this.type),"progress"!=this.type||l?"progress"!=this.type&&l&&l.remove():(l=this._createProgressElement(),l.insertBefore(h)));void 0!==e.message&&(this.message=e.message,h.setHtml(this.message));void 0!==e.progress&&(this.progress=e.progress,l&&l.setStyle("width",this._getPercentageProgress()));
a&&e.important&&(d.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=e.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var e=this,a,d,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());d=new CKEDITOR.dom.element("p");d.addClass("cke_notification_message");d.setHtml(this.message);a.append(d);d=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(d);d.on("click",function(){e.editor.focus();e.hide()});return a},
_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var e=new CKEDITOR.dom.element("span");e.addClass("cke_notification_progress");e.setStyle("width",this._getPercentageProgress());return e},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var e=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&&(e._hideTimeoutId=setTimeout(function(){e.hide()},a))}};h.prototype={add:function(e){this.notifications.push(e);this.element.append(e.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(e){var a=CKEDITOR.tools.indexOf(this.notifications,e);0>a||(this.notifications.splice(a,
1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,a=e.config,d=new CKEDITOR.dom.element("div");d.addClass("cke_notifications_area");d.setAttribute("id","cke_notifications_area_"+e.name);d.setStyle("z-index",a.baseFloatZIndex-2);return d},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),a=this.editor;e.on("scroll",this._uiBuffer.input);e.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 e=CKEDITOR.document.getWindow(),a=this.editor;e.removeListener("scroll",this._uiBuffer.input);e.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function e(){a.setStyle("left",z(p+h.width-n-w))}var a=this.element,d=
this.editor,h=d.ui.contentsElement.getClientRect(),l=d.ui.contentsElement.getDocumentPosition(),m,b,c=a.getClientRect(),g,n=this._notificationWidth,w=this._notificationMargin;g=CKEDITOR.document.getWindow();var x=g.getScrollPosition(),t=g.getViewPaneSize(),r=CKEDITOR.document.getBody(),u=r.getDocumentPosition(),z=CKEDITOR.tools.cssLength;n&&w||(g=this.element.getChild(0),n=this._notificationWidth=g.getClientRect().width,w=this._notificationMargin=parseInt(g.getComputedStyle("margin-left"),10)+parseInt(g.getComputedStyle("margin-right"),
10));d.toolbar&&(m=d.ui.space(d.config.toolbarLocation),b=m.getClientRect());m&&m.isVisible()&&b.bottom>h.top&&b.bottom<h.bottom-c.height?a.setStyles({position:"fixed",top:z(b.bottom)}):0<h.top?a.setStyles({position:"absolute",top:z(l.y)}):l.y+h.height-c.height>x.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:z(l.y+h.height-c.height)});var p="fixed"==a.getStyle("position")?h.left:"static"!=r.getComputedStyle("position")?l.x-u.x:l.x;h.width<n+w?l.x+n+w>x.x+t.width?e():
a.setStyle("left",z(p)):l.x+n+w>x.x+t.width?a.setStyle("left",z(p)):l.x+h.width/2+n/2+w>x.x+t.width?a.setStyle("left",z(p-l.x+x.x+t.width-n-w)):0>h.left+h.width-n-w?e():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=e}(),function(){var e='\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&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' 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 e=e+(' 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",e);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(e){e.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(d,e){function h(){var a=d.mode;a&&(a=this.modes[a]?void 0!==m[a]?m[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
a=d.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var m=null,b=CKEDITOR.env,c="",g=this.command,n,w,x,t=this._.id;t||(t=CKEDITOR.tools.getNextId(),this._.id=t);this._.editor=d;var r={id:t,button:this,editor:d,focus:function(){CKEDITOR.document.getById(t).focus()},execute:function(){this.button.click(d)},attach:function(a){this.button.attach(a)}},u=CKEDITOR.tools.addFunction(function(a){if(r.onkey)return a=new CKEDITOR.dom.event(a),!1!==r.onkey(r,
a.getKeystroke())}),z=CKEDITOR.tools.addFunction(function(a){var b;r.onfocus&&(b=!1!==r.onfocus(r,new CKEDITOR.dom.event(a)));return b}),p=0;r.clickFn=n=CKEDITOR.tools.addFunction(function(){p&&(d.unlockSelection(1),p=0);r.execute();b.iOS&&d.focus()});this.modes?(m={},d.on("beforeModeUnload",function(){d.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[d.mode]=this._.state)},this),d.on("activeFilterChange",h,this),d.on("mode",h,this),!this.readOnly&&d.on("readOnly",h,this)):g&&(g=d.getCommand(g))&&
(g.on("state",function(){this.setState(g.state)},this),c+=g.state==CKEDITOR.TRISTATE_ON?"on":g.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var y;if(this.directional)d.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),c=b.getFirst();a=a.data;a!=d.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(y,"rtl"==a,this.icon,this.iconOffset))},this);g?(w=d.getCommandKeystroke(g))&&(x=CKEDITOR.tools.keystrokeToString(d.lang.common.keyboard,
w)):c+="off";w=this.name||this.command;var v=null,q=this.icon;y=w;this.icon&&!/\./.test(this.icon)?(y=this.icon,q=null):(this.icon&&(v=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(v=this.iconHiDpi));v?(CKEDITOR.skin.addIcon(v,v),q=null):v=y;c={id:t,name:w,iconName:y,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:c,ariaDisabled:"disabled"==c?"true":"false",title:this.title+(x?" ("+x.display+")":""),ariaShortcutSpace:x?"\x26nbsp;":"",ariaShortcut:x?d.lang.common.keyboardShortcut+
" "+x.aria:"",titleJs:b.gecko&&!b.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:u,focusFn:z,clickFn:n,style:CKEDITOR.skin.getIconStyle(v,"rtl"==d.lang.dir,q,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};a.output(c,e);if(this.onRender)this.onRender();return r},setState:function(a){if(this._.state==a)return!1;this._.state=a;var e=CKEDITOR.document.getById(this._.id);return e?(e.setState(a,"cke_button"),
e.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?e.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?e.setAttribute("aria-pressed",!0):e.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var e=this;this.allowedContent||this.requiredContent||!this.command||(e=a.getCommand(this.command)||e);return this._.feature=e}};CKEDITOR.ui.prototype.addButton=function(a,
e){this.add(a,CKEDITOR.UI_BUTTON,e)}}(),function(){function e(a){function e(){for(var b=f(),c=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),g=0;g<c.length;g++){var k=c[g];if("/"!=k){"string"==typeof k&&(k=c[g]={name:k});var r,u=k.groups;if(u)for(var z=0;z<u.length;z++)r=u[z],(r=b[r])&&m(k,r);(r=b[k.name])&&m(k,r)}}return c}function f(){var b={},c,e,g;for(c in a.ui.items)e=a.ui.items[c],g=e.toolbar||"others",g=g.split(","),e=g[0],g=parseInt(g[1]||-1,10),b[e]||(b[e]=[]),b[e].push({name:c,order:g});
for(e in b)b[e]=b[e].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function m(b,e){if(e.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var g;g=e.shift();)g="string"==typeof g?g:g.name,c&&-1!=CKEDITOR.tools.indexOf(c,g)||(g=a.ui.create(g))&&a.addFeature(g)&&b.items.push(g)}}function b(a){var b=[],c,d,e;for(c=0;c<a.length;++c)d=a[c],e={},"/"==d?b.push(d):CKEDITOR.tools.isArray(d)?(m(e,CKEDITOR.tools.clone(d)),b.push(e)):d.items&&
(m(e,CKEDITOR.tools.clone(d.items)),e.name=d.name,b.push(e));return b}var c=a.config.removeButtons,c=c&&c.split(","),g=a.config.toolbar;"string"==typeof g&&(g=a.config["toolbar_"+g]);return a.toolbar=g?b(g):e()}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,e;e=this.toolbars[a++];)for(var f=0,h;h=e.items[f++];)if(h.focus){h.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(d){var h,l=function(a,b){var c,e="rtl"==d.lang.dir,f=d.config.toolbarGroupCycling,w=e?37:39,e=e?39:37,f=void 0===f||f;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=9==b?(c?c.next:a.toolbar.next)||d.toolbox.toolbars[0]:(c?c.previous:a.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1],c.items.length)for(a=c.items[h?c.items.length-
1:0];a&&!a.focus;)(a=h?a.previous:a.next)||(c=0);a&&a.focus();return!1;case w:c=a;do c=c.next,!c&&f&&(c=a.toolbar.items[0]);while(c&&!c.focus);c?c.focus():l(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():l(a,40==b?w:e),!1;case e:case 38:c=a;do c=c.previous,!c&&f&&(c=a.toolbar.items[a.toolbar.items.length-1]);while(c&&!c.focus);c?c.focus():(h=1,l(a,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return d.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};d.on("uiSpace",function(a){if(a.data.space==
d.config.toolbarLocation){a.removeListener();d.toolbox=new f;var b=CKEDITOR.tools.getNextId(),c=['\x3cspan id\x3d"',b,'" class\x3d"cke_voice_label"\x3e',d.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+d.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',b,'" onmousedown\x3d"return false;"\x3e'],b=!1!==d.config.toolbarStartupExpanded,g,h;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&c.push('\x3cspan class\x3d"cke_toolbox_main"'+
(b?"\x3e":' style\x3d"display:none"\x3e'));for(var k=d.toolbox.toolbars,x=e(d),t=x.length,r=0;r<t;r++){var u,z=0,p,y=x[r],v="/"!==y&&("/"===x[r+1]||r==t-1),q;if(y)if(g&&(c.push("\x3c/span\x3e"),h=g=0),"/"===y)c.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{q=y.items||y;for(var B=0;B<q.length;B++){var A=q[B],C;if(A){var E=function(a){a=a.render(d,c);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(){d.toolbox.focusCommandExecuted||
d.focus()}};if(A.type==CKEDITOR.UI_SEPARATOR)h=g&&A;else{C=!1!==A.canGroup;if(!z){u=CKEDITOR.tools.getNextId();z={id:u,items:[]};p=y.name&&(d.lang.toolbar.toolbarGroups[y.name]||y.name);c.push('\x3cspan id\x3d"',u,'" class\x3d"cke_toolbar'+(v?' cke_toolbar_last"':'"'),p?' aria-labelledby\x3d"'+u+'_label"':"",' role\x3d"toolbar"\x3e');p&&c.push('\x3cspan id\x3d"',u,'_label" class\x3d"cke_voice_label"\x3e',p,"\x3c/span\x3e");c.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var F=k.push(z)-
1;0<F&&(z.previous=k[F-1],z.previous.next=z)}C?g||(c.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),g=1):g&&(c.push("\x3c/span\x3e"),g=0);h&&(E(h),h=0);E(A)}}}g&&(c.push("\x3c/span\x3e"),h=g=0);z&&c.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}d.config.toolbarCanCollapse&&c.push("\x3c/span\x3e");if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var H=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});
d.on("destroy",function(){CKEDITOR.tools.removeFunction(H)});d.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),g=parseInt(d.$.style.height,10),f=e.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");h?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));
b.getFirst().setText(h?"▲":"◀");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}});d.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");c.push('\x3ca title\x3d"'+(b?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'" id\x3d"'+d.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
b||c.push(" cke_toolbox_collapser_min");c.push('" onclick\x3d"CKEDITOR.tools.callFunction('+H+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}c.push("\x3c/span\x3e");a.data.html+=c.join("")}});d.on("destroy",function(){if(this.toolbox){var a,b=0,c,d,e;for(a=this.toolbox.toolbars;b<a.length;b++)for(d=a[b].items,c=0;c<d.length;c++)e=d[c],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});d.on("uiReady",function(){var a=
d.ui.space("toolbox");a&&d.focusManager.add(a,1)});d.addCommand("toolbarFocus",a);d.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");d.ui.add("-",CKEDITOR.UI_SEPARATOR,{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,e,f){var m=h(this.editor),b=0===e,c={name:a};if(f){if(f=CKEDITOR.tools.search(m,function(a){return a.name==
f})){!f.groups&&(f.groups=[]);if(e&&(e=CKEDITOR.tools.indexOf(f.groups,e),0<=e)){f.groups.splice(e+1,0,a);return}b?f.groups.splice(0,0,a):f.groups.push(a);return}e=null}e&&(e=CKEDITOR.tools.indexOf(m,function(a){return a.name==e}));b?m.splice(0,0,a):"number"==typeof e?m.splice(e+1,0,c):m.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function e(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;
b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});return a.fire("paste",b)}function h(a){function b(){var c=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||C.initPasteDataTransfer(b,a),b.data.preventDefault())};c.on("copy",d);c.on("cut",d);c.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}c.on(C.mainPasteEvent,
function(a){"beforepaste"==C.mainPasteEvent&&E||q(a)});"beforepaste"==C.mainPasteEvent&&(c.on("paste",function(a){F||(f(),a.data.preventDefault(),q(a),k("paste"))}),c.on("contextmenu",h,null,null,0),c.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));c.on("beforecut",function(){!E&&l(a)});var e;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){e=setTimeout(B,0)});a.on("destroy",function(){clearTimeout(e)});c.on("keyup",
B)}function c(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var b;var c=this.type;if(CKEDITOR.env.ie)b=k(c);else try{b=a.document.$.execCommand(c,!1,null)}catch(d){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function d(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function c(b,f){f="undefined"!==typeof f?f:!0;b?(b.method="paste",b.dataTransfer||
(b.dataTransfer=C.initPasteDataTransfer()),e(a,b,f)):g&&!a._.forcePasteDialog&&a.showNotification(k,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var d=this,g="undefined"!==typeof b.notification?b.notification:!0,f=b.type,h=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),k="string"===typeof g?g:a.lang.clipboard.pasteNotification.replace(/%1/,
'\x3ckbd aria-label\x3d"'+h.aria+'"\x3e'+h.display+"\x3c/kbd\x3e"),h="string"===typeof b?b:b.dataValue;f&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=f:delete a._.nextPasteType;"string"===typeof h?c({dataValue:h}):a.getClipboardData(c)}}}function f(){F=1;setTimeout(function(){F=0},100)}function h(){E=1;setTimeout(function(){E=0},10)}function k(b){var c=a.document,d=c.getBody(),e=!1,f=function(){e=!0};d.on(b,f);7<CKEDITOR.env.version?c.$.execCommand(b):
c.$.selection.createRange().execCommand(b);d.removeListener(b,f);return e}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,d,e;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())&&(d=b.getRanges()[0],e=a.document.createText(""),e.insertBefore(c),d.setStartBefore(e),d.setEndAfter(c),b.selectRanges([d]),setTimeout(function(){c.getParent()&&(e.remove(),b.selectElement(c))},0))}}function m(b,c){var d=a.document,e=a.editable(),f=function(a){a.cancel()},h;
if(!d.getById("cke_pastebin")){var k=a.getSelection(),l=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var p=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",d);p.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var n=0,d=d.getWindow();CKEDITOR.env.webkit?(e.append(p),p.addClass("cke_editable"),e.is("body")||(n="static"!=e.getComputedStyle("position")?e:CKEDITOR.dom.element.get(e.$.offsetParent),n=n.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?
"body":"html",1).append(p);p.setStyles({position:"absolute",top:d.getScrollPosition().y-n+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&p.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(n=p.getParent().isReadOnly())?(p.setOpacity(0),p.setAttribute("contenteditable",!0)):p.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||
CKEDITOR.env.gecko)h=e.once("blur",f,null,null,-100);n&&p.focus();n=new CKEDITOR.dom.range(p);n.selectNodeContents(p);var q=n.select();CKEDITOR.env.ie&&(h=e.once("blur",function(){a.lockSelection(q)}));var v=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=v);h&&h.removeListener();CKEDITOR.env.ie&&e.focus();k.selectBookmarks(l);p.remove();var b;CKEDITOR.env.webkit&&(b=p.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&
(p=b);a.removeListener("selectionChange",f);c(p.getHtml())},0)}}function y(){if("paste"==C.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();f();var b=a.focusManager;b.lock();if(a.editable().fire(C.mainPasteEvent)&&!k("paste"))return b.unlock(),!1;b.unlock();return!0}function v(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();f();"paste"==C.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+
46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function q(b){var c={type:"auto",method:"paste",dataTransfer:C.initPasteDataTransfer(b)};c.dataTransfer.cacheData();var d=!1!==a.fire("beforePaste",c);d&&C.canClipboardApiBeTrusted(c.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){e(a,c)},0)):m(b,function(b){c.dataValue=b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&e(a,c)})}function B(){if("wysiwyg"==a.mode){var b=A("paste");a.getCommand("cut").setState(A("cut"));
a.getCommand("copy").setState(A("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function A(b){var c=a.getSelection(),c=c&&c.getRanges()[0];if((a.readOnly||c&&c.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,E=0,F=0;(function(){a.on("key",
v);a.on("contentDom",b);a.on("selectionChange",B);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:A("cut"),copy:A("copy"),paste:A("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=
CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,d,e,f,h){var k=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:k,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:k,command:d,group:"clipboard",order:h})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",d(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=
function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();c({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,h="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();f=!0;h=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",e),a.on("dialogHide",function(a){a.removeListener();
a.data.removeListener("pasteDialogCommit",e);a.data._.committed||c(null)})):c(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,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,
function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return l(a,b)}function d(a){function b(){var a={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=
c&&(a[c]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function k(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}
function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function m(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function b(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,d,f){d.select();e(a,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot");
f.sourceEditor.editable().extractHtmlFromRange(b);f.sourceEditor.getSelection().selectRanges([b]);f.sourceEditor.fire("saveSnapshot")}function d(c,f){c.select();e(a,{dataTransfer:f,method:"drop"},1);b.resetDragDataTransfer()}function f(b,c,d){var e={$:b.data.$,target:b.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===a.fire(b.name,e)&&b.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a),
m=a.ui.space("top"),y=a.ui.space("bottom");b.preventDefaultDropOnElement(m);b.preventDefaultDropOnElement(y);k.attachListener(l,"dragstart",f);k.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);k.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);k.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=c?h(c.startContainer):null,b.dragEndContainerChildCount=
c?h(c.endContainer):null)},null,null,100);k.attachListener(l,"dragend",f);k.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);k.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);k.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});
k.attachListener(l,"drop",function(c){if(!c.data.$.defaultPrevented&&(c.data.preventDefault(),!a.readOnly)){var d=c.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=b.getRangeAtDropPosition(c,a),e=b.dragRange;d&&f(c,e,d)}}},null,null,9999);k.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);k.attachListener(a,"drop",function(e){if(e=e.data){var f=e.dropRange,h=e.dragRange,k=e.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){b.internalDrop(h,
f,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(h,f,k):d(f,k)}},null,null,9999)})}var c;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(c){function e(a){a=CKEDITOR.tools.array.map(a,function(a){return a.split("/")[1].toUpperCase()}).join(", ");return c.lang.clipboard.fileFormatNotSupportedNotification.replace(/\${formats\}/g,a)}function l(a,b){return CKEDITOR.env.ie&&a.data.fileTransferCancel||!(CKEDITOR.env.ie||b&&z!==b.id)?!1:b.isFileTransfer()&&
1===b.getFilesCount()}var m,t=d(c);c.config.forcePasteAsPlainText?m="plain-text":c.config.pasteFilter?m=c.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in c.config||(m="semantic-content");c.pasteFilter=t.get(m);h(c);b(c);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if((CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||CKEDITOR.plugins.clipboard.isFileApiSupported)&&c.config.clipboard_handleImages){var r=["image/png","image/jpeg","image/gif"],u=e(r),z;c.on("paste",
function(a){var b=a.data,d=b.dataTransfer;if(!b.dataValue&&l(a,d))if(d=d.getFile(0),-1===CKEDITOR.tools.indexOf(r,d.type))c.showNotification(u,"info",c.config.clipboard_notificationDuration);else{var e=new FileReader;e.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';c.fire("paste",a.data)},!1);e.addEventListener("abort",function(){CKEDITOR.env.ie&&(a.data.fileTransferCancel=!0);c.fire("paste",a.data)},!1);e.addEventListener("error",function(){CKEDITOR.env.ie&&
(a.data.fileTransferCancel=!0);c.fire("paste",a.data)},!1);e.readAsDataURL(d);z=b.dataTransfer.id;a.stop()}},null,null,1)}c.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var b=a.data.dataTransfer,d=b.getData("text/html");if(d)a.data.dataValue=d,a.data.type="html";else if(d=b.getData("text/plain"))a.data.dataValue=c.editable().transformPlainTextToHtml(d),a.data.type="text"}},null,null,1);c.on("paste",function(a){var b=
a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,
"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(d=g.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)g=e=d;e&&(b=e.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in
c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);c.on("paste",function(b){b=b.data;var d=c._.nextPasteType||b.type,e=b.dataValue,h,l=c.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(c)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===c.config.forcePasteAsPlainText;h="html"==d||"html"==b.preSniffing?"html":f(e);delete c._.nextPasteType;"htmlifiedtext"==h&&(e=a(c.config,e));if("text"==d&&"html"==h)e=
k(c,e,t.get("plain-text"));else if(m&&c.pasteFilter&&!b.dontFilter||n)e=k(c,e,c.pasteFilter);b.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);b.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==l?"html":"text");b.type=d;b.dataValue=e;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);c.on("paste",function(a){a=a.data;a.dataValue&&(c.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){c.fire("afterPaste")},0))},null,null,
1E3);c.on("pasteDialog",function(a){setTimeout(function(){c.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,b,c){a.ui.addButton&&(a.ui.addButton(b,
c),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=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 b=a.editable();return CKEDITOR.env.ie&&
9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function e(a,c,d){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof d&&"number"==
typeof c&&f.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,f,c)||e(a.endContainer,f,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(a,b,c,d){var f=CKEDITOR.plugins.clipboard,h=d.editable(),k,l;d.fire("saveSnapshot");d.fire("lockSnapshot",{dontUpdate:1});
CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,b))||(k=a.createBookmark(!1));f=b.clone().createBookmark(!1);l&&(k=a.createBookmark(!1));a=k.startNode;b=k.endNode;l=f.startNode;b&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=d.createRange();a.moveToBookmark(k);h.extractHtmlFromRange(a,1);b=d.createRange();
f.startNode.getCommonAncestor(h)||(f=d.getSelection().createBookmarks()[0]);b.moveToBookmark(f);e(d,{dataTransfer:c,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,e=c.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,e))c=b.document.$.caretRangeFromPoint(d,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),
h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&f&&b.editable().hasFocus)return f;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var k=!1,l=0;20>l&&!k;l++){if(!k)try{c.moveToPoint(d,e-l),k=!0}catch(m){}if(!k)try{c.moveToPoint(d,e+l),k=!0}catch(v){}}if(k){var q="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+q+'"\x3e​\x3c/span\x3e');
var B=b.document.getById(q);h.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START);B.remove()}else{var A=b.document.$.elementFromPoint(d,e),C=new CKEDITOR.dom.element(A),E;if(C.equals(b.editable())||"html"==C.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;E=C.getClientRect();d<E.left?h.setStartAt(C,CKEDITOR.POSITION_AFTER_START):h.setStartAt(C,CKEDITOR.POSITION_BEFORE_END);h.collapse(!0)}}catch(F){return null}}else return null}return h},initDragDataTransfer:function(a,
b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);"dragstart"===a.name&&d.storeId();c?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,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var c=a.data.$.clipboardData,d=new this.dataTransfer(c,b);"copy"!==a.name&&"cut"!==a.name||d.storeId();this.copyCutData&&
d.id==this.copyCutData.id?(d=this.copyCutData,d.$=c):this.copyCutData=d;return d}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",m)}};c=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g,
types:[],data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":"files"===a?"Files":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(c);this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==c||this.getData("text/plain")||this.setData("text/plain",b.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,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&
this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var e=c.indexOf("\x3c/html\x3e"),c=-1!==e?c.substring(0,e+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==c&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,
b)}catch(d){}},storeId:function(){"Text"!==c&&this.setData(c,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(c){c=b._.normalizeType(c);var d=b.getData(c);"text/html"==c&&(b._.nativeHtmlCache=b.getData(c,!0),d=b._stripHtml(d));d&&(b._.data[c]=d);b._.types.push(c)}if(this.$){var b=this,c,d,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=
0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");d=this._getImageFromClipboard();if((e=this.$&&this.$.files||null)||d){this._.files=[];if(e&&e.length)for(c=0;c<e.length;c++)this._.files.push(e[c]);0===this._.files.length&&d&&this._.files.push(d)}}},getFilesCount:function(){if(this._.files.length)return this._.files.length;var a=this.$&&this.$.files||null;return a&&a.length?a.length:this._getImageFromClipboard()?1:0},getFile:function(a){if(this._.files.length)return this._.files[a];
var b=this.$&&this.$.files||null;return b&&b.length?b[a]:0===a?this._getImageFromClipboard():void 0},isFileTransfer:function(){var a=this.getTypes(),a=CKEDITOR.tools.array.filter(a,function(a){return"application/x-moz-file"!==a});return 1===a.length&&"files"===a[0].toLowerCase()},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var d=
0;d<this.$.types.length;d++)a[this.$.types[d]]=1}else a.Text=1,a.URL=1;"Text"!=c&&(a[c]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},getTypes:function(){return 0<this._.types.length?this._.types: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(b){}},_stripHtml:function(a){function b(a){var c=new CKEDITOR.htmlParser,d,e;c.onTagOpen=function(a){"body"===
a&&(d=c._.htmlPartsRegex.lastIndex)};c.onTagClose=function(a){"body"===a&&(e=c._.htmlPartsRegex.lastIndex)};c.parse(a);return"number"!==typeof d||"number"!==typeof e?a:a.substring(d,e).replace(/<\/body\s*>$/gi,"")}a&&a.length&&(a=b(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,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1;
return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,e=this._dataTransfer.$;try{e.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(f){if(this._isUnsupportedMimeTypeError(f)){c=
CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=d;try{d=this._applyDataComment(c,h),e.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(k){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[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,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&
-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16<a.length){var c;(c=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&c[1]&&(b.data=JSON.parse(decodeURIComponent(c[1])),b.content=a.replace(c[0],""))}return b},_applyDataComment:function(a,b){var c="";b&&CKEDITOR.tools.object.keys(b).length&&(c="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return c+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=
1E4,CKEDITOR.config.clipboard_handleImages=!0,function(){var e=!1;CKEDITOR.plugins.add("codemirror",{_createCodeMirrorEditor:function(e){var a=this;e.addMode("source",function(d){var k=this,l=e.ui.space("contents")||e.ui.contentsElement,m=l.getDocument().createElement("textarea");l.append(m);k.codeMirrorEditor=CodeMirror.fromTextArea(m.$,{lineNumbers:!0,lineWrapping:!0,mode:"text/html"});l=e.getData(1);m=e.editable(new h(e,m));m.setData(l);k.codeMirrorEditor.setValue(l);k.codeMirrorEditor.getWrapperElement().classList.add("cke_enable_context_menu");
m=m.getParent().getClientSize();m.height&&k.codeMirrorEditor.setSize(null,m.height);k.codeMirrorEditor.on("change",a._handleCodeMirrorChange.bind(k,e,l));e.on("resize",a._handleEditorResize.bind(k));e.on("dataReady",function(a){a=a.data;var c=k.codeMirrorEditor.getValue();a&&a!==c&&k.codeMirrorEditor.setValue(a)});e.fire("ariaWidget",this);d()})},_handleCodeMirrorChange:function(e,a){var d=this.codeMirrorEditor.getValue();d!==a&&e.setData(d)},_handleEditorResize:function(e){this.codeMirrorEditor.setSize(null,
e.data.contentsHeight)},hidpi:!0,icons:"source,source-rtl",init:function(f){var a=this;if(!f.plugins.detectConflict("codemirror",["sourcearea"])){e||(CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css"),CKEDITOR.document.appendStyleSheet(this.path+"vendors/vendors.css"),e=!0);CKEDITOR.scriptLoader.load(this.path+"vendors/vendors.js",function(){a._createCodeMirrorEditor(f)});f.addCommand("codemirror",CKEDITOR.plugins.codemirror.commands.source);var d={state:CKEDITOR.TRISTATE_OFF};f.balloonToolbars||
(d.modes={source:1,wysiwyg:0});f.addCommand("codemirrordialog",CKEDITOR.tools.extend(new CKEDITOR.dialogCommand("codemirrordialog"),d));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(e){this.setValue(e);this.status="ready";this.editor.fire("dataReady",e)},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"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(e){"wysiwyg"===e.mode&&e.fire("saveSnapshot");e.getCommand("codemirror").setState(CKEDITOR.TRISTATE_DISABLED);e.setMode("source"===e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function e(e){var f=this._;f.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(e),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=e;this._={panelDefinition:f}},statics:{handler:{create:function(e){return new CKEDITOR.ui.panelButton(e)}}},proto:{createPanel:function(e){var f=this._;if(!f.panel){var a=this._.panelDefinition,d=this._.panelDefinition.block,
k=a.parent||CKEDITOR.document.getBody(),l=this._.panel=new CKEDITOR.ui.floatPanel(e,k,a),a=l.addBlock(f.id,d),m=this,b=e.getCommand(this.command);l.onShow=function(){m.className&&this.element.addClass(m.className+"_panel");m.setState(CKEDITOR.TRISTATE_ON);f.on=1;m.editorFocus&&e.focus();if(m.onOpen)m.onOpen()};l.onHide=function(a){m.className&&this.element.getFirst().removeClass(m.className+"_panel");!m.modes&&b?m.setStateFromCommand(b):m.setState(m.modes&&m.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);
f.on=0;if(!a&&m.onClose)m.onClose()};l.onEscape=function(){l.hide(1);m.document.getById(f.id).focus()};if(this.onBlock)this.onBlock(l,a);a.onHide=function(){f.on=0;!m.modes&&m.command?m.setStateFromCommand(b):m.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(e){this.setState(e.state)}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,
CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,d){d&&CKEDITOR.tools.extend(this,d);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 e=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,
d){var k={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"),b=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&b.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});b=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("+b+");"},k)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),d=this.document.getById(this.id).getAttribute("dir");if("input"!==a.data.getTarget().getName()||37!==b&&39!==b)this._.onKeyDown&&!1===this._.onKeyDown(b)?"input"===a.data.getTarget().getName()&&32===b||a.data.preventDefault():(27==b||b==("rtl"==d?39:37))&&
this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(b)}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();")+"}())":"";k.frame=h.output({id:this.id+"_frame",src:l})}l=e.output(k);d&&
d.push(l);return l},addBlock:function(a,d){d=this._.blocks[a]=d instanceof CKEDITOR.ui.panel.block?d:new CKEDITOR.ui.panel.block(this.getHolderElement(),d);this._.currentBlock||this.showBlock(a);return d},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var d=this._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");d&&d.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",e);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,d){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));d&&CKEDITOR.tools.extend(this,d);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 d=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},e=this._.getItems(),f,h,b=e.count()-1;0<=b;b--)if(f=e.getItem(b),f.getAscendant(d)||(h=f,this._.focusIndex=
b),"true"==f.getAttribute("aria-selected")){h=f;this._.focusIndex=b;break}h&&(a&&a(),CKEDITOR.env.webkit&&h.getDocument().getWindow().focus(),h.focus(),this.onMark&&this.onMark(h))},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,d){var e=this.keys[a];switch(e){case "next":for(var f=this._.focusIndex,e=this._.getItems(),
h;h=e.getItem(++f);)if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=f;h.focus(!0);break}return h||d?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":f=this._.focusIndex;for(e=this._.getItems();0<f&&(h=e.getItem(--f));){if(h.getAttribute("_cke_focus")&&h.$.offsetWidth){this._.focusIndex=f;h.focus(!0);break}h=null}return h||d?!1:(this._.focusIndex=e.count(),this.onKeyDown(a,1));case "click":case "mouseup":return f=this._.focusIndex,(h=0<=f&&this._.getItems().getItem(f))&&
h.fireEventHandler(e,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function e(e,a,d,k,l){l=CKEDITOR.tools.genKey(a.getUniqueId(),d.getUniqueId(),e.lang.dir,e.uiColor||"",k.css||"",l||"");var m=h[l];m||(m=h[l]=new CKEDITOR.ui.panel(a,k),m.element=d.append(CKEDITOR.dom.element.createFromHtml(m.render(e),a)),m.element.setStyles({display:"none",position:"absolute"}));return m}var h={};CKEDITOR.ui.floatPanel=
CKEDITOR.tools.createClass({$:function(f,a,d,h){function l(){g.hide()}d.forceIFrame=1;d.toolbarRelated&&f.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a=CKEDITOR.document.getById("cke_"+f.name));var m=a.getDocument();h=e(f,m,a,d,h||0);var b=h.element,c=b.getFirst(),g=this;b.disableContextMenu();this.element=b;this._={editor:f,panel:h,parentElement:a,definition:d,document:m,iframe:c,children:[],dir:f.lang.dir,showBlockParams:null,markFirst:void 0!==d.markFirst?d.markFirst:!0};f.on("mode",l);f.on("resize",
l);m.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(e,a){return this._.panel.addBlock(e,a)},addListBlock:function(e,a){return this._.panel.addListBlock(e,a)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(e,a,d,h,l,m){var b=this._.panel,c=b.showBlock(e);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var g=this._.editor.editable();this._.returnFocus=g.hasFocus?g:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);
this._.hideTimeout=0;var n=this.element,g=this._.iframe,g=CKEDITOR.env.ie&&!CKEDITOR.env.edge?g:new CKEDITOR.dom.window(g.$.contentWindow),w=n.getDocument(),x=this._.parentElement.getPositionedAncestor(),t=a.getDocumentPosition(w),w=x?x.getDocumentPosition(w):{x:0,y:0},r="rtl"==this._.dir,u=t.x+(h||0)-w.x,z=t.y+(l||0)-w.y;!r||1!=d&&4!=d?r||2!=d&&3!=d||(u+=a.$.offsetWidth-1):u+=a.$.offsetWidth;if(3==d||4==d)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(g);this._.blurSet||(CKEDITOR.event.useCapture=!0,g.on("blur",function(a){function b(){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(b,0,this)):b.call(this))},this),g.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},
this),CKEDITOR.env.iOS&&(g.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),g.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);b.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(c.autoSize){var d=c.element.getDocument(),d=(CKEDITOR.env.webkit||CKEDITOR.env.edge?
c.element:d.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",d+10+"px");d=c.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",d+"px");b._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");r&&(u-=n.$.offsetWidth);n.setStyle("left",u+"px");var d=b.element.getWindow(),a=n.$.getBoundingClientRect(),
d=d.getViewPaneSize(),e=a.width||a.right-a.left,g=a.height||a.bottom-a.top,f=r?a.right:d.width-a.left,h=r?d.width-a.right:a.left;r?f<e&&(u=h>e?u+e:d.width>e?u-a.left:u-a.right+d.width):f<e&&(u=h>e?u-e:d.width>e?u-a.right+d.width:u-a.left);e=a.top;d.height-a.top<g&&(z=e>g?z-g:d.height>g?z-a.bottom+d.height:z-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((d=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==d.getName()&&(d=d.getDocument().getBody()),d&&"rtl"==d.getComputedStyle("direction")&&
(u=CKEDITOR.env.ie8Compat?u-2*n.getDocument().getDocumentElement().$.scrollLeft:u-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),k;(k=a.getCustomData("activePanel"))&&k.onHide&&k.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:z+"px",left:u+"px"});n.setOpacity(1);m&&m()},this);b.isLoaded?a():b.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();c.element.focus();CKEDITOR.env.webkit&&
(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed()},0):c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),
this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=e)},hide:function(e){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(e=e&&this._.returnFocus)CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(e){var a=this._.panel;void 0!==e&&(a.allowBlur=e);return a.allowBlur},showAsChild:function(e,a,d,h,l,m){if(this._.activeChild!=e||e._.panel._.offsetParentId!=d.getId())this.hideChild(),e.onHide=
CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(a,d,h,l,m),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(e){var a=this._.activeChild;a&&(delete a.onHide,delete this._.activeChild,a.hide(),e&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var e=CKEDITOR.tools.isEmpty(CKEDITOR.instances),
a;for(a in h){var d=h[a];e?d.destroy():d.element.hide()}e&&(h={})})}(),function(){var e,h,f;CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function d(d){function g(){var b=a.config["colorButton_"+u+"Style"];b.childRule="back"==u?function(a){return l(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||l(a)};return b}function n(b,c,d){var e={};b&&(e.color=b);c&&(e.colorName=c);c=!CKEDITOR.tools.isEmpty(e)&&new CKEDITOR.style(g(),e);a.execCommand(y,
{newStyle:c});if(b&&d)for(d.addColor(b.substr(1).toUpperCase()),b=F.element.find("[role\x3doption]").toArray(),d=0;d<b.length;d++)b[d].setAttributes({"aria-posinset":d+1,"aria-setsize":b.length})}var r=d.name,u=d.type,z=d.title,p=d.order,y=d.commandName;d=d.contentTransformations||{};var v=new CKEDITOR.style(b["colorButton_"+u+"Style"]),q=CKEDITOR.tools.getNextId()+"_colorBox",B={type:u},A=new CKEDITOR.style(b["colorButton_"+u+"Style"],{color:"inherit"}),C=function(){return CKEDITOR.tools.addFunction(function(b,
c,d){a.focus();a.fire("saveSnapshot");"?"==b?a.getColorFromDialog(function(a){a&&n(a,c,E)},null,B):n(b&&"#"+b,c,E);d&&(d.setAttribute("cke_colorlast",!0),a.once("selectionChange",function(){d.removeAttribute("cke_colorlast")}))})}(),E=f.getRowLimit(a)?new f(a,"back"==u?"background-color":"color",C):void 0,F;a.addCommand(y,{contextSensitive:!0,exec:function(a,b){if(!a.readOnly){var c=b.newStyle;a.removeStyle(A);a.focus();c&&a.applyStyle(c);a.fire("saveSnapshot")}},refresh:function(a,b){A.checkApplicable(b,
a,a.activeFilter)?A.checkActive(b,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});a.ui.add(r,CKEDITOR.UI_PANELBUTTON,{label:z,title:z,command:y,editorFocus:0,toolbar:"colors,"+p,allowedContent:v,requiredContent:v,contentTransformations:d,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":c.panelTitle}},select:function(a){var c=b.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(c,a);a=
e.normalizeColor(a);m(F,a);F._.markFirstDisplayed()},onBlock:function(b,c){F=c;c.autoSize=!0;c.element.addClass("cke_colorblock");c.element.setHtml(h(q,C,E?E.getLength():0));c.element.getDocument().getBody().setStyle("overflow","hidden");c.element.getAscendant({html:1}).setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var d=c.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(c.element.findOne(".cke_colorhistory"))},
onOpen:function(){var c=a.getSelection(),d=c&&c.getStartElement(),g=a.elementPath(d),f="back"==u?"background-color":"color";if(g){d=g.block||g.blockLimit||a.document.getBody();do g=d&&d.getComputedStyle(f)||"transparent";while("back"==u&&"transparent"==g&&d&&(d=d.getParent()));g&&"transparent"!=g||(g="#ffffff");b.colorButton_enableAutomatic&&F.element.findOne("#"+q).setStyle("background-color",g);if(d=c&&c.getRanges()[0]){for(var c=new CKEDITOR.dom.walker(d),h=d.collapsed?d.startContainer:c.next(),
d="";h;){h.type!==CKEDITOR.NODE_ELEMENT&&(h=h.getParent());h=e.normalizeColor(h.getComputedStyle(f));d=d||h;if(d!==h){d="";break}h=c.next()}"transparent"==d&&(d="");"fore"==u&&(B.automaticTextColor="#"+e.normalizeColor(g));B.selectionColor=d?"#"+d:"";m(F,d)}return g}}})}function h(d,g,k){var l=[],m=b.colorButton_colors.split(","),n=a.plugins.colordialog&&b.colorButton_enableMore;k=m.length+k+(n?1:0);var p=1;b.colorButton_enableAutomatic&&(k+=1,p+=1,l.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue',
' title\x3d"',c.auto,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',g,',null);return false;"'," href\x3d\"javascript:void('",c.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"',d,'"\x3e\x3c/span\x3e',
c.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(d=0;d<m.length;d++){0===d%a.config.colorButton_colorsPerRow&&l.push("\x3c/tr\x3e\x3ctr\x3e");var y=m[d].split("/"),v=y[0],y=new e(a,{color:y[1]||v,label:y[1]?v:void 0},g);y.setPositionIndex(p+d,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"',c.more,'"',' draggable\x3d"false"',' ondragstart\x3d"return false;"',' onclick\x3d"CKEDITOR.tools.callFunction(',g,",'?');return false;\""," href\x3d\"javascript:void('",c.more,"')\"",' role\x3d"option" aria-posinset\x3d"',k,'" aria-setsize\x3d"',k,'"\x3e',c.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 m(a,b){var c=a._.getItems(),d=a.element.findOne("[aria-selected]"),g=a.element.findOne("[cke_colorlast]");d&&d.removeAttribute("aria-selected");if(g)g.setAttribute("aria-selected",!0);else for(d=0;d<c.count();d++)if(g=c.getItem(d),b&&b==e.normalizeColor(g.getAttribute("data-value"))){g.setAttribute("aria-selected",!0);break}}var b=a.config,c=a.lang.colorbutton;if(!CKEDITOR.env.hc){d({name:"TextColor",type:"fore",commandName:"textColor",title:c.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 g,n=a.config.colorButton_normalizeBackground;if(void 0===n||n)g=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.object.keys(a).length},
right:function(b){var c=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=c.element;b.styles=c.styles;b.attributes=c.attributes||{};return b}}]];d({name:"BGColor",type:"back",commandName:"bgColor",title:c.bgColorTitle,order:20,contentTransformations:g})}}});e=CKEDITOR.tools.createClass({$:function(a,d,f){this.$=new CKEDITOR.dom.element("td");this.color=CKEDITOR.tools._isValidColorFormat(d.color)?d.color:"";this.clickFn=f;this.label=d.label||e.colorNames(a)[this.color]||
this.color;this.setHtml()},statics:{colorNames:function(a){return a.lang.colorbutton.colors},normalizeColor:function(a){var d=/^(rgb|hsl)a\(/g.test(a),e=/^rgba\((\s*0\s*,?){4}\)$/g.test(a);return d&&!e?(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,d){this.getElement().getChild(0).setAttributes({"aria-posinset":a,"aria-setsize":d})}}});
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 d=CKEDITOR.tools.getIndex(this.boxes,function(d){return d.color===a});if(0>d)return null;this.boxes[d].getElement().remove();
return this.boxes.splice(d,1)[0]}}});f=CKEDITOR.tools.createClass({$:function(a,d,e){this.editor=a;this.cssProperty=d;this.clickFn=e;this.rows=[];this._.addNewRow();if(this.editor.config.colorButton_renderContentColors)this.editor.once("instanceReady",function(){this.renderContentColors()},this)},statics:{renderContainer:function(a,d){a.push('\x3c/tbody\x3e\x3ctbody class\x3d"cke_colorhistory" style\x3d"display:none;"\x3e',"\x3ctr\x3e",'\x3ctd colspan\x3d"',d.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,e){var h=this._.getHexCode(e,this.cssProperty,f.colorList);
a[h]=a[h]||0;a[h]+=1;return a},{},this)},getHexCode:function(a,d,f){var h=a.getStyle(d);return h in f?f[h].substr(1):e.normalizeColor(a.getComputedStyle(d)).toUpperCase()},sortByOccurrencesAscending:function(a,d){var e=[],f;for(f in a){var h={};h[d]=f;h.frequency=a[f];e.push(h)}e.sort(function(a,c){return c.frequency-a.frequency});this._.trimToCapacity(e);return e.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 d=0;d<this.rows.length;d++){var e=this.rows[d].extractColorBox(a);if(e)return e}return null},moveToBeginning:function(a){this.rows[0].addNewColor(a)},createAtBeginning:function(a){this._.moveToBeginning(new e(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(),d=this._.calculateFirstPosition(a);CKEDITOR.tools.array.forEach(this.rows,function(e){CKEDITOR.tools.array.forEach(e.boxes,function(e){e.setPositionIndex(d,
a);d+=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 d=this._.extractColorBox(a);this.container&&!this.container.isVisible()&&this.show();d?this._.moveToBeginning(d):this._.createAtBeginning(a);
this._.alignRows()},getLength:function(){return CKEDITOR.tools.array.reduce(this.rows,function(a,d){return a+d.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(e){for(var h=e.config.menu_groups.split(","),f=e._.menuGroups={},a=e._.menuItems={},d=0;d<h.length;d++)f[h[d]]=d+1;e.addMenuGroup=function(a,d){f[a]=
d||100};e.addMenuItem=function(d,e){f[e.group]&&(a[d]=new CKEDITOR.menuItem(this,d,e))};e.addMenuItems=function(a){for(var d in a)this.addMenuItem(d,a[d])};e.getMenuItem=function(d){return a[d]};e.removeMenuItem=function(d){delete a[d]}}}),function(){function e(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.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),d=CKEDITOR.addTemplate("menuArrow",
'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),k=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,d){d=this._.definition=d||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=d.level||1;var b=CKEDITOR.tools.extend({},d.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-
1,block:{}}),c=b.block.attributes=b.attributes||{};!c.role&&(c.role="menu");this._.panelDefinition=b},_:{onShow:function(){var a=this.editor.getSelection(),d=a&&a.getStartElement(),b=this.editor.elementPath(),c=this._.listeners;this.removeAll();for(var e=0;e<c.length;e++){var f=c[e](d,a,b);if(f)for(var h in f){var k=this.editor.getMenuItem(h);!k||k.command&&!this.editor.getCommand(k.command).state||(k.state=f[h],this.add(k))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&
this.editor.execCommand(a.command)},onEscape:function(a){var d=this.parent;d?d._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var d=this._.subMenu,b=this.items[a];if(b=b.getItems&&b.getItems()){d?d.removeAll():(d=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),d.parent=this,d._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var c in b){var e=this.editor.getMenuItem(c);
e&&(e.state=b[c],d.add(e))}var f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){d.show(f,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,d,b,c){if(!this.parent&&(this._.onShow(),!this.items.length))return;d=d||("rtl"==this.editor.lang.dir?2:1);var g=this.items,f=this.editor,h=this._.panel,k=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);k=h.addBlock(this.id,this._.panelDefinition.block);k.autoSize=!0;var t=k.keys;t[40]="next";t[9]="next";t[38]="prev";t[CKEDITOR.SHIFT+
9]="prev";t["rtl"==f.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";t[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(t[13]="mouseup");k=this._.element=k.element;t=k.getDocument();t.getBody().setStyle("overflow","hidden");t.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 b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}e(g);for(var t=f.elementPath(),t=['\x3cdiv class\x3d"cke_menu'+(t&&t.direction()!=f.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],r=g.length,u=r&&g[0].group,z=0;z<r;z++){var p=
g[z];u!=p.group&&(t.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),u=p.group);p.render(this,z,t)}t.push("\x3c/div\x3e");k.setHtml(t.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,a,d,b,c):h.showBlock(this.id,a,d,b,c);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 d=CKEDITOR.tools.array.filter(this.items,
function(b){return a===b.command});return d.length?(d=d[0],{item:d,element:this._.element.findOne("."+d.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,d,b){CKEDITOR.tools.extend(this,b,{order:0,className:"cke_menubutton__"+d});this.group=a._.menuGroups[this.group];this.editor=a;this.name=d},proto:{render:function(e,f,b){var c=e.id+String(f),g="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,h="",w=this.editor,x,t,r=g==CKEDITOR.TRISTATE_ON?"on":g==CKEDITOR.TRISTATE_DISABLED?
"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(h=' aria-checked\x3d"'+(g==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var u=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))&&(t=CKEDITOR.tools.keystrokeToString(w.lang.common.keyboard,x)));x=CKEDITOR.tools.htmlEncodeAttr(this.label);e={id:c,name:this.name,iconName:p,label:this.label,
attrLabel:x,cls:this.className||"",state:r,hasPopup:u?"true":"false",disabled:g==CKEDITOR.TRISTATE_DISABLED,title:x+(t?" ("+t.display+")":""),ariaShortcut:t?w.lang.common.keyboardShortcut+" "+t.aria:"",href:"javascript:void('"+(x||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:f,iconStyle:CKEDITOR.skin.getIconStyle(p,"rtl"==this.editor.lang.dir,p==this.icon?null:this.icon,this.iconOffset),shortcutHtml:t?k.output({shortcut:t.display}):"",arrowHtml:u?
d.output({label:z}):"",role:this.role?this.role:"menuitem",ariaChecked:h};a.output(e,b)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(e){this.base.call(this,e,{panel:{css:e.config.contextmenu_contentsCss,
className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,h){function f(){d=!1}var a,d;e.on("contextmenu",function(e){e=e.data;var f=CKEDITOR.env.webkit?a:CKEDITOR.env.mac?e.$.metaKey:e.$.ctrlKey;if(!h||!f)if(e.preventDefault(),!d){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var f=this.editor,b=(new CKEDITOR.dom.elementPath(e.getTarget(),f.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);b&&"false"==b.getAttribute("contenteditable")&&
f.getSelection().fake(b)}var b=e.getTarget().getDocument(),c=e.getTarget().getDocument().getDocumentElement(),f=!b.equals(CKEDITOR.document),b=b.getWindow().getScrollPosition(),g=f?e.$.clientX:e.$.pageX||b.x+e.$.clientX,k=f?e.$.clientY:e.$.pageY||b.y+e.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(c,null,g,k)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var k=function(){a=0};e.on("keydown",function(d){a=CKEDITOR.env.mac?d.data.$.metaKey:d.data.$.ctrlKey});e.on("keyup",k);
e.on("contextmenu",k)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(e.on("keydown",function(a){a.data.$.shiftKey&&121===a.data.$.keyCode&&(d=!0)},null,null,0),e.on("keyup",f),e.on("contextmenu",f))},open:function(e,h,f,a){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,h,f,a))}}})},beforeInit:function(e){var h=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);
e.on("contentDom",function(){h.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)});e.addCommand("contextMenu",{exec:function(e){var a=0,d=0,h=e.getSelection().getRanges(),h=h[h.length-1].getClientRects(e.editable().isInline());if(h=h[h.length-1])a=h["rtl"===e.lang.dir?"left":"right"],d=h.bottom;e.contextMenu.open(e.document.getBody().getParent(),null,a,d)}});e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function e(a){var d=
this.att;a=a&&a.hasAttribute(d)&&a.getAttribute(d)||"";void 0!==a&&this.setValue(a)}function h(){for(var a,d=0;d<arguments.length;d++)if(arguments[d]instanceof CKEDITOR.dom.element){a=arguments[d];break}if(a){var d=this.att,e=this.getValue();e?a.setAttribute(d,e):a.removeAttribute(d,e)}}var f={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=f);var d=[];a.id&&d.push("id");a.dir&&d.push("dir");var e="";d.length&&(e+="["+d.join(",")+
"]");a.classes&&(e+="(*)");a.styles&&(e+="{*}");return e},createAdvancedTab:function(a,d,k){d||(d=f);var l=a.lang.common,m={id:"advanced",label:l.advancedTab,title:l.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},b=[];if(d.id||d.dir)d.id&&b.push({id:"advId",att:"id",type:"text",requiredContent:k?k+"[id]":null,label:l.id,setup:e,commit:h}),d.dir&&b.push({id:"advLangDir",att:"dir",type:"select",requiredContent:k?k+"[dir]":null,label:l.langDir,"default":"",style:"width:100%",items:[[l.notSet,
""],[l.langDirLTR,"ltr"],[l.langDirRTL,"rtl"]],setup:e,commit:h}),m.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(b)});if(d.styles||d.classes)b=[],d.styles&&b.push({id:"advStyles",att:"style",type:"text",requiredContent:k?k+"{cke-xyz}":null,label:l.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(l.invalidInlineStyle),onChange:function(){},getStyle:function(a,b){var d=this.getValue().match(new RegExp("(?:^|;)\\s*"+a+"\\s*:\\s*([^;]*)","i"));return d?
d[1]:b},updateStyle:function(b,d){var e=this.getValue(),f=a.document.createElement("span");f.setAttribute("style",e);f.setStyle(b,d);e=CKEDITOR.tools.normalizeCssText(f.getAttribute("style"));this.setValue(e,1)},setup:e,commit:h}),d.classes&&b.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:k?k+"(cke-xyz)":null,label:l.cssClasses,"default":"",setup:e,commit:h}]}),m.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(b)});
return m}})}(),function(){function e(a,b,d){d=a.config.forceEnterMode||d;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var e=a.elementPath();e&&!e.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,d=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?l(a,b,null,d):m(a,b,null,d);a.fire("saveSnapshot")}}function h(a){a=a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function f(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==
a.getAttribute("contenteditable")},!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(a){a.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){e(a)}});a.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){e(a,a.activeShiftEnterMode,1)}});a.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var a=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(),
k,l,m,b;CKEDITOR.plugins.enterkey={enterBlock:function(c,e,k,m){function x(a){var b;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);(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(k=k||h(c)){k=f(k);var t=k.document,r=k.checkStartOfBlock(),u=k.checkEndOfBlock(),z=c.elementPath(k.startContainer),p=z.block,y=e==CKEDITOR.ENTER_DIV?"div":"p",v;if(p&&r&&u){r=p.getParent();
if(r.is("li")&&1<r.getChildCount()){t=new CKEDITOR.dom.element("li");v=c.createRange();t.insertAfter(r);p.remove();v.setStart(t,0);c.getSelection().selectRanges([v]);return}if(p.is("li")||p.getParent().is("li")){p.is("li")||(p=p.getParent(),r=p.getParent());v=r.getParent();k=!p.hasPrevious();var q=!p.hasNext();m=c.getSelection();var y=m.createBookmarks(),B=p.getDirection(1),u=p.getAttribute("class"),A=p.getAttribute("style"),C=v.getDirection(1)!=B;c=c.enterMode!=CKEDITOR.ENTER_BR||C||A||u;if(v.is("li"))k||
q?(k&&q&&r.remove(),p[q?"insertAfter":"insertBefore"](v)):p.breakParent(v);else{if(c)if(z.block.is("li")?(v=t.createElement(e==CKEDITOR.ENTER_P?"p":"div"),C&&v.setAttribute("dir",B),A&&v.setAttribute("style",A),u&&v.setAttribute("class",u),p.moveChildren(v)):v=z.block,k||q)v[k?"insertBefore":"insertAfter"](r);else p.breakParent(r),v.insertAfter(r);else if(p.appendBogus(!0),k||q)for(;t=p[k?"getFirst":"getLast"]();)t[k?"insertBefore":"insertAfter"](r);else for(p.breakParent(r);t=p.getLast();)t.insertAfter(r);
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")&&!u){l(c,e,k,m);return}if(A=k.splitBlock(y)){c=A.previousBlock;p=A.nextBlock;r=A.wasStartOfBlock;u=A.wasEndOfBlock;p?(q=p.getParent(),q.is("li")&&(p.breakParent(q),
p.move(p.getNext(),1))):c&&(q=c.getParent())&&q.is("li")&&(c.breakParent(q),q=c.getNext(),k.moveToElementEditStart(q),c.move(c.getPrevious()));if(r||u)if(x(e))k.moveToElementEditStart(k.getTouchedStartNode());else{if(c){if(c.is("li")||!b.test(c.getName())&&!c.is("pre"))v=c.clone()}else p&&(v=p.clone());v?m&&!v.is("li")&&v.renameNode(y):q&&q.is("li")?v=q:(v=t.createElement(y),c&&(B=c.getDirection())&&v.setAttribute("dir",B));if(t=A.elementPath)for(e=0,m=t.elements.length;e<m;e++){y=t.elements[e];if(y.equals(t.block)||
y.equals(t.blockLimit))break;CKEDITOR.dtd.$removeEmpty[y.getName()]&&(y=y.clone(),v.moveChildren(y),v.append(y))}v.appendBogus();v.getParent()||k.insertNode(v);v.is("li")&&v.removeAttribute("value");!CKEDITOR.env.ie||!r||u&&c.getChildCount()||(k.moveToElementEditStart(u?c:v),k.select());k.moveToElementEditStart(r&&!u?p:v)}else p.is("li")&&(v=k.clone(),v.selectNodeContents(p),v=new CKEDITOR.dom.walker(v),v.evaluator=function(b){return!(d(b)||a(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in CKEDITOR.dtd.$inline&&
!(b.getName()in CKEDITOR.dtd.$empty))},(q=v.next())&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?t.createElement("br"):t.createText(" ")).insertBefore(q)),p&&k.moveToElementEditStart(p);k.select();k.scrollIntoView()}}},enterBr:function(a,d,e,f){if(e=e||h(a)){var k=e.document,l=e.checkEndOfBlock(),r=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),u=r.block,z=u&&r.block.getName();f||"li"!=z?(!f&&l&&b.test(z)?(l=u.getDirection())?(k=k.createElement("div"),
k.setAttribute("dir",l),k.insertAfter(u),e.setStart(k,0)):(k.createElement("br").insertAfter(u),CKEDITOR.env.gecko&&k.createText("").insertAfter(u),e.setStartAt(u.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==z&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?k.createText("\r"):k.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("﻿").insertAfter(a),l&&(u||r.blockLimit).appendBogus(),a.getNext().$.nodeValue=
"",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):m(a,d,e,f)}}};k=CKEDITOR.plugins.enterkey;l=k.enterBr;m=k.enterBlock;b=/^h[1-6]$/}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=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,e){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),e))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,e){e=e||{};var f=e.attributes||(e.attributes={});(this.multiSelect=!!e.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=e.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 e=this.toggle(a);if(this.onClick)this.onClick(a,e)},this));return this._.click}},proto:{add:function(d,e,f){var m=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[d]=m;var b;b=CKEDITOR.tools.htmlEncodeAttr(d).replace(a,"\\'");d={id:m,val:b,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(f||d),text:e||d};this._.pendingList.push(h.output(d))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(f.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var e=this.isMarked(a);e?this.unmark(a):this.mark(a);return!e},hideGroup:function(a){var e=(a=
this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),e&&"ul"==e.getName()&&e.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,e=this._.groups,f=this.element.getDocument(),h;for(h in a)f.getById(a[h]).setStyle("display","");for(var b in e)a=f.getById(e[b]),h=a.getNext(),a.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display",
"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var e=this.element.getDocument().getById(a);e.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(e)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var e=this.element.getDocument();a=this._.items[a];var f=e.getById(a);f.removeClass("cke_selected");e.getById(a+"_option").removeAttribute("aria-selected");
this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var a=this._.items,e=this.element.getDocument(),f;for(f in a){var h=a[f];e.getById(h).removeClass("cke_selected");e.getById(h+"_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 e=this.element.getElementsByTag("a"),f,h=-1;if(a)for(f=this.element.getDocument().getById(this._.items[a]).getFirst();a=
e.getItem(++h);){if(a.equals(f)){this._.focusIndex=h;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='\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&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' 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 e=e+(' 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",e);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 d=[];this.render(a,d);return d.join("")},render:function(a,d){function e(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=
this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var h=CKEDITOR.env,m,b,c="cke_"+this.id,g=CKEDITOR.tools.addFunction(function(c){b&&(a.unlockSelection(1),b=0);m.execute(c)},this),n=this;m={id:c,combo:this,focus:function(){CKEDITOR.document.getById(c).getChild(1).focus()},execute:function(b){var c=n._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(a),
c.on)c.panel.hide();else{n.commit();var d=n.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(n.id,new CKEDITOR.dom.element(b),4)}},clickFn:g};this._.listeners.push(a.on("activeFilterChange",e,this));this._.listeners.push(a.on("mode",e,this));this._.listeners.push(a.on("selectionChange",e,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",e,this));var w=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(g,
b);break;default:m.onkey(m,c)}a.preventDefault()}),x=CKEDITOR.tools.addFunction(function(){m.onfocus&&m.onfocus()});b=0;m.keyDownFn=w;h={id:c,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:h.gecko&&!h.hc?"":(this.title||"").replace("'",""),keydownFn:w,focusFn:x,clickFn:g};f.output(h,d);if(this.onRender)this.onRender();return m},createPanel:function(a){if(!this._.panel){var d=this._.panelDefinition,e=this._.panelDefinition.block,f=d.parent||CKEDITOR.document.getBody(),
h="cke_combopanel__"+this.name,b=new CKEDITOR.ui.floatPanel(a,f,d),d=b.addListBlock(this.id,e),c=this;b.onShow=function(){this.element.addClass(h);c.setState(CKEDITOR.TRISTATE_ON);c._.on=1;c.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(c.onOpen)c.onOpen()};b.onHide=function(b){this.element.removeClass(h);c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c._.on=0;if(!b&&c.onClose)c.onClose()};b.onEscape=function(){b.hide(1)};d.onClick=function(a,d){c.onClick&&
c.onClick.call(c,a,d);b.hide()};this._.panel=b;this._.list=d;b.getBlock(this.id).onHide=function(){c._.on=0;c.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,d){this._.value=a;var e=this.document.getById("cke_"+this.id+"_text");e&&(a||d?e.removeClass("cke_combo_inlinelabel"):(d=this.label,e.addClass("cke_combo_inlinelabel")),e.setText("undefined"!=typeof d?d:a));var e="undefined"!=typeof d?d:a,f=this.label,e=e===f?e:e+", "+f;(f=this.document.getById("cke_"+this.id+"_label"))&&
f.setText(e)},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,d,e){this._.items[a]=e||a;this._.list.add(a,d,e)},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 d=this.document.getById("cke_"+this.id),e=d.getElementsByTag("a").getItem(0);d.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled");e&&e.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 d in this._.items)if(a({value:d,text:this._.items[d]})){this.setValue(d);break}}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,d){this.add(a,
CKEDITOR.UI_RICHCOMBO,d)}}(),function(){function e(a,e){var m=a.config,b=e.lang,c=new CKEDITOR.style(e.styleDefinition),g=new d({entries:e.entries,styleVariable:e.styleVariable,styleDefinition:e.styleDefinition}),n;a.addCommand(e.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],g=void 0===c;if(d||c)d&&e.collapsed&&f({editor:a,range:e,style:d}),g?a.removeStyle(d):(d&&!h(d,c)&&a.removeStyle(d),a.applyStyle(c))},refresh:function(a,b){c.checkApplicable(b,
a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});n=a.getCommand(e.commandName);a.ui.addRichCombo(e.comboName,{label:b.label,title:b.panelTitle,command:e.commandName,toolbar:"styles,"+e.order,defaultValue:"cke-default",allowedContent:c,requiredContent:c,contentTransformations:"span"===e.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");
a.name="span";a.attributes.size&&(a.styles["font-size"]=b[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(m.contentsCss),multiSelect:!1,attributes:{"aria-label":b.panelTitle}},init:function(){var c="("+a.lang.common.optionDefault+")";this.startGroup(b.panelTitle);this.add(this.defaultValue,
c,c);g.addToCombo(this)},onClick:function(b){var c=this.getValue();a.focus();a.fire("saveSnapshot");a.execCommand(e.commandName,{newStyle:g.getStyle(b),oldStyle:g.getStyle(c)});a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();(b=g.getMatchingValue(a,b.data.path))?b!=c&&this.setValue(b):this.setValue("",e.defaultLabel)},this);n.on("state",function(){this.setState(n.state)},this)},refresh:function(){this.setState(n.state)}})}function h(a,d){if(!(a instanceof
CKEDITOR.style&&d instanceof CKEDITOR.style))return!1;var e=function(a,b){var d=a.getDefinition().attributes,e=b.getDefinition().attributes;return CKEDITOR.tools.objectCompare(d,e)}(a,d),b=function(a,b){return CKEDITOR.style.getStyleText(a.getDefinition())===CKEDITOR.style.getStyleText(b.getDefinition())}(a,d);return e&&b}function f(d){var e=d.editor,f=d.range,b=d.style,c,g,h;c=e.elementPath();if(d=c.contains(function(a){return b.checkElementRemovable(a)})){g=f.checkBoundaryOfElement(d,CKEDITOR.START);
h=f.checkBoundaryOfElement(d,CKEDITOR.END);if(g&&h){for(g=f.createBookmark();c=d.getFirst();)c.insertBefore(d);d.remove();f.moveToBookmark(g)}else g||h?f.moveToPosition(d,g?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(f.splitElement(d),f.moveToPosition(d,CKEDITOR.POSITION_AFTER_END)),a(f,c.elements.slice(),d);e.getSelection().selectRanges([f])}}function a(d,e,f){var b=e.pop();if(b){if(f)return a(d,e,b.equals(f)?null:f);f=b.clone();d.insertNode(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);
a(d,e)}}var d=CKEDITOR.tools.createClass({$:function(a){var d=a.entries.split(";");this._.data={};this._.names=[];for(var e=0;e<d.length;e++){var b=d[e],c,g;b?(b=b.split("/"),c=b[0],b=b[1],g={},g[a.styleVariable]=b||c,this._.data[c]=new CKEDITOR.style(a.styleDefinition,g),this._.data[c]._.definition.name=c,this._.names.push(c)):(d.splice(e,1),e--)}},proto:{getStyle:function(a){return this._.data[a]},addToCombo:function(a){for(var d=0;d<this._.names.length;d++){var e=this._.names[d];a.add(e,this.getStyle(e).buildPreview(),
e)}},getMatchingValue:function(a,d){for(var e=d.elements,b=0,c;b<e.length;b++)if(c=e[b],c=this._.findMatchingStyleName(a,c))return c;return null}},_:{findMatchingStyleName:function(a,d){return CKEDITOR.tools.array.find(this._.names,function(e){return this.getStyle(e).checkElementMatch(d,!0,a)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(a){var d=a.config;e(a,{comboName:"Font",commandName:"font",styleVariable:"family",lang:a.lang.font,entries:d.font_names,defaultLabel:d.font_defaultLabel,
styleDefinition:d.font_style,order:30});e(a,{comboName:"FontSize",commandName:"fontSize",styleVariable:"size",lang:a.lang.font.fontSize,entries:d.fontSize_sizes,defaultLabel:d.fontSize_defaultLabel,styleDefinition:d.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(e){if(!e.blockless){for(var h=e.config,f=e.lang.format,a=h.format_tags.split(";"),d={},k=0,l=[],m=0;m<a.length;m++){var b=a[m],c=new CKEDITOR.style(h["format_"+b]);if(!e.filter.customConfig||e.filter.check(c))k++,d[b]=c,d[b]._.enterMode=e.config.enterMode,l.push(c)}0!==k&&e.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 d){var b=f["tag_"+a];this.add(a,d[a].buildPreview(b),b)}},onClick:function(a){e.focus();e.fire("saveSnapshot");a=d[a];var b=e.elementPath();e.fire("stylesRemove",{type:CKEDITOR.STYLE_BLOCK});a.checkActive(b,e)||e.applyStyle(a);setTimeout(function(){e.fire("saveSnapshot")},0)},onRender:function(){e.on("selectionChange",function(a){var b=this.getValue();a=a.data.path;this.refresh();for(var c in d)if(d[c].checkActive(a,e)){c!=b&&this.setValue(c,
e.lang.format["tag_"+c]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in d)e.activeFilter.check(d[a])||this.hideItem(a)},refresh:function(){var a=e.elementPath();if(a){if(a.isContextFor("p"))for(var b in d)if(e.activeFilter.check(d[b]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},
CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},function(){var e={canUndo:!1,exec:function(e){var f=e.document.createElement("hr");e.insertElement(f)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||
(h.addCommand("horizontalrule",e),h.ui.addButton&&h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(e){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=e.config.forceSimpleAmpersand;h.indentationChars="string"===typeof e.config.dataIndentationChars?e.config.dataIndentationChars:"\t";e.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 e=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},e.$nonBodyContent,e.$block,e.$listItem,e.$tableContent))this.setRules(h,{indent:!e[h]["#"],breakBeforeOpen:1,breakBeforeClose:!e[h]["#"],breakAfterClose:1,needsSpace:h in e.$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(e){var h=this._.rules[e];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",e);this._.afterCloser=0},openTagClose:function(e,h){var f=this._.rules[e];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"==e&&(this._.inPre=1)},attribute:function(e,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h),this.forceSimpleAmpersand&&(h=h.replace(/&amp;/g,"\x26")));this._.output.push(" ",e,'\x3d"',h,'"')},closeTag:function(e){var h=this._.rules[e];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/",e,"\x3e");"pre"==e&&(this._.inPre=0);h&&h.breakAfterClose&&(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e)));this._.output.push(e)},comment:function(e){this._.indent&&this.indentation();this._.output.push("\x3c!--",e,"--\x3e")},lineBreak:function(){!this._.inPre&&
0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(e,h){var f=this._.rules[e];f?CKEDITOR.tools.extend(f,h,!0):this._.rules[e]=h}}}),"use strict",function(){function e(a,c){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),
doc:a.document,win:a.window},c,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function h(a,c){CKEDITOR.tools.extend(this,c,{editor:a},!0)}function f(a,c){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()},c,!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),l=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 b=a.data.$.clientX;a=a.data.$.clientY;this.queryViewport();(b<=this.rect.left||b>=this.rect.right||a<=this.rect.top||
a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);e.attachListener(a,"resize",f);e.attachListener(a,"mode",l);a.on("destroy",l);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({},
k,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function a(a){var c;if(c=a&&a.type==CKEDITOR.NODE_ELEMENT)c=!(l[a.getComputedStyle("float")]||l[a.getAttribute("align")]);return c&&
!m[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;e.prototype={start:function(a){var c=this,d=this.editor,e=this.doc,f,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(c.relations={},(h=e.$.elementFromPoint(k,l))&&h.nodeType&&(f=new CKEDITOR.dom.element(h),c.traverseSearch(f),isNaN(k+l)||c.pixelSearch(f,k,l),a&&a(c.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(c){var d=this.editor.createRange();d.moveToPosition(this.relations[c.uid].element,
a[c.type]);return d}}(),store:function(){function b(a,b,d){var e=a.getUniqueId();e in d?d[e].type|=b:d[e]={element:a,type:b}}return function(c,d){var e;d&CKEDITOR.LINEUTILS_AFTER&&a(e=c.getNext())&&e.isVisible()&&(b(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_AFTER);d&CKEDITOR.LINEUTILS_INSIDE&&a(e=c.getFirst())&&e.isVisible()&&(b(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_INSIDE);b(c,d,this.relations)}}(),traverseSearch:function(b){var c,d,e;do if(e=b.$["data-cke-expando"],
!(e&&e in this.relations)){if(b.equals(this.editable))break;if(a(b))for(c in this.lookups)(d=this.lookups[c](b))&&this.store(b,d)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(b,d,e,f,h){for(var k=0,l;h(e);){e+=f;if(25==++k)break;if(l=this.doc.$.elementFromPoint(d,e))if(l==b)k=0;else if(c(b,l)&&(k=0,a(l=new CKEDITOR.dom.element(l))))return l}}var c=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:
function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(c,d,e){var f=this.win.getViewPaneSize().height,h=b.call(this,c.$,d,e,-1,function(a){return 0<a});d=b.call(this,c.$,d,e,1,function(a){return a<f});if(h)for(this.traverseSearch(h);!h.getParent().equals(c);)h=h.getParent();if(d)for(this.traverseSearch(d);!d.getParent().equals(c);)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 b=this.editable.getElementsByTag("*"),c=0,d,e,f;d=b.getItem(c++);)if(!d.equals(this.editable)&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasAttribute("contenteditable")||!d.isReadOnly())&&a(d)&&d.isVisible())for(f in this.lookups)(e=this.lookups[f](d))&&this.store(d,e);return this.relations}};h.prototype={locate:function(){function b(b,d){var e=b.element[d===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&a(e)?(b.siblingRect=e.getClientRect(),
d==CKEDITOR.LINEUTILS_BEFORE?(b.siblingRect.bottom+b.elementRect.top)/2:(b.elementRect.bottom+b.siblingRect.top)/2):d==CKEDITOR.LINEUTILS_BEFORE?b.elementRect.top:b.elementRect.bottom}return function(a){var d;this.locations={};for(var e in a)d=a[e],d.elementRect=d.element.getClientRect(),d.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(e,CKEDITOR.LINEUTILS_BEFORE,b(d,CKEDITOR.LINEUTILS_BEFORE)),d.type&CKEDITOR.LINEUTILS_AFTER&&this.store(e,CKEDITOR.LINEUTILS_AFTER,b(d,CKEDITOR.LINEUTILS_AFTER)),d.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(e,CKEDITOR.LINEUTILS_INSIDE,(d.elementRect.top+d.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,c,d,e;return function(f,h){a=this.locations;c=[];for(var k in a)for(var l in a[k])if(d=Math.abs(f-a[k][l]),c.length){for(e=0;e<c.length;e++)if(d<c[e].dist){c.splice(e,0,{uid:+k,type:l,dist:d});break}e==c.length&&c.push({uid:+k,type:l,dist:d})}else c.push({uid:+k,type:l,dist:d});return"undefined"!=typeof h?c.slice(0,h):c}}(),store:function(a,
c,d){this.locations[a]||(this.locations[a]={});this.locations[a][c]=d}};var d={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},k={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 c=a.getUniqueId();
a.hide();this.hidden[c]=a;delete this.visible[c]},showLine:function(a){var c=a.getUniqueId();a.show();this.visible[c]=a;delete this.hidden[c]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,c){var d,e,f;if(d=this.getStyle(a.uid,a.type)){for(f in this.visible)if(this.visible[f].getCustomData("hash")!==this.hash){e=this.visible[f];break}if(!e)for(f in this.hidden)if(this.hidden[f].getCustomData("hash")!==this.hash){this.showLine(e=this.hidden[f]);
break}e||this.showLine(e=this.addLine());e.setCustomData("hash",this.hash);this.visible[e.getUniqueId()]=e;e.setStyles(d);c&&c(e)}},getStyle:function(a,c){var d=this.relations[a],e=this.locations[a][c],f={};f.width=d.siblingRect?Math.max(d.siblingRect.width,d.elementRect.width):d.elementRect.width;f.top=this.inline?e+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+e;if(f.top-this.winTopScroll.y<this.rect.top||f.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
f.left=d.elementRect.left-this.rect.relativeX:(0<d.elementRect.left?f.left=this.rect.left+d.elementRect.left:(f.width+=d.elementRect.left,f.left=this.rect.left),0<(d=f.left+f.width-(this.rect.left+this.winPane.width))&&(f.width-=d));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,c){this.relations=a;this.locations=c;this.hash=Math.random()},
cleanup:function(){var a,c;for(c in this.visible)a=this.visible[c],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 c=this.container.getDocumentPosition(),d=this.container.getComputedStyle("position");a.relativeX=a.relativeY=
0;"static"!=d&&(a.relativeY=c.y,a.relativeX=c.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},m={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:e,locator:h,liner:f}}(),function(){function e(e){return e.getName&&!e.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(e){if(CKEDITOR.env.webkit){var f=CKEDITOR.plugins.widgetselection;e.on("contentDom",function(a){a=a.editor;var d=a.editable();
d.attachListener(d,"keydown",function(a){a.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){f.addFillers(d)||f.removeFillers(d)},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(e),d=h.getLast(e);a&&a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));d&&d.type==CKEDITOR.NODE_ELEMENT&&!d.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(e){if(this.hasFiller(e)&&
!this.isWholeContentSelected(e)){var f=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),a=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&f&&this.startFiller.equals(f)?this.removeFiller(this.startFiller,e):this.startFiller=f;this.endFiller&&a&&this.endFiller.equals(a)?this.removeFiller(this.endFiller,e):this.endFiller=a}},cleanPasteData:function(e){e&&e.length&&(e=e.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));
return e},isWholeContentSelected:function(e){var f=e.editor.getSelection().getRanges()[0];return!f||f&&f.collapsed?!1:(f=f.clone(),f.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(f&&e&&f.startContainer&&f.endContainer&&0===f.startOffset&&f.endOffset===e.getChildCount()&&f.startContainer.equals(e)&&f.endContainer.equals(e)))},hasFiller:function(e){return 0<e.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(e){var f=new CKEDITOR.dom.element(this.fillerTagName);f.setHtml(this.fillerContent);
f.setAttribute(this.fillerAttribute,e?"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(e,f){if(e){var a=f.editor,d=f.editor.getSelection().getRanges()[0].startPath(),k=a.createRange(),l,m;d.contains(e)&&(l=e.getHtml(),m=!0);d="start"==e.getAttribute(this.fillerAttribute);e.remove();l&&0<l.length&&l!=this.fillerContent?(f.insertHtmlIntoRange(l,
a.getSelection().getRanges()[0]),k.setStartAt(f.getChild(f.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),a.getSelection().selectRanges([k])):m&&(d?k.setStartAt(f.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):k.setEndAt(f.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),f.editor.getSelection().selectRanges([k]))}},createFillerRegex:function(e){var f=this.createFiller(e).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((e?
"":"^")+f+(e?"$":""))},addSelectAllIntegration:function(e){var f=this;e.editable().attachListener(e,"beforeCommandExec",function(a){var d=e.editable();"selectAll"==a.data.name&&d&&f.addFillers(d)},null,null,9999)}}}(),"use strict",function(){function e(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);v(this);q(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);O(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;Z(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(h)}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),h=new CKEDITOR.dom.documentFragment(f.getDocument());h.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 d(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 k(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=r;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 m(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var d=b(a),e=c(a),g=!1;d&&d.value&&d.value.match(/^\s/g)&&(d.parent.attributes["data-cke-white-space-first"]=1,d.value=d.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 b(a){return a.find(function(a){return 3===a.type},!0).shift()}function c(a){return a.find(function(a){return 3===a.type},!0).pop()}function g(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 t(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function r(a){return a.hasAttribute("data-cke-temp")}function u(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(),h=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",G(b));else if(g=a.instances[g])d(g,h)?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 v(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 q(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||I(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)||(u(a,d,null),c&&b&&u(a,c,b)):c&&b&&u(a,c,b)});e.on("dataReady",function(){F(a).commit()});
e.on("blur",function(){var b;(b=a.focused)&&k(a,b);(b=a.widgetHoldingFocusedEditable)&&u(a,b,null)})}function C(a){var d=a.editor,e={};d.on("toDataFormat",function(d){var g=CKEDITOR.tools.getNextNumber(),f=[];d.data.downcastingSessionId=g;e[g]=f;d.data.dataValue.forEach(function(d){var e=d.attributes,g;if("data-cke-widget-white-space"in e){g=b(d);var k=c(d);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=d.getFirst(h.isParserWidgetElement),f.push({wrapper:d,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"]]=d),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);d.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=
e[a.data.downcastingSessionId],c,d,g,f,h,k;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(k in c.editables)h=c.editables[k],delete h.attributes.contenteditable,h.setHtml(d.editables[k].getData());f||(f=g);c.wrapper.replaceWith(f)}},null,null,13);d.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(V,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,h;a.editor.fire("lockSnapshot");for(g&&
(f=a.focused)&&k(a,f);f=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,f),1),f.isInited()&&(h=f.editor.checkDirty(),f.setSelected(!1),!h&&f.editor.resetDirty());g&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;f=c.pop();)b.push(f),f.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function H(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=M(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 N(a,b){var c=function(a){return a==CKEDITOR.ENTER_BR?"br":a==CKEDITOR.ENTER_DIV?"div":"p"}(a.editor.config.enterMode),d=new CKEDITOR.dom.element(c);"br"!==c&&d.appendBogus();"after"===b?d.insertAfter(a.wrapper):d.insertBefore(a.wrapper);(function(b){var c=a.editor.createRange();c.setStart(b,0);a.editor.getSelection().selectRanges([c])})(d)}
function I(a,b){var c=a.widgets.focused,d,e,g;P.hasCopyBin(a)||(e=new P(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(G(a)))}function M(a){return(a=
(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function R(){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 K(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function G(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 O(a,b){var c=a.editor.config.widget_keystrokeInsertLineBefore,d=a.editor.config.widget_keystrokeInsertLineAfter;Y(a);S(a);X(a);ca(a);W(a);ba(a);da(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(b==c)N(a,"before"),a.editor.fire("saveSnapshot");else if(b==d)N(a,"after"),a.editor.fire("saveSnapshot");else if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){I(a.editor,b==CKEDITOR.CTRL+88);return}if(b in ha||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 Y(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",
a.id)}function S(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 X(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 ca(a){if(!0===a.mask)J(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,T,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 J(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 T(){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 W(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",aa,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",
function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function aa(a){function b(){var c;for(q.reset();c=h.pop();)c.removeListener();var d=k;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(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var p=c.greedySearch(),q=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(p);k=d.sort(m,1);k.length&&(e.prepare(p,l),e.placeLine(k[0]),e.cleanup())});f.addClass("cke_widget_dragging");h.push(f.on("mousemove",function(a){m=a.data.$.clientY;q.input()}));g.fire("dragstart",{target:a.sender});h.push(g.document.once("mouseup",b,this));f.isInline()||
h.push(CKEDITOR.document.once("mouseup",b,this))}}function ba(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 da(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 Z(a){a.element.data("cke-widget-data",
encodeURIComponent(JSON.stringify(a.data)))}function U(){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 h=0,k=a.group.length;h<k;h++)f=a.group[h],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 h=0;h<c.length;h++)c[h]!==this&&c[h].checkActive(e,a)&&(a.widgets.focused.removeStyle(c[h]),
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}'),
U())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new e(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);H(a.undoManager)}}});e.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(b,c){var e=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=b;
c._=c._||{};e.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));a(e,c);d(this,c);this.registered[b]=c;if(c.dialog&&e.plugins.dialog)var g=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(e);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});g.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&&u(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=t(d,a.getName()))&&m(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=t(d,a.name))&&m(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:g};CKEDITOR.event.implementOn(e.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=M(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",K);c.removeListener("blur",R);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:g.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",K,this),CKEDITOR.env.ie&&c.on("blur",R,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(){ca(this)},refreshParts:function(a){S(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&&(Z(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 V=/^(?:<(?: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,
ha={37:1,38:1,39:1,40:1,8:1,46:1};ha[CKEDITOR.SHIFT+121]=1;var P=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(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,
p,q,v;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&&(v=g.scrollTop);f.selectNodeContents(b);f.select();e&&(g.scrollTop=v);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();p.removeListener();q.removeListener();c.fire("unlockSnapshot");
h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!P.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=e;h.nestedEditable=f}(),CKEDITOR.config.widget_keystrokeInsertLineBefore=CKEDITOR.SHIFT+CKEDITOR.ALT+13,CKEDITOR.config.widget_keystrokeInsertLineAfter=CKEDITOR.SHIFT+13,"use strict",function(){function e(a){function b(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget),
this.deflated=!0)}function d(){var b=a.editable(),c=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=c.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 g=this.widget,b=e,c=g.wrapper,f=g.data.align,g=g.data.hasCaption;
if(b){for(var h=3;h--;)c.removeClass(b[h]);"center"==f?g&&c.addClass(b[1]):"none"!=f&&c.addClass(b[x[f]])}else"center"==f?(g?c.setStyle("text-align","center"):c.removeStyle("text-align"),c.removeStyle("float")):("none"==f?c.removeStyle("float"):c.setStyle("float",f),c.removeStyle("text-align"))}}var e=a.config.image2_alignClasses,l=a.config.image2_captionedClass;return{allowedContent:c(a),requiredContent:"img[src,alt]",features:g(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 c=this.features;this.data.hasCaption&&!a.filter.checkFeature(c.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||a.filter.checkFeature(c.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:b,
inflate:d});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(c.dimension)){c=this.data;c={width:c.width,height:c.height};e=this.parts.image;for(var g in c)c[g]?e.setAttribute(g,
c[g]):e.removeAttribute(g),e.$.style.removeProperty(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.$.style.width&&parseInt(c.$.style.width)||c.getAttribute("width")||"",height:c.$.style.height&&parseInt(c.$.style.height)||c.getAttribute("height")||"",lock:this.ready?b.checkHasNaturalRatio(c):!0},g=c.getAscendant("a");g&&this.wrapper.contains(g)&&
(this.parts.link=g);d.align||(c=d.hasCaption?this.element:c,e?(c.hasClass(e[0])?d.align="left":c.hasClass(e[2])&&(d.align="right"),d.align?c.removeClass(e[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&&k(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(l,e).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),e=b.config.image2_captionedClass;return function(a,b){var g={width:1,height:1},f=a.name,h;if(!a.attributes["data-cke-realelement"]&&(c(a)?("div"==f&&(h=a.getFirst("figure"))&&
(a.replaceWith(h),a=h),b.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==f&&a.hasClass(e)?h=a.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:d(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in g)(g=h.attributes[k])&&g.match(t)&&delete h.attributes[k];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,e={figure:1,a:1,img:1};return function(g){if(!(g.name in
{div:1,p:1}))return!1;var f=g.children;if(1!==f.length)return!1;f=f[0];if(!(f.name in e))return!1;if("p"==g.name){if(!d(f))return!1}else if("figure"==f.name){if(!f.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!d(f))return!1;return(c?g.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(g.attributes.style||"",!0)["text-align"])?!0:!1}}function d(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function k(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(),h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(g);h.append(e);a.element.append(h,!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 h(){S=B+q*J;X=Math.round(S/x)}function k(){X=w-T;S=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,v=g.data.$.screenX,n=g.data.$.screenY,B=l.$.clientWidth,w=l.$.clientHeight,x=
B/w,t=[],O="cke_image_s"+(~q?"e":"w"),Y,S,X,ca,J,T,W;l.$.style.height&&(l.setAttribute("height",parseInt(l.$.style.height)),l.$.style.removeProperty("height"));l.$.style.width&&(l.setAttribute("width",parseInt(l.$.style.width)),l.$.style.removeProperty("width"));b.fire("saveSnapshot");f("mousemove",function(a){Y=a.data.$;J=Y.screenX-v;T=n-Y.screenY;W=Math.abs(J/T);1==q?0>=J?0>=T?h():W>=x?h():k():0>=T?W>=x?k():h():k():0>=J?0>=T?W>=x?k():h():k():0>=T?h():W>=x?h():k();a=m&&(S>m.width||X>m.height);15>
S||15>X||a||(ca={width:S,height:X},l.setAttributes(ca))},t);f("mouseup",function(){for(var d;d=t.pop();)d.removeListener();c.removeClass(O);e.removeClass("cke_image_resizing");ca&&(a.setData(ca),b.fire("saveSnapshot"));ca=!1},t);c.addClass(O);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function l(a){var c=[],d;return function(e){var g=a.getCommand("justify"+e);if(g){c.push(function(){g.refresh(a,a.elementPath())});
if(e in{right:1,left:1,center:1})g.on("exec",function(d){var g=b(a);if(g){g.setData("align",e);for(g=c.length;g--;)c[g]();d.cancel()}});g.on("refresh",function(c){var g=b(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),c.cancel())})}}}function m(a){if(a.plugins.link){var c=CKEDITOR.on("dialogDefinition",
function(c){c=c.data;if("link"==c.name){c=c.definition;var d=c.onShow,e=c.onOk;c.onShow=function(){var c=b(a),e=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();c&&(c.inline?!c.wrapper.getAscendant("a"):1)?(this.setupContent(c.data.link||{}),e.hide()):(e.show(),d.apply(this,arguments))};c.onOk=function(){var c=b(a);if(c&&(c.inline?!c.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);c.setData("link",d)}else e.apply(this,arguments)}}});a.on("destroy",
function(){c.removeListener()});a.getCommand("unlink").on("exec",function(c){var d=b(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),c.cancel())});a.getCommand("unlink").on("refresh",function(c){var d=b(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),c.cancel())})}}function b(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function c(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 g(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},t=/^\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 b=a.config,c=a.lang.image2,d=e(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;d.pathName=c.pathName;d.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",d);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:c.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);m(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(),h=["hasCaption","align","link"],k={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"),h=b.element.is("a")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(g),g.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||f).setAttributes(e.set),e.removed.length&&(k||f).removeAttributes(e.removed)):(e=f.findOne("img"),e.replace(f),k=e);h&&(b.element=k)}}};return function(a){var b,c;
a.changed={};for(c=0;c<h.length;c++)b=h[c],a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:!1;for(c=0;c<h.length;c++)b=h[c],k[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(e){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 d=a.parts.image.$.style,e="";d&&(e=parseInt(d.marginLeft,10)||parseInt(d.marginRight,10));a.setData("hspace",e)}},commit:function(a){a.setData("hspace",this.getValue());var d=a.data.hspace?a.data.hspace:0;(a=a.parts.image)&&a.setStyles({"margin-left":d+"px","margin-right":d+"px"})},id:"hspace",label:e.lang.image.hSpace,requiredContent:"img{margin-left,margin-right}",setup:function(a){this.setValue(a.data.hspace)},
type:"text",validate:CKEDITOR.dialog.validate.integer(e.lang.image.validateHSpace)}],type:"hbox"},{children:[{onShow:function(){var a=this.getDialog().getParentEditor().widgets.focused;if(a){var d=a.parts.image.$.style,e="";d&&(e=parseInt(d.marginTop,10)||parseInt(d.marginBottom,10));a.setData("vspace",e)}},commit:function(a){a.setData("vspace",this.getValue());var d=a.data.vspace?a.data.vspace:0;(a=a.parts.image)&&a.setStyles({"margin-bottom":d+"px","margin-top":d+"px"})},id:"vspace",label:e.lang.image.vSpace,
requiredContent:"img{margin-top,margin-bottom}",setup:function(a){this.setValue(a.data.vspace)},type:"text",validate:CKEDITOR.dialog.validate.integer(e.lang.image.validateVSpace)}],type:"hbox"}],id:"spacingBox",type:"hbox"},h.add(f)))})}})}(),function(){function e(a,d){var e,l;d.on("refresh",function(a){var b=[h],c;for(c in a.data.states)b.push(a.data.states[c]);this.setState(CKEDITOR.tools.search(b,f)?f:h)},d,null,100);d.on("exec",function(d){e=a.getSelection();l=e.createBookmarks(1);d.data||(d.data=
{});d.data.done=!1},d,null,0);d.on("exec",function(){a.forceNextSelectionCheck();e.selectBookmarks(l)},d,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,f=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(a){var d=CKEDITOR.plugins.indent.genericDefinition;e(a,a.addCommand("indent",new d(!0)));e(a,a.addCommand("outdent",new d));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(d){var e=a.createRange(),f=d.data.node;e.setStartBefore(f);e.setEndAfter(f);for(var b=new CKEDITOR.dom.walker(e),c;c=b.next();)if(c.type==CKEDITOR.NODE_ELEMENT)if(!c.equals(f)&&c.getDirection())e.setStartAfter(c),b=new CKEDITOR.dom.walker(e);else{var g=a.config.indentClasses;if(g)for(var h="ltr"==d.data.dir?["_rtl",""]:["","_rtl"],w=0;w<g.length;w++)c.hasClass(g[w]+h[0])&&(c.removeClass(g[w]+h[0]),c.addClass(g[w]+h[1]));
g=c.getStyle("margin-right");h=c.getStyle("margin-left");g?c.setStyle("margin-left",g):c.removeStyle("margin-left");h?c.setStyle("margin-right",h):c.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,d,e){this.name=d;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=e?"indent":"outdent";this.indentKey=e?9:CKEDITOR.SHIFT+
9;this.database={}},registerCommands:function(a,d){a.on("pluginsLoaded",function(){for(var a in d)(function(a,d){var b=a.getCommand(d.relatedGlobal),c;for(c in d.jobs)b.on("exec",function(b){b.data.done||(a.fire("lockSnapshot"),d.execJob(a,c)&&(b.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(d.database))},this,null,c),b.on("refresh",function(b){b.data.states||(b.data.states={});b.data.states[d.name+"@"+c]=d.refreshJob(a,c,b.data.path)},this,null,c);a.addFeature(d)})(this,
d[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,d){var e=this.jobs[d];if(e.state!=h)return e.exec.call(this,a)},refreshJob:function(a,d,e){d=this.jobs[d];a.activeFilter.checkFeature(this)?d.state=d.refresh.call(this,a,e):d.state=h;return d.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function e(a){function b(b){for(var h=k.startContainer,l=k.endContainer;h&&
!h.getParent().equals(b);)h=h.getParent();for(;l&&!l.getParent().equals(b);)l=l.getParent();if(!h||!l)return!1;for(var y=[],v=!1;!v;)h.equals(l)&&(v=!0),y.push(h),h=h.getNext();if(1>y.length)return!1;h=b.getParents(!0);for(l=0;l<h.length;l++)if(h[l].getName&&e[h[l].getName()]){b=h[l];break}for(var h=c.isIndent?1:-1,l=y[0],y=y[y.length-1],v=CKEDITOR.plugins.list.listToArray(b,d),q=v[y.getCustomData("listarray_index")].indent,l=l.getCustomData("listarray_index");l<=y.getCustomData("listarray_index");l++)if(v[l].indent+=
h,0<h){for(var r=v[l].parent,A=l-1;0<=A;A--)if(v[A].indent===h){r=v[A].parent;break}v[l].parent=new CKEDITOR.dom.element(r.getName(),r.getDocument())}for(l=y.getCustomData("listarray_index")+1;l<v.length&&v[l].indent>q;l++)v[l].indent+=h;h=CKEDITOR.plugins.list.arrayToList(v,d,null,a.config.enterMode,b.getDirection());if(!c.isIndent){var C;if((C=b.getParent())&&C.is("li"))for(var y=h.listNode.getChildren(),E=[],x,l=y.count()-1;0<=l;l--)(x=y.getItem(l))&&x.is&&x.is("li")&&E.push(x)}h&&h.listNode.replace(b);
if(E&&E.length)for(l=0;l<E.length;l++){for(x=b=E[l];(x=x.getNext())&&x.is&&x.getName()in e;)CKEDITOR.env.needsNbspFiller&&!b.getFirst(f)&&b.append(k.document.createText(" ")),b.append(x);b.insertAfter(C)}h&&a.fire("contentDomInvalidated");return!0}for(var c=this,d=this.database,e=this.context,k,l=a.getSelection(),l=(l&&l.getRanges()).createIterator();k=l.getNextRange();){for(var t=k.getCommonAncestor();t&&(t.type!=CKEDITOR.NODE_ELEMENT||!e[t.getName()]);){if(a.editable().equals(t)){t=!1;break}t=t.getParent()}t||
(t=k.startPath().contains(e))&&k.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);if(!t){var r=k.getEnclosedNode();r&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in e&&(k.setStartAt(r,CKEDITOR.POSITION_AFTER_START),k.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),t=r)}t&&k.startContainer.type==CKEDITOR.NODE_ELEMENT&&k.startContainer.getName()in e&&(r=new CKEDITOR.dom.walker(k),r.evaluator=h,k.startContainer=r.next());t&&k.endContainer.type==CKEDITOR.NODE_ELEMENT&&k.endContainer.getName()in e&&(r=new CKEDITOR.dom.walker(k),
r.evaluator=h,k.endContainer=r.previous());if(t)return b(t)}return 0}function h(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function f(e){return a(e)&&d(e)}var a=CKEDITOR.dom.walker.whitespaces(!0),d=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(a){function b(a){c.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:k}:function(a,b){return!this.getContext(b)||this.isIndent?k:l},exec:CKEDITOR.tools.bind(e,this)}}
var c=CKEDITOR.plugins.indent;c.registerCommands(a,{indentlist:new b(a,"indentlist",!0),outdentlist:new b(a,"outdentlist")});CKEDITOR.tools.extend(b.prototype,c.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var d=b.contains(h);c||(c=b.contains(a));return c&&d&&d.equals(c.getFirst(h))}}(),function(){function e(a,d,b){if(!a.getCustomData("indent_processed")){var c=this.editor,e=this.isIndent;if(d){c=
a.$.className.match(this.classNameRegex);b=0;c&&(c=c[1],b=CKEDITOR.tools.indexOf(d,c)+1);if(0>(b+=e?1:-1))return;b=Math.min(b,d.length);b=Math.max(b,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<b&&a.addClass(d[b-1])}else{d=h(a,b);b=parseInt(a.getStyle(d),10);var f=c.config.indentOffset||40;isNaN(b)&&(b=0);b+=(e?1:-1)*f;if(0>b)return;b=Math.max(b,0);b=Math.ceil(b/f)*f;a.setStyle(d,b?b+(c.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,
a,"indent_processed",1)}}function h(a,d){return"ltr"==(d||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var f=CKEDITOR.dtd.$listItem,a=CKEDITOR.dtd.$list,d=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(l){function m(){b.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:c?null:"margin-left,margin-right",classes:c||null}};this.contentTransformations=
[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(c?"("+c.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var e=b.block||
b.blockLimit;if(!e.is(f))var l=e.getAscendant(f),e=l&&b.contains(l)||e;e.is(f)&&(e=e.getParent());if(this.enterBr||this.getContext(b)){if(c){var l=c,e=e.$.className.match(this.classNameRegex),m=this.isIndent,l=e?m?e[1]!=l.slice(-1):!0:m;return l?k:d}return this.isIndent?k:e?CKEDITOR[0>=(parseInt(e.getStyle(h(e)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:d}return d},exec:function(b){var d=b.getSelection(),d=d&&d.getRanges()[0],f;if(f=b.elementPath().contains(a))e.call(this,f,c);else for(d=d.createIterator(),
b=b.config.enterMode,d.enforceRealBlocks=!0,d.enlargeBr=b!=CKEDITOR.ENTER_BR;f=d.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)f.isReadOnly()||e.call(this,f,c);return!0}}}}var b=CKEDITOR.plugins.indent,c=l.config.indentClasses;b.registerCommands(l,{indentblock:new m(l,"indentblock",!0),outdentblock:new m(l,"outdentblock")});CKEDITOR.tools.extend(m.prototype,b.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:c?new RegExp("(?:^|\\s+)("+
c.join("|")+")(?\x3d$|\\s)"):null})}})}(),function(){function e(a,d){d=void 0===d||d;var e;if(d)e=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){e=a.getParent();if(!e)break;a=e}e=a.getStyle("text-align")||a.getAttribute("align")||""}e&&(e=e.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!e&&d&&(e="rtl"==a.getComputedStyle("direction")?"right":"left");return e}function h(a,d,e){this.editor=a;this.name=d;this.value=e;this.context=
"p";d=a.config.justifyClasses;var f=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(d){switch(e){case "left":this.cssClassName=d[0];break;case "center":this.cssClassName=d[1];break;case "right":this.cssClassName=d[2];break;case "justify":this.cssClassName=d[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+d.join("|")+")(?\x3d$|\\s)");this.requiredContent=f+"("+this.cssClassName+")"}else this.requiredContent=f+"{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 d=a.editor,e=d.createRange();e.setStartBefore(a.data.node);e.setEndAfter(a.data.node);for(var f=new CKEDITOR.dom.walker(e),h;h=f.next();)if(h.type==CKEDITOR.NODE_ELEMENT)if(!h.equals(a.data.node)&&h.getDirection())e.setStartAfter(h),f=new CKEDITOR.dom.walker(e);else{var b=d.config.justifyClasses;b&&(h.hasClass(b[0])?(h.removeClass(b[0]),
h.addClass(b[2])):h.hasClass(b[2])&&(h.removeClass(b[2]),h.addClass(b[0])));b=h.getStyle("text-align");"left"==b?h.setStyle("text-align","right"):"right"==b&&h.setStyle("text-align","left")}}h.prototype={exec:function(a){var d=a.getSelection(),f=a.config.enterMode;if(d){for(var h=d.createBookmarks(),m=d.getRanges(),b=this.cssClassName,c,g,n=a.config.useComputedState,n=void 0===n||n,w=m.length-1;0<=w;w--)for(c=m[w].createIterator(),c.enlargeBr=f!=CKEDITOR.ENTER_BR;g=c.getNextParagraph(f==CKEDITOR.ENTER_P?
"p":"div");)if(!g.isReadOnly()){var x=g.getName(),t;t=a.activeFilter.check(x+"{text-align}");if((x=a.activeFilter.check(x+"("+b+")"))||t){g.removeAttribute("align");g.removeStyle("text-align");var r=b&&(g.$.className=CKEDITOR.tools.ltrim(g.$.className.replace(this.cssClassRegex,""))),u=this.state==CKEDITOR.TRISTATE_OFF&&(!n||e(g,!0)!=this.value);b&&x?u?g.addClass(b):r||g.removeAttribute("class"):u&&t&&g.setStyle("text-align",this.value)}}a.focus();a.forceNextSelectionCheck();d.selectBookmarks(h)}},
refresh:function(a,d){var f=d.block||d.blockLimit,h=f.getName(),m=f.equals(a.editable()),h=this.cssClassName?a.activeFilter.check(h+"("+this.cssClassName+")"):a.activeFilter.check(h+"{text-align}");m&&!CKEDITOR.dtd.$list[d.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!m&&h?this.setState(e(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 d=
new h(a,"justifyleft","left"),e=new h(a,"justifycenter","center"),l=new h(a,"justifyright","right"),m=new h(a,"justifyblock","justify");a.addCommand("justifyleft",d);a.addCommand("justifycenter",e);a.addCommand("justifyright",l);a.addCommand("justifyblock",m);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 e(a,d){var b=k.exec(a),c=k.exec(d);if(b){if(!b[2]&&"px"==c[2])return c[1];if("px"==b[2]&&!c[2])return c[1]+"px"}return d}function h(d){return{elements:{$:function(h){var b=h.attributes,b=b&&b["data-cke-realelement"],c=f(d,decodeURIComponent(b));if((b=(b=b&&new CKEDITOR.htmlParser.fragment.fromHtml(c))&&
b.children[0])&&h.attributes["data-cke-resizable"]){var g=(new a(h)).rules;h=b.attributes;c=g.width;g=g.height;c&&(h.width=e(h.width,c));g&&(h.height=e(h.height,g))}return b}}}}function f(a,d){var b=[],c=/^cke:/i,e=new CKEDITOR.htmlParser.filter({elements:{"^":function(a){c.test(a.name)&&(a.name=a.name.replace(c,""),b.push(a))},iframe:function(a){a.children=[]}}}),f=a.activeFilter,h=new CKEDITOR.htmlParser.basicWriter,k=CKEDITOR.htmlParser.fragment.fromHtml(d);e.applyTo(k);f.applyTo(k);CKEDITOR.tools.array.forEach(b,
function(a){a.name="cke:"+a.name});k.writeHtml(h);return h.getHtml()}var a=CKEDITOR.htmlParser.cssStyle,d=CKEDITOR.tools.cssLength,k=/^((?:\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 d=a.dataProcessor;(d=d&&d.htmlFilter)&&d.addRules(h(a),{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(e,f,b,c){var g=this.lang.fakeobjects,g=g[b]||
g.unknown;f={"class":f,"data-cke-realelement":encodeURIComponent(e.getOuterHtml()),"data-cke-real-node-type":e.type,alt:g,title:g,align:e.getAttribute("align")||""};CKEDITOR.env.hc||(f.src=CKEDITOR.tools.transparentImageData);b&&(f["data-cke-real-element-type"]=b);c&&(f["data-cke-resizable"]=c,b=new a,c=e.getAttribute("width"),e=e.getAttribute("height"),c&&(b.rules.width=d(c)),e&&(b.rules.height=d(e)),b.populate(f));return this.document.createElement("img",{attributes:f})};CKEDITOR.editor.prototype.createFakeParserElement=
function(e,f,b,c){var g=this.lang.fakeobjects,g=g[b]||g.unknown,h;h=new CKEDITOR.htmlParser.basicWriter;e.writeHtml(h);h=h.getHtml();f={"class":f,"data-cke-realelement":encodeURIComponent(h),"data-cke-real-node-type":e.type,alt:g,title:g,align:e.attributes.align||""};CKEDITOR.env.hc||(f.src=CKEDITOR.tools.transparentImageData);b&&(f["data-cke-real-element-type"]=b);c&&(f["data-cke-resizable"]=c,c=e.attributes,e=new a,b=c.width,c=c.height,void 0!==b&&(e.rules.width=d(b)),void 0!==c&&(e.rules.height=
d(c)),e.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 d=decodeURIComponent(a.data("cke-realelement")),d=f(this,d),d=CKEDITOR.dom.element.createFromHtml(d,this.document);if(a.data("cke-resizable")){var b=a.getStyle("width");a=a.getStyle("height");b&&d.setAttribute("width",e(d.getAttribute("width"),b));a&&d.setAttribute("height",e(d.getAttribute("height"),a))}return d}}(),
"use strict",function(){function e(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,b){for(var c=a.plugins.link,d=c.compiledProtectionFunction.params,c=[c.compiledProtectionFunction.name,"("],g,f,h=0;h<d.length;h++)g=d[h].toLowerCase(),f=b[g],0<h&&c.push(","),c.push("'",f?e(encodeURIComponent(b[g])):"","'");c.push(")");return c.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 d=/^javascript:/,k=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,
l=/subject=([^;?:@&=$,\/]*)/i,m=/body=([^;?:@&=$,\/]*)/i,b=/^#(.*)$/,c=/^((?:http|https|ftp|news):\/\/)?(.*)$/,g=/^(_(?: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*/,t=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,r=/^tel:(.*)$/,u={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,e){var f=e&&(e.data("cke-saved-href")||e.getAttribute("href"))||"",h=a.plugins.link.compiledProtectionFunction,q=a.config.emailProtection,B={},A;f.match(d)&&("encode"==q?f=f.replace(n,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):q&&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(q=f.match(b))B.type="anchor",B.anchor={},B.anchor.name=B.anchor.id=q[1];else if(q=f.match(r))B.type="tel",B.tel=q[1];else if(q=f.match(k)){A=f.match(l);var f=f.match(m),C=B.email={};B.type="email";C.address=q[0].replace("mailto:",
"");A&&(C.subject=decodeURIComponent(A[1]));f&&(C.body=decodeURIComponent(f[1]))}else f&&(A=f.match(c))&&(B.type="url",B.url={},B.url.protocol=A[1],B.url.url=A[2]);if(e){if(f=e.getAttribute("target"))B.target={type:f.match(g)?f:"frame",name:f};else if(f=(f=e.data("cke-pa-onclick")||e.getAttribute("onclick"))&&f.match(x))for(B.target={type:"popup",name:f[1]};q=t.exec(f[2]);)"yes"!=q[2]&&"1"!=q[2]||q[1]in{height:1,width:1,top:1,left:1}?isFinite(q[2])&&(B.target[q[1]]=q[2]):B.target[q[1]]=!0;null!==
e.getAttribute("download")&&(B.download=!0);var f={},E;for(E in u)(q=e.getAttribute(E))&&(f[u[E]]=q);if(E=e.data("cke-saved-name")||f.advName)f.advName=E;CKEDITOR.tools.isEmpty(f)||(B.advanced=f)}return B},getLinkAttributes:function(a,b){var c=a.config.emailProtection||"",d={};switch(b.type){case "url":var c=b.url&&void 0!==b.url.protocol?b.url.protocol:"http://",g=b.url&&CKEDITOR.tools.trim(b.url.url)||"";d["data-cke-saved-href"]=0===g.indexOf("/")?g:c+g;break;case "anchor":c=b.anchor&&b.anchor.id;
d["data-cke-saved-href"]="#"+(b.anchor&&b.anchor.name||c||"");break;case "email":var k=b.email,g=k.address;switch(c){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"==c?(c=["javascript:void(location.href\x3d'mailto:'+",h(g)],k&&c.push("+'",e(k),"'"),c.push(")")):c=["mailto:",g,k];break;default:c=g.split("@",2),k.name=c[0],k.domain=c[1],c=["javascript:",f(a,
k)]}d["data-cke-saved-href"]=c.join("");break;case "tel":d["data-cke-saved-href"]="tel:"+b.tel}if(b.target)if("popup"==b.target.type){for(var c=["window.open(this.href, '",b.target.name||"","', '"],r="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),g=r.length,l=function(a){b.target[a]&&r.push(a+"\x3d"+b.target[a])},k=0;k<g;k++)r[k]+=b.target[r[k]]?"\x3dyes":"\x3dno";l("width");l("left");l("height");l("top");c.push(r.join(","),"'); return false;");d["data-cke-pa-onclick"]=
c.join("")}else"notSet"!=b.target.type&&b.target.name&&(d.target=b.target.name);b.download&&(d.download="");if(b.advanced){for(var n in u)(c=b.advanced[u[n]])&&(d[n]=c);d.name&&(d["data-cke-saved-name"]=d.name)}d["data-cke-saved-href"]&&(d.href=d["data-cke-saved-href"]);n={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};b.advanced&&CKEDITOR.tools.extend(n,u);for(var w in d)delete n[w];return{set:d,removed:CKEDITOR.tools.object.keys(n)}},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 e(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 r,e=c.listNode.getChildCount(),f=0;f<e&&(r=c.listNode.getChild(f));f++)r.getName()==this.type&&d.push(r);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")||t.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),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<f.length;g++)h=f[g].getCustomData("listarray_index"),e[h].indent=-1;for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}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 d(a,b,c,d){for(var e,g;e=a[d?"getLast":"getFirst"](r);)(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 k(a){function b(c){var e=a[c?"getPrevious":"getNext"](w);e&&e.type==CKEDITOR.NODE_ELEMENT&&
e.is(a.getName())&&(d(a,e,null,!c),a.remove(),a=e)}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 m(a,c,e){a.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var g=e.extractContents();c.trim(!1,!0);var f=c.createBookmark(),h=new CKEDITOR.dom.elementPath(c.startContainer),l=h.block,h=h.lastElement.getAscendant("li",1)||l,m=new CKEDITOR.dom.elementPath(e.startContainer),
r=m.contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():m&&(l=m.getPrevious(w))&&x(l)&&l.remove();(l=g.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=c.startContainer.getChild(c.startOffset))?g.insertBefore(l):c.startContainer.append(g);r&&(g=b(r))&&(h.contains(r)?(d(g,r.getParent(),r),g.remove()):h.append(g));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){m=e.startPath();g=m.block;if(!g)break;g.is("li")&&(h=g.getParent(),g.equals(h.getLast(w))&&
g.equals(h.getFirst(w))&&(g=h));e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove()}e=e.clone();g=a.editable();e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return w(a)&&!x(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&k(e);c.moveToBookmark(f);c.select();a.fire("saveSnapshot")}function b(a){return(a=a.getLast(w))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in c?a:null}var c={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),
n=CKEDITOR.dom.walker.bookmark(),w=function(a){return!(g(a)||n(a))},x=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,d,e,g){if(!c[a.getName()])return[];e||(e=0);d||(d=[]);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,d,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",d.length);d.push(l);for(var m=0,r=k.getChildCount(),n;m<r;m++)n=k.getChild(m),n.type==CKEDITOR.NODE_ELEMENT&&c[n.getName()]?CKEDITOR.plugins.list.listToArray(n,b,d,e+1,l.grandparent):l.contents.push(n)}}return d},arrayToList:function(a,b,d,e,g){d||(d=0);if(!a||a.length<d+1)return null;for(var f,h=a[d].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(h),
l=null,m=d,r=Math.max(a[d].indent,0),x=null,t,D,N=e==CKEDITOR.ENTER_P?"p":"div";;){var I=a[m];f=I.grandparent;t=I.element.getDirection(1);if(I.indent==r){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),g&&l.setAttribute("dir",g),k.append(l));x=l.append(I.element.clone(0,1));t!=l.getDirection(1)&&x.setAttribute("dir",t);for(f=0;f<I.contents.length;f++)x.append(I.contents[f].clone(1,1));m++}else if(I.indent==Math.max(r,0)+1)I=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,
null,m,e,I!=t?t:null),!x.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=h.$.documentMode&&x.append(h.createText(" ")),x.append(m.listNode),m=m.nextIndex;else if(-1==I.indent&&!d&&f){c[f.getName()]?(x=I.element.clone(!1,!0),t!=f.getDirection(1)&&x.setAttribute("dir",t)):x=new CKEDITOR.dom.documentFragment(h);var l=f.getDirection(1)!=t,M=I.element,R=M.getAttribute("class"),K=M.getAttribute("style"),G=x.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||l||K||R),O,Y=I.contents.length,S;
for(f=0;f<Y;f++)if(O=I.contents[f],n(O)&&1<Y)G?S=O.clone(1,1):x.append(O.clone(1,1));else if(O.type==CKEDITOR.NODE_ELEMENT&&O.isBlockBoundary()){l&&!O.getDirection()&&O.setAttribute("dir",t);D=O;var X=M.getAttribute("style");X&&D.setAttribute("style",X.replace(/([^;])$/,"$1;")+(D.getAttribute("style")||""));R&&O.addClass(R);D=null;S&&(x.append(S),S=null);x.append(O.clone(1,1))}else G?(D||(D=h.createElement(N),x.append(D),l&&D.setAttribute("dir",t)),K&&D.setAttribute("style",K),R&&D.setAttribute("class",
R),S&&(D.append(S),S=null),D.append(O.clone(1,1))):x.append(O.clone(1,1));S&&((D||x).append(S),S=null);x.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(t=x.getLast())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("br")&&t.remove(),(t=x.getLast(w))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(CKEDITOR.dtd.$block)||x.append(h.createElement("br")));t=x.$.nodeName.toLowerCase();"div"!=t&&"p"!=t||x.appendBogus();k.append(x);l=null;m++}else return null;D=null;if(a.length<=m||Math.max(a[m].indent,
0)<r)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&&(d=a,h=g=e=void 0,e=d.getDirection()))){for(g=d.getParent();g&&!(h=g.getDirection());)g=g.getParent();e==h&&d.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,nextIndex:m}}};var t=/^h[1-6]$/,r=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);a.prototype={exec:function(a){function b(a){return c[a.root.getName()]&&!d(a.root,[CKEDITOR.NODE_COMMENT])}
function d(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 l=a.config,m=a.getSelection(),r=m&&m.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var n=a.editable();if(n.getFirst(w)){var x=1==r.length&&r[0];(l=x&&x.getEnclosedNode())&&
l.is&&this.type==l.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else l.enterMode==CKEDITOR.ENTER_BR?n.appendBogus():r[0].fixBlock(1,l.enterMode==CKEDITOR.ENTER_P?"p":"div"),m.selectRanges(r)}for(var l=m.createBookmarks(!0),n=[],t={},r=r.createIterator(),F=0;(x=r.getNextRange())&&++F;){var H=x.getBoundaryNodes(),L=H.startNode,D=H.endNode;L.type==CKEDITOR.NODE_ELEMENT&&"td"==L.getName()&&x.setStartAt(H.startNode,CKEDITOR.POSITION_AFTER_START);D.type==CKEDITOR.NODE_ELEMENT&&"td"==D.getName()&&x.setEndAt(H.endNode,
CKEDITOR.POSITION_BEFORE_END);x=x.createIterator();for(x.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;H=x.getNextParagraph();)if(!H.getCustomData("list_block")&&!g(H)){CKEDITOR.dom.element.setMarker(t,H,"list_block",1);for(var N=a.elementPath(H),L=N.elements,D=0,N=N.blockLimit,I,M=L.length-1;0<=M&&(I=L[M]);M--)if(c[I.getName()]&&N.contains(I)){N.removeCustomData("list_group_object_"+F);(L=I.getCustomData("list_group_object"))?L.contents.push(H):(L={root:I,contents:[H]},n.push(L),CKEDITOR.dom.element.setMarker(t,
I,"list_group_object",L));D=1;break}D||(D=N,D.getCustomData("list_group_object_"+F)?D.getCustomData("list_group_object_"+F).contents.push(H):(L={root:D,contents:[H]},CKEDITOR.dom.element.setMarker(t,D,"list_group_object_"+F,L),n.push(L)))}}for(I=[];0<n.length;)L=n.shift(),this.state==CKEDITOR.TRISTATE_OFF?b(L)||(c[L.root.getName()]?e.call(this,a,L,t,I):h.call(this,a,L,I)):this.state==CKEDITOR.TRISTATE_ON&&c[L.root.getName()]&&!b(L)&&f.call(this,a,L,t);for(M=0;M<I.length;M++)k(I[M]);CKEDITOR.dom.element.clearAllMarkers(t);
m.selectBookmarks(l);a.focus()},refresh:function(a,b){var d=b.contains(c,1),e=b.blockLimit||b.root;d&&e.contains(d)?this.setState(d.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(d){d.blockless||(d.addCommand("numberedlist",new a("numberedlist","ol")),d.addCommand("bulletedlist",new a("bulletedlist","ul")),d.ui.addButton&&(d.ui.addButton("NumberedList",{label:d.lang.list.numberedlist,
command:"numberedlist",directional:!0,toolbar:"list,10"}),d.ui.addButton("BulletedList",{label:d.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),d.on("key",function(a){var e=a.data.domEvent.getKey(),g;if("wysiwyg"==d.mode&&e in{8:1,46:1}){var f=d.getSelection().getRanges()[0],h=f&&f.startPath();if(f&&f.collapsed){var k=8==e,r=d.editable(),n=new CKEDITOR.dom.walker(f.clone());n.evaluator=function(a){return w(a)&&!x(a)};n.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&
a.is("table"))};e=f.clone();if(k){var t;(t=h.contains(c))&&f.checkBoundaryOfElement(t,CKEDITOR.START)&&(t=t.getParent())&&t.is("li")&&(t=b(t))?(g=t,t=t.getPrevious(w),e.moveToPosition(t&&x(t)?t:g,CKEDITOR.POSITION_BEFORE_START)):(n.range.setStartAt(r,CKEDITOR.POSITION_AFTER_START),n.range.setEnd(f.startContainer,f.startOffset),(t=n.previous())&&t.type==CKEDITOR.NODE_ELEMENT&&(t.getName()in c||t.is("li"))&&(t.is("li")||(n.range.selectNodeContents(t),n.reset(),n.evaluator=l,t=n.previous()),g=t,e.moveToElementEditEnd(g),
e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(g)m(d,e,f),a.cancel();else{var F=h.contains(c);F&&f.checkBoundaryOfElement(F,CKEDITOR.START)&&(g=F.getFirst(w),f.checkBoundaryOfElement(g,CKEDITOR.START)&&(t=F.getPrevious(w),b(g)?t&&(f.moveToElementEditEnd(t),f.select()):d.execCommand("outdent"),a.cancel()))}}else if(g=h.contains("li")){if(n.range.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),k=(r=g.getLast(w))&&l(r)?r:g,h=0,(t=n.next())&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in
c&&t.equals(r)?(h=1,t=n.next()):f.checkBoundaryOfElement(k,CKEDITOR.END)&&(h=2),h&&t){f=f.clone();f.moveToElementEditStart(t);if(1==h&&(e.optimize(),!e.startContainer.equals(g))){for(g=e.startContainer;g.is(CKEDITOR.dtd.$inline);)F=g,g=g.getParent();F&&e.moveToPosition(F,CKEDITOR.POSITION_AFTER_END)}2==h&&(e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END),f.endPath().block&&f.moveToPosition(f.endPath().block,CKEDITOR.POSITION_AFTER_START));m(d,e,f);a.cancel()}}else n.range.setEndAt(r,
CKEDITOR.POSITION_BEFORE_END),(t=n.next())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(c)&&(t=t.getFirst(w),h.block&&f.checkStartOfBlock()&&f.checkEndOfBlock()?(h.block.remove(),f.moveToElementEditStart(t),f.select()):b(t)?(f.moveToElementEditStart(t),f.select()):(f=f.clone(),f.moveToElementEditStart(t),m(d,e,f)),a.cancel());setTimeout(function(){d.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(e){if(!e.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=e.addCommand("numberedListStyle",h);e.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=e.addCommand("bulletedListStyle",h);e.addFeature(h);CKEDITOR.dialog.add("bulletedListStyle",
this.path+"dialogs/liststyle.js");e.addMenuGroup("list",108);e.addMenuItems({numberedlist:{label:e.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:e.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});e.contextMenu.addListener(function(e){if(!e||e.isReadOnly())return null;for(;e;){var a=e.getName();if("ol"==a)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==a)return{bulletedlist:CKEDITOR.TRISTATE_OFF};e=e.getParent()}return null})}}};
CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)}(),"use strict",function(){function e(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){v(a,b);v(a,c);
a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function d(a,b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!U(b)||n(b)&&!w(b)&&!g(a,b)})}function k(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 m(a){var c=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',c),e=CKEDITOR.getUrl(this.path+"images/"+(H.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',c),{base:aa+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+
a.boxColor+";cursor:pointer;"+(H.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(H.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(da,c),{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(da,c),{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(){v(a,this);var b=a.holdDistance,c=this.size;return c&&k(a.mouse.y,c.top-b,c.bottom+b)&&k(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(),l={};this.trigger=d;e&&v(a,e,!0);g&&v(a,g,!0);v(a,
h,!0);a.inInlineMode&&q(a,!0);h.equals(c)?(l.left=b.scroll.x,l.right=-b.scroll.x,l.width=""):(l.left=f.size.left-f.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),l.width=f.size.outerWidth+f.size.margin.left+f.size.margin.right+b.scroll.x,l.right="");e&&g?l.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||(l.top=e.size.bottom+e.size.margin.bottom):l.top=g.size.top-g.size.margin.top;d.is(G)||k(l.top,b.scroll.y-15,b.scroll.y+5)?(l.top=a.inInlineMode?0:b.scroll.y,this.look(G)):d.is(O)||k(l.top,b.pane.bottom-5,b.pane.bottom+15)?(l.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1,this.look(O)):(a.inInlineMode&&(l.top-=b.editable.top+b.editable.border.top),this.look(Y));a.inInlineMode&&(l.top--,l.top+=b.editable.scroll.top,l.left+=b.editable.scroll.left);
for(var m in l)l[m]=CKEDITOR.tools.cssLength(l[m]);this.setStyles(l)},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(c=d.lineChildren.length;c--;)d.lineChildren[c].appendTo(d);d.look(Y);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(c){d.detach();b(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();H.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();c.data.preventDefault(!0)});d.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=d}function b(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,g;H.ie&&a.enterMode==CKEDITOR.ENTER_BR?g=a.doc.createText(S):(g=(g=l(a.element,!0))&&g.data("cke-enter-mode")||a.enterMode,g=new E(N[g],a.doc),g.is("br")||a.doc.createText(S).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 c(a,c){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function e(d){var g=H.ie&&9>H.version?" ":S,f=a.hotNode&&a.hotNode.getText()==g&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;b(a,function(b){f&&a.hotNode&&a.hotNode.remove();b[c?"insertAfter":"insertBefore"](d);b.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});H.ie||a.enterMode==
CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(b){b=b.getSelection().getStartElement();var g;b=b.getAscendant(T,1);if(!r(a,b)&&b&&!b.equals(a.editable)&&!b.contains(a.editable)){(g=l(b))&&"false"==g.getAttribute("contenteditable")&&(b=g);a.element=b;g=d(a,b,!c);var h;n(g)&&g.is(a.triggers)&&g.is(J)&&(!d(a,g,!c)||(h=d(a,g,!c))&&n(h)&&h.is(a.triggers))?e(g):(h=f(a,b),n(h)&&(d(a,h,!c)?(b=d(a,h,!c))&&n(b)&&b.is(a.triggers)&&e(h):e(h)))}}}()}}function g(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 t(a,b){return n(b)?b.is(a.triggers):null}function r(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 u(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ca)});if(!b)return!1;v(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,e=a.triggerOffset;q(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;g(a,b)&&(b=a.line.wrap[f?"getPrevious":"getNext"](function(a){return!(U(a)||V(a))}));if(!n(b)||w(b)||!t(a,b))return null;v(a,b);return!f&&0<=b.size.top&&k(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?G:Y,new h([null,b,I,K,a])):f&&b.size.bottom<=d.pane.height&&k(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode||k(b.size.bottom,d.pane.height-e,d.pane.height)?O:Y,new h([b,null,M,K,a])):null}function p(a){var b=a.mouse,c=a.view,e=a.triggerOffset,g=f(a);if(!g)return null;
v(a,g);var e=Math.min(e,0|g.size.outerHeight/2),l=[],m,r;if(k(b.y,g.size.top-1,g.size.top+e))r=!1;else if(k(b.y,g.size.bottom-e,g.size.bottom+1))r=!0;else return null;if(w(g)||u(a,g,r)||g.getParent().is(X))return null;var p=d(a,g,!r);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(w(p)||!t(a,p)||p.getParent().is(X))return null;l=[p,g][r?"reverse":"concat"]().concat([R,K])}}else g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?(q(a),r&&k(b.y,g.size.bottom-e,c.pane.height)&&
k(g.size.bottom,c.pane.height-e,c.pane.height)?m=O:k(b.y,0,g.size.top+e)&&(m=G)):m=Y,l=[null,g][r?"reverse":"concat"]().concat([r?M:I,K,m,g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?r?O:G:Y]);return 0 in l?new h(l):null}function y(a,b,c,d){for(var e=b.getDocumentPosition(),g={},f={},h={},k={},l=P.length;l--;)g[P[l]]=parseInt(b.getComputedStyle.call(b,"border-"+P[l]+"-width"),10)||0,h[P[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+P[l]),10)||0,f[P[l]]=parseInt(b.getComputedStyle.call(b,
"margin-"+P[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 v(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 q(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,q=a.mouse;q.y+f<m&&0<q.y-f;){k||(k=b(e,d));l||(l=b(g,d));!k&&0<q.y-f&&(e=c(a,{x:q.x,y:q.y-f}));!l&&q.y+f<m&&(g=c(a,{x:q.x,y:q.y+f}));if(k&&l)break;f+=2}return new h([e,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var e=a.config,k=e.magicline_triggerOffset||30,l={editor:a,enterMode:e.enterMode,triggerOffset:k,holdDistance:0|k*(e.magicline_holdDistance||.5),boxColor:e.magicline_color||"#ff0000",rtl:"rtl"==
e.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(e.magicline_tabuList||[]),triggers:e.magicline_everywhere?T:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},u,v,t;l.isRelevant=function(a){return n(a)&&!g(l,a)&&!w(a)};a.on("contentDom",function(){var k=a.editable(),n=a.document,w=a.window;C(l,{editable:k,inInlineMode:k.isInline(),doc:n,win:w,hotNode:null},!0);l.boundary=l.inInlineMode?l.editable:l.doc.getDocumentElement();k.is(D.$inline)||(l.inInlineMode&&!x(k)&&k.setStyles({position:"relative",
top:null,left:null}),m.call(this,l),B(l),k.attachListener(a,"beforeUndoImage",function(){l.line.detach()}),k.attachListener(a,"beforeGetData",function(){l.line.wrap.getParent()&&(l.line.detach(),a.once("getData",function(){l.line.attach()},null,null,1E3))},null,null,0),k.attachListener(l.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==a.mode)if(l.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;B(l);q(l,!0);var d=l.view.editable,e=l.view.scroll;c>d.left-e.x&&c<
d.right-e.x&&b>d.top-e.y&&b<d.bottom-e.y||(clearTimeout(t),t=null,l.line.detach())}else clearTimeout(t),t=null,l.line.detach()}),k.attachListener(k,"keyup",function(){l.hiddenMode=0}),k.attachListener(k,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:l.hiddenMode=1,l.line.detach()}}),k.attachListener(l.inInlineMode?k:n,"mousemove",function(b){v=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!t){var c={x:b.data.$.clientX,y:b.data.$.clientY};t=setTimeout(function(){l.mouse=
c;t=l.trigger=null;B(l);v&&!l.hiddenMode&&a.focusManager.hasFocus&&!l.line.mouseNear()&&(l.element=Z(l,!0))&&((l.trigger=z(l)||p(l)||ha(l))&&!r(l,l.trigger.upper||l.trigger.lower)?l.line.attach().place():(l.trigger=null,l.line.detach()),v=!1)},30)}}),k.attachListener(w,"scroll",function(){"wysiwyg"==a.mode&&(l.line.detach(),H.webkit&&(l.hiddenMode=1,clearTimeout(u),u=setTimeout(function(){l.mouseDown||(l.hiddenMode=0)},50)))}),k.attachListener(L?n:w,"mousedown",function(){"wysiwyg"==a.mode&&(l.line.detach(),
l.hiddenMode=1,l.mouseDown=1)}),k.attachListener(L?n:w,"mouseup",function(){l.hiddenMode=0;l.mouseDown=0}),a.addCommand("accessPreviousSpace",c(l)),a.addCommand("accessNextSpace",c(l,!0)),a.setKeystroke([[e.magicline_keystrokePrevious,"accessPreviousSpace"],[e.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")){l.hotNode=c;l.lastCmdDirection=
"true"===c.data("cke-magicline-dir")?!0:!1;return}}),a._.magiclineBackdoor={accessFocusSpace:b,boxTrigger:h,isLine:g,getAscendantTrigger:f,getNonEmptyNeighbour:d,getSize:y,that:l,triggerEdge:p,triggerEditable:z,triggerExpand:ha})},this)}});var C=CKEDITOR.tools.extend,E=CKEDITOR.dom.element,F=E.createFromHtml,H=CKEDITOR.env,L=CKEDITOR.env.ie&&9>CKEDITOR.env.version,D=CKEDITOR.dtd,N={},I=128,M=64,R=32,K=16,G=4,O=2,Y=1,S=" ",X=D.$listItem,ca=D.$tableContent,J=C({},D.$nonEditable,D.$empty),T=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;",da="\x3cspan\x3e"+S+"\x3c/span\x3e";N[CKEDITOR.ENTER_BR]="br";N[CKEDITOR.ENTER_P]="p";N[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 e=b.doc,f=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&g(b,h)&&(f.hide(),h=a(e,d),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||H.ie&&9>H.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),U=CKEDITOR.dom.walker.whitespaces(),V=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ha=function(){function b(d){var g=d.element,f,h,l;if(!n(g)||g.contains(d.editable)||g.isReadOnly())return null;
l=A(d,function(a,b){return!b.equals(a)},function(a,b){return Z(a,!0,b)},g);f=l.upper;h=l.lower;if(e(d,f,h))return l.set(R,8);if(f&&g.contains(f))for(;!f.getParent().equals(g);)f=f.getParent();else f=g.getFirst(function(a){return c(d,a)});if(h&&g.contains(h))for(;!h.getParent().equals(g);)h=h.getParent();else h=g.getLast(function(a){return c(d,a)});if(!f||!h)return null;v(d,f);v(d,h);if(!k(d.mouse.y,f.size.top,h.size.bottom))return null;for(var g=Number.MAX_VALUE,m,q,r,p;h&&!h.equals(f)&&(q=f.getNext(d.isRelevant));)m=
Math.abs(a(d,f,q)-d.mouse.y),m<g&&(g=m,r=f,p=q),f=q,v(d,f);if(!r||!p||!k(d.mouse.y,r.size.top,p.size.bottom))return null;l.upper=r;l.lower=p;return l.set(R,8)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||V(b)||w(b)||g(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(a){var c=b(a),d;if(d=c){d=c.upper;var g=c.lower;d=!d||!g||w(g)||w(d)||g.equals(d)||d.equals(g)||g.contains(d)||d.contains(g)?!1:t(a,d)&&t(a,g)&&e(a,d,g)?!0:!1}return d?c:null}}(),P=["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 e(e){return{"aria-label":e,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:e}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var e=("background:url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+
") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g," !important;");CKEDITOR.addCss("div.cke_pagebreak{"+e+"}")},init:function(e){e.blockless||(e.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),e.ui.addButton&&e.ui.addButton("PageBreak",{label:e.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&e.on("contentDom",function(){e.document.on("click",function(f){f=
f.data.getTarget();f.is("div")&&f.hasClass("cke_pagebreak")&&e.getSelection().selectElement(f)})}))},afterInit:function(h){function f(a){CKEDITOR.tools.extend(a.attributes,e(h.lang.pagebreak.alt),!0);a.children.length=0}var a=h.dataProcessor,d=a&&a.dataFilter,a=a&&a.htmlFilter,k=/page-break-after\s*:\s*always/i,l=/display\s*:\s*none/i;a&&a.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak","");if(c!=a){var d=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];
b.children.length=0;b.add(d);d=b.attributes;delete d["aria-label"];delete d.contenteditable;delete d.title}return c}}},{applyToAll:!0,priority:5});d&&d.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])f(a);else if(k.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(e){e.insertElement(CKEDITOR.plugins.pagebreak.createElement(e))},context:"div",allowedContent:{div:{styles:"!page-break-after"},
span:{match:function(e){return(e=e.parent)&&"div"==e.name&&e.styles&&e.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(h){return h.document.createElement("div",{attributes:e(h.lang.pagebreak.alt)})}}}(),function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(e){var h=0,f=CKEDITOR.plugins.getPath("pastetools"),a=this.path,d=void 0===e.config.pasteFromWord_inlineImages?!0:e.config.pasteFromWord_inlineImages,
f=[CKEDITOR.getUrl(f+"filter/common.js"),CKEDITOR.getUrl(f+"filter/image.js"),CKEDITOR.getUrl(a+"filter/default.js")];e.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,d){h=1;a.execCommand("paste",{type:"html",notification:d&&"undefined"!==typeof d.notification?d.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(e,"PasteFromWord",{label:e.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});e.pasteTools.register({filters:e.config.pasteFromWordCleanupFile?
[e.config.pasteFromWordCleanupFile]:f,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var d=CKEDITOR.plugins.pastetools.getContentGeneratorName(a),e=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,d=d?"microsoft"===d:e.test(a);return a&&(h||d)},handle:function(a,f){var m=a.data,b=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/html"),c=CKEDITOR.plugins.pastetools.getClipboardData(m,"text/rtf"),b={dataValue:b,dataTransfer:{"text/rtf":c}};
if(!1!==e.fire("pasteFromWord",b)||h){m.dontFilter=!0;if(h||!e.config.pasteFromWordPromptCleanup||confirm(e.lang.pastefromword.confirmCleanup))b.dataValue=CKEDITOR.cleanWord(b.dataValue,e),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&d&&CKEDITOR.pasteFilters.image&&(b.dataValue=CKEDITOR.pasteFilters.image(b.dataValue,e,c)),e.fire("afterPasteFromWord",b),m.dataValue=b.dataValue,!0===e.config.forcePasteAsPlainText?m.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==
e.config.forcePasteAsPlainText||(m.type="html");h=0;f()}}})}})}(),function(){var e={canUndo:!1,async:!0,exec:function(e,f){var a=e.lang,d=CKEDITOR.tools.keystrokeToString(a.common.keyboard,e.getCommandKeystroke(CKEDITOR.env.ie?e.commands.paste:this)),k=f&&"undefined"!==typeof f.notification?f.notification:!f||!f.from||"keystrokeHandler"===f.from&&CKEDITOR.env.ie,a=k&&"string"===typeof k?k:a.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+d.aria+'"\x3e'+d.display+"\x3c/kbd\x3e");
e.execCommand("paste",{type:"text",notification:k?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",e);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(e){var h=null;if("object"==typeof e)h=e;else if(e=(e||"").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(e))}else window.DOMParser&&(h=(new DOMParser).parseFromString(e,
"text/xml"));this.baseXml=h};CKEDITOR.xml.prototype={selectSingleNode:function(e,h){var f=this.baseXml;if(h||(h=f)){if("selectSingleNode"in h)return h.selectSingleNode(e);if(f.evaluate)return(f=f.evaluate(e,h,null,9,null))&&f.singleNodeValue||null}return null},selectNodes:function(e,h){var f=this.baseXml,a=[];if(h||(h=f)){if("selectNodes"in h)return h.selectNodes(e);if(f.evaluate&&(f=f.evaluate(e,h,null,5,null)))for(var d;d=f.iterateNext();)a.push(d)}return a},getInnerXml:function(e,h){var f=this.selectSingleNode(e,
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 e(){if(!CKEDITOR.env.ie||"file:"!=location.protocol)try{return new XMLHttpRequest}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(f){}return null}function h(a,
e){if(4!=a.readyState||!(200<=a.status&&300>a.status||304==a.status||0===a.status||1223==a.status))return null;switch(e){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 m=!!f,b=e();if(!b)return null;m&&"text"!==l&&"xml"!==l&&(b.responseType=l);b.open("GET",a,m);m&&(b.onreadystatechange=function(){4==b.readyState&&(f(h(b,l)),b=null)});b.send(null);
return m?"":h(b,l)}function a(a,f,l,m,b){var c=e();if(!c)return null;c.open("POST",a,!0);c.onreadystatechange=function(){4==c.readyState&&(m&&m(h(c,b)),c=null)};c.setRequestHeader("Content-type",l||"application/x-www-form-urlencoded; charset\x3dUTF-8");c.send(f)}return{load:function(a,e,h){return f(a,e,h||"text")},post:function(d,e,f,h){return a(d,e,f,h,"text")},loadXml:function(a,e){return f(a,e,"xml")},loadText:function(a,e){return f(a,e,"text")},loadBinary:function(a,e){return f(a,e,"arraybuffer")}}}()}(),
function(){function e(a,d){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(d)}).sort(function(a,c){return a.priority===c.priority?0:a.priority-c.priority})}function h(a,d){var b=a.shift();b&&b.handle(d,function(){h(a,d)})}function f(a){var d=CKEDITOR.tools.array.reduce(a,function(a,c){return CKEDITOR.tools.array.isArray(c.filters)?a.concat(c.filters):a},[]);return CKEDITOR.tools.array.filter(d,function(a,c){return CKEDITOR.tools.array.indexOf(d,a)===c})}function a(a,e){var b=0,
c,g;if(!CKEDITOR.tools.array.isArray(a)||0===a.length)return!0;c=CKEDITOR.tools.array.filter(a,function(a){return-1===CKEDITOR.tools.array.indexOf(d,a)});if(0<c.length)for(g=0;g<c.length;g++)(function(a){CKEDITOR.scriptLoader.queue(a,function(g){g&&d.push(a);++b===c.length&&e()})})(c[g]);return 0===c.length}var d=[],k=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(d){d.on("paste",
function(k){var b=e(this.handlers,k),c;if(0!==b.length){c=f(b);c=a(c,function(){return d.fire("paste",k.data)});if(!c)return k.cancel();h(b,k)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:["clipboard","ajax"],beforeInit:function(a){a.pasteTools=new k;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:a,createFilter:function(a){var d=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],b=a.additionalTransforms;return function(a,e){var f=new CKEDITOR.htmlParser.basicWriter,
h=new CKEDITOR.htmlParser.filter,k;b&&(a=b(a,e));CKEDITOR.tools.array.forEach(d,function(b){h.addRules(b(a,e,h))});k=CKEDITOR.htmlParser.fragment.fromHtml(a);h.applyTo(k);k.writeHtml(f);return f.getHtml()}},getClipboardData:function(a,d){var b;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===d?(b=a.dataTransfer.getData(d,!0))||"text/html"!==d?b:a.dataValue:null},getConfigValue:function(a,d){if(a&&a.config){var b=CKEDITOR.tools,c=a.config,e=b.object.keys(c),f=["pasteTools_"+
d,"pasteFromWord_"+d,"pasteFromWord"+b.capitalize(d,!0)],f=b.array.find(f,function(a){return-1!==b.array.indexOf(e,a)});return c[f]}},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(e){e.addCommand("removeFormat",
CKEDITOR.plugins.removeformat.commands.removeformat);e.ui.addButton&&e.ui.addButton("RemoveFormat",{label:e.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(e){for(var h=e._.removeFormatRegex||(e._.removeFormatRegex=new RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),f=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),a=CKEDITOR.plugins.removeformat.filter,
d=e.getSelection().getRanges(),k=d.createIterator(),l=function(a){return a.type==CKEDITOR.NODE_ELEMENT},m;m=k.getNextRange();){m.enlarge(CKEDITOR.ENLARGE_INLINE);var b=m.createBookmark(),c=b.startNode,g=b.endNode,n=function(b){for(var c=e.elementPath(b),d=c.elements,g=1,f;(f=d[g])&&!f.equals(c.block)&&!f.equals(c.blockLimit);g++)h.test(f.getName())&&a(e,f)&&b.breakParent(f)};n(c);if(g)for(n(g),c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);c&&!c.equals(g);)if(c.isReadOnly()){if(c.getPosition(g)&
CKEDITOR.POSITION_CONTAINS)break;c=c.getNext(l)}else n=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==c.getName()&&c.data("cke-realelement")||!a(e,c)||(h.test(c.getName())?c.remove(1):(c.removeAttributes(f),e.fire("removeFormatCleanup",c))),c=n;m.moveToBookmark(b)}e.forceNextSelectionCheck();e.getSelection().selectRanges(d)}}},filter:function(e,h){for(var f=e._.removeFormatFilters||[],a=0;a<f.length;a++)if(!1===f[a](h))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(e){this._.removeFormatFilters||
(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(e)},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("resize",{init:function(e){function h(d){var f=b.width,h=b.height,l=f+(d.data.$.screenX-m.x)*("rtl"==k?-1:1);d=h+(d.data.$.screenY-m.y);c&&(f=Math.max(a.resize_minWidth,Math.min(l,a.resize_maxWidth)));
g&&(h=Math.max(a.resize_minHeight,Math.min(d,a.resize_maxHeight)));e.resize(c?f:null,h)}function f(){CKEDITOR.document.removeListener("mousemove",h);CKEDITOR.document.removeListener("mouseup",f);e.document&&(e.document.removeListener("mousemove",h),e.document.removeListener("mouseup",f))}var a=e.config,d=e.ui.spaceId("resizer"),k=e.element?e.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,m,b,c=("both"==a.resize_dir||"horizontal"==a.resize_dir)&&a.resize_minWidth!=a.resize_maxWidth,g=("both"==a.resize_dir||"vertical"==a.resize_dir)&&a.resize_minHeight!=a.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(c){l||(l=e.getResizable());b={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0};m={x:c.screenX,y:c.screenY};a.resize_minWidth>
b.width&&(a.resize_minWidth=b.width);a.resize_minHeight>b.height&&(a.resize_minHeight=b.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",f);e.document&&(e.document.on("mousemove",h),e.document.on("mouseup",f));c.preventDefault&&c.preventDefault()});e.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});e.on("uiSpace",function(a){if("bottom"==a.data.space){var b="";c&&!g&&(b=" cke_resizer_horizontal");!c&&g&&(b=" cke_resizer_vertical");var f='\x3cspan id\x3d"'+d+'" class\x3d"cke_resizer'+
b+" cke_resizer_"+k+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==k?"◢":"◣")+"\x3c/span\x3e";"ltr"==k&&"ltr"==b?a.data.html+=f:a.data.html=f+a.data.html}},e,null,100);e.on("maximize",function(a){e.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){function e(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(e){if(e.editable().hasFocus){var f=e.getSelection(),
h;if(h=(new CKEDITOR.dom.elementPath(f.getCommonAncestor(),f.root)).contains({td:1,th:1},1)){var f=e.createRange(),b=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(b||a)if(b)b=new CKEDITOR.dom.element(b),f.moveToElementEditStart(b),f.checkStartOfBlock()&&f.checkEndOfBlock()||f.selectNodeContents(b);
else return!0;else{for(var c=h.getAscendant("table").$,b=h.getParent().$.cells,c=new CKEDITOR.dom.element(c.insertRow(-1),e.document),g=0,n=b.length;g<n;g++)c.append((new CKEDITOR.dom.element(b[g],e.document)).clone(!1,!1)).appendBogus();f.moveToElementEditStart(c)}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(d){for(var k=
!1!==d.config.enableTabKeyTools,l=d.config.tabSpaces||0,m="";l--;)m+=" ";if(m)d.on("key",function(a){9==a.data.keyCode&&(d.insertText(m),a.cancel())});if(k)d.on("key",function(a){(9==a.data.keyCode&&d.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&d.execCommand("selectPreviousCell"))&&a.cancel()});d.addCommand("blur",CKEDITOR.tools.extend(f,h));d.addCommand("blurBack",CKEDITOR.tools.extend(a,h));d.addCommand("selectNextCell",e());d.addCommand("selectPreviousCell",e(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=
function(e,h){var f=void 0===h?this.getTabIndex():h,a,d,k,l,m,b;if(0>=f)for(m=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);m;){if(m.isVisible()&&0===m.getTabIndex()){k=m;break}m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(m=this.getDocument().getBody().getFirst();m=m.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!d&&m.equals(this)){if(d=!0,e){if(!(m=m.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else d&&!this.contains(m)&&(a=1);if(m.isVisible()&&!(0>(b=m.getTabIndex()))){if(a&&
b==f){k=m;break}b>f&&(!k||!l||b<l)?(k=m,l=b):k||0!==b||(k=m,l=b)}}k&&k.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,h){for(var f=void 0===h?this.getTabIndex():h,a,d,k,l=0,m,b=this.getDocument().getBody().getLast();b=b.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!a)if(!d&&b.equals(this)){if(d=!0,e){if(!(b=b.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;a=1}}else d&&!this.contains(b)&&(a=1);if(b.isVisible()&&!(0>(m=b.getTabIndex())))if(0>=f){if(a&&0===m){k=b;break}m>
l&&(k=b,l=m)}else{if(a&&m==f){k=b;break}m<f&&(!k||m>l)&&(k=b,l=m)}}k&&k.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function h(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,e){this.setState(e.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var f=e.lang.table;e.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];"+
(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var d;if(a.styles.border)d=CKEDITOR.tools.style.parse.border(a.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var e=a.styles;e["border-left"]&&e["border-left"]===e["border-right"]&&e["border-right"]===e["border-top"]&&
e["border-top"]===e["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(e["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));e.addCommand("tableDelete",h({exec:function(a){var d=a.elementPath().contains("table",1);if(d){var e=d.getParent(),f=a.editable();1!=e.getChildCount()||e.is("td",
"th")||e.equals(f)||(d=e);a=a.createRange();a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();a.select()}}}));e.ui.addButton&&e.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");e.addMenuItems&&e.addMenuItems({table:{label:f.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:f.deleteTable,command:"tableDelete",group:"table",
order:1}});e.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(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(g,
a,"selected_cell",!0),e.push(a))}var e=[],g={};if(!a)return e;for(var f=a.getRanges(),h=0;h<f.length;h++){var k=f[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(g,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(g);
return e}function h(a,b){for(var c=t(a)?a:e(a),d=c[0],g=d.getAscendant("table"),d=d.getDocument(),f=c[0].getParent(),h=f.$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=new CKEDITOR.dom.element(g.$.rows[k]),h=b?h:k,f=b?f:c,c=CKEDITOR.tools.buildTableMap(g),g=c[h],h=b?c[h-1]:c[h+1],c=c[0].length,d=d.createElement("tr"),k=0;g[k]&&k<c;k++){var l;1<g[k].rowSpan&&h&&g[k]==h[k]?(l=g[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(g[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),
d.append(l),l=l.$);k+=l.colSpan-1}b?d.insertBefore(f):d.insertAfter(f);return d}function f(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),c=e(a),d=c[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(d),h=c[0].getParent().$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=[];a.reset();for(a=h;a<=k;a++){for(var l=g[a],m=new CKEDITOR.dom.element(d.$.rows[a]),n=0;n<l.length;n++){var t=new CKEDITOR.dom.element(l[n]),w=t.getParent().$.rowIndex;1==t.$.rowSpan?t.remove():
(--t.$.rowSpan,w==a&&(w=g[a+1],w[n-1]?t.insertAfter(new CKEDITOR.dom.element(w[n-1])):(new CKEDITOR.dom.element(d.$.rows[a+1])).append(t,1)));n+=t.$.colSpan-1}c.push(m)}g=d.$.rows;b[0].moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||d.$.parentNode);for(a=c.length;0<=a;a--)f(c[a]);return d.$.parentNode?h:(b[0].select(),null)}a instanceof CKEDITOR.dom.element&&(d=a.getAscendant("table"),1==d.$.rows.length?d.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 d(b,c){for(var d=c?Infinity:0,e=0;e<b.length;e++){var g=a(b[e]);if(c?g<d:g>d)d=g}return d}function k(a,b){for(var c=t(a)?a:e(a),g=c[0].getAscendant("table"),f=d(c,1),c=d(c),h=b?f:c,k=CKEDITOR.tools.buildTableMap(g),g=[],f=[],c=[],l=k.length,m=0;m<l;m++){var n=b?k[m][h-1]:k[m][h+1];g.push(k[m][h]);f.push(n)}for(m=0;m<l;m++)g[m]&&(1<g[m].colSpan&&f[m]==g[m]?(k=g[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(g[m]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[b?"insertBefore":"insertAfter"].call(k,h),c.push(k),k=k.$),m+=k.rowSpan-1);return c}function l(a){function b(a){var c=a.getRanges(),d,e;if(1!==c.length)return a;c=c[0];if(c.collapsed||0!==c.endOffset)return a;d=c.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;
c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return c.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=b(a));var c=a.getRanges(),d=e(a),g=d[0],f=d[d.length-1],d=g.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(d),k,l,m=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var t=0,w=h[n].length;t<w;t++)void 0===k&&h[n][t]==g.$&&(k=t),h[n][t]==f.$&&(l=t);for(n=k;n<=l;n++)for(t=0;t<h.length;t++)f=h[t],g=new CKEDITOR.dom.element(d.$.rows[t]),f=new CKEDITOR.dom.element(f[n]),f.$&&(1==f.$.colSpan?f.remove():--f.$.colSpan,
t+=f.$.rowSpan-1,g.$.cells.length||m.push(g));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(d.$.parentNode);m.length==a&&(c[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),c[0].select(),d.remove());return k}function m(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 b(a){if(a instanceof CKEDITOR.dom.selection){var d=
a.getRanges(),g=e(a),f=g[0]&&g[0].getAscendant("table"),h;a:{var k=0;h=g.length-1;for(var l={},m,n;m=g[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=g[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=g[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=g[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a=
g.length-1;0<=a;a--)b(g[a]);h?c(h,!0):f&&(d[0].moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),d[0].select(),f.remove())}else a instanceof CKEDITOR.dom.element&&(d=a.getParent(),1==d.getChildCount()?d.remove():a.remove())}function c(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 g(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,b,c){var d=e(a),f;if((b?1!=d.length:2>d.length)||(f=a.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;a=d[0];f=a.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(f),k=h.length,l=h[0].length,m=a.getParent().$.rowIndex,n=g(h,m,a),t;if(b){var w;try{var x=parseInt(a.getAttribute("rowspan"),10)||1;t=parseInt(a.getAttribute("colspan"),
10)||1;w=h["up"==b?m-x:"down"==b?m+x:m]["left"==b?n-t:"right"==b?n+t:n]}catch(L){return!1}if(!w||a.$==w)return!1;d["up"==b||"left"==b?"unshift":"push"](new CKEDITOR.dom.element(w))}b=a.getDocument();var D=m,x=w=0,N=!c&&new CKEDITOR.dom.documentFragment(b),I=0;for(b=0;b<d.length;b++){t=d[b];var M=t.getParent(),R=t.getFirst(),K=t.$.colSpan,G=t.$.rowSpan,M=M.$.rowIndex,O=g(h,M,t),I=I+K*G,x=Math.max(x,O-n+K);w=Math.max(w,M-m+G);c||(K=t,(G=K.getBogus())&&G.remove(),K.trim(),t.getChildren().count()&&(M==
D||!R||R.isBlockBoundary&&R.isBlockBoundary({br:1})||(D=N.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!D||D.is&&D.is("br")||N.append("br")),t.moveChildren(N)),b?t.remove():t.setHtml(""));D=M}if(c)return w*x==I;N.moveChildren(a);a.appendBogus();x>=l?a.removeAttribute("rowSpan"):a.$.rowSpan=w;w>=k?a.removeAttribute("colSpan"):a.$.colSpan=x;c=new CKEDITOR.dom.nodeList(f.$.rows);d=c.count();for(b=d-1;0<=b;b--)f=c.getItem(b),f.$.cells.length||(f.remove(),d++);return a}function w(a,b){var c=e(a);if(1<
c.length)return!1;if(b)return!0;var c=c[0],d=c.getParent(),f=d.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k=d.$.rowIndex,l=g(h,k,c),m=c.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),d=k+n,f=new CKEDITOR.dom.element(f.$.rows[d]),h=g(h,d),t,d=c.clone(),k=0;k<h.length;k++)if(t=h[k],t.parentNode==f.$&&k>l){d.insertBefore(new CKEDITOR.dom.element(t));break}else t=null;t||f.append(d)}else for(m=n=1,f=d.clone(),f.insertAfter(d),f.append(d=c.clone()),t=g(h,k),l=0;l<t.length;l++)t[l].rowSpan++;
d.appendBogus();c.$.rowSpan=n;d.$.rowSpan=m;1==n&&c.removeAttribute("rowSpan");1==m&&d.removeAttribute("rowSpan");return d}function x(a,b){var c=e(a);if(1<c.length)return!1;if(b)return!0;var c=c[0],d=c.getParent(),f=d.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),h=g(f,d.$.rowIndex,c),k=c.$.colSpan;if(1<k)d=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=d=1,l=[],m=0;m<f.length;m++){var n=f[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(f=0;f<l.length;f++)l[f].colSpan++}f=c.clone();
f.insertAfter(c);f.appendBogus();c.$.colSpan=d;f.$.colSpan=k;1==d&&c.removeAttribute("colSpan");1==k&&f.removeAttribute("colSpan");return f}var t=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function d(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,
t=CKEDITOR.tools.style.parse,v="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",d({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:v,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&t.background(a.styles.background).color},
right:function(a){a.styles["background-color"]=t.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",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=f(a))&&c(a)}}));g("rowInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);h(a,!0)}}));
g("rowInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);h(a)}}));g("columnDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=l(a))&&c(a,!0)}}));g("columnInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);k(a,!0)}}));g("columnInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);k(a)}}));g("cellDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();b(a)}}));g("cellMerge",
d({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());c(b.cell,!0)}}));g("cellMergeRight",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");c(b.cell,!0)}}));g("cellMergeDown",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");c(b.cell,!0)}}));g("cellVerticalSplit",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",
exec:function(a){c(x(a.getSelection()))}}));g("cellHorizontalSplit",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){c(w(a.getSelection()))}}));g("cellInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();m(a,!0)}}));g("cellInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();m(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",order:1,getItems:function(){var b=a.getSelection(),c=e(b),b=
{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(b,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(b,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:x(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:w(b,!0)?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED};a.filter.check(v)&&(b.tablecell_properties=0<c.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return b}},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:k,getSelectedCells:e};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e,h,f,a,d){e=e.$.rows;f=f||0;a="number"===typeof a?a:e.length-1;d="number"===typeof d?
d:-1;var k=-1,l=[];for(h=h||0;h<=a;h++){k++;!l[k]&&(l[k]=[]);for(var m=-1,b=f;b<=(-1===d?e[h].cells.length-1:d);b++){var c=e[h].cells[b];if(!c)break;for(m++;l[k][m];)m++;for(var g=isNaN(c.colSpan)?1:c.colSpan,c=isNaN(c.rowSpan)?1:c.rowSpan,n=0;n<c&&!(h+n>a);n++){l[k+n]||(l[k+n]=[]);for(var w=0;w<g;w++)l[k+n][m+w]=e[h].cells[b]}m+=g-1;if(-1!==d&&m>=d)break}}return l},"use strict",function(){function e(a,c){return CKEDITOR.tools.array.reduce(c,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 c(a){e.enabled&&!1!==a.data.command.canUndo&&e.save()}function d(){e.enabled=b.readOnly?!1:"wysiwyg"==b.mode;e.onChange()}var e=b.undoManager=new a(b),f=e.editingHandler=new l(e),k=b.addCommand("undo",{exec:function(){e.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=b.addCommand("redo",{exec:function(){e.redo()&&(b.selectionChange(),this.fire("afterRedo"))},
startDisabled:!0,canUndo:!1});b.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);e.onChange=function(){k.setState(e.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",c);b.on("afterCommandExec",c);b.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});b.on("contentDom",f.attachListeners,f);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload",
function(){"wysiwyg"==b.mode&&e.save(!0)});b.on("mode",d);b.on("readOnly",d);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(){e.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){e.currentImage&&e.update()});b.on("lockSnapshot",function(a){a=a.data;e.lock(a&&a.dontUpdate,a&&a.forceUpdate)});b.on("unlockSnapshot",e.unlock,e)}});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,c){var d=a.getKeyGroup(b),e=this.strokesRecorded[d]+1;c=c||e>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());
c?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[d]=e;this.previousKeyGroup=d},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,c,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;c||(c=new d(f));if(!1===c.contents)return!1;if(this.currentImage)if(c.equalsContent(this.currentImage)){if(a||c.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(c)-1;this.currentImage=
c;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var c=this.editor,d;a.bookmarks&&(c.focus(),d=c.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?d.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(d=this.editor.document.getBody().$.createTextRange(),d.collapse(!0),d.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();c.fire("change")},getNextImage:function(a){var c=this.snapshots,
d=this.currentImage,e;if(d)if(a)for(e=this.index-1;0<=e;e--){if(a=c[e],!d.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e<c.length;e++)if(a=c[e],!d.equalsContent(a))return a.index=e,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 d(this.editor));for(var c=this.index,e=this.snapshots;0<c&&this.currentImage.equalsContent(e[c-1]);)--c;e.splice(c,this.index-c+1,a);this.index=c;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var c=this.snapshots,d=c[c.length-1];return d.equalsContent(a)&&!d.equalsSelection(a)?(this.currentImage=c[c.length-1]=a,!0):!1},lock:function(a,c){if(this.locked)this.locked.level++;
else if(a)this.locked={level:1};else{var e=null;if(c)e=!0;else{var f=new d(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 c=new d(this.editor,!0);a.equalsContent(c)||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 c=a.keyGroups;return f[b]?c.FUNCTIONAL:c.PRINTABLE};a.getOppositeKeyGroup=function(b){var c=a.keyGroups;return b==c.FUNCTIONAL?c.PRINTABLE:c.FUNCTIONAL};a.ieFunctionalKeysBug=function(b){return CKEDITOR.env.ie&&a.getKeyGroup(b)==a.keyGroups.FUNCTIONAL};var d=CKEDITOR.plugins.undo.Image=function(a,c){this.editor=a;a.fire("beforeUndoImage");var d=a.getSnapshot();d&&(this.contents=
e(d,a.undoManager._filterRules));c||(this.bookmarks=(d=d&&a.getSelection())&&d.createBookmarks2(!0));a.fire("afterUndoImage")},k=/\b(?:href|src|name)="[^"]*?"/gi;d.prototype={equalsContent:function(a){var c=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(c=c.replace(k,""),a=a.replace(k,""));return c!=a?!1:!0},equalsSelection:function(a){var c=this.bookmarks;a=a.bookmarks;if(c||a){if(!c||!a||c.length!=a.length)return!1;for(var d=0;d<c.length;d++){var e=c[d],
f=a[d];if(e.startOffset!=f.startOffset||e.endOffset!=f.endOffset||!CKEDITOR.tools.arrayCompare(e.start,f.start)||!CKEDITOR.tools.arrayCompare(e.end,f.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new m;this.lastKeydownImage=null};l.prototype={onKeydown:function(b){var c=b.data.getKey();if(229!==c)if(-1<CKEDITOR.tools.indexOf(h,b.data.getKeystroke()))b.data.preventDefault();else if(this.keyEventsStack.cleanUp(b),
b=this.undoManager,this.keyEventsStack.getLast(c)||this.keyEventsStack.push(c),this.lastKeydownImage=new d(b.editor),a.isNavigationKey(c)||this.undoManager.keyGroupChanged(c))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 c=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 d(c.editor,!0))))if(0<e)c.type(b);else if(a.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(a){var c=this.undoManager;!a&&c.save(!0,null,!1)||c.updateSelection(new d(c.editor));
c.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var b=this.undoManager.editor,c=b.editable(),d=this;c.attachListener(c,"keydown",function(b){d.onKeydown(b);if(a.ieFunctionalKeysBug(b.data.getKey()))d.onInput()},null,null,999);c.attachListener(c,CKEDITOR.env.ie?"keypress":"input",d.onInput,d,null,999);c.attachListener(c,"keyup",d.onKeyup,d,null,999);c.attachListener(c,"paste",d.ignoreInputEventListener,
d,null,999);c.attachListener(c,"drop",d.ignoreInputEventListener,d,null,999);b.on("afterPaste",d.activateInputEventListener,d,null,999);c.attachListener(c.isInline()?c:b.document.getDocumentElement(),"click",function(){d.onNavigationKey()},null,null,999);c.attachListener(this.undoManager.editor,"blur",function(){d.keyEventsStack.remove(9)},null,null,999)}};var m=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};m.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 c=this.stack.length;c--;)if(this.stack[c].keyCode==a)return c;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,c=0;a--;)c+=this.stack[a].inputs;return c},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 e(a){function e(a){var b=!1;g.attachListener(g,"keydown",function(){var c=m.getBody().getElementsByTag(a);if(!b){for(var d=0;d<c.count();d++)c.getItem(d).setCustomData("retain",!0);b=!0}},null,null,1);g.attachListener(g,"keyup",function(){var c=m.getElementsByTag(a);b&&(1==c.count()&&!c.getItem(0).getCustomData("retain")&&
CKEDITOR.tools.isEmpty(c.getItem(0).getAttributes())&&c.getItem(0).remove(1),b=!1)})}var f=this.editor;if(f&&!f.isDetached()){var m=a.document,b=m.body,c=m.getElementById("cke_actscrpt");c&&c.parentNode.removeChild(c);(c=m.getElementById("cke_shimscrpt"))&&c.parentNode.removeChild(c);(c=m.getElementById("cke_basetagscrpt"))&&c.parentNode.removeChild(c);b.contentEditable=!0;CKEDITOR.env.ie&&(b.hideFocus=!0,b.disabled=!0,b.removeAttribute("disabled"));delete this._.isLoadingData;this.$=b;m=new CKEDITOR.dom.document(m);
this.setup();this.fixInitialSelection();var g=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&m.getDocumentElement().addClass(m.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&f.enterMode!=CKEDITOR.ENTER_P?e("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&f.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)m.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(m,"blur",function(){try{m.$.selection.empty()}catch(a){}});
CKEDITOR.env.iOS&&this.attachListener(m,"touchend",function(){a.focus()});b=f.document.getElementsByTag("title").getItem(0);b.data("cke-title",b.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 e(){var b;a.editable().attachListener(a,"selectionChange",
function(){var e=a.getSelection().getSelectedElement();e&&(b&&(b.detachEvent("onresizestart",f),b=null),e.$.attachEvent("onresizestart",f),b=e.$)})}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(b){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&e()}function f(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
var e=[],f;for(f in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+f+"[contenteditable\x3dfalse]");a.push(e.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(d){d.config.fullPage&&d.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});d.addMode("wysiwyg",function(e){function f(c){c&&c.removeListener();if(!d.isDestroyed()&&!d.isDetached()&&(d.editable(new a(d,x.getFrameDocument().getBody())),d.setData(d.getData(1),e),y)){if(p)d.on("mode",h,{iframe:x,editor:d,callback:e});d.on("mode",function(){d.status="ready"});b()}}function h(a){a&&a.removeListener();x.on("load",function(){z&&(z=!1,n())})}function b(){v=new MutationObserver(function(a){CKEDITOR.tools.array.forEach(a,c)});v.observe(d.config.observableParent,
{childList:!0,subtree:!0})}function c(a){"childList"===a.type&&0!==a.addedNodes.length&&CKEDITOR.tools.array.forEach(a.addedNodes,g)}function g(a){a.contains&&a.contains(d.container.$)&&(p?z=!0:n())}function n(){var b=d.getData(!1),c;d.editable().preserveIframe=!0;d.editable(null);c=new a(d,x.getFrameDocument().getBody());d.editable(c);d.status="recreating";d.setData(b,{callback:e,internal:!1,noSnapshot:!1})}var w="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",
w=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(w)+"}())":"",x=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+w+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');x.setStyles({width:"100%",height:"100%"});x.addClass("cke_wysiwyg_frame").addClass("cke_reset");w=d.ui.space("contents")||d.ui.contentsElement;w.append(x);var t=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(t)x.on("load",f);var r=d.title,u=d.fire("ariaEditorHelpLabel",
{}).label,z=!1,p=CKEDITOR.env.ie&&11===CKEDITOR.env.version,y=!!window.MutationObserver,v;r&&(CKEDITOR.env.ie&&u&&(r+=", "+u),x.setAttribute("title",r));if(u){var r=CKEDITOR.tools.getNextId(),q=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+r+'" class\x3d"cke_voice_label"\x3e'+u+"\x3c/span\x3e");w.append(q,1);x.setAttribute("aria-describedby",r)}d.on("beforeModeUnload",function(a){a.removeListener();q&&q.remove();y&&v.disconnect()});x.setAttributes({tabIndex:d.tabIndex,allowTransparency:"true"});
!t&&f();d.fire("ariaWidget",x)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var e=this.config,f=e.contentsCss;CKEDITOR.tools.isArray(f)||(e.contentsCss=f?[f]:[]);e.contentsCss.push(a)};a=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(e,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{preserveIframe:!1,setData:function(a,
e){var h=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var m=h.config,b=m.fullPage,c=m.docType,g=CKEDITOR.tools.buildStyleHtml(f()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');b||(g+=CKEDITOR.tools.buildStyleHtml(h.config.contentsCss));var n=m.baseHref?'\x3cbase href\x3d"'+m.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";b&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){h.docType=c=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,
function(a){h.xmlDeclaration=a;return""}));a=h.dataProcessor.toHtml(a);b?(/<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*>/,g+"$\x26"),a=c+a):a=m.docType+'\x3chtml dir\x3d"'+m.contentsLangDirection+
'" lang\x3d"'+(m.contentsLanguage||h.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+g+"\x3c/head\x3e\x3cbody"+(m.bodyId?' id\x3d"'+m.bodyId+'"':"")+(m.bodyClass?' class\x3d"'+m.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")));m='\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 \x26\x26 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&&(m+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');n&&
CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(m+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,m);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 e=a.config,f=e.fullPage,h=f&&a.docType,b=f&&a.xmlDeclaration,
c=this.getDocument(),f=f?c.getDocumentElement().getOuterHtml():c.getBody().getHtml();CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(f=f.replace(/<br>(?=\s*(:?$|<\/body>))/,""));f=a.dataProcessor.toDataFormat(f);b&&(f=b+"\n"+f);h&&(f=h+"\n"+f);return f},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:a.baseProto.focus.call(this)},detach:function(){if(!this.preserveIframe){var d=this.editor,e=d.document,d=d.container.findOne("iframe.cke_wysiwyg_frame");a.baseProto.detach.call(this);
this.clearCustomData(this._.expandoNumber);e.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);d&&(d.clearCustomData(),(e=d.removeCustomData("onResize"))&&e.removeListener(),d.isDetached()||d.remove())}}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.observableParent=CKEDITOR.document.$,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 e=function(e,f){var a=CKEDITOR.getUrl("plugins/"+f);e=e.split(",");for(var d=0;d<e.length;d++)CKEDITOR.skin.icons[e[d]]={path:a,offset:-e[++d],bgsize:e[++d]}};CKEDITOR.env.hidpi?e("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,,button,864,,checkbox,888,,form,912,,hiddenfield,936,,imagebutton,960,,radio,984,,select-rtl,1008,,select,1032,,textarea-rtl,1056,,textarea,1080,,textfield-rtl,1104,,textfield,1128,,horizontalrule,1152,,iframe,1176,,image,1200,,indent-rtl,1224,,indent,1248,,outdent-rtl,1272,,outdent,1296,,justifyblock,1320,,justifycenter,1344,,justifyleft,1368,,justifyright,1392,,language,1416,,anchor-rtl,1440,,anchor,1464,,link,1488,,unlink,1512,,bulletedlist-rtl,1536,,bulletedlist,1560,,numberedlist-rtl,1584,,numberedlist,1608,,mathjax,1632,,maximize,1656,,newpage-rtl,1680,,newpage,1704,,pagebreak-rtl,1728,,pagebreak,1752,,pastefromword-rtl,1776,,pastefromword,1800,,pastetext-rtl,1824,,pastetext,1848,,placeholder,1872,,preview-rtl,1896,,preview,1920,,print,1944,,removeformat,1968,,save,1992,,scayt,2016,,selectall,2040,,showblocks-rtl,2064,,showblocks,2088,,smiley,2112,,source-rtl,2136,,source,2160,,sourcedialog-rtl,2184,,sourcedialog,2208,,specialchar,2232,,table,2256,,templates-rtl,2280,,templates,2304,,uicolor,2328,,redo-rtl,2352,,redo,2376,,undo-rtl,2400,,undo,2424,,simplebox,4896,auto,spellchecker,2472,",
"icons_hidpi.png"):e("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,button,864,auto,checkbox,888,auto,form,912,auto,hiddenfield,936,auto,imagebutton,960,auto,radio,984,auto,select-rtl,1008,auto,select,1032,auto,textarea-rtl,1056,auto,textarea,1080,auto,textfield-rtl,1104,auto,textfield,1128,auto,horizontalrule,1152,auto,iframe,1176,auto,image,1200,auto,indent-rtl,1224,auto,indent,1248,auto,outdent-rtl,1272,auto,outdent,1296,auto,justifyblock,1320,auto,justifycenter,1344,auto,justifyleft,1368,auto,justifyright,1392,auto,language,1416,auto,anchor-rtl,1440,auto,anchor,1464,auto,link,1488,auto,unlink,1512,auto,bulletedlist-rtl,1536,auto,bulletedlist,1560,auto,numberedlist-rtl,1584,auto,numberedlist,1608,auto,mathjax,1632,auto,maximize,1656,auto,newpage-rtl,1680,auto,newpage,1704,auto,pagebreak-rtl,1728,auto,pagebreak,1752,auto,pastefromword-rtl,1776,auto,pastefromword,1800,auto,pastetext-rtl,1824,auto,pastetext,1848,auto,placeholder,1872,auto,preview-rtl,1896,auto,preview,1920,auto,print,1944,auto,removeformat,1968,auto,save,1992,auto,scayt,2016,auto,selectall,2040,auto,showblocks-rtl,2064,auto,showblocks,2088,auto,smiley,2112,auto,source-rtl,2136,auto,source,2160,auto,sourcedialog-rtl,2184,auto,sourcedialog,2208,auto,specialchar,2232,auto,table,2256,auto,templates-rtl,2280,auto,templates,2304,auto,uicolor,2328,auto,redo-rtl,2352,auto,redo,2376,auto,undo-rtl,2400,auto,undo,2424,auto,simplebox,2448,auto,spellchecker,2472,auto",
"icons.png")}())})();