/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,e={timestamp:"J9H6",version:"4.14.0 (Full)",revision:"5fa2a5b5f5",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),k=0;k<c.length;k++){var l=c[k].src.match(a);if(l){b=l[1];break}}-1==b.indexOf(":/")&&
"//"!=b.slice(0,2)&&(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);
return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),b())}catch(l){}}function b(){for(var a;a=c.shift();)a()}var c=[];return function(b){function d(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(d,1);return}a()}c.push(b);"complete"===document.readyState&&setTimeout(a,1);if(1==c.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);b=!1;try{b=!window.frameElement}catch(h){}document.documentElement.doScroll&&b&&d()}}}()},c=window.CKEDITOR_GETURL;if(c){var b=e.getUrl;e.getUrl=function(a){return c.call(e,a)||b.call(e,a)}}return e}());CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var e=CKEDITOR.event.prototype,c;for(c in e)null==a[c]&&(a[c]=e[c])},
CKEDITOR.event.prototype=function(){function a(a){var g=e(this);return g[a]||(g[a]=new c(a))}var e=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},c=function(a){this.name=a;this.listeners=[]};c.prototype={getListenerIndex:function(a){for(var g=0,c=this.listeners;g<c.length;g++)if(c[g].fn==a)return g;return-1}};return{define:function(b,g){var c=a.call(this,b);CKEDITOR.tools.extend(c,g,!0)},on:function(b,c,e,k,l){function d(a,f,n,d){a={name:b,sender:this,editor:a,
data:f,listenerData:k,stop:n,cancel:d,removeListener:h};return!1===c.call(e,a)?!1:a.data}function h(){n.removeListener(b,c)}var f=a.call(this,b);if(0>f.getListenerIndex(c)){f=f.listeners;e||(e=this);isNaN(l)&&(l=10);var n=this;d.fn=c;d.priority=l;for(var p=f.length-1;0<=p;p--)if(f[p].priority<=l)return f.splice(p+1,0,d),{removeListener:h};f.unshift(d)}return{removeListener:h}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.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,c=function(){a=1},m=0,k=function(){m=1};return function(l,d,h){var f=e(this)[l];l=a;var n=m;a=m=0;if(f){var p=f.listeners;if(p.length)for(var p=p.slice(0),v,x=0;x<p.length;x++){if(f.errorProof)try{v=p[x].call(this,h,d,c,k)}catch(q){}else v=p[x].call(this,h,d,c,k);!1===v?m=1:"undefined"!=typeof v&&(d=v);if(a||m)break}}d=
m?!1:"undefined"==typeof d?!0:d;a=l;m=n;return d}}(),fireOnce:function(a,c,m){c=this.fire(a,c,m);delete e(this)[a];return c},removeListener:function(a,c){var m=e(this)[a];if(m){var k=m.getListenerIndex(c);0<=k&&m.listeners.splice(k,1)}},removeAllListeners:function(){var a=e(this),c;for(c in a)delete a[c]},hasListeners:function(a){return(a=e(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(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),e=a.match(/edge[ \/](\d+.?\d*)/),c=-1<a.indexOf("trident/"),c=!(!e&&!c),c={ie:c,edge:!!e,webkit:!c&&
-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};c.gecko="Gecko"==navigator.product&&!c.webkit&&!c.ie;c.webkit&&(-1<a.indexOf("chrome")?c.chrome=
!0:c.safari=!0);var b=0;c.ie&&(b=e?parseFloat(e[1]):c.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,c.ie9Compat=9==b,c.ie8Compat=8==b,c.ie7Compat=7==b,c.ie6Compat=7>b||c.quirks);c.gecko&&(e=a.match(/rv:([\d\.]+)/))&&(e=e[1].split("."),b=1E4*e[0]+100*(e[1]||0)+1*(e[2]||0));c.air&&(b=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(b=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));c.version=b;c.isCompatible=!(c.ie&&7>b)&&!(c.gecko&&4E4>b)&&!(c.webkit&&
534>b);c.hidpi=2<=window.devicePixelRatio;c.needsBrFiller=c.gecko||c.webkit||c.ie&&10<b;c.needsNbspFiller=c.ie&&11>b;c.cssClass="cke_browser_"+(c.ie?"ie":c.gecko?"gecko":c.webkit?"webkit":"unknown");c.quirks&&(c.cssClass+=" cke_browser_quirks");c.ie&&(c.cssClass+=" cke_browser_ie"+(c.quirks?"6 cke_browser_iequirks":c.version));c.air&&(c.cssClass+=" cke_browser_air");c.iOS&&(c.cssClass+=" cke_browser_ios");c.hidpi&&(c.cssClass+=" cke_hidpi");return c}());"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 a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,e=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status=
"basic_ready",a&&a._load?a():e&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*e))})})();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(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:e})};CKEDITOR.error=function(a,e){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
{type:"error",errorCode:a,additionalData:e})};CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var e=console[a.data.type]?a.data.type:"log",c=a.data.errorCode;if(a=a.data.additionalData)console[e]("[CKEDITOR] Error code: "+c+".",a);else console[e]("[CKEDITOR] Error code: "+c+".");console[e]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+c)}},null,null,999);CKEDITOR.dom={};(function(){function a(a,f,d){this._minInterval=
a;this._context=d;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(f,d||{});var b=this;this.input=function(){function a(){b._lastOutput=(new Date).getTime();b._scheduledTimer=0;b._call()}if(!b._scheduledTimer||!1!==b._reschedule()){var f=(new Date).getTime()-b._lastOutput;f<b._minInterval?b._scheduledTimer=setTimeout(a,b._minInterval-f):a()}}}function e(f,d,b){a.call(this,f,d,b);this._args=[];var h=this;this.input=CKEDITOR.tools.override(this.input,function(a){return function(){h._args=
Array.prototype.slice.call(arguments);a.call(this)}})}var c=[],b=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",g=/&/g,m=/>/g,k=/</g,l=/"/g,d=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,h={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},f=function(a,f){return"#"==f[0]?String.fromCharCode(parseInt(f.slice(1),10)):h[f]};CKEDITOR.on("reset",function(){c=[]});CKEDITOR.tools={arrayCompare:function(a,f){if(!a&&!f)return!0;if(!a||!f||a.length!=f.length)return!1;
for(var d=0;d<a.length;d++)if(a[d]!=f[d])return!1;return!0},getIndex:function(a,f){for(var d=0;d<a.length;++d)if(f(a[d]))return d;return-1},clone:function(a){var f;if(a&&a instanceof Array){f=[];for(var d=0;d<a.length;d++)f[d]=CKEDITOR.tools.clone(a[d]);return f}if(null===a||"object"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;f=new a.constructor;for(d in a)f[d]=CKEDITOR.tools.clone(a[d]);return f},
capitalize:function(a,f){return a.charAt(0).toUpperCase()+(f?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var f=arguments.length,d,b;"boolean"==typeof(d=arguments[f-1])?f--:"boolean"==typeof(d=arguments[f-2])&&(b=arguments[f-1],f-=2);for(var h=1;h<f;h++){var c=arguments[h]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(c),function(f){if(!0===d||null==a[f])if(!b||f in b)a[f]=c[f]})}return a},prototypedCopy:function(a){var f=function(){};f.prototype=a;return new f},copy:function(a){var f=
{},d;for(d in a)f[d]=a[d];return f},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},isEmpty:function(a){for(var f in a)if(a.hasOwnProperty(f))return!1;return!0},cssVendorPrefix:function(a,f,d){if(d)return b+a+":"+f+";"+a+":"+f;d={};d[a]=f;d[b+a]=f;return d},cssStyleToDomStyle:function(){var a=document.createElement("div").style,f="undefined"!=typeof a.cssFloat?"cssFloat":"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?f:a.replace(/-./g,
function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var f,d=[],b=0;b<a.length;b++)if(f=a[b])/@import|[{}]/.test(f)?d.push("\x3cstyle\x3e"+f+"\x3c/style\x3e"):d.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+f+'"\x3e');return d.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(g,"\x26amp;").replace(m,"\x26gt;").replace(k,"\x26lt;")},htmlDecode:function(a){return a.replace(d,f)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(l,
"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a,f){var d=f==CKEDITOR.ENTER_BR,b=this.htmlEncode(a.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),h=f==CKEDITOR.ENTER_P?"p":"div";if(!d){var c=/\n{2}/g;if(c.test(b))var l="\x3c"+h+"\x3e",g="\x3c/"+h+"\x3e",b=l+b.replace(c,function(){return g+l})+g}b=b.replace(/\n/g,"\x3cbr\x3e");d||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+h+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,
2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,function(a,f){return f+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",f=0;8>f;f++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,f){var d=f(a);d.prototype=a.prototype;return d},setTimeout:function(a,f,d,b,h){h||(h=window);d||(d=
h);return h.setTimeout(function(){b?a.apply(d,[].concat(b)):a.apply(d)},f||0)},throttle:function(a,f,d){return new this.buffers.throttle(a,f,d)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(f){return f.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(f){return f.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(f){return f.replace(a,"")}}(),indexOf:function(a,f){if("function"==typeof f)for(var d=0,b=a.length;d<b;d++){if(f(a[d]))return d}else{if(a.indexOf)return a.indexOf(f);
d=0;for(b=a.length;d<b;d++)if(a[d]===f)return d}return-1},search:function(a,f){var d=CKEDITOR.tools.indexOf(a,f);return 0<=d?a[d]:null},bind:function(a,f){var d=Array.prototype.slice.call(arguments,2);return function(){return a.apply(f,d.concat(Array.prototype.slice.call(arguments)))}},createClass:function(a){var f=a.$,d=a.base,b=a.privates||a._,h=a.proto;a=a.statics;!f&&(f=function(){d&&this.base.apply(this,arguments)});if(b)var c=f,f=function(){var a=this._||(this._={}),f;for(f in b){var d=b[f];
a[f]="function"==typeof d?CKEDITOR.tools.bind(d,this):d}c.apply(this,arguments)};d&&(f.prototype=this.prototypedCopy(d.prototype),f.prototype.constructor=f,f.base=d,f.baseProto=d.prototype,f.prototype.base=function t(){this.base=d.prototype.base;d.apply(this,arguments);this.base=t});h&&this.extend(f.prototype,h,!0);a&&this.extend(f,a,!0);return f},addFunction:function(a,f){return c.push(function(){return a.apply(f||this,arguments)})-1},removeFunction:function(a){c[a]=null},callFunction:function(a){var f=
c[a];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,f;return function(d){f=CKEDITOR.tools.trim(d+"")+"px";return a.test(f)?f:d||""}}(),convertToPx:function(){var a;return function(f){a||(a=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(a));if(!/%$/.test(f)){var d=0>parseFloat(f);
d&&(f=f.replace("-",""));a.setStyle("width",f);f=a.$.clientWidth;return d?-f:f}return f}}(),repeat:function(a,f){return Array(f+1).join(a)},tryThese:function(){for(var a,f=0,d=arguments.length;f<d;f++){var b=arguments[f];try{a=b();break}catch(h){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var f=arguments,d=this;window.setTimeout(function(){a.apply(d,f)},0)}},normalizeCssText:function(a,f){var d=[],b,h=CKEDITOR.tools.parseCssText(a,
!0,f);for(b in h)d.push(b+":"+h[b]);d.sort();return d.length?d.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,f,d,b){a=[f,d,b];for(f=0;3>f;f++)a[f]=("0"+parseInt(a[f],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,f,d,b){a=f.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+b})},parseCssText:function(a,
f,d){var b={};d&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return b;a.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,d,h){f&&(d=d.toLowerCase(),"font-family"==d&&(h=h.replace(/\s*,\s*/g,",")),h=CKEDITOR.tools.trim(h));b[d]=h});return b},writeCssText:function(a,f){var d,b=[];for(d in a)b.push(d+":"+a[d]);f&&b.sort();return b.join("; ")},
objectCompare:function(a,f,d){var b;if(!a&&!f)return!0;if(!a||!f)return!1;for(b in a)if(a[b]!=f[b])return!1;if(!d)for(b in f)if(a[b]!=f[b])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,f){var d={};1==arguments.length&&(f=!0);for(var b=0,h=a.length;b<h;++b)d[a[b]]=f;return d},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(f){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=
a}return!!a},eventsBuffer:function(a,f,d){return new this.buffers.event(a,f,d)},enableHtml5Elements:function(a,f){for(var d="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(" "),b=d.length,h;b--;)h=a.createElement(d[b]),f&&a.appendChild(h)},checkIfAnyArrayItemMatches:function(a,f){for(var d=0,b=a.length;d<b;++d)if(a[d].match(f))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,
f){for(var d in a)if(d.match(f))return!0;return!1},keystrokeToString:function(a,f){var d=this.keystrokeToArray(a,f);d.display=d.display.join("+");d.aria=d.aria.join("+");return d},keystrokeToArray:function(a,f){var d=f&16711680,b=f&65535,h=CKEDITOR.env.mac,c=[],l=[];d&CKEDITOR.CTRL&&(c.push(h?"⌘":a[17]),l.push(h?a[224]:a[17]));d&CKEDITOR.ALT&&(c.push(h?"⌥":a[18]),l.push(a[18]));d&CKEDITOR.SHIFT&&(c.push(h?"⇧":a[16]),l.push(a[16]));b&&(a[b]?(c.push(a[b]),l.push(a[b])):(c.push(String.fromCharCode(b)),
l.push(String.fromCharCode(b))));return{display:c,aria:l}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();for(var f=document.cookie.split(";"),d,b,h=0;h<f.length;h++)if(d=f[h].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(d[0]).toLowerCase()),b===a)return decodeURIComponent(1<d.length?d[1]:"");return null},setCookie:function(a,f){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(f)+
";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],f="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var d=0;40>d;d++)a.push(Math.floor(256*Math.random()));for(d=0;d<a.length;d++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[d]%36),f=f+(.5<Math.random()?b.toUpperCase():b);a=f;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){return a?window.CSS&&
CSS.escape?CSS.escape(a):isNaN(parseInt(a.charAt(0),10))?a:"\\3"+a.charAt(0)+" "+a.substring(1,a.length):""},getMouseButton:function(a){return(a=a&&a.data?a.data.$:a)?CKEDITOR.tools.normalizeMouseButton(a.button):!1},normalizeMouseButton:function(a,f){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return a;for(var d=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],b=0;b<d.length;b++){var h=d[b];if(h[0]===a&&f)return h[1];if(!f&&
h[1]===a)return h[0]}},convertHexStringToBytes:function(a){var f=[],d=a.length/2,b;for(b=0;b<d;b++)f.push(parseInt(a.substr(2*b,2),16));return f},convertBytesToBase64:function(a){var f="",d=a.length,b;for(b=0;b<d;b+=3){var h=a.slice(b,b+3),c=h.length,l=[],g;if(3>c)for(g=c;3>g;g++)h[g]=0;l[0]=(h[0]&252)>>2;l[1]=(h[0]&3)<<4|h[1]>>4;l[2]=(h[1]&15)<<2|(h[2]&192)>>6;l[3]=h[2]&63;for(g=0;4>g;g++)f=g<=c?f+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l[g]):f+"\x3d"}return f},
style:{parse:{_colors:{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"},_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(a){var f={},d=this._findColor(a);d.length&&(f.color=d[0],CKEDITOR.tools.array.forEach(d,function(f){a=a.replace(f,"")}));if(a=CKEDITOR.tools.trim(a))f.unprocessed=a;return f},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,
function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(a,f){function d(a){b.top=h[a[0]];b.right=h[a[1]];b.bottom=h[a[2]];b.left=h[a[3]]}var b={},h=f?f(a):a.split(/\s+/);switch(h.length){case 1:d([0,0,0,0]);break;case 2:d([0,1,0,1]);break;case 3:d([0,1,2,1]);break;case 4:d([0,1,2,3])}return b},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(a)},_findColor:function(a){var f=[],d=CKEDITOR.tools.array,f=f.concat(a.match(this._rgbaRegExp)||
[]),f=f.concat(a.match(this._hslaRegExp)||[]);return f=f.concat(d.filter(a.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,f,d){var b=[];this.forEach(a,function(h,c){f.call(d,h,c,a)&&b.push(h)});return b},find:function(a,f,d){for(var b=a.length,h=0;h<b;){if(f.call(d,a[h],h,a))return a[h];h++}},forEach:function(a,f,d){var b=a.length,h;for(h=0;h<b;h++)f.call(d,a[h],h,a)},map:function(a,
f,d){for(var b=[],h=0;h<a.length;h++)b.push(f.call(d,a[h],h,a));return b},reduce:function(a,f,d,b){for(var h=0;h<a.length;h++)d=f.call(b,d,a[h],h,a);return d},every:function(a,f,d){if(!a.length)return!0;f=this.filter(a,f,d);return a.length===f.length},some:function(a,f,d){for(var b=0;b<a.length;b++)if(f.call(d,a[b],b,a))return!0;return!1}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),entries:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),
function(f){return[f,a[f]]})},values:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(f){return a[f]})},keys:function(a){var f=Object.prototype.hasOwnProperty,d=[],b=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!a||"object"!==typeof a)){f=[];if("string"===typeof a)for(d=0;d<a.length;d++)f.push(String(d));return f}for(var h in a)d.push(h);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)for(h=0;h<b.length;h++)f.call(a,b[h])&&d.push(b[h]);
return d},findKey:function(a,f){if("object"!==typeof a)return null;for(var d in a)if(a[d]===f)return d;return null},merge:function(a,f){var d=CKEDITOR.tools,b=d.clone(a),h=d.clone(f);d.array.forEach(d.object.keys(h),function(a){b[a]="object"===typeof h[a]&&"object"===typeof b[a]?d.object.merge(b[a],h[a]):h[a]});return b}},getAbsoluteRectPosition:function(a,f){function d(a){if(a){var f=a.getClientRect();b.top+=f.top;b.left+=f.left;"x"in b&&"y"in b&&(b.x+=f.x,b.y+=f.y);d(a.getWindow().getFrame())}}
var b=CKEDITOR.tools.copy(f);d(a.getFrame());var h=CKEDITOR.document.getWindow().getScrollPosition();b.top+=h.y;b.left+=h.x;"x"in b&&"y"in b&&(b.y+=h.y,b.x+=h.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};a.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}};e.prototype=CKEDITOR.tools.prototypedCopy(a.prototype);
e.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};e.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=a;CKEDITOR.tools.buffers.throttle=e;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(a){a=a||{};this.width=a.width;this.style=a.style;this.color=a.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g,"black"]]},normalize:function(){for(var a in this._.normalizeMap){var f=
this[a];f&&(this[a]=CKEDITOR.tools.array.reduce(this._.normalizeMap[a],function(a,f){return a.replace(f[0],f[1])},f))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(a){return!!a}).join(" ")}},statics:{fromCssRule:function(a){var f={},d=a.split(/\s+/g);a=CKEDITOR.tools.style.parse._findColor(a);a.length&&(f.color=a[0]);CKEDITOR.tools.array.forEach(d,function(a){f.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,
a)?!f.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&(f.width=a):f.style=a});return new CKEDITOR.tools.style.border(f)},splitCssValues:function(a,f){f=f||{};var d=CKEDITOR.tools.array.reduce(["width","style","color"],function(d,b){var h=a["border-"+b]||f[b];d[b]=h?CKEDITOR.tools.style.parse.sideShorthand(h):null;return d},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(f,b){var h={},c;for(c in d){var l=a["border-"+b+"-"+c];h[c]=l?l:d[c]&&d[c][b]}f["border-"+
b]=new CKEDITOR.tools.style.border(h);return f},{})}}});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 a=CKEDITOR.tools.extend,e=function(a,f){for(var d=CKEDITOR.tools.clone(a),b=1;b<arguments.length;b++){f=arguments[b];for(var c in f)delete d[c]}return d},c={},b={},g={address:1,article:1,aside:1,blockquote:1,details:1,div:1,
dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},k={},l={"#":1},d={center:1,dir:1,noframes:1};a(c,{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},l,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(b,g,c,d);e={a:e(c,{a:1,button:1}),abbr:c,address:b,area:k,article:b,aside:b,audio:a({source:1,track:1},b),b:c,base:k,bdi:c,bdo:c,blockquote:b,body:b,br:k,button:e(c,{a:1,button:1}),canvas:c,caption:b,cite:c,code:c,col:k,colgroup:{col:1},command:k,datalist:a({option:1},c),dd:b,del:c,details:a({summary:1},
b),dfn:c,div:b,dl:{dt:1,dd:1},dt:b,em:c,embed:k,fieldset:a({legend:1},b),figcaption:b,figure:a({figcaption:1},b),footer:b,form:b,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:a({title:1,base:1},m),header:b,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:a({head:1,body:1},b,m),i:c,iframe:l,img:k,input:k,ins:c,kbd:c,keygen:k,label:c,legend:c,li:b,link:k,main:b,map:b,mark:c,menu:a({li:1},b),meta:k,meter:e(c,{meter:1}),nav:b,noscript:a({link:1,meta:1,style:1},c),object:a({param:1},c),ol:{li:1},optgroup:{option:1},
option:l,output:c,p:c,param:k,pre:c,progress:e(c,{progress:1}),q:c,rp:c,rt:c,ruby:a({rp:1,rt:1},c),s:c,samp:c,script:l,section:b,select:{optgroup:1,option:1},small:c,source:k,span:c,strong:c,style:l,sub:c,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},c),sup:c,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:b,textarea:l,tfoot:{tr:1},th:b,thead:{tr:1},time:e(c,{time:1}),title:l,tr:{th:1,td:1},track:k,u:c,ul:{li:1},"var":c,video:a({source:1,track:1},b),wbr:k,acronym:c,applet:a({param:1},
b),basefont:k,big:c,center:b,dialog:k,dir:{li:1},font:c,isindex:k,noframes:b,strike:c,tt:c};a(e,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},g,d),$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:c,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},e.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 e}();CKEDITOR.dom.event=function(a){this.$=a};CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},
preventDefault:function(a){var e=this.$;e.preventDefault?e.preventDefault():e.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),
y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(a){a&&(this.$=a)};CKEDITOR.dom.domObject.prototype=function(){var a=function(a,c){return function(b){"undefined"!=typeof CKEDITOR&&a.fire(c,new CKEDITOR.dom.event(b))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||
this.setCustomData("_",a={});return a},on:function(e){var c=this.getCustomData("_cke_nativeListeners");c||(c={},this.setCustomData("_cke_nativeListeners",c));c[e]||(c=c[e]=a(this,e),this.$.addEventListener?this.$.addEventListener(e,c,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+e,c));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var c=this.getCustomData("_cke_nativeListeners"),
b=c&&c[a];b&&(this.$.removeEventListener?this.$.removeEventListener(a,b,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,b),delete c[a])}},removeAllListeners:function(){try{var a=this.getCustomData("_cke_nativeListeners"),c;for(c in a){var b=a[c];this.$.detachEvent?this.$.detachEvent("on"+c,b):this.$.removeEventListener&&this.$.removeEventListener(c,b,!1);delete a[c]}}catch(g){if(!CKEDITOR.env.edge||-2146828218!==g.number)throw g;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();(function(a){var e=
{};CKEDITOR.on("reset",function(){e={}});a.equals=function(a){try{return a&&a.$===this.$}catch(b){return!1}};a.setCustomData=function(a,b){var g=this.getUniqueId();(e[g]||(e[g]={}))[a]=b;return this};a.getCustomData=function(a){var b=this.$["data-cke-expando"];return(b=b&&e[b])&&a in b?b[a]:null};a.removeCustomData=function(a){var b=this.$["data-cke-expando"],b=b&&e[b],g,m;b&&(g=b[a],m=a in b,delete b[a]);return m?g:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.getUniqueId();
a&&delete e[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)})(CKEDITOR.dom.domObject.prototype);CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):
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(a,e){a.append(this,e);return a},clone:function(a,e){function c(b){b["data-cke-expando"]&&
(b["data-cke-expando"]=!1);if(b.nodeType==CKEDITOR.NODE_ELEMENT||b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(e||b.nodeType!=CKEDITOR.NODE_ELEMENT||b.removeAttribute("id",!1),a){b=b.childNodes;for(var g=0;g<b.length;g++)c(b[g])}}function b(c){if(c.type==CKEDITOR.NODE_ELEMENT||c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=c.getName();":"==g[0]&&c.renameNode(g.substring(1))}if(a)for(g=0;g<c.getChildCount();g++)b(c.getChild(g))}}var g=this.$.cloneNode(a);
c(g);g=new CKEDITOR.dom.node(g);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&b(g);return g},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);
return a},getAddress:function(a){for(var e=[],c=this.getDocument().$.documentElement,b=this;b&&b!=c;){var g=b.getParent();g&&e.unshift(this.getIndex.call(b,a));b=g}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function e(a,b){var c=b?a.getNext():a.getPrevious();return c&&c.type==CKEDITOR.NODE_TEXT?c.isEmpty()?e(c,b):c:null}var c=this,b=-1,g;if(!this.getParent()||a&&c.type==CKEDITOR.NODE_TEXT&&c.isEmpty()&&
!e(c)&&!e(c,!0))return-1;do if(!a||c.equals(this)||c.type!=CKEDITOR.NODE_TEXT||!g&&!c.isEmpty())b++,g=c.type==CKEDITOR.NODE_TEXT;while(c=c.getPrevious());return b},getNextSourceNode:function(a,e,c){if(c&&!c.call){var b=c;c=function(a){return!a.equals(b)}}a=!a&&this.getFirst&&this.getFirst();var g;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getNext()}for(;!a&&(g=(g||this).getParent());){if(c&&!1===c(g,!0))return null;a=g.getNext()}return!a||c&&!1===c(a)?null:e&&
e!=a.type?a.getNextSourceNode(!1,e,c):a},getPreviousSourceNode:function(a,e,c){if(c&&!c.call){var b=c;c=function(a){return!a.equals(b)}}a=!a&&this.getLast&&this.getLast();var g;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getPrevious()}for(;!a&&(g=(g||this).getParent());){if(c&&!1===c(g,!0))return null;a=g.getPrevious()}return!a||c&&!1===c(a)?null:e&&a.type!=e?a.getPreviousSourceNode(!1,e,c):a},getPrevious:function(a){var e=this.$,c;do c=(e=e.previousSibling)&&
10!=e.nodeType&&new CKEDITOR.dom.node(e);while(c&&a&&!a(c));return c},getNext:function(a){var e=this.$,c;do c=(e=e.nextSibling)&&new CKEDITOR.dom.node(e);while(c&&a&&!a(c));return c},getParent:function(a){var e=this.$.parentNode;return e&&(e.nodeType==CKEDITOR.NODE_ELEMENT||a&&e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(e):null},getParents:function(a){var e=this,c=[];do c[a?"push":"unshift"](e);while(e=e.getParent());return c},getCommonAncestor:function(a){if(a.equals(this))return this;
if(a.contains&&a.contains(this))return a;var e=this.contains?this:this.getParent();do if(e.contains(a))return e;while(e=e.getParent());return null},getPosition:function(a){var e=this.$,c=a.$;if(e.compareDocumentPosition)return e.compareDocumentPosition(c);if(e==c)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(e.contains){if(e.contains(c))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(c.contains(e))return CKEDITOR.POSITION_IS_CONTAINED+
CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in e)return 0>e.sourceIndex||0>c.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:e.sourceIndex<c.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}e=this.getAddress();a=a.getAddress();for(var c=Math.min(e.length,a.length),b=0;b<c;b++)if(e[b]!=a[b])return e[b]<a[b]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return e.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},
getAscendant:function(a,e){var c=this.$,b,g;e||(c=c.parentNode);"function"==typeof a?(g=!0,b=a):(g=!1,b=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof a?b==a:b in a});for(;c;){if(b(g?new CKEDITOR.dom.node(c):c))return new CKEDITOR.dom.node(c);try{c=c.parentNode}catch(m){c=null}}return null},hasAscendant:function(a,e){var c=this.$;e||(c=c.parentNode);for(;c;){if(c.nodeName&&c.nodeName.toLowerCase()==a)return!0;c=c.parentNode}return!1},move:function(a,e){a.append(this.remove(),
e)},remove:function(a){var e=this.$,c=e.parentNode;if(c){if(a)for(;a=e.firstChild;)c.insertBefore(e.removeChild(a),e);c.removeChild(e)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.ltrim(a.getText()),c=a.getLength();if(e)e.length<c&&(a.split(c-e.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},
rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.rtrim(a.getText()),c=a.getLength();if(e)e.length<c&&(a.split(e.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var e=this;this.type!=CKEDITOR.NODE_ELEMENT&&(e=this.getParent());CKEDITOR.env.edge&&
e&&e.is("textarea","input")&&(a=!0);if(!a&&e&&"undefined"!=typeof e.$.isContentEditable)return!(e.$.isContentEditable||e.data("cke-editable"));for(;e;){if(e.data("cke-editable"))return!1;if(e.hasAttribute("contenteditable"))return"false"==e.getAttribute("contenteditable");e=e.getParent()}return!0}});CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},
getViewPaneSize:function(){var a=this.$.document,e="CSS1Compat"==a.compatMode;return{width:(e?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(e?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?
new CKEDITOR.dom.element.get(a):null}});CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var e=new CKEDITOR.dom.element("link");e.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(e)}},appendStyleText:function(a){if(this.$.createStyleSheet){var e=
this.$.createStyleSheet("");e.cssText=a}else{var c=new CKEDITOR.dom.element("style",this);c.append(new CKEDITOR.dom.text(a,this));this.getHead().append(c)}return e||c.$.sheet},createElement:function(a,e){var c=new CKEDITOR.dom.element(a,this);e&&(e.attributes&&c.setAttributes(e.attributes),e.styles&&c.setStyles(e.styles));return c},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(e){return null}return new CKEDITOR.dom.element(a)},
getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,e){for(var c=this.$.documentElement,b=0;c&&b<a.length;b++){var g=a[b];if(e)for(var m=-1,k=0;k<c.childNodes.length;k++){var l=c.childNodes[k];if(!0!==e||3!=l.nodeType||!l.previousSibling||3!=l.previousSibling.nodeType)if(m++,m==g){c=l;break}}else c=c.childNodes[g]}return c?new CKEDITOR.dom.node(c):null},getElementsByTag:function(a,e){CKEDITOR.env.ie&&8>=document.documentMode||!e||(a=e+":"+
a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):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(a){this.$.open("text/html",
"replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,
!0),this.setCustomData("html5ShivFrag",a));return a}});CKEDITOR.dom.nodeList=function(a){this.$=a};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}};CKEDITOR.dom.element=function(a,e){"string"==typeof a&&(a=(e?e.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,
a)};CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,e){var c=new CKEDITOR.dom.element("div",e);c.setHtml(a);return c.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(a,e,c,b){var g=e.getCustomData("list_marker_id")||e.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),
m=e.getCustomData("list_marker_names")||e.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[g]=e;m[c]=1;return e.setCustomData(c,b)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var e in a)CKEDITOR.dom.element.clearMarkers(a,a[e],1)};CKEDITOR.dom.element.clearMarkers=function(a,e,c){var b=e.getCustomData("list_marker_names"),g=e.getCustomData("list_marker_id"),m;for(m in b)e.removeCustomData(m);e.removeCustomData("list_marker_names");c&&(e.removeCustomData("list_marker_id"),
delete a[g])};(function(){function a(a,d){return-1<(" "+a+" ").replace(m," ").indexOf(" "+d+" ")}function e(a){var d=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),d=!1);return function(){d||a.removeAttribute("id")}}function c(a,d){var b=CKEDITOR.tools.escapeCss(a.$.id);return"#"+b+" "+d.split(/,\s*/).join(", #"+b+" ")}function b(a){for(var d=0,b=0,f=k[a].length;b<f;b++)d+=parseFloat(this.getComputedStyle(k[a][b])||0,10)||0;return d}var g=document.createElement("_").classList,g="undefined"!==
typeof g&&null!==String(g.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:g?function(a){this.$.classList.add(a);return this}:function(b){var d=this.$.className;d&&(a(d,b)||(d+=" "+b));this.$.className=d||b;return this},removeClass:g?function(a){var d=this.$;d.classList.remove(a);d.className||d.removeAttribute("class");return this}:function(b){var d=this.getAttribute("class");d&&a(d,b)&&((d=d.replace(new RegExp("(?:^|\\s+)"+
b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",d):this.removeAttribute("class"));return this},hasClass:function(b){return a(this.$.className,b)},append:function(a,d){"string"==typeof a&&(a=this.getDocument().createElement(a));d?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var d=new CKEDITOR.dom.element("div",this.getDocument());d.setHtml(a);d.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,d){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);
var f=b.extractContents(!1,d||!1),c;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");c=f.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),b.append(c);b.insertAfter(this);b.remove(!0)}else f.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var d=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?d.contains(a.getParent().$):
d!=a.$&&d.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(d){}}return function(d){d?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 d=CKEDITOR.tools.extend({},
this.$.getBoundingClientRect());!d.width&&(d.width=d.right-d.left);!d.height&&(d.height=d.bottom-d.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),d):d},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var d=this.$;if(this.getParent())return d.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(d);d.innerHTML=a;b.removeChild(d);return a}catch(f){this.$.innerHTML="";d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML=a;for(d=d.getChildren();d.count();)this.append(d.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(d){this.$[a?"textContent":"innerText"]=d}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,
2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var d={},b=this.$.attributes,f;a=CKEDITOR.tools.isArray(a)?
a:[];for(f=0;f<b.length;f++)-1===CKEDITOR.tools.indexOf(a,b[f].name)&&(d[b[f].name]=b[f].value);return d},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 d=this.getWindow().$.getComputedStyle(this.$,null);return d?d.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 d=this.$.scopeName;"HTML"!=d&&(a=d.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var d=this.$.firstChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getNext(a));return d},getLast:function(a){var d=this.$.lastChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getPrevious(a));return d},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 d=0;d<arguments.length;d++)if(arguments[d]==a)return!0;return!1},isEditable:function(a){var d=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[d]||CKEDITOR.dtd.$empty[d]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[d]||
CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var d=this.clone(0,1);a=a.clone(0,1);d.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(d.$.isEqualNode)return d.$.style.cssText=CKEDITOR.tools.normalizeCssText(d.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),d.$.isEqualNode(a.$);d=d.getOuterHtml();a=
a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var b=this.getParent();b.type==CKEDITOR.NODE_ELEMENT&&(b=b.clone(),b.setHtml(d),d=b.getHtml(),b.setHtml(a),a=b.getHtml())}return d==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),d,b;a&&CKEDITOR.env.webkit&&(d=this.getWindow(),!d.equals(CKEDITOR.document.getWindow())&&(b=d.$.frameElement)&&(a=(new CKEDITOR.dom.element(b)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;
for(var a=this.getChildren(),d=0,b=a.count();d<b;d++){var f=a.getItem(d);if(f.type!=CKEDITOR.NODE_ELEMENT||!f.data("cke-bookmark"))if(f.type==CKEDITOR.NODE_ELEMENT&&!f.isEmptyInlineRemoveable()||f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,d=0;d<a.length;d++){var b=a[d];switch(b.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
default:if(b.specified)return!0}}return!1}:function(){var a=this.$.attributes,d=a.length,b={"data-cke-expando":1,_moz_dirty:1};return 0<d&&(2<d||!b[a[0].nodeName]||2==d&&!b[a[1].nodeName])},hasAttribute:function(){function a(d){var b=this.$.attributes.getNamedItem(d);if("input"==this.getName())switch(d){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return d=this.getAttribute("type"),"checkbox"==d||"radio"==d?"on"!=this.$.value:!!this.$.value}return b?
b.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(d){return"name"==d?!!this.$.name:a.call(this,d)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,d){var b=this.$;a=a.$;if(b!=a){var f;if(d)for(;f=b.lastChild;)a.insertBefore(b.removeChild(f),a.firstChild);else for(;f=b.firstChild;)a.appendChild(b.removeChild(f))}},mergeSiblings:function(){function a(d,b,f){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var c=
[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(c.push(b),b=f?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(d.isIdentical(b)){for(var g=f?d.getLast():d.getFirst();c.length;)c.shift().move(d,!f);b.moveChildren(d,!f);b.remove();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(d){if(!1===d||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,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d,b){"class"==d?this.$.className=b:"style"==d?this.$.style.cssText=b:"tabindex"==d?this.$.tabIndex=b:"checked"==d?this.$.checked=b:"contenteditable"==d?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(d,b){if("src"==d&&b.match(/^http:\/\//))try{a.apply(this,
arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var d in a)this.setAttribute(d,a[d]);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 h=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var b=[],c=0;c<h.length;c++)if(f)for(var g=
0;g<f.length;g++)b.push([a,h[c],f[g]].join("-"));else b.push([a,h[c]].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("*"),h=0,f=b.count();h<f;h++)a=b.getItem(h),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,h=0,f=this.getDocument(),c=f.getBody(),g="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
8!==CKEDITOR.env.version:1)){var e=this.$.getBoundingClientRect(),k=f.$.documentElement,m=k.clientTop||c.$.clientTop||0,u=k.clientLeft||c.$.clientLeft||0,w=!0;CKEDITOR.env.ie&&(w=f.getDocumentElement().contains(this),f=f.getBody().contains(this),w=g&&f||!g&&w);w&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=c.$.scrollLeft||k.scrollLeft,h=c.$.scrollTop||k.scrollTop):(h=g?c.$:k,b=h.scrollLeft,h=h.scrollTop),b=e.left+b-u,h=e.top+h-m)}else for(m=this,u=null;m&&"body"!=m.getName()&&
"html"!=m.getName();){b+=m.$.offsetLeft-m.$.scrollLeft;h+=m.$.offsetTop-m.$.scrollTop;m.equals(this)||(b+=m.$.clientLeft||0,h+=m.$.clientTop||0);for(;u&&!u.equals(m);)b-=u.$.scrollLeft,h-=u.$.scrollTop,u=u.getParent();u=m;m=(e=m.$.offsetParent)?new CKEDITOR.dom.element(e):null}a&&(e=this.getWindow(),m=a.getWindow(),!e.equals(m)&&e.$.frameElement&&(a=(new CKEDITOR.dom.element(e.$.frameElement)).getDocumentPosition(a),b+=a.x,h+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
g||(b+=this.$.clientLeft?1:0,h+=this.$.clientTop?1:0);return{x:b,y:h}},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 h=b.getWindow();try{var f=h.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(c){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,h){var f,c,g,e;function k(f,b){/body|html/.test(a.getName())?
a.getWindow().$.scrollBy(f,b):(a.$.scrollLeft+=f,a.$.scrollTop+=b)}function m(a,f){var b={x:0,y:0};if(!a.is(w?"body":"html")){var d=a.$.getBoundingClientRect();b.x=d.left;b.y=d.top}d=a.getWindow();d.equals(f)||(d=m(CKEDITOR.dom.element.get(d.$.frameElement),f),b.x+=d.x,b.y+=d.y);return b}function u(a,f){return parseInt(a.getComputedStyle("margin-"+f)||0,10)||0}!a&&(a=this.getWindow());g=a.getDocument();var w="BackCompat"==g.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=w?g.getBody():g.getDocumentElement());
CKEDITOR.env.webkit&&(g=this.getEditor(!1))&&(g._.previousScrollTop=null);g=a.getWindow();c=m(this,g);var t=m(a,g),z=this.$.offsetHeight;f=this.$.offsetWidth;var r=a.$.clientHeight,y=a.$.clientWidth;g=c.x-u(this,"left")-t.x||0;e=c.y-u(this,"top")-t.y||0;f=c.x+f+u(this,"right")-(t.x+y)||0;c=c.y+z+u(this,"bottom")-(t.y+r)||0;(0>e||0<c)&&k(0,!0===b?e:!1===b?c:0>e?e:c);h&&(0>g||0<f)&&k(0>g?g:f,0)},setState:function(a,b,h){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
"_off");this.removeClass(b+"_disabled");h&&this.setAttribute("aria-pressed",!0);h&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");h&&this.setAttribute("aria-disabled",!0);h&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),h&&this.removeAttribute("aria-pressed"),h&&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 h=this.$.attributes;b=b||{};for(var f=0;f<h.length;f++){var c=h[f],g=c.nodeName.toLowerCase(),e;if(!(g in b))if("checked"==g&&(e=this.getAttribute(g)))a.setAttribute(g,e);else if(!CKEDITOR.env.ie||this.hasAttribute(g))e=this.getAttribute(g),null===e&&(e=c.nodeValue),a.setAttribute(g,e)}""!==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,h){var f=b.childNodes;if(0<=h&&h<f.length)return f[h]}return function(b){var h=this.$;if(b.slice)for(b=b.slice();0<b.length&&h;)h=a(h,
b.shift());else h=a(h,b);return h?new CKEDITOR.dom.node(h):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,h,f,c;a=a||void 0===a;for(h in b)if(f=b[h],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(c=f.editable())&&(c.equals(this)||c.contains(this)))return f;return null},find:function(a){var b=e(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c(this,
a)));b();return a},findOne:function(a){var b=e(this);a=this.$.querySelector(c(this,a));b();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,h){if(!(h||b&&this.type!=b))var f=a(this);if(!1!==f){h=this.getChildren();for(var c=0;c<h.count();c++)f=h.getItem(c),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}},fireEventHandler:function(a,b){var h="on"+a,f=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var c=f.ownerDocument.createEventObject(),g;for(g in b)c[g]=b[g];f.fireEvent(h,
c)}else f[f[a]?a:h](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 k={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(a,d,h){"number"==typeof d&&(!h||CKEDITOR.env.ie&&CKEDITOR.env.quirks||
(d-=b.call(this,a)),this.setStyle(a,d+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,d){var h=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;d&&(h-=b.call(this,a));return h}})();CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,
insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.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 a(a,f){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 d,h=b.startContainer;d=b.endContainer;var c=b.startOffset,g=b.endOffset,n,e=this.guard,k=this.type,l=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var m=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),B=d.type==CKEDITOR.NODE_ELEMENT?d.getChild(g):d.getNext();this._.guardLTR=
function(a,f){return(!f||!m.equals(a))&&(!B||!a.equals(B))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(b.root))}}if(a&&!this._.guardRTL){var F=h.type==CKEDITOR.NODE_ELEMENT?h:h.getParent(),G=h.type==CKEDITOR.NODE_ELEMENT?c?h.getChild(c-1):null:h.getPrevious();this._.guardRTL=function(a,f){return(!f||!F.equals(a))&&(!G||!a.equals(G))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(b.root))}}var J=a?this._.guardRTL:this._.guardLTR;n=e?function(a,f){return!1===J(a,f)?!1:e(a,f)}:J;this.current?d=this.current[l](!1,
k,n):(a?d.type==CKEDITOR.NODE_ELEMENT&&(d=0<g?d.getChild(g-1):!1===n(d,!0)?null:d.getPreviousSourceNode(!0,k,n)):(d=h,d.type==CKEDITOR.NODE_ELEMENT&&((d=d.getChild(c))||(d=!1===n(h,!0)?null:h.getNextSourceNode(!0,k,n)))),d&&!1===n(d)&&(d=null));for(;d&&!this._.end;){this.current=d;if(!this.evaluator||!1!==this.evaluator(d)){if(!f)return d}else if(f&&this.evaluator)return!1;d=d[l](!1,k,n)}this.end();return this.current=null}function e(f){for(var b,d=null;b=a.call(this,f);)d=b;return d}CKEDITOR.dom.walker=
CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return e.call(this)},lastBackward:function(){return e.call(this,1)},reset:function(){delete this.current;this._={}}}});var c={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},b={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in b||!c[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(f){return!(f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,f){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(d){var h,c;h=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(c=d.getParent())&&b(c);h=a?h:h||b(d);return!!(f^h)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(f){var b;f&&f.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(f.getText())||CKEDITOR.env.webkit&&f.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
return!!(a^b)}};CKEDITOR.dom.walker.invisible=function(a){var f=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(d){f(d)?d=1:(d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent()),d=d.$.offsetWidth<=b);return!!(a^d)}};CKEDITOR.dom.walker.nodeType=function(a,f){return function(b){return!!(f^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function f(a){return!m(a)&&!k(a)}return function(b){var d=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&g.test(b.getText());d&&(d=b.getParent(),
b=b.getNext(f),d=d.isBlockBoundary()&&(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^d)}};CKEDITOR.dom.walker.temp=function(a){return function(f){f.type!=CKEDITOR.NODE_ELEMENT&&(f=f.getParent());f=f&&f.hasAttribute("data-cke-temp");return!!(a^f)}};var g=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),l=CKEDITOR.dom.walker.temp(),d=function(a){return k(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
CKEDITOR.dom.walker.ignored=function(a){return function(f){f=m(f)||k(f)||l(f);return!!(a^f)}};var h=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(f){for(var b=0,d=f.getChildCount();b<d;++b)if(!h(f.getChild(b)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var f={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(f[b]=1);return f}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
function(a){return function(b){b=h(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)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(d(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&g.test(a.getText()))?a:!1}})();CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
this.startOffset=this.startContainer=null;this.collapsed=!0;var e=a instanceof CKEDITOR.dom.document;this.document=e?a:a.getDocument();this.root=e?a.getBody():a};(function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function e(a,b,d,h,c){function g(a,f,b,d){var h=b?a.getPrevious():a.getNext();if(d&&l)return h;r||d?f.append(a.clone(!0,c),b):(a.remove(),m&&f.append(a,b));return h}function e(){var a,f,b,d=Math.min(H.length,
E.length);for(a=0;a<d;a++)if(f=H[a],b=E[a],!f.equals(b))return a;return a-1}function k(){var b=O-1,d=J&&K&&!y.equals(A);b<S-1||b<Q-1||d?(d?a.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START):Q==b+1&&G?a.moveToPosition(E[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(E[b+1],CKEDITOR.POSITION_BEFORE_START),h&&(b=H[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(d=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),d.insertAfter(b),
b.mergeSiblings(!1),a.moveToBookmark({startNode:d}))):a.collapse(!0)}a.optimizeBookmark();var l=0===b,m=1==b,r=2==b;b=r||m;var y=a.startContainer,A=a.endContainer,C=a.startOffset,B=a.endOffset,F,G,J,K,D,M;if(r&&A.type==CKEDITOR.NODE_TEXT&&(y.equals(A)||y.type===CKEDITOR.NODE_ELEMENT&&y.getFirst().equals(A)))d.append(a.document.createText(A.substring(C,B)));else{A.type==CKEDITOR.NODE_TEXT?r?M=!0:A=A.split(B):0<A.getChildCount()?B>=A.getChildCount()?(A=A.getChild(B-1),G=!0):A=A.getChild(B):K=G=!0;y.type==
CKEDITOR.NODE_TEXT?r?D=!0:y.split(C):0<y.getChildCount()?0===C?(y=y.getChild(C),F=!0):y=y.getChild(C-1):J=F=!0;for(var H=y.getParents(),E=A.getParents(),O=e(),S=H.length-1,Q=E.length-1,L=d,W,T,Z,ga=-1,N=O;N<=S;N++){T=H[N];Z=T.getNext();for(N!=S||T.equals(E[N])&&S<Q?b&&(W=L.append(T.clone(0,c))):F?g(T,L,!1,J):D&&L.append(a.document.createText(T.substring(C)));Z;){if(Z.equals(E[N])){ga=N;break}Z=g(Z,L)}L=W}L=d;for(N=O;N<=Q;N++)if(d=E[N],Z=d.getPrevious(),d.equals(H[N]))b&&(L=L.getChild(0));else{N!=
Q||d.equals(H[N])&&Q<S?b&&(W=L.append(d.clone(0,c))):G?g(d,L,!1,K):M&&L.append(a.document.createText(d.substring(0,B)));if(N>ga)for(;Z;)Z=g(Z,L,!0);L=W}r||k()}}function c(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),h=CKEDITOR.dom.walker.bogus();return function(c){return d(c)||b(c)?!0:h(c)&&!a?a=!0:c.type==CKEDITOR.NODE_TEXT&&(c.hasAscendant("pre")||CKEDITOR.tools.trim(c.getText()).length)||c.type==CKEDITOR.NODE_ELEMENT&&!c.is(m)?!1:!0}}function b(a){var b=CKEDITOR.dom.walker.whitespaces(),
d=CKEDITOR.dom.walker.bookmark(1);return function(h){return d(h)||b(h)?!0:!a&&k(h)||h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.$removeEmpty)}}function g(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&h(a)&&(b=a);return d(a)&&!(k(a)&&a.equals(b))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=CKEDITOR.dom.walker.bogus(),
l=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,d=CKEDITOR.dom.walker.editable(),h=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||e(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||e(this,0,null,a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||e(this,1,d,a,"undefined"==typeof b?!0:b);return d},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&
this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var b;if(b=a.data&&a.data("cke-temp"))b=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return b},!0)}var d=this.startContainer,h=this.endContainer,c=this.collapsed,g,e,k,l;g=this.document.createElement("span");g.data("cke-bookmark",1);g.setStyle("display","none");g.setHtml("\x26nbsp;");a&&(k="cke_bm_"+
CKEDITOR.tools.getNextNumber(),g.setAttribute("id",k+(c?"C":"S")));c||(e=g.clone(),e.setHtml("\x26nbsp;"),a&&e.setAttribute("id",k+"E"),l=this.clone(),b(h)&&(h=b(h),l.moveToPosition(h,CKEDITOR.POSITION_AFTER_END)),l.collapse(),l.insertNode(e));l=this.clone();b(d)&&(h=b(d),l.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START));l.collapse(!0);l.insertNode(g);e?(this.setStartAfter(g),this.setEndBefore(e)):this.moveToPosition(g,CKEDITOR.POSITION_AFTER_END);return{startNode:a?k+(c?"C":"S"):g,endNode:a?k+
"E":e,serializable:a,collapsed:c}},createBookmark2:function(){function a(b){var f=b.container,h=b.offset,c;c=f;var g=h;c=c.type!=CKEDITOR.NODE_ELEMENT||0===g||g==c.getChildCount()?0:c.getChild(g-1).type==CKEDITOR.NODE_TEXT&&c.getChild(g).type==CKEDITOR.NODE_TEXT;c&&(f=f.getChild(h-1),h=f.getLength());if(f.type==CKEDITOR.NODE_ELEMENT&&0<h){a:{for(c=f;h--;)if(g=c.getChild(h).getIndex(!0),0<=g){h=g;break a}h=-1}h+=1}if(f.type==CKEDITOR.NODE_TEXT){c=f;for(g=0;(c=c.getPrevious())&&c.type==CKEDITOR.NODE_TEXT;)g+=
c.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;c=g;f.isEmpty()?(g=f.getPrevious(d),c?(h=c,f=g?g.getNext():f.getParent().getFirst()):(f=f.getParent(),h=g?g.getIndex(!0)+1:0)):h+=c}b.container=f;b.offset=h}function b(a,f){var d=f.getCustomData("cke-fillingChar");if(d){var h=a.container;d.equals(h)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=h.getIndex(),a.container=h.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,
!0);return function(d){var h=this.collapsed,c={container:this.startContainer,offset:this.startOffset},g={container:this.endContainer,offset:this.endOffset};d&&(a(c),b(c,this.root),h||(a(g),b(g,this.root)));return{start:c.container.getAddress(d),end:h?null:g.container.getAddress(d),startOffset:c.offset,endOffset:g.offset,normalized:d,collapsed:h,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,h=a.end&&this.document.getByAddress(a.end,
a.normalized);a=a.endOffset;this.setStart(b,d);h?this.setEnd(h,a):this.collapse(!0)}else b=(d=a.serializable)?this.document.getById(a.startNode):a.startNode,a=d?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,d=this.startOffset,h=this.endOffset,c;if(a.type==CKEDITOR.NODE_ELEMENT)if(c=a.getChildCount(),c>d)a=a.getChild(d);else if(1>c)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(c=b.getChildCount(),c>h)b=b.getChild(h).getPreviousSourceNode(!0);else if(1>c)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 d=this.startContainer,h=this.endContainer,d=d.equals(h)?a&&d.type==CKEDITOR.NODE_ELEMENT&&
this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(h);return b&&!d.is?d.getParent():d},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 d=this.startContainer,h=this.startOffset,c=this.collapsed;if((!a||c)&&d&&d.type==CKEDITOR.NODE_TEXT){if(h)if(h>=d.getLength())h=d.getIndex()+1,d=d.getParent();else{var g=d.split(h),h=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(g,this.endOffset-this.startOffset):d.equals(this.endContainer)&&
(this.endOffset+=1)}else h=d.getIndex(),d=d.getParent();this.setStart(d,h);if(c){this.collapse(!0);return}}d=this.endContainer;h=this.endOffset;b||c||!d||d.type!=CKEDITOR.NODE_TEXT||(h?(h>=d.getLength()||d.split(h),h=d.getIndex()+1):h=d.getIndex(),d=d.getParent(),this.setEnd(d,h))},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var h=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:var g=
function(a,b){var f=new CKEDITOR.dom.range(k);f.setStart(a,b);f.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var f=new CKEDITOR.dom.walker(f),d;for(f.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};d=f.next();){if(d.type!=CKEDITOR.NODE_TEXT)return!1;F=d!=a?d.getText():d.substring(b);if(h.test(F))return!1}return!0};if(this.collapsed)break;var e=this.getCommonAncestor(),k=this.root,l,m,r,y,A,C=!1,B,F;B=this.startContainer;var G=this.startOffset;B.type==CKEDITOR.NODE_TEXT?
(G&&(B=!CKEDITOR.tools.trim(B.substring(0,G)).length&&B,C=!!B),B&&((y=B.getPrevious())||(r=B.getParent()))):(G&&(y=B.getChild(G-1)||B.getLast()),y||(r=B));for(r=d(r);r||y;){if(r&&!y){!A&&r.equals(e)&&(A=!0);if(c?r.isBlockBoundary():!k.contains(r))break;C&&"inline"==r.getComputedStyle("display")||(C=!1,A?l=r:this.setStartBefore(r));y=r.getPrevious()}for(;y;)if(B=!1,y.type==CKEDITOR.NODE_COMMENT)y=y.getPrevious();else{if(y.type==CKEDITOR.NODE_TEXT)F=y.getText(),h.test(F)&&(y=null),B=/[\s\ufeff]$/.test(F);
else if((y.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&y.is("br"))&&!y.data("cke-bookmark"))if(C&&CKEDITOR.dtd.$removeEmpty[y.getName()]){F=y.getText();if(h.test(F))y=null;else for(var G=y.$.getElementsByTagName("*"),J=0,K;K=G[J++];)if(!CKEDITOR.dtd.$removeEmpty[K.nodeName.toLowerCase()]){y=null;break}y&&(B=!!F.length)}else y=null;B&&(C?A?l=r:r&&this.setStartBefore(r):C=!0);if(y){B=y.getPrevious();if(!r&&!B){r=y;y=null;break}y=B}else r=null}r&&(r=d(r.getParent()))}B=this.endContainer;G=this.endOffset;
r=y=null;A=C=!1;B.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(B.substring(G)).length?C=!0:(C=!B.getLength(),G==B.getLength()?(y=B.getNext())||(r=B.getParent()):g(B,G)&&(r=B.getParent())):(y=B.getChild(G))||(r=B);for(;r||y;){if(r&&!y){!A&&r.equals(e)&&(A=!0);if(c?r.isBlockBoundary():!k.contains(r))break;C&&"inline"==r.getComputedStyle("display")||(C=!1,A?m=r:r&&this.setEndAfter(r));y=r.getNext()}for(;y;){B=!1;if(y.type==CKEDITOR.NODE_TEXT)F=y.getText(),g(y,0)||(y=null),B=/^[\s\ufeff]/.test(F);else if(y.type==
CKEDITOR.NODE_ELEMENT){if((0<y.$.offsetWidth||b&&y.is("br"))&&!y.data("cke-bookmark"))if(C&&CKEDITOR.dtd.$removeEmpty[y.getName()]){F=y.getText();if(h.test(F))y=null;else for(G=y.$.getElementsByTagName("*"),J=0;K=G[J++];)if(!CKEDITOR.dtd.$removeEmpty[K.nodeName.toLowerCase()]){y=null;break}y&&(B=!!F.length)}else y=null}else B=1;B&&C&&(A?m=r:this.setEndAfter(r));if(y){B=y.getNext();if(!r&&!B){r=y;y=null;break}y=B}else r=null}r&&(r=d(r.getParent()))}l&&m&&(e=l.contains(m)?m:l,this.setStartBefore(e),
this.setEndAfter(e));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=new CKEDITOR.dom.range(this.root);k=this.root;r.setStartAt(k,CKEDITOR.POSITION_AFTER_START);r.setEnd(this.startContainer,this.startOffset);r=new CKEDITOR.dom.walker(r);var D,M,H=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),E=null,O=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(E){if(E.equals(a)){E=null;return}}else E=
a;else if(E)return;var b=H(a);b||(D=a);return b},c=function(a){var b=O(a);!b&&a.is&&a.is("br")&&(M=a);return b};r.guard=O;r=r.lastBackward();D=D||k;this.setStartAt(D,!D.is("br")&&(!r&&this.checkStartOfBlock()||r&&D.contains(r))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){r=this.clone();r=new CKEDITOR.dom.walker(r);var S=CKEDITOR.dom.walker.whitespaces(),Q=CKEDITOR.dom.walker.bookmark();r.evaluator=function(a){return!S(a)&&!Q(a)};if((r=r.previous())&&
r.type==CKEDITOR.NODE_ELEMENT&&r.is("br"))break}r=this.clone();r.collapse();r.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);r=new CKEDITOR.dom.walker(r);r.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:O;D=E=M=null;r=r.lastForward();D=D||k;this.setEndAt(D,!r&&this.checkEndOfBlock()||r&&D.contains(r)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);M&&this.setEndAfter(M)}},shrink:function(a,b,d){var h="boolean"===typeof d?d:d&&"boolean"===typeof d.shrinkOnBlockBoundary?d.shrinkOnBlockBoundary:
!0,c=d&&d.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var g=this.clone(),e=this.startContainer,k=this.endContainer,l=this.startOffset,m=this.endOffset,r=d=1;e&&e.type==CKEDITOR.NODE_TEXT&&(l?l>=e.getLength()?g.setStartAfter(e):(g.setStartBefore(e),d=0):g.setStartBefore(e));k&&k.type==CKEDITOR.NODE_TEXT&&(m?m>=k.getLength()?g.setEndAfter(k):(g.setEndAfter(k),r=0):g.setEndBefore(k));var g=new CKEDITOR.dom.walker(g),y=CKEDITOR.dom.walker.bookmark(),A=CKEDITOR.dom.walker.bogus();g.evaluator=
function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var C;g.guard=function(b,d){if(c&&A(b)||y(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(C)||!1===h&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||(C=b);return!0};d&&(e=g[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_BEFORE_START);r&&(g.reset(),(g=g[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(g,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!d&&!r)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,d=b.getChild(this.startOffset);d?a.insertBefore(d):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(b,d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=d;this.endContainer||(this._setEndContainer(b),this.endOffset=d);a(this)},setEnd:function(b,
d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=d;this.startContainer||(this._setStartContainer(b),this.startOffset=d);a(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(b,
d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,d){switch(d){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,
b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var d=this.createBookmark(),h=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(h);h.trim();this.insertNode(h);var c=h.getBogus();c&&c.remove();h.appendBogus();this.moveToBookmark(d);return h},splitBlock:function(a,b){var d=
new CKEDITOR.dom.elementPath(this.startContainer,this.root),h=new CKEDITOR.dom.elementPath(this.endContainer,this.root),c=d.block,g=h.block,e=null;if(!d.blockLimit.equals(h.blockLimit))return null;"br"!=a&&(c||(c=this.fixBlock(!0,a),g=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),g||(g=this.fixBlock(!1,a)));d=c&&this.checkStartOfBlock();h=g&&this.checkEndOfBlock();this.deleteContents();c&&c.equals(g)&&(h?(e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g,
CKEDITOR.POSITION_AFTER_END),g=null):d?(e=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),c=null):(g=this.splitElement(c,b||!1),c.is("ul","ol")||c.appendBogus()));return{previousBlock:c,nextBlock:g,wasStartOfBlock:d,wasEndOfBlock:h,elementPath:e}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,b||!1),h=a.clone(!1,b||!1);d.appendTo(h);h.insertAfter(a);
this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return h},removeEmptyBlocksAtEnd:function(){function a(f){return function(a){return b(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||f.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var d=this.createBookmark(),h=this[b?"endPath":"startPath"](),c=h.block||h.blockLimit,g;c&&!c.equals(h.root)&&!c.getFirst(a(c));)g=c.getParent(),this[b?"setEndAt":
"setStartAt"](c,CKEDITOR.POSITION_AFTER_END),c.remove(1),c=g;this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,d){var h=d==CKEDITOR.START,c=this.clone();c.collapse(h);c[h?"setStartAt":"setEndAt"](a,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=b(h);return c[h?
"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,b=this.startOffset;CKEDITOR.env.ie&&b&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,b)),l.test(a)&&this.trim(0,1));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=c();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,
b=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(b)),l.test(a)&&this.trim(1,0));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=c();return a.checkForward()},getPreviousNode:function(a,b,d){var h=this.clone();h.collapse(1);h.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(h);
d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var h=this.clone();h.collapse();h.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(h);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,d){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(d)||b.equals(d)))break}b=b.getParent()}return 1}
return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,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()&&l.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 c=a,g=d,e=void 0;c.type==CKEDITOR.NODE_ELEMENT&&c.isEditable(!1)&&
(e=c[b?"getLast":"getFirst"](h));g||e||(e=c[b?"getPrevious":"getNext"](h));a=e}return!!d},moveToClosestEditablePosition:function(a,b){var d,h=0,c,g,e=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,e[b?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))h=1;else if(c=d[b?"getNextEditableNode":"getPreviousEditableNode"]())h=1,(g=c.type==CKEDITOR.NODE_ELEMENT)&&c.is(CKEDITOR.dtd.$block)&&"false"==c.getAttribute("contenteditable")?
(d.setStartAt(c,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(c,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&g&&c.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(c,0),d.collapse()):d.moveToPosition(c,e[b?1:0]);h&&this.moveToRange(d);return!!h},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),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&b(a)};var h=a.next();a.reset();return h&&h.equals(a.previous())?h:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||
a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:g(),getPreviousEditableNode:g(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),d=this.getTouchedEndNode(),h=b.getAscendant("table",!0),d=d.getAscendant("table",!0);return h&&!this.root.contains(h)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):h&&d&&(h.equals(d)||h.contains(d)||d.contains(h))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=
new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,h,c=this.clone();c.optimize();(h=c.startContainer.type==CKEDITOR.NODE_TEXT)?(d=c.startContainer.getText(),b=c.startContainer.split(c.startOffset),a.insertAfter(c.startContainer)):c.insertNode(a);a.scrollIntoView();h&&(c.startContainer.setText(d),b.remove());a.remove()},getClientRects:function(){function a(b,d){var f=CKEDITOR.tools.array.map(b,function(a){return a}),h=new CKEDITOR.dom.range(d.root),c,g,
e;d.startContainer instanceof CKEDITOR.dom.element&&(g=0===d.startOffset&&d.startContainer.hasAttribute("data-widget"));d.endContainer instanceof CKEDITOR.dom.element&&(e=(e=d.endOffset===(d.endContainer.getChildCount?d.endContainer.getChildCount():d.endContainer.length))&&d.endContainer.hasAttribute("data-widget"));g&&h.setStart(d.startContainer.getParent(),d.startContainer.getIndex());e&&h.setEnd(d.endContainer.getParent(),d.endContainer.getIndex()+1);if(g||e)d=h;h=d.cloneContents().find("[data-cke-widget-id]").toArray();
if(h=CKEDITOR.tools.array.map(h,function(a){var b=d.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return h=CKEDITOR.tools.array.map(h,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;c=this.root.getDocument().$.createRange();c.setStart(b.getParent().$,b.getIndex());c.setEnd(b.getParent().$,b.getIndex()+1);b=c.getClientRects();b.widgetRect=a.getClientRect();return b},d),CKEDITOR.tools.array.forEach(h,function(a){function b(h){CKEDITOR.tools.array.forEach(f,
function(b,c){var g=CKEDITOR.tools.objectCompare(a[h],b);g||(g=CKEDITOR.tools.objectCompare(a.widgetRect,b));g&&(Array.prototype.splice.call(f,c,a.length-h,a.widgetRect),d=!0)});d||(h<f.length-1?b(h+1):f.push(a.widgetRect))}var d;b(0)}),f}function b(a,d,f){var c;d.collapsed?f.startContainer instanceof CKEDITOR.dom.element?(a=f.checkStartOfBlock(),c=new CKEDITOR.dom.text("​"),a?f.startContainer.append(c,!0):0===f.startOffset?c.insertBefore(f.startContainer.getFirst()):(f=f.startContainer.getChildren().getItem(f.startOffset-
1),c.insertAfter(f)),d.setStart(c.$,0),d.setEnd(c.$,0),a=d.getClientRects(),c.remove()):f.startContainer instanceof CKEDITOR.dom.text&&(""===f.startContainer.getText()?(f.startContainer.setText("​"),a=d.getClientRects(),f.startContainer.setText("")):a=[h(f.createBookmark())]):a=[h(f.createBookmark())];return a}function d(a,b,f){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(f.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);
return a}function h(a){var b=a.startNode;a=a.endNode;var d;b.setText("​");b.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),d=[b.getClientRect(),a.getClientRect()],a.remove()):d=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(d[0].right,d[1].right),bottom:Math.max(d[0].bottom,d[1].bottom),left:Math.min(d[0].left,d[1].left),top:Math.min(d[0].top,d[1].top),width:Math.abs(d[0].left-d[1].left),height:Math.max(d[0].bottom,d[1].bottom)-Math.min(d[0].top,d[1].top)}}
return void 0!==this.document.getSelection?function(h){var c=this.root.getDocument().$.createRange(),g;c.setStart(this.startContainer.$,this.startOffset);c.setEnd(this.endContainer.$,this.endOffset);g=c.getClientRects();g=a(g,this);g.length||(g=b(g,c,this));return CKEDITOR.tools.array.map(g,function(a){return d(a,h,this)},this)}:function(a){return[d(h(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,
b){var d=this.getCommonAncestor(),h=this.getBoundaryNodes(),c=[],g,e,k,l;if(d&&d.find)for(e=d.find(a),g=0;g<e.count();g++)if(d=e.getItem(g),b||!d.isReadOnly())k=d.getPosition(h.startNode)&CKEDITOR.POSITION_FOLLOWING||h.startNode.equals(d),l=d.getPosition(h.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||h.endNode.equals(d),k&&l&&c.push(d);return c}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var d=a[a.length-1],f=!1;b=b.clone();
b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(d){var h=new CKEDITOR.dom.range(b.root),f=new CKEDITOR.dom.walker(h),c=CKEDITOR.dom.walker.whitespaces();h.setStart(d.endContainer,d.endOffset);h.setEnd(b.startContainer,b.startOffset);for(h=f.next();c(h)||b.endContainer.equals(h);)h=f.next();f=!h}f?d.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 a(a){1>arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function e(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function c(a,b,d,g){a:{null==
g&&(g=e(d));for(var k;k=g.shift();)if(k.getDtd().p){g={element:k,remaining:g};break a}g=null}if(!g)return 0;if((k=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&!k.check(b))return c(a,b,d,g.remaining);b=new CKEDITOR.dom.range(g.element);b.selectNodeContents(g.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:g.element,container:d,remaining:g.remaining,iterator:b};return 1}function b(a,b,d){if(!b)return!1;
a=a.clone();a.collapse(!d);return a.checkBoundaryOfElement(b,d?CKEDITOR.START:CKEDITOR.END)}var g=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),l=function(a){return m(a)&&k(a)},d={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var f,e,k,v,x;a=a||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,f;this.activeFilter=this.filter;if(c(this,a,
this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var q=this.range.clone();e=q.startPath();var u=q.endPath(),w=!q.collapsed&&b(q,e.block),t=!q.collapsed&&b(q,u.block,1);q.shrink(CKEDITOR.SHRINK_ELEMENT,!0);w&&q.setStartAt(e.block,CKEDITOR.POSITION_BEFORE_END);t&&q.setEndAt(u.block,
CKEDITOR.POSITION_AFTER_START);e=q.endContainer.hasAscendant("pre",!0)||q.startContainer.hasAscendant("pre",!0);q.enlarge(this.forceBrBreak&&!e||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);q.collapsed||(e=new CKEDITOR.dom.walker(q.clone()),u=CKEDITOR.dom.walker.bookmark(!0,!0),e.evaluator=u,this._.nextNode=e.next(),e=new CKEDITOR.dom.walker(q.clone()),e.evaluator=u,e=e.previous(),this._.lastNode=e.getNextSourceNode(!0,null,q.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&&q.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=q.document.createText(""),this._.lastNode.insertAfter(e)),q=null);this._.started=
1;e=q}u=this._.nextNode;q=this._.lastNode;for(this._.nextNode=null;u;){var w=0,t=u.hasAscendant("pre"),z=u.type!=CKEDITOR.NODE_ELEMENT,r=0;if(z)u.type==CKEDITOR.NODE_TEXT&&g.test(u.getText())&&(z=0);else{var y=u.getName();if(CKEDITOR.dtd.$block[y]&&"false"==u.getAttribute("contenteditable")){f=u;c(this,a,f);break}else if(u.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){if("br"==y)z=1;else if(!e&&!u.getChildCount()&&"hr"!=y){f=u;k=u.equals(q);break}e&&(e.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),
"br"!=y&&(this._.nextNode=u));w=1}else{if(u.getFirst()){e||(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));u=u.getFirst();continue}z=1}}z&&!e&&(e=this.range.clone(),e.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));k=(!w||z)&&u.equals(q);if(e&&!w)for(;!u.getNext(l)&&!k;){y=u.getParent();if(y.isBlockBoundary(this.forceBrBreak&&!t&&{br:1})){w=1;z=0;k||y.equals(q);e.setEndAt(y,CKEDITOR.POSITION_BEFORE_END);break}u=y;z=1;k=u.equals(q);r=1}z&&e.setEndAt(u,CKEDITOR.POSITION_AFTER_END);
u=this._getNextSourceNode(u,r,q);if((k=!u)||w&&e)break}if(!f){if(!e)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;f=new CKEDITOR.dom.elementPath(e.startContainer,e.root);u=f.blockLimit;w={div:1,th:1,td:1};f=f.block;!f&&u&&!this.enforceRealBlocks&&w[u.getName()]&&e.checkStartOfBlock()&&e.checkEndOfBlock()&&!u.equals(e.root)?f=u:!f||this.enforceRealBlocks&&f.is(d)?(f=this.range.document.createElement(a),e.extractContents().appendTo(f),f.trim(),e.insertNode(f),v=x=!0):
"li"!=f.getName()?e.checkStartOfBlock()&&e.checkEndOfBlock()||(f=f.clone(!1),e.extractContents().appendTo(f),f.trim(),x=e.splitBlock(),v=!x.wasStartOfBlock,x=!x.wasEndOfBlock,e.insertNode(f)):k||(this._.nextNode=f.equals(q)?null:this._getNextSourceNode(e.getBoundaryNodes().endNode,1,q))}v&&(v=f.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());x&&(v=f.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&
"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(m)||v.getNext(m))&&v.remove();this._.nextNode||(this._.nextNode=k||f.equals(q)||!q?null:this._getNextSourceNode(f,1,q));return f},_getNextSourceNode:function(a,b,d){function c(a){return!(a.equals(d)||a.equals(g))}var g=this.range.root;for(a=a.getNextSourceNode(b,null,c);!m(a);)a=a.getNextSourceNode(b,null,c);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})();CKEDITOR.command=function(a,e){this.uiItems=
[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==e.exec.call(this,a,b)};this.refresh=function(a,c){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!c.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:c})?!0:e.refresh&&!1!==e.refresh.apply(this,
arguments)};var c;this.checkAllowed=function(b){return b||"boolean"!=typeof c?c=a.activeFilter.checkFeature(this):c};CKEDITOR.tools.extend(this,e,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!e.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(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;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.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 a(a,b,d,f,h){var c,g;a=[];for(c in b){g=b[c];g="boolean"==
typeof g?{}:"function"==typeof g?{match:g}:J(g);"$"!=c.charAt(0)&&(g.elements=c);d&&(g.featureName=d.toLowerCase());var e=g;e.elements=k(e.elements,/\s+/)||null;e.propertiesOnly=e.propertiesOnly||!0===e.elements;var l=/\s*,\s*/,m=void 0;for(m in M){e[m]=k(e[m],l)||null;var n=e,E=H[m],u=k(e[H[m]],l),y=e[m],p=[],t=!0,A=void 0;u?t=!1:u={};for(A in y)"!"==A.charAt(0)&&(A=A.slice(1),p.push(A),u[A]=!0,t=!1);for(;A=p.pop();)y[A]=y["!"+A],delete y["!"+A];n[E]=(t?!1:u)||null}e.match=e.match||null;f.push(g);
a.push(g)}b=h.elements;h=h.generic;var C;d=0;for(f=a.length;d<f;++d){c=J(a[d]);g=!0===c.classes||!0===c.styles||!0===c.attributes;e=c;m=E=l=void 0;for(l in M)e[l]=w(e[l]);n=!0;for(m in H){l=H[m];E=e[l];u=[];y=void 0;for(y in E)-1<y.indexOf("*")?u.push(new RegExp("^"+y.replace(/\*/g,".*")+"$")):u.push(y);E=u;E.length&&(e[l]=E,n=!1)}e.nothingRequired=n;e.noProperties=!(e.attributes||e.classes||e.styles);if(!0===c.elements||null===c.elements)h[g?"unshift":"push"](c);else for(C in e=c.elements,delete c.elements,
e)if(b[C])b[C][g?"unshift":"push"](c);else b[C]=[c]}}function e(a,b,d,f){if(!a.match||a.match(b))if(f||l(a,b))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=c(a.attributes,b.attributes,d.validAttributes)),d.allStyles||(d.allStyles=c(a.styles,b.styles,d.validStyles)),!d.allClasses){a=a.classes;b=b.classes;f=d.validClasses;if(a)if(!0===a)a=!0;else{for(var h=0,g=b.length,e;h<g;++h)e=b[h],f[e]||(f[e]=a(e));a=!1}else a=!1;d.allClasses=a}}function c(a,b,d){if(!a)return!1;if(!0===a)return!0;
for(var f in b)d[f]||(d[f]=a(f));return!1}function b(a,b,d){if(!a.match||a.match(b)){if(a.noProperties)return!1;d.hadInvalidAttribute=g(a.attributes,b.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=g(a.styles,b.styles)||d.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var f=!1,c=!0===a,h=b.length;h--;)if(c||a(b[h]))b.splice(h,1),f=!0;a=f}else a=!1;d.hadInvalidClass=a||d.hadInvalidClass}}function g(a,b){if(!a)return!1;var d=!1,f=!0===a,c;for(c in b)if(f||a(c))delete b[c],d=!0;return d}function m(a,
b,d){if(a.disabled||a.customConfig&&!d||!b)return!1;a._.cachedChecks={};return!0}function k(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=K(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var d={},f=0,c;for(c in a)d[c]=a[c],f++;return f?d:!1}function l(a,b){if(a.nothingRequired)return!0;var f,c,h,g;if(h=a.requiredClasses)for(g=b.classes,f=0;f<h.length;++f)if(c=h[f],"string"==
typeof c){if(-1==CKEDITOR.tools.indexOf(g,c))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(g,c))return!1;return d(b.styles,a.requiredStyles)&&d(b.attributes,a.requiredAttributes)}function d(a,b){if(!b)return!0;for(var d=0,f;d<b.length;++d)if(f=b[d],"string"==typeof f){if(!(f in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,f))return!1;return!0}function h(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,
d,f,c,h={},g=1;for(a=K(a);b=a.match(E);)(d=b[2])?(f=n(d,"styles"),c=n(d,"attrs"),d=n(d,"classes")):f=c=d=null,h["$"+g++]={elements:b[1],classes:d,styles:f,attributes:c},a=a.slice(b[0].length);return h}function n(a,b){var d=a.match(O[b]);return d?K(d[1]):null}function p(a){var b=a.styleBackup=a.attributes.style,d=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=d?d.split(/\s+/):[])}function v(a,d,f,c){var h=0,g;c.toHtml&&(d.name=d.name.replace(S,
"$1"));if(c.doCallbacks&&a.elementCallbacks){a:{g=a.elementCallbacks;for(var k=0,l=g.length,m;k<l;++k)if(m=g[k](d)){g=m;break a}g=void 0}if(g)return g}if(c.doTransform&&(g=a._.transformations[d.name])){p(d);for(k=0;k<g.length;++k)y(a,d,g[k]);q(d)}if(c.doFilter){a:{k=d.name;l=a._;a=l.allowedRules.elements[k];g=l.allowedRules.generic;k=l.disallowedRules.elements[k];l=l.disallowedRules.generic;m=c.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,
allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},E,A;if(a||g){p(d);if(k)for(E=0,A=k.length;E<A;++E)if(!1===b(k[E],d,n)){a=null;break a}if(l)for(E=0,A=l.length;E<A;++E)b(l[E],d,n);if(a)for(E=0,A=a.length;E<A;++E)e(a[E],d,n,m);if(g)for(E=0,A=g.length;E<A;++E)e(g[E],d,n,m);a=n}else a=null}if(!a||!a.valid)return f.push(d),1;A=a.validAttributes;var t=a.validStyles;g=a.validClasses;var k=d.attributes,C=d.styles,l=d.classes;m=d.classBackup;var O=d.styleBackup,w,G,B=[],n=[],r=/^data-cke-/;
E=!1;delete k.style;delete k["class"];delete d.classBackup;delete d.styleBackup;if(!a.allAttributes)for(w in k)A[w]||(r.test(w)?w==(G=w.replace(/^data-cke-saved-/,""))||A[G]||(delete k[w],E=!0):(delete k[w],E=!0));if(!a.allStyles||a.hadInvalidStyle){for(w in C)a.allStyles||t[w]?B.push(w+":"+C[w]):E=!0;B.length&&(k.style=B.sort().join("; "))}else O&&(k.style=O);if(!a.allClasses||a.hadInvalidClass){for(w=0;w<l.length;++w)(a.allClasses||g[l[w]])&&n.push(l[w]);n.length&&(k["class"]=n.sort().join(" "));
m&&n.length<m.split(/\s+/).length&&(E=!0)}else m&&(k["class"]=m);E&&(h=1);if(!c.skipFinalValidation&&!u(d))return f.push(d),1}c.toHtml&&(d.name=d.name.replace(Q,"cke:$1"));return h}function x(a){var b=[],d;for(d in a)-1<d.indexOf("*")&&b.push(d.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function q(a){var b=a.attributes,d;delete b.style;delete b["class"];if(d=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=d;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 w(a){if(!a)return!1;if(!0===a)return!0;var b=x(a);return function(d){return d in a||b&&d.match(b)}}function t(){return new CKEDITOR.htmlParser.element("br")}function z(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||G.$block[a.name])}function r(a,b,d){var f=a.name;if(G.$empty[f]||!a.children.length)"hr"==f&&"br"==b?a.replaceWith(t()):
(a.parent&&d.push({check:"it",el:a.parent}),a.remove());else if(G.$block[f]||"tr"==f)if("br"==b)a.previous&&!z(a.previous)&&(b=t(),b.insertBefore(a)),a.next&&!z(a.next)&&(b=t(),b.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,c;b:{c=G[b];for(var h=0,g=f.length,e;h<g;++h)if(e=f[h],e.type==CKEDITOR.NODE_ELEMENT&&!c[e.name]){c=!1;break b}c=!0}if(c)a.name=b,a.attributes={},d.push({check:"parent-down",el:a});else{c=a.parent;for(var h=c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==c.name,
k,l,g=f.length;0<g;)e=f[--g],h&&(e.type==CKEDITOR.NODE_TEXT||e.type==CKEDITOR.NODE_ELEMENT&&G.$inline[e.name])?(k||(k=new CKEDITOR.htmlParser.element(b),k.insertAfter(a),d.push({check:"parent-down",el:k})),k.add(e,0)):(k=null,l=G[c.name]||G.span,e.insertAfter(a),c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||e.type!=CKEDITOR.NODE_ELEMENT||l[e.name]||d.push({check:"el-up",el:e}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&d.push({check:"it",el:a.parent}),a.replaceWithChildren())}function y(a,
b,d){var f,c;for(f=0;f<d.length;++f)if(c=d[f],!(c.check&&!a.check(c.check,!1)||c.left&&!c.left(b))){c.right(b,L);break}}function A(a,b){var d=b.getDefinition(),f=d.attributes,c=d.styles,h,g,e,k;if(a.name!=d.element)return!1;for(h in f)if("class"==h)for(d=f[h].split(/\s+/),e=a.classes.join("|");k=d.pop();){if(-1==e.indexOf(k))return!1}else if(a.attributes[h]!=f[h])return!1;for(g in c)if(a.styles[g]!=c[g])return!1;return!0}function C(a,b){var d,f;"string"==typeof a?d=a:a instanceof CKEDITOR.style?f=
a:(d=a[0],f=a[1]);return[{element:d,left:f,right:function(a,d){d.transform(a,b)}}]}function B(a){return function(b){return A(b,a)}}function F(a){return function(b,d){d[a](b)}}var G=CKEDITOR.dtd,J=CKEDITOR.tools.copy,K=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 d=this.editor=a instanceof CKEDITOR.editor?a:null;if(d&&!b){this.customConfig=!0;var f=d.config.allowedContent;!0===f?this.disabled=!0:(f||(this.customConfig=!1),this.allow(f,"config",1),this.allow(d.config.extraAllowedContent,"extra",1),this.allow(D[d.enterMode]+" "+D[d.shiftEnterMode],"default",1),this.disallow(d.config.disallowedContent))}else this.customConfig=
!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,d,c){if(!m(this,b,c))return!1;var h,g;if("string"==typeof b)b=f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),d,c);h=b.getDefinition();b={};c=h.attributes;b[h.element]=h={styles:h.styles,requiredStyles:h.styles&&CKEDITOR.tools.object.keys(h.styles)};c&&(c=J(c),h.classes=c["class"]?c["class"].split(/\s+/):null,h.requiredClasses=
h.classes,delete c["class"],h.attributes=c,h.requiredAttributes=c&&CKEDITOR.tools.object.keys(c))}else if(CKEDITOR.tools.isArray(b)){for(h=0;h<b.length;++h)g=this.allow(b[h],d,c);return g}a(this,b,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,d,f){if(this.disabled)return!1;var c=this,h=[],g=this.editor&&this.editor.config.protectedSource,e,k=!1,l={doFilter:!d,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(e=v(c,a,h,l),e&1)k=!0;else if(e&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var f=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var m,n,E;if(g)for(n=0;n<g.length;++n)if((E=f.match(g[n]))&&E[0].length==f.length){d=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(m=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&
v(c,m,d,l);d=!d.length}d||h.push(a)}},null,!0);h.length&&(k=!0);var m;a=[];f=D[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;d=h.pop();)d.type==CKEDITOR.NODE_ELEMENT?r(d,f,a):d.remove();for(;m=a.pop();)if(d=m.el,d.parent)switch(n=G[d.parent.name]||G.span,m.check){case "it":G.$removeEmpty[d.name]&&!d.children.length?r(d,f,a):u(d)||r(d,f,a);break;case "el-up":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[d.name]||r(d,f,a);break;case "parent-down":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||
n[d.name]||r(d.parent,f,a)}return k},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!m(this,b,!0))return!1;"string"==typeof b&&(b=f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,d,f=[],c;for(b=0;b<a.length&&!c;++b)d=a[b],("string"==typeof d||d instanceof
CKEDITOR.style)&&this.check(d)&&(c=d);if(c){for(b=0;b<a.length;++b)f.push(C(a[b],c));this.addTransformations(f)}}},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,d;if(!this.disabled&&a){var f=this._.transformations,c;for(c=0;c<a.length;++c){b=a[c];var h=void 0,g=void 0,e=void 0,k=void 0,l=void 0,m=void 0;d=[];for(g=0;g<b.length;++g)e=b[g],"string"==typeof e?(e=e.split(/\s*:\s*/),k=e[0],l=null,m=e[1]):(k=e.check,l=e.left,m=e.right),h||(h=e,h=h.element?h.element:k?k.match(/^([a-z0-9]+)/i)[0]:h.left.getDefinition().element),l instanceof CKEDITOR.style&&(l=B(l)),d.push({check:k==h?null:k,left:l,
right:"string"==typeof m?F(m):m});b=h;f[b]||(f[b]=[]);f[b].push(d)}}},check:function(a,b,d){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var c=a.length;c--;)if(this.check(a[c],b,d))return!0;return!1}var g,e;if("string"==typeof a){e=a+"\x3c"+(!1===b?"0":"1")+(d?"1":"0")+"\x3e";if(e in this._.cachedChecks)return this._.cachedChecks[e];g=f(a).$1;var k=g.styles,c=g.classes;g.name=g.elements;g.classes=c=c?c.split(/\s*,\s*/):[];g.styles=h(k);g.attributes=h(g.attributes);g.children=[];c.length&&
(g.attributes["class"]=c.join(" "));k&&(g.attributes.style=CKEDITOR.tools.writeCssText(g.styles))}else g=a.getDefinition(),k=g.styles,c=g.attributes||{},k&&!CKEDITOR.tools.isEmpty(k)?(k=J(k),c.style=CKEDITOR.tools.writeCssText(k,!0)):k={},g={name:g.element,attributes:c,classes:c["class"]?c["class"].split(/\s+/):[],styles:k,children:[]};var k=CKEDITOR.tools.clone(g),l=[],m;if(!1!==b&&(m=this._.transformations[g.name])){for(c=0;c<m.length;++c)y(this,g,m[c]);q(g)}v(this,k,l,{doFilter:!0,doTransform:!1!==
b,skipRequired:!d,skipFinalValidation:!d});0<l.length?d=!1:((b=g.attributes["class"])&&(g.attributes["class"]=g.attributes["class"].split(" ").sort().join(" ")),d=CKEDITOR.tools.objectCompare(g.attributes,k.attributes,!0),b&&(g.attributes["class"]=b));"string"==typeof a&&(this._.cachedChecks[e]=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(d,f){var c=a.slice(),h;if(this.check(D[d]))return d;for(f||
(c=c.reverse());h=c.pop();)if(this.check(h))return b[h];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 M={styles:1,attributes:1,classes:1},H={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},E=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,O={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},S=/^cke:(object|embed|param)$/,Q=/^(object|embed|param)$/,L;L=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,d){d=d||b;if(!(d in a.styles)){var f=a.attributes[b];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[d]=f)}delete a.attributes[b]},lengthToAttribute:function(a,b,d){d=d||b;if(!(d in a.attributes)){var f=a.styles[b],c=f&&f.match(/^(\d+)(?:\.\d*)?px$/);c?a.attributes[d]=c[1]:"cke-test"==f&&(a.attributes[d]="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(f){a.styles["margin-top"]=
d[f[0]];a.styles["margin-right"]=d[f[1]];a.styles["margin-bottom"]=d[f[2]];a.styles["margin-left"]=d[f[3]]}if(a.styles.margin){var d=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(d.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:A,transform:function(a,b){if("string"==typeof b)a.name=b;else{var d=b.getDefinition(),f=d.styles,c=d.attributes,h,g,e,k;a.name=d.element;for(h in c)if("class"==h)for(d=
a.classes.join("|"),e=c[h].split(/\s+/);k=e.pop();)-1==d.indexOf(k)&&a.classes.push(k);else a.attributes[h]=c[h];for(g in f)a.styles[g]=f[g]}}}})();(function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&
a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function e(){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 c=CKEDITOR.focusManager._.blurDelay;a||!c?e.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;
e.call(this)},c,this)}},add:function(a,e){var c=a.getCustomData("focusmanager");if(!c||c!=this){c&&c.remove(a);var c="focus",b="blur";e&&(CKEDITOR.env.ie?(c="focusin",b="focusout"):CKEDITOR.event.useCapture=1);var g={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(c,g.focus,this);a.on(b,g.blur,this);e&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",g)}},remove:function(a){a.removeCustomData("focusmanager");
var e=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",e.blur);a.removeListener("focus",e.focus)}}})();CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this};(function(){var a,e=function(b){b=b.data;var c=b.getKeystroke(),e=this.keystrokes[c],k=this._.editor;a=!1===k.fire("key",{keyCode:c,domEvent:b});a||(e&&(a=!1!==k.execCommand(e,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[c]));
a&&b.preventDefault(!0);return!a},c=function(b){a&&(a=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",e,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",c,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(a,e,c){a&&CKEDITOR.lang.languages[a]||(a=this.detect(e,a));var b=this;e=function(){b[a].dir=b.rtl[a]?"rtl":"ltr";c(a,b[a])};this[a]?e():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),e,this)},detect:function(a,e){var c=this.languages;e=e||navigator.userLanguage||navigator.language||
a;var b=e.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),g=b[1],b=b[2];c[g+"-"+b]?g=g+"-"+b:c[g]||(g=null);CKEDITOR.lang.detect=g?function(){return g}:function(a){return a};return g||a}}})();CKEDITOR.scriptLoader=function(){var a={},e={};return{load:function(c,b,g,m){var k="string"==typeof c;k&&(c=[c]);g||(g=CKEDITOR);var l=c.length,d=[],h=[],f=function(a){b&&(k?b.call(g,a):b.call(g,d,h))};if(0===l)f(!0);else{var n=function(a,b){(b?d:h).push(a);0>=--l&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),
f(b))},p=function(b,d){a[b]=1;var f=e[b];delete e[b];for(var c=0;c<f.length;c++)f[c](b,d)},v=function(d){if(a[d])n(d,!0);else{var f=e[d]||(e[d]=[]);f.push(n);if(!(1<f.length)){var c=new CKEDITOR.dom.element("script");c.setAttributes({type:"text/javascript",src:d});b&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?c.$.onreadystatechange=function(){if("loaded"==c.$.readyState||"complete"==c.$.readyState)c.$.onreadystatechange=null,p(d,!0)}:(c.$.onload=function(){setTimeout(function(){c.$.onload=
null;c.$.onerror=null;p(d,!0)},0)},c.$.onerror=function(){c.$.onload=null;c.$.onerror=null;p(d,!1)}));c.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var x=0;x<l;x++)v(c[x])}},queue:function(){function a(){var c;(c=b[0])&&this.load(c.scriptUrl,c.callback,CKEDITOR,0)}var b=[];return function(g,e){var k=this;b.push({scriptUrl:g,callback:function(){e&&e.apply(this,arguments);b.shift();a.call(k)}});1==b.length&&a.call(this)}}()}}();CKEDITOR.resourceManager=
function(a,e){this.basePath=a;this.fileName=e;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};CKEDITOR.resourceManager.prototype={add:function(a,e){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var c=this.registered[a]=e||{};c.name=a;c.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",c);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var e=
this.externals[a];return CKEDITOR.getUrl(e&&e.dir||this.basePath+a+"/")},getFilePath:function(a){var e=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(e?e.file:this.fileName+".js"))},addExternal:function(a,e,c){c||(e=e.replace(/[^\/]+$/,function(a){c=a;return""}));c=c||this.fileName+".js";a=a.split(",");for(var b=0;b<a.length;b++)this.externals[a[b]]={dir:e,file:c}},load:function(a,e,c){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var b=this.loaded,g=this.registered,m=[],k={},l={},d=0;d<
a.length;d++){var h=a[d];if(h)if(b[h]||g[h])l[h]=this.get(h);else{var f=this.getFilePath(h);m.push(f);f in k||(k[f]=[]);k[f].push(h)}}CKEDITOR.scriptLoader.load(m,function(a,d){if(d.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[d[0]].join(",")+'" was not found at "'+d[0]+'".');for(var f=0;f<a.length;f++)for(var h=k[a[f]],g=0;g<h.length;g++){var m=h[g];l[m]=this.get(m);b[m]=1}e.call(c,l)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load=
CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var e={};return function(c,b,g){var m={},k=function(c){a.call(this,c,function(a){CKEDITOR.tools.extend(m,a);var c=[],f;for(f in a){var l=a[f],p=l&&l.requires;if(!e[f]){if(l.icons)for(var v=l.icons.split(","),x=v.length;x--;)CKEDITOR.skin.addIcon(v[x],l.path+"icons/"+(CKEDITOR.env.hidpi&&l.hidpi?"hidpi/":"")+v[x]+".png");l.isSupportedEnvironment=l.isSupportedEnvironment||function(){return!0};e[f]=1}if(p)for(p.split&&(p=p.split(",")),l=0;l<p.length;l++)m[p[l]]||
c.push(p[l])}if(c.length)k.call(this,c);else{for(f in m)l=m[f],l.onLoad&&!l.onLoad._called&&(!1===l.onLoad()&&delete m[f],l.onLoad._called=1);b&&b.call(g||window,m)}},this)};k.call(this,c)}});CKEDITOR.plugins.setLang=function(a,e,c){var b=this.get(a);a=b.langEntries||(b.langEntries={});b=b.lang||(b.lang=[]);b.split&&(b=b.split(","));-1==CKEDITOR.tools.indexOf(b,e)&&b.push(e);a[e]=c};CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this};
CKEDITOR.ui.prototype={add:function(a,e,c){c.name=a.toLowerCase();var b=this.items[a]={type:e,command:c.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(b,c)},get:function(a){return this.instances[a]},create:function(a){var e=this.items[a],c=e&&this._.handlers[e.type],b=e&&e.command&&this.editor.getCommand(e.command),c=c&&c.create.apply(this,e.args);this.instances[a]=c;b&&b.uiItems.push(c);c&&!c.type&&(c.type=e.type);return c},addHandler:function(a,e){this._.handlers[a]=
e},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}};CKEDITOR.event.implementOn(CKEDITOR.ui);(function(){function a(a,d,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==d){if(!(d instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");
if(!c(d,f))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');this.element=d;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||e();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=
new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",function(){m(this,this.elementPath(),!0)});this.on("mode",b);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()||l(this,a)},0,this)}function e(){do var a="editor"+ ++x;while(CKEDITOR.instances[a]);return a}function c(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 b(){var a=this.commands,
b;for(b in a)g(this,a[b])}function g(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function m(a,b,d){if(b){var f,c,h=a.commands;for(c in h)f=h[c],(d||f.contextSensitive)&&f.refresh(a,b)}}function k(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),d=q[b]||(q[b]={});d.fn?(d.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&k(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){d.fn=
CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};k(a)});return!0}function l(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var f in b.on)a.on(f,b.on[f]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}f=a.config;a.readOnly=f.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=f.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:f.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:f.shiftEnterMode;f.skin&&(CKEDITOR.skinName=f.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);
a.filter=a.activeFilter=new CKEDITOR.filter(a);d(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function d(a){CKEDITOR.skin.loadPart("editor",function(){h(a)})}function h(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,d){var c=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(d);a.title="string"==typeof c||!1===c?c:[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");f(a)})}function f(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 d=a.config,f=b(d.plugins),c=b(d.extraPlugins),h=b(d.removePlugins);if(c)var g=new RegExp("(?:^|,)(?:"+c.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(g,
""),f=f+(","+c);if(h)var e=new RegExp("(?:^|,)(?:"+h.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(e,"");CKEDITOR.env.air&&(f+=",adobeair");CKEDITOR.plugins.load(f.split(","),function(b){var f=[],c=[],h=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var g in b){var k=b[g],l=k.lang,m=null,n=k.requires,y;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(y=n.match(e)))for(;n=y.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:g});l&&!a.lang[g]&&(l.split&&
(l=l.split(",")),0<=CKEDITOR.tools.indexOf(l,a.langCode)?m=a.langCode:(m=a.langCode.replace(/-.*/,""),m=m!=a.langCode&&0<=CKEDITOR.tools.indexOf(l,m)?m:0<=CKEDITOR.tools.indexOf(l,"en")?"en":l[0]),k.langEntries&&k.langEntries[m]?(a.lang[g]=k.langEntries[m],m=null):h.push(CKEDITOR.getUrl(k.path+"lang/"+m+".js")));c.push(m);f.push(k)}CKEDITOR.scriptLoader.load(h,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],h=0;h<b.length;h++)for(var g=0;g<f.length;g++){var e=
f[g];0===h&&c[g]&&e.lang&&e.langEntries&&(a.lang[e.name]=e.langEntries[c[g]]);if(e[b[h]])e[b[h]](a)}a.fireOnce("pluginsLoaded");d.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function p(){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 v(a,b){function d(a){var b=a.startContainer,f=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(f)&&a.endOffset===b.getChildCount())?!0:!1}function f(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var c=new CKEDITOR.dom.documentFragment,h,g,e,k=0;k<a.length;k++){var l=a[k],m=l.startContainer.getAscendant("tr",!0);d(l)?(h||(h=m.getAscendant("table").clone(),
h.append(m.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),c.append(h),h=h.findOne("thead, tbody, tfoot")),g&&g.equals(m)||(g=m,e=m.clone(),h.append(e)),e.append(f(l))):c.append(l.cloneContents())}return h?c:b.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var x=0,q={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var d=0;d<b.length;d++){var f=b[d];if(this[f])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:f}),
!0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var d=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&g(this,d);return this.commands[a]=d},_attachToForm:function(){function a(b){d.updateElement();d._.required&&!f.getValue()&&!1===d.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var d=this,f=d.element,c=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&c&&(c.on("submit",a),b(c.$.submit)&&(c.$.submit=CKEDITOR.tools.override(c.$.submit,
function(b){return function(){a();b.apply?b.apply(this):b()}})),d.on("destroy",function(){c.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,d=this;this.fire("beforeDestroy");!a&&p.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];d===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);
CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var d=this.getCommand(a),f={name:a,commandData:b||{},command:d};return d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",f)&&(f.returnValue=d.exec(f.commandData),
!d.async&&!1!==this.fire("afterCommandExec",f))?f.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,d){var f=!0,c=b;b&&"object"==typeof b&&(d=b.internal,c=b.callback,f=!b.noSnapshot);!d&&f&&this.fire("saveSnapshot");if(c||!d)this.once("dataReady",function(a){!d&&f&&this.fire("saveSnapshot");c&&c.call(a.editor)});a={dataValue:a};!d&&this.fire("setData",a);this._.data=a.dataValue;!d&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=
a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,d){this.fire("insertHtml",{dataValue:a,mode:b,range:d})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),d=this.getSelection(),d=d&&d.getRanges();if(!b||!d||0===d.length)return null;b=v(d,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var d=this.editable(),
f=this.getSelection().getRanges(),c=new CKEDITOR.dom.documentFragment,h;if(!d||0===f.length)return null;for(h=0;h<f.length;h++)c.append(d.extractHtmlFromRange(f[h],b));b||this.getSelection().selectRanges([f[0]]);return a?c.getHtml():c},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return p.call(this)},setKeystroke:function(){for(var a=
this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],d,f,c=b.length;c--;)d=b[c],f=0,CKEDITOR.tools.isArray(d)&&(f=d[1],d=d[0]),f?a[d]=f:delete a[d]},getCommandKeystroke:function(a,b){var d="string"===typeof a?this.getCommand(a):a,f=[];if(d){var c=CKEDITOR.tools.object.findKey(this.commands,d),h=this.keystrokeHandler.keystrokes;if(d.fakeKeystroke)f.push(d.fakeKeystroke);else for(var g in h)h[g]===c&&f.push(g)}return b?f:f[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.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}};(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,e={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(c){for(var b,g,m=0,k;b=this._.htmlPartsRegex.exec(c);){g=b.index;if(g>m)if(m=c.substring(m,g),k)k.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(g=b[1])if(g=g.toLowerCase(),k&&CKEDITOR.dtd.$cdata[g]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(g);
continue}if(k)k.push(b[0]);else if(g=b[3]){if(g=g.toLowerCase(),!/="/.test(g)){var l={},d,h=b[4];b=!!b[5];if(h)for(;d=a.exec(h);){var f=d[1].toLowerCase();d=d[2]||d[3]||d[4]||"";l[f]=!d&&e[f]?f:CKEDITOR.tools.htmlDecodeAttr(d)}this.onTagOpen(g,l,b);!k&&CKEDITOR.dtd.$cdata[g]&&(k=[])}}else if(g=b[2])this.onComment(g)}if(c.length>m)this.onText(c.substring(m,c.length))}}})();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",
a)},openTagClose:function(a,e){e?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,e){"string"==typeof e&&(e=CKEDITOR.tools.htmlEncodeAttr(e));this._.output.push(" ",a,'\x3d"',e,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var e=this._.output.join("");
a&&this.reset();return e}}});"use strict";(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,e=CKEDITOR.tools.indexOf(a,this),c=this.previous,b=this.next;c&&(c.next=b);b&&(b.previous=c);a.splice(e,1);this.parent=null},replaceWith:function(a){var e=this.parent.children,c=CKEDITOR.tools.indexOf(e,this),b=a.previous=this.previous,g=a.next=this.next;b&&(b.next=a);g&&(g.previous=a);e[c]=a;a.parent=this.parent;this.parent=null},
insertAfter:function(a){var e=a.parent.children,c=CKEDITOR.tools.indexOf(e,a),b=a.next;e.splice(c+1,0,this);this.next=a.next;this.previous=a;a.next=this;b&&(b.previous=this);this.parent=a.parent},insertBefore:function(a){var e=a.parent.children,c=CKEDITOR.tools.indexOf(e,a);e.splice(c,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var e="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in
a},c=this.parent;for(;c&&c.type==CKEDITOR.NODE_ELEMENT;){if(e(c))return c;c=c.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,
e){var c=this.value;if(!(c=a.onComment(e,c,this)))return this.remove(),!1;if("string"!=typeof c)return this.replaceWith(c),!1;this.value=c;return!0},writeHtml:function(a,e){e&&this.filter(e);a.comment(this.value)}});"use strict";(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,e){if(!(this.value=a.onText(e,this.value,this)))return this.remove(),
!1},writeHtml:function(a,e){e&&this.filter(e);a.text(this.value)}})})();"use strict";(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}};(function(){function a(a){return a.attributes["data-cke-survive"]?
!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var e=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),c={ol:1,ul:1},b=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),g={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,k,l){function d(a){var b;if(0<u.length)for(var d=0;d<u.length;d++){var f=
u[d],c=f.name,g=CKEDITOR.dtd[c],e=t.name&&CKEDITOR.dtd[t.name];e&&!e[c]||a&&g&&!g[a]&&CKEDITOR.dtd[a]?c==t.name&&(n(t,t.parent,1),d--):(b||(h(),b=1),f=f.clone(),f.parent=t,t=f,u.splice(d,1),d--)}}function h(){for(;w.length;)n(w.shift(),t)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,d=a.children[b-1],f;d&&d.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(d.value))?d.value=f:a.children.length=b-1)}}function n(b,d,c){d=d||t||q;var h=t;void 0===b.previous&&
(p(d,b)&&(t=d,x.onTagOpen(l,{}),b.returnPoint=d=t),f(b),a(b)&&!b.children.length||d.add(b),"pre"==b.name&&(r=!1),"textarea"==b.name&&(z=!1));b.returnPoint?(t=b.returnPoint,delete b.returnPoint):t=c?d:h}function p(a,b){if((a==q||"body"==a.name)&&l&&(!a.name||CKEDITOR.dtd[a.name][l])){var d,f;return(d=b.attributes&&(f=b.attributes["data-cke-real-element-type"])?f:b.name)&&d in CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function v(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 x=new CKEDITOR.htmlParser,q=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,u=[],w=[],t=q,z="textarea"==q.name,r="pre"==q.name;x.onTagOpen=function(f,g,k,l){g=new CKEDITOR.htmlParser.element(f,g);g.isUnknown&&k&&(g.isEmpty=!0);g.isOptionalClose=l;if(a(g))u.push(g);else{if("pre"==f)r=!0;else{if("br"==f&&r){t.add(new CKEDITOR.htmlParser.text("\n"));
return}"textarea"==f&&(z=!0)}if("br"==f)w.push(g);else{for(;!(l=(k=t.name)?CKEDITOR.dtd[k]||(t._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b,g.isUnknown||t.isUnknown||l[f]);)if(t.isOptionalClose)x.onTagClose(k);else if(f in c&&k in c)k=t.children,(k=k[k.length-1])&&"li"==k.name||n(k=new CKEDITOR.htmlParser.element("li"),t),!g.returnPoint&&(g.returnPoint=t),t=k;else if(f in CKEDITOR.dtd.$listItem&&!v(f,k))x.onTagOpen("li"==f?"ul":"dl",{},0,1);else if(k in e&&!v(f,k))!g.returnPoint&&(g.returnPoint=
t),t=t.parent;else if(k in CKEDITOR.dtd.$inline&&u.unshift(t),t.parent)n(t,t.parent,1);else{g.isOrphan=1;break}d(f);h();g.parent=t;g.isEmpty?n(g):t=g}}};x.onTagClose=function(a){for(var b=u.length-1;0<=b;b--)if(a==u[b].name){u.splice(b,1);return}for(var d=[],f=[],c=t;c!=q&&c.name!=a;)c._.isBlockLike||f.unshift(c),d.push(c),c=c.returnPoint||c.parent;if(c!=q){for(b=0;b<d.length;b++){var g=d[b];n(g,g.parent)}t=c;c._.isBlockLike&&h();n(c,c.parent);c==t&&(t=t.parent);u=u.concat(f)}"body"==a&&(l=!1)};x.onText=
function(a){if(!(t._.hasInlineStarted&&!w.length||r||z)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var f=t.name,c=f?CKEDITOR.dtd[f]||(t._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b;if(!z&&!c["#"]&&f in e)x.onTagOpen(g[f]||""),x.onText(a);else{h();d();r||z||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(p(t,a))this.onTagOpen(l,{},0,1);t.add(a)}};x.onCDATA=function(a){t.add(new CKEDITOR.htmlParser.cdata(a))};x.onComment=function(a){h();d();t.add(new CKEDITOR.htmlParser.comment(a))};
x.parse(m);for(h();t!=q;)n(t,t.parent,1);f(q);return q};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),0===c.value.length)){this.children.pop();this.add(a);return}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||
a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,c)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var d=this.getFilterContext();
if(c&&!this.parent&&b)b.onRoot(d,this);b&&this.filterChildren(b,!1,d);b=0;c=this.children;for(d=c.length;b<d;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var d=a(this);if(!1!==d){c=this.children;for(var h=0;h<c.length;h++)d=c[h],d.type==CKEDITOR.NODE_ELEMENT?d.forEach(a,b):b&&d.type!=b||a(d)}},getFilterContext:function(a){return a||{}}}})();"use strict";(function(){function a(){this.rules=[]}function e(c,b,g,e){var k,l;for(k in b)(l=c[k])||(l=c[k]=new a),l.add(b[k],g,e)}
CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(c){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;c&&this.addRules(c,10)},proto:{addRules:function(a,b){var g;"number"==typeof b?g=b:b&&"priority"in b&&(g=b.priority);"number"!=typeof g&&(g=10);"object"!=typeof b&&(b={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,
g,b);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,g,b);a.elements&&e(this.elementsRules,a.elements,g,b);a.attributes&&e(this.attributesRules,a.attributes,g,b);a.text&&this.textRules.add(a.text,g,b);a.comment&&this.commentRules.add(a.comment,g,b);a.root&&this.rootRules.add(a.root,g,b)},applyTo:function(a){a.filter(this)},onElementName:function(a,b){return this.elementNameRules.execOnName(a,b)},onAttributeName:function(a,b){return this.attributeNameRules.execOnName(a,b)},onText:function(a,
b,g){return this.textRules.exec(a,b,g)},onComment:function(a,b,g){return this.commentRules.exec(a,b,g)},onRoot:function(a,b){return this.rootRules.exec(a,b)},onElement:function(a,b){for(var g=[this.elementsRules["^"],this.elementsRules[b.name],this.elementsRules.$],e,k=0;3>k;k++)if(e=g[k]){e=e.exec(a,b,this);if(!1===e)return null;if(e&&e!=b)return this.onNode(a,e);if(b.parent&&!b.name)break}return b},onNode:function(a,b){var g=b.type;return g==CKEDITOR.NODE_ELEMENT?this.onElement(a,b):g==CKEDITOR.NODE_TEXT?
new CKEDITOR.htmlParser.text(this.onText(a,b.value)):g==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,b.value)):null},onAttribute:function(a,b,g,e){return(g=this.attributesRules[g])?g.exec(a,e,b,this):e}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,b,g){this.rules.splice(this.findIndex(b),0,{value:a,priority:b,options:g})},addMany:function(a,b,g){for(var e=[this.findIndex(b),0],k=0,l=a.length;k<l;k++)e.push({value:a[k],priority:b,options:g});this.rules.splice.apply(this.rules,
e)},findIndex:function(a){for(var b=this.rules,g=b.length-1;0<=g&&a<b[g].priority;)g--;return g+1},exec:function(a,b){var g=b instanceof CKEDITOR.htmlParser.node||b instanceof CKEDITOR.htmlParser.fragment,e=Array.prototype.slice.call(arguments,1),k=this.rules,l=k.length,d,h,f,n;for(n=0;n<l;n++)if(g&&(d=b.type,h=b.name),f=k[n],!(a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,e);if(!1===f||g&&f&&(f.name!=h||f.type!=d))return f;null!=f&&
(e[0]=b=f)}return b},execOnName:function(a,b){for(var g=0,e=this.rules,k=e.length,l;b&&g<k;g++)l=e[g],a.nonEditable&&!l.options.applyToAll||a.nestedEditable&&l.options.excludeNestedEditable||(b=b.replace(l.value[0],l.value[1]));return b}}})();(function(){function a(a,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function h(a,d){return function(h){if(h.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=
[],k=c(h),l,E;if(k)for(e(k,1)&&g.push(k);k;)m(k)&&(l=b(k))&&e(l)&&((E=b(l))&&!m(E)?g.push(l):(f(n).insertAfter(l),l.remove())),k=k.previous;for(k=0;k<g.length;k++)g[k].remove();if(g=!a||!1!==("function"==typeof d?d(h):d))n||CKEDITOR.env.needsBrFiller||h.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||h.name in CKEDITOR.dtd.tr||h.name in CKEDITOR.dtd.$listItem)?(g=c(h),g=!g||"form"==h.name&&"input"==g.name):g=!1:g=!1;g&&h.add(f(a))}}}function e(a,b){if((!n||
CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var d;return a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(t))&&(d.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,d.index))).insertBefore(a),a.value=d[0]),!CKEDITOR.env.needsBrFiller&&n&&(!b||a.parent.name in E)||!n&&((d=a.previous)&&"br"==d.name||!d||m(d)))?!0:!1}var l={elements:{}},n="html"==d,E=CKEDITOR.tools.extend({},A),p;for(p in E)"#"in r[p]||delete E[p];for(p in E)l.elements[p]=
h(n,a.config.fillEmptyBlocks);l.root=h(n,!1);l.elements.br=function(a){return function(d){if(d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=d.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=d.next;c&&g(c);)c=c.next;var h=b(d);!c&&m(d.parent)?k(d.parent,f(a)):m(c)&&h&&!m(h)&&f(a).insertBefore(c)}}}}(n);return l}function e(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function c(a){for(a=a.children[a.children.length-1];a&&
g(a);)a=a.previous;return a}function b(a){for(a=a.previous;a&&g(a);)a=a.previous;return a}function g(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in A||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function k(a,b){var d=a.children[a.children.length-1];a.children.push(b);b.parent=a;d&&(d.next=b,b.previous=d)}function l(a){a=a.attributes;"false"!=a.contenteditable&&
(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function d(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function h(a){return a.replace(J,function(a,b,d){return"\x3c"+b+d.replace(K,function(a,b){return D.test(b)&&-1==d.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,d){0===a.indexOf("\x3ctextarea")&&
(a=b+q(d).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(E,function(a,b){return decodeURIComponent(b)})}function p(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+z+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,b){var d=b.toLowerCase(),f=b.toUpperCase(),
c=x(d);d!==f&&(c+="|"+x(f));return a+("("+c+")")},"")}function x(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 f in b)b[f]&&(a+="|"+b[f]);return a}function q(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function u(a,b){var d=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 d&&d[b]||""})}function w(a,b){var d=[],f=b.config.protectedSource,c=b._.dataStore||(b._.dataStore={id:1}),h=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,f=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(f);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var g=0;g<f.length;g++)a=a.replace(f[g],function(a){a=
a.replace(h,function(a,b,f){return d[f]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(d.push(a)-1)+"--\x3e"});a=a.replace(h,function(a,b,f){return"\x3c!--"+z+(b?"{C}":"")+encodeURIComponent(d[f]).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){c[c.id]=decodeURIComponent(b);return"{cke_protected_"+c.id++ +"}"})});return a=
a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,f,c){return"\x3c"+d+f+"\x3e"+u(q(c),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var d,c,g=this;this.editor=b;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=c=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(C);d.addRules(B,{applyToAll:!0});d.addRules(a(b,"data"),{applyToAll:!0});c.addRules(F);c.addRules(G,{applyToAll:!0});c.addRules(a(b,"html"),{applyToAll:!0});
b.on("toHtml",function(a){a=a.data;var d=a.dataValue,c,d=d.replace(O,""),d=w(d,b),d=f(d,H),d=h(d),d=f(d,M),d=d.replace(S,"$1cke:$2"),d=d.replace(L,"\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");c=a.context||b.editable().getName();var g;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==c&&(c="div",d="\x3cpre\x3e"+d+"\x3c/pre\x3e",g=1);c=b.document.createElement(c);c.setHtml("a"+d);d=c.getHtml().substr(1);
d=d.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");g&&(d=d.replace(/^<pre>|<\/pre>$/gi,""));d=d.replace(Q,"$1$2");d=n(d);d=q(d);c=!1===a.fixForBody?!1:e(a.enterMode,b.config.autoParagraph);d=CKEDITOR.htmlParser.fragment.fromHtml(d,a.context,c);c&&(g=d,!g.children.length&&CKEDITOR.dtd[g.name][c]&&(c=new CKEDITOR.htmlParser.element(c),g.add(c)));a.dataValue=d},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},
null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(!0);a.dataValue=p(b)},null,null,15);b.on("toDataFormat",function(a){var d=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,e(a.data.enterMode,b.config.autoParagraph))},
null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,f=g.writer;f.reset();d.writeChildrenHtml(f);d=f.getHtml(!0);d=q(d);d=u(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,f){var c=this.editor,h,g,e,k;b&&"object"==typeof b?(h=b.context,d=b.fixForBody,
f=b.dontFilter,g=b.filter,e=b.enterMode,k=b.protectedWhitespaces):h=b;h||null===h||(h=c.editable().getName());return c.fire("toHtml",{dataValue:a,context:h,fixForBody:d,dontFilter:f,filter:g||c.filter,enterMode:e||c.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var d,f,c;b&&(d=b.context,f=b.filter,c=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:f||this.editor.filter,context:d,enterMode:c||this.editor.enterMode}).dataValue}};
var t=/(?:&nbsp;|\xa0)$/,z="{cke_protected}",r=CKEDITOR.dtd,y="caption colgroup col thead tfoot tbody".split(" "),A=CKEDITOR.tools.extend({},r.$blockLimit,r.$block),C={elements:{input:l,textarea:l}},B={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}}}},F={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);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}}},G={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 d=["name","href","src"],f,c=0;c<d.length;c++)f="data-cke-saved-"+d[c],f in b&&delete b[d[c]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var d,f;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(d=CKEDITOR.tools.indexOf(y,a.name),f=CKEDITOR.tools.indexOf(y,b.name));-1<d&&-1<f&&d!=f||(d=a.parent?a.getIndex():-1,f=b.parent?b.getIndex():-1);return d>f?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&&k(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:d,textarea:d},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,
""))||!1}}};CKEDITOR.env.ie&&(G.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var J=/<(a|area|img|input|source)\b([^>]*)>/gi,K=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/^(href|src|name)$/i,M=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,H=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,E=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,O=new RegExp("("+v("\x3ccke:encoded\x3e")+"(.*?)"+v("\x3c/cke:encoded\x3e")+
")|("+v("\x3c")+v("/")+"?"+v("cke:encoded\x3e")+")","gi"),S=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,Q=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict";CKEDITOR.htmlParser.element=function(a,e){this.name=a;this.attributes=e||{};this.children=[];var c=a||"",b=c.match(/^cke:(.*)/);b&&(c=b[1]);c=!!(CKEDITOR.dtd.$nonBodyContent[c]||CKEDITOR.dtd.$block[c]||CKEDITOR.dtd.$listItem[c]||CKEDITOR.dtd.$tableContent[c]||
CKEDITOR.dtd.$nonEditable[c]||"br"==c);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:c,hasInlineStarted:this.isEmpty||!c}};CKEDITOR.htmlParser.cssStyle=function(a){var e={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,b,g){"font-family"==b&&(g=g.replace(/["']/g,""));e[b.toLowerCase()]=g});return{rules:e,populate:function(a){var b=this.toString();b&&
(a instanceof CKEDITOR.dom.element?a.setAttribute("style",b):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=b:a.style=b)},toString:function(){var a=[],b;for(b in e)e[b]&&a.push(b,":",e[b],";");return a.join("")}}};(function(){function a(a){return function(c){return c.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?c.name==a:c.name in a)}}var e=function(a,c){a=a[0];c=c[0];return a<c?-1:a>c?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,
{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,c){var e=this,k,l;c=e.getFilterContext(c);if(!e.parent)a.onRoot(c,e);for(;;){k=e.name;if(!(l=a.onElementName(c,k)))return this.remove(),!1;e.name=l;if(!(e=a.onElement(c,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==k)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),
!1}k=e.attributes;var d,h;for(d in k){for(l=k[d];;)if(h=a.onAttributeName(c,d))if(h!=d)delete k[d],d=h;else break;else{delete k[d];break}h&&(!1===(l=a.onAttribute(c,e,h,l))?delete k[h]:k[h]=l)}e.isEmpty||this.filterChildren(a,!1,c);return!0},filterChildren:c.filterChildren,writeHtml:function(a,c){c&&this.filter(c);var m=this.name,k=[],l=this.attributes,d,h;a.openTag(m,l);for(d in l)k.push([d,l[d]]);a.sortAttributes&&k.sort(e);d=0;for(h=k.length;d<h;d++)l=k[d],a.attribute(l[0],l[1]);a.openTagClose(m,
this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(m)},writeChildrenHtml:c.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,c=a.length;c;)a[--c].insertAfter(this);this.remove()},forEach:c.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&(b=a(b));for(var c=0,e=this.children.length;c<e;++c)if(b(this.children[c]))return this.children[c];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 c=0,e=a.length;c<e;++c)a[c].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(a);return a.getHtml()},split:function(a){for(var c=this.children.splice(a,this.children.length-a),e=this.clone(),k=0;k<c.length;++k)c[k].parent=e;e.children=c;c[0]&&(c[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(e,
this.getIndex()+1);return e},find:function(a,c){void 0===c&&(c=!1);var e=[],k;for(k=0;k<this.children.length;k++){var l=this.children[k];"function"==typeof a&&a(l)?e.push(l):"string"==typeof a&&l.name===a&&e.push(l);c&&l.find&&(e=e.concat(l.find(a,c)))}return e},findOne:function(a,c){var e=null,k=CKEDITOR.tools.array.find(this.children,function(k){var d="function"===typeof a?a(k):k.name===a;if(d||!c)return d;k.children&&k.findOne&&(e=k.findOne(a,!0));return!!e});return e||k||null},addClass:function(a){if(!this.hasClass(a)){var c=
this.attributes["class"]||"";this.attributes["class"]=c+(c?" ":"")+a}},removeClass:function(a){var c=this.attributes["class"];c&&((c=CKEDITOR.tools.trim(c.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=c:delete this.attributes["class"])},hasClass:function(a){var c=this.attributes["class"];return c?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(c):!1},getFilterContext:function(a){var c=[];a||(a={nonEditable:!1,nestedEditable:!1});a.nonEditable||"false"!=this.attributes.contenteditable?
a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&c.push("nestedEditable",!0):c.push("nonEditable",!0);if(c.length){a=CKEDITOR.tools.copy(a);for(var e=0;e<c.length;e+=2)a[c[e]]=c[e+1]}return a}},!0)})();(function(){var a=/{([^}]+)}/g;CKEDITOR.template=function(a){this.source="function"===typeof a?a:String(a)};CKEDITOR.template.prototype.output=function(e,c){var b=("function"===typeof this.source?this.source(e):this.source).replace(a,function(a,b){return void 0!==e[b]?e[b]:
a});return c?c.push(b):b}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(a){function e(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",e);a.on("destroy",e);CKEDITOR.fire("instance",null,a)};CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]};
(function(){var a={};CKEDITOR.addTemplate=function(e,c){var b=a[e];if(b)return b;b={name:e,source:c};CKEDITOR.fire("template",b);return a[e]=new CKEDITOR.template(b.source)};CKEDITOR.getTemplate=function(e){return a[e]}})();(function(){var a=[];CKEDITOR.addCss=function(e){a.push(e)};CKEDITOR.getCss=function(){return a.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(a,e){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var c=new CKEDITOR.editor(e,a,CKEDITOR.ELEMENT_MODE_INLINE),b=a.is("textarea")?a:null;b?(c.setData(b.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!c.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+b.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(b),b.hide(),b.$.form&&c._attachToForm()):c.setData(a.getHtml(),null,!0);c.on("loaded",function(){c.fire("uiReady");
c.editable(a);c.container=a;c.ui.contentsElement=a;c.setData(c.getData(1));c.resetDirty();c.fire("contentDom");c.mode="wysiwyg";c.fire("mode");c.status="ready";c.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,c)},null,null,1E4);c.on("destroy",function(){var a=c.container;b&&a&&(a.clearCustomData(),a.remove());b&&b.show();c.element.clearCustomData();delete c.element});return c};CKEDITOR.inlineAll=function(){var a,e,c;for(c in CKEDITOR.dtd.$editable)for(var b=CKEDITOR.document.getElementsByTag(c),
g=0,m=b.count();g<m;g++)a=b.getItem(g),"true"==a.getAttribute("contenteditable")&&(e={element:a,config:{}},!1!==CKEDITOR.fire("inline",e)&&CKEDITOR.inline(a,e.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";(function(){function a(a,g,m,k){a=CKEDITOR.editor._getEditorElement(a);if(!a)return null;var l=new CKEDITOR.editor(g,a,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),l._.required=a.hasAttribute("required"),
a.removeAttribute("required"));m&&l.setData(m,null,!0);l.on("loaded",function(){l.isDestroyed()||l.isDetached()||(c(l),k==CKEDITOR.ELEMENT_MODE_REPLACE&&l.config.autoUpdateElement&&a.$.form&&l._attachToForm(),l.setMode(l.config.startupMode,function(){l.resetDirty();l.status="ready";l.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,l)}))});l.on("destroy",e);return l}function e(){var a=this.container,c=this.element;a&&(a.clearCustomData(),a.remove());c&&(c.clearCustomData(),this.elementMode==
CKEDITOR.ELEMENT_MODE_REPLACE&&(c.show(),this._.required&&c.setAttribute("required","required")),delete this.element)}function c(a){var c=a.name,e=a.element,k=a.elementMode,l=a.fire("uiSpace",{space:"top",html:""}).html,d=a.fire("uiSpace",{space:"bottom",html:""}).html,h=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'),c=CKEDITOR.dom.element.createFromHtml(h.output({id:a.id,name:c,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:l?'\x3cspan id\x3d"'+
a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+l+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:d?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+d+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));k==CKEDITOR.ELEMENT_MODE_REPLACE?(e.hide(),c.insertAfter(e)):e.append(c);a.container=c;a.ui.contentsElement=a.ui.space("contents");l&&a.ui.space("top").unselectable();
d&&a.ui.space("bottom").unselectable();e=a.config.width;k=a.config.height;e&&c.setStyle("width",CKEDITOR.tools.cssLength(e));k&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(k));c.disableContextMenu();CKEDITOR.env.webkit&&c.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,c){return a(b,c,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,c,e){return a(b,c,e,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=
document.getElementsByTagName("textarea"),c=0;c<a.length;c++){var e=null,k=a[c];if(k.name||k.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(k.className))continue}else if("function"==typeof arguments[0]&&(e={},!1===arguments[0](k,e)))continue;this.replace(k,e)}}};CKEDITOR.editor.prototype.addMode=function(a,c){(this._.modes||(this._.modes={}))[a]=c};CKEDITOR.editor.prototype.setMode=function(a,c){var e=this,k=this._.modes;if(a!=e.mode&&k&&k[a]){e.fire("beforeSetMode",
a);if(e.mode){var l=e.checkDirty(),k=e._.previousModeData,d,h=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=d=e.getData(1);"source"==e.mode&&k==d&&(e.fire("lockSnapshot",{forceUpdate:!0}),h=1);e.ui.space("contents").setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[a](function(){e.mode=a;void 0!==l&&!l&&e.resetDirty();h?e.fire("unlockSnapshot"):"wysiwyg"==a&&e.fire("saveSnapshot");setTimeout(function(){e.isDestroyed()||e.isDetached()||
(e.fire("mode"),c&&c.call(e))},0)})}};CKEDITOR.editor.prototype.resize=function(a,c,e,k){var l=this.container,d=this.ui.space("contents"),h=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;k=k?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):l;k.setSize("width",a,!0);h&&(h.style.width="1%");var f=(k.$.offsetHeight||0)-(d.$.clientHeight||0),l=Math.max(c-(e?0:f),0);c=e?c+f:c;d.setStyle("height",l+"px");h&&(h.style.width=
"100%");this.fire("resize",{outerHeight:c,contentsHeight:l,outerWidth:a||k.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 a(a){var d=a.editor,f=a.data.path,c=f.blockLimit,h=a.data.selection,g=h.getRanges()[0],l;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(h=
e(h,f))h.appendBogus(),l=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&d._.previousActive;k(d,f.block,c)&&g.collapsed&&!g.getCommonAncestor().isReadOnly()&&(f=g.clone(),f.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),c=new CKEDITOR.dom.walker(f),c.guard=function(a){return!b(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!c.checkForward()||f.checkStartOfBlock()&&f.checkEndOfBlock())&&(d=g.fixBlock(!0,d.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(d=d.getFirst(b))&&
d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.getText()).match(/^(?:&nbsp;|\xa0)$/)&&d.remove(),l=1,a.cancel());l&&g.select()}function e(a,d){if(a.isFake)return 0;var f=d.block||d.blockLimit,c=f&&f.getLast(b);if(!(!f||!f.isBlockBoundary()||c&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||f.is("pre")||f.getBogus()))return f}function c(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function b(a){return n(a)&&p(a)}function g(a,
b){return function(d){var f=d.data.$.toElement||d.data.$.fromElement||d.data.$.relatedTarget;(f=f&&f.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(f):null)&&(b.equals(f)||b.contains(f))||a.call(this,d)}}function m(a){function d(a){return function(d,c){c&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(h)&&(f=d);if(!(c||!b(d)||a&&x(d)))return!1}}var f,c=a.getRanges()[0];a=a.root;var h={table:1,ul:1,ol:1,dl:1};if(c.startPath().contains(h)){var g=c.clone();g.collapse(1);g.setStartAt(a,CKEDITOR.POSITION_AFTER_START);
a=new CKEDITOR.dom.walker(g);a.guard=d();a.checkBackward();if(f)return g=c.clone(),g.collapse(),g.setEndAt(f,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=d(!0),f=!1,a.checkForward(),f}return null}function k(a,b,d){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(d)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function l(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?
"div":"p":!1}function d(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function h(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function f(a,b,d){var f=a.getCommonAncestor(b);for(b=a=d?b:a;(a=a.getParent())&&!f.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var n,p,v,x,q,u,w,t,z,r;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(d){if(!CKEDITOR.env.ie)throw d;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var d=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=g(b,this),d[0]=a,d[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,d)},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,d;for(d in a)a.hasOwnProperty(d)&&(b=a[d],null!==b?this.setAttribute(d,b):this.removeAttribute(d))},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 d=this.getAttribute(a);b!==d&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=d),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 f=this.editor;f.focus();f.fire("saveSnapshot");d||(d=f.getSelection().getRanges()[0]);u(this,b||"html",a,d);d.select();h(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,d){u(this,d||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,d){var f=this.editor;f.focus();f.fire("saveSnapshot");var c=f.activeEnterMode,f=f.getSelection(),g=a.getName(),g=CKEDITOR.dtd.$block[g];d||(d=f.getRanges()[0]);this.insertElementIntoRange(a,
d)&&(d.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),g&&((g=a.getNext(function(a){return b(a)&&!x(a)}))&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$block)?g.getDtd()["#"]?d.moveToElementEditStart(g):d.moveToElementEditEnd(a):g||c==CKEDITOR.ENTER_BR||(g=d.fixBlock(!0,c==CKEDITOR.ENTER_DIV?"div":"p"),d.moveToElementEditStart(g))));f.selectRanges([d]);h(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var f=this.editor,c=f.config.enterMode,
h=a.getName(),g=CKEDITOR.dtd.$block[h];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?w(b):b.startContainer.is(CKEDITOR.dtd.$list)&&t(b));var e,k;if(g)for(;(e=b.getCommonAncestor(0,1))&&(k=CKEDITOR.dtd[e.getName()])&&(!k||!k[h]);)if(e.getName()in CKEDITOR.dtd.span){var g=b.splitElement(e),l=b.createBookmark();d(e);d(g);b.moveToBookmark(l)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(e),
b.collapse(!0),e.remove()):b.splitBlock(c==CKEDITOR.ENTER_DIV?"div":"p",f.editable());b.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=d.getDocument().$,f=b.getSelection(),c;a:if(f.anchorNode&&f.anchorNode==d.$)c=!0;else{if(CKEDITOR.env.webkit&&
(c=d.getDocument().getActive())&&c.equals(d)&&!f.anchorNode){c=!0;break a}c=void 0}c&&(c=new CKEDITOR.dom.range(d),c.moveToElementEditStart(d),b=b.createRange(),b.setStart(c.startContainer.$,c.startOffset),b.collapse(!0),f.removeAllRanges(),f.addRange(b))}function b(){var a=d.getDocument().$,f=a.selection,c=d.getDocument().getActive();"None"==f.type&&c.equals(d)&&(f=new CKEDITOR.dom.range(d),a=a.body.createTextRange(),f.moveToElementEditStart(d),f=f.startContainer,f.type!=CKEDITOR.NODE_ELEMENT&&(f=
f.getParent()),a.moveToElementText(f.$),a.collapse(!0),a.select())}var d=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()};z.eol.detect(a,this);z.bogus.exclude(a);z.cell.shrink(a);a.fragment=a.range.cloneContents();
z.tree.rebuild(a,this);z.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=r,f={range:a,doc:a.document},c=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),c;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(f);f.bookmark=a.createBookmark();delete f.range;var h=this.editor.createRange();h.moveToPosition(f.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);f.targetBookmark=h.createBookmark();d.list.detectMerge(f,this);
d.table.detectRanges(f,this);d.block.detectMerge(f,this);f.tableContentsRanges?(d.table.deleteRanges(f),a.moveToBookmark(f.bookmark),f.range=a):(a.moveToBookmark(f.bookmark),f.range=a,a.extractContents(d.detectExtractMerge(f)));a.moveToBookmark(f.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(f,this);d.table.purge(f,this);d.block.merge(f,this);if(b){d=a.startPath();if(f=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var f=d.block.getElementsByTag("span"),
h=0,g;if(f)for(;g=f.getItem(h++);)if(!p(g)){f=!0;break a}f=!1}f=!f}f&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),v(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return c},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(q,function(a,b){return b}));a.setData(b,null,1)},
this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,
"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=
+a.readOnly;a.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(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var d=function(){var b=a.editable();null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",
d))};this.on("scroll",d)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var h=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var g=a.config.contentsLangDirection;this.getDirection(1)!=g&&this.changeAttr("dir",g);var e=CKEDITOR.getCss();
if(e){var g=h.getHead(),k=g.getCustomData("stylesheet");k?e!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText=e:k.setText(e)):(e=h.appendStyleText(e),e=new CKEDITOR.dom.element(e.ownerNode||e.owningElement),g.setCustomData("stylesheet",e),e.data("cke-temp",1))}g=h.getCustomData("stylesheet_ref")||0;h.setCustomData("stylesheet_ref",g+1);this.setCustomData("cke_includeReadonly",!a.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 l={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var d=b.data.domEvent.getKey(),f;b=a.getSelection();if(0!==b.getRanges().length){if(d in l){var c,h=b.getRanges()[0],g=h.startPath(),e,k,p,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(c=b.getSelectedElement())||(c=m(b))?(a.fire("saveSnapshot"),h.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),c.remove(),
h.select(),a.fire("saveSnapshot"),f=1):h.collapsed&&((e=g.block)&&(p=e[d?"getPrevious":"getNext"](n))&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("table")&&h[d?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),h[d?"checkEndOfBlock":"checkStartOfBlock"]()&&e.remove(),h["moveToElementEdit"+(d?"End":"Start")](p),h.select(),a.fire("saveSnapshot"),f=1):g.blockLimit&&g.blockLimit.is("td")&&(k=g.blockLimit.getAscendant("table"))&&h.checkBoundaryOfElement(k,d?CKEDITOR.START:CKEDITOR.END)&&(p=k[d?
"getPrevious":"getNext"](n))?(a.fire("saveSnapshot"),h["moveToElementEdit"+(d?"End":"Start")](p),h.checkStartOfBlock()&&h.checkEndOfBlock()?p.remove():h.select(),a.fire("saveSnapshot"),f=1):(k=g.contains(["td","th","caption"]))&&h.checkBoundaryOfElement(k,d?CKEDITOR.START:CKEDITOR.END)&&(f=1))}return!f}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(d){d.data.getKeystroke()in l&&!this.getFirst(b)&&(this.appendBogus(),d=a.createRange(),d.moveToPosition(this,
CKEDITOR.POSITION_AFTER_START),d.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",c);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var d=b.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(a.getSelection().selectElement(d),d.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&
this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&!b.isReadOnly()&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getAscendant("table")&&!b.getOuterHtml().replace(q,""))){var d=a.createRange();d.moveToElementEditStart(b);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),
this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var d=b.data.domEvent.getKey();if(d in l&&(b=a.getSelection(),0!==b.getRanges().length)){var d=8==d,c=b.getRanges()[0];b=c.startPath();if(c.collapsed)a:{var h=b.block;if(h&&c[d?"checkStartOfBlock":"checkEndOfBlock"]()&&c.moveToClosestEditablePosition(h,!d)&&c.collapsed){if(c.startContainer.type==CKEDITOR.NODE_ELEMENT){var g=
c.startContainer.getChild(c.startOffset-(d?1:0));if(g&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("hr")){a.fire("saveSnapshot");g.remove();b=!0;break a}}c=c.startPath().block;if(!c||c&&c.contains(h))b=void 0;else{a.fire("saveSnapshot");var e;(e=(d?c:h).getBogus())&&e.remove();e=a.getSelection();g=e.createBookmarks();(d?h:c).moveChildren(d?c:h,!1);b.lastElement.mergeSiblings();f(h,c,!d);e.selectBookmarks(g);b=!0}}else b=!1}else d=c,e=b.block,c=d.endPath().block,e&&c&&!e.equals(c)?(a.fire("saveSnapshot"),
(h=e.getBogus())&&h.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),c.getParent()&&(c.moveChildren(e,!1),b.lastElement.mergeSiblings(),f(e,c,!0)),d=a.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.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 d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(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(b){var d=b.editor;d.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))});d.on("selectionChange",function(b){if(!d.readOnly){var f=d.getSelection();f&&!f.isLocked&&(f=d.checkDirty(),d.fire("lockSnapshot"),a(b),d.fire("unlockSnapshot"),!f&&d.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var d=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var f=b.fire("ariaEditorHelpLabel",{}).label;if(f&&
(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var c=CKEDITOR.tools.getNextId(),f=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+c+'" class\x3d"cke_voice_label"\x3e'+f+"\x3c/span\x3e");d.append(f);a.changeAttr("aria-describedby",c)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");n=CKEDITOR.dom.walker.whitespaces(!0);p=CKEDITOR.dom.walker.bookmark(!1,!0);v=CKEDITOR.dom.walker.empty();
x=CKEDITOR.dom.walker.bogus();q=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;u=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function f(b,d){var c,h,g,e,k=[],l=d.range.startContainer;c=d.range.startPath();for(var l=m[l.getName()],n=0,p=b.getChildren(),t=p.count(),u=-1,r=-1,G=0,v=c.contains(m.$list);n<t;++n)c=p.getItem(n),a(c)?(g=c.getName(),v&&g in CKEDITOR.dtd.$list?k=k.concat(f(c,d)):(e=!!l[g],
"br"!=g||!c.data("cke-eol")||n&&n!=t-1||(G=(h=n?k[n-1].node:p.getItem(n+1))&&(!a(h)||!h.is("br")),h=h&&a(h)&&m.$block[h.getName()]),-1!=u||e||(u=n),e||(r=n),k.push({isElement:1,isLineBreak:G,isBlock:c.isBlockBoundary(),hasBlockSibling:h,node:c,name:g,allowed:e}),h=G=0)):k.push({isElement:0,node:c,allowed:1});-1<u&&(k[u].firstNotAllowed=1);-1<r&&(k[r].lastNotAllowed=1);return k}function c(b,d){var f=[],h=b.getChildren(),g=h.count(),e,k=0,l=m[d],n=!b.is(m.$inline)||b.is("br");for(n&&f.push(" ");k<g;k++)e=
h.getItem(k),a(e)&&!e.is(l)?f=f.concat(c(e,d)):f.push(e);n&&f.push(" ");return f}function h(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function g(b){return b&&a(b)&&(b.is(m.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function e(b,d,f,c){var h=b.clone(),g,k;h.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);(g=(new CKEDITOR.dom.walker(h)).next())&&a(g)&&p[g.getName()]&&(k=g.getPrevious())&&a(k)&&!k.getParent().equals(b.startContainer)&&f.contains(k)&&c.contains(g)&&g.isIdentical(k)&&
(g.moveChildren(k),g.remove(),e(b,d,f,c))}function n(b,d){function f(b,d){if(d.isBlock&&d.isElement&&!d.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var c=d.endContainer.getChild(d.endOffset),h=d.endContainer.getChild(d.endOffset-1);c&&f(c,b[b.length-1]);h&&f(h,b[0])&&(d.setEnd(d.endContainer,d.endOffset-1),d.collapse())}var m=CKEDITOR.dtd,p={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},t={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},u=CKEDITOR.tools.extend({},
m.$inline);delete u.br;return function(E,p,r,v){var z=E.editor,w=!1;"unfiltered_html"==p&&(p="html",w=!0);if(!v.checkReadOnly()){var x=(new CKEDITOR.dom.elementPath(v.startContainer,v.root)).blockLimit||v.root;p={type:p,dontFilter:w,editable:E,editor:z,range:v,blockLimit:x,mergeCandidates:[],zombies:[]};var w=p.range,x=p.mergeCandidates,q="html"===p.type,D,N,U,aa,ba,V;"text"==p.type&&w.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(N=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
w.document),w.insertNode(N),w.setStartAfter(N));U=new CKEDITOR.dom.elementPath(w.startContainer);p.endPath=aa=new CKEDITOR.dom.elementPath(w.endContainer);if(!w.collapsed){D=aa.block||aa.blockLimit;var da=w.getCommonAncestor();D&&!D.equals(da)&&!D.contains(da)&&w.checkEndOfBlock()&&p.zombies.push(D);w.deleteContents()}for(;(ba=h(w))&&a(ba)&&ba.isBlockBoundary()&&U.contains(ba);)w.moveToPosition(ba,CKEDITOR.POSITION_BEFORE_END);e(w,p.blockLimit,U,aa);N&&(w.setEndBefore(N),w.collapse(),N.remove());
N=w.startPath();if(D=N.contains(g,!1,1))V=w.splitElement(D),p.inlineStylesRoot=D,p.inlineStylesPeak=N.lastElement;N=w.createBookmark();q&&(d(D),d(V));(D=N.startNode.getPrevious(b))&&a(D)&&g(D)&&x.push(D);(D=N.startNode.getNext(b))&&a(D)&&g(D)&&x.push(D);for(D=N.startNode;(D=D.getParent())&&g(D);)x.push(D);w.moveToBookmark(N);z.enterMode===CKEDITOR.ENTER_DIV&&""===z.getData(!0)&&((z=E.getFirst())&&z.remove(),v.setStartAt(E,CKEDITOR.POSITION_AFTER_START),v.collapse(!0));if(E=r){E=p.range;if("text"==
p.type&&p.inlineStylesRoot){v=p.inlineStylesPeak;z=v.getDocument().createText("{cke-peak}");for(V=p.inlineStylesRoot.getParent();!v.equals(V);)z=z.appendTo(v.clone()),v=v.getParent();r=z.getOuterHtml().split("{cke-peak}").join(r)}v=p.blockLimit.getName();if(/^\s+|\s+$/.test(r)&&"span"in CKEDITOR.dtd[v]){var X='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';r=X+r+X}r=p.editor.dataProcessor.toHtml(r,{context:null,fixForBody:!1,protectedWhitespaces:!!X,dontFilter:p.dontFilter,filter:p.editor.activeFilter,
enterMode:p.editor.activeEnterMode});v=E.document.createElement("body");v.setHtml(r);X&&(v.getFirst().remove(),v.getLast().remove());if((X=E.startPath().block)&&(1!=X.getChildCount()||!X.getBogus()))a:{var P;if(1==v.getChildCount()&&a(P=v.getFirst())&&P.is(t)&&!P.hasAttribute("contenteditable")){X=P.getElementsByTag("*");E=0;for(V=X.count();E<V;E++)if(z=X.getItem(E),!z.is(u))break a;P.moveChildren(P.getParent(1));P.remove()}}p.dataWrapper=v;E=r}if(E){P=p.range;E=P.document;v=p.blockLimit;V=0;var R,
X=[],I,Y;r=N=0;var ca,z=P.startContainer;ba=p.endPath.elements[0];var ea,w=ba.getPosition(z),x=!!ba.getCommonAncestor(z)&&w!=CKEDITOR.POSITION_IDENTICAL&&!(w&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),z=f(p.dataWrapper,p);for(n(z,P);V<z.length;V++){w=z[V];if(q=w.isLineBreak)q=P,D=v,aa=U=void 0,w.hasBlockSibling?q=1:(U=q.startContainer.getAscendant(m.$block,1))&&U.is({div:1,p:1})?(aa=U.getPosition(D),aa==CKEDITOR.POSITION_IDENTICAL||aa==CKEDITOR.POSITION_CONTAINS?q=0:(D=q.splitElement(U),
q.moveToPosition(D,CKEDITOR.POSITION_AFTER_START),q=1)):q=0;if(q)r=0<V;else{q=P.startPath();!w.isBlock&&k(p.editor,q.block,q.blockLimit)&&(Y=l(p.editor))&&(Y=E.createElement(Y),Y.appendBogus(),P.insertNode(Y),CKEDITOR.env.needsBrFiller&&(R=Y.getBogus())&&R.remove(),P.moveToPosition(Y,CKEDITOR.POSITION_BEFORE_END));if((q=P.startPath().block)&&!q.equals(I)){if(R=q.getBogus())R.remove(),X.push(q);I=q}w.firstNotAllowed&&(N=1);if(N&&w.isElement){q=P.startContainer;for(D=null;q&&!m[q.getName()][w.name];){if(q.equals(v)){q=
null;break}D=q;q=q.getParent()}if(q)D&&(ca=P.splitElement(D),p.zombies.push(ca),p.zombies.push(D));else{D=v.getName();ea=!V;q=V==z.length-1;D=c(w.node,D);U=[];aa=D.length;for(var da=0,fa=void 0,ia=0,ja=-1;da<aa;da++)fa=D[da]," "==fa?(ia||ea&&!da||(U.push(new CKEDITOR.dom.text(" ")),ja=U.length),ia=1):(U.push(fa),ia=0);q&&ja==U.length&&U.pop();ea=U}}if(ea){for(;q=ea.pop();)P.insertNode(q);ea=0}else P.insertNode(w.node);w.lastNotAllowed&&V<z.length-1&&((ca=x?ba:ca)&&P.setEndAt(ca,CKEDITOR.POSITION_AFTER_START),
N=0);P.collapse()}}1!=z.length?R=!1:(R=z[0],R=R.isElement&&"false"==R.node.getAttribute("contenteditable"));R&&(r=!0,q=z[0].node,P.setStartAt(q,CKEDITOR.POSITION_BEFORE_START),P.setEndAt(q,CKEDITOR.POSITION_AFTER_END));p.dontMoveCaret=r;p.bogusNeededBlocks=X}R=p.range;var ha;ca=p.bogusNeededBlocks;for(ea=R.createBookmark();I=p.zombies.pop();)I.getParent()&&(Y=R.clone(),Y.moveToElementEditStart(I),Y.removeEmptyBlocksAtEnd());if(ca)for(;I=ca.pop();)CKEDITOR.env.needsBrFiller?I.appendBogus():I.append(R.document.createText(" "));
for(;I=p.mergeCandidates.pop();)I.mergeSiblings();R.moveToBookmark(ea);if(!p.dontMoveCaret){for(I=h(R);I&&a(I)&&!I.is(m.$empty);){if(I.isBlockBoundary())R.moveToPosition(I,CKEDITOR.POSITION_BEFORE_END);else{if(g(I)&&I.getHtml().match(/(\s|&nbsp;)$/g)){ha=null;break}ha=R.clone();ha.moveToPosition(I,CKEDITOR.POSITION_BEFORE_END)}I=I.getLast(b)}ha&&R.moveToRange(ha)}}}}();w=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,d,f){d=a.getDocument().createElement(d);a.append(d,f);return d}function d(a){var b=a.count(),f;for(b;0<b--;)f=a.getItem(b),CKEDITOR.tools.trim(f.getHtml())||(f.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&f.getChildCount()&&f.getFirst().remove())}return function(f){var c=f.startContainer,h=c.getAscendant("table",1),g=!1;d(h.getElementsByTag("td"));d(h.getElementsByTag("th"));h=f.clone();h.setStart(c,0);h=
a(h).lastBackward();h||(h=f.clone(),h.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),h=a(h).lastForward(),g=!0);h||(h=c);h.is("table")?(f.setStartAt(h,CKEDITOR.POSITION_BEFORE_START),f.collapse(!0),h.remove()):(h.is({tbody:1,thead:1,tfoot:1})&&(h=b(h,"tr",g)),h.is("tr")&&(h=b(h,h.getParent().is("thead")?"th":"td",g)),(c=h.getBogus())&&c.remove(),f.moveToPosition(h,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();t=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 d=b.startContainer,f=!1,c;c=b.clone();c.setStart(d,0);c=a(c).lastBackward();c||(c=b.clone(),c.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),c=a(c).lastForward(),f=!0);c||(c=d);c.is(CKEDITOR.dtd.$list)?(b.setStartAt(c,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),c.remove()):
((d=c.getBogus())&&d.remove(),b.moveToPosition(c,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();z={eol:{detect:function(a,b){var d=a.range,f=d.clone(),c=d.clone(),h=new CKEDITOR.dom.elementPath(d.startContainer,b),g=new CKEDITOR.dom.elementPath(d.endContainer,b);f.collapse(1);c.collapse();h.block&&f.checkBoundaryOfElement(h.block,CKEDITOR.END)&&(d.setStartAfter(h.block),a.prependEolBr=1);g.block&&c.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(d.setEndBefore(g.block),
a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),f;a.appendEolBr&&(f=this.createEolBr(d),a.fragment.append(f));!a.prependEolBr||f&&!f.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode;!b||!x(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,f=d.getCommonAncestor(),c=new CKEDITOR.dom.elementPath(f,
b),h=new CKEDITOR.dom.elementPath(d.startContainer,b),d=new CKEDITOR.dom.elementPath(d.endContainer,b),g;f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent());if(c.blockLimit.is({tr:1,table:1})){var e=c.contains("table").getParent();g=function(a){return!a.equals(e)}}else if(c.block&&c.block.is(CKEDITOR.dtd.$listItem)&&(h=h.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!h.equals(d))){var k=c.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(k)}}g||(g=function(a){return!a.equals(c.block)&&
!a.equals(c.blockLimit)});this.rebuildFragment(a,b,f,g)},rebuildFragment:function(a,b,d,f){for(var c;d&&!d.equals(b)&&f(d);)c=d.clone(0,1),a.fragment.appendTo(c),a.fragment=c,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer,f=a.startOffset,c=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++f==c&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};r=function(){function a(b,d){var f=b.getParent();if(f.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](f)}
function b(d,f,c){a(f);a(c,1);for(var h;h=c.getNext();)h.insertAfter(f),f=h;v(d)&&d.remove()}function d(a,b){var f=new CKEDITOR.dom.range(a);f.setStartAfter(b.startNode);f.setEndBefore(b.endNode);return f}return{list:{detectMerge:function(a,b){var f=d(b,a.bookmark),c=f.startPath(),h=f.endPath(),g=c.contains(CKEDITOR.dtd.$list),e=h.contains(CKEDITOR.dtd.$list);a.mergeList=g&&e&&g.getParent().equals(e.getParent())&&!g.equals(e);a.mergeListItems=c.block&&h.block&&c.block.is(CKEDITOR.dtd.$listItem)&&
h.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)f=f.clone(),f.setStartBefore(a.bookmark.startNode),f.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=f.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var f=a.mergeListBookmark.startNode,c=a.mergeListBookmark.endNode,h=new CKEDITOR.dom.elementPath(f,d),g=new CKEDITOR.dom.elementPath(c,d);if(a.mergeList){var e=h.contains(CKEDITOR.dtd.$list),k=g.contains(CKEDITOR.dtd.$list);e.equals(k)||(k.moveChildren(e),k.remove())}a.mergeListItems&&
(h=h.contains(CKEDITOR.dtd.$listItem),g=g.contains(CKEDITOR.dtd.$listItem),h.equals(g)||b(g,f,c));f.remove();c.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var f=a.mergeBlockBookmark.startNode,c=a.mergeBlockBookmark.endNode,h=new CKEDITOR.dom.elementPath(f,
d),g=new CKEDITOR.dom.elementPath(c,d),h=h.block,g=g.block;h&&g&&!h.equals(g)&&b(g,f,c);f.remove();c.remove()}}},table:function(){function a(d){var c=[],h,g=new CKEDITOR.dom.walker(d),e=d.startPath().contains(f),k=d.endPath().contains(f),l={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var n="visited_"+(g?"out":"in");if(a.getCustomData(n))return;CKEDITOR.dom.element.setMarker(l,a,n,1)}if(g&&e&&a.equals(e))h=d.clone(),h.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),c.push(h);else if(!g&&k&&
a.equals(k))h=d.clone(),h.setStartAt(k,CKEDITOR.POSITION_AFTER_START),c.push(h);else{if(n=!g)n=a.type==CKEDITOR.NODE_ELEMENT&&a.is(f)&&(!e||b(a,e))&&(!k||b(a,k));if(!n&&(n=g))if(a.is(f))var n=e&&e.getAscendant("table",!0),m=k&&k.getAscendant("table",!0),p=a.getAscendant("table",!0),n=n&&n.contains(p)||m&&m.contains(p);else n=void 0;n&&(h=d.clone(),h.selectNodeContents(a),c.push(h))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return c}function b(a,d){var f=CKEDITOR.POSITION_CONTAINS+
CKEDITOR.POSITION_IS_CONTAINED,c=a.getPosition(d);return c===CKEDITOR.POSITION_IDENTICAL?!1:0===(c&f)}var f={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),c=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(f)&&++c};d.checkForward();if(1<c){var d=b.startPath().contains("table"),h=b.endPath().contains("table");d&&h&&b.checkBoundaryOfElement(d,CKEDITOR.START)&&b.checkBoundaryOfElement(h,
CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(d),b.setEndAfter(h),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(c,h){var g=d(h,c.bookmark),e=g.clone(),k,l,n=g.getCommonAncestor();n.is(CKEDITOR.dtd.$tableContent)&&!n.is(f)&&(n=n.getAscendant("table",!0));l=n;n=new CKEDITOR.dom.elementPath(g.startContainer,l);l=new CKEDITOR.dom.elementPath(g.endContainer,l);n=n.contains("table");l=l.contains("table");if(n||l)n&&l&&b(n,l)?(c.tableSurroundingRange=e,e.setStartAt(n,CKEDITOR.POSITION_AFTER_END),
e.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),e=g.clone(),e.setEndAt(n,CKEDITOR.POSITION_AFTER_END),k=g.clone(),k.setStartAt(l,CKEDITOR.POSITION_BEFORE_START),k=a(e).concat(a(k))):n?l||(c.tableSurroundingRange=e,e.setStartAt(n,CKEDITOR.POSITION_AFTER_END),g.setEndAt(n,CKEDITOR.POSITION_AFTER_END)):(c.tableSurroundingRange=e,e.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),g.setStartAt(l,CKEDITOR.POSITION_AFTER_START)),c.tableContentsRanges=k?k:a(g)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),
v(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,d=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);d.moveToBookmark(a.purgeTableBookmark);d.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 d=b.startPath(),f;k(a,d.block,d.blockLimit)&&(f=l(a))&&(f=b.document.createElement(f),f.appendBogus(),b.insertNode(f),b.moveToPosition(f,CKEDITOR.POSITION_AFTER_START))}}}()})();(function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function e(b,d){if(0===b.length||a(b[0].getEnclosedNode()))return!1;var f,c;if((f=
!d&&1===b.length)&&!(f=b[0].collapsed)){var h=b[0];f=h.startContainer.getAscendant({td:1,th:1},!0);var g=h.endContainer.getAscendant({td:1,th:1},!0);c=CKEDITOR.tools.trim;f&&f.equals(g)&&!f.findOne("td, th, tr, tbody, table")?(h=h.cloneContents(),f=h.getFirst()?c(h.getFirst().getText())!==c(f.getText()):!0):f=!1}if(f)return!1;for(c=0;c<b.length;c++)if(f=b[c]._getTableElement(),!f)return!1;return!0}function c(a){function b(a){a=a.find("td, th");var d=[],f;for(f=0;f<a.count();f++)d.push(a.getItem(f));
return d}var d=[],f,c;for(c=0;c<a.length;c++)f=a[c]._getTableElement(),f.is&&f.is({td:1,th:1})?d.push(f):d=d.concat(b(f));return d}function b(a){a=c(a);var b="",d=[],f,h;for(h=0;h<a.length;h++)f&&!f.equals(a[h].getAscendant("tr"))?(b+=d.join("\t")+"\n",f=a[h].getAscendant("tr"),d=[]):0===h&&(f=a[h].getAscendant("tr")),d.push(a[h].getText());return b+=d.join("\t")}function g(a){var d=this.root.editor,f=d.getSelection(1);this.reset();r=!0;f.root.once("selectionchange",function(a){a.cancel()},null,null,
0);f.selectRanges([a[0]]);f=this._.cache;f.ranges=new CKEDITOR.dom.rangeList(a);f.type=CKEDITOR.SELECTION_TEXT;f.selectedElement=a[0]._getTableElement();f.selectedText=b(a);f.nativeSel=null;this.isFake=1;this.rev=w++;d._.fakeSelection=this;r=!1;this.root.fire("selectionchange")}function m(){var b=this._.fakeSelection,d;if(b){d=this.getSelection(1);var f;if(!(f=!d)&&(f=!d.isHidden())){f=b;var c=d.getRanges(),h=f.getRanges(),g=c.length&&c[0]._getTableElement()&&c[0]._getTableElement().getAscendant("table",
!0),k=h.length&&h[0]._getTableElement()&&h[0]._getTableElement().getAscendant("table",!0),l=1===c.length&&c[0]._getTableElement()&&c[0]._getTableElement().is("table"),n=1===h.length&&h[0]._getTableElement()&&h[0]._getTableElement().is("table");if(a(f.getSelectedElement()))f=!1;else{var m=1===c.length&&c[0].collapsed,h=e(c,!!CKEDITOR.env.webkit)&&e(h);g=g&&k?g.equals(k)||k.contains(g):!1;g&&(m||h)?(l&&!n&&f.selectRanges(c),f=!0):f=!1}f=!f}f&&(b.reset(),b=0)}if(!b&&(b=d||this.getSelection(1),!b||b.getType()==
CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",b);d=this.elementPath();d.compare(this._.selectionPreviousPath)||(f=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(d.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||f||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=d,this.fire("selectionChange",{selection:b,path:d}))}function k(){A=!0;y||(l.call(this),y=CKEDITOR.tools.setTimeout(l,200,this))}function l(){y=null;A&&(CKEDITOR.tools.setTimeout(m,
0,this),A=!1)}function d(a){return C(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function h(a){function b(d,f){return d&&d.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(f?"End":"Start")](d):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var f=a.startContainer,c=a.getPreviousNode(d,null,f),h=a.getNextNode(d,null,f);return b(c)||b(h,1)||!(c||h||f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()&&f.getBogus())?!0:!1}function f(a){n(a,!1);var b=a.getDocument().createText(t);
a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==b){var f=a.getDocument().getSelection().getNative(),c=f&&"None"!=f.type&&f.getRangeAt(0),h=t.length;if(d.getLength()>h&&c&&c.intersectsNode(d.$)){var g=[{node:f.anchorNode,offset:f.anchorOffset},{node:f.focusNode,offset:f.focusOffset}];f.anchorNode==d.$&&f.anchorOffset>h&&(g[0].offset-=h);f.focusNode==d.$&&f.focusOffset>h&&(g[1].offset-=h)}}d.setText(p(d.getText(),1));g&&(d=a.getDocument().$,
f=d.getSelection(),d=d.createRange(),d.setStart(g[0].node,g[0].offset),d.collapse(!0),f.removeAllRanges(),f.addRange(d),f.extend(g[1].node,g[1].offset))}}function p(a,b){return b?a.replace(z,function(a,b){return b?" ":""}):a.replace(t,"")}function v(a,b){var d=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+
'"\x3e'+d+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var f=a.getSelection(1),c=a.createRange(),h=f.root.on("selectionchange",function(a){a.cancel()},null,null,0);c.setStartAt(d,CKEDITOR.POSITION_AFTER_START);c.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);f.selectRanges([c]);h.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function x(a){var b={37:1,39:1,8:1,46:1};return function(d){var f=d.data.getKeystroke();if(b[f]){var c=a.getSelection().getRanges(),
h=c[0];1==c.length&&h.collapsed&&(f=h[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&f.type==CKEDITOR.NODE_ELEMENT&&"false"==f.getAttribute("contenteditable")&&(a.getSelection().fake(f),d.data.preventDefault(),d.cancel())}}}function q(a){for(var b=0;b<a.length;b++){var d=a[b];d.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!d.collapsed){if(d.startContainer.isReadOnly())for(var f=d.startContainer,c;f&&!((c=f.type==CKEDITOR.NODE_ELEMENT)&&f.is("body")||!f.isReadOnly());)c&&"false"==
f.getAttribute("contentEditable")&&d.setStartAfter(f),f=f.getParent();f=d.startContainer;c=d.endContainer;var h=d.startOffset,g=d.endOffset,e=d.clone();f&&f.type==CKEDITOR.NODE_TEXT&&(h>=f.getLength()?e.setStartAfter(f):e.setStartBefore(f));c&&c.type==CKEDITOR.NODE_TEXT&&(g?e.setEndAfter(c):e.setEndBefore(c));f=new CKEDITOR.dom.walker(e);f.evaluator=function(f){if(f.type==CKEDITOR.NODE_ELEMENT&&f.isReadOnly()){var c=d.clone();d.setEndBefore(f);d.collapsed&&a.splice(b--,1);f.getPosition(e.endContainer)&
CKEDITOR.POSITION_CONTAINS||(c.setStartAfter(f),c.collapsed||a.splice(b+1,0,c));return!0}return!1};f.next()}}return a}var u="function"!=typeof window.getSelection,w=1,t=CKEDITOR.tools.repeat("​",7),z=new RegExp(t+"( )?","g"),r,y,A,C=CKEDITOR.dom.walker.invisible(1),B=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]);return!1}}function b(a){return function(b){var d=b.editor,f=d.createRange(),
c;if(!d.readOnly)return(c=f.moveToClosestEditablePosition(b.selected,a))||(c=f.moveToClosestEditablePosition(b.selected,!a)),c&&d.getSelection().selectRanges([f]),d.fire("saveSnapshot"),b.selected.remove(),c||(f.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([f])),d.fire("saveSnapshot"),!1}}var d=a(),f=a(1);return{37:d,38:d,39:f,40:f,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom",
function(){function a(){r=new CKEDITOR.dom.selection(d.getSelection());r.lock()}function b(){h.removeListener("mouseup",b);l.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==c.$&&d.select()}function f(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 c=d.document,h=CKEDITOR.document,g=d.editable(),e=c.getBody(),l=c.getDocumentElement(),p=g.isInline(),t,r;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();0!==t&&(a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=d.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){t=d._.previousActive&&
d._.previousActive.equals(c.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=g.$.scrollTop;CKEDITOR.env.webkit&&t&&a&&(g.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(t);t=0},null,null,-1);g.attachListener(g,"mousedown",function(){t=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||p)u?g.attachListener(g,"beforedeactivate",a,null,null,-1):g.attachListener(d,"selectionCheck",a,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=
r&&(r.isFake||2>r.getRanges());CKEDITOR.env.gecko&&!p&&a||(d.lockSelection(r),t=1)},null,null,-1),g.attachListener(g,"mousedown",function(){t=0});if(CKEDITOR.env.ie&&!p){var v;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(v=d.window.getScrollPosition()))});g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&v&&(d.document.$.documentElement.scrollLeft=v.x,d.document.$.documentElement.scrollTop=v.y);v=null});
if("BackCompat"!=c.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var w,z;l.on("mousedown",function(a){function b(a){a=a.data.$;if(w){var d=e.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(f){}w.setEndPoint(0>z.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);w.select()}}function d(){l.removeListener("mousemove",b);h.removeListener("mouseup",d);l.removeListener("mouseup",d);w.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<l.$.clientHeight&&
a.$.x<l.$.clientWidth){w=e.$.createTextRange();try{w.moveToPoint(a.$.clientX,a.$.clientY)}catch(f){}z=w.duplicate();l.on("mousemove",b);h.on("mouseup",d);l.on("mouseup",d)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)l.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",b),l.on("mouseup",b))})}}g.attachListener(g,"selectionchange",m,d);g.attachListener(g,"keyup",k,d);g.attachListener(g,"touchstart",k,d);g.attachListener(g,"touchend",k,d);CKEDITOR.env.ie&&g.attachListener(g,
"keydown",function(a){var b=this.getSelection(1),d=f(b);d&&!d.equals(g)&&(b.selectElement(d),a.data.preventDefault())},d);g.attachListener(g,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var A;g.attachListener(g,"mousedown",function(){A=1});g.attachListener(c.getDocumentElement(),"mouseup",function(){A&&k.call(d);A=0})}else g.attachListener(CKEDITOR.env.ie?g:c.getDocumentElement(),
"mouseup",k,d);CKEDITOR.env.webkit&&g.attachListener(c,"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:g.hasFocus&&n(g)}},null,null,-1);g.attachListener(g,"keydown",x(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&b()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",b,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection;
delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=d.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=d.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);d.on("key",function(a){if("wysiwyg"==d.mode){var b=d.getSelection();if(b.isFake){var f=B[a.data.keyCode];if(f)return f({editor:d,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(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):d.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=p(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=p(a.data.dataValue)},
null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:k).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.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 d=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:w++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?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 f,c;if(a)if(a.getRangeAt)f=
(c=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(c.commonAncestorContainer);else{try{c=a.createRange()}catch(h){}f=c&&CKEDITOR.dom.element.get(c.item&&c.item(0)||c.parentElement())}if(!f||f.type!=CKEDITOR.NODE_ELEMENT&&f.type!=CKEDITOR.NODE_TEXT||!this.root.equals(f)&&!this.root.contains(f))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 F=
{img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:p,_createFillingCharSequenceNode:f,FILLING_CHAR_SEQUENCE:t});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 d=this.getNative(),f=d.type;"Text"==f&&(b=CKEDITOR.SELECTION_TEXT);"Control"==f&&(b=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(c){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==d.rangeCount){var d=d.getRangeAt(0),f=d.startContainer;
f==d.endContainer&&1==f.nodeType&&1==d.endOffset-d.startOffset&&F[f.childNodes[d.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,d){b=b.duplicate();b.collapse(d);var f=b.parentElement();if(!f.hasChildNodes())return{container:f,offset:0};for(var c=f.children,h,g,e=b.duplicate(),k=0,l=c.length-1,n=-1,m,p;k<=l;)if(n=Math.floor((k+l)/2),h=c[n],e.moveToElementText(h),
m=e.compareEndPoints("StartToStart",b),0<m)l=n-1;else if(0>m)k=n+1;else return{container:f,offset:a(h)};if(-1==n||n==c.length-1&&0>m){e.moveToElementText(f);e.setEndPoint("StartToStart",b);e=e.text.replace(/(\r\n|\r)/g,"\n").length;c=f.childNodes;if(!e)return h=c[c.length-1],h.nodeType!=CKEDITOR.NODE_TEXT?{container:f,offset:c.length}:{container:h,offset:h.nodeValue.length};for(f=c.length;0<e&&0<f;)g=c[--f],g.nodeType==CKEDITOR.NODE_TEXT&&(p=g,e-=g.nodeValue.length);return{container:p,offset:-e}}e.collapse(0<
m?!0:!1);e.setEndPoint(0<m?"StartToStart":"EndToStart",b);e=e.text.replace(/(\r\n|\r)/g,"\n").length;if(!e)return{container:f,offset:a(h)+(0<m?0:1)};for(;0<e;)try{g=h[0<m?"previousSibling":"nextSibling"],g.nodeType==CKEDITOR.NODE_TEXT&&(e-=g.nodeValue.length,p=g),h=g}catch(t){return{container:f,offset:a(h)}}return{container:p,offset:0<m?-e:p.nodeValue.length+e}};return function(){var a=this.getNative(),d=a&&a.createRange(),f=this.getType();if(!a)return[];if(f==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),
f=b(d,!0),a.setStart(new CKEDITOR.dom.node(f.container),f.offset),f=b(d),a.setEnd(new CKEDITOR.dom.node(f.container),f.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(f==CKEDITOR.SELECTION_ELEMENT){for(var f=[],c=0;c<d.length;c++){for(var h=d.item(c),g=h.parentNode,e=0,a=new CKEDITOR.dom.range(this.root);e<g.childNodes.length&&g.childNodes[e]!=h;e++);a.setStart(new CKEDITOR.dom.node(g),e);a.setEnd(new CKEDITOR.dom.node(g),
e+1);f.push(a)}return f}return[]}}():function(){var a=[],b,d=this.getNative();if(!d)return a;for(var f=0;f<d.rangeCount;f++){var c=d.getRangeAt(f);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(c.startContainer),c.startOffset);b.setEnd(new CKEDITOR.dom.node(c.endContainer),c.endOffset);a.push(b)}return a};return function(b){var d=this._.cache,f=d.ranges;f||(d.ranges=f=new CKEDITOR.dom.rangeList(a.call(this)));return b?q(new CKEDITOR.dom.rangeList(f.slice())):f}}(),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 d=this.getRanges()[0];if(d){if(d.collapsed)b=d.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(d.optimize();b=d.startContainer,d.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)d.setStartAfter(b);b=d.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();
if((b=b.getChild(d.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(d=b.getFirst();d&&d.type==CKEDITOR.NODE_ELEMENT;)b=d,d=d.getFirst();else b=d.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,d=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),d,f,c=2;c&&!((d=a.getEnclosedNode())&&
d.type==CKEDITOR.NODE_ELEMENT&&F[d.getName()]&&(f=d));c--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return f&&f.$});return a.selectedElement=d?new CKEDITOR.dom.element(d):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var 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(),d=this.getRanges(),f=this.isFake;this.isLocked=0;this.reset();a&&(a=b||d[0]&&d[0].getCommonAncestor())&&a.getAscendant("body",1)&&(this.root.editor.plugins.tableselection&&e(d)?g.call(this,d):f?this.fake(b):b&&2>d.length?this.selectElement(b):this.selectRanges(d))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;
var b=a._.hiddenSelectionContainer;if(b){var d=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!d&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=w++},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,d=b&&b._.hiddenSelectionContainer;this.reset();if(d)for(var d=this.root,c,k=0;k<a.length;++k)c=
a[k],c.endContainer.equals(d)&&(c.endOffset=Math.min(c.endOffset,d.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 p,t;if(1==a.length&&!(t=a[0]).collapsed&&(m=t.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(t=t.clone(),t.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(p=t.getEnclosedNode())&&p.type==CKEDITOR.NODE_ELEMENT&&(m=p),"false"==m.getAttribute("contenteditable")))break a;
m=void 0}if(m)this.fake(m);else if(b&&b.plugins.tableselection&&b.plugins.tableselection.isSupportedEnvironment()&&e(a)&&!r&&!a[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))g.call(this,a);else{if(u){p=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;t={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 v,w,z;if((d=b.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in F&&(!d.is("a")||
!d.getText()))try{z=d.$.createControlRange();z.addElement(d.$);z.select();return}catch(x){}if(b.startContainer.type==CKEDITOR.NODE_ELEMENT&&b.startContainer.getName()in t||b.endContainer.type==CKEDITOR.NODE_ELEMENT&&b.endContainer.getName()in t)b.shrink(CKEDITOR.NODE_ELEMENT,!0),a=b.collapsed;z=b.createBookmark();t=z.startNode;a||(l=z.endNode);z=b.document.$.body.createTextRange();z.moveToElementText(t.$);z.moveStart("character",1);l?(m=b.document.$.body.createTextRange(),m.moveToElementText(l.$),
z.setEndPoint("EndToEnd",m),z.moveEnd("character",-1)):(v=t.getNext(p),w=t.hasAscendant("pre"),v=!(v&&v.getText&&v.getText().match(m))&&(w||!t.hasPrevious()||t.getPrevious().is&&t.getPrevious().is("br")),w=b.document.createElement("span"),w.setHtml("\x26#65279;"),w.insertBefore(t),v&&b.document.createText("﻿").insertBefore(t));b.setStartBefore(t);t.remove();a?(v?(z.moveStart("character",-1),z.select(),b.document.$.selection.clear()):z.select(),b.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START),w.remove()):
(b.setEndBefore(l),l.remove(),z.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(z=0;z<a.length;z++){if(z<a.length-1&&(v=a[z],w=a[z+1],m=v.clone(),m.setStart(v.endContainer,v.endOffset),m.setEnd(w.startContainer,w.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),b=m.getCommonAncestor(),m=m.getEnclosedNode(),b.isReadOnly()||m&&m.isReadOnly()))){w.setStart(v.startContainer,v.startOffset);a.splice(z--,1);continue}b=a[z];w=this.document.$.createRange();b.collapsed&&
CKEDITOR.env.webkit&&h(b)&&(m=f(this.root),b.insertNode(m),(v=m.getNext())&&!m.getPrevious()&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==v.getName()?(n(this.root),b.moveToPosition(v,CKEDITOR.POSITION_BEFORE_START)):b.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));w.setStart(b.startContainer.$,b.startOffset);try{w.setEnd(b.endContainer.$,b.endOffset)}catch(A){if(0<=A.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))b.collapse(1),w.setEnd(b.endContainer.$,b.endOffset);else throw A;}l.addRange(w)}}this.reset();
this.root.fire("selectionchange")}}},fake:function(a,b){var d=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();v(d,b);var f=this._.cache,c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);f.ranges=new CKEDITOR.dom.rangeList(c);f.selectedElement=f.startElement=a;f.type=CKEDITOR.SELECTION_ELEMENT;f.selectedText=f.nativeSel=null;this.isFake=1;this.rev=w++;d._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=
this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return e(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=[],d,f=0;f<
a.length;f++){var c=new CKEDITOR.dom.range(this.root);c.moveToBookmark(a[f]);b.push(c)}a.isFake&&(d=e(b)?b[0]._getTableElement():b[0].getEnclosedNode(),d&&d.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!e(b)?this.fake(d):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.type!=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 a(a,b){for(var d,f;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))d=a;else if(!f){var c=a.getAttribute("contentEditable");"false"==c?d=a:"true"==c&&(f=1)}return d}function e(a,
b,d,f){return(a.getPosition(b)|f)==f&&(!d.childRule||d.childRule(a))}function c(b){var d=b.document;if(b.collapsed)d=w(this,d),b.insertNode(d),b.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var f=this.element,h=this._.definition,k,l=h.ignoreReadonly,n=l||h.includeReadonly;null==n&&(n=b.root.getCustomData("cke_includeReadonly"));var m=CKEDITOR.dtd[f];m||(k=!0,m=CKEDITOR.dtd.span);b.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.trim();var p=b.createBookmark(),t=p.startNode,u=p.endNode,r=t,v;if(!l){var z=
b.getCommonAncestor(),l=a(t,z),z=a(u,z);l&&(r=l.getNextSourceNode(!0));z&&(u=z)}for(r.getPosition(u)==CKEDITOR.POSITION_FOLLOWING&&(r=0);r;){l=!1;if(r.equals(u))r=null,l=!0;else{var A=r.type==CKEDITOR.NODE_ELEMENT?r.getName():null,z=A&&"false"==r.getAttribute("contentEditable"),q=A&&r.getAttribute("data-nostyle");if(A&&r.data("cke-bookmark")||r.type===CKEDITOR.NODE_COMMENT){r=r.getNextSourceNode(!0);continue}if(z&&n&&CKEDITOR.dtd.$block[A])for(var C=r,y=g(C),I=void 0,B=y.length,ca=0,C=B&&new CKEDITOR.dom.range(C.getDocument());ca<
B;++ca){var I=y[ca],ea=CKEDITOR.filter.instances[I.data("cke-filter")];if(ea?ea.check(this):1)C.selectNodeContents(I),c.call(this,C)}y=A?!m[A]||q?0:z&&!n?0:e(r,u,h,M):1;if(y)if(I=r.getParent(),y=h,B=f,ca=k,!I||!(I.getDtd()||CKEDITOR.dtd.span)[B]&&!ca||y.parentRule&&!y.parentRule(I))l=!0;else{if(v||A&&CKEDITOR.dtd.$removeEmpty[A]&&(r.getPosition(u)|M)!=M||(v=b.clone(),v.setStartBefore(r)),A=r.type,A==CKEDITOR.NODE_TEXT||z||A==CKEDITOR.NODE_ELEMENT&&!r.getChildCount()){for(var A=r,fa;(l=!A.getNext(K))&&
(fa=A.getParent(),m[fa.getName()])&&e(fa,t,h,H);)A=fa;v.setEndAfter(A)}}else l=!0;r=r.getNextSourceNode(q||z)}if(l&&v&&!v.collapsed){for(var l=w(this,d),z=l.hasAttributes(),q=v.getCommonAncestor(),A={},y={},I={},B={},F,J,G;l&&q;){if(q.getName()==f){for(F in h.attributes)!B[F]&&(G=q.getAttribute(J))&&(l.getAttribute(F)==G?y[F]=1:B[F]=1);for(J in h.styles)!I[J]&&(G=q.getStyle(J))&&(l.getStyle(J)==G?A[J]=1:I[J]=1)}q=q.getParent()}for(F in y)l.removeAttribute(F);for(J in A)l.removeStyle(J);z&&!l.hasAttributes()&&
(l=null);l?(v.extractContents().appendTo(l),v.insertNode(l),x.call(this,l),l.mergeSiblings(),CKEDITOR.env.ie||l.$.normalize()):(l=new CKEDITOR.dom.element("span"),v.extractContents().appendTo(l),v.insertNode(l),x.call(this,l),l.remove(!0));v=null}}b.moveToBookmark(p);b.shrink(CKEDITOR.SHRINK_TEXT);b.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(f.getParent()),d=new CKEDITOR.dom.elementPath(n.getParent()),c=null,h=null,g=0;g<a.elements.length;g++){var e=
a.elements[g];if(e==a.block||e==a.blockLimit)break;m.checkElementRemovable(e,!0)&&(c=e)}for(g=0;g<d.elements.length;g++){e=d.elements[g];if(e==d.block||e==d.blockLimit)break;m.checkElementRemovable(e,!0)&&(h=e)}h&&n.breakParent(h);c&&f.breakParent(c)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var d=a.createBookmark(),f=d.startNode,c=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var h=new CKEDITOR.dom.elementPath(f.getParent(),a.root),g,e=0,k;e<h.elements.length&&(k=h.elements[e])&&k!=h.block&&
k!=h.blockLimit;e++)if(this.checkElementRemovable(k)){var l;!c&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(l=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(g=k,g.match=l?"start":"end"):(k.mergeSiblings(),k.is(this.element)?v.call(this,k):q(k,r(this)[k.getName()]))}if(g){c=f;for(e=0;;e++){k=h.elements[e];if(k.equals(g))break;else if(k.match)continue;else k=k.clone();k.append(c);c=k}c["start"==g.match?"insertBefore":"insertAfter"](g)}}else{var n=d.endNode,m=this;b();for(h=f;!h.equals(n);)g=
h.getNextSourceNode(),h.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(h)&&(h.getName()==this.element?v.call(this,h):q(h,r(this)[h.getName()]),g.type==CKEDITOR.NODE_ELEMENT&&g.contains(f)&&(b(),g=f.getNext())),h=g}a.moveToBookmark(d);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function g(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function m(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,
a.root)).contains(this.element,1))&&!a.isReadOnly()&&t(a,this)}function k(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,d=b.attributes;if(d)for(var f in d)a.removeAttribute(f,d[f]);if(b.styles)for(var c in b.styles)b.styles.hasOwnProperty(c)&&a.removeStyle(c)}}function l(a){var b=a.createBookmark(!0),d=a.createIterator();d.enforceRealBlocks=!0;this._.enterMode&&(d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var f,
c=a.document,g;f=d.getNextParagraph();)!f.isReadOnly()&&(d.activeFilter?d.activeFilter.check(this):1)&&(g=w(this,c,f),h(f,g));a.moveToBookmark(b)}function d(a){var b=a.createBookmark(1),d=a.createIterator();d.enforceRealBlocks=!0;d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var f,c;f=d.getNextParagraph();)this.checkElementRemovable(f)&&(f.is("pre")?((c=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&f.copyAttributes(c),h(f,c)):
v.call(this,f));a.moveToBookmark(b)}function h(a,b){var d=!b;d&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var c=b&&b.is("pre"),h=a.is("pre"),g=!c&&h;if(c&&!h){h=b;(g=a.getBogus())&&g.remove();g=a.getHtml();g=n(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+|&nbsp;)/g," ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var e=a.getDocument().createElement("div");e.append(h);h.$.outerHTML="\x3cpre\x3e"+
g+"\x3c/pre\x3e";h.copyAttributes(e.getFirst());h=e.getFirst().remove()}else h.setHtml(g);b=h}else g?b=p(d?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(c){var d=b,k;(k=d.getPrevious(D))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(c=n(k.getHtml(),/\n$/,"")+"\n\n"+n(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+c+"\x3c/pre\x3e":d.setHtml(c),k.remove())}else d&&u(b)}function f(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,d){b.push(d)});return b}function n(a,b,d){var f="",c="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(f=b);d&&(c=d);return""});return f+a.replace(b,d)+c}function p(a,b){var d;1<a.length&&(d=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var f=0;f<a.length;f++){var c=a[f],c=c.replace(/(\r\n|\r)/g,"\n"),c=n(c,/^[ \t]*\n/,
""),c=n(c,/\n$/,""),c=n(c,/^[ \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)+" "}),c=c.replace(/\n/g,"\x3cbr\x3e"),c=c.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(d){var h=b.clone();h.setHtml(c);d.append(h)}else b.setHtml(c)}return d||b}function v(a,b){var d=this._.definition,f=d.attributes,d=d.styles,c=r(this)[a.getName()],h=CKEDITOR.tools.isEmpty(f)&&
CKEDITOR.tools.isEmpty(d),g;for(g in f)if("class"!=g&&!this._.definition.fullMatch||a.getAttribute(g)==y(g,f[g]))b&&"data-"==g.slice(0,5)||(h=a.hasAttribute(g),a.removeAttribute(g));for(var e in d)this._.definition.fullMatch&&a.getStyle(e)!=y(e,d[e],!0)||(h=h||!!a.getStyle(e),a.removeStyle(e));q(a,c,B[a.getName()]);h&&(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 x(a){for(var b=r(this),d=a.getElementsByTag(this.element),f,c=d.count();0<=--c;)f=d.getItem(c),f.isReadOnly()||v.call(this,f,!0);for(var h in b)if(h!=this.element)for(d=a.getElementsByTag(h),c=d.count()-1;0<=c;c--)f=d.getItem(c),f.isReadOnly()||q(f,b[h])}function q(a,b,d){if(b=b&&b.attributes)for(var f=0;f<b.length;f++){var c=b[f][0],h;if(h=a.getAttribute(c)){var g=b[f][1];(null===g||g.test&&g.test(h)||"string"==typeof g&&h==g)&&a.removeAttribute(c)}}d||u(a)}function u(a,b){if(!a.hasAttributes()||
b)if(CKEDITOR.dtd.$block[a.getName()]){var d=a.getPrevious(D),f=a.getNext(D);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br",1);!f||f.type!=CKEDITOR.NODE_TEXT&&f.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else d=a.getFirst(),f=a.getLast(),a.remove(!0),d&&(d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings(),f&&!d.equals(f)&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings())}function w(a,b,d){var f;f=a.element;"*"==f&&(f="span");f=new CKEDITOR.dom.element(f,b);d&&d.copyAttributes(f);
f=t(f,a);b.getCustomData("doc_processing_style")&&f.hasAttribute("id")?f.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return f}function t(a,b){var d=b._.definition,f=d.attributes,d=CKEDITOR.style.getStyleText(d);if(f)for(var c in f)a.setAttribute(c,f[c]);d&&a.setAttribute("style",d);a.getDocument().removeCustomData("doc_processing_style");return a}function z(a,b){for(var d in a)a[d]=a[d].replace(J,function(a,d){return b[d]})}function r(a){if(a._.overrides)return a._.overrides;var b=
a._.overrides={},d=a._.definition.overrides;if(d){CKEDITOR.tools.isArray(d)||(d=[d]);for(var f=0;f<d.length;f++){var c=d[f],h,g;"string"==typeof c?h=c.toLowerCase():(h=c.element?c.element.toLowerCase():a.element,g=c.attributes);c=b[h]||(b[h]={});if(g){var c=c.attributes=c.attributes||[],e;for(e in g)c.push([e.toLowerCase(),g[e]])}}}return b}function y(a,b,d){var f=new CKEDITOR.dom.element("span");f[d?"setStyle":"setAttribute"](a,b);return f[d?"getStyle":"getAttribute"](a)}function A(a,b){function d(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 f in a)if(!(f in b)||d(b[f],f)!=d(a[f],f)&&"inherit"!=a[f]&&"inherit"!=b[f])return!1;return!0}function C(a,b,d){var f=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var c,h=f.createIterator();c=h.getNextRange();)b.call(this,c,d);a.selectRanges(f)}var B={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},F={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},G=/\s*(?:;\s*|$)/,J=/#\((.+?)\)/g,K=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 d=a.attributes;d&&d.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(d.style)),delete d.style);b&&(a=CKEDITOR.tools.clone(a),z(a.attributes,b),z(a.styles,b));d=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(B[d]?CKEDITOR.STYLE_BLOCK:F[d]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof
CKEDITOR.dom.document)return C.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return C.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);C.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=
this.type==CKEDITOR.STYLE_INLINE?c:this.type==CKEDITOR.STYLE_BLOCK?l:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?d:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(a)},applyToObject:function(a){t(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 d=
a.elements,f=0,c;f<d.length;f++)if(c=d[f],this.type!=CKEDITOR.STYLE_INLINE||c!=a.block&&c!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var h=c.getName();if(!("string"==typeof this.element?h==this.element:h in this.element))continue}if(this.checkElementRemovable(c,!0,b))return!0}}return!1},checkApplicable:function(a,b,d){b&&b instanceof CKEDITOR.filter&&(d=b);if(d&&!d.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},
checkElementMatch:function(a,b){var d=this._.definition;if(!a||!d.ignoreReadonly&&a.isReadOnly())return!1;var f=a.getName();if("string"==typeof this.element?f==this.element:f in this.element){if(!b&&!a.hasAttributes())return!0;if(f=d._AC)d=f;else{var f={},c=0,h=d.attributes;if(h)for(var g in h)c++,f[g]=h[g];if(g=CKEDITOR.style.getStyleText(d))f.style||c++,f.style=g;f._length=c;d=d._AC=f}if(d._length){for(var e in d)if("_length"!=e)if(f=a.getAttribute(e)||"","style"==e?A(d[e],f):d[e]==f){if(!b)return!0}else if(b)return!1;
if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,d){if(this.checkElementMatch(a,b,d))return!0;if(b=r(this)[a.getName()]){var f;if(!(b=b.attributes))return!0;for(d=0;d<b.length;d++)if(f=b[d][0],f=a.getAttribute(f)){var c=b[d][1];if(null===c)return!0;if("string"==typeof c){if(f==c)return!0}else if(c.test(f))return!0}}return!1},buildPreview:function(a){var b=this._.definition,d=[],f=b.element;"bdo"==f&&(f="span");var d=["\x3c",f],c=b.attributes;if(c)for(var h in c)d.push(" ",
h,'\x3d"',c[h],'"');(c=CKEDITOR.style.getStyleText(b))&&d.push(' style\x3d"',c,'"');d.push("\x3e",a||b.name,"\x3c/",f,"\x3e");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,d=a.attributes&&a.attributes.style||"",f="";d.length&&(d=d.replace(G,";"));for(var c in b){var h=b[c],g=(c+":"+h).replace(G,";");"inherit"==h?f+=g:d+=g}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,!0));return a._ST=d+f};CKEDITOR.style.customHandlers=
{};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 M=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,H=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(a,
e){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,e,!0)};CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(a,e,c){CKEDITOR.stylesSet.addExternal(a,e,"");CKEDITOR.stylesSet.load(a,
c)};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,e){var c=this._.styleStateChangeCallbacks;c||(c=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var g=0;g<c.length;g++){var e=c[g],k=e.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;e.fn.call(this,k)}}));c.push({style:a,fn:e})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);
else{var e=this,c=e.config.stylesCombo_stylesSet||e.config.stylesSet;if(!1===c)a(null);else if(c instanceof Array)e._.stylesDefinitions=c,a(c);else{c||(c="default");var c=c.split(":"),b=c[0];CKEDITOR.stylesSet.addExternal(b,c[1]?c.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(b,function(c){e._.stylesDefinitions=c[b];a(e._.stylesDefinitions)})}}}});(function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var a=CKEDITOR.getUrl("vendor/promise.js");if("function"===
typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([a],function(a){CKEDITOR.tools.promise=a});CKEDITOR.scriptLoader.load(a,function(e){if(!e)return CKEDITOR.error("no-vendor-lib",{path:a});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}})();(function(){function a(a,g,m){a.once("selectionCheck",function(a){if(!e){var b=a.data.getRanges()[0];m.equals(b)?a.cancel():g.equals(b)&&(c=!0)}},null,null,-1)}var e=!0,c=!1;CKEDITOR.dom.selection.setupEditorOptimization=
function(a){a.on("selectionCheck",function(a){a.data&&!c&&a.data.optimizeInElementEnds();c=!1});a.on("contentDom",function(){var c=a.editable();c&&(c.attachListener(c,"keydown",function(a){this._.shiftPressed=a.data.$.shiftKey},this),c.attachListener(c,"keyup",function(a){this._.shiftPressed=a.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var b=this.getRanges()[0],c=this.root.editor,m;if(this.root.editor._.shiftPressed||this.isFake||b.isCollapsed||b.startContainer.equals(b.endContainer))m=
!1;else if(0===b.endOffset)m=!0;else{m=b.startContainer.type===CKEDITOR.NODE_TEXT;var k=b.endContainer.type===CKEDITOR.NODE_TEXT,l=m?b.startContainer.getLength():b.startContainer.getChildCount();m=b.startOffset===l||m^k}m&&(m=b.clone(),b.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!0}),e=!1,a(c,b,m),b.select(),e=!0)}})();CKEDITOR.dom.comment=function(a,e){"string"==typeof a&&(a=(e?e.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)};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 a={},e={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(a[c]=1);for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(e[c]=1);CKEDITOR.dom.elementPath=function(b,c){var m=null,k=null,l=[],d=b,h;c=c||b.getDocument().getBody();d||(d=c);do if(d.type==CKEDITOR.NODE_ELEMENT){l.push(d);
if(!this.lastElement&&(this.lastElement=d,d.is(CKEDITOR.dtd.$object)||"false"==d.getAttribute("contenteditable")))continue;if(d.equals(c))break;if(!k&&(h=d.getName(),"true"==d.getAttribute("contenteditable")?k=d:!m&&e[h]&&(m=d),a[h])){if(h=!m&&"div"==h){a:{h=d.getChildren();for(var f=0,n=h.count();f<n;f++){var p=h.getItem(f);if(p.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[p.getName()]){h=!0;break a}}h=!1}h=!h}h?m=d:k=d}}while(d=d.getParent());k||(k=c);this.block=m;this.blockLimit=k;this.root=
c;this.elements=l}})();CKEDITOR.dom.elementPath.prototype={compare:function(a){var e=this.elements;a=a&&a.elements;if(!a||e.length!=a.length)return!1;for(var c=0;c<e.length;c++)if(!e[c].equals(a[c]))return!1;return!0},contains:function(a,e,c){var b=0,g;"string"==typeof a&&(g=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?g=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?g=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:"function"==typeof a?g=a:"object"==
typeof a&&(g=function(b){return b.getName()in a});var m=this.elements,k=m.length;e&&(c?b+=1:--k);c&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;b<k;b++)if(g(m[b]))return m[b];return null},isContextFor:function(a){var e;return a in CKEDITOR.dtd.$block?(e=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!e.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};CKEDITOR.dom.text=function(a,e){"string"==
typeof a&&(a=(e?e.$:document).createTextNode(a));this.$=a};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(a){this.$.nodeValue=a},isEmpty:function(a){var e=this.getText();a&&(e=CKEDITOR.tools.trim(e));return!e||e===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(a){var e=this.$.parentNode,c=e.childNodes.length,
b=this.getLength(),g=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(a),g);e.childNodes.length==c&&(a>=b?(m=g.createText(""),m.insertAfter(this)):(a=g.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,e){return"number"!=typeof e?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,e)}});(function(){function a(a,b,g){var e=a.serializable,k=b[g?"endContainer":"startContainer"],l=g?"endOffset":"startOffset",d=e?b.document.getById(a.startNode):a.startNode;a=e?
b.document.getById(a.endNode):a.endNode;k.equals(d.getPrevious())?(b.startOffset=b.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(b.startOffset-=k.getLength(),k=a.getNext());k.equals(d.getParent())&&b[l]++;k.equals(a.getParent())&&b[l]++;b[g?"endContainer":"startContainer"]=k;return b}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,e)};
var e={createIterator:function(){var a=this,b=CKEDITOR.dom.walker.bookmark(),g=[],e;return{getNextRange:function(k){e=void 0===e?0:e+1;var l=a[e];if(l&&1<a.length){if(!e)for(var d=a.length-1;0<=d;d--)g.unshift(a[d].createBookmark(!0));if(k)for(var h=0;a[e+h+1];){var f=l.document;k=0;d=f.getById(g[h].endNode);for(f=f.getById(g[h+1].startNode);;){d=d.getNextSourceNode(!1);if(f.equals(d))k=1;else if(b(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())continue;break}if(!k)break;h++}for(l.moveToBookmark(g.shift());h--;)d=
a[++e],d.moveToBookmark(g.shift()),l.setEnd(d.endContainer,d.endOffset)}return l}}},createBookmarks:function(c){for(var b=[],g,e=0;e<this.length;e++){b.push(g=this[e].createBookmark(c,!0));for(var k=e+1;k<this.length;k++)this[k]=a(g,this[k]),this[k]=a(g,this[k],!0)}return b},createBookmarks2:function(a){for(var b=[],g=0;g<this.length;g++)b.push(this[g].createBookmark2(a));return b},moveToBookmarks:function(a){for(var b=0;b<this.length;b++)this[b].moveToBookmark(a[b])}}})();(function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||
"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function e(b){var d=CKEDITOR.skin["ua_"+b],c=CKEDITOR.env;if(d)for(var d=d.split(",").sort(function(a,b){return a>b?-1:1}),g=0,e;g<d.length;g++)if(e=d[g],c.ie&&(e.replace(/^ie/,"")==c.version||c.quirks&&"iequirks"==e)&&(e="ie"),c[e]){b+="_"+d[g];break}return CKEDITOR.getUrl(a()+b+".css")}function c(a,b){m[a]||(CKEDITOR.document.appendStyleSheet(e(a)),m[a]=1);b&&b()}function b(a){var b=a.getById(k);b||(b=a.getHead().append("style"),b.setAttribute("id",
k),b.setAttribute("type","text/css"));return b}function g(a,b,d){var c,g,e;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),g=0;g<b.length;g++)b[g]=b[g].split("{");for(var k=0;k<a.length;k++)if(CKEDITOR.env.webkit)for(g=0;g<b.length;g++){e=b[g][1];for(c=0;c<d.length;c++)e=e.replace(d[c][0],d[c][1]);a[k].$.sheet.addRule(b[g][0],e)}else{e=b;for(c=0;c<d.length;c++)e=e.replace(d[c][0],d[c][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[k].$.styleSheet.cssText+=e:a[k].$.innerHTML+=e}}var m={};CKEDITOR.skin=
{path:a,loadPart:function(b,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){c(b,d)}):c(b,d)},getPath:function(a){return CKEDITOR.getUrl(e(a))},icons:{},addIcon:function(a,b,d,c){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:d||0,bgsize:c||"16px"})},getIconStyle:function(a,b,d,c,g){var e;a&&(a=a.toLowerCase(),b&&(e=this.icons[a+"-rtl"]),e||(e=this.icons[a]));a=d||e&&e.path||"";c=c||e&&e.offset;g=g||e&&e.bgsize||
"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+c+"px;background-size:"+g+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var f=b(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var b=CKEDITOR.skin.chameleon,c="",h="";"function"==typeof b&&(c=b(this,"editor"),h=b(this,"panel"));a=[[d,a]];g([f],c,a);g(l,h,a)}).call(this,a)}});var k="cke_ui_color",
l=[],d=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var f=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){var c=b(a);l.push(c);f.on("destroy",function(){l=CKEDITOR.tools.array.filter(l,function(a){return c!==a})});(a=f.getUiColor())&&g([c],CKEDITOR.skin.chameleon(f,"panel"),[[d,a]])}};f.on("panelShow",a);f.on("menuShow",a);f.config.uiColor&&f.setUiColor(f.config.uiColor)}})})();
(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=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);a.appendTo(CKEDITOR.document.getHead());try{var e=a.getComputedStyle("border-top-color"),c=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!e||e!=c)}catch(b){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");
CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,e=0;e<a.length;e++)CKEDITOR.editor.prototype.constructor.apply(a[e][0],a[e][1]),CKEDITOR.add(a[e][0])})();CKEDITOR.skin.name="moono-lisa";CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie8";CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,b){for(var g=a.match(/[^#]./g),e=0;3>e;e++){var k=e,l;l=parseInt(g[e],16);l=("0"+(0>b?0|l*(1+b):
0|l+(255-l)*b).toString(16)).slice(-2);g[k]=l}return"#"+g.join("")}}(),e={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(c,b){var g=a(c.uiColor,.4),g={id:"."+c.id,defaultBorder:a(g,-.2),toolbarElementsBorder:a(g,-.25),defaultBackground:g,lightBackground:a(g,.8),darkBackground:a(g,-.15),ckeButtonOn:a(g,.4),ckeResizer:a(g,-.4),ckeColorauto:a(g,.8),dialogBody:a(g,.7),dialogTab:a(g,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:a(g,-.6),menubuttonHover:a(g,.1),menubuttonIcon:a(g,.5),menubuttonIconHover:a(g,.3)};return e[b].output(g).replace(/\[/g,"{").replace(/\]/g,"}")}}();
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],f=1;f<arguments.length;f++)b.push(arguments[f]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},e={build:function(a,b,f){return new CKEDITOR.ui.dialog.textInput(a,b,f)}},c={build:function(a,b,f){return new CKEDITOR.ui.dialog[b.type](a,b,f)}},b={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},g=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){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",b)}},!0),m=/^on([A-Z]\w+)/,k=function(a){for(var b in a)(m.test(b)||"title"==b||"type"==b)&&delete a[b];return a},l=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(b,c,f,g){if(!(4>arguments.length)){var e=a.call(this,c);e.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var k={role:c.role||"presentation"};c.includeLabel&&(k["aria-labelledby"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"div",null,k,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+e.labelId+'"',e.inputId?' for\x3d"'+e.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',g.call(this,b,c),"\x3c/div\x3e"):(f={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" id\x3d"'+e.labelId+'" for\x3d"'+e.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"+g.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);var g=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",e={"class":"cke_dialog_ui_input_"+c.type,id:g,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(e.maxlength=c.maxLength);c.size&&(e.size=c.size);c.inputStyle&&(e.style=c.inputStyle);var k=this,m=!1;b.on("load",function(){k.getInputElement().on("keydown",
function(a){13==a.data.getKeystroke()&&(m=!0)});k.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&m&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),m=!1);k.bidi&&l.call(k,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,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 ");e["aria-labelledby"]=this._.labelId;this._.required&&
(e["aria-required"]=this._.required);for(var b in e)a.push(b+'\x3d"'+e[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);var g=this,e=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(g.bidi)b.on("load",
function(){g.getInputElement().on("keyup",l)},g);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,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"',e,'" '],b;for(b in k)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(k[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(g._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,
c,f){if(!(3>arguments.length)){var g=a.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),f=[],e=CKEDITOR.tools.getNextId()+"_label",l={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":e};k(a);c["default"]&&(l.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);
g.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,f,"input",null,l);f.push(' \x3clabel id\x3d"',e,'" for\x3d"',l.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return f.join("")})}},radio:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var g=[],e=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,f,function(){for(var a=[],f=[],l=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",m=0;m<c.items.length;m++){var w=c.items[m],t=void 0!==w[2]?w[2]:w[0],z=void 0!==w[1]?w[1]:w[0],r=CKEDITOR.tools.getNextId()+"_radio_input",y=r+"_label",r=CKEDITOR.tools.extend({},c,{id:r,title:null,type:null},!0),t=CKEDITOR.tools.extend({},r,{title:t},!0),A={type:"radio","class":"cke_dialog_ui_radio_input",name:l,value:z,"aria-labelledby":y},C=[];e._["default"]==z&&(A.checked="checked");k(r);k(t);"undefined"!=typeof r.inputStyle&&
(r.style=r.inputStyle);r.keyboardFocusable=!0;g.push(new CKEDITOR.ui.dialog.uiElement(b,r,C,"input",null,A));C.push(" ");new CKEDITOR.ui.dialog.uiElement(b,t,C,"label",null,{id:y,"for":A.id},w[0]);a.push(C.join(""))}new CKEDITOR.ui.dialog.hbox(b,g,a,f);return f.join("")});this._.children=g}},button:function(b,c,f){if(arguments.length){"function"==typeof c&&(c=c(b.getParentEditor()));a.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);var g=this;b.on("load",function(){var a=this.getElement();
(function(){a.on("click",function(a){g.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(g.click(),a.data.preventDefault())})})();a.unselectable()},this);var e=CKEDITOR.tools.extend({},c);delete e.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,e,f,"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(b,c,f){if(!(3>arguments.length)){var g=a.call(this,c);c.validate&&(this.validate=c.validate);g.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),f=[],e=[],l={id:g.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};f.push('\x3cdiv class\x3d"cke_dialog_ui_input_',
c.type,'" role\x3d"presentation"');c.width&&f.push('style\x3d"width:'+c.width+'" ');f.push("\x3e");void 0!==c.size&&(l.size=c.size);void 0!==c.multiple&&(l.multiple=c.multiple);k(a);for(var m=0,w;m<c.items.length&&(w=c.items[m]);m++)e.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==w[1]?w[1]:w[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(w[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);g.select=new CKEDITOR.ui.dialog.uiElement(b,a,f,"select",null,
l,e.join(""));f.push("\x3c/div\x3e");return f.join("")})}},file:function(b,c,f){if(!(3>arguments.length)){void 0===c["default"]&&(c["default"]="");var g=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",function(){CKEDITOR.document.getById(g.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){g.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"',
g.frameId,'" title\x3d"',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(b,c,f){var g=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var e=CKEDITOR.tools.extend({},c),k=e.onClick;e.className=(e.className?e.className+" ":"")+"cke_dialog_ui_button";e.onClick=function(a){var f=
c["for"];a=k?k.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(f[0],f[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(g)});CKEDITOR.ui.dialog.button.call(this,b,e,f)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,f=/\/$/;return function(c,g,e){if(!(3>arguments.length)){var k=[],l=g.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var m=g.focus;if(m){var w=this.focus;
this.focus=function(){("function"==typeof m?m:w).call(this);this.fire("focus")};g.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,c,g,k,"span",null,null,"");k=k.join("").match(a);l=l.match(b)||["","",""];f.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);e.push([l[1]," ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,f,c,g){var e=g.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,g,c,"fieldset",null,null,function(){var a=
[];e&&a.push("\x3clegend"+(g.labelStyle?' style\x3d"'+g.labelStyle+'"':"")+"\x3e"+e+"\x3c/legend\x3e");for(var b=0;b<f.length;b++)a.push(f[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 b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=
a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:g},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},
isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.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 b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}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 b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},b,!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,b,f){var c=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),g=this.getInputElement().$;c.$.text=a;c.$.value=void 0===b||null===b?a:b;void 0===f||null===f?CKEDITOR.env.ie?g.add(c.$):g.add(c.$,null):g.add(c.$,f);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},b,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,
b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return g.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var f=this._.children,c,g=0;g<f.length&&(c=f[g]);g++)c.getElement().$.checked=
c.getValue()==a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return g.onChange.apply(this,arguments);a.on("load",function(){for(var a=
this._.children,b=this,d=0;d<a.length;d++)a[d].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",b);return null}}},b,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,b,{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 b=/^on([A-Z]\w+)/,f,c=function(a,b,d,f){a.on("formLoaded",function(){a.getInputElement().on(d,f,a)})},g;for(g in a)if(f=g.match(b))this.eventProcessors[g]?this.eventProcessors[g].call(this,this._.dialog,a[g]):c(this,this._.dialog,f[1].toLowerCase(),a[g]);return this},reset:function(){function a(){f.$.open();
var d="";c.size&&(d=c.size-(CKEDITOR.env.ie?7:0));var t=b.frameId+"_input";f.$.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(c.action),'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',t,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(c.label),
'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',t,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(c.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<d?d:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+e+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join(""));
f.$.close();for(d=0;d<g.length;d++)g[d].enable()}var b=this._,f=CKEDITOR.document.getById(b.frameId).getFrameDocument(),c=b.definition,g=b.buttons,e=this.formLoadedNumber,k=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,m=b.dialog._.editor.langCode;e||(e=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(e);
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,b){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",b)}},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",e);CKEDITOR.dialog.addUIElement("password",e);CKEDITOR.dialog.addUIElement("tel",e);CKEDITOR.dialog.addUIElement("textarea",c);CKEDITOR.dialog.addUIElement("checkbox",c);CKEDITOR.dialog.addUIElement("radio",c);CKEDITOR.dialog.addUIElement("button",c);CKEDITOR.dialog.addUIElement("select",c);CKEDITOR.dialog.addUIElement("file",c);CKEDITOR.dialog.addUIElement("fileButton",
c);CKEDITOR.dialog.addUIElement("html",c);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,f){for(var c=b.children,g,e=[],k=[],l=0;l<c.length&&(g=c[l]);l++){var m=[];e.push(m);k.push(CKEDITOR.dialog._.uiElementBuilders[g.type].build(a,g,m))}return new CKEDITOR.ui.dialog[b.type](a,k,e,f,b)}})}});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 a(){for(var a=
this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,d=b-1;d>b-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function e(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;d<b+a;d++)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function c(a,b){for(var d=a.$.getElementsByTagName("input"),f=0,c=d.length;f<
c;f++){var g=new CKEDITOR.dom.element(d[f]);"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 b(a,b){var d=this.getInputElement();d&&(a?d.removeAttribute("aria-invalid"):d.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function g(){var a=
this.getInputElement();a&&a.removeAttribute("aria-invalid")}function m(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",w).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),d=b.getChild([0,0,0,0,0]),f=d.getChild(0),c=d.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(d);
!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(d.getParent()));f.unselectable();c.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:f,close:c,tabs:d.getChild(2),contents:d.getChild([3,0,0,0]),
footer:d.getChild([3,0,1,0])}}}function k(a,b,d){this.element=b;this.focusIndex=d;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 l(a){function b(){a.layout()}var d=CKEDITOR.document.getWindow();
d.on("resize",b);a.on("hide",function(){d.removeListener("resize",b)})}function d(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function h(a){function b(d){var k=a.getSize(),l=a.parts.dialog.getParent().getClientSize(),m=d.data.$.screenX,n=d.data.$.screenY,p=m-f.x,t=n-f.y;f={x:m,y:n};c.x+=p;c.y+=t;m=c.x+e[3]<h?-e[3]:c.x-e[1]>l.width-k.width-h?l.width-k.width+("rtl"==g.lang.dir?0:e[1]):c.x;k=c.y+e[0]<h?-e[0]:c.y-e[2]>l.height-k.height-h?l.height-k.height+e[2]:c.y;m=Math.floor(m);k=Math.floor(k);
a.move(m,k,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var f=null,c=null,g=a.getParentEditor(),h=g.config.dialog_magnetDistance,e=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(g){if(!a._.moved){var h=a._.element;h.getFirst().setStyle("position",
"absolute");h.removeStyle("display");a._.moved=!0;a.layout()}f={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);c=a.getPosition();CKEDITOR.env.ie6Compat&&(h=B.getChild(0).getFrameDocument(),h.on("mousemove",b),h.on("mouseup",d));g.data.preventDefault()},a)}function f(a){function b(d){var p="rtl"==g.lang.dir,t=m.width,r=m.height,u=t+(d.data.$.screenX-l.x)*(p?-1:1)*(a._.moved?1:2),z=r+(d.data.$.screenY-l.y)*(a._.moved?1:2),w=a._.element.getFirst(),
w=p&&parseInt(w.getComputedStyle("right")),v=a.getPosition();v.x=v.x||0;v.y=v.y||0;v.y+z>k.height&&(z=k.height-v.y);(p?w:v.x)+u>k.width&&(u=k.width-(p?w:v.x));z=Math.floor(z);u=Math.floor(u);if(c==CKEDITOR.DIALOG_RESIZE_WIDTH||c==CKEDITOR.DIALOG_RESIZE_BOTH)t=Math.max(f.minWidth||0,u-h);if(c==CKEDITOR.DIALOG_RESIZE_HEIGHT||c==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(f.minHeight||0,z-e);a.resize(t,r);a._.moved&&n(a,a._.position.x,a._.position.y);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",
d);CKEDITOR.document.removeListener("mousemove",b);p&&(p.remove(),p=null);if(CKEDITOR.env.ie6Compat){var a=B.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var f=a.definition,c=f.resizable;if(c!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),h,e,k,l,m,p,t=CKEDITOR.tools.addFunction(function(f){function c(a){return a.isVisible()}m=a.getSize();var g=a.parts.contents,n=g.$.getElementsByTagName("iframe").length,t=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&
CKEDITOR.env.quirks);n&&(p=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(p));e=m.height-a.parts.contents.getFirst(c).getSize("height",t);h=m.width-a.parts.contents.getFirst(c).getSize("width",1);l={x:f.screenX,y:f.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&
(g=B.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",d));f.preventDefault&&f.preventDefault()});a.on("load",function(){var b="";c==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":c==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('+t+', event )"\x3e'+("ltr"==
g.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(t)})}}function n(a,b,d){var f=a.parts.dialog.getParent().getClientSize(),c=a.getSize(),g=a._.viewportRatio,h=Math.max(f.width-c.width,0),f=Math.max(f.height-c.height,0);g.width=h?b/h:g.width;g.height=f?d/f:g.height;a._.viewportRatio=g}function p(a){a.data.preventDefault(1)}function v(a){var b=a.config,d=CKEDITOR.skinName||a.config.skin,f=b.dialog_backgroundCoverColor||("moono-lisa"==
d?"black":"white"),d=b.dialog_backgroundCoverOpacity,c=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(f,d,c),g=C[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");g?g.show():(c=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",c,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;",CKEDITOR.env.ie6Compat?"":"background-color: "+f,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(f="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+
f+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",c.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),c.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+f+"' );document.close();")+"})())"),c.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),c.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(c.join("")),
g.setOpacity(void 0!==d?d:.5),g.on("keydown",p),g.on("keypress",p),g.on("keyup",p),g.appendTo(CKEDITOR.document.getBody()),C[b]=g);a.focusManager.add(g);B=g;CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus()}function x(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");B&&(a.focusManager.remove(B),B.hide())}var q=CKEDITOR.tools.cssLength,u=!CKEDITOR.env.ie||CKEDITOR.env.edge,w='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+
(u?"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"'+(u?"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(d,c){function k(){var a=y._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,d=0;d<b;d++)a[d].focusIndex=d}function l(a){var b=y._.focusList;a=a||0;if(!(1>b.length)){var d=y._.currentFocusIndex;y._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(f){}var c=d,g=1<y._.pageCount;do{c+=a;if(g&&!y._.tabBarMode&&(c==b.length||-1==c)){y._.tabBarMode=!0;y._.tabs[y._.currentTabId][0].focus();
y._.currentFocusIndex=-1;return}c=(c+b.length)%b.length;if(c==d)break}while(a&&!b[c].isFocusable());b[c].focus();"text"==b[c].type&&b[c].select()}}function n(b){if(y==CKEDITOR.dialog._.currentTop){var f=b.data.getKeystroke(),c="rtl"==d.lang.dir,g=[37,38,39,40];x=C=0;if(9==f||f==CKEDITOR.SHIFT+9)l(f==CKEDITOR.SHIFT+9?-1:1),x=1;else if(f==CKEDITOR.ALT+121&&!y._.tabBarMode&&1<y.getPageCount())y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1,x=1;else if(-1!=CKEDITOR.tools.indexOf(g,
f)&&y._.tabBarMode)f=-1!=CKEDITOR.tools.indexOf([c?39:37,38],f)?a.call(y):e.call(y),y.selectPage(f),y._.tabs[f][0].focus(),x=1;else if(13!=f&&32!=f||!y._.tabBarMode)if(13==f)f=b.data.getTarget(),f.is("a","button","select","textarea")||f.is("input")&&"button"==f.$.type||((f=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(f.click,0,f),x=1),C=1;else if(27==f)(f=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(f.click,0,f):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),C=1;else return;else this.selectPage(this._.currentTabId),
this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),x=1;p(b)}}function p(a){x?a.data.preventDefault(1):C&&a.data.stopPropagation()}var r=CKEDITOR.dialog._.dialogDefinitions[c],u=CKEDITOR.tools.clone(t),z=d.config.dialog_buttonsOrder||"OS",w=d.lang.dir,v={},x,C;("OS"==z&&CKEDITOR.env.mac||"rtl"==z&&"ltr"==w||"ltr"==z&&"rtl"==w)&&u.buttons.reverse();r=CKEDITOR.tools.extend(r(d),u);r=CKEDITOR.tools.clone(r);r=new A(this,r);u=m(d);this._={editor:d,element:u.element,name:c,model:null,contentSize:{width:0,
height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=u.parts;CKEDITOR.tools.setTimeout(function(){d.fire("ariaWidget",this.parts.contents)},0,this);u={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(u.position="absolute");u["rtl"==w?"right":"left"]=0;this.parts.dialog.setStyles(u);CKEDITOR.event.call(this);
this.definition=r=CKEDITOR.fire("dialogDefinition",{name:c,definition:r,dialog:this},d).definition;if(!("removeDialogTabs"in d._)&&d.config.removeDialogTabs){u=d.config.removeDialogTabs.split(";");for(w=0;w<u.length;w++)if(z=u[w].split(":"),2==z.length){var q=z[0];v[q]||(v[q]=[]);v[q].push(z[1])}d._.removeDialogTabs=v}if(d._.removeDialogTabs&&(v=d._.removeDialogTabs[c]))for(w=0;w<v.length;w++)r.removeContents(v[w]);if(r.onLoad)this.on("load",r.onLoad);if(r.onShow)this.on("show",r.onShow);if(r.onHide)this.on("hide",
r.onHide);if(r.onOk)this.on("ok",function(a){d.fire("saveSnapshot");setTimeout(function(){d.fire("saveSnapshot")},0);!1===r.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(r.onCancel)this.on("cancel",function(a){!1===r.onCancel.call(this,a)&&(a.data.hide=!1)});var y=this,B=function(a){var b=y._.contents,d=!1,f;for(f in b)for(var c in b[f])if(d=a.call(this,b[f][c]))return};this.on("ok",function(a){B(function(d){if(d.validate){var f=d.validate(this),c="string"==typeof f||
!1===f;c&&(a.data.hide=!1,a.stop());b.call(d,!c,"string"==typeof f?f:void 0);return c}})},this,null,0);this.on("cancel",function(a){B(function(b){if(b.isChanged())return d.config.dialog_noConfirmCancel||confirm(d.lang.common.confirmCancel)||(a.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=l;var F=this._.element;d.focusManager.add(F,1);this.on("show",function(){F.on("keydown",
n,this);if(CKEDITOR.env.gecko)F.on("keypress",p,this)});this.on("hide",function(){F.removeListener("keydown",n);CKEDITOR.env.gecko&&F.removeListener("keypress",p);B(function(a){g.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",n,this,null,0)});this.on("show",function(){k();var a=1<y._.pageCount;d.config.dialog_startupFocusTab&&a?(y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1):this._.hasFocus||
(this._.currentFocusIndex=a?-1:this._.focusList.length-1,r.onFocus?(a=r.onFocus.call(this))&&a.focus():l(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);h(this);f(this);(new CKEDITOR.dom.text(r.title,CKEDITOR.document)).appendTo(this.parts.title);for(w=0;w<r.contents.length;w++)(v=r.contents[w])&&this.addPage(v);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("_"))),this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1)),a.data.preventDefault())},this);w=[];v=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:r.buttons},w).getChild();this.parts.footer.setHtml(w.join(""));for(w=0;w<v.length;w++)this._.buttons[v[w].id]=v[w]};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 d=this.parts.dialog.getParent().getClientSize().width;this._.position.x=d-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize=
{width:a,height:b}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,d){var f=this._.element.getFirst(),c="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&f.setStyle("zoom","100%");var g=this.parts.dialog.getParent().getClientSize(),h=this.getSize(),e=this._.viewportRatio,k=Math.max(g.width-h.width,0),g=Math.max(g.height-h.height,0);this._.position&&this._.position.x==a&&this._.position.y==b?(a=Math.floor(k*e.width),b=
Math.floor(g*e.height)):n(this,a,b);this._.position={x:a,y:b};c&&(a=k-a);b={top:(0<b?b:0)+"px"};b[c?"right":"left"]=(0<a?a:0)+"px";f.setStyles(b);d&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition;a.getParent()&&a.getParent().equals(CKEDITOR.document.getBody())?a.setStyle("display",u?"flex":"block"):a.appendTo(CKEDITOR.document.getBody());this.resize(this._.contentSize&&this._.contentSize.width||b.width||
b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();null===this._.currentTabId&&this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,v(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,
this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this);a.on("keydown",G);a.on("keyup",J);this._.hasFocus=!1;for(var d in b.contents)if(b.contents[d]){var a=b.contents[d],f=this._.tabs[a.id],c=a.requiredContent,g=0;if(f){for(var h in this._.contents[a.id]){var e=this._.contents[a.id][h];"hbox"!=e.type&&"vbox"!=e.type&&e.getInputElement()&&(e.requiredContent&&!this._.editor.activeFilter.check(e.requiredContent)?
e.disable():(e.enable(),g++))}!g||c&&!this._.editor.activeFilter.check(c)?f[0].addClass("cke_dialog_tab_disabled"):f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();l(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||!u){var b=this.getSize(),d=CKEDITOR.document.getWindow().getViewPaneSize(),f;this._.moved&&this._.position?(f=this._.position.x,b=this._.position.y):(f=(d.width-b.width)/2,b=(d.height-b.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));f=Math.floor(f);b=Math.floor(b);this.move(f,b)}},foreach:function(a){for(var b in this._.contents)for(var d in this._.contents[b])a.call(this,this._.contents[b][d]);
return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(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(D(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else x(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=
10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",G);a.removeListener("keyup",J);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],d=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+
'"':"",f=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: 100%;"},b),c=this._.contents[a.id]={},g=f.getChild(),h=0;f=g.shift();)f.notAllowed||"hbox"==f.type||"vbox"==f.type||h++,c[f.id]=f,"function"==typeof f.getChild&&g.push.apply(g,f.getChild());h||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height",
"100%");f=CKEDITOR.env;c="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",d,a.hidden?' style\x3d"display:none"':"",' id\x3d"',c,'"',f.gecko&&!f.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",c);this._.tabs[a.id]=[d,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;
this._.lastTab=d;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);d.unselectable();this.parts.tabs.append(d);a.accessKey&&(K(this,this,"CTRL+"+a.accessKey,H,M),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var b in this._.tabs){var d=this._.tabs[b][0],f=this._.tabs[b][1];b!=a&&(d.removeClass("cke_dialog_tab_selected"),
f.hide());f.setAttribute("aria-hidden",b!=a)}var g=this._.tabs[a];g[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(c(g[1]),g[1].show(),setTimeout(function(){c(g[1],1)},0)):g[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(b){var d=this._.tabs[b]&&this._.tabs[b][0];d&&1!=this._.pageCount&&
d.isVisible()&&(b==this._.currentTabId&&this.selectPage(a.call(this)),d.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 d=this._.contents[a];return d&&d[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,d){return this.getContentElement(a,
b).setValue(d)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length,
this._.focusList.push(new k(this,a,b));else{this._.focusList.splice(b,0,new k(this,a,b));for(var d=b+1;d<this._.focusList.length;d++)this._.focusList[d].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,d={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};d.styles["margin-"+("rtl"==b?"left":"right")]="8px";this.parts.spinner=CKEDITOR.document.createElement("div",
d);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok").disable()}else a==CKEDITOR.DIALOG_STATE_IDLE&&(this.parts.spinner&&this.parts.spinner.hide(),this.getButton("ok").enable());this.fire("state",a)}},getModel:function(a){return this._.model?this._.model:this.definition.getModel?this.definition.getModel(a):null},setModel:function(a){this._.model=a},getMode:function(a){if(this.definition.getMode)return this.definition.getMode(a);
a=this.getModel(a);return!a||a instanceof CKEDITOR.dom.element&&!a.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}};CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,add:function(a,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,d){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+
b+":"+d+"(?:$|;)","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(d){return a(d,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(d){return a(d,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);
var t={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},z=function(a,b,d){for(var f=0,c;c=a[f];f++)if(c.id==b||d&&c[d]&&(c=z(c[d],b,d)))return c;return null},r=function(a,b,d,f,c){if(d){for(var g=0,h;h=a[g];g++){if(h.id==d)return a.splice(g,0,b),b;if(f&&h[f]&&(h=r(h[f],b,d,f,!0)))return h}if(c)return null}a.push(b);return b},y=function(a,b,d){for(var f=0,c;c=a[f];f++){if(c.id==b)return a.splice(f,1);if(d&&c[d]&&(c=y(c[d],
b,d)))return c}return null},A=function(a,b){this.dialog=a;for(var f=b.contents,c=0,g;g=f[c];c++)f[c]=g&&new d(a,g);CKEDITOR.tools.extend(this,b)};A.prototype={getContents:function(a){return z(this.contents,a)},getButton:function(a){return z(this.buttons,a)},addContents:function(a,b){return r(this.contents,a,b)},addButton:function(a,b){return r(this.buttons,a,b)},removeContents:function(a){y(this.contents,a)},removeButton:function(a){y(this.buttons,a)}};d.prototype={get:function(a){return z(this.elements,
a,"children")},add:function(a,b){return r(this.elements,a,b,"children")},remove:function(a){y(this.elements,a,"children")}};var C={},B,F={},G=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,f=a.data.$.shiftKey,c=String.fromCharCode(a.data.$.keyCode);(b=F[(b?"CTRL+":"")+(d?"ALT+":"")+(f?"SHIFT+":"")+c])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},J=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,
f=a.data.$.shiftKey,c=String.fromCharCode(a.data.$.keyCode);(b=F[(b?"CTRL+":"")+(d?"ALT+":"")+(f?"SHIFT+":"")+c])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))},K=function(a,b,d,f,c){(F[d]||(F[d]=[])).push({uiElement:a,dialog:b,key:d,keyup:c||a.accessKeyUp,keydown:f||a.accessKeyDown})},D=function(a){for(var b in F){for(var d=F[b],f=d.length-1;0<=f;f--)d[f].dialog!=a&&d[f].uiElement!=a||d.splice(f,1);0===d.length&&delete F[b]}},M=function(a,
b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},H=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,d,f,c,g,h){if(!(4>arguments.length)){var e=(f.call?f(b):f)||"div",k=["\x3c",e," "],l=(c&&c.call?c(b):c)||{},m=(g&&g.call?g(b):g)||{},n=(h&&h.call?h.call(this,a,b):h)||"",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 t={};b.type&&(t["cke_dialog_ui_"+
b.type]=1);b.className&&(t[b.className]=1);b.disabled&&(t.cke_disabled=1);for(var r=m["class"]&&m["class"].split?m["class"].split(" "):[],p=0;p<r.length;p++)r[p]&&(t[r[p]]=1);r=[];for(p in t)r.push(p);m["class"]=r.join(" ");b.title&&(m.title=b.title);t=(b.style||"").split(";");b.align&&(r=b.align,l["margin-left"]="left"==r?0:"auto",l["margin-right"]="right"==r?0:"auto");for(p in l)t.push(p+":"+l[p]);b.hidden&&t.push("display:none");for(p=t.length-1;0<=p;p--)""===t[p]&&t.splice(p,1);0<t.length&&(m.style=
(m.style?m.style+"; ":"")+t.join("; "));for(p in m)k.push(p+'\x3d"'+CKEDITOR.tools.htmlEncode(m[p])+'" ');k.push("\x3e",n,"\x3c/",e,"\x3e");d.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(d){a.call(this,b.setValue.call(this,d))}}));"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&&K(this,a,"CTRL+"+b.accessKey);var u=this;a.on("load",function(){var b=u.getInputElement();if(b){var d=u.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;u.fire("focus");
d&&this.addClass(d)});b.on("blur",function(){u.fire("blur");d&&this.removeClass(d)})}});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=u.focusIndex}))}},hbox:function(a,b,d,f,c){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=b,h=c&&c.widths||null,e=c&&c.height||null,k,l={role:"presentation"};c&&c.align&&(l.align=c.align);CKEDITOR.ui.dialog.uiElement.call(this,
a,c||{type:"hbox"},f,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<d.length;k++){var b="cke_dialog_ui_hbox_child",f=[];0===k&&(b="cke_dialog_ui_hbox_first");k==d.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');h?h[k]&&f.push("width:"+q(h[k])):f.push("width:"+Math.floor(100/d.length)+"%");e&&f.push("height:"+q(e));c&&void 0!==c.padding&&f.push("padding:"+q(c.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&
g[k].align&&f.push("text-align:"+g[k].align);0<f.length&&a.push('style\x3d"'+f.join("; ")+'" ');a.push("\x3e",d[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,d,f,c){if(!(3>arguments.length)){this._||(this._={});var g=this._.children=b,h=c&&c.width||null,e=c&&c.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,c||{type:"vbox"},f,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];
b.push('style\x3d"');c&&c.expand&&b.push("height:100%;");b.push("width:"+q(h||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(c&&c.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var f=0;f<d.length;f++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');h&&k.push("width:"+q(h||"100%"));e?k.push("height:"+q(e[f])):c&&c.expand&&k.push("height:"+Math.floor(100/d.length)+"%");
c&&void 0!==c.padding&&k.push("padding:"+q(c.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[f].align&&k.push("text-align:"+g[f].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',d[f],"\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+)/,d,f=function(a,b,d,f){b.on("load",function(){a.getInputElement().on(d,f,a)})},c;for(c in a)if(d=c.match(b))this.eventProcessors[c]?this.eventProcessors[c].call(this,this._.dialog,a[c]):f(this,this._.dialog,d[1].toLowerCase(),a[c]);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,d){for(var f=b.children,c,g=[],h=[],e=0;e<f.length&&(c=f[e]);e++){var k=[];g.push(k);h.push(CKEDITOR.dialog._.uiElementBuilders[c.type].build(a,c,k))}return new CKEDITOR.ui.dialog[b.type](a,
h,g,d,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*$/,d=/^\d*(?:\.\d+)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,c=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
g=/^(\s*[\w-]+\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],d,f=CKEDITOR.VALIDATE_AND,c=[],g;for(g=0;g<a.length;g++)if("function"==typeof a[g])c.push(a[g]);else break;g<a.length&&"string"==typeof a[g]&&(d=a[g],g++);g<a.length&&"number"==typeof a[g]&&(f=a[g]);var h=f==CKEDITOR.VALIDATE_AND?!0:!1;for(g=0;g<c.length;g++)h=f==CKEDITOR.VALIDATE_AND?h&&
c[g](b):h||c[g](b);return h?!0:d}},regex:function(a,b){return function(d){d=this&&this.getValue?this.getValue():d;return a.test(d)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(d,a)},cssLength:function(a){return this.functions(function(a){return c.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(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 d in C)C[d].remove();C={}}a=a.editor._.storedDialogs;for(var f in a)a[f].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,d){var f=null,c=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&v(this);if("function"==typeof c)c=this._.storedDialogs||(this._.storedDialogs={}),f=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),f.setModel(d),b&&b.call(f,f),f.show();else{if("failed"==c)throw x(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof c&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");
this.openDialog(a,b,d)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(f)f.once("hide",function(){f.setModel(null)},null,null,999);return f}})})();var ka=!1;CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){ka||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),ka=!0);a.on("doubleclick",function(e){e.data.dialog&&a.openDialog(e.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(a){var e=this;a.addCommand("a11yHelp",{exec:function(){var c=a.langCode,c=e.availableLangs[c]?c:e.availableLangs[c.replace(/-.*/,"")]?c.replace(/-.*/,""):
"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e.path+"dialogs/lang/"+c+".js"),function(){a.lang.a11yhelp=e.langEntries[c];a.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});a.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");a.on("ariaEditorHelpLabel",function(c){c.data.label=a.lang.common.editorHelp})}})})();CKEDITOR.plugins.add("about",{requires:"dialog",init:function(a){var e=a.addCommand("about",new CKEDITOR.dialogCommand("about"));
e.modes={wysiwyg:1,source:1};e.canUndo=!1;e.readOnly=1;a.ui.addButton&&a.ui.addButton("About",{label:a.lang.about.dlgTitle,command:"about",toolbar:"about"});CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}});CKEDITOR.plugins.add("basicstyles",{init:function(a){var e=0,c=function(c,g,d,h){if(h){h=new CKEDITOR.style(h);var f=b[d];f.unshift(h);a.attachStyleStateChange(h,function(b){!a.readOnly&&a.getCommand(d).setState(b)});a.addCommand(d,new CKEDITOR.styleCommand(h,{contentForms:f}));a.ui.addButton&&
a.ui.addButton(c,{label:g,command:d,toolbar:"basicstyles,"+(e+=10)})}},b={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},g=a.config,m=a.lang.basicstyles;c("Bold",
m.bold,"bold",g.coreStyles_bold);c("Italic",m.italic,"italic",g.coreStyles_italic);c("Underline",m.underline,"underline",g.coreStyles_underline);c("Strike",m.strike,"strike",g.coreStyles_strike);c("Subscript",m.subscript,"subscript",g.coreStyles_subscript);c("Superscript",m.superscript,"superscript",g.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic=
{element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){function a(a,b,d,c){if(!a.isReadOnly()&&!a.equals(d.editable())){CKEDITOR.dom.element.setMarker(c,a,"bidi_processed",1);c=a;for(var g=d.editable();(c=c.getParent())&&!c.equals(g);)if(c.getCustomData("bidi_processed")){a.removeStyle("direction");
a.removeAttribute("dir");return}c="useComputedState"in d.config?d.config.useComputedState:1;(c?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=b&&(a.removeStyle("direction"),c?(a.removeAttribute("dir"),b!=a.getComputedStyle("direction")&&a.setAttribute("dir",b)):a.setAttribute("dir",b),d.forceNextSelectionCheck())}}function e(a,b,d){var c=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(d==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);
if(a.checkBoundaryOfElement(c,CKEDITOR.START)&&a.checkBoundaryOfElement(c,CKEDITOR.END)){for(var g;c&&c.type==CKEDITOR.NODE_ELEMENT&&(g=c.getParent())&&1==g.getChildCount()&&!(c.getName()in b);)c=g;return c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in b&&c}}function c(b){return{context:"p",allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,b){var d=a.config.useComputedState,c,d=void 0===d||d;
if(!d){c=b.lastElement;for(var f=a.editable();c&&!(c.getName()in k||c.equals(f));){var g=c.getParent();if(!g)break;c=g}}c=c||b.block||b.blockLimit;c.equals(a.editable())&&(f=a.getSelection().getRanges()[0].getEnclosedNode())&&f.type==CKEDITOR.NODE_ELEMENT&&(c=f);c&&(d=d?c.getComputedStyle("direction"):c.getStyle("direction")||c.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==d?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==d?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));
d=(b.block||b.blockLimit||a.editable()).getDirection(1);d!=(a._.selDir||a.lang.dir)&&(a._.selDir=d,a.fire("contentDirChanged",d))},exec:function(d){var c=d.getSelection(),h=d.config.enterMode,k=c.getRanges();if(k&&k.length){for(var l={},u=c.createBookmarks(),k=k.createIterator(),w,t=0;w=k.getNextRange(1);){var z=w.getEnclosedNode();z&&(!z||z.type==CKEDITOR.NODE_ELEMENT&&z.getName()in m)||(z=e(w,g,h));z&&a(z,b,d,l);var r=new CKEDITOR.dom.walker(w),y=u[t].startNode,A=u[t++].endNode;r.evaluator=function(a){var b=
h==CKEDITOR.ENTER_P?"p":"div",d;if(d=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in g){if(b=a.is(b))b=(b=a.getParent())?b.type==CKEDITOR.NODE_ELEMENT:!1;d=!(b&&a.getParent().is("blockquote"))}return!!(d&&a.getPosition(y)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(A)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;z=r.next();)a(z,b,d,l);w=w.createIterator();for(w.enlargeBr=h!=CKEDITOR.ENTER_BR;z=w.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)a(z,
b,d,l)}CKEDITOR.dom.element.clearAllMarkers(l);d.forceNextSelectionCheck();c.selectBookmarks(u);d.focus()}}}}function b(a){var b=a==l.setAttribute,d=a==l.removeAttribute,c=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(g,h){if(!this.isReadOnly()){var e;if(e=g==(b||d?"dir":"direction")||"style"==g&&(d||c.test(h))){a:{e=this;for(var k=e.getDocument().getBody().getParent();e;){if(e.equals(k)){e=!1;break a}e=e.getParent()}e=!0}e=!e}if(e&&(e=this.getDirection(1),k=a.apply(this,arguments),e!=this.getDirection(1)))return this.getDocument().fire("dirChanged",
this),k}return a.apply(this,arguments)}}var g={table:1,ul:1,ol:1,blockquote:1,div:1},m={},k={};CKEDITOR.tools.extend(m,g,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(k,m,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function b(d,c,g,h,e){a.addCommand(g,new CKEDITOR.command(a,h));a.ui.addButton&&a.ui.addButton(d,{label:c,command:g,toolbar:"bidi,"+e})}if(!a.blockless){var d=a.lang.bidi;b("BidiLtr",d.ltr,"bidiltr",c("ltr"),10);b("BidiRtl",d.rtl,"bidirtl",c("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",
function(b){a.fire("dirChanged",{node:b.data,dir:b.data.getDirection(1)})})});a.on("contentDirChanged",function(b){b=(a.lang.dir!=b.data?"add":"remove")+"Class";var d=a.ui.space(a.config.toolbarLocation);if(d)d[b]("cke_mixed_dir_content")})}}});for(var l=CKEDITOR.dom.element.prototype,d=["setStyle","removeStyle","setAttribute","removeAttribute"],h=0;h<d.length;h++)l[d[h]]=CKEDITOR.tools.override(l[d[h]],b)})();(function(){var a={exec:function(a){var c=a.getCommand("blockquote").state,b=a.getSelection(),
g=b&&b.getRanges()[0];if(g){var m=b.createBookmarks();if(CKEDITOR.env.ie){var k=m[0].startNode,l=m[0].endNode,d;if(k&&"blockquote"==k.getParent().getName())for(d=k;d=d.getNext();)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){k.move(d,!0);break}if(l&&"blockquote"==l.getParent().getName())for(d=l;d=d.getPrevious();)if(d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()){l.move(d);break}}var h=g.createIterator();h.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(c==CKEDITOR.TRISTATE_OFF){for(k=
[];c=h.getNextParagraph();)k.push(c);1>k.length&&(c=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),l=m.shift(),g.insertNode(c),c.append(new CKEDITOR.dom.text("﻿",a.document)),g.moveToBookmark(l),g.selectNodeContents(c),g.collapse(!0),l=g.createBookmark(),k.push(c),m.unshift(l));d=k[0].getParent();g=[];for(l=0;l<k.length;l++)c=k[l],d=d.getCommonAncestor(c.getParent());for(c={table:1,tbody:1,tr:1,ol:1,ul:1};c[d.getName()];)d=d.getParent();for(l=null;0<k.length;){for(c=k.shift();!c.getParent().equals(d);)c=
c.getParent();c.equals(l)||g.push(c);l=c}for(;0<g.length;)if(c=g.shift(),"blockquote"==c.getName()){for(l=new CKEDITOR.dom.documentFragment(a.document);c.getFirst();)l.append(c.getFirst().remove()),k.push(l.getLast());l.replace(c)}else k.push(c);g=a.document.createElement("blockquote");for(g.insertBefore(k[0]);0<k.length;)c=k.shift(),g.append(c)}else if(c==CKEDITOR.TRISTATE_ON){l=[];for(d={};c=h.getNextParagraph();){for(k=g=null;c.getParent();){if("blockquote"==c.getParent().getName()){g=c.getParent();
k=c;break}c=c.getParent()}g&&k&&!k.getCustomData("blockquote_moveout")&&(l.push(k),CKEDITOR.dom.element.setMarker(d,k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(d);c=[];k=[];for(d={};0<l.length;)h=l.shift(),g=h.getParent(),h.getPrevious()?h.getNext()?(h.breakParent(h.getParent()),k.push(h.getNext())):h.remove().insertAfter(g):h.remove().insertBefore(g),g.getCustomData("blockquote_processed")||(k.push(g),CKEDITOR.dom.element.setMarker(d,g,"blockquote_processed",!0)),c.push(h);CKEDITOR.dom.element.clearAllMarkers(d);
for(l=k.length-1;0<=l;l--){g=k[l];a:{d=g;for(var h=0,f=d.getChildCount(),n=void 0;h<f&&(n=d.getChild(h));h++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){d=!1;break a}d=!0}d&&g.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(g=!0;c.length;)if(h=c.shift(),"div"==h.getName()){l=new CKEDITOR.dom.documentFragment(a.document);!g||!h.getPrevious()||h.getPrevious().type==CKEDITOR.NODE_ELEMENT&&h.getPrevious().isBlockBoundary()||l.append(a.document.createElement("br"));for(g=h.getNext()&&
!(h.getNext().type==CKEDITOR.NODE_ELEMENT&&h.getNext().isBlockBoundary());h.getFirst();)h.getFirst().remove().appendTo(l);g&&l.append(a.document.createElement("br"));l.replace(h);g=!1}}b.selectBookmarks(m);a.focus()}},refresh:function(a,c){this.setState(a.elementPath(c.block||c.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(e){e.blockless||
(e.addCommand("blockquote",a),e.ui.addButton&&e.ui.addButton("Blockquote",{label:e.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})})();"use strict";(function(){function a(a,b){CKEDITOR.tools.extend(this,b,{editor:a,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:a._.notificationArea});b.type||(this.type="info");this.element=this._createElement();a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function e(a){var b=this;this.editor=a;this.notifications=
[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);a.on("destroy",function(){b._removeListeners();b.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(a){function b(a){var b=new CKEDITOR.dom.element("div");b.setStyles({position:"fixed","margin-left":"-9999px"});b.setAttributes({"aria-live":"assertive","aria-atomic":"true"});b.setText(a);CKEDITOR.document.getBody().append(b);
setTimeout(function(){b.remove()},100)}a._.notificationArea=new e(a);a.showNotification=function(b,e,k){var l,d;"progress"==e?l=k:d=k;b=new CKEDITOR.plugins.notification(a,{message:b,type:e,progress:l,duration:d});b.show();return b};a.on("key",function(g){if(27==g.data.keyCode){var e=a._.notificationArea.notifications;e.length&&(b(a.lang.notification.closed),e[e.length-1].hide(),g.cancel())}})}});a.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),
this._hideAfterTimeout())},update:function(a){var b=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:a})&&(b=!1);var g=this.element,e=g.findOne(".cke_notification_message"),k=g.findOne(".cke_notification_progress"),l=a.type;g.removeAttribute("role");a.progress&&"progress"!=this.type&&(l="progress");l&&(g.removeClass(this._getClass()),g.removeAttribute("aria-label"),this.type=l,g.addClass(this._getClass()),g.setAttribute("aria-label",this.type),"progress"!=this.type||k?"progress"!=
this.type&&k&&k.remove():(k=this._createProgressElement(),k.insertBefore(e)));void 0!==a.message&&(this.message=a.message,e.setHtml(this.message));void 0!==a.progress&&(this.progress=a.progress,k&&k.setStyle("width",this._getPercentageProgress()));b&&a.important&&(g.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=a.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 a=this,b,g,e=this.editor.lang.common.close;b=new CKEDITOR.dom.element("div");b.addClass("cke_notification");b.addClass(this._getClass());b.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&b.append(this._createProgressElement());g=new CKEDITOR.dom.element("p");g.addClass("cke_notification_message");g.setHtml(this.message);b.append(g);g=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+
e+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');b.append(g);g.on("click",function(){a.editor.focus();a.hide()});return b},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var a=new CKEDITOR.dom.element("span");a.addClass("cke_notification_progress");a.setStyle("width",this._getPercentageProgress());return a},_getPercentageProgress:function(){return Math.round(100*
(this.progress||0))+"%"},_hideAfterTimeout:function(){var a=this,b;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)b=this.duration;else if("info"==this.type||"success"==this.type)b="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;b&&(a._hideTimeoutId=setTimeout(function(){a.hide()},b))}};e.prototype={add:function(a){this.notifications.push(a);this.element.append(a.element);1==this.element.getChildCount()&&
(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(a){var b=CKEDITOR.tools.indexOf(this.notifications,a);0>b||(this.notifications.splice(b,1),a.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var a=this.editor,b=a.config,g=new CKEDITOR.dom.element("div");g.addClass("cke_notifications_area");g.setAttribute("id","cke_notifications_area_"+a.name);g.setStyle("z-index",b.baseFloatZIndex-
2);return g},_attachListeners:function(){var a=CKEDITOR.document.getWindow(),b=this.editor;a.on("scroll",this._uiBuffer.input);a.on("resize",this._uiBuffer.input);b.on("change",this._changeBuffer.input);b.on("floatingSpaceLayout",this._layout,this,null,20);b.on("blur",this._layout,this,null,20)},_removeListeners:function(){var a=CKEDITOR.document.getWindow(),b=this.editor;a.removeListener("scroll",this._uiBuffer.input);a.removeListener("resize",this._uiBuffer.input);b.removeListener("change",this._changeBuffer.input);
b.removeListener("floatingSpaceLayout",this._layout);b.removeListener("blur",this._layout)},_layout:function(){function a(){b.setStyle("left",w(t+e.width-n-p))}var b=this.element,g=this.editor,e=g.ui.contentsElement.getClientRect(),k=g.ui.contentsElement.getDocumentPosition(),l,d,h=b.getClientRect(),f,n=this._notificationWidth,p=this._notificationMargin;f=CKEDITOR.document.getWindow();var v=f.getScrollPosition(),x=f.getViewPaneSize(),q=CKEDITOR.document.getBody(),u=q.getDocumentPosition(),w=CKEDITOR.tools.cssLength;
n&&p||(f=this.element.getChild(0),n=this._notificationWidth=f.getClientRect().width,p=this._notificationMargin=parseInt(f.getComputedStyle("margin-left"),10)+parseInt(f.getComputedStyle("margin-right"),10));g.toolbar&&(l=g.ui.space("top"),d=l.getClientRect());l&&l.isVisible()&&d.bottom>e.top&&d.bottom<e.bottom-h.height?b.setStyles({position:"fixed",top:w(d.bottom)}):0<e.top?b.setStyles({position:"absolute",top:w(k.y)}):k.y+e.height-h.height>v.y?b.setStyles({position:"fixed",top:0}):b.setStyles({position:"absolute",
top:w(k.y+e.height-h.height)});var t="fixed"==b.getStyle("position")?e.left:"static"!=q.getComputedStyle("position")?k.x-u.x:k.x;e.width<n+p?k.x+n+p>v.x+x.width?a():b.setStyle("left",w(t)):k.x+n+p>v.x+x.width?b.setStyle("left",w(t)):k.x+e.width/2+n/2+p>v.x+x.width?b.setStyle("left",w(t-k.x+v.x+x.width-n-p)):0>e.left+e.width-n-p?a():0>e.left+e.width/2-n/2?b.setStyle("left",w(t-k.x+v.x)):b.setStyle("left",w(t+e.width/2-n/2-p/2))}};CKEDITOR.plugins.notification=a})();(function(){var a='\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&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var e="";CKEDITOR.env.ie&&(e='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');
var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+e+'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{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e',
c=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),b=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};
CKEDITOR.ui.button.prototype={render:function(a,e){function k(){var b=a.mode;b&&(b=this.modes[b]?void 0!==l[b]?l[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var l=null,d=CKEDITOR.env,h=this._.id=CKEDITOR.tools.getNextId(),f="",n=this.command,p,v,x;this._.editor=a;var q={id:h,button:this,editor:a,focus:function(){CKEDITOR.document.getById(h).focus()},execute:function(){this.button.click(a)},
attach:function(a){this.button.attach(a)}},u=CKEDITOR.tools.addFunction(function(a){if(q.onkey)return a=new CKEDITOR.dom.event(a),!1!==q.onkey(q,a.getKeystroke())}),w=CKEDITOR.tools.addFunction(function(a){var b;q.onfocus&&(b=!1!==q.onfocus(q,new CKEDITOR.dom.event(a)));return b}),t=0;q.clickFn=p=CKEDITOR.tools.addFunction(function(){t&&(a.unlockSelection(1),t=0);q.execute();d.iOS&&a.focus()});this.modes?(l={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(l[a.mode]=
this._.state)},this),a.on("activeFilterChange",k,this),a.on("mode",k,this),!this.readOnly&&a.on("readOnly",k,this)):n&&(n=a.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),f+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var z;if(this.directional)a.on("contentDirChanged",function(b){var d=CKEDITOR.document.getById(this._.id),f=d.getFirst();b=b.data;b!=a.lang.dir?d.addClass("cke_"+b):d.removeClass("cke_ltr").removeClass("cke_rtl");f.setAttribute("style",
CKEDITOR.skin.getIconStyle(z,"rtl"==b,this.icon,this.iconOffset))},this);n?(v=a.getCommandKeystroke(n))&&(x=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,v)):f+="off";v=this.name||this.command;var r=null,y=this.icon;z=v;this.icon&&!/\./.test(this.icon)?(z=this.icon,y=null):(this.icon&&(r=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(r=this.iconHiDpi));r?(CKEDITOR.skin.addIcon(r,r),y=null):r=z;f={id:h,name:v,iconName:z,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||
""),state:f,ariaDisabled:"disabled"==f?"true":"false",title:this.title+(x?" ("+x.display+")":""),ariaShortcut:x?a.lang.common.keyboardShortcut+" "+x.aria:"",titleJs:d.gecko&&!d.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:u,focusFn:w,clickFn:p,style:CKEDITOR.skin.getIconStyle(r,"rtl"==a.lang.dir,y,this.iconOffset),arrowHtml:this.hasArrow?c.output():""};b.output(f,e);if(this.onRender)this.onRender();return q},
setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?b.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||
this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}})();(function(){function a(a){function b(){for(var d=c(),f=CKEDITOR.tools.clone(a.config.toolbarGroups)||e(a),h=0;h<f.length;h++){var m=f[h];if("/"!=m){"string"==typeof m&&(m=f[h]={name:m});var q,u=m.groups;if(u)for(var w=0;w<u.length;w++)q=u[w],(q=d[q])&&l(m,q);(q=d[m.name])&&l(m,q)}}return f}function c(){var b={},d,f,h;for(d in a.ui.items)f=
a.ui.items[d],h=f.toolbar||"others",h=h.split(","),f=h[0],h=parseInt(h[1]||-1,10),b[f]||(b[f]=[]),b[f].push({name:d,order:h});for(f in b)b[f]=b[f].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 l(b,d){if(d.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var f;f=d.shift();)f="string"==typeof f?f:f.name,h&&-1!=CKEDITOR.tools.indexOf(h,f)||(f=a.ui.create(f))&&a.addFeature(f)&&b.items.push(f)}}function d(a){var b=[],d,f,c;for(d=
0;d<a.length;++d)f=a[d],c={},"/"==f?b.push(f):CKEDITOR.tools.isArray(f)?(l(c,CKEDITOR.tools.clone(f)),b.push(c)):f.items&&(l(c,CKEDITOR.tools.clone(f.items)),c.name=f.name,b.push(c));return b}var h=a.config.removeButtons,h=h&&h.split(","),f=a.config.toolbar;"string"==typeof f&&(f=a.config["toolbar_"+f]);return a.toolbar=f?d(f):b()}function e(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 c=function(){this.toolbars=[];this.focusCommandExecuted=!1};c.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var c=0,e;e=b.items[c++];)if(e.focus){e.focus();return}};var b={modes:{wysiwyg:1,
source:1},readOnly:1,exec:function(a){a.toolbox&&(a.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(g){var e,k=function(a,b){var c,f="rtl"==g.lang.dir,n=g.config.toolbarGroupCycling,p=f?37:39,f=f?39:37,n=void 0===n||n;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=9==b?(c?c.next:a.toolbar.next)||g.toolbox.toolbars[0]:(c?c.previous:
a.toolbar.previous)||g.toolbox.toolbars[g.toolbox.toolbars.length-1],c.items.length)for(a=c.items[e?c.items.length-1:0];a&&!a.focus;)(a=e?a.previous:a.next)||(c=0);a&&a.focus();return!1;case p:c=a;do c=c.next,!c&&n&&(c=a.toolbar.items[0]);while(c&&!c.focus);c?c.focus():k(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():k(a,40==b?p:f),!1;case f:case 38:c=a;do c=c.previous,!c&&n&&(c=a.toolbar.items[a.toolbar.items.length-1]);while(c&&!c.focus);c?c.focus():(e=1,k(a,CKEDITOR.SHIFT+
9),e=0);return!1;case 27:return g.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};g.on("uiSpace",function(b){if(b.data.space==g.config.toolbarLocation){b.removeListener();g.toolbox=new c;var d=CKEDITOR.tools.getNextId(),e=['\x3cspan id\x3d"',d,'" class\x3d"cke_voice_label"\x3e',g.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+g.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',d,'" onmousedown\x3d"return false;"\x3e'],d=!1!==g.config.toolbarStartupExpanded,
f,m;g.config.toolbarCanCollapse&&g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&e.push('\x3cspan class\x3d"cke_toolbox_main"'+(d?"\x3e":' style\x3d"display:none"\x3e'));for(var p=g.toolbox.toolbars,v=a(g),x=v.length,q=0;q<x;q++){var u,w=0,t,z=v[q],r="/"!==z&&("/"===v[q+1]||q==x-1),y;if(z)if(f&&(e.push("\x3c/span\x3e"),m=f=0),"/"===z)e.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{y=z.items||z;for(var A=0;A<y.length;A++){var C=y[A],B;if(C){var F=function(a){a=a.render(g,e);G=w.items.push(a)-
1;0<G&&(a.previous=w.items[G-1],a.previous.next=a);a.toolbar=w;a.onkey=k;a.onfocus=function(){g.toolbox.focusCommandExecuted||g.focus()}};if(C.type==CKEDITOR.UI_SEPARATOR)m=f&&C;else{B=!1!==C.canGroup;if(!w){u=CKEDITOR.tools.getNextId();w={id:u,items:[]};t=z.name&&(g.lang.toolbar.toolbarGroups[z.name]||z.name);e.push('\x3cspan id\x3d"',u,'" class\x3d"cke_toolbar'+(r?' cke_toolbar_last"':'"'),t?' aria-labelledby\x3d"'+u+'_label"':"",' role\x3d"toolbar"\x3e');t&&e.push('\x3cspan id\x3d"',u,'_label" class\x3d"cke_voice_label"\x3e',
t,"\x3c/span\x3e");e.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var G=p.push(w)-1;0<G&&(w.previous=p[G-1],w.previous.next=w)}B?f||(e.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),f=1):f&&(e.push("\x3c/span\x3e"),f=0);m&&(F(m),m=0);F(C)}}}f&&(e.push("\x3c/span\x3e"),m=f=0);w&&e.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}g.config.toolbarCanCollapse&&e.push("\x3c/span\x3e");if(g.config.toolbarCanCollapse&&g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var J=
CKEDITOR.tools.addFunction(function(){g.execCommand("toolbarCollapse")});g.on("destroy",function(){CKEDITOR.tools.removeFunction(J)});g.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),d=b.getPrevious(),f=a.ui.space("contents"),c=d.getParent(),g=parseInt(f.$.style.height,10),e=c.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");h?(d.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(d.hide(),
b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(h?"▲":"◀");f.setStyle("height",g-(c.$.offsetHeight-e)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:f.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});g.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");e.push('\x3ca title\x3d"'+(d?g.lang.toolbar.toolbarCollapse:g.lang.toolbar.toolbarExpand)+
'" id\x3d"'+g.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');d||e.push(" cke_toolbox_collapser_min");e.push('" onclick\x3d"CKEDITOR.tools.callFunction('+J+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}e.push("\x3c/span\x3e");b.data.html+=e.join("")}});g.on("destroy",function(){if(this.toolbox){var a,b=0,c,f,g;for(a=this.toolbox.toolbars;b<a.length;b++)for(f=a[b].items,c=0;c<f.length;c++)g=f[c],g.clickFn&&CKEDITOR.tools.removeFunction(g.clickFn),
g.keyDownFn&&CKEDITOR.tools.removeFunction(g.keyDownFn)}});g.on("uiReady",function(){var a=g.ui.space("toolbox");a&&g.focusManager.add(a,1)});g.addCommand("toolbarFocus",b);g.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");g.ui.add("-",CKEDITOR.UI_SEPARATOR,{});g.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,b,
c){var l=e(this.editor),d=0===b,h={name:a};if(c){if(c=CKEDITOR.tools.search(l,function(a){return a.name==c})){!c.groups&&(c.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(c.groups,b),0<=b)){c.groups.splice(b+1,0,a);return}d?c.groups.splice(0,0,a):c.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(l,function(a){return a.name==b}));d?l.splice(0,0,a):"number"==typeof b?l.splice(b+1,0,h):l.push(a)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";"use strict";(function(){function a(a,
b,d){b.type||(b.type="auto");if(d&&!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 e(b){function d(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var c=function(a){b.getSelection().isCollapsed()||(b.readOnly&&"cut"==a.name||B.initPasteDataTransfer(a,b),a.data.preventDefault())};
a.on("copy",c);a.on("cut",c);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(B.mainPasteEvent,function(a){"beforepaste"==B.mainPasteEvent&&F||y(a)});"beforepaste"==B.mainPasteEvent&&(a.on("paste",function(a){G||(e(),a.data.preventDefault(),y(a),k("paste"))}),a.on("contextmenu",h,null,null,0),a.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));a.on("beforecut",function(){!F&&l(b)});var g;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),
"mouseup",function(){g=setTimeout(A,0)});b.on("destroy",function(){clearTimeout(g)});a.on("keyup",A)}function c(a){return{type:a,canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var a;var d=this.type;if(CKEDITOR.env.ie)a=k(d);else try{a=b.document.$.execCommand(d,!1,null)}catch(c){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function g(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+
86,exec:function(b,d){function c(d,e){e="undefined"!==typeof e?e:!0;d?(d.method="paste",d.dataTransfer||(d.dataTransfer=B.initPasteDataTransfer()),a(b,d,e)):g&&!b._.forcePasteDialog&&b.showNotification(k,"info",b.config.clipboard_notificationDuration);b._.forcePasteDialog=!1;b.fire("afterCommandExec",{name:"paste",command:f,returnValue:!!d})}d="undefined"!==typeof d&&null!==d?d:{};var f=this,g="undefined"!==typeof d.notification?d.notification:!0,e=d.type,h=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,
b.getCommandKeystroke(this)),k="string"===typeof g?g:b.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+h.aria+'"\x3e'+h.display+"\x3c/kbd\x3e"),h="string"===typeof d?d:d.dataValue;e&&!0!==b.config.forcePasteAsPlainText&&"allow-word"!==b.config.forcePasteAsPlainText?b._.nextPasteType=e:delete b._.nextPasteType;"string"===typeof h?c({dataValue:h}):b.getClipboardData(c)}}}function e(){G=1;setTimeout(function(){G=0},100)}function h(){F=1;setTimeout(function(){F=0},10)}function k(a){var d=
b.document,c=d.getBody(),g=!1,e=function(){g=!0};c.on(a,e);7<CKEDITOR.env.version?d.$.execCommand(a):d.$.selection.createRange().execCommand(a);c.removeListener(a,e);return g}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),d,c,g;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(d=a.getSelectedElement())&&(c=a.getRanges()[0],g=b.document.createText(""),g.insertBefore(d),c.setStartBefore(g),c.setEndAfter(d),a.selectRanges([c]),setTimeout(function(){d.getParent()&&(g.remove(),a.selectElement(d))},
0))}}function m(a,d){var c=b.document,g=b.editable(),e=function(a){a.cancel()},h;if(!c.getById("cke_pastebin")){var k=b.getSelection(),l=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!g.is("body")||CKEDITOR.env.ie?"div":"body",c);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var p=0,c=c.getWindow();CKEDITOR.env.webkit?(g.append(n),n.addClass("cke_editable"),g.is("body")||(p="static"!=g.getComputedStyle("position")?
g:CKEDITOR.dom.element.get(g.$.offsetParent),p=p.getDocumentPosition().y)):g.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(n);n.setStyles({position:"absolute",top:c.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,c.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(p=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==b.config.contentsLangDirection?
"left":"right","-10000px");b.on("selectionChange",e,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)h=g.once("blur",e,null,null,-100);p&&n.focus();p=new CKEDITOR.dom.range(n);p.selectNodeContents(n);var t=p.select();CKEDITOR.env.ie&&(h=g.once("blur",function(){b.lockSelection(t)}));var r=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=r);h&&h.removeListener();CKEDITOR.env.ie&&g.focus();k.selectBookmarks(l);
n.remove();var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&(n=a);b.removeListener("selectionChange",e);d(n.getHtml())},0)}}function z(){if("paste"==B.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();e();var a=b.focusManager;a.lock();if(b.editable().fire(B.mainPasteEvent)&&!k("paste"))return a.unlock(),!1;a.unlock();return!0}function r(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=
b.editable();e();"paste"==B.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function y(d){var c={type:"auto",method:"paste",dataTransfer:B.initPasteDataTransfer(d)};c.dataTransfer.cacheData();var g=!1!==b.fire("beforePaste",c);g&&B.canClipboardApiBeTrusted(c.dataTransfer,b)?(d.data.preventDefault(),setTimeout(function(){a(b,c)},0)):m(d,function(d){c.dataValue=d.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,
"");g&&a(b,c)})}function A(){if("wysiwyg"==b.mode){var a=C("paste");b.getCommand("cut").setState(C("cut"));b.getCommand("copy").setState(C("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function C(a){var d=b.getSelection(),d=d&&d.getRanges()[0];if((b.readOnly||d&&d.checkReadOnly())&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?
CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var B=CKEDITOR.plugins.clipboard,F=0,G=0;(function(){b.on("key",r);b.on("contentDom",d);b.on("selectionChange",A);if(b.contextMenu){b.contextMenu.addListener(function(){return{cut:C("cut"),copy:C("copy"),paste:C("paste")}});var a=null;b.on("menuShow",function(){a&&(a.removeListener(),a=null);var d=b.contextMenu.findItemByCommandName("paste");d&&d.element&&(a=d.element.on("touchend",function(){b._.forcePasteDialog=!0}))})}if(b.ui.addButton)b.once("instanceReady",
function(){b._.pasteButtons&&CKEDITOR.tools.array.forEach(b._.pasteButtons,function(a){if(a=b.ui.get(a))if(a=CKEDITOR.document.getById(a._.id))a.on("touchend",function(){b._.forcePasteDialog=!0})})})})();(function(){function a(d,c,g,e,h){var k=b.lang.clipboard[c];b.addCommand(c,g);b.ui.addButton&&b.ui.addButton(d,{label:k,command:c,toolbar:"clipboard,"+e});b.addMenuItems&&b.addMenuItem(c,{label:k,command:c,group:"clipboard",order:h})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste",
"paste",g(),30,8);b._.pasteButtons||(b._.pasteButtons=[]);b._.pasteButtons.push("Paste")})();b.getClipboardData=function(a,d){function c(a){a.removeListener();a.cancel();d(a.data)}function g(a){a.removeListener();a.cancel();d({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var e=!1,h="auto";d||(d=a,a=null);b.on("beforePaste",function(a){a.removeListener();e=!0;h=a.data.type},null,null,1E3);b.on("paste",c,null,null,0);!1===z()&&(b.removeListener("paste",c),b._.forcePasteDialog&&
e&&b.fire("pasteDialog")?(b.on("pasteDialogCommit",g),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",g);a.data._.committed||d(null)})):d(null))}}function c(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 b(a,b){function d(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 d(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 d(a.length/4)})+"\x3c/p\x3e"));return k(a,b)}function g(a){function b(){var a=
{},d;for(d in CKEDITOR.dtd)"$"!=d.charAt(0)&&"div"!=d&&"span"!=d&&(a[d]=1);return a}var d={};return{get:function(c){return"plain-text"==c?d.plainText||(d.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==c?((c=d.semanticContent)||(c=new CKEDITOR.filter(a,{}),c.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),c=d.semanticContent=c),c):c?new CKEDITOR.filter(a,c):null}}}function m(a,b,d){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var c=new CKEDITOR.htmlParser.basicWriter;d.applyTo(b,
!0,!1,a.activeEnterMode);b.writeHtml(c);return c.getHtml()}function k(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 l(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function d(b){var d=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(d,g,e){g.select();a(b,{dataTransfer:e,
method:"drop"},1);e.sourceEditor.fire("saveSnapshot");e.sourceEditor.editable().extractHtmlFromRange(d);e.sourceEditor.getSelection().selectRanges([d]);e.sourceEditor.fire("saveSnapshot")}function g(c,e){c.select();a(b,{dataTransfer:e,method:"drop"},1);d.resetDragDataTransfer()}function e(a,d,c){var g={$:a.data.$,target:a.data.getTarget()};d&&(g.dragRange=d);c&&(g.dropRange=c);!1===b.fire(a.name,g)&&a.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
var k=b.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(b),m=b.ui.space("top"),z=b.ui.space("bottom");d.preventDefaultDropOnElement(m);d.preventDefaultDropOnElement(z);k.attachListener(l,"dragstart",e);k.attachListener(b,"dragstart",d.resetDragDataTransfer,d,null,1);k.attachListener(b,"dragstart",function(a){d.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=d.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d.dragStartContainerChildCount=
a?h(a.startContainer):null,d.dragEndContainerChildCount=a?h(a.endContainer):null)},null,null,100);k.attachListener(l,"dragend",e);k.attachListener(b,"dragend",d.initDragDataTransfer,d,null,1);k.attachListener(b,"dragend",d.resetDragDataTransfer,d,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(a){if(!a.data.$.defaultPrevented&&(a.data.preventDefault(),!b.readOnly)){var c=a.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=d.getRangeAtDropPosition(a,b),g=d.dragRange;c&&e(a,g,c)}}},null,null,9999);k.attachListener(b,"drop",d.initDragDataTransfer,d,null,1);k.attachListener(b,"drop",function(a){if(a=a.data){var e=a.dropRange,h=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?
setTimeout(function(){d.internalDrop(h,e,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(h,e,k):g(e,k)}},null,null,9999)})}var h;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){var h,k=g(a);a.config.forcePasteAsPlainText?h="plain-text":a.config.pasteFilter?h=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(h="semantic-content");a.pasteFilter=k.get(h);e(a);d(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+
"dialogs/paste.js"));if(CKEDITOR.env.gecko){var l=["image/png","image/jpeg","image/gif"],x;a.on("paste",function(b){var d=b.data,c=d.dataTransfer;if(!d.dataValue&&"paste"==d.method&&c&&1==c.getFilesCount()&&x!=c.id&&(c=c.getFile(0),-1!=CKEDITOR.tools.indexOf(l,c.type))){var g=new FileReader;g.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+g.result+'" /\x3e';a.fire("paste",b.data)},!1);g.addEventListener("abort",function(){a.fire("paste",b.data)},!1);g.addEventListener("error",
function(){a.fire("paste",b.data)},!1);g.readAsDataURL(c);x=d.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var d=b.data.dataTransfer,c=d.getData("text/html");if(c)b.data.dataValue=c,b.data.type="html";else if(c=d.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(c),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,
d=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 c,f,g=new CKEDITOR.dom.element("div");for(g.setHtml(b);1==g.getChildCount()&&(c=g.getFirst())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.hasClass("cke_editable")||c.hasClass("cke_contents"));)g=f=c;f&&(b=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,c){return c.toLowerCase()in d?(a.data.preSniffing="html","\x3c"+c):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,c){return c in
d?(a.data.endsWithEOL=1,"\x3c/"+c+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(d){d=d.data;var g=a._.nextPasteType||d.type,e=d.dataValue,h,l=a.config.clipboard_defaultContentType||"html",n=d.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,v=!0===a.config.forcePasteAsPlainText;h="html"==g||"html"==d.preSniffing?"html":c(e);delete a._.nextPasteType;"htmlifiedtext"==h&&(e=b(a.config,e));if("text"==g&&"html"==h)e=
m(a,e,k.get("plain-text"));else if(n&&a.pasteFilter&&!d.dontFilter||v)e=m(a,e,a.pasteFilter);d.startsWithEOL&&(e='\x3cbr data-cke-eol\x3d"1"\x3e'+e);d.endsWithEOL&&(e+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==g&&(g="html"==h||"html"==l?"html":"text");d.type=g;d.dataValue=e;delete d.preSniffing;delete d.startsWithEOL;delete d.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,
1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.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,d){a.ui.addButton&&(a.ui.addButton(b,
d),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,d,c){function g(a,d,c){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(d)&&c!=d.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),d=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&d&&d.type==CKEDITOR.NODE_TEXT&&(c=a.getLength(),a.setText(a.getText()+d.getText()),d.remove(),b.setStart(a,c),b.collapse(!0)),!0}var e=b.startContainer;"number"==typeof c&&"number"==
typeof d&&e.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,e,d)||g(a.endContainer,e,c))},isDropRangeAffectedByDragRange:function(a,b){var d=b.startContainer,c=b.endOffset;return a.endContainer.equals(d)&&a.endOffset<=c||a.startContainer.getParent().equals(d)&&a.startContainer.getIndex()<c||a.endContainer.getParent().equals(d)&&a.endContainer.getIndex()<c?!0:!1},internalDrop:function(b,d,c,g){var e=CKEDITOR.plugins.clipboard,h=g.editable(),k,l;g.fire("saveSnapshot");g.fire("lockSnapshot",{dontUpdate:1});
CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,d,e.dragStartContainerChildCount,e.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(b,d))||(k=b.createBookmark(!1));e=d.clone().createBookmark(!1);l&&(k=b.createBookmark(!1));b=k.startNode;d=k.endNode;l=e.startNode;d&&b.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&d.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(b);b=g.createRange();b.moveToBookmark(k);h.extractHtmlFromRange(b,1);d=g.createRange();
e.startNode.getCommonAncestor(h)||(e=g.getSelection().createBookmarks()[0]);d.moveToBookmark(e);a(g,{dataTransfer:c,method:"drop",range:d},1);g.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,c=d.clientX,g=d.clientY,e=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(c,g))d=b.document.$.caretRangeFromPoint(c,g),h.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset),
h.collapse(!0);else if(d.rangeParent)h.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&e&&b.editable().hasFocus)return e;if(document.body.createTextRange){b.focus();d=b.document.getBody().$.createTextRange();try{for(var k=!1,l=0;20>l&&!k;l++){if(!k)try{d.moveToPoint(c,g-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(c,g+l),k=!0}catch(r){}}if(k){var y="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+y+'"\x3e​\x3c/span\x3e');
var A=b.document.getById(y);h.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START);A.remove()}else{var C=b.document.$.elementFromPoint(c,g),B=new CKEDITOR.dom.element(C),F;if(B.equals(b.editable())||"html"==B.getName())return e&&e.startContainer&&!e.startContainer.equals(b.editable())?e:null;F=B.getClientRect();c<F.left?h.setStartAt(B,CKEDITOR.POSITION_AFTER_START):h.setStartAt(B,CKEDITOR.POSITION_BEFORE_END);h.collapse(!0)}}catch(G){return null}}else return null}return h},initDragDataTransfer:function(a,
b){var d=a.data.$?a.data.$.dataTransfer:null,c=new this.dataTransfer(d,b);"dragstart"===a.name&&c.storeId();d?this.dragData&&c.id==this.dragData.id?c=this.dragData:this.dragData=c:this.dragData?c=this.dragData:this.dragData=c;a.data.dataTransfer=c},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var d=a.data.$.clipboardData,c=new this.dataTransfer(d,b);"copy"!==a.name&&"cut"!==a.name||c.storeId();this.copyCutData&&
c.id==this.copyCutData.id?(c=this.copyCutData,c.$=d):this.copyCutData=c;return c}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",l)}};h=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,
data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(h);this.id||(this.id="Text"==h?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==h||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 d="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===d||null===d||""===d){if(this._.fallbackDataTransfer.isRequired())d=this._.fallbackDataTransfer.getData(a,b);else try{d=this.$.getData(a)||""}catch(c){d=""}"text/html"!=a||b||(d=this._stripHtml(d))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==
d.substring(0,7)&&(d="");if("string"===typeof d)var g=d.indexOf("\x3c/html\x3e"),d=-1!==g?d.substring(0,g+7):d;return d},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"==h&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(d){}},storeId:function(){"Text"!==
h&&this.setData(h,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(d){d=b._.normalizeType(d);var c=b.getData(d);"text/html"==d&&(b._.nativeHtmlCache=b.getData(d,!0),c=b._stripHtml(c));c&&(b._.data[d]=c)}if(this.$){var b=this,d,c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(d=0;d<this.$.types.length;d++)a(this.$.types[d])}else a("Text"),
a("URL");c=this._getImageFromClipboard();if(this.$&&this.$.files||c){this._.files=[];if(this.$.files&&this.$.files.length)for(d=0;d<this.$.files.length;d++)this._.files.push(this.$.files[d]);0===this._.files.length&&c&&this._.files.push(c)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length?
this.$.files[a]:0===a?this._getImageFromClipboard():void 0},isEmpty:function(){var a={},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"!=h&&(a[h]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},_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){if(a&&a.length){a=a.replace(this._.metaRegExp,"");var b=this._.bodyRegExp.exec(a);b&&b.length&&(a=b[1],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(d){}}else return!1;return!a._isCustomMimeTypeSupported},
getData:function(a,b){var d=this._getData(this._customDataFallbackType,!0);if(b)return d;var d=this._extractDataComment(d),c=null,c=a===this._customDataFallbackType?d.content:d.data&&d.data[a]?d.data[a]:this._getData(a,!0);return null!==c?c:""},setData:function(a,b){var d=a===this._customDataFallbackType;d&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var c=b,g=this._dataTransfer.$;try{g.setData(a,c),d&&(this._dataTransfer._.nativeHtmlCache=c)}catch(e){if(this._isUnsupportedMimeTypeError(e)){d=
CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(d._customTypes,a)&&d._customTypes.push(a);var d=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=c;try{c=this._applyDataComment(d,h),g.setData(this._customDataFallbackType,c),this._dataTransfer._.nativeHtmlCache=c}catch(k){c=""}}}return c},_getData:function(a,b){var d=this._dataTransfer._.data;if(!b&&d[a])return d[a];try{return this._dataTransfer.$.getData(a)}catch(c){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||{},d=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==d[a]?b[a]=d[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 d;(d=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&d[1]&&(b.data=JSON.parse(decodeURIComponent(d[1])),b.content=a.replace(d[0],""))}return b},_applyDataComment:function(a,b){var d="";b&&CKEDITOR.tools.object.keys(b).length&&(d="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return d+(a&&a.length?a:"")}}})();CKEDITOR.config.clipboard_notificationDuration=
1E4;CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function a(a){var c=this._;c.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(a),c.on?c.panel.hide():c.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(e){var c=e.panel||{};delete e.panel;this.base(e);this.document=c.parent&&c.parent.getDocument()||CKEDITOR.document;c.block={attributes:c.attributes};c.toolbarRelated=!0;
this.hasArrow="listbox";this.click=a;this._={panelDefinition:c}},statics:{handler:{create:function(a){return new CKEDITOR.ui.panelButton(a)}}},proto:{createPanel:function(a){var c=this._;if(!c.panel){var b=this._.panelDefinition,g=this._.panelDefinition.block,m=b.parent||CKEDITOR.document.getBody(),k=this._.panel=new CKEDITOR.ui.floatPanel(a,m,b),b=k.addBlock(c.id,g),l=this;k.onShow=function(){l.className&&this.element.addClass(l.className+"_panel");l.setState(CKEDITOR.TRISTATE_ON);c.on=1;l.editorFocus&&
a.focus();if(l.onOpen)l.onOpen()};k.onHide=function(b){l.className&&this.element.getFirst().removeClass(l.className+"_panel");l.setState(l.modes&&l.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);c.on=0;if(!b&&l.onClose)l.onClose()};k.onEscape=function(){k.hide(1);l.document.getById(c.id).focus()};if(this.onBlock)this.onBlock(k,b);b.onHide=function(){c.on=0;l.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(a){a.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,c){c&&CKEDITOR.tools.extend(this,c);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 a=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'),e=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'),c=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(b,g){var m={editorId:b.id,id:this.id,langCode:b.langCode,dir:b.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":b.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(c.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+b+");"},m)));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 k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";m.frame=e.output({id:this.id+"_frame",
src:k})}k=a.output(m);g&&g.push(k);return k},addBlock:function(a,c){c=this._.blocks[a]=c instanceof CKEDITOR.ui.panel.block?c:new CKEDITOR.ui.panel.block(this.getHolderElement(),c);this._.currentBlock||this.showBlock(a);return c},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var c=this._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");c&&c.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,c){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));c&&CKEDITOR.tools.extend(this,c);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 c=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},e=this._.getItems(),k,l,d=e.count()-1;0<=d;d--)if(k=e.getItem(d),k.getAscendant(c)||(l=k,this._.focusIndex=
d),"true"==k.getAttribute("aria-selected")){l=k;this._.focusIndex=d;break}l&&(a&&a(),CKEDITOR.env.webkit&&l.getDocument().getWindow().focus(),l.focus(),this.onMark&&this.onMark(l))},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,c){var e=this.keys[a];switch(e){case "next":for(var k=this._.focusIndex,e=this._.getItems(),
l;l=e.getItem(++k);)if(l.getAttribute("_cke_focus")&&l.$.offsetWidth){this._.focusIndex=k;l.focus(!0);break}return l||c?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":k=this._.focusIndex;for(e=this._.getItems();0<k&&(l=e.getItem(--k));){if(l.getAttribute("_cke_focus")&&l.$.offsetWidth){this._.focusIndex=k;l.focus(!0);break}l=null}return l||c?!1:(this._.focusIndex=e.count(),this.onKeyDown(a,1));case "click":case "mouseup":return k=this._.focusIndex,(l=0<=k&&this._.getItems().getItem(k))&&
l.fireEventHandler(e,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})})();CKEDITOR.plugins.add("floatpanel",{requires:"panel"});(function(){function a(a,b,g,m,k){k=CKEDITOR.tools.genKey(b.getUniqueId(),g.getUniqueId(),a.lang.dir,a.uiColor||"",m.css||"",k||"");var l=e[k];l||(l=e[k]=new CKEDITOR.ui.panel(b,m),l.element=g.append(CKEDITOR.dom.element.createFromHtml(l.render(a),b)),l.element.setStyles({display:"none",position:"absolute"}));return l}var e={};
CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(c,b,g,e){function k(){f.hide()}g.forceIFrame=1;g.toolbarRelated&&c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(b=CKEDITOR.document.getById("cke_"+c.name));var l=b.getDocument();e=a(c,l,b,g,e||0);var d=e.element,h=d.getFirst(),f=this;d.disableContextMenu();this.element=d;this._={editor:c,panel:e,parentElement:b,definition:g,document:l,iframe:h,children:[],dir:c.lang.dir,showBlockParams:null,markFirst:void 0!==g.markFirst?g.markFirst:!0};
c.on("mode",k);c.on("resize",k);l.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,b){return this._.panel.addBlock(a,b)},addListBlock:function(a,b){return this._.panel.addListBlock(a,b)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,b,g,e,k,l){var d=this._.panel,h=d.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var f=this._.editor.editable();this._.returnFocus=f.hasFocus?f:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);
this._.hideTimeout=0;var n=this.element,f=this._.iframe,f=CKEDITOR.env.ie&&!CKEDITOR.env.edge?f:new CKEDITOR.dom.window(f.$.contentWindow),p=n.getDocument(),v=this._.parentElement.getPositionedAncestor(),x=b.getDocumentPosition(p),p=v?v.getDocumentPosition(p):{x:0,y:0},q="rtl"==this._.dir,u=x.x+(e||0)-p.x,w=x.y+(k||0)-p.y;!q||1!=g&&4!=g?q||2!=g&&3!=g||(u+=b.$.offsetWidth-1):u+=b.$.offsetWidth;if(3==g||4==g)w+=b.$.offsetHeight-1;this._.panel._.offsetParentId=b.getId();n.setStyles({top:w+"px",left:0,
display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(f);this._.blurSet||(CKEDITOR.event.useCapture=!0,f.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),f.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},
this),CKEDITOR.env.iOS&&(f.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),f.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);d.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(h.autoSize){var b=h.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?
h.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=h.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");d._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");q&&(u-=n.$.offsetWidth);n.setStyle("left",u+"px");var b=d.element.getWindow(),a=n.$.getBoundingClientRect(),
b=b.getViewPaneSize(),c=a.width||a.right-a.left,f=a.height||a.bottom-a.top,g=q?a.right:b.width-a.left,e=q?b.width-a.right:a.left;q?g<c&&(u=e>c?u+c:b.width>c?u-a.left:u-a.right+b.width):g<c&&(u=e>c?u-c:b.width>c?u-a.right+b.width:u-a.left);c=a.top;b.height-a.top<f&&(w=c>f?w-f:b.height>f?w-a.bottom+b.height:w-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&&
(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:w+"px",left:u+"px"});n.setOpacity(1);l&&l()},this);d.isLoaded?a():d.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();h.element.focus();CKEDITOR.env.webkit&&
(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){h.markFirstDisplayed?h.markFirstDisplayed():h._.markFirstDisplayed()},0):h.markFirstDisplayed?h.markFirstDisplayed():h._.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 a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),
this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){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(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!==a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,g,e,k,l){if(this._.activeChild!=a||a._.panel._.offsetParentId!=g.getId())this.hideChild(),a.onHide=
CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,g,e,k,l),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),
b;for(b in e){var g=e[b];a?g.destroy():g.element.hide()}a&&(e={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function e(b,d,e,l,v){var x=new CKEDITOR.style(m["colorButton_"+d+"Style"]),q=CKEDITOR.tools.getNextId()+"_colorBox",u={type:d},w;v=v||{};a.ui.add(b,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+l,allowedContent:x,requiredContent:x,contentTransformations:v.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),
attributes:{role:"listbox","aria-label":k.panelTitle}},onBlock:function(b,g){w=g;g.autoSize=!0;g.element.addClass("cke_colorblock");g.element.setHtml(c(b,d,q,u));g.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=g.keys,h="rtl"==a.lang.dir;e[h?37:39]="next";e[40]="next";e[9]="next";e[h?39:37]="prev";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]="click"},refresh:function(){a.activeFilter.check(x)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var b=
a.getSelection(),c=b&&b.getStartElement(),e=a.elementPath(c);if(e){c=e.block||e.blockLimit||a.document.getBody();do e=c&&c.getComputedStyle("back"==d?"background-color":"color")||"transparent";while("back"==d&&"transparent"==e&&c&&(c=c.getParent()));e&&"transparent"!=e||(e="#ffffff");!1!==m.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(q).setStyle("background-color",e);if(c=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(c),h=c.collapsed?c.startContainer:b.next(),
c="";h;){h.type!==CKEDITOR.NODE_ELEMENT&&(h=h.getParent());h=g(h.getComputedStyle("back"==d?"background-color":"color"));c=c||h;if(c!==h){c="";break}h=b.next()}"transparent"==c&&(c="");"fore"==d&&(u.automaticTextColor="#"+g(e));u.selectionColor=c?"#"+c:"";b=c;c=w._.getItems();for(h=0;h<c.count();h++){var k=c.getItem(h);k.removeAttribute("aria-selected");b&&b==g(k.getAttribute("data-value"))&&k.setAttribute("aria-selected",!0)}}return e}}})}function c(d,c,g,e){d=[];var l=m.colorButton_colors.split(","),
x=m.colorButton_colorsPerRow||6,q=a.plugins.colordialog&&!1!==m.colorButton_enableMore,u=l.length+(q?2:1),w=CKEDITOR.tools.addFunction(function(d,c){function f(d){var g=m["colorButton_"+c+"Style"];a.removeStyle(new CKEDITOR.style(g,{color:"inherit"}));g.childRule="back"==c?function(a){return b(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||b(a)};a.focus();d&&a.applyStyle(new CKEDITOR.style(g,{color:d}));a.fire("saveSnapshot")}a.focus();a.fire("saveSnapshot");if("?"==d)a.getColorFromDialog(function(a){if(a)return f(a)},
null,e);else return f(d&&"#"+d)});!1!==m.colorButton_enableAutomatic&&d.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',k.auto,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',w,",null,'",c,"');return false;\" href\x3d\"javascript:void('",k.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',u,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+
x+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',g,'"\x3e\x3c/span\x3e',k.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");d.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(g=0;g<l.length;g++){0===g%x&&d.push("\x3c/tr\x3e\x3ctr\x3e");var t=l[g].split("/"),z=t[0],r=t[1]||z;d.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',t[1]?z:a.lang.colorbutton.colors[r]||r,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',
w,",'",r,"','",c,"'); return false;\" href\x3d\"javascript:void('",r,'\')" data-value\x3d"'+r+'" role\x3d"option" aria-posinset\x3d"',g+2,'" aria-setsize\x3d"',u,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',r,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}q&&d.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+x+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',k.more,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',
w,",'?','",c,"');return false;\" href\x3d\"javascript:void('",k.more,"')\"",' role\x3d"option" aria-posinset\x3d"',u,'" aria-setsize\x3d"',u,'"\x3e',k.more,"\x3c/a\x3e\x3c/td\x3e");d.push("\x3c/tr\x3e\x3c/table\x3e");return d.join("")}function b(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function g(a){return CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}var m=a.config,k=a.lang.colorbutton;if(!CKEDITOR.env.hc){e("TextColor",
"fore",k.textColorTitle,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 l={},d=a.config.colorButton_normalizeBackground;if(void 0===d||d)l.contentTransformations=[[{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 d=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=d.element;b.styles=d.styles;b.attributes=d.attributes||{};return b}}]];e("BGColor","back",k.bgColorTitle,20,l)}}});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.plugins.colordialog={requires:"dialog",init:function(a){var e=new CKEDITOR.dialogCommand("colordialog");e.editorFocus=!1;a.addCommand("colordialog",e);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(c,b,g){var e,k,l,d;e=function(a){l(this);a="ok"==a.name?
this.getValueOf("picker","selectedColor"):null;/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(a)&&(a="#"+a);c.call(b,a)};k=function(a){g&&(a.data=g)};l=function(a){a.removeListener("ok",e);a.removeListener("cancel",e);a.removeListener("show",k)};d=function(a){a.on("ok",e);a.on("cancel",e);a.on("show",k,null,null,5)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)d(a._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=
a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){d(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);(function(){function a(a,b,d,c){var f=new CKEDITOR.dom.walker(a);if(a=a.startContainer.getAscendant(b,!0)||a.endContainer.getAscendant(b,!0))if(d(a),c)return;for(;a=f.next();)if(a=a.getAscendant(b,!0))if(d(a),c)break}function e(a,c){var d={ul:"ol",ol:"ul"};return-1!==
b(c,function(b){return b.element===a||b.element===d[a]})}function c(a){this.styles=null;this.sticky=!1;this.editor=a;this.filter=new CKEDITOR.filter(a,a.config.copyFormatting_allowRules);!0===a.config.copyFormatting_allowRules&&(this.filter.disabled=!0);a.config.copyFormatting_disallowRules&&this.filter.disallow(a.config.copyFormatting_disallowRules)}var b=CKEDITOR.tools.indexOf,g=CKEDITOR.tools.getMouseButton,m=!1;CKEDITOR.plugins.add("copyformatting",{lang:"az,de,en,it,ja,nb,nl,oc,pl,pt-br,ru,sv,tr,zh,zh-cn",
icons:"copyformatting",hidpi:!0,init:function(a){var c=CKEDITOR.plugins.copyformatting;c._addScreenReaderContainer();m||(CKEDITOR.document.appendStyleSheet(this.path+"styles/copyformatting.css"),m=!0);a.addContentsCss&&a.addContentsCss(this.path+"styles/copyformatting.css");a.copyFormatting=new c.state(a);a.addCommand("copyFormatting",c.commands.copyFormatting);a.addCommand("applyFormatting",c.commands.applyFormatting);a.ui.addButton("CopyFormatting",{label:a.lang.copyformatting.label,command:"copyFormatting",
toolbar:"cleanup,0"});a.on("contentDom",function(){var b=a.getCommand("copyFormatting"),c=a.editable(),f=c.isInline()?c:a.document,e=a.ui.get("CopyFormatting");c.attachListener(f,"mouseup",function(c){g(c)===CKEDITOR.MOUSE_BUTTON_LEFT&&b.state===CKEDITOR.TRISTATE_ON&&a.execCommand("applyFormatting")});c.attachListener(CKEDITOR.document,"mouseup",function(f){g(f)!==CKEDITOR.MOUSE_BUTTON_LEFT||b.state!==CKEDITOR.TRISTATE_ON||c.contains(f.data.getTarget())||a.execCommand("copyFormatting")});e&&(f=CKEDITOR.document.getById(e._.id),
c.attachListener(f,"dblclick",function(){a.execCommand("copyFormatting",{sticky:!0})}),c.attachListener(f,"mouseup",function(a){a.data.stopPropagation()}))});a.config.copyFormatting_keystrokeCopy&&a.setKeystroke(a.config.copyFormatting_keystrokeCopy,"copyFormatting");a.on("key",function(b){var c=a.getCommand("copyFormatting");b=b.data.domEvent;b.getKeystroke&&27===b.getKeystroke()&&c.state===CKEDITOR.TRISTATE_ON&&a.execCommand("copyFormatting")});a.copyFormatting.on("extractFormatting",function(b){var g=
b.data.element;if(g.contains(a.editable())||g.equals(a.editable()))return b.cancel();g=c._convertElementToStyleDef(g);if(!a.copyFormatting.filter.check(new CKEDITOR.style(g),!0,!0))return b.cancel();b.data.styleDef=g});a.copyFormatting.on("applyFormatting",function(d){if(!d.data.preventFormatStripping){var g=d.data.range,f=c._extractStylesFromRange(a,g),m=c._determineContext(g),p,v;if(a.copyFormatting._isContextAllowed(m))for(v=0;v<f.length;v++)m=f[v],p=g.createBookmark(),-1===b(c.preservedElements,
m.element)?CKEDITOR.env.webkit&&!CKEDITOR.env.chrome?f[v].removeFromRange(d.data.range,d.editor):f[v].remove(d.editor):e(m.element,d.data.styles)&&c._removeStylesFromElementInRange(g,m.element),g.moveToBookmark(p)}});a.copyFormatting.on("applyFormatting",function(b){var c=CKEDITOR.plugins.copyformatting,f=c._determineContext(b.data.range);"list"===f&&a.copyFormatting._isContextAllowed("list")?c._applyStylesToListContext(b.editor,b.data.range,b.data.styles):"table"===f&&a.copyFormatting._isContextAllowed("table")?
c._applyStylesToTableContext(b.editor,b.data.range,b.data.styles):a.copyFormatting._isContextAllowed("text")&&c._applyStylesToTextContext(b.editor,b.data.range,b.data.styles)},null,null,999)}});c.prototype._isContextAllowed=function(a){var c=this.editor.config.copyFormatting_allowedContexts;return!0===c||-1!==b(c,a)};CKEDITOR.event.implementOn(c.prototype);CKEDITOR.plugins.copyformatting={state:c,inlineBoundary:"h1 h2 h3 h4 h5 h6 p div".split(" "),excludedAttributes:["id","style","href","data-cke-saved-href",
"dir"],elementsForInlineTransform:["li"],excludedElementsFromInlineTransform:["table","thead","tbody","ul","ol"],excludedAttributesFromInlineTransform:["value","type"],preservedElements:"ul ol li td th tr thead tbody table".split(" "),breakOnElements:["ul","ol","table"],_initialKeystrokePasteCommand:null,commands:{copyFormatting:{exec:function(a,b){var d=CKEDITOR.plugins.copyformatting,c=a.copyFormatting,f=b?"keystrokeHandler"==b.from:!1,g=b?b.sticky||f:!1,e=d._getCursorContainer(a),m=CKEDITOR.document.getDocumentElement();
if(this.state===CKEDITOR.TRISTATE_ON)return c.styles=null,c.sticky=!1,e.removeClass("cke_copyformatting_active"),m.removeClass("cke_copyformatting_disabled"),m.removeClass("cke_copyformatting_tableresize_cursor"),d._putScreenReaderMessage(a,"canceled"),d._detachPasteKeystrokeHandler(a),this.setState(CKEDITOR.TRISTATE_OFF);c.styles=d._extractStylesFromElement(a,a.elementPath().lastElement);this.setState(CKEDITOR.TRISTATE_ON);f||(e.addClass("cke_copyformatting_active"),m.addClass("cke_copyformatting_tableresize_cursor"),
a.config.copyFormatting_outerCursor&&m.addClass("cke_copyformatting_disabled"));c.sticky=g;d._putScreenReaderMessage(a,"copied");d._attachPasteKeystrokeHandler(a)}},applyFormatting:{editorFocus:CKEDITOR.env.ie&&!CKEDITOR.env.edge?!1:!0,exec:function(a,b){var d=a.getCommand("copyFormatting"),c=b?"keystrokeHandler"==b.from:!1,f=CKEDITOR.plugins.copyformatting,g=a.copyFormatting,e=f._getCursorContainer(a),m=CKEDITOR.document.getDocumentElement();if(c&&!g.styles)return f._putScreenReaderMessage(a,"failed"),
f._detachPasteKeystrokeHandler(a),!1;c=f._applyFormat(a,g.styles);g.sticky||(g.styles=null,e.removeClass("cke_copyformatting_active"),m.removeClass("cke_copyformatting_disabled"),m.removeClass("cke_copyformatting_tableresize_cursor"),d.setState(CKEDITOR.TRISTATE_OFF),f._detachPasteKeystrokeHandler(a));f._putScreenReaderMessage(a,c?"applied":"canceled")}}},_getCursorContainer:function(a){return a.elementMode===CKEDITOR.ELEMENT_MODE_INLINE?a.editable():a.editable().getParent()},_convertElementToStyleDef:function(a){var b=
CKEDITOR.tools,d=a.getAttributes(CKEDITOR.plugins.copyformatting.excludedAttributes),b=b.parseCssText(a.getAttribute("style"),!0,!0);return{element:a.getName(),type:CKEDITOR.STYLE_INLINE,attributes:d,styles:b}},_extractStylesFromElement:function(a,c){var d={},g=[];do if(c.type===CKEDITOR.NODE_ELEMENT&&!c.hasAttribute("data-cke-bookmark")&&(d.element=c,a.copyFormatting.fire("extractFormatting",d,a)&&d.styleDef&&g.push(new CKEDITOR.style(d.styleDef)),c.getName&&-1!==b(CKEDITOR.plugins.copyformatting.breakOnElements,
c.getName())))break;while((c=c.getParent())&&c.type===CKEDITOR.NODE_ELEMENT);return g},_extractStylesFromRange:function(a,b){for(var d=[],c=new CKEDITOR.dom.walker(b),f;f=c.next();)d=d.concat(CKEDITOR.plugins.copyformatting._extractStylesFromElement(a,f));return d},_removeStylesFromElementInRange:function(a,c){for(var d=-1!==b(["ol","ul","table"],c),g=new CKEDITOR.dom.walker(a),f;f=g.next();)if(f=f.getAscendant(c,!0))if(f.removeAttributes(f.getAttributes()),d)break},_getSelectedWordOffset:function(a){function c(a,
b){return a[b?"getPrevious":"getNext"](function(a){return a.type!==CKEDITOR.NODE_COMMENT})}function d(a){return a.type==CKEDITOR.NODE_ELEMENT?(a=a.getHtml().replace(/<span.*?>&nbsp;<\/span>/g,""),a.replace(/<.*?>/g,"")):a.getText()}function g(a,f){var e=a,k=/\s/g,m="p br ol ul li td th div caption body".split(" "),n=!1,p=!1,C,B;do{for(C=c(e,f);!C&&e.getParent();){e=e.getParent();if(-1!==b(m,e.getName())){p=n=!0;break}C=c(e,f)}if(C&&C.getName&&-1!==b(m,C.getName())){n=!0;break}e=C}while(e&&e.getStyle&&
("none"==e.getStyle("display")||!e.getText()));for(e||(e=a);e.type!==CKEDITOR.NODE_TEXT;)e=!n||f||p?e.getChild(0):e.getChild(e.getChildCount()-1);for(m=d(e);null!=(p=k.exec(m))&&(B=p.index,f););if("number"!==typeof B&&!n)return g(e,f);if(n)f?B=0:(k=/([\.\b]*$)/,B=(p=k.exec(m))?p.index:m.length);else if(f&&(B+=1,B>m.length))return g(e);return{node:e,offset:B}}var f=/\b\w+\b/ig,e,m,v,x,q;v=x=q=a.startContainer;for(e=d(v);null!=(m=f.exec(e));)if(m.index+m[0].length>=a.startOffset)return a=m.index,f=
m.index+m[0].length,0===m.index&&(m=g(v,!0),x=m.node,a=m.offset),f>=e.length&&(e=g(v),q=e.node,f=e.offset),{startNode:x,startOffset:a,endNode:q,endOffset:f};return null},_filterStyles:function(a){var b=CKEDITOR.tools.isEmpty,d=[],c,f;for(f=0;f<a.length;f++)c=a[f]._.definition,-1!==CKEDITOR.tools.indexOf(CKEDITOR.plugins.copyformatting.inlineBoundary,c.element)&&(c.element=a[f].element="span"),"span"===c.element&&b(c.attributes)&&b(c.styles)||d.push(a[f]);return d},_determineContext:function(a){function b(d){var c=
new CKEDITOR.dom.walker(a),f;if(a.startContainer.getAscendant(d,!0)||a.endContainer.getAscendant(d,!0))return!0;for(;f=c.next();)if(f.getAscendant(d,!0))return!0}return b({ul:1,ol:1})?"list":b("table")?"table":"text"},_applyStylesToTextContext:function(a,c,d){var g=CKEDITOR.plugins.copyformatting,f=g.excludedAttributesFromInlineTransform,e,m;CKEDITOR.env.webkit&&!CKEDITOR.env.chrome&&a.getSelection().selectRanges([c]);for(e=0;e<d.length;e++)if(c=d[e],-1===b(g.excludedElementsFromInlineTransform,c.element)){if(-1!==
b(g.elementsForInlineTransform,c.element))for(c.element=c._.definition.element="span",m=0;m<f.length;m++)c._.definition.attributes[f[m]]&&delete c._.definition.attributes[f[m]];c.apply(a)}},_applyStylesToListContext:function(b,c,d){var g,f,e;for(e=0;e<d.length;e++)g=d[e],f=c.createBookmark(),"ol"===g.element||"ul"===g.element?a(c,{ul:1,ol:1},function(a){var b=g;a.getName()!==b.element&&a.renameNode(b.element);b.applyToObject(a)},!0):"li"===g.element?a(c,"li",function(a){g.applyToObject(a)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(b,
c,[g]),c.moveToBookmark(f)},_applyStylesToTableContext:function(c,g,d){function e(a,b){a.getName()!==b.element&&(b=b.getDefinition(),b.element=a.getName(),b=new CKEDITOR.style(b));b.applyToObject(a)}var f,m,p;for(p=0;p<d.length;p++)f=d[p],m=g.createBookmark(),-1!==b(["table","tr"],f.element)?a(g,f.element,function(a){f.applyToObject(a)}):-1!==b(["td","th"],f.element)?a(g,{td:1,th:1},function(a){e(a,f)}):-1!==b(["thead","tbody"],f.element)?a(g,{thead:1,tbody:1},function(a){e(a,f)}):CKEDITOR.plugins.copyformatting._applyStylesToTextContext(c,
g,[f]),g.moveToBookmark(m)},_applyFormat:function(a,b){var d=a.getSelection().getRanges()[0],c=CKEDITOR.plugins.copyformatting,f,g;if(!d)return!1;if(d.collapsed){g=a.getSelection().createBookmarks();if(!(f=c._getSelectedWordOffset(d)))return;d=a.createRange();d.setStart(f.startNode,f.startOffset);d.setEnd(f.endNode,f.endOffset);d.select()}b=c._filterStyles(b);if(!a.copyFormatting.fire("applyFormatting",{styles:b,range:d,preventFormatStripping:!1},a))return!1;g&&a.getSelection().selectBookmarks(g);
return!0},_putScreenReaderMessage:function(a,b){var d=this._getScreenReaderContainer();d&&d.setText(a.lang.copyformatting.notification[b])},_addScreenReaderContainer:function(){if(this._getScreenReaderContainer())return this._getScreenReaderContainer();if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_screen_reader_only cke_copyformatting_notification"\x3e\x3cdiv aria-live\x3d"polite"\x3e\x3c/div\x3e\x3c/div\x3e')).getChild(0)},
_getScreenReaderContainer:function(){if(!CKEDITOR.env.ie6Compat&&!CKEDITOR.env.ie7Compat)return CKEDITOR.document.getBody().findOne(".cke_copyformatting_notification div[aria-live]")},_attachPasteKeystrokeHandler:function(a){var b=a.config.copyFormatting_keystrokePaste;b&&(this._initialKeystrokePasteCommand=a.keystrokeHandler.keystrokes[b],a.setKeystroke(b,"applyFormatting"))},_detachPasteKeystrokeHandler:function(a){var b=a.config.copyFormatting_keystrokePaste;b&&a.setKeystroke(b,this._initialKeystrokePasteCommand||
!1)}};CKEDITOR.config.copyFormatting_outerCursor=!0;CKEDITOR.config.copyFormatting_allowRules="b s u i em strong span p div td th ol ul li(*)[*]{*}";CKEDITOR.config.copyFormatting_disallowRules="*[data-cke-widget*,data-widget*,data-cke-realelement](cke_widget*)";CKEDITOR.config.copyFormatting_allowedContexts=!0;CKEDITOR.config.copyFormatting_keystrokeCopy=CKEDITOR.CTRL+CKEDITOR.SHIFT+67;CKEDITOR.config.copyFormatting_keystrokePaste=CKEDITOR.CTRL+CKEDITOR.SHIFT+86})();CKEDITOR.plugins.add("menu",{requires:"floatpanel",
beforeInit:function(a){for(var e=a.config.menu_groups.split(","),c=a._.menuGroups={},b=a._.menuItems={},g=0;g<e.length;g++)c[e[g]]=g+1;a.addMenuGroup=function(a,b){c[a]=b||100};a.addMenuItem=function(a,g){c[g.group]&&(b[a]=new CKEDITOR.menuItem(this,a,g))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};a.getMenuItem=function(a){return b[a]};a.removeMenuItem=function(a){delete b[a]}}});(function(){function a(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 e='\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"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"',c="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');
CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(c='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var e=e+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+c+'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',
b=CKEDITOR.addTemplate("menuItem",e),g=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var d=CKEDITOR.tools.extend({},
b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),c=d.block.attributes=d.attributes||{};!c.role&&(c.role="menu");this._.panelDefinition=d},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),d=this.editor.elementPath(),c=this._.listeners;this.removeAll();for(var f=0;f<c.length;f++){var g=c[f](b,a,d);if(g)for(var e in g){var m=this.editor.getMenuItem(e);!m||m.command&&!this.editor.getCommand(m.command).state||(m.state=g[e],this.add(m))}}},onClick:function(a){this.hide();
if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):27==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,d=this.items[a];if(d=d.getItems&&d.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,
this));for(var c in d){var f=this.editor.getMenuItem(c);f&&(f.state=d[c],b.add(f))}var g=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(a));setTimeout(function(){b.show(g,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,c,d,g){if(!this.parent&&(this._.onShow(),!this.items.length))return;c=c||("rtl"==this.editor.lang.dir?2:1);var f=this.items,e=this.editor,
m=this._.panel,v=this._.element;if(!m){m=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);m.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);m.onShow=function(){m._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};m.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);v=m.addBlock(this.id,this._.panelDefinition.block);v.autoSize=!0;var x=v.keys;
x[40]="next";x[9]="next";x[38]="prev";x[CKEDITOR.SHIFT+9]="prev";x["rtl"==e.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";x[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(x[13]="mouseup");v=this._.element=v.element;x=v.getDocument();x.getBody().setStyle("overflow","hidden");x.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,
e.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)}a(f);for(var x=e.elementPath(),x=['\x3cdiv class\x3d"cke_menu'+(x&&x.direction()!=e.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],
q=f.length,u=q&&f[0].group,w=0;w<q;w++){var t=f[w];u!=t.group&&(x.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),u=t.group);t.render(this,w,x)}x.push("\x3c/div\x3e");v.setHtml(x.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(m,this.id,b,c,d,g):m.showBlock(this.id,b,c,d,g);e.fire("menuShow",[m])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)},
findItemByCommandName:function(a){var b=CKEDITOR.tools.array.filter(this.items,function(b){return a===b.command});return b.length?(b=b[0],{item:b,element:this._.element.findOne("."+b.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,d){CKEDITOR.tools.extend(this,d,{order:0,className:"cke_menubutton__"+b});this.group=a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,c,d){var e=a.id+String(c),f="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:
this.state,n="",p=this.editor,v,x,q=f==CKEDITOR.TRISTATE_ON?"on":f==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(n=' aria-checked\x3d"'+(f==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var u=this.getItems,w="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",t=this.name;this.icon&&!/\./.test(this.icon)&&(t=this.icon);this.command&&(v=p.getCommand(this.command),(v=p.getCommandKeystroke(v))&&(x=CKEDITOR.tools.keystrokeToString(p.lang.common.keyboard,
v)));a={id:e,name:this.name,iconName:t,label:this.label,cls:this.className||"",state:q,hasPopup:u?"true":"false",disabled:f==CKEDITOR.TRISTATE_DISABLED,title:this.label+(x?" ("+x.display+")":""),ariaShortcut:x?p.lang.common.keyboardShortcut+" "+x.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,clickFn:a._.itemClickFn,index:c,iconStyle:CKEDITOR.skin.getIconStyle(t,"rtl"==this.editor.lang.dir,t==this.icon?null:this.icon,this.iconOffset),
shortcutHtml:x?m.output({shortcut:x.display}):"",arrowHtml:u?g.output({label:w}):"",role:this.role?this.role:"menuitem",ariaChecked:n};b.output(a,d)}}})})();CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div";CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,
$:function(a){this.base.call(this,a,{panel:{css:a.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,e){function c(){g=!1}var b,g;a.on("contextmenu",function(a){a=a.data;var c=CKEDITOR.env.webkit?b:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!e||!c)if(a.preventDefault(),!g){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var c=this.editor,d=(new CKEDITOR.dom.elementPath(a.getTarget(),c.editable())).contains(function(a){return a.hasAttribute("contenteditable")},
!0);d&&"false"==d.getAttribute("contenteditable")&&c.getSelection().fake(d)}var d=a.getTarget().getDocument(),h=a.getTarget().getDocument().getDocumentElement(),c=!d.equals(CKEDITOR.document),d=d.getWindow().getScrollPosition(),f=c?a.$.clientX:a.$.pageX||d.x+a.$.clientX,m=c?a.$.clientY:a.$.pageY||d.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(h,null,f,m)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var m=function(){b=0};a.on("keydown",function(a){b=CKEDITOR.env.mac?
a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",m);a.on("contextmenu",m)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(a.on("keydown",function(a){a.data.$.shiftKey&&121===a.data.$.keyCode&&(g=!0)},null,null,0),a.on("keyup",c),a.on("contextmenu",c))},open:function(a,e,c,b){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),a=a||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(a,e,c,b))}}})},beforeInit:function(a){var e=
a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){e.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});a.addCommand("contextMenu",{exec:function(a){var b=0,g=0,e=a.getSelection().getRanges(),e=e[e.length-1].getClientRects(a.editable().isInline());if(e=e[e.length-1])b=e["rtl"===a.lang.dir?"left":"right"],g=e.bottom;a.contextMenu.open(a.document.getBody().getParent(),null,b,g)}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+
CKEDITOR.SHIFT+121,"contextMenu")}});(function(){function a(a){var c=this.att;a=a&&a.hasAttribute(c)&&a.getAttribute(c)||"";void 0!==a&&this.setValue(a)}function e(){for(var a,c=0;c<arguments.length;c++)if(arguments[c]instanceof CKEDITOR.dom.element){a=arguments[c];break}if(a){var c=this.att,e=this.getValue();e?a.setAttribute(c,e):a.removeAttribute(c,e)}}var c={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(a){a||(a=c);var g=[];a.id&&
g.push("id");a.dir&&g.push("dir");var e="";g.length&&(e+="["+g.join(",")+"]");a.classes&&(e+="(*)");a.styles&&(e+="{*}");return e},createAdvancedTab:function(b,g,m){g||(g=c);var k=b.lang.common,l={id:"advanced",label:k.advancedTab,title:k.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},d=[];if(g.id||g.dir)g.id&&d.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:k.id,setup:a,commit:e}),g.dir&&d.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+
"[dir]":null,label:k.langDir,"default":"",style:"width:100%",items:[[k.notSet,""],[k.langDirLTR,"ltr"],[k.langDirRTL,"rtl"]],setup:a,commit:e}),l.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(d)});if(g.styles||g.classes)d=[],g.styles&&d.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:k.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(k.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(a,d){var c=this.getValue(),g=b.document.createElement("span");g.setAttribute("style",c);g.setStyle(a,d);c=CKEDITOR.tools.normalizeCssText(g.getAttribute("style"));this.setValue(c,1)},setup:a,commit:e}),g.classes&&d.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:k.cssClasses,"default":"",setup:a,commit:e}]}),l.elements[0].children.push({type:"hbox",
widths:["50%","50%"],children:[].concat(d)});return l}})})();(function(){CKEDITOR.plugins.add("div",{requires:"dialog",init:function(a){if(!a.blockless){var e=a.lang.div,c="div(*)";CKEDITOR.dialog.isTabEnabled(a,"editdiv","advanced")&&(c+=";div[dir,id,lang,title]{*}");a.addCommand("creatediv",new CKEDITOR.dialogCommand("creatediv",{allowedContent:c,requiredContent:"div",contextSensitive:!0,contentTransformations:[["div: alignmentToStyle"]],refresh:function(a,c){this.setState("div"in(a.config.div_wrapTable?
c.root:c.blockLimit).getDtd()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}}));a.addCommand("editdiv",new CKEDITOR.dialogCommand("editdiv",{requiredContent:"div"}));a.addCommand("removediv",{requiredContent:"div",exec:function(a){function c(d){(d=CKEDITOR.plugins.div.getSurroundDiv(a,d))&&!d.data("cke-div-added")&&(h.push(d),d.data("cke-div-added"))}for(var e=a.getSelection(),k=e&&e.getRanges(),l,d=e.createBookmarks(),h=[],f=0;f<k.length;f++)l=k[f],l.collapsed?c(e.getStartElement()):(l=new CKEDITOR.dom.walker(l),
l.evaluator=c,l.lastForward());for(f=0;f<h.length;f++)h[f].remove(!0);e.selectBookmarks(d)}});a.ui.addButton&&a.ui.addButton("CreateDiv",{label:e.toolbar,command:"creatediv",toolbar:"blocks,50"});a.addMenuItems&&(a.addMenuItems({editdiv:{label:e.edit,command:"editdiv",group:"div",order:1},removediv:{label:e.remove,command:"removediv",group:"div",order:5}}),a.contextMenu&&a.contextMenu.addListener(function(b){return!b||b.isReadOnly()?null:CKEDITOR.plugins.div.getSurroundDiv(a)?{editdiv:CKEDITOR.TRISTATE_OFF,
removediv:CKEDITOR.TRISTATE_OFF}:null}));CKEDITOR.dialog.add("creatediv",this.path+"dialogs/div.js");CKEDITOR.dialog.add("editdiv",this.path+"dialogs/div.js")}}});CKEDITOR.plugins.div={getSurroundDiv:function(a,e){var c=a.elementPath(e);return a.elementPath(c.blockLimit).contains(function(a){return a.is("div")&&!a.isReadOnly()},1)}}})();(function(){function a(a,c){function k(b){b=f.list[b];var d;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(d=a.createRange(),d.selectNodeContents(b),
d=d.select()):(d=a.getSelection(),d.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:d,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function l(){h&&h.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete f.list}var d=a.ui.spaceId("path"),h,f=a._.elementsPath,n=f.idBase;c.html+='\x3cspan id\x3d"'+d+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+d+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+
d+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});f.onClick=k;var p=CKEDITOR.tools.addFunction(k),v=CKEDITOR.tools.addFunction(function(b,d){var c=f.idBase,e;d=new CKEDITOR.dom.event(d);e="rtl"==a.lang.dir;switch(d.getKeystroke()){case e?39:37:case 9:return(e=CKEDITOR.document.getById(c+(b+1)))||(e=CKEDITOR.document.getById(c+"0")),e.focus(),!1;case e?37:39:case CKEDITOR.SHIFT+9:return(e=
CKEDITOR.document.getById(c+(b-1)))||(e=CKEDITOR.document.getById(c+(f.list.length-1))),e.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return k(b),!1}return!0});a.on("selectionChange",function(c){for(var e=[],k=f.list=[],l=[],m=f.filters,z=!0,r=c.data.path.elements,y=r.length;y--;){var A=r[y],C=0;c=A.data("cke-display-name")?A.data("cke-display-name"):A.data("cke-real-element-type")?A.data("cke-real-element-type"):A.getName();(z=A.hasAttribute("contenteditable")?"true"==A.getAttribute("contenteditable"):
z)||A.hasAttribute("contenteditable")||(C=1);for(var B=0;B<m.length;B++){var F=m[B](A,c);if(!1===F){C=1;break}c=F||c}C||(k.unshift(A),l.unshift(c))}k=k.length;for(m=0;m<k;m++)c=l[m],z=a.lang.elementspath.eleTitle.replace(/%1/,c),c=b.output({id:n+m,label:z,text:c,jsTitle:"javascript:void('"+c+"')",index:m,keyDownFn:v,clickFn:p}),e.unshift(c);h||(h=CKEDITOR.document.getById(d));l=h;l.setHtml(e.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:l})});
a.on("readOnly",l);a.on("contentDomUnload",l);a.addCommand("elementsPathFocus",e.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var e={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},c="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var b=CKEDITOR.addTemplate("pathItem",
'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+c+' hidefocus\x3d"true"  draggable\x3d"false"  ondragstart\x3d"return false;" onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e');CKEDITOR.plugins.add("elementspath",{init:function(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+
"_",filters:[]};b.on("uiSpace",function(c){"bottom"==c.data.space&&a(b,c.data)})}})})();(function(){function a(a,b,d){d=a.config.forceEnterMode||d;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var c=a.elementPath();c&&!c.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,d=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?k(a,b,null,d):l(a,b,null,d);a.fire("saveSnapshot")}}function e(a){a=a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function c(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(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var b=CKEDITOR.dom.walker.whitespaces(),g=
CKEDITOR.dom.walker.bookmark(),m,k,l,d;CKEDITOR.plugins.enterkey={enterBlock:function(a,f,l,m){function v(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],w.lastElement.getName())||1!==w.lastElement.getChildCount())return!1;a=w.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(l=l||e(a)){l=c(l);var x=l.document,q=l.checkStartOfBlock(),u=l.checkEndOfBlock(),w=a.elementPath(l.startContainer),t=w.block,z=f==CKEDITOR.ENTER_DIV?
"div":"p",r;if(t&&q&&u){q=t.getParent();if(q.is("li")&&1<q.getChildCount()){x=new CKEDITOR.dom.element("li");r=a.createRange();x.insertAfter(q);t.remove();r.setStart(x,0);a.getSelection().selectRanges([r]);return}if(t.is("li")||t.getParent().is("li")){t.is("li")||(t=t.getParent(),q=t.getParent());r=q.getParent();l=!t.hasPrevious();var y=!t.hasNext();m=a.getSelection();var z=m.createBookmarks(),A=t.getDirection(1),u=t.getAttribute("class"),C=t.getAttribute("style"),B=r.getDirection(1)!=A;a=a.enterMode!=
CKEDITOR.ENTER_BR||B||C||u;if(r.is("li"))l||y?(l&&y&&q.remove(),t[y?"insertAfter":"insertBefore"](r)):t.breakParent(r);else{if(a)if(w.block.is("li")?(r=x.createElement(f==CKEDITOR.ENTER_P?"p":"div"),B&&r.setAttribute("dir",A),C&&r.setAttribute("style",C),u&&r.setAttribute("class",u),t.moveChildren(r)):r=w.block,l||y)r[l?"insertBefore":"insertAfter"](q);else t.breakParent(q),r.insertAfter(q);else if(t.appendBogus(!0),l||y)for(;x=t[l?"getFirst":"getLast"]();)x[l?"insertBefore":"insertAfter"](q);else for(t.breakParent(q);x=
t.getLast();)x.insertAfter(q);t.remove()}m.selectBookmarks(z);return}if(t&&t.getParent().is("blockquote")){t.breakParent(t.getParent());t.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||t.getPrevious().remove();t.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||t.getNext().remove();l.moveToElementEditStart(t);l.select();return}}else if(t&&t.is("pre")&&!u){k(a,f,l,m);return}if(C=l.splitBlock(z)){a=C.previousBlock;t=C.nextBlock;q=C.wasStartOfBlock;u=C.wasEndOfBlock;t?(y=t.getParent(),
y.is("li")&&(t.breakParent(y),t.move(t.getNext(),1))):a&&(y=a.getParent())&&y.is("li")&&(a.breakParent(y),y=a.getNext(),l.moveToElementEditStart(y),a.move(a.getPrevious()));if(q||u)if(v(f))l.moveToElementEditStart(l.getTouchedStartNode());else{if(a){if(a.is("li")||!d.test(a.getName())&&!a.is("pre"))r=a.clone()}else t&&(r=t.clone());r?m&&!r.is("li")&&r.renameNode(z):y&&y.is("li")?r=y:(r=x.createElement(z),a&&(A=a.getDirection())&&r.setAttribute("dir",A));if(x=C.elementPath)for(f=0,m=x.elements.length;f<
m;f++){z=x.elements[f];if(z.equals(x.block)||z.equals(x.blockLimit))break;CKEDITOR.dtd.$removeEmpty[z.getName()]&&(z=z.clone(),r.moveChildren(z),r.append(z))}r.appendBogus();r.getParent()||l.insertNode(r);r.is("li")&&r.removeAttribute("value");!CKEDITOR.env.ie||!q||u&&a.getChildCount()||(l.moveToElementEditStart(u?a:r),l.select());l.moveToElementEditStart(q&&!u?t:r)}else t.is("li")&&(r=l.clone(),r.selectNodeContents(t),r=new CKEDITOR.dom.walker(r),r.evaluator=function(a){return!(g(a)||b(a)||a.type==
CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(y=r.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?x.createElement("br"):x.createText(" ")).insertBefore(y)),t&&l.moveToElementEditStart(t);l.select();l.scrollIntoView()}}},enterBr:function(a,b,c,g){if(c=c||e(a)){var k=c.document,m=c.checkEndOfBlock(),q=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),u=q.block,w=u&&q.block.getName();g||"li"!=w?(!g&&
m&&d.test(w)?(m=u.getDirection())?(k=k.createElement("div"),k.setAttribute("dir",m),k.insertAfter(u),c.setStart(k,0)):(k.createElement("br").insertAfter(u),CKEDITOR.env.gecko&&k.createText("").insertAfter(u),c.setStartAt(u.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==w&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?k.createText("\r"):k.createElement("br"),c.deleteContents(),c.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("﻿").insertAfter(a),
m&&(u||q.blockLimit).appendBogus(),a.getNext().$.nodeValue="",c.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):l(a,b,c,g)}}};m=CKEDITOR.plugins.enterkey;k=m.enterBr;l=m.enterBlock;d=/^h[1-6]$/})();(function(){function a(a,c){var b={},g=[],m={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,d){var e=c?"\x26"+d+";":m[d];
b[e]=c?m[d]:"\x26"+d+";";g.push(e);return""});a=a.replace(/,$/,"");if(!c&&a){a=a.split(",");var k=document.createElement("div"),l;k.innerHTML="\x26"+a.join(";\x26")+";";l=k.innerHTML;k=null;for(k=0;k<l.length;k++){var d=l.charAt(k);b[d]="\x26"+a[k]+";";g.push(d)}}b.regex=g.join(c?"|":"");return b}CKEDITOR.plugins.add("entities",{afterInit:function(e){function c(a){return d[a]}function b(a){return"force"!=g.entities_processNumerical&&k[a]?k[a]:"\x26#"+a.charCodeAt(0)+";"}var g=e.config;if(e=(e=e.dataProcessor)&&
e.htmlFilter){var m=[];!1!==g.basicEntities&&m.push("nbsp,gt,lt,amp");g.entities&&(m.length&&m.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
g.entities_latin&&m.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),g.entities_greek&&m.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),
g.entities_additional&&m.push(g.entities_additional));var k=a(m.join(",")),l=k.regex?"["+k.regex+"]":"a^";delete k.regex;g.entities&&g.entities_processNumerical&&(l="[^ -~]|"+l);var l=new RegExp(l,"g"),d=a("nbsp,gt,lt,amp,shy",!0),h=new RegExp(d.regex,"g");e.addRules({text:function(a){return a.replace(h,c).replace(l,b)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0;
CKEDITOR.config.entities_additional="#39";CKEDITOR.plugins.add("popup");CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{popup:function(a,e,c,b){e=e||"80%";c=c||"70%";"string"==typeof e&&1<e.length&&"%"==e.substr(e.length-1,1)&&(e=parseInt(window.screen.width*parseInt(e,10)/100,10));"string"==typeof c&&1<c.length&&"%"==c.substr(c.length-1,1)&&(c=parseInt(window.screen.height*parseInt(c,10)/100,10));640>e&&(e=640);420>c&&(c=420);var g=parseInt((window.screen.height-c)/2,10),m=parseInt((window.screen.width-
e)/2,10);b=(b||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+e+",height\x3d"+c+",top\x3d"+g+",left\x3d"+m;var k=window.open("",null,b,!0);if(!k)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(k.moveTo(m,g),k.resizeTo(e,c)),k.focus(),k.location.href=a}catch(l){window.open(a,null,b,!0)}return!0}});"use strict";(function(){function a(a){this.editor=a;this.loaders=
[]}function e(a,b,e){var l=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof b?(this.data=b,this.file=c(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=b,this.total=this.file.size,this.loaded=0);e?this.fileName=e:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),l&&(a[0]=l),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}
function c(a){var c=a.match(b)[1];a=a.replace(b,"");a=atob(a);var e=[],l,d,h,f;for(l=0;l<a.length;l+=512){d=a.slice(l,l+512);h=Array(d.length);for(f=0;f<d.length;f++)h[f]=d.charCodeAt(f);d=new Uint8Array(h);e.push(d)}return new Blob(e,{type:c})}CKEDITOR.plugins.add("filetools",{beforeInit:function(b){b.uploadRepository=new a(b);b.on("fileUploadRequest",function(a){var b=a.data.fileLoader;b.xhr.open("POST",b.uploadUrl,!0);a.data.requestData.upload={file:b.file,name:b.fileName}},null,null,5);b.on("fileUploadRequest",
function(a){var c=a.data.fileLoader,e=new FormData;a=a.data.requestData;var d=b.config.fileTools_requestHeaders,h,f;for(f in a){var n=a[f];"object"===typeof n&&n.file?e.append(f,n.file,n.name):e.append(f,n)}e.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(d)for(h in d)c.xhr.setRequestHeader(h,d[h]);c.xhr.send(e)},null,null,999);b.on("fileUploadResponse",function(a){var b=a.data.fileLoader,c=b.xhr,d=a.data;try{var e=JSON.parse(c.responseText);e.error&&e.error.message&&(d.message=e.error.message);
if(e.uploaded)for(var f in e)d[f]=e[f];else a.cancel()}catch(g){d.message=b.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:c.responseText}),a.cancel()}},null,null,999)}});a.prototype={create:function(a,b,c){c=c||e;var l=this.loaders.length;a=new c(this.editor,a,b);a.id=l;this.loaders[l]=a;this.fire("instanceCreated",a);return a},isFinished:function(){for(var a=0;a<this.loaders.length;++a)if(!this.loaders[a].isFinished())return!1;return!0}};e.prototype={loadAndUpload:function(a,
b){var c=this;this.once("loaded",function(e){e.cancel();c.once("update",function(a){a.cancel()},null,null,0);c.upload(a,b)},null,null,0);this.load()},load:function(){var a=this,b=this.reader=new FileReader;a.changeStatus("loading");this.abort=function(){a.reader.abort()};b.onabort=function(){a.changeStatus("abort")};b.onerror=function(){a.message=a.lang.filetools.loadError;a.changeStatus("error")};b.onprogress=function(b){a.loaded=b.loaded;a.update()};b.onload=function(){a.loaded=a.total;a.data=b.result;
a.changeStatus("loaded")};b.readAsDataURL(this.file)},upload:function(a,b){var c=b||{};a?(this.uploadUrl=a,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:c})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function a(){"error"!=c.status&&(c.message=c.lang.filetools.networkError,c.changeStatus("error"))}function b(){"abort"!=c.status&&
c.changeStatus("abort")}var c=this,e=this.xhr;c.abort=function(){e.abort();b()};e.onerror=a;e.onabort=b;e.upload?(e.upload.onprogress=function(a){a.lengthComputable&&(c.uploadTotal||(c.uploadTotal=a.total),c.uploaded=a.loaded,c.update())},e.upload.onerror=a,e.upload.onabort=b):(c.uploadTotal=c.total,c.update());e.onload=function(){c.update();if("abort"!=c.status)if(c.uploaded=c.uploadTotal,200>e.status||299<e.status)c.message=c.lang.filetools["httpError"+e.status],c.message||(c.message=c.lang.filetools.httpError.replace("%1",
e.status)),c.changeStatus("error");else{for(var a={fileLoader:c},b=["message","fileName","url"],f=c.editor.fire("fileUploadResponse",a),g=0;g<b.length;g++){var m=b[g];"string"===typeof a[m]&&(c[m]=a[m])}c.responseData=a;delete c.responseData.fileLoader;!1===f?c.changeStatus("error"):c.changeStatus("uploaded")}}},changeStatus:function(a){this.status=a;if("error"==a||"abort"==a||"loaded"==a||"uploaded"==a)this.abort=function(){};this.fire(a);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};
CKEDITOR.event.implementOn(a.prototype);CKEDITOR.event.implementOn(e.prototype);var b=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:a,fileLoader:e,getUploadUrl:function(a,b){var c=CKEDITOR.tools.capitalize;return b&&a[b+"UploadUrl"]?a[b+"UploadUrl"]:a.uploadUrl?a.uploadUrl:b&&a["filebrowser"+c(b,1)+"UploadUrl"]?a["filebrowser"+c(b,1)+"UploadUrl"]+"\x26responseType\x3djson":a.filebrowserUploadUrl?a.filebrowserUploadUrl+
"\x26responseType\x3djson":null},isTypeSupported:function(a,b){return!!a.type.match(b)},isFileUploadSupported:"function"===typeof FileReader&&"function"===typeof(new FileReader).readAsDataURL&&"function"===typeof FormData&&"function"===typeof(new FormData).append&&"function"===typeof XMLHttpRequest&&"function"===typeof Blob})})();(function(){function a(a,b){var d=[];if(b)for(var c in b)d.push(c+"\x3d"+encodeURIComponent(b[c]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+d.join("\x26")}
function e(b){return!b.match(/command=QuickUpload/)||b.match(/(\?|&)responseType=json/)?b:a(b,{responseType:"json"})}function c(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function b(){var b=this.getDialog(),d=b.getParentEditor();d._.filebrowserSe=this;var f=d.config["filebrowser"+c(b.getName())+"WindowWidth"]||d.config.filebrowserWindowWidth||"80%",b=d.config["filebrowser"+c(b.getName())+"WindowHeight"]||d.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=d.name;
e.CKEditorFuncNum=d._.filebrowserFn;e.langCode||(e.langCode=d.langCode);e=a(this.filebrowser.url,e);d.popup(e,f,b,d.config.filebrowserWindowFeatures||d.config.fileBrowserWindowFeatures)}function g(a){var b=new CKEDITOR.dom.element(a.$.form);b&&((a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a):(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken()))}function m(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=
this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function k(b,d,c){var f=c.params||{};f.CKEditor=b.name;f.CKEditorFuncNum=b._.filebrowserFn;f.langCode||(f.langCode=b.langCode);d.action=a(c.url,f);d.filebrowser=c}function l(a,h,v,x){if(x&&x.length)for(var q,u=x.length;u--;)if(q=x[u],"hbox"!=q.type&&"vbox"!=q.type&&"fieldset"!=q.type||l(a,h,v,q.children),q.filebrowser)if("string"==typeof q.filebrowser&&
(q.filebrowser={action:"fileButton"==q.type?"QuickUpload":"Browse",target:q.filebrowser}),"Browse"==q.filebrowser.action){var w=q.filebrowser.url;void 0===w&&(w=a.config["filebrowser"+c(h)+"BrowseUrl"],void 0===w&&(w=a.config.filebrowserBrowseUrl));w&&(q.onClick=b,q.filebrowser.url=w,q.hidden=!1)}else if("QuickUpload"==q.filebrowser.action&&q["for"]&&(w=q.filebrowser.url,void 0===w&&(w=a.config["filebrowser"+c(h)+"UploadUrl"],void 0===w&&(w=a.config.filebrowserUploadUrl)),w)){var t=q.onClick;q.onClick=
function(b){var c=b.sender,h=c.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement(),k=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(t&&!1===t.call(c,b))return!1;if(m.call(c,b)){if("form"!==a.config.filebrowserUploadMethod&&k)return b=a.uploadRepository.create(h.$.files[0]),b.on("uploaded",function(a){var b=a.sender.responseData;f.call(a.sender.editor,b.url,b.message)}),b.on("error",d.bind(this)),b.on("abort",d.bind(this)),b.loadAndUpload(e(w)),"xhr";g(h);
return!0}return!1};q.filebrowser.url=w;q.hidden=!1;k(a,v.getContents(q["for"][0]).get(q["for"][1]),q.filebrowser)}}function d(a){var b={};try{b=JSON.parse(a.sender.xhr.response)||{}}catch(d){}this.enable();alert(b.error?b.error.message:a.sender.message)}function h(a,b,d){if(-1!==d.indexOf(";")){d=d.split(";");for(var c=0;c<d.length;c++)if(h(a,b,d[c]))return!0;return!1}return(a=a.getContents(b).get(d).filebrowser)&&a.url}function f(a,b){var d=this._.filebrowserSe.getDialog(),c=this._.filebrowserSe["for"],
f=this._.filebrowserSe.filebrowser.onSelect;c&&d.getContentElement(c[0],c[1]).reset();if("function"!=typeof b||!1!==b.call(this._.filebrowserSe))if(!f||!1!==f.call(this._.filebrowserSe,a,b))if("string"==typeof b&&b&&alert(b),a&&(c=this._.filebrowserSe,d=c.getDialog(),c=c.filebrowser.target||null))if(c=c.split(":"),f=d.getContentElement(c[0],c[1]))f.setValue(a),d.selectPage(c[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(a){a._.filebrowserFn=CKEDITOR.tools.addFunction(f,
a);a.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,d,c=0;c<b.contents.length;++c)if(d=b.contents[c])l(a.editor,a.data.name,b,d.elements),d.hidden&&d.filebrowser&&(d.hidden=!h(b,d.id,d.filebrowser))})})();CKEDITOR.plugins.add("find",{requires:"dialog",init:function(a){var e=a.addCommand("find",new CKEDITOR.dialogCommand("find")),c=a.addCommand("replace",new CKEDITOR.dialogCommand("find",
{tabId:"replace"}));e.canUndo=!1;e.readOnly=1;c.canUndo=!1;a.ui.addButton&&(a.ui.addButton("Find",{label:a.lang.find.find,command:"find",toolbar:"find,10"}),a.ui.addButton("Replace",{label:a.lang.find.replace,command:"replace",toolbar:"find,20"}));CKEDITOR.dialog.add("find",this.path+"dialogs/find.js")}});CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}};(function(){function a(a,c){var e=b.exec(a),d=b.exec(c);if(e){if(!e[2]&&"px"==d[2])return d[1];if("px"==
e[2]&&!d[2])return d[1]+"px"}return c}var e=CKEDITOR.htmlParser.cssStyle,c=CKEDITOR.tools.cssLength,b=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,g={elements:{$:function(b){var c=b.attributes;if((c=(c=(c=c&&c["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(c)))&&c.children[0])&&b.attributes["data-cke-resizable"]){var g=(new e(b)).rules;b=c.attributes;var d=g.width,g=g.height;d&&(b.width=a(b.width,d));g&&(b.height=a(b.height,g))}return c}}};CKEDITOR.plugins.add("fakeobjects",
{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(g,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,b,g,d){var h=this.lang.fakeobjects,h=h[g]||h.unknown;b={"class":b,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,alt:h,title:h,align:a.getAttribute("align")||""};CKEDITOR.env.hc||(b.src=CKEDITOR.tools.transparentImageData);
g&&(b["data-cke-real-element-type"]=g);d&&(b["data-cke-resizable"]=d,g=new e,d=a.getAttribute("width"),a=a.getAttribute("height"),d&&(g.rules.width=c(d)),a&&(g.rules.height=c(a)),g.populate(b));return this.document.createElement("img",{attributes:b})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,b,g,d){var h=this.lang.fakeobjects,h=h[g]||h.unknown,f;f=new CKEDITOR.htmlParser.basicWriter;a.writeHtml(f);f=f.getHtml();b={"class":b,"data-cke-realelement":encodeURIComponent(f),"data-cke-real-node-type":a.type,
alt:h,title:h,align:a.attributes.align||""};CKEDITOR.env.hc||(b.src=CKEDITOR.tools.transparentImageData);g&&(b["data-cke-real-element-type"]=g);d&&(b["data-cke-resizable"]=d,d=a.attributes,a=new e,g=d.width,d=d.height,void 0!==g&&(a.rules.width=c(g)),void 0!==d&&(a.rules.height=c(d)),a.populate(b));return new CKEDITOR.htmlParser.element("img",b)};CKEDITOR.editor.prototype.restoreRealElement=function(b){if(b.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var c=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(b.data("cke-realelement")),
this.document);if(b.data("cke-resizable")){var e=b.getStyle("width");b=b.getStyle("height");e&&c.setAttribute("width",a(c.getAttribute("width"),e));b&&c.setAttribute("height",a(c.getAttribute("height"),b))}return c}})();(function(){function a(a){a=a.attributes;return"application/x-shockwave-flash"==a.type||c.test(a.src||"")}function e(a,c){return a.createFakeParserElement(c,"cke_flash","flash",!0)}var c=/\.swf(?:$|\?)/i;CKEDITOR.plugins.add("flash",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_flash{background-image: url("+
CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},init:function(a){var c="object[classid,codebase,height,hspace,vspace,width];param[name,value];embed[height,hspace,pluginspage,src,type,vspace,width]";CKEDITOR.dialog.isTabEnabled(a,"flash","properties")&&(c+=";object[align]; embed[allowscriptaccess,quality,scale,wmode]");CKEDITOR.dialog.isTabEnabled(a,"flash","advanced")&&(c+=
";object[id]{*}; embed[bgcolor]{*}(*)");a.addCommand("flash",new CKEDITOR.dialogCommand("flash",{allowedContent:c,requiredContent:"embed"}));a.ui.addButton&&a.ui.addButton("Flash",{label:a.lang.common.flash,command:"flash",toolbar:"insert,20"});CKEDITOR.dialog.add("flash",this.path+"dialogs/flash.js");a.addMenuItems&&a.addMenuItems({flash:{label:a.lang.flash.properties,command:"flash",group:"flash"}});a.on("doubleclick",function(a){var b=a.data.element;b.is("img")&&"flash"==b.data("cke-real-element-type")&&
(a.data.dialog="flash")});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&!a.isReadOnly()&&"flash"==a.data("cke-real-element-type"))return{flash:CKEDITOR.TRISTATE_OFF}})},afterInit:function(b){var c=b.dataProcessor;(c=c&&c.dataFilter)&&c.addRules({elements:{"cke:object":function(c){var g=c.attributes;if(!(g.classid&&String(g.classid).toLowerCase()||a(c))){for(g=0;g<c.children.length;g++)if("cke:embed"==c.children[g].name){if(!a(c.children[g]))break;return e(b,c)}return null}return e(b,
c)},"cke:embed":function(c){return a(c)?e(b,c):null}}},5)}})})();CKEDITOR.tools.extend(CKEDITOR.config,{flashEmbedTagOnly:!1,flashAddEmbedTag:!0,flashConvertOnEdit:!1});(function(){function a(a){var g=a.config,m=a.fire("uiSpace",{space:"top",html:""}).html,k=function(){function f(a,b,e){d.setStyle(b,c(e));d.setStyle("position",a)}function h(a){var b=m.getDocumentPosition();switch(a){case "top":f("absolute","top",b.y-t-y);break;case "pin":f("fixed","top",C);break;case "bottom":f("absolute","top",b.y+
(u.height||u.bottom-u.top)+y)}l=a}var l,m,q,u,w,t,z,r=g.floatSpaceDockedOffsetX||0,y=g.floatSpaceDockedOffsetY||0,A=g.floatSpacePinnedOffsetX||0,C=g.floatSpacePinnedOffsetY||0;return function(f){if(m=a.editable()){var n=f&&"focus"==f.name;n&&d.show();a.fire("floatingSpaceLayout",{show:n});d.removeStyle("left");d.removeStyle("right");q=d.getClientRect();u=m.getClientRect();w=e.getViewPaneSize();t=q.height;z="pageXOffset"in e.$?e.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;l?(t+y<=
u.top?h("top"):t+y>w.height-u.bottom?h("pin"):h("bottom"),f=w.width/2,f=g.floatSpacePreferRight?"right":0<u.left&&u.right<w.width&&u.width>q.width?"rtl"==g.contentsLangDirection?"right":"left":f-u.left>u.right-f?"left":"right",q.width>w.width?(f="left",n=0):(n="left"==f?0<u.left?u.left:0:u.right<w.width?w.width-u.right:0,n+q.width>w.width&&(f="left"==f?"right":"left",n=0)),d.setStyle(f,c(("pin"==l?A:r)+n+("pin"==l?0:"left"==f?z:-z)))):(l="pin",h("pin"),k(f))}}}();if(m){var l=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+
CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(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':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),d=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(l.output({content:m,
id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(g.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),h=CKEDITOR.tools.eventsBuffer(500,k),f=CKEDITOR.tools.eventsBuffer(100,k);d.unselectable();d.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(d){k(d);a.on("change",h.input);e.on("scroll",f.input);e.on("resize",f.input)});a.on("blur",function(){d.hide();a.removeListener("change",
h.input);e.removeListener("scroll",f.input);e.removeListener("resize",f.input)});a.on("destroy",function(){e.removeListener("scroll",f.input);e.removeListener("resize",f.input);d.clearCustomData();d.remove()});a.focusManager.hasFocus&&d.show();a.focusManager.add(d,1)}}var e=CKEDITOR.document.getWindow(),c=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){a(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),e=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'),
c=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'),b=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&
(c["aria-multiselectable"]=!0);!c.role&&(c.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",c.role);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);
delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,c,k){var l=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=l;var d;d=CKEDITOR.tools.htmlEncodeAttr(a).replace(b,"\\'");a={id:l,val:d,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(k||a),text:c||a};this._.pendingList.push(e.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(c.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=
this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),e;for(e in a)c.getById(a[e]).setStyle("display","");for(var d in b)a=c.getById(b[d]),e=a.getNext(),a.setStyle("display",""),e&&"ul"==e.getName()&&e.setStyle("display",
"")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");
this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),c;for(c in a){var e=a[c];b.getById(e).removeClass("cke_selected");b.getById(e+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,e=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a=
b.getItem(++e);){if(a.equals(c)){this._.focusIndex=e;break}}else this.element.focus();c&&setTimeout(function(){c.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}});(function(){var a='\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"',e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(e='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+
e+'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"),c=CKEDITOR.addTemplate("combo",a);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 c=[];this.render(a,c);return c.join("")},render:function(a,e){function m(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var d=
this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(d=CKEDITOR.TRISTATE_DISABLED);this.setState(d);this.setValue("");d!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var k=CKEDITOR.env,l="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(d){v&&(a.unlockSelection(1),v=0);f.execute(d)},this),h=this,f={id:l,combo:this,focus:function(){CKEDITOR.document.getById(l).getChild(1).focus()},execute:function(d){var c=h._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(h.createPanel(a),
c.on)c.panel.hide();else{h.commit();var f=h.getValue();f?c.list.mark(f):c.list.unmarkAll();c.panel.showBlock(h.id,new CKEDITOR.dom.element(d),4)}},clickFn:d};this._.listeners.push(a.on("activeFilterChange",m,this));this._.listeners.push(a.on("mode",m,this));this._.listeners.push(a.on("selectionChange",m,this));!this.readOnly&&this._.listeners.push(a.on("readOnly",m,this));var n=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(d,
b);break;default:f.onkey(f,c)}a.preventDefault()}),p=CKEDITOR.tools.addFunction(function(){f.onfocus&&f.onfocus()}),v=0;f.keyDownFn=n;k={id:l,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:k.gecko&&!k.hc?"":(this.title||"").replace("'",""),keydownFn:n,focusFn:p,clickFn:d};c.output(k,e);if(this.onRender)this.onRender();return f},createPanel:function(a){if(!this._.panel){var c=this._.panelDefinition,e=this._.panelDefinition.block,k=c.parent||CKEDITOR.document.getBody(),
l="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(a,k,c),c=d.addListBlock(this.id,e),h=this;d.onShow=function(){this.element.addClass(l);h.setState(CKEDITOR.TRISTATE_ON);h._.on=1;h.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(h.onOpen)h.onOpen()};d.onHide=function(d){this.element.removeClass(l);h.setState(h.modes&&h.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);h._.on=0;if(!d&&h.onClose)h.onClose()};d.onEscape=function(){d.hide(1)};c.onClick=function(a,b){h.onClick&&
h.onClick.call(h,a,b);d.hide()};this._.panel=d;this._.list=c;d.getBlock(this.id).onHide=function(){h._.on=0;h.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,c){this._.value=a;var e=this.document.getById("cke_"+this.id+"_text");e&&(a||c?e.removeClass("cke_combo_inlinelabel"):(c=this.label,e.addClass("cke_combo_inlinelabel")),e.setText("undefined"!=typeof c?c:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},
hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,c,e){this._.items[a]=e||a;this._.list.add(a,c,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 c=this.document.getById("cke_"+this.id);c.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?
c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled");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=[]}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});
CKEDITOR.ui.prototype.addRichCombo=function(a,c){this.add(a,CKEDITOR.UI_RICHCOMBO,c)}})();(function(){function a(a,b,g,m,k,l,d,h){var f=a.config,n=new CKEDITOR.style(d),p=k.split(";");k=[];for(var v={},x=0;x<p.length;x++){var q=p[x];if(q){var q=q.split("/"),u={},w=p[x]=q[0];u[g]=k[x]=q[1]||w;v[w]=new CKEDITOR.style(d,u);v[w]._.definition.name=w}else p.splice(x--,1)}a.ui.addRichCombo(b,{label:m.label,title:m.panelTitle,toolbar:"styles,"+h,defaultValue:"cke-default",allowedContent:n,requiredContent:n,
contentTransformations:"span"===d.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(f.contentsCss),multiSelect:!1,attributes:{"aria-label":m.panelTitle}},init:function(){var b;b="("+a.lang.common.optionDefault+")";this.startGroup(m.panelTitle);this.add(this.defaultValue,b,b);for(var d=0;d<p.length;d++)b=p[d],this.add(b,v[b].buildPreview(),b)},onClick:function(b){a.focus();a.fire("saveSnapshot");var d=this.getValue(),f=v[b],g,h,k,l,m;if(d&&b!=d)if(g=v[d],d=a.getSelection().getRanges()[0],d.collapsed){if(h=
a.elementPath(),k=h.contains(function(a){return g.checkElementRemovable(a)})){l=d.checkBoundaryOfElement(k,CKEDITOR.START);m=d.checkBoundaryOfElement(k,CKEDITOR.END);if(l&&m){for(l=d.createBookmark();h=k.getFirst();)h.insertBefore(k);k.remove();d.moveToBookmark(l)}else l||m?d.moveToPosition(k,l?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(d.splitElement(k),d.moveToPosition(k,CKEDITOR.POSITION_AFTER_END)),e(d,h.elements.slice(),k);a.getSelection().selectRanges([d])}}else a.removeStyle(g);
b===this.defaultValue?g&&a.removeStyle(g):a.applyStyle(f);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var d=this.getValue();b=b.data.path.elements;for(var f=0,e;f<b.length;f++){e=b[f];for(var g in v)if(v[g].checkElementMatch(e,!0,a)){g!=d&&this.setValue(g);return}}this.setValue("",l)},this)},refresh:function(){a.activeFilter.check(n)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function e(a,b,g){var m=b.pop();if(m){if(g)return e(a,b,m.equals(g)?null:g);g=m.clone();
a.insertNode(g);a.moveToPosition(g,CKEDITOR.POSITION_AFTER_START);e(a,b)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(c){var b=c.config;a(c,"Font","family",c.lang.font,b.font_names,b.font_defaultLabel,b.font_style,30);a(c,"FontSize","size",c.lang.font.fontSize,b.fontSize_sizes,b.fontSize_defaultLabel,b.fontSize_style,40)}})})();CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif";
CKEDITOR.config.font_defaultLabel="";CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]};CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px";CKEDITOR.config.fontSize_defaultLabel="";CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]};CKEDITOR.plugins.add("format",
{requires:"richcombo",init:function(a){if(!a.blockless){for(var e=a.config,c=a.lang.format,b=e.format_tags.split(";"),g={},m=0,k=[],l=0;l<b.length;l++){var d=b[l],h=new CKEDITOR.style(e["format_"+d]);if(!a.filter.customConfig||a.filter.check(h))m++,g[d]=h,g[d]._.enterMode=a.config.enterMode,k.push(h)}0!==m&&a.ui.addRichCombo("Format",{label:c.label,title:c.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(e.contentsCss),multiSelect:!1,attributes:{"aria-label":c.panelTitle}},
init:function(){this.startGroup(c.panelTitle);for(var a in g){var b=c["tag_"+a];this.add(a,g[a].buildPreview(b),b)}},onClick:function(b){a.focus();a.fire("saveSnapshot");b=g[b];var d=a.elementPath();b.checkActive(d,a)||a.applyStyle(b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var d=this.getValue();b=b.data.path;this.refresh();for(var c in g)if(g[c].checkActive(b,a)){c!=d&&this.setValue(c,a.lang.format["tag_"+c]);return}this.setValue("")},
this)},onOpen:function(){this.showAll();for(var b in g)a.activeFilter.check(g[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var d in g)if(a.activeFilter.check(g[d]))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"};CKEDITOR.plugins.add("forms",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss(".cke_editable form{border: 1px dotted #FF0000;padding: 2px;}\n");CKEDITOR.addCss("img.cke_hidden{background-image: url("+CKEDITOR.getUrl(this.path+"images/hiddenfield.gif")+
");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;}")},init:function(a){var e=a.lang,c=0,b={email:1,password:1,search:1,tel:1,text:1,url:1},g={checkbox:"input[type,name,checked,required]",radio:"input[type,name,checked,required]",textfield:"input[type,name,value,size,maxlength,required]",textarea:"textarea[cols,rows,name,required]",select:"select[name,size,multiple,required]; option[value,selected]",button:"input[type,name,value]",
form:"form[action,name,id,enctype,target,method]",hiddenfield:"input[type,name,value]",imagebutton:"input[type,alt,src]{width,height,border,border-width,border-style,margin,float}"},m={checkbox:"input",radio:"input",textfield:"input",textarea:"textarea",select:"select",button:"input",form:"form",hiddenfield:"input",imagebutton:"input"},k=function(b,d,k){var l={allowedContent:g[d],requiredContent:m[d]};"form"==d&&(l.context="form");a.addCommand(d,new CKEDITOR.dialogCommand(d,l));a.ui.addButton&&a.ui.addButton(b,
{label:e.common[b.charAt(0).toLowerCase()+b.slice(1)],command:d,toolbar:"forms,"+(c+=10)});CKEDITOR.dialog.add(d,k)},l=this.path+"dialogs/";!a.blockless&&k("Form","form",l+"form.js");k("Checkbox","checkbox",l+"checkbox.js");k("Radio","radio",l+"radio.js");k("TextField","textfield",l+"textfield.js");k("Textarea","textarea",l+"textarea.js");k("Select","select",l+"select.js");k("Button","button",l+"button.js");var d=a.plugins.image;d&&!a.plugins.image2&&k("ImageButton","imagebutton",CKEDITOR.plugins.getPath("image")+
"dialogs/image.js");k("HiddenField","hiddenfield",l+"hiddenfield.js");a.addMenuItems&&(k={checkbox:{label:e.forms.checkboxAndRadio.checkboxTitle,command:"checkbox",group:"checkbox"},radio:{label:e.forms.checkboxAndRadio.radioTitle,command:"radio",group:"radio"},textfield:{label:e.forms.textfield.title,command:"textfield",group:"textfield"},hiddenfield:{label:e.forms.hidden.title,command:"hiddenfield",group:"hiddenfield"},button:{label:e.forms.button.title,command:"button",group:"button"},select:{label:e.forms.select.title,
command:"select",group:"select"},textarea:{label:e.forms.textarea.title,command:"textarea",group:"textarea"}},d&&(k.imagebutton={label:e.image.titleButton,command:"imagebutton",group:"imagebutton"}),!a.blockless&&(k.form={label:e.forms.form.menu,command:"form",group:"form"}),a.addMenuItems(k));a.contextMenu&&(!a.blockless&&a.contextMenu.addListener(function(a,b,d){if((a=d.contains("form",1))&&!a.isReadOnly())return{form:CKEDITOR.TRISTATE_OFF}}),a.contextMenu.addListener(function(a){if(a&&!a.isReadOnly()){var c=
a.getName();if("select"==c)return{select:CKEDITOR.TRISTATE_OFF};if("textarea"==c)return{textarea:CKEDITOR.TRISTATE_OFF};if("input"==c){var e=a.getAttribute("type")||"text";switch(e){case "button":case "submit":case "reset":return{button:CKEDITOR.TRISTATE_OFF};case "checkbox":return{checkbox:CKEDITOR.TRISTATE_OFF};case "radio":return{radio:CKEDITOR.TRISTATE_OFF};case "image":return d?{imagebutton:CKEDITOR.TRISTATE_OFF}:null}if(b[e])return{textfield:CKEDITOR.TRISTATE_OFF}}if("img"==c&&"hiddenfield"==
a.data("cke-real-element-type"))return{hiddenfield:CKEDITOR.TRISTATE_OFF}}}));a.on("doubleclick",function(d){var c=d.data.element;if(!a.blockless&&c.is("form"))d.data.dialog="form";else if(c.is("select"))d.data.dialog="select";else if(c.is("textarea"))d.data.dialog="textarea";else if(c.is("img")&&"hiddenfield"==c.data("cke-real-element-type"))d.data.dialog="hiddenfield";else if(c.is("input")){c=c.getAttribute("type")||"text";switch(c){case "button":case "submit":case "reset":d.data.dialog="button";
break;case "checkbox":d.data.dialog="checkbox";break;case "radio":d.data.dialog="radio";break;case "image":d.data.dialog="imagebutton"}b[c]&&(d.data.dialog="textfield")}})},afterInit:function(a){var e=a.dataProcessor,c=e&&e.htmlFilter,e=e&&e.dataFilter;CKEDITOR.env.ie&&c&&c.addRules({elements:{input:function(a){a=a.attributes;var c=a.type;c||(a.type="text");"checkbox"!=c&&"radio"!=c||"on"!=a.value||delete a.value}}},{applyToAll:!0});e&&e.addRules({elements:{input:function(b){if("hidden"==b.attributes.type)return a.createFakeParserElement(b,
"cke_hidden","hiddenfield")}}},{applyToAll:!0})}});CKEDITOR.plugins.forms={_setupRequiredAttribute:function(a){this.setValue(a.hasAttribute("required"))}};(function(){var a={canUndo:!1,exec:function(a){var c=a.document.createElement("hr");a.insertElement(c)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(e){e.blockless||(e.addCommand("horizontalrule",a),e.ui.addButton&&e.ui.addButton("HorizontalRule",{label:e.lang.horizontalrule.toolbar,command:"horizontalrule",
toolbar:"insert,40"}))}})})();CKEDITOR.plugins.add("htmlwriter",{init:function(a){var e=new CKEDITOR.htmlWriter;e.forceSimpleAmpersand=a.config.forceSimpleAmpersand;e.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=e}});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 a=CKEDITOR.dtd,e;for(e in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(e,{indent:!a[e]["#"],breakBeforeOpen:1,breakBeforeClose:!a[e]["#"],breakAfterClose:1,needsSpace:e in a.$block&&!(e in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var e=
this._.rules[a];this._.afterCloser&&e&&e.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():e&&e.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",a);this._.afterCloser=0},openTagClose:function(a,e){var c=this._.rules[a];e?(this._.output.push(this.selfClosingEnd),c&&c.breakAfterClose&&(this._.needsSpace=c.needsSpace)):(this._.output.push("\x3e"),c&&c.indent&&(this._.indentation+=this.indentationChars));c&&c.breakAfterOpen&&this.lineBreak();
"pre"==a&&(this._.inPre=1)},attribute:function(a,e){"string"==typeof e&&(e=CKEDITOR.tools.htmlEncodeAttr(e),this.forceSimpleAmpersand&&(e=e.replace(/&amp;/g,"\x26")));this._.output.push(" ",a,'\x3d"',e,'"')},closeTag:function(a){var e=this._.rules[a];e&&e.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():e&&e.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",a,"\x3e");"pre"==a&&(this._.inPre=0);e&&
e.breakAfterClose&&(this.lineBreak(),this._.needsSpace=e.needsSpace);this._.afterCloser=1},text:function(a){this._.indent&&(this.indentation(),!this._.inPre&&(a=CKEDITOR.tools.ltrim(a)));this._.output.push(a)},comment:function(a){this._.indent&&this.indentation();this._.output.push("\x3c!--",a,"--\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(a,e){var c=this._.rules[a];c?CKEDITOR.tools.extend(c,e,!0):this._.rules[a]=e}}});(function(){CKEDITOR.plugins.add("iframe",{requires:"dialog,fakeobjects",onLoad:function(){CKEDITOR.addCss("img.cke_iframe{background-image: url("+CKEDITOR.getUrl(this.path+"images/placeholder.png")+");background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;}")},
init:function(a){var e=a.lang.iframe,c="iframe[align,longdesc,frameborder,height,name,scrolling,src,title,width]";a.plugins.dialogadvtab&&(c+=";iframe"+a.plugins.dialogadvtab.allowedContent({id:1,classes:1,styles:1}));CKEDITOR.dialog.add("iframe",this.path+"dialogs/iframe.js");a.addCommand("iframe",new CKEDITOR.dialogCommand("iframe",{allowedContent:c,requiredContent:"iframe"}));a.ui.addButton&&a.ui.addButton("Iframe",{label:e.toolbar,command:"iframe",toolbar:"insert,80"});a.on("doubleclick",function(a){var c=
a.data.element;c.is("img")&&"iframe"==c.data("cke-real-element-type")&&(a.data.dialog="iframe")});a.addMenuItems&&a.addMenuItems({iframe:{label:e.title,command:"iframe",group:"image"}});a.contextMenu&&a.contextMenu.addListener(function(a){if(a&&a.is("img")&&"iframe"==a.data("cke-real-element-type"))return{iframe:CKEDITOR.TRISTATE_OFF}})},afterInit:function(a){var e=a.dataProcessor;(e=e&&e.dataFilter)&&e.addRules({elements:{iframe:function(c){return a.createFakeParserElement(c,"cke_iframe","iframe",
!0)}}})}})})();(function(){function a(a,b){b||(b=a.getSelection().getSelectedElement());if(b&&b.is("img")&&!b.data("cke-realelement")&&!b.isReadOnly())return b}function e(a){var b=a.getStyle("float");if("inherit"==b||"none"==b)b=0;b||(b=a.getAttribute("align"));return b}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(c){if(!c.plugins.detectConflict("image",["easyimage","image2"])){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var b="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";
CKEDITOR.dialog.isTabEnabled(c,"image","advanced")&&(b="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");c.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:b,requiredContent:"img[alt,src]",contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));c.ui.addButton&&c.ui.addButton("Image",{label:c.lang.common.image,command:"image",toolbar:"insert,10"});c.on("doubleclick",function(a){var b=
a.data.element;!b.is("img")||b.data("cke-realelement")||b.isReadOnly()||(a.data.dialog="image")});c.addMenuItems&&c.addMenuItems({image:{label:c.lang.image.menu,command:"image",group:"image"}});c.contextMenu&&c.contextMenu.addListener(function(b){if(a(c,b))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(c){function b(b){var m=c.getCommand("justify"+b);if(m){if("left"==b||"right"==b)m.on("exec",function(k){var l=a(c),d;l&&(d=e(l),d==b?(l.removeStyle("float"),b==e(l)&&l.removeAttribute("align")):
l.setStyle("float",b),k.cancel())});m.on("refresh",function(k){var l=a(c);l&&(l=e(l),this.setState(l==b?CKEDITOR.TRISTATE_ON:"right"==b||"left"==b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),k.cancel())})}}c.plugins.image2||(b("left"),b("right"),b("center"),b("block"))}})})();CKEDITOR.config.image_removeLinkByEmptyURL=!0;(function(){function a(a,g){var m,k;g.on("refresh",function(a){var b=[e],g;for(g in a.data.states)b.push(a.data.states[g]);this.setState(CKEDITOR.tools.search(b,c)?c:e)},g,
null,100);g.on("exec",function(c){m=a.getSelection();k=m.createBookmarks(1);c.data||(c.data={});c.data.done=!1},g,null,0);g.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(k)},g,null,100)}var e=CKEDITOR.TRISTATE_DISABLED,c=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var c=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new c(!0)));a(b,b.addCommand("outdent",new c));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent,
command:"indent",directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",function(a){var c=b.createRange(),e=a.data.node;c.setStartBefore(e);c.setEndAfter(e);for(var d=new CKEDITOR.dom.walker(c),g;g=d.next();)if(g.type==CKEDITOR.NODE_ELEMENT)if(!g.equals(e)&&g.getDirection())c.setStartAfter(g),d=new CKEDITOR.dom.walker(c);else{var f=b.config.indentClasses;if(f)for(var n="ltr"==a.data.dir?["_rtl",
""]:["","_rtl"],p=0;p<f.length;p++)g.hasClass(f[p]+n[0])&&(g.removeClass(f[p]+n[0]),g.addClass(f[p]+n[1]));f=g.getStyle("margin-right");n=g.getStyle("margin-left");f?g.setStyle("margin-left",f):g.removeStyle("margin-left");n?g.setStyle("margin-right",n):g.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,c,e){this.name=c;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,c){a.on("pluginsLoaded",function(){for(var a in c)(function(a,b){var d=a.getCommand(b.relatedGlobal),c;for(c in b.jobs)d.on("exec",function(d){d.data.done||(a.fire("lockSnapshot"),b.execJob(a,c)&&(d.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,c),d.on("refresh",function(d){d.data.states||
(d.data.states={});d.data.states[b.name+"@"+c]=b.refreshJob(a,c,d.data.path)},this,null,c);a.addFeature(b)})(this,c[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,c){var m=this.jobs[c];if(m.state!=e)return m.exec.call(this,a)},refreshJob:function(a,c,m){c=this.jobs[c];a.activeFilter.checkFeature(this)?c.state=c.refresh.call(this,a,m):c.state=e;return c.state},getContext:function(a){return a.contains(this.context)}}})();
(function(){function a(a,b,d){if(!a.getCustomData("indent_processed")){var c=this.editor,f=this.isIndent;if(b){c=a.$.className.match(this.classNameRegex);d=0;c&&(c=c[1],d=CKEDITOR.tools.indexOf(b,c)+1);if(0>(d+=f?1:-1))return;d=Math.min(d,b.length);d=Math.max(d,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<d&&a.addClass(b[d-1])}else{b=e(a,d);d=parseInt(a.getStyle(b),10);var g=c.config.indentOffset||40;isNaN(d)&&(d=0);d+=(f?1:-1)*g;if(0>d)return;d=Math.max(d,
0);d=Math.ceil(d/g)*g;a.setStyle(b,d?d+(c.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function e(a,b){return"ltr"==(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var c=CKEDITOR.dtd.$listItem,b=CKEDITOR.dtd.$list,g=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(k){function l(){d.specificDefinition.apply(this,
arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:h?null:"margin-left,margin-right",classes:h||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")+(h?"("+h.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var d=b.block||b.blockLimit;if(!d.is(c))var k=d.getAscendant(c),d=k&&b.contains(k)||d;d.is(c)&&(d=d.getParent());if(this.enterBr||this.getContext(b)){if(h){var k=h,d=d.$.className.match(this.classNameRegex),l=this.isIndent,k=d?l?d[1]!=k.slice(-1):!0:l;return k?m:g}return this.isIndent?m:d?CKEDITOR[0>=(parseInt(d.getStyle(e(d)),10)||0)?"TRISTATE_DISABLED":
"TRISTATE_OFF"]:g}return g},exec:function(d){var c=d.getSelection(),c=c&&c.getRanges()[0],e;if(e=d.elementPath().contains(b))a.call(this,e,h);else for(c=c.createIterator(),d=d.config.enterMode,c.enforceRealBlocks=!0,c.enlargeBr=d!=CKEDITOR.ENTER_BR;e=c.getNextParagraph(d==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||a.call(this,e,h);return!0}}}}var d=CKEDITOR.plugins.indent,h=k.config.indentClasses;d.registerCommands(k,{indentblock:new l(k,"indentblock",!0),outdentblock:new l(k,"outdentblock")});
CKEDITOR.tools.extend(l.prototype,d.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:h?new RegExp("(?:^|\\s+)("+h.join("|")+")(?\x3d$|\\s)"):null})}})})();(function(){function a(a){function b(d){for(var e=m.startContainer,t=m.endContainer;e&&!e.getParent().equals(d);)e=e.getParent();for(;t&&!t.getParent().equals(d);)t=t.getParent();if(!e||!t)return!1;for(var z=[],r=!1;!r;)e.equals(t)&&(r=!0),z.push(e),e=e.getNext();if(1>z.length)return!1;
e=d.getParents(!0);for(t=0;t<e.length;t++)if(e[t].getName&&k[e[t].getName()]){d=e[t];break}for(var e=g.isIndent?1:-1,t=z[0],z=z[z.length-1],r=CKEDITOR.plugins.list.listToArray(d,f),y=r[z.getCustomData("listarray_index")].indent,t=t.getCustomData("listarray_index");t<=z.getCustomData("listarray_index");t++)if(r[t].indent+=e,0<e){for(var A=r[t].parent,C=t-1;0<=C;C--)if(r[C].indent===e){A=r[C].parent;break}r[t].parent=new CKEDITOR.dom.element(A.getName(),A.getDocument())}for(t=z.getCustomData("listarray_index")+
1;t<r.length&&r[t].indent>y;t++)r[t].indent+=e;e=CKEDITOR.plugins.list.arrayToList(r,f,null,a.config.enterMode,d.getDirection());if(!g.isIndent){var B;if((B=d.getParent())&&B.is("li"))for(var z=e.listNode.getChildren(),q=[],v,t=z.count()-1;0<=t;t--)(v=z.getItem(t))&&v.is&&v.is("li")&&q.push(v)}e&&e.listNode.replace(d);if(q&&q.length)for(t=0;t<q.length;t++){for(v=d=q[t];(v=v.getNext())&&v.is&&v.getName()in k;)CKEDITOR.env.needsNbspFiller&&!d.getFirst(c)&&d.append(m.document.createText(" ")),d.append(v);
d.insertAfter(B)}e&&a.fire("contentDomInvalidated");return!0}for(var g=this,f=this.database,k=this.context,m,v=a.getSelection(),v=(v&&v.getRanges()).createIterator();m=v.getNextRange();){for(var x=m.getCommonAncestor();x&&(x.type!=CKEDITOR.NODE_ELEMENT||!k[x.getName()]);){if(a.editable().equals(x)){x=!1;break}x=x.getParent()}x||(x=m.startPath().contains(k))&&m.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);if(!x){var q=m.getEnclosedNode();q&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in k&&(m.setStartAt(q,
CKEDITOR.POSITION_AFTER_START),m.setEndAt(q,CKEDITOR.POSITION_BEFORE_END),x=q)}x&&m.startContainer.type==CKEDITOR.NODE_ELEMENT&&m.startContainer.getName()in k&&(q=new CKEDITOR.dom.walker(m),q.evaluator=e,m.startContainer=q.next());x&&m.endContainer.type==CKEDITOR.NODE_ELEMENT&&m.endContainer.getName()in k&&(q=new CKEDITOR.dom.walker(m),q.evaluator=e,m.endContainer=q.previous());if(x)return b(x)}return 0}function e(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function c(a){return b(a)&&g(a)}
var b=CKEDITOR.dom.walker.whitespaces(!0),g=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function d(b){c.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];b.on("key",function(a){var d=b.elementPath();if("wysiwyg"==b.mode&&a.data.keyCode==this.indentKey&&d){var c=this.getContext(d);!c||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,d,c)||
(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var d=this.getContext(b),c=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,d);return d&&this.isIndent&&!c?k:m}:function(a,b){return!this.getContext(b)||this.isIndent?m:k},exec:CKEDITOR.tools.bind(a,this)}}var c=CKEDITOR.plugins.indent;c.registerCommands(b,{indentlist:new d(b,"indentlist",!0),outdentlist:new d(b,"outdentlist")});CKEDITOR.tools.extend(d.prototype,c.specificDefinition.prototype,
{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var f=b.contains(e);c||(c=b.contains(a));return c&&f&&f.equals(c.getFirst(e))}})();(function(){function a(a,c){c=void 0===c||c;var e;if(c)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&&c&&(e="rtl"==a.getComputedStyle("direction")?"right":"left");return e}function e(a,c,e){this.editor=a;this.name=c;this.value=e;this.context="p";c=a.config.justifyClasses;var k=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(c){switch(e){case "left":this.cssClassName=c[0];break;case "center":this.cssClassName=c[1];break;case "right":this.cssClassName=c[2];break;case "justify":this.cssClassName=c[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+c.join("|")+")(?\x3d$|\\s)");this.requiredContent=
k+"("+this.cssClassName+")"}else this.requiredContent=k+"{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 c(a){var c=a.editor,e=c.createRange();e.setStartBefore(a.data.node);e.setEndAfter(a.data.node);for(var k=new CKEDITOR.dom.walker(e),l;l=k.next();)if(l.type==CKEDITOR.NODE_ELEMENT)if(!l.equals(a.data.node)&&
l.getDirection())e.setStartAfter(l),k=new CKEDITOR.dom.walker(e);else{var d=c.config.justifyClasses;d&&(l.hasClass(d[0])?(l.removeClass(d[0]),l.addClass(d[2])):l.hasClass(d[2])&&(l.removeClass(d[2]),l.addClass(d[0])));d=l.getStyle("text-align");"left"==d?l.setStyle("text-align","right"):"right"==d&&l.setStyle("text-align","left")}}e.prototype={exec:function(b){var c=b.getSelection(),e=b.config.enterMode;if(c){for(var k=c.createBookmarks(),l=c.getRanges(),d=this.cssClassName,h,f,n=b.config.useComputedState,
n=void 0===n||n,p=l.length-1;0<=p;p--)for(h=l[p].createIterator(),h.enlargeBr=e!=CKEDITOR.ENTER_BR;f=h.getNextParagraph(e==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){var v=f.getName(),x;x=b.activeFilter.check(v+"{text-align}");if((v=b.activeFilter.check(v+"("+d+")"))||x){f.removeAttribute("align");f.removeStyle("text-align");var q=d&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),u=this.state==CKEDITOR.TRISTATE_OFF&&(!n||a(f,!0)!=this.value);d&&v?u?f.addClass(d):
q||f.removeAttribute("class"):u&&x&&f.setStyle("text-align",this.value)}}b.focus();b.forceNextSelectionCheck();c.selectBookmarks(k)}},refresh:function(b,c){var e=c.block||c.blockLimit,k=e.getName(),l=e.equals(b.editable()),k=this.cssClassName?b.activeFilter.check(k+"("+this.cssClassName+")"):b.activeFilter.check(k+"{text-align}");l&&!CKEDITOR.dtd.$list[c.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!l&&k?this.setState(a(e,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 g=new e(a,"justifyleft","left"),m=new e(a,"justifycenter","center"),k=new e(a,"justifyright","right"),l=new e(a,"justifyblock","justify");a.addCommand("justifyleft",g);a.addCommand("justifycenter",m);a.addCommand("justifyright",k);a.addCommand("justifyblock",l);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",c)}}})})();CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var a=function(a){var c=this._,b=c.menu;c.state!==CKEDITOR.TRISTATE_DISABLED&&(c.on&&
b?b.hide():(c.previousState=c.state,b||(b=c.menu=new CKEDITOR.menu(a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.common.options}}}),b.onHide=CKEDITOR.tools.bind(function(){var b=this.command?a.getCommand(this.command).modes:this.modes;this.setState(!b||b[a.mode]?c.previousState:CKEDITOR.TRISTATE_DISABLED);c.on=0},this),this.onMenu&&b.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),c.on=1,setTimeout(function(){b.show(CKEDITOR.document.getById(c.id),4)},0)))};CKEDITOR.ui.menuButton=
CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(e){delete e.panel;this.base(e);this.hasArrow="menu";this.click=a},statics:{handler:{create:function(a){return new CKEDITOR.ui.menuButton(a)}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}});CKEDITOR.UI_MENUBUTTON="menubutton";"use strict";(function(){CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(a){var e=a.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],
c=this,b=a.lang.language,g={},m,k,l,d;a.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(a,b){var d=g["language_"+b];if(d)a[d.style.checkActive(a.elementPath(),a)?"removeStyle":"applyStyle"](d.style)},refresh:function(a){this.setState(c.getCurrentLangElement(a)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(d=0;d<e.length;d++)m=e[d].split(":"),k=m[0],l="language_"+k,g[l]={label:m[1],langId:k,group:"language",order:d,ltr:"rtl"!=
(""+m[2]).toLowerCase(),onClick:function(){a.execCommand("language",this.langId)},role:"menuitemcheckbox"},g[l].style=new CKEDITOR.style({element:"span",attributes:{lang:k,dir:g[l].ltr?"ltr":"rtl"}});g.language_remove={label:b.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:g.length,onClick:function(){var b=c.getCurrentLangElement(a);b&&a.execCommand("language",b.getAttribute("lang"))}};a.addMenuGroup("language",1);a.addMenuGroup("language_remove");a.addMenuItems(g);a.ui.add("Language",
CKEDITOR.UI_MENUBUTTON,{label:b.button,allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",toolbar:"bidi,30",command:"language",onMenu:function(){var b={},d=c.getCurrentLangElement(a),e;for(e in g)b[e]=CKEDITOR.TRISTATE_OFF;b.language_remove=d?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;d&&(b["language_"+d.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return b}});a.addRemoveFormatFilter&&a.addRemoveFormatFilter(function(a){return!(a.is("span")&&a.getAttribute("dir")&&a.getAttribute("lang"))})},
getCurrentLangElement:function(a){var e=a.elementPath();a=e&&e.elements;var c;if(e)for(var b=0;b<a.length;b++)e=a[b],!c&&"span"==e.getName()&&e.hasAttribute("dir")&&e.hasAttribute("lang")&&(c=e);return c}})})();"use strict";(function(){function a(a){return a.replace(/'/g,"\\$\x26")}function e(a){for(var b=a.length,d=[],c,f=0;f<b;f++)c=a.charCodeAt(f),d.push(c);return"String.fromCharCode("+d.join(",")+")"}function c(b,d){for(var c=b.plugins.link,f=c.compiledProtectionFunction.params,c=[c.compiledProtectionFunction.name,
"("],e,g,h=0;h<f.length;h++)e=f[h].toLowerCase(),g=d[e],0<h&&c.push(","),c.push("'",g?a(encodeURIComponent(d[e])):"","'");c.push(")");return c.join("")}function b(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,d,c){b.name=d;b.params=[];c.replace(/[^,\s]+/g,function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return d.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;",d=".%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(a){var d="a[!href]";
CKEDITOR.dialog.isTabEnabled(a,"link","advanced")&&(d=d.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(d=d.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:d,requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.addCommand("unlink",new CKEDITOR.unlinkCommand);
a.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,"link");a.setKeystroke(CKEDITOR.CTRL+75,"link");a.ui.addButton&&(a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"}),a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"}),a.ui.addButton("Anchor",{label:a.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");a.on("doubleclick",function(b){var d=b.data.element.getAscendant({a:1,img:1},!0);d&&!d.isReadOnly()&&(d.is("a")?(b.data.dialog=!d.getAttribute("name")||d.getAttribute("href")&&d.getChildCount()?"link":"anchor",b.data.link=d):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)&&(b.data.dialog="anchor"))},null,null,0);a.on("doubleclick",function(b){b.data.dialog in{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},null,null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,
command:"anchor",group:"anchor",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var d={};b.getAttribute("href")&&
b.getChildCount()&&(d={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});b&&b.hasAttribute("name")&&(d.anchor=d.removeAnchor=CKEDITOR.TRISTATE_OFF);return d});this.compiledProtectionFunction=b(a)},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,d){if("a"==d&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,
b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var g=/^javascript:/,m=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,k=/subject=([^;?:@&=$,\/]*)/i,l=/body=([^;?:@&=$,\/]*)/i,d=/^#(.*)$/,h=/^((?:http|https|ftp|news):\/\/)?(.*)$/,f=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,p=/^javascript:([^(]+)\(([^)]+)\)$/,v=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,
x=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,q=/^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 d=a.getSelection(),c=d.getSelectedElement(),f=d.getRanges(),e=[],g;if(!b&&c&&c.is("a"))return c;for(c=0;c<f.length;c++)if(g=d.getRanges()[c],g.shrink(CKEDITOR.SHRINK_ELEMENT,
!0,{skipBogus:!0}),(g=a.elementPath(g.getCommonAncestor()).contains("a",1))&&b)e.push(g);else if(g)return g;return b?e:null},getEditorAnchors:function(a){for(var b=a.editable(),d=b.isInline()&&!a.plugins.divarea?a.document:b,b=d.getElementsByTag("a"),d=d.getElementsByTag("img"),c=[],f=0,e;e=b.getItem(f++);)(e.data("cke-saved-name")||e.hasAttribute("name"))&&c.push({name:e.data("cke-saved-name")||e.getAttribute("name"),id:e.getAttribute("id")});for(f=0;e=d.getItem(f++);)(e=this.tryRestoreFakeAnchor(a,
e))&&c.push({name:e.getAttribute("name"),id:e.getAttribute("id")});return c},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,b){if(b&&b.data("cke-real-element-type")&&"anchor"==b.data("cke-real-element-type")){var d=a.restoreRealElement(b);if(d.data("cke-saved-name"))return d}},parseLinkAttributes:function(a,b){var c=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",e=a.plugins.link.compiledProtectionFunction,y=a.config.emailProtection,A={},C;c.match(g)&&("encode"==y?c=c.replace(n,function(a,
b,d){d=d||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+d.replace(/\\'/g,"'")}):y&&c.replace(p,function(a,b,d){if(b==e.name){A.type="email";a=A.email={};b=/(^')|('$)/g;d=d.match(/[^,\s]+/g);for(var c=d.length,f,g,h=0;h<c;h++)f=decodeURIComponent,g=d[h].replace(b,"").replace(/\\'/g,"'"),g=f(g),f=e.params[h].toLowerCase(),a[f]=g;a.address=[a.name,a.domain].join("@")}}));if(!A.type)if(y=c.match(d))A.type="anchor",A.anchor={},A.anchor.name=A.anchor.id=y[1];else if(y=c.match(q))A.type=
"tel",A.tel=y[1];else if(y=c.match(m)){C=c.match(k);var c=c.match(l),B=A.email={};A.type="email";B.address=y[0].replace("mailto:","");C&&(B.subject=decodeURIComponent(C[1]));c&&(B.body=decodeURIComponent(c[1]))}else c&&(C=c.match(h))&&(A.type="url",A.url={},A.url.protocol=C[1],A.url.url=C[2]);if(b){if(c=b.getAttribute("target"))A.target={type:c.match(f)?c:"frame",name:c};else if(c=(c=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&c.match(v))for(A.target={type:"popup",name:c[1]};y=x.exec(c[2]);)"yes"!=
y[2]&&"1"!=y[2]||y[1]in{height:1,width:1,top:1,left:1}?isFinite(y[2])&&(A.target[y[1]]=y[2]):A.target[y[1]]=!0;null!==b.getAttribute("download")&&(A.download=!0);var c={},F;for(F in u)(y=b.getAttribute(F))&&(c[u[F]]=y);if(F=b.data("cke-saved-name")||c.advName)c.advName=F;CKEDITOR.tools.isEmpty(c)||(A.advanced=c)}return A},getLinkAttributes:function(b,d){var f=b.config.emailProtection||"",g={};switch(d.type){case "url":var f=d.url&&void 0!==d.url.protocol?d.url.protocol:"http://",h=d.url&&CKEDITOR.tools.trim(d.url.url)||
"";g["data-cke-saved-href"]=0===h.indexOf("/")?h:f+h;break;case "anchor":f=d.anchor&&d.anchor.id;g["data-cke-saved-href"]="#"+(d.anchor&&d.anchor.name||f||"");break;case "email":var k=d.email,h=k.address;switch(f){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"==f?(f=["javascript:void(location.href\x3d'mailto:'+",e(h)],k&&f.push("+'",a(k),"'"),f.push(")")):
f=["mailto:",h,k];break;default:f=h.split("@",2),k.name=f[0],k.domain=f[1],f=["javascript:",c(b,k)]}g["data-cke-saved-href"]=f.join("");break;case "tel":g["data-cke-saved-href"]="tel:"+d.tel}if(d.target)if("popup"==d.target.type){for(var f=["window.open(this.href, '",d.target.name||"","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),h=n.length,l=function(a){d.target[a]&&n.push(a+"\x3d"+d.target[a])},k=0;k<h;k++)n[k]+=d.target[n[k]]?"\x3dyes":"\x3dno";
l("width");l("left");l("height");l("top");f.push(n.join(","),"'); return false;");g["data-cke-pa-onclick"]=f.join("")}else"notSet"!=d.target.type&&d.target.name&&(g.target=d.target.name);d.download&&(g.download="");if(d.advanced){for(var p in u)(f=d.advanced[u[p]])&&(g[p]=f);g.name&&(g["data-cke-saved-name"]=g.name)}g["data-cke-saved-href"]&&(g.href=g["data-cke-saved-href"]);p={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};d.advanced&&CKEDITOR.tools.extend(p,u);for(var q in g)delete p[q];
return{set:g,removed:CKEDITOR.tools.object.keys(p)}},showDisplayTextForElement:function(a,b){var d={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},c=b.getSelection();return b.widgets&&b.widgets.focused||c&&1<c.getRanges().length?!1:!a||!a.getName||!a.is(d)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var b=a.getSelection().getRanges()[0],d=b.getPreviousEditableNode()&&b.getPreviousEditableNode().getAscendant("a",!0)||
b.getNextEditableNode()&&b.getNextEditableNode().getAscendant("a",!0),c;b.collapsed&&d&&(c=b.createBookmark(),b.selectNodeContents(d),b.select())}d=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(d);c&&(b.moveToBookmark(c),b.select())},refresh:function(a,b){var d=b.lastElement&&b.lastElement.getAscendant("a",!0);d&&"a"==d.getName()&&d.getAttribute("href")&&d.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(),d=b.createBookmarks(),c;if(b&&(c=b.getSelectedElement())&&(c.getChildCount()?c.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c)))c.remove(1);else if(c=CKEDITOR.plugins.link.getSelectedLink(a))c.hasAttribute("href")?(c.removeAttributes({name:1,"data-cke-saved-name":1}),c.removeClass("cke_anchor")):
c.remove(1);b.selectBookmarks(d)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0,linkDefaultProtocol:"http://"})})();(function(){function a(a,b,d,c){for(var f=CKEDITOR.plugins.list.listToArray(b.root,d),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(d,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,l,g=0;g<
e.length;g++){var m=e[g].getCustomData("listarray_index");k=f[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),f[m].parent=l)}d=CKEDITOR.plugins.list.arrayToList(f,d,null,a.config.enterMode);for(var n,f=d.listNode.getChildCount(),g=0;g<f&&(n=d.listNode.getChild(g));g++)n.getName()==this.type&&c.push(n);d.listNode.replace(b.root);a.fire("contentDomInvalidated")}function e(a,b,d){var c=b.contents,f=b.root.getDocument(),e=
[];if(1==c.length&&c[0].equals(b.root)){var g=f.createElement("div");c[0].moveChildren&&c[0].moveChildren(g);c[0].append(g);c[0]=g}b=b.contents[0].getParent();for(g=0;g<c.length;g++)b=b.getCommonAncestor(c[g].getParent());a=a.config.useComputedState;var h,k;a=void 0===a||a;for(g=0;g<c.length;g++)for(var l=c[g],m;m=l.getParent();){if(m.equals(b)){e.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>e.length)){c=e[e.length-1].getNext();g=f.createElement(this.type);
for(d.push(g);e.length;)d=e.shift(),a=f.createElement("li"),l=d,l.is("pre")||x.test(l.getName())||"false"==l.getAttribute("contenteditable")?d.appendTo(a):(d.copyAttributes(a),h&&d.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),d.moveChildren(a),d.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);c?g.insertBefore(c):g.appendTo(b)}}function c(a,b,d){function c(d){if(!(!(l=k[d?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[d?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||
m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[d?"insertBefore":"insertAfter"](l)}for(var f=CKEDITOR.plugins.list.listToArray(b.root,d),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(d,h,"list_item_processed",!0))}h=null;for(g=0;g<e.length;g++)h=e[g].getCustomData("listarray_index"),f[h].indent=-1;for(g=h+1;g<f.length;g++)if(f[g].indent>f[g-1].indent+1){e=f[g-1].indent+
1-f[g].indent;for(h=f[g].indent;f[g]&&f[g].indent>=h;)f[g].indent+=e,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(f,d,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;c(!0);c();k.replace(b.root);a.fire("contentDomInvalidated")}function b(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function g(a,b,d,c){for(var f,e;f=a[c?"getLast":"getFirst"](q);)(e=f.getDirection(1))!==b.getDirection(1)&&f.setAttribute("dir",e),f.remove(),d?f[c?"insertBefore":
"insertAfter"](d):b.append(f,c),d=f}function m(a){function b(d){var c=a[d?"getPrevious":"getNext"](p);c&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(a.getName())&&(g(a,c,null,!d),a.remove(),a=c)}b();b(1)}function k(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(a,b,c){a.fire("saveSnapshot");c.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=c.extractContents();b.trim(!1,!0);var e=b.createBookmark(),
h=new CKEDITOR.dom.elementPath(b.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,l=new CKEDITOR.dom.elementPath(c.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(p))&&v(k)&&k.remove();(k=f.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?f.insertBefore(k):b.startContainer.append(f);n&&(f=d(n))&&(h.contains(n)?(g(f,n.getParent(),n),
f.remove()):h.append(f));for(;c.checkStartOfBlock()&&c.checkEndOfBlock();){l=c.startPath();f=l.block;if(!f)break;f.is("li")&&(h=f.getParent(),f.equals(h.getLast(p))&&f.equals(h.getFirst(p))&&(f=h));c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}c=c.clone();f=a.editable();c.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=function(a){return p(a)&&!v(a)};(c=c.next())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in CKEDITOR.dtd.$list&&m(c);b.moveToBookmark(e);
b.select();a.fire("saveSnapshot")}function d(a){return(a=a.getLast(p))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in h?a:null}var h={ol:1,ul:1},f=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),p=function(a){return!(f(a)||n(a))},v=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,d,c,f){if(!h[a.getName()])return[];c||(c=0);d||(d=[]);for(var e=0,g=a.getChildCount();e<g;e++){var k=a.getChild(e);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&
CKEDITOR.plugins.list.listToArray(k,b,d,c+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:c,element:k,contents:[]};f?l.grandparent=f:(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,n=k.getChildCount(),p;m<n;m++)p=k.getChild(m),p.type==CKEDITOR.NODE_ELEMENT&&h[p.getName()]?CKEDITOR.plugins.list.listToArray(p,b,d,
c+1,l.grandparent):l.contents.push(p)}}return d},arrayToList:function(a,b,d,c,f){d||(d=0);if(!a||a.length<d+1)return null;for(var e,g=a[d].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(g),l=null,m=d,q=Math.max(a[d].indent,0),v=null,x,D,M=c==CKEDITOR.ENTER_P?"p":"div";;){var H=a[m];e=H.grandparent;x=H.element.getDirection(1);if(H.indent==q){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),f&&l.setAttribute("dir",f),k.append(l));v=l.append(H.element.clone(0,1));x!=l.getDirection(1)&&
v.setAttribute("dir",x);for(e=0;e<H.contents.length;e++)v.append(H.contents[e].clone(1,1));m++}else if(H.indent==Math.max(q,0)+1)H=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,c,H!=x?x:null),!v.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=g.$.documentMode&&v.append(g.createText(" ")),v.append(m.listNode),m=m.nextIndex;else if(-1==H.indent&&!d&&e){h[e.getName()]?(v=H.element.clone(!1,!0),x!=e.getDirection(1)&&v.setAttribute("dir",x)):v=new CKEDITOR.dom.documentFragment(g);
var l=e.getDirection(1)!=x,E=H.element,O=E.getAttribute("class"),S=E.getAttribute("style"),Q=v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(c!=CKEDITOR.ENTER_BR||l||S||O),L,W=H.contents.length,T;for(e=0;e<W;e++)if(L=H.contents[e],n(L)&&1<W)Q?T=L.clone(1,1):v.append(L.clone(1,1));else if(L.type==CKEDITOR.NODE_ELEMENT&&L.isBlockBoundary()){l&&!L.getDirection()&&L.setAttribute("dir",x);D=L;var Z=E.getAttribute("style");Z&&D.setAttribute("style",Z.replace(/([^;])$/,"$1;")+(D.getAttribute("style")||""));O&&
L.addClass(O);D=null;T&&(v.append(T),T=null);v.append(L.clone(1,1))}else Q?(D||(D=g.createElement(M),v.append(D),l&&D.setAttribute("dir",x)),S&&D.setAttribute("style",S),O&&D.setAttribute("class",O),T&&(D.append(T),T=null),D.append(L.clone(1,1))):v.append(L.clone(1,1));T&&((D||v).append(T),T=null);v.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(x=v.getLast())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("br")&&x.remove(),(x=v.getLast(p))&&x.type==CKEDITOR.NODE_ELEMENT&&
x.is(CKEDITOR.dtd.$block)||v.append(g.createElement("br")));x=v.$.nodeName.toLowerCase();"div"!=x&&"p"!=x||v.appendBogus();k.append(v);l=null;m++}else return null;D=null;if(a.length<=m||Math.max(a[m].indent,0)<q)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,g=f=c=void 0,c=d.getDirection()))){for(f=d.getParent();f&&!(g=f.getDirection());)f=f.getParent();c==g&&d.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,
nextIndex:m}}};var x=/^h[1-6]$/,q=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);b.prototype={exec:function(b){function d(a){return h[a.root.getName()]&&!f(a.root,[CKEDITOR.NODE_COMMENT])}function f(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(b,b.elementPath());
var k=b.config,l=b.getSelection(),n=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var C=b.editable();if(C.getFirst(p)){var B=1==n.length&&n[0];(k=B&&B.getEnclosedNode())&&k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else k.enterMode==CKEDITOR.ENTER_BR?C.appendBogus():n[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(n)}for(var k=l.createBookmarks(!0),C=[],v={},n=n.createIterator(),q=0;(B=n.getNextRange())&&++q;){var x=B.getBoundaryNodes(),K=x.startNode,
D=x.endNode;K.type==CKEDITOR.NODE_ELEMENT&&"td"==K.getName()&&B.setStartAt(x.startNode,CKEDITOR.POSITION_AFTER_START);D.type==CKEDITOR.NODE_ELEMENT&&"td"==D.getName()&&B.setEndAt(x.endNode,CKEDITOR.POSITION_BEFORE_END);B=B.createIterator();for(B.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;x=B.getNextParagraph();)if(!x.getCustomData("list_block")&&!g(x)){CKEDITOR.dom.element.setMarker(v,x,"list_block",1);for(var M=b.elementPath(x),K=M.elements,D=0,M=M.blockLimit,H,E=K.length-1;0<=E&&(H=K[E]);E--)if(h[H.getName()]&&
M.contains(H)){M.removeCustomData("list_group_object_"+q);(K=H.getCustomData("list_group_object"))?K.contents.push(x):(K={root:H,contents:[x]},C.push(K),CKEDITOR.dom.element.setMarker(v,H,"list_group_object",K));D=1;break}D||(D=M,D.getCustomData("list_group_object_"+q)?D.getCustomData("list_group_object_"+q).contents.push(x):(K={root:D,contents:[x]},CKEDITOR.dom.element.setMarker(v,D,"list_group_object_"+q,K),C.push(K)))}}for(H=[];0<C.length;)K=C.shift(),this.state==CKEDITOR.TRISTATE_OFF?d(K)||(h[K.root.getName()]?
a.call(this,b,K,v,H):e.call(this,b,K,H)):this.state==CKEDITOR.TRISTATE_ON&&h[K.root.getName()]&&!d(K)&&c.call(this,b,K,v);for(E=0;E<H.length;E++)m(H[E]);CKEDITOR.dom.element.clearAllMarkers(v);l.selectBookmarks(k);b.focus()},refresh:function(a,b){var d=b.contains(h,1),c=b.blockLimit||b.root;d&&c.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(a){a.blockless||
(a.addCommand("numberedlist",new b("numberedlist","ol")),a.addCommand("bulletedlist",new b("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var c=b.data.domEvent.getKey(),f;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var e=a.getSelection().getRanges()[0],
g=e&&e.startPath();if(e&&e.collapsed){var m=8==c,n=a.editable(),B=new CKEDITOR.dom.walker(e.clone());B.evaluator=function(a){return p(a)&&!v(a)};B.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=e.clone();if(m){var q;(q=g.contains(h))&&e.checkBoundaryOfElement(q,CKEDITOR.START)&&(q=q.getParent())&&q.is("li")&&(q=d(q))?(f=q,q=q.getPrevious(p),c.moveToPosition(q&&v(q)?q:f,CKEDITOR.POSITION_BEFORE_START)):(B.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),B.range.setEnd(e.startContainer,
e.startOffset),(q=B.previous())&&q.type==CKEDITOR.NODE_ELEMENT&&(q.getName()in h||q.is("li"))&&(q.is("li")||(B.range.selectNodeContents(q),B.reset(),B.evaluator=k,q=B.previous()),f=q,c.moveToElementEditEnd(f),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)l(a,c,e),b.cancel();else{var x=g.contains(h);x&&e.checkBoundaryOfElement(x,CKEDITOR.START)&&(f=x.getFirst(p),e.checkBoundaryOfElement(f,CKEDITOR.START)&&(q=x.getPrevious(p),d(f)?q&&(e.moveToElementEditEnd(q),e.select()):
a.execCommand("outdent"),b.cancel()))}}else if(f=g.contains("li")){if(B.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),m=(n=f.getLast(p))&&k(n)?n:f,g=0,(q=B.next())&&q.type==CKEDITOR.NODE_ELEMENT&&q.getName()in h&&q.equals(n)?(g=1,q=B.next()):e.checkBoundaryOfElement(m,CKEDITOR.END)&&(g=2),g&&q){e=e.clone();e.moveToElementEditStart(q);if(1==g&&(c.optimize(),!c.startContainer.equals(f))){for(f=c.startContainer;f.is(CKEDITOR.dtd.$inline);)x=f,f=f.getParent();x&&c.moveToPosition(x,CKEDITOR.POSITION_AFTER_END)}2==
g&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),e.endPath().block&&e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_AFTER_START));l(a,c,e);b.cancel()}}else B.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(q=B.next())&&q.type==CKEDITOR.NODE_ELEMENT&&q.is(h)&&(q=q.getFirst(p),g.block&&e.checkStartOfBlock()&&e.checkEndOfBlock()?(g.block.remove(),e.moveToElementEditStart(q),e.select()):d(q)?(e.moveToElementEditStart(q),e.select()):(e=e.clone(),e.moveToElementEditStart(q),l(a,
c,e)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})})();(function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(a){if(!a.blockless){var e;e=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]});e=a.addCommand("numberedListStyle",e);a.addFeature(e);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js");
e=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});e=a.addCommand("bulletedListStyle",e);a.addFeature(e);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");a.addMenuGroup("list",108);a.addMenuItems({numberedlist:{label:a.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:a.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}});
a.contextMenu.addListener(function(a){if(!a||a.isReadOnly())return null;for(;a;){var b=a.getName();if("ol"==b)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==b)return{bulletedlist:CKEDITOR.TRISTATE_OFF};a=a.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)})();"use strict";(function(){function a(a,b,d){return n(b)&&n(d)&&d.equals(b.getNext(function(a){return!(P(a)||R(a)||p(a))}))}function e(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}
function c(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var d=k(b);if("true"==d.getAttribute("contenteditable"))return b;if(d.is(a.triggers))return d}return null}function b(a,b,d){r(a,b);r(a,d);a=b.size.bottom;d=d.size.top;return a&&d?0|(a+d)/2:a||d}function g(a,b,d){return b=b[d?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!P(b)||n(b)&&!p(b)&&!f(a,b)})}function m(a,b,d){return a>b&&a<d}function k(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 l(a){var b=a.doc,c=G('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+ba+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),f=CKEDITOR.getUrl(this.path+"images/"+(J.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");B(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},
lineChildren:[B(G('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:ba+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+f+") center no-repeat "+a.boxColor+";cursor:pointer;"+(J.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(J.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;"]}),
B(G(da,b),{base:V+"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"]}),B(G(da,b),{base:V+"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(){r(a,this);var b=a.holdDistance,d=this.size;
return d&&m(a.mouse.y,d.top-b,d.bottom+b)&&m(a.mouse.x,d.left-b,d.right+b)?!0:!1},place:function(){var b=a.view,d=a.editable,c=a.trigger,f=c.upper,e=c.lower,g=f||e,h=g.getParent(),k={};this.trigger=c;f&&r(a,f,!0);e&&r(a,e,!0);r(a,h,!0);a.inInlineMode&&y(a,!0);h.equals(d)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x,
k.right="");f&&e?k.top=f.size.margin.bottom===e.size.margin.top?0|f.size.bottom+f.size.margin.bottom/2:f.size.margin.bottom<e.size.margin.top?f.size.bottom+f.size.margin.bottom:f.size.bottom+f.size.margin.bottom-e.size.margin.top:f?e||(k.top=f.size.bottom+f.size.margin.bottom):k.top=e.size.top-e.size.margin.top;c.is(Q)||m(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(Q)):c.is(L)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+
b.editable.padding.bottom:b.pane.bottom-1,this.look(L)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(W));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,d;b--;)(d=this.lineChildren[b]).setAttribute("style",d.base+d.looks[0|a/2]);this.oldLook=a}},wrap:new F("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);
c.look(W);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();d(a,function(b){var d=a.line.trigger;b[d.is(H)?"insertBefore":"insertAfter"](d.is(H)?d.lower:d.upper)},!0);a.editor.focus();J.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});c.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=c}function d(a,b,d){var c=new CKEDITOR.dom.range(a.doc),f=a.editor,e;J.ie&&a.enterMode==CKEDITOR.ENTER_BR?e=a.doc.createText(T):
(e=(e=k(a.element,!0))&&e.data("cke-enter-mode")||a.enterMode,e=new F(M[e],a.doc),e.is("br")||a.doc.createText(T).appendTo(e));d&&f.fire("saveSnapshot");b(e);c.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([c]);a.hotNode=e;d&&f.fire("saveSnapshot")}function h(a,b){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function f(c){var e=J.ie&&9>J.version?" ":T,g=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;d(a,function(d){g&&
a.hotNode&&a.hotNode.remove();d[b?"insertAfter":"insertBefore"](c);d.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});J.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(d){d=d.getSelection().getStartElement();var e;d=d.getAscendant(U,1);if(!q(a,d)&&d&&!d.equals(a.editable)&&!d.contains(a.editable)){(e=k(d))&&"false"==e.getAttribute("contenteditable")&&(d=e);a.element=d;e=g(a,d,!b);var h;n(e)&&e.is(a.triggers)&&
e.is(N)&&(!g(a,e,!b)||(h=g(a,e,!b))&&n(h)&&h.is(a.triggers))?f(e):(h=c(a,d),n(h)&&(g(a,h,!b)?(d=g(a,h,!b))&&n(d)&&d.is(a.triggers)&&f(h):f(h)))}}}()}}function f(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var d=a.line;return d.wrap.equals(b)||d.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function p(a){if(!n(a))return!1;var b;(b=v(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1,
fixed:1}[a.getComputedStyle("position")]}function x(a,b){return n(b)?b.is(a.triggers):null}function q(a,b){if(!b)return!1;for(var d=b.getParents(1),c=d.length;c--;)for(var f=a.tabuList.length;f--;)if(d[c].hasAttribute(a.tabuList[f]))return!0;return!1}function u(a,b,d){b=b[d?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ga)});if(!b)return!1;r(a,b);return d?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function w(a){var b=a.editable,d=a.mouse,c=a.view,g=a.triggerOffset;y(a);var h=d.y>
(a.inInlineMode?c.editable.top+c.editable.height/2:Math.min(c.editable.height,c.pane.height)/2),b=b[h?"getLast":"getFirst"](function(a){return!(P(a)||R(a))});if(!b)return null;f(a,b)&&(b=a.line.wrap[h?"getPrevious":"getNext"](function(a){return!(P(a)||R(a))}));if(!n(b)||p(b)||!x(a,b))return null;r(a,b);return!h&&0<=b.size.top&&m(d.y,0,b.size.top+g)?(a=a.inInlineMode||0===c.scroll.y?Q:W,new e([null,b,H,S,a])):h&&b.size.bottom<=c.pane.height&&m(d.y,b.size.bottom-g,c.pane.height)?(a=a.inInlineMode||
m(b.size.bottom,c.pane.height-g,c.pane.height)?L:W,new e([b,null,E,S,a])):null}function t(a){var b=a.mouse,d=a.view,f=a.triggerOffset,h=c(a);if(!h)return null;r(a,h);var f=Math.min(f,0|h.size.outerHeight/2),k=[],l,I;if(m(b.y,h.size.top-1,h.size.top+f))I=!1;else if(m(b.y,h.size.bottom-f,h.size.bottom+1))I=!0;else return null;if(p(h)||u(a,h,I)||h.getParent().is(Z))return null;var t=g(a,h,!I);if(t){if(t&&t.type==CKEDITOR.NODE_TEXT)return null;if(n(t)){if(p(t)||!x(a,t)||t.getParent().is(Z))return null;
k=[t,h][I?"reverse":"concat"]().concat([O,S])}}else h.equals(a.editable[I?"getLast":"getFirst"](a.isRelevant))?(y(a),I&&m(b.y,h.size.bottom-f,d.pane.height)&&m(h.size.bottom,d.pane.height-f,d.pane.height)?l=L:m(b.y,0,h.size.top+f)&&(l=Q)):l=W,k=[null,h][I?"reverse":"concat"]().concat([I?E:H,S,l,h.equals(a.editable[I?"getLast":"getFirst"](a.isRelevant))?I?L:Q:W]);return 0 in k?new e(k):null}function z(a,b,d,c){for(var f=b.getDocumentPosition(),e={},g={},h={},k={},l=Y.length;l--;)e[Y[l]]=parseInt(b.getComputedStyle.call(b,
"border-"+Y[l]+"-width"),10)||0,h[Y[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+Y[l]),10)||0,g[Y[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+Y[l]),10)||0;d&&!c||A(a,c);k.top=f.y-(d?0:a.view.scroll.y);k.left=f.x-(d?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+e.top+e.bottom);k.width=k.outerWidth-(h.left+h.right+e.left+e.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,
left:b.$.scrollLeft});return B({border:e,padding:h,margin:g,ignoreScroll:d},k,!0)}function r(a,b,d){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==d&&b.size.date>new Date-aa)return null;return B(b.size,z(a,b,d),{date:+new Date},!0)}function y(a,b){a.view.editable=z(a,a.editable,b,!0)}function A(a,b){a.view||(a.view={});var d=a.view;if(!(!b&&d&&d.date>new Date-aa)){var c=a.win,d=c.getScrollPosition(),c=c.getViewPaneSize();B(a.view,{scroll:{x:d.x,y:d.y,width:a.doc.$.documentElement.scrollWidth-
c.width,height:a.doc.$.documentElement.scrollHeight-c.height},pane:{width:c.width,height:c.height,bottom:c.height+d.y},date:+new Date},!0)}}function C(a,b,d,c){for(var f=c,g=c,h=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+h<m&&0<n.y-h;){k||(k=b(f,c));l||(l=b(g,c));!k&&0<n.y-h&&(f=d(a,{x:n.x,y:n.y-h}));!l&&n.y+h<m&&(g=d(a,{x:n.x,y:n.y+h}));if(k&&l)break;h+=2}return new e([f,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var b=a.config,k=b.magicline_triggerOffset||30,m={editor:a,
enterMode:b.enterMode,triggerOffset:k,holdDistance:0|k*(b.magicline_holdDistance||.5),boxColor:b.magicline_color||"#ff0000",rtl:"rtl"==b.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(b.magicline_tabuList||[]),triggers:b.magicline_everywhere?U:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},u,r,C;m.isRelevant=function(a){return n(a)&&!f(m,a)&&!p(a)};a.on("contentDom",function(){var k=a.editable(),n=a.document,p=a.window;B(m,{editable:k,inInlineMode:k.isInline(),doc:n,win:p,
hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();k.is(D.$inline)||(m.inInlineMode&&!v(k)&&k.setStyles({position:"relative",top:null,left:null}),l.call(this,m),A(m),k.attachListener(a,"beforeUndoImage",function(){m.line.detach()}),k.attachListener(a,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),a.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),k.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==
a.mode)if(m.inInlineMode){var d=b.data.$.clientX;b=b.data.$.clientY;A(m);y(m,!0);var c=m.view.editable,f=m.view.scroll;d>c.left-f.x&&d<c.right-f.x&&b>c.top-f.y&&b<c.bottom-f.y||(clearTimeout(C),C=null,m.line.detach())}else clearTimeout(C),C=null,m.line.detach()}),k.attachListener(k,"keyup",function(){m.hiddenMode=0}),k.attachListener(k,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),k.attachListener(m.inInlineMode?k:n,
"mousemove",function(b){r=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!C){var d={x:b.data.$.clientX,y:b.data.$.clientY};C=setTimeout(function(){m.mouse=d;C=m.trigger=null;A(m);r&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=X(m,!0))&&((m.trigger=w(m)||t(m)||I(m))&&!q(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),r=!1)},30)}}),k.attachListener(p,"scroll",function(){"wysiwyg"==a.mode&&(m.line.detach(),J.webkit&&(m.hiddenMode=1,clearTimeout(u),
u=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),k.attachListener(K?n:p,"mousedown",function(){"wysiwyg"==a.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),k.attachListener(K?n:p,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),a.addCommand("accessPreviousSpace",h(m)),a.addCommand("accessNextSpace",h(m,!0)),a.setKeystroke([[b.magicline_keystrokePrevious,"accessPreviousSpace"],[b.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,d,c,f;for(f in{p:1,
br:1,div:1})for(b=a.document.getElementsByTag(f),c=b.count();c--;)if((d=b.getItem(c)).data("cke-magicline-hot")){m.hotNode=d;m.lastCmdDirection="true"===d.data("cke-magicline-dir")?!0:!1;return}}),a._.magiclineBackdoor={accessFocusSpace:d,boxTrigger:e,isLine:f,getAscendantTrigger:c,getNonEmptyNeighbour:g,getSize:z,that:m,triggerEdge:t,triggerEditable:w,triggerExpand:I})},this)}});var B=CKEDITOR.tools.extend,F=CKEDITOR.dom.element,G=F.createFromHtml,J=CKEDITOR.env,K=CKEDITOR.env.ie&&9>CKEDITOR.env.version,
D=CKEDITOR.dtd,M={},H=128,E=64,O=32,S=16,Q=4,L=2,W=1,T=" ",Z=D.$listItem,ga=D.$tableContent,N=B({},D.$nonEditable,D.$empty),U=D.$block,aa=100,ba="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",V=ba+"border-color:transparent;display:block;border-style:solid;",da="\x3cspan\x3e"+T+"\x3c/span\x3e";M[CKEDITOR.ENTER_BR]="br";M[CKEDITOR.ENTER_P]="p";M[CKEDITOR.ENTER_DIV]="div";e.prototype={set:function(a,b,d){this.properties=
a+b+(d||W);return this},is:function(a){return(this.properties&a)==a}};var X=function(){function a(b,d){var c=b.$.elementFromPoint(d.x,d.y);return c&&c.nodeType?new CKEDITOR.dom.element(c):null}return function(b,d,c){if(!b.mouse)return null;var e=b.doc,g=b.line.wrap;c=c||b.mouse;var h=a(e,c);d&&f(b,h)&&(g.hide(),h=a(e,c),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||J.ie&&9>J.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),P=CKEDITOR.dom.walker.whitespaces(),R=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
I=function(){function d(f){var e=f.element,g,h,k;if(!n(e)||e.contains(f.editable)||e.isReadOnly())return null;k=C(f,function(a,b){return!b.equals(a)},function(a,b){return X(a,!0,b)},e);g=k.upper;h=k.lower;if(a(f,g,h))return k.set(O,8);if(g&&e.contains(g))for(;!g.getParent().equals(e);)g=g.getParent();else g=e.getFirst(function(a){return c(f,a)});if(h&&e.contains(h))for(;!h.getParent().equals(e);)h=h.getParent();else h=e.getLast(function(a){return c(f,a)});if(!g||!h)return null;r(f,g);r(f,h);if(!m(f.mouse.y,
g.size.top,h.size.bottom))return null;for(var e=Number.MAX_VALUE,l,I,p,t;h&&!h.equals(g)&&(I=g.getNext(f.isRelevant));)l=Math.abs(b(f,g,I)-f.mouse.y),l<e&&(e=l,p=g,t=I),g=I,r(f,g);if(!p||!t||!m(f.mouse.y,p.size.top,t.size.bottom))return null;k.upper=p;k.lower=t;return k.set(O,8)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||R(b)||p(b)||f(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(b){var c=d(b),f;if(f=c){f=c.upper;var e=c.lower;f=!f||!e||p(e)||p(f)||e.equals(f)||
f.equals(e)||e.contains(f)||f.contains(e)?!1:x(b,f)&&x(b,e)&&a(b,f,e)?!0:!1}return f?c:null}}(),Y=["top","left","right","bottom"]})();CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51;CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52;(function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||"form"!=a.getName())return[];for(var b=[],c=["style","className"],d=0;d<c.length;d++){var e=a.$.elements.namedItem(c[d]);e&&(e=new CKEDITOR.dom.element(e),
b.push([e,e.nextSibling]),e.remove())}return b}function e(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&"form"==a.getName()&&0<b.length)for(var c=b.length-1;0<=c;c--){var d=b[c][0],e=b[c][1];e?d.insertBefore(e):d.appendTo(a)}}function c(b,c){var g=a(b),d={},h=b.$;c||(d["class"]=h.className||"",h.className="");d.inline=h.style.cssText||"";c||(h.style.cssText="position: static; overflow: visible");e(g);return d}function b(b,c){var g=a(b),d=b.$;"class"in c&&(d.className=c["class"]);"inline"in c&&(d.style.cssText=
c.inline);e(g)}function g(a){if(!a.editable().isInline()){var b=CKEDITOR.instances,c;for(c in b){var d=b[c];"wysiwyg"!=d.mode||d.readOnly||(d=d.document.getBody(),d.setAttribute("contentEditable",!1),d.setAttribute("contentEditable",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add("maximize",{init:function(a){function e(){var b=h.getViewPaneSize();a.resize(b.width,b.height,null,!0)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var l=a.lang,d=CKEDITOR.document,h=d.getWindow(),
f,n,p,v=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var x=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),q=a.ui.space("contents");if("wysiwyg"==a.mode){var u=a.getSelection();f=u&&u.getRanges();n=h.getScrollPosition()}else{var w=a.editable().$;f=!CKEDITOR.env.ie&&[w.selectionStart,w.selectionEnd];n=[w.scrollLeft,w.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){h.on("resize",
e);p=h.getScrollPosition();for(u=a.container;u=u.getParent();)u.setCustomData("maximize_saved_styles",c(u)),u.setStyle("z-index",a.config.baseFloatZIndex-5);q.setCustomData("maximize_saved_styles",c(q,!0));x.setCustomData("maximize_saved_styles",c(x,!0));q={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};d.getDocumentElement().setStyles(q);!CKEDITOR.env.gecko&&d.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||d.getBody().setStyles(q);CKEDITOR.env.ie?
setTimeout(function(){h.$.scrollTo(0,0)},0):h.$.scrollTo(0,0);x.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");x.$.offsetLeft;x.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});x.addClass("cke_maximized");e();q=x.getDocumentPosition();x.setStyles({left:-1*q.x+"px",top:-1*q.y+"px"});CKEDITOR.env.gecko&&g(a)}else if(this.state==CKEDITOR.TRISTATE_ON){h.removeListener("resize",e);for(var u=[q,x],t=0;t<u.length;t++)b(u[t],u[t].getCustomData("maximize_saved_styles")),
u[t].removeCustomData("maximize_saved_styles");for(u=a.container;u=u.getParent();)b(u,u.getCustomData("maximize_saved_styles")),u.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){h.$.scrollTo(p.x,p.y)},0):h.$.scrollTo(p.x,p.y);x.removeClass("cke_maximized");CKEDITOR.env.webkit&&(x.setStyle("display","inline"),setTimeout(function(){x.setStyle("display","block")},0));a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:q.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState();
if(u=this.uiItems[0])q=this.state==CKEDITOR.TRISTATE_OFF?l.maximize.maximize:l.maximize.minimize,u=CKEDITOR.document.getById(u._.id),u.getChild(1).setHtml(q),u.setAttribute("title",q),u.setAttribute("href",'javascript:void("'+q+'");');"wysiwyg"==a.mode?f?(CKEDITOR.env.gecko&&g(a),a.getSelection().selectRanges(f),(w=a.getSelection().getStartElement())&&w.scrollIntoView(!0)):h.$.scrollTo(n.x,n.y):(f&&(w.selectionStart=f[0],w.selectionEnd=f[1]),w.scrollLeft=n[0],w.scrollTop=n[1]);f=n=null;v=this.state;
a.fire("maximize",this.state)},canUndo:!1});a.ui.addButton&&a.ui.addButton("Maximize",{label:l.maximize.maximize,command:"maximize",toolbar:"tools,10"});a.on("mode",function(){var b=a.getCommand("maximize");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:v)},null,null,100)}}})})();CKEDITOR.plugins.add("newpage",{init:function(a){a.addCommand("newpage",{modes:{wysiwyg:1,source:1},exec:function(a){var c=this;a.setData(a.config.newpage_html||"",function(){a.focus();setTimeout(function(){a.fire("afterCommandExec",
{name:"newpage",command:c});a.selectionChange()},200)})},async:!0});a.ui.addButton&&a.ui.addButton("NewPage",{label:a.lang.newpage.toolbar,command:"newpage",toolbar:"document,20"})}});"use strict";(function(){function a(a){return{"aria-label":a,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:a}}CKEDITOR.plugins.add("pagebreak",{requires:"fakeobjects",onLoad:function(){var a=("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{"+a+"}")},init:function(a){a.blockless||(a.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),a.ui.addButton&&a.ui.addButton("PageBreak",{label:a.lang.pagebreak.toolbar,command:"pagebreak",toolbar:"insert,70"}),CKEDITOR.env.webkit&&a.on("contentDom",function(){a.document.on("click",
function(c){c=c.data.getTarget();c.is("div")&&c.hasClass("cke_pagebreak")&&a.getSelection().selectElement(c)})}))},afterInit:function(e){function c(b){CKEDITOR.tools.extend(b.attributes,a(e.lang.pagebreak.alt),!0);b.children.length=0}var b=e.dataProcessor,g=b&&b.dataFilter,b=b&&b.htmlFilter,m=/page-break-after\s*:\s*always/i,k=/display\s*:\s*none/i;b&&b.addRules({attributes:{"class":function(a,b){var c=a.replace("cke_pagebreak","");if(c!=a){var f=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];
b.children.length=0;b.add(f);f=b.attributes;delete f["aria-label"];delete f.contenteditable;delete f.title}return c}}},{applyToAll:!0,priority:5});g&&g.addRules({elements:{div:function(a){if(a.attributes["data-cke-pagebreak"])c(a);else if(m.test(a.attributes.style)){var b=a.children[0];b&&"span"==b.name&&k.test(b.attributes.style)&&c(a)}}}})}});CKEDITOR.plugins.pagebreakCmd={exec:function(a){a.insertElement(CKEDITOR.plugins.pagebreak.createElement(a))},context:"div",allowedContent:{div:{styles:"!page-break-after"},
span:{match:function(a){return(a=a.parent)&&"div"==a.name&&a.styles&&a.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(e){return e.document.createElement("div",{attributes:a(e.lang.pagebreak.alt)})}}})();(function(){function a(a,b){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(b)}).sort(function(a,b){return a.priority===b.priority?0:a.priority-b.priority})}function e(a,b){var d=a.shift();
d&&d.handle(b,function(){e(a,b)})}function c(a){var b=CKEDITOR.tools.array.reduce(a,function(a,b){return CKEDITOR.tools.array.isArray(b.filters)?a.concat(b.filters):a},[]);return CKEDITOR.tools.array.filter(b,function(a,c){return CKEDITOR.tools.array.indexOf(b,a)===c})}function b(a,b){var d=0,c,f;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(g,a)});if(0<c.length)for(f=0;f<c.length;f++)(function(a){CKEDITOR.scriptLoader.queue(a,
function(f){f&&g.push(a);++d===c.length&&b()})})(c[f]);return 0===c.length}var g=[],m=CKEDITOR.tools.createClass({$:function(){this.handlers=[]},proto:{register:function(a){"number"!==typeof a.priority&&(a.priority=10);this.handlers.push(a)},addPasteListener:function(g){g.on("paste",function(l){var d=a(this.handlers,l),h;if(0!==d.length){h=c(d);h=b(h,function(){return g.fire("paste",l.data)});if(!h)return l.cancel();e(d,l)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:"clipboard",
beforeInit:function(a){a.pasteTools=new m;a.pasteTools.addPasteListener(a)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:b,createFilter:function(a){var b=CKEDITOR.tools.array.isArray(a.rules)?a.rules:[a.rules],d=a.additionalTransforms;return function(a,c){var e=new CKEDITOR.htmlParser.basicWriter,g=new CKEDITOR.htmlParser.filter,k;d&&(a=d(a,c));CKEDITOR.tools.array.forEach(b,function(b){g.addRules(b(a,c,g))});k=CKEDITOR.htmlParser.fragment.fromHtml(a);g.applyTo(k);k.writeHtml(e);return e.getHtml()}},
getClipboardData:function(a,b){var d;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===b?(d=a.dataTransfer.getData(b,!0))||"text/html"!==b?d:a.dataValue:null},getConfigValue:function(a,b){if(a&&a.config){var d=CKEDITOR.tools,c=a.config,f=d.object.keys(c),e=["pasteTools_"+b,"pasteFromWord_"+b,"pasteFromWord"+d.capitalize(b,!0)],e=d.array.find(e,function(a){return-1!==d.array.indexOf(f,a)});return c[e]}}};CKEDITOR.pasteFilters={}})();(function(){CKEDITOR.plugins.add("pastefromgdocs",
{requires:"pastetools",init:function(a){var e=CKEDITOR.plugins.getPath("pastetools"),c=this.path;a.pasteTools.register({filters:[CKEDITOR.getUrl(e+"filter/common.js"),CKEDITOR.getUrl(c+"filter/default.js")],canHandle:function(a){return/id=(\"|\')?docs\-internal\-guid\-/.test(a.data.dataValue)},handle:function(b,c){var e=b.data,k=CKEDITOR.plugins.pastetools.getClipboardData(e,"text/html");e.dontFilter=!0;e.dataValue=CKEDITOR.pasteFilters.gdocs(k,a);!0===a.config.forcePasteAsPlainText&&(e.type="text");
c()}})}})})();(function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(a){function e(a){var b=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,d,c=[];if(b&&a.editor.filter.check("img[src]")&&(d=b.extractTagsFromHtml(a.data.dataValue),0!==d.length&&(b=b.extractFromRtf(a.data.dataTransfer["text/rtf"]),0!==b.length&&(CKEDITOR.tools.array.forEach(b,function(a){c.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):
null)},this),d.length===c.length))))for(b=0;b<d.length;b++)0===d[b].indexOf("file://")&&c[b]&&(a.data.dataValue=a.data.dataValue.replace(d[b],c[b]))}var c=0,b=CKEDITOR.plugins.getPath("pastetools"),g=this.path,m=void 0===a.config.pasteFromWord_inlineImages?!0:a.config.pasteFromWord_inlineImages,b=[CKEDITOR.getUrl(b+"filter/common.js"),CKEDITOR.getUrl(g+"filter/default.js")];a.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a,b){c=1;a.execCommand("paste",{type:"html",notification:b&&
"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(a,"PasteFromWord",{label:a.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});a.pasteTools.register({filters:a.config.pasteFromWordCleanupFile?[a.config.pasteFromWordCleanupFile]:b,canHandle:function(a){a=a.data.dataValue;var b=/(class=\"?Mso|style=(?:\"|\')[^\"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,b=/<meta\s*name=(?:\"|\')?generator(?:\"|\')?\s*content=(?:\"|\')?microsoft/gi.test(a)||
b.test(a);return a&&(c||b)},handle:function(b,e){var d=b.data,g=CKEDITOR.plugins.pastetools.getClipboardData(d,"text/html"),f=CKEDITOR.plugins.pastetools.getClipboardData(d,"text/rtf"),g={dataValue:g,dataTransfer:{"text/rtf":f}};if(!1!==a.fire("pasteFromWord",g)||c){d.dontFilter=!0;if(c||!a.config.pasteFromWordPromptCleanup||confirm(a.lang.pastefromword.confirmCleanup))g.dataValue=CKEDITOR.cleanWord(g.dataValue,a),a.fire("afterPasteFromWord",g),d.dataValue=g.dataValue,!0===a.config.forcePasteAsPlainText?
d.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==a.config.forcePasteAsPlainText||(d.type="html");c=0;e()}}});if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&m)a.on("afterPasteFromWord",e)}})})();(function(){var a={canUndo:!1,async:!0,exec:function(a,c){var b=a.lang,g=CKEDITOR.tools.keystrokeToString(b.common.keyboard,a.getCommandKeystroke(CKEDITOR.env.ie?a.commands.paste:this)),m=c&&"undefined"!==typeof c.notification?c.notification:!c||!c.from||"keystrokeHandler"===
c.from&&CKEDITOR.env.ie,b=m&&"string"===typeof m?m:b.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+g.aria+'"\x3e'+g.display+"\x3c/kbd\x3e");a.execCommand("paste",{type:"text",notification:m?b:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(e){var c=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;e.addCommand("pastetext",a);e.setKeystroke(c,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(e,"PasteText",
{label:e.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(e.config.forcePasteAsPlainText)e.on("beforePaste",function(a){"html"!=a.data.type&&(a.data.type="text")});e.on("pasteState",function(a){e.getCommand("pastetext").setState(a.data)})}})})();(function(){var a,e={modes:{wysiwyg:1,source:1},canUndo:!1,readOnly:1,exec:function(c){var b,e=c.config,m=e.baseHref?'\x3cbase href\x3d"'+e.baseHref+'"/\x3e':"";if(e.fullPage)b=c.getData().replace(/<head>/,"$\x26"+m).replace(/[^>]*(?=<\/title>)/,
"$\x26 \x26mdash; "+c.lang.preview.preview);else{var e="\x3cbody ",k=c.document&&c.document.getBody();k&&(k.getAttribute("id")&&(e+='id\x3d"'+k.getAttribute("id")+'" '),k.getAttribute("class")&&(e+='class\x3d"'+k.getAttribute("class")+'" '));e+="\x3e";b=c.config.docType+'\x3chtml dir\x3d"'+c.config.contentsLangDirection+'"\x3e\x3chead\x3e'+m+"\x3ctitle\x3e"+c.lang.preview.preview+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(c.config.contentsCss)+"\x3c/head\x3e"+e+c.getData()+"\x3c/body\x3e\x3c/html\x3e"}m=
640;e=420;k=80;try{var l=window.screen,m=Math.round(.8*l.width),e=Math.round(.7*l.height),k=Math.round(.1*l.width)}catch(d){}if(!1===c.fire("contentPreview",c={dataValue:b}))return!1;var l="",h;CKEDITOR.env.ie&&(window._cke_htmlToLoad=c.dataValue,h="javascript:void( (function(){document.open();"+("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )",
l="");CKEDITOR.env.gecko&&(window._cke_htmlToLoad=c.dataValue,l=CKEDITOR.getUrl(a+"preview.html"));l=window.open(l,null,"toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes,width\x3d"+m+",height\x3d"+e+",left\x3d"+k);CKEDITOR.env.ie&&l&&(l.location=h);CKEDITOR.env.ie||CKEDITOR.env.gecko||(h=l.document,h.open(),h.write(c.dataValue),h.close());return!0}};CKEDITOR.plugins.add("preview",{init:function(c){c.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(a=this.path,
c.addCommand("preview",e),c.ui.addButton&&c.ui.addButton("Preview",{label:c.lang.preview.preview,command:"preview",toolbar:"document,40"}))}})})();CKEDITOR.plugins.add("print",{init:function(a){a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(a.addCommand("print",CKEDITOR.plugins.print),a.ui.addButton&&a.ui.addButton("Print",{label:a.lang.print.toolbar,command:"print",toolbar:"document,50"}))}});CKEDITOR.plugins.print={exec:function(a){CKEDITOR.env.gecko?a.window.$.print():a.document.$.execCommand("Print")},
canUndo:!1,readOnly:1,modes:{wysiwyg:1}};CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}});CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var e=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$",
"i")),c=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),b=CKEDITOR.plugins.removeformat.filter,g=a.getSelection().getRanges().createIterator(),m=function(a){return a.type==CKEDITOR.NODE_ELEMENT},k=[],l;l=g.getNextRange();){var d=l.createBookmark();l=a.createRange();l.setStartBefore(d.startNode);d.endNode&&l.setEndAfter(d.endNode);l.collapsed||l.enlarge(CKEDITOR.ENLARGE_ELEMENT);var h=l.createBookmark(),f=h.startNode,n=h.endNode,p=function(d){for(var c=a.elementPath(d),
f=c.elements,g=1,h;(h=f[g])&&!h.equals(c.block)&&!h.equals(c.blockLimit);g++)e.test(h.getName())&&b(a,h)&&d.breakParent(h)};p(f);if(n)for(p(n),f=f.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);f&&!f.equals(n);)if(f.isReadOnly()){if(f.getPosition(n)&CKEDITOR.POSITION_CONTAINS)break;f=f.getNext(m)}else p=f.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==f.getName()&&f.data("cke-realelement")||f.hasAttribute("data-cke-bookmark")||!b(a,f)||(e.test(f.getName())?f.remove(1):(f.removeAttributes(c),a.fire("removeFormatCleanup",
f))),f=p;h.startNode.remove();h.endNode&&h.endNode.remove();l.moveToBookmark(d);k.push(l)}a.forceNextSelectionCheck();a.getSelection().selectRanges(k)}}},filter:function(a,e){for(var c=a._.removeFormatFilters||[],b=0;b<c.length;b++)if(!1===c[b](e))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)};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(a){function e(c){var e=d.width,g=d.height,k=e+(c.data.$.screenX-l.x)*("rtl"==m?-1:1);c=g+(c.data.$.screenY-l.y);h&&(e=Math.max(b.resize_minWidth,Math.min(k,b.resize_maxWidth)));f&&(g=Math.max(b.resize_minHeight,Math.min(c,b.resize_maxHeight)));a.resize(h?e:null,g)}function c(){CKEDITOR.document.removeListener("mousemove",e);CKEDITOR.document.removeListener("mouseup",
c);a.document&&(a.document.removeListener("mousemove",e),a.document.removeListener("mouseup",c))}var b=a.config,g=a.ui.spaceId("resizer"),m=a.element?a.element.getDirection(1):"ltr";!b.resize_dir&&(b.resize_dir="vertical");void 0===b.resize_maxWidth&&(b.resize_maxWidth=3E3);void 0===b.resize_maxHeight&&(b.resize_maxHeight=3E3);void 0===b.resize_minWidth&&(b.resize_minWidth=750);void 0===b.resize_minHeight&&(b.resize_minHeight=250);if(!1!==b.resize_enabled){var k=null,l,d,h=("both"==b.resize_dir||
"horizontal"==b.resize_dir)&&b.resize_minWidth!=b.resize_maxWidth,f=("both"==b.resize_dir||"vertical"==b.resize_dir)&&b.resize_minHeight!=b.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(f){k||(k=a.getResizable());d={width:k.$.offsetWidth||0,height:k.$.offsetHeight||0};l={x:f.screenX,y:f.screenY};b.resize_minWidth>d.width&&(b.resize_minWidth=d.width);b.resize_minHeight>d.height&&(b.resize_minHeight=d.height);CKEDITOR.document.on("mousemove",e);CKEDITOR.document.on("mouseup",c);a.document&&
(a.document.on("mousemove",e),a.document.on("mouseup",c));f.preventDefault&&f.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(b){if("bottom"==b.data.space){var d="";h&&!f&&(d=" cke_resizer_horizontal");!h&&f&&(d=" cke_resizer_vertical");var c='\x3cspan id\x3d"'+g+'" class\x3d"cke_resizer'+d+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==
m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==d?b.data.html+=c:b.data.html=c+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){var a={readOnly:1,modes:{wysiwyg:1,source:1},exec:function(a){if(a.fire("save")&&(a=a.element.$.form))try{a.submit()}catch(c){a.submit.click&&a.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(e){e.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.addCommand("save",a).startDisabled=
!e.element.$.form,e.ui.addButton&&e.ui.addButton("Save",{label:e.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})})();"use strict";CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",onLoad:function(a){"moono-lisa"==(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css"));CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"dialogs/dialog.css"))},init:function(a){var e=
this,c=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);CKEDITOR.dialog.add(this.dialogName,CKEDITOR.getUrl(this.path+"dialogs/options.js"));this.addMenuItems(a);var b=a.lang.scayt,g=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:b.text_title,title:a.plugins.wsc?a.lang.wsc.title:b.text_title,modes:{wysiwyg:!(g.ie&&(8>g.version||g.quirks))},toolbar:"spellchecker,20",refresh:function(){var b=a.ui.instances.Scayt.getState();a.scayt&&(b=c.state.scayt[a.name]?
CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.fire("scaytButtonState",b)},onRender:function(){var b=this;a.on("scaytButtonState",function(a){void 0!==typeof a.data&&b.setState(a.data)})},onMenu:function(){var b=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[b&&c.state.scayt[a.name]?"btn_disable":"btn_enable"];var e={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:b?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED,scaytAbout:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete e.scaytOptions;a.config.scayt_uiTabs[1]||delete e.scaytLangs;a.config.scayt_uiTabs[2]||delete e.scaytDict;b&&!CKEDITOR.plugins.scayt.isNewUdSupported(b)&&(delete e.scaytDict,a.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage());return e}});a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(b,
c){var g=a.scayt,d,h;g&&(h=g.getSelectionNode())&&(d=e.menuGenerator(a,h),g.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" .")));return d}),a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide,function(b){return function(){var c=a.scayt;c&&c.hideBanner();return b.apply(this)}}))},addMenuItems:function(a){var e=this,c=CKEDITOR.plugins.scayt;a.addMenuGroup("scaytButton");for(var b=a.config.scayt_contextMenuItemsOrder.split("|"),g=0;g<b.length;g++)b[g]="scayt_"+
b[g];if((b=["grayt_description","grayt_suggest","grayt_control"].concat(b))&&b.length)for(g=0;g<b.length;g++)a.addMenuGroup(b[g],g-10);a.addCommand("scaytToggle",{exec:function(a){var b=a.scayt;c.state.scayt[a.name]=!c.state.scayt[a.name];!0===c.state.scayt[a.name]?b||c.createScayt(a):b&&c.destroy(a)}});a.addCommand("scaytAbout",{exec:function(a){a.scayt.tabToOpen="about";c.openDialog(e.dialogName,a)}});a.addCommand("scaytOptions",{exec:function(a){a.scayt.tabToOpen="options";c.openDialog(e.dialogName,
a)}});a.addCommand("scaytLangs",{exec:function(a){a.scayt.tabToOpen="langs";c.openDialog(e.dialogName,a)}});a.addCommand("scaytDict",{exec:function(a){a.scayt.tabToOpen="dictionaries";c.openDialog(e.dialogName,a)}});b={scaytToggle:{label:a.lang.scayt.btn_enable,group:"scaytButton",command:"scaytToggle"},scaytAbout:{label:a.lang.scayt.btn_about,group:"scaytButton",command:"scaytAbout"},scaytOptions:{label:a.lang.scayt.btn_options,group:"scaytButton",command:"scaytOptions"},scaytLangs:{label:a.lang.scayt.btn_langs,
group:"scaytButton",command:"scaytLangs"},scaytDict:{label:a.lang.scayt.btn_dictionaries,group:"scaytButton",command:"scaytDict"}};a.plugins.wsc&&(b.WSC={label:a.lang.wsc.toolbar,group:"scaytButton",onClick:function(){var b=CKEDITOR.plugins.scayt,c=a.scayt,e=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(e=e.replace(/\s/g,""))?(c&&b.state.scayt[a.name]&&c.setMarkupPaused&&c.setMarkupPaused(!0),a.lockSelection(),a.execCommand("checkspell")):alert("Nothing to check!")}});
a.addMenuItems(b)},bindEvents:function(a){var e=CKEDITOR.plugins.scayt,c=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE,b=function(){e.destroy(a)},g=function(){!e.state.scayt[a.name]||a.readOnly||a.scayt||e.createScayt(a)},m=function(){var b=a.editable();b.attachListener(b,"focus",function(b){CKEDITOR.plugins.scayt&&!a.scayt&&setTimeout(g,0);b=CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[a.name]&&a.scayt;var e,f;if((c||b)&&a._.savedSelection){b=a._.savedSelection.getSelectedElement();b=
!b&&a._.savedSelection.getRanges();for(var k=0;k<b.length;k++)f=b[k],"string"===typeof f.startContainer.$.nodeValue&&(e=f.startContainer.getText().length,(e<f.startOffset||e<f.endOffset)&&a.unlockSelection(!1))}},this,null,-10)},k=function(){c?a.config.scayt_inlineModeImmediateMarkup?g():(a.on("blur",function(){setTimeout(b,0)}),a.on("focus",g),a.focusManager.hasFocus&&g()):g();m();var e=a.editable();e.attachListener(e,"mousedown",function(b){b=b.data.getTarget();var c=a.widgets&&a.widgets.getByElement(b);
c&&(c.wrapper=b.getAscendant(function(a){return a.hasAttribute("data-cke-widget-wrapper")},!0))},this,null,-10)};a.on("contentDom",k);a.on("beforeCommandExec",function(b){var d=a.scayt,c=!1,f=!1,g=!0;b.data.name in e.options.disablingCommandExec&&"wysiwyg"==a.mode?d&&(e.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED)):"bold"!==b.data.name&&"italic"!==b.data.name&&"underline"!==b.data.name&&"strike"!==b.data.name&&"subscript"!==b.data.name&&"superscript"!==b.data.name&&"enter"!==b.data.name&&
"cut"!==b.data.name&&"language"!==b.data.name||!d||("cut"===b.data.name&&(g=!1,f=!0),"language"===b.data.name&&(f=c=!0),a.fire("reloadMarkupScayt",{removeOptions:{removeInside:g,forceBookmark:f,language:c},timeout:0}))});a.on("beforeSetMode",function(b){if("source"==b.data){if(b=a.scayt)e.destroy(a),a.fire("scaytButtonState",CKEDITOR.TRISTATE_DISABLED);a.document&&a.document.getBody().removeAttribute("_jquid")}});a.on("afterCommandExec",function(b){"wysiwyg"!=a.mode||"undo"!=b.data.name&&"redo"!=
b.data.name||setTimeout(function(){e.reloadMarkup(a.scayt)},250)});a.on("readOnly",function(b){var d;b&&(d=a.scayt,!0===b.editor.readOnly?d&&d.fire("removeMarkupInDocument",{}):d?e.reloadMarkup(d):"wysiwyg"==b.editor.mode&&!0===e.state.scayt[b.editor.name]&&(e.createScayt(a),b.editor.fire("scaytButtonState",CKEDITOR.TRISTATE_ON)))});a.on("beforeDestroy",b);a.on("setData",function(){b();(a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE||a.plugins.divarea)&&k()},this,null,50);a.on("reloadMarkupScayt",function(b){var d=
b.data&&b.data.removeOptions,c=b.data&&b.data.timeout,f=b.data&&b.data.language,g=a.scayt;g&&setTimeout(function(){f&&(d.selectionNode=a.plugins.language.getCurrentLangElement(a),d.selectionNode=d.selectionNode&&d.selectionNode.$||null);g.removeMarkupInSelectionNode(d);e.reloadMarkup(g)},c||0)});a.on("insertElement",function(){a.fire("reloadMarkupScayt",{removeOptions:{forceBookmark:!0}})},this,null,50);a.on("insertHtml",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0);a.fire("reloadMarkupScayt")},
this,null,50);a.on("insertText",function(){a.scayt&&a.scayt.setFocused&&a.scayt.setFocused(!0);a.fire("reloadMarkupScayt")},this,null,50);a.on("scaytDialogShown",function(b){b.data.selectPage(a.scayt.tabToOpen)})},parseConfig:function(a){var e=CKEDITOR.plugins.scayt;e.replaceOldOptionsNames(a.config);"boolean"!==typeof a.config.scayt_autoStartup&&(a.config.scayt_autoStartup=!1);e.state.scayt[a.name]=a.config.scayt_autoStartup;"boolean"!==typeof a.config.grayt_autoStartup&&(a.config.grayt_autoStartup=
!1);"boolean"!==typeof a.config.scayt_inlineModeImmediateMarkup&&(a.config.scayt_inlineModeImmediateMarkup=!1);e.state.grayt[a.name]=a.config.grayt_autoStartup;a.config.scayt_contextCommands||(a.config.scayt_contextCommands="ignoreall|add");a.config.scayt_contextMenuItemsOrder||(a.config.scayt_contextMenuItemsOrder="suggest|moresuggest|control");a.config.scayt_sLang||(a.config.scayt_sLang="en_US");if(void 0===a.config.scayt_maxSuggestions||"number"!=typeof a.config.scayt_maxSuggestions||0>a.config.scayt_maxSuggestions)a.config.scayt_maxSuggestions=
3;if(void 0===a.config.scayt_minWordLength||"number"!=typeof a.config.scayt_minWordLength||1>a.config.scayt_minWordLength)a.config.scayt_minWordLength=3;if(void 0===a.config.scayt_customDictionaryIds||"string"!==typeof a.config.scayt_customDictionaryIds)a.config.scayt_customDictionaryIds="";if(void 0===a.config.scayt_userDictionaryName||"string"!==typeof a.config.scayt_userDictionaryName)a.config.scayt_userDictionaryName=null;if("string"===typeof a.config.scayt_uiTabs&&3===a.config.scayt_uiTabs.split(",").length){var c=
[],b=[];a.config.scayt_uiTabs=a.config.scayt_uiTabs.split(",");CKEDITOR.tools.search(a.config.scayt_uiTabs,function(a){1===Number(a)||0===Number(a)?(b.push(!0),c.push(Number(a))):b.push(!1)});null===CKEDITOR.tools.search(b,!1)?a.config.scayt_uiTabs=c:a.config.scayt_uiTabs=[1,1,1]}else a.config.scayt_uiTabs=[1,1,1];"string"!=typeof a.config.scayt_serviceProtocol&&(a.config.scayt_serviceProtocol=null);"string"!=typeof a.config.scayt_serviceHost&&(a.config.scayt_serviceHost=null);"string"!=typeof a.config.scayt_servicePort&&
(a.config.scayt_servicePort=null);"string"!=typeof a.config.scayt_servicePath&&(a.config.scayt_servicePath=null);a.config.scayt_moreSuggestions||(a.config.scayt_moreSuggestions="on");"string"!==typeof a.config.scayt_customerId&&(a.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2");"string"!==typeof a.config.scayt_customPunctuation&&(a.config.scayt_customPunctuation="-");"string"!==typeof a.config.scayt_srcUrl&&(e=document.location.protocol,e=-1!=e.search(/https?:/)?
e:"http:",a.config.scayt_srcUrl=e+"//svc.webspellchecker.net/spellcheck31/wscbundle/wscbundle.js");"boolean"!==typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0);"boolean"!==typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0);CKEDITOR.config.scayt_handleUndoRedo=CKEDITOR.plugins.undo?CKEDITOR.config.scayt_handleUndoRedo:!1;"boolean"!==typeof a.config.scayt_multiLanguageMode&&(a.config.scayt_multiLanguageMode=!1);"object"!==
typeof a.config.scayt_multiLanguageStyles&&(a.config.scayt_multiLanguageStyles={});a.config.scayt_ignoreAllCapsWords&&"boolean"!==typeof a.config.scayt_ignoreAllCapsWords&&(a.config.scayt_ignoreAllCapsWords=!1);a.config.scayt_ignoreDomainNames&&"boolean"!==typeof a.config.scayt_ignoreDomainNames&&(a.config.scayt_ignoreDomainNames=!1);a.config.scayt_ignoreWordsWithMixedCases&&"boolean"!==typeof a.config.scayt_ignoreWordsWithMixedCases&&(a.config.scayt_ignoreWordsWithMixedCases=!1);a.config.scayt_ignoreWordsWithNumbers&&
"boolean"!==typeof a.config.scayt_ignoreWordsWithNumbers&&(a.config.scayt_ignoreWordsWithNumbers=!1);if(a.config.scayt_disableOptionsStorage){var e=CKEDITOR.tools.isArray(a.config.scayt_disableOptionsStorage)?a.config.scayt_disableOptionsStorage:"string"===typeof a.config.scayt_disableOptionsStorage?[a.config.scayt_disableOptionsStorage]:void 0,g="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),m=["lang","ignore-all-caps-words",
"ignore-domain-names","ignore-words-with-mixed-cases","ignore-words-with-numbers"],k=CKEDITOR.tools.search,l=CKEDITOR.tools.indexOf;a.config.scayt_disableOptionsStorage=function(a){for(var b=[],c=0;c<a.length;c++){var e=a[c],p=!!k(a,"options");if(!k(g,e)||p&&k(m,function(a){if("lang"===a)return!1}))return;k(m,e)&&m.splice(l(m,e),1);if("all"===e||p&&k(a,"lang"))return[];"options"===e&&(m=["lang"])}return b=b.concat(m)}(e)}a.config.scayt_disableCache&&"boolean"!==typeof a.config.scayt_disableCache&&
(a.config.scayt_disableCache=!1);if(void 0===a.config.scayt_cacheSize||"number"!=typeof a.config.scayt_cacheSize||1>a.config.scayt_cacheSize)a.config.scayt_cacheSize=4E3},addRule:function(a){var e=CKEDITOR.plugins.scayt,c=a.dataProcessor,b=c&&c.htmlFilter,g=a._.elementsPath&&a._.elementsPath.filters,c=c&&c.dataFilter,m=a.addRemoveFormatFilter,k=function(b){if(a.scayt&&(b.hasAttribute(e.options.data_attribute_name)||b.hasAttribute(e.options.problem_grammar_data_attribute)))return!1},l=function(b){var c=
!0;a.scayt&&(b.hasAttribute(e.options.data_attribute_name)||b.hasAttribute(e.options.problem_grammar_data_attribute))&&(c=!1);return c};g&&g.push(k);c&&c.addRules({elements:{span:function(a){var b=a.hasClass(e.options.misspelled_word_class)&&a.attributes[e.options.data_attribute_name],c=a.hasClass(e.options.problem_grammar_class)&&a.attributes[e.options.problem_grammar_data_attribute];e&&(b||c)&&delete a.name;return a}}});b&&b.addRules({elements:{span:function(a){var b=a.hasClass(e.options.misspelled_word_class)&&
a.attributes[e.options.data_attribute_name],c=a.hasClass(e.options.problem_grammar_class)&&a.attributes[e.options.problem_grammar_data_attribute];e&&(b||c)&&delete a.name;return a}}});m&&m.call(a,l)},scaytMenuDefinition:function(a){var e=this,c=CKEDITOR.plugins.scayt;a=a.scayt;return{scayt:{scayt_ignore:{label:a.getLocal("btn_ignore"),group:"scayt_control",order:1,exec:function(a){a.scayt.ignoreWord()}},scayt_ignoreall:{label:a.getLocal("btn_ignoreAll"),group:"scayt_control",order:2,exec:function(a){a.scayt.ignoreAllWords()}},
scayt_add:{label:a.getLocal("btn_addWord"),group:"scayt_control",order:3,exec:function(a){var c=a.scayt;setTimeout(function(){c.addWordToUserDictionary()},10)}},scayt_option:{label:a.getLocal("btn_options"),group:"scayt_control",order:4,exec:function(a){a.scayt.tabToOpen="options";c.openDialog(e.dialogName,a)},verification:function(a){return 1==a.config.scayt_uiTabs[0]?!0:!1}},scayt_language:{label:a.getLocal("btn_langs"),group:"scayt_control",order:5,exec:function(a){a.scayt.tabToOpen="langs";c.openDialog(e.dialogName,
a)},verification:function(a){return 1==a.config.scayt_uiTabs[1]?!0:!1}},scayt_dictionary:{label:a.getLocal("btn_dictionaries"),group:"scayt_control",order:6,exec:function(a){a.scayt.tabToOpen="dictionaries";c.openDialog(e.dialogName,a)},verification:function(a){return 1==a.config.scayt_uiTabs[2]?!0:!1}},scayt_about:{label:a.getLocal("btn_about"),group:"scayt_control",order:7,exec:function(a){a.scayt.tabToOpen="about";c.openDialog(e.dialogName,a)}}},grayt:{grayt_problemdescription:{label:"Grammar problem description",
group:"grayt_description",order:1,state:CKEDITOR.TRISTATE_DISABLED,exec:function(a){}},grayt_ignore:{label:a.getLocal("btn_ignore"),group:"grayt_control",order:2,exec:function(a){a.scayt.ignorePhrase()}},grayt_ignoreall:{label:a.getLocal("btn_ignoreAll"),group:"grayt_control",order:3,exec:function(a){a.scayt.ignoreAllPhrases()}}}}},buildSuggestionMenuItems:function(a,e,c){var b={},g={},m=c?"word":"phrase",k=c?"startGrammarCheck":"startSpellCheck",l=a.scayt;if(0<e.length&&"no_any_suggestions"!==e[0])if(c)for(c=
0;c<e.length;c++){var d="scayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[c].replace(" ","_");a.addCommand(d,this.createCommand(CKEDITOR.plugins.scayt.suggestions[c],m,k));c<a.config.scayt_maxSuggestions?(a.addMenuItem(d,{label:e[c],command:d,group:"scayt_suggest",order:c+1}),b[d]=CKEDITOR.TRISTATE_OFF):(a.addMenuItem(d,{label:e[c],command:d,group:"scayt_moresuggest",order:c+1}),g[d]=CKEDITOR.TRISTATE_OFF,"on"===a.config.scayt_moreSuggestions&&(a.addMenuItem("scayt_moresuggest",{label:l.getLocal("btn_moreSuggestions"),
group:"scayt_moresuggest",order:10,getItems:function(){return g}}),b.scayt_moresuggest=CKEDITOR.TRISTATE_OFF))}else for(c=0;c<e.length;c++)d="grayt_suggest_"+CKEDITOR.plugins.scayt.suggestions[c].replace(" ","_"),a.addCommand(d,this.createCommand(CKEDITOR.plugins.scayt.suggestions[c],m,k)),a.addMenuItem(d,{label:e[c],command:d,group:"grayt_suggest",order:c+1}),b[d]=CKEDITOR.TRISTATE_OFF;else b.no_scayt_suggest=CKEDITOR.TRISTATE_DISABLED,a.addCommand("no_scayt_suggest",{exec:function(){}}),a.addMenuItem("no_scayt_suggest",
{label:l.getLocal("btn_noSuggestions")||"no_scayt_suggest",command:"no_scayt_suggest",group:"scayt_suggest",order:0});return b},menuGenerator:function(a,e){var c=a.scayt,b=this.scaytMenuDefinition(a),g={},m=a.config.scayt_contextCommands.split("|"),k=e.getAttribute(c.getLangAttribute())||c.getLang(),l,d,h,f;d=c.isScaytNode(e);h=c.isGraytNode(e);d?(b=b.scayt,l=e.getAttribute(c.getScaytNodeAttributeName()),c.fire("getSuggestionsList",{lang:k,word:l}),g=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,
d)):h&&(b=b.grayt,g=e.getAttribute(c.getGraytNodeAttributeName()),c.getGraytNodeRuleAttributeName?(l=e.getAttribute(c.getGraytNodeRuleAttributeName()),c.getProblemDescriptionText(g,l,k)):c.getProblemDescriptionText(g,k),f=c.getProblemDescriptionText(g,l,k),b.grayt_problemdescription&&f&&(f=f.replace(/([.!?])\s/g,"$1\x3cbr\x3e"),b.grayt_problemdescription.label=f),c.fire("getGrammarSuggestionsList",{lang:k,phrase:g,rule:l}),g=this.buildSuggestionMenuItems(a,CKEDITOR.plugins.scayt.suggestions,d));if(d&&
"off"==a.config.scayt_contextCommands)return g;for(var n in b)d&&-1==CKEDITOR.tools.indexOf(m,n.replace("scayt_",""))&&"all"!=a.config.scayt_contextCommands||h&&"grayt_problemdescription"!==n&&-1==CKEDITOR.tools.indexOf(m,n.replace("grayt_",""))&&"all"!=a.config.scayt_contextCommands||(g[n]="undefined"!=typeof b[n].state?b[n].state:CKEDITOR.TRISTATE_OFF,"function"!==typeof b[n].verification||b[n].verification(a)||delete g[n],a.addCommand(n,{exec:b[n].exec}),a.addMenuItem(n,{label:a.lang.scayt[b[n].label]||
b[n].label,command:n,group:b[n].group,order:b[n].order}));return g},createCommand:function(a,e,c){return{exec:function(b){b=b.scayt;var g={};g[e]=a;b.replaceSelectionNode(g);"startGrammarCheck"===c&&b.removeMarkupInSelectionNode({grammarOnly:!0});b.fire(c)}}}});CKEDITOR.plugins.scayt={charsToObserve:[{charName:"cke-fillingChar",charCode:function(){var a=CKEDITOR.version.match(/^\d(\.\d*)*/),a=a&&a[0],e;if(a){e="4.5.7";var c,a=a.replace(/\./g,"");e=e.replace(/\./g,"");c=a.length-e.length;c=0<=c?c:
0;e=parseInt(a)>=parseInt(e)*Math.pow(10,c)}return e?Array(7).join(String.fromCharCode(8203)):String.fromCharCode(8203)}()}],state:{scayt:{},grayt:{}},warningCounter:0,suggestions:[],options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0},data_attribute_name:"data-scayt-word",misspelled_word_class:"scayt-misspell-word",problem_grammar_data_attribute:"data-grayt-phrase",problem_grammar_class:"gramm-problem"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",
scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},openDialog:function(a,e){var c=e.scayt;c.isAllModulesReady&&!1===c.isAllModulesReady()||(e.lockSelection(),e.openDialog(a))},alarmCompatibilityMessage:function(){5>this.warningCounter&&(console.warn("You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at support@webspellchecker.net."),
this.warningCounter+=1)},isNewUdSupported:function(a){return a.getUserDictionary?!0:!1},reloadMarkup:function(a){var e;a&&(e=a.getScaytLangList(),a.reloadMarkup?a.reloadMarkup():(this.alarmCompatibilityMessage(),e&&e.ltr&&e.rtl&&a.fire("startSpellCheck, startGrammarCheck")))},replaceOldOptionsNames:function(a){for(var e in a)e in this.backCompatibilityMap&&(a[this.backCompatibilityMap[e]]=a[e],delete a[e])},createScayt:function(a){var e=this,c=CKEDITOR.plugins.scayt;this.loadScaytLibrary(a,function(a){function g(a){return new SCAYT.CKSCAYT(a,
function(){},function(){})}var m;a.window&&(m="BODY"==a.editable().$.nodeName?a.window.getFrame():a.editable());if(m){m={lang:a.config.scayt_sLang,container:m.$,customDictionary:a.config.scayt_customDictionaryIds,userDictionaryName:a.config.scayt_userDictionaryName,localization:a.langCode,customer_id:a.config.scayt_customerId,customPunctuation:a.config.scayt_customPunctuation,debug:a.config.scayt_debug,data_attribute_name:e.options.data_attribute_name,misspelled_word_class:e.options.misspelled_word_class,
problem_grammar_data_attribute:e.options.problem_grammar_data_attribute,problem_grammar_class:e.options.problem_grammar_class,"options-to-restore":a.config.scayt_disableOptionsStorage,focused:a.editable().hasFocus,ignoreElementsRegex:a.config.scayt_elementsToIgnore,ignoreGraytElementsRegex:a.config.grayt_elementsToIgnore,minWordLength:a.config.scayt_minWordLength,multiLanguageMode:a.config.scayt_multiLanguageMode,multiLanguageStyles:a.config.scayt_multiLanguageStyles,graytAutoStartup:a.config.grayt_autoStartup,
disableCache:a.config.scayt_disableCache,cacheSize:a.config.scayt_cacheSize,charsToObserve:c.charsToObserve};a.config.scayt_serviceProtocol&&(m.service_protocol=a.config.scayt_serviceProtocol);a.config.scayt_serviceHost&&(m.service_host=a.config.scayt_serviceHost);a.config.scayt_servicePort&&(m.service_port=a.config.scayt_servicePort);a.config.scayt_servicePath&&(m.service_path=a.config.scayt_servicePath);"boolean"===typeof a.config.scayt_ignoreAllCapsWords&&(m["ignore-all-caps-words"]=a.config.scayt_ignoreAllCapsWords);
"boolean"===typeof a.config.scayt_ignoreDomainNames&&(m["ignore-domain-names"]=a.config.scayt_ignoreDomainNames);"boolean"===typeof a.config.scayt_ignoreWordsWithMixedCases&&(m["ignore-words-with-mixed-cases"]=a.config.scayt_ignoreWordsWithMixedCases);"boolean"===typeof a.config.scayt_ignoreWordsWithNumbers&&(m["ignore-words-with-numbers"]=a.config.scayt_ignoreWordsWithNumbers);var k;try{k=g(m)}catch(l){e.alarmCompatibilityMessage(),delete m.charsToObserve,k=g(m)}k.subscribe("suggestionListSend",
function(a){for(var b={},c=[],e=0;e<a.suggestionList.length;e++)b["word_"+a.suggestionList[e]]||(b["word_"+a.suggestionList[e]]=a.suggestionList[e],c.push(a.suggestionList[e]));CKEDITOR.plugins.scayt.suggestions=c});k.subscribe("selectionIsChanged",function(d){a.getSelection().isLocked&&"restoreSelection"!==d.action&&a.lockSelection();"restoreSelection"===d.action&&a.selectionChange(!0)});k.subscribe("graytStateChanged",function(d){c.state.grayt[a.name]=d.state});k.addMarkupHandler&&k.addMarkupHandler(function(d){var c=
a.editable(),f=c.getCustomData(d.charName);f&&(f.$=d.node,c.setCustomData(d.charName,f))});a.scayt=k;a.fire("scaytButtonState",a.readOnly?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_ON)}else c.state.scayt[a.name]=!1})},destroy:function(a){a.scayt&&a.scayt.destroy();delete a.scayt;a.fire("scaytButtonState",CKEDITOR.TRISTATE_OFF)},loadScaytLibrary:function(a,e){var c,b=function(){CKEDITOR.fireOnce("scaytReady");a.scayt||"function"===typeof e&&e(a)};"undefined"===typeof window.SCAYT||"function"!==typeof window.SCAYT.CKSCAYT?
(c=a.config.scayt_srcUrl,CKEDITOR.scriptLoader.load(c,function(a){a&&b()})):window.SCAYT&&"function"===typeof window.SCAYT.CKSCAYT&&b()}};CKEDITOR.on("dialogDefinition",function(a){var e=a.data.name;a=a.data.definition.dialog;"scaytDialog"!==e&&"checkspell"!==e&&(a.on("show",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,e=a.scayt;e&&b.state.scayt[a.name]&&e.setMarkupPaused&&e.setMarkupPaused(!0)}),a.on("hide",function(a){a=a.sender&&a.sender.getParentEditor();var b=
CKEDITOR.plugins.scayt,e=a.scayt;e&&b.state.scayt[a.name]&&e.setMarkupPaused&&e.setMarkupPaused(!1)}));if("scaytDialog"===e)a.on("cancel",function(a){return!1},this,null,-1);if("checkspell"===e)a.on("cancel",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,e=a.scayt;e&&b.state.scayt[a.name]&&e.setMarkupPaused&&e.setMarkupPaused(!1);a.unlockSelection()},this,null,-2);if("link"===e)a.on("ok",function(a){var b=a.sender&&a.sender.getParentEditor();b&&setTimeout(function(){b.fire("reloadMarkupScayt",
{removeOptions:{removeInside:!0,forceBookmark:!0},timeout:0})},0)});if("replace"===e)a.on("hide",function(a){a=a.sender&&a.sender.getParentEditor();var b=CKEDITOR.plugins.scayt,e=a.scayt;a&&setTimeout(function(){e&&(e.fire("removeMarkupInDocument",{}),b.reloadMarkup(e))},0)})});CKEDITOR.on("scaytReady",function(){if(!0===CKEDITOR.config.scayt_handleCheckDirty){var a=CKEDITOR.editor.prototype;a.checkDirty=CKEDITOR.tools.override(a.checkDirty,function(a){return function(){var b=null,e=this.scayt;if(CKEDITOR.plugins.scayt&&
CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt){if(b="ready"==this.status)var m=e.removeMarkupFromString(this.getSnapshot()),e=e.removeMarkupFromString(this._.previousValue),b=b&&e!==m}else b=a.call(this);return b}});a.resetDirty=CKEDITOR.tools.override(a.resetDirty,function(a){return function(){var b=this.scayt;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[this.name]&&this.scayt?this._.previousValue=b.removeMarkupFromString(this.getSnapshot()):a.call(this)}})}if(!0===CKEDITOR.config.scayt_handleUndoRedo){var a=
CKEDITOR.plugins.undo.Image.prototype,e="function"==typeof a.equalsContent?"equalsContent":"equals";a[e]=CKEDITOR.tools.override(a[e],function(a){return function(b){var e=b.editor.scayt,m=this.contents,k=b.contents,l=null;CKEDITOR.plugins.scayt&&CKEDITOR.plugins.scayt.state.scayt[b.editor.name]&&b.editor.scayt&&(this.contents=e.removeMarkupFromString(m)||"",b.contents=e.removeMarkupFromString(k)||"");l=a.apply(this,arguments);this.contents=m;b.contents=k;return l}})}});(function(){CKEDITOR.plugins.add("selectall",
{init:function(a){a.addCommand("selectAll",{modes:{wysiwyg:1,source:1},exec:function(a){var c=a.editable();if(c.is("textarea"))a=c.$,CKEDITOR.env.ie&&a.createTextRange?a.createTextRange().execCommand("SelectAll"):(a.selectionStart=0,a.selectionEnd=a.value.length),a.focus();else{if(c.is("body"))a.document.$.execCommand("SelectAll",!1,null);else{var b=a.createRange();b.selectNodeContents(c);b.select()}a.forceNextSelectionCheck();a.selectionChange()}},canUndo:!1});a.ui.addButton&&a.ui.addButton("SelectAll",
{label:a.lang.selectall.toolbar,command:"selectAll",toolbar:"selection,10"})}})})();(function(){var a={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var c=this.state!=CKEDITOR.TRISTATE_ON||a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!a.focusManager.hasFocus?"removeClass":"attachClass";a.editable()[c]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var a="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),
c,b,g,m,k=CKEDITOR.getUrl(this.path),l=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),d=l?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",h,f;for(c=b=g=m="";h=a.pop();)f=a.length?",":"",c+=".cke_show_blocks "+h+d+f,g+=".cke_show_blocks.cke_contents_ltr "+h+d+f,m+=".cke_show_blocks.cke_contents_rtl "+h+d+f,b+=".cke_show_blocks "+h+d+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+h+".png")+")}";CKEDITOR.addCss((c+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(b,
g+"{background-position:top left;padding-left:8px}",m+"{background-position:top right;padding-right:8px}"));l||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},
init:function(e){function c(){b.refresh(e)}if(!e.blockless){var b=e.addCommand("showblocks",a);b.canUndo=!1;e.config.startupOutlineBlocks&&b.setState(CKEDITOR.TRISTATE_ON);e.ui.addButton&&e.ui.addButton("ShowBlocks",{label:e.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});e.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(e)});e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(e.on("focus",c),e.on("blur",c));e.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&
b.refresh(e)})}}})})();(function(){var a={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var c=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[c]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,
"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(e){var c=e.addCommand("showborders",a);c.canUndo=!1;!1!==e.config.startupShowBorders&&c.setState(CKEDITOR.TRISTATE_ON);e.on("mode",function(){c.state!=CKEDITOR.TRISTATE_DISABLED&&c.refresh(e)},null,null,100);e.on("contentDom",function(){c.state!=CKEDITOR.TRISTATE_DISABLED&&c.refresh(e)});e.on("removeFormatCleanup",function(a){a=a.data;e.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&a.is("table")&&(!a.hasAttribute("border")||
0>=parseInt(a.getAttribute("border"),10))&&a.addClass("cke_show_border")})},afterInit:function(a){var c=a.dataProcessor;a=c&&c.dataFilter;c=c&&c.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var c=a["class"],e=parseInt(a.border,10);e&&!(0>=e)||c&&-1!=c.indexOf("cke_show_border")||(a["class"]=(c||"")+" cke_show_border")}}});c&&c.addRules({elements:{table:function(a){a=a.attributes;var c=a["class"];c&&(a["class"]=c.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var c=a.data.name;if("table"==c||"tableProperties"==c)if(a=a.data.definition,c=a.getContents("info").get("txtBorder"),c.commit=CKEDITOR.tools.override(c.commit,function(a){return function(c,e){a.apply(this,arguments);var k=parseInt(this.getValue(),10);e[!k||0>=k?"addClass":"removeClass"]("cke_show_border")}}),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(c,e){a.apply(this,arguments);parseInt(e.getAttribute("border"),10)||e.addClass("cke_show_border")}})})})();CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(a){a.config.smiley_path=a.config.smiley_path||this.path+"images/";a.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));
a.ui.addButton&&a.ui.addButton("Smiley",{label:a.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"});CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}});CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" ");
CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";");(function(){CKEDITOR.plugins.add("sourcearea",{init:function(e){function c(){var a=g&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=
CKEDITOR.plugins.sourcearea;e.addMode("source",function(b){var g=e.ui.space("contents").getDocument().createElement("textarea");g.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",e.config.sourceAreaTabSize||4)));g.setAttribute("dir","ltr");g.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");e.ui.space("contents").append(g);g=e.editable(new a(e,
g));g.setData(e.getData(1));CKEDITOR.env.ie&&(g.attachListener(e,"resize",c,g),g.attachListener(CKEDITOR.document.getWindow(),"resize",c,g),CKEDITOR.tools.setTimeout(c,0,g));e.fire("ariaWidget",this);b()});e.addCommand("source",b.commands.source);e.ui.addButton&&e.ui.addButton("Source",{label:e.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});e.on("mode",function(){e.getCommand("source").setState("source"==e.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var g=CKEDITOR.env.ie&&9==
CKEDITOR.env.version}}});var a=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})})();CKEDITOR.plugins.sourcearea=
{commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){"wysiwyg"==a.mode&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode("source"==a.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,
lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var e=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var c=a.langCode,c=e.availableLangs[c]?c:e.availableLangs[c.replace(/-.*/,"")]?c.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e.path+"dialogs/lang/"+c+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,
e.langEntries[c]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}});CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" ");
(function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var e=a.config,c=a.lang.stylescombo,b={},g=[],m=[];a.on("stylesSet",function(c){if(c=c.data.styles){for(var l,d,h,f=0,n=c.length;f<n;f++)(l=c[f],a.blockless&&l.element in CKEDITOR.dtd.$block||"string"==typeof l.type&&!CKEDITOR.style.customHandlers[l.type]||(d=l.name,l=new CKEDITOR.style(l),a.filter.customConfig&&!a.filter.check(l)))||(l._name=d,l._.enterMode=e.enterMode,l._.type=h=l.assignedTo||l.type,l._.weight=
f+1E3*(h==CKEDITOR.STYLE_OBJECT?1:h==CKEDITOR.STYLE_BLOCK?2:3),b[d]=l,g.push(l),m.push(l));g.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:c.label,title:c.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(e.contentsCss),multiSelect:!0,attributes:{"aria-label":c.panelTitle}},init:function(){var a,b,d,e,f,m;f=0;for(m=g.length;f<m;f++)a=g[f],b=a._name,e=a._.type,e!=d&&(this.startGroup(c["panelTitle"+String(e)]),
d=e),this.add(b,a.type==CKEDITOR.STYLE_OBJECT?b:a.buildPreview(),b);this.commit()},onClick:function(c){a.focus();a.fire("saveSnapshot");c=b[c];var e=a.elementPath();if(c.group&&c.removeStylesFromSameGroup(a))a.applyStyle(c);else a[c.checkActive(e,a)?"removeStyle":"applyStyle"](c);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var e=this.getValue();c=c.data.path.elements;for(var d=0,g=c.length,f;d<g;d++){f=c[d];for(var m in b)if(b[m].checkElementRemovable(f,!0,a)){m!=
e&&this.setValue(m);return}}this.setValue("")},this)},onOpen:function(){var e=a.getSelection(),e=e.getSelectedElement()||e.getStartElement()||a.editable(),e=a.elementPath(e),g=[0,0,0,0];this.showAll();this.unmarkAll();for(var d in b){var h=b[d],f=h._.type;h.checkApplicable(e,a,a.activeFilter)?g[f]++:this.hideItem(d);h.checkActive(e,a)&&this.mark(d)}g[CKEDITOR.STYLE_BLOCK]||this.hideGroup(c["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);g[CKEDITOR.STYLE_INLINE]||this.hideGroup(c["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
g[CKEDITOR.STYLE_OBJECT]||this.hideGroup(c["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var c=a.elementPath();if(c){for(var e in b)if(b[e].checkApplicable(c,a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){b={};g=[]}})}})})();(function(){function a(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var c=b.getSelection(),e;if(e=(new CKEDITOR.dom.elementPath(c.getCommonAncestor(),c.root)).contains({td:1,
th:1},1)){var c=b.createRange(),d=CKEDITOR.tools.tryThese(function(){var b=e.getParent().$.cells[e.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=e.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(d||a)if(d)d=new CKEDITOR.dom.element(d),c.moveToElementEditStart(d),c.checkStartOfBlock()&&c.checkEndOfBlock()||c.selectNodeContents(d);else return!0;else{for(var h=e.getAscendant("table").$,d=e.getParent().$.cells,h=
new CKEDITOR.dom.element(h.insertRow(-1),b.document),f=0,n=d.length;f<n;f++)h.append((new CKEDITOR.dom.element(d[f],b.document)).clone(!1,!1)).appendBogus();c.moveToElementEditStart(h)}c.select(!0);return!0}}return!1}}}var e={editorFocus:!1,modes:{wysiwyg:1,source:1}},c={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},b={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(g){for(var m=!1!==g.config.enableTabKeyTools,k=g.config.tabSpaces||0,
l="";k--;)l+=" ";if(l)g.on("key",function(a){9==a.data.keyCode&&(g.insertText(l),a.cancel())});if(m)g.on("key",function(a){(9==a.data.keyCode&&g.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&g.execCommand("selectPreviousCell"))&&a.cancel()});g.addCommand("blur",CKEDITOR.tools.extend(c,e));g.addCommand("blurBack",CKEDITOR.tools.extend(b,e));g.addCommand("selectNextCell",a());g.addCommand("selectPreviousCell",a(!0))}})})();CKEDITOR.dom.element.prototype.focusNext=function(a,e){var c=
void 0===e?this.getTabIndex():e,b,g,m,k,l,d;if(0>=c)for(l=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);l;){if(l.isVisible()&&0===l.getTabIndex()){m=l;break}l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(l=this.getDocument().getBody().getFirst();l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!b)if(!g&&l.equals(this)){if(g=!0,a){if(!(l=l.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;b=1}}else g&&!this.contains(l)&&(b=1);if(l.isVisible()&&!(0>(d=l.getTabIndex()))){if(b&&d==c){m=
l;break}d>c&&(!m||!k||d<k)?(m=l,k=d):m||0!==d||(m=l,k=d)}}m&&m.focus()};CKEDITOR.dom.element.prototype.focusPrevious=function(a,e){for(var c=void 0===e?this.getTabIndex():e,b,g,m,k=0,l,d=this.getDocument().getBody().getLast();d=d.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!b)if(!g&&d.equals(this)){if(g=!0,a){if(!(d=d.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;b=1}}else g&&!this.contains(d)&&(b=1);if(d.isVisible()&&!(0>(l=d.getTabIndex())))if(0>=c){if(b&&0===l){m=d;break}l>k&&
(m=d,k=l)}else{if(b&&l==c){m=d;break}l<c&&(!m||l>k)&&(m=d,k=l)}}m&&m.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function e(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var c=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+
(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){if(a.styles){var c;if(a.styles.border)c=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"]&&(c=CKEDITOR.tools.style.parse.border(e["border-top"]))}c&&c.style&&"solid"===c.style&&c.width&&0!==parseFloat(c.width)&&(a.attributes.border=1);"collapse"==a.styles["border-collapse"]&&(a.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",e()));a.addCommand("tableDelete",e({exec:function(a){var c=a.elementPath().contains("table",1);if(c){var e=c.getParent(),k=a.editable();1!=e.getChildCount()||e.is("td",
"th")||e.equals(k)||(c=e);a=a.createRange();a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:c.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:c.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:c.deleteTable,command:"tableDelete",group:"table",
order:1}});a.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}});(function(){function a(a,b){function d(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function c(a){0<f.length||a.type!=CKEDITOR.NODE_ELEMENT||!x.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(e,a,"selected_cell",
!0),f.push(a))}var f=[],e={};if(!a)return f;for(var g=a.getRanges(),h=0;h<g.length;h++){var k=g[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&d(k)&&f.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=c;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")&&d(l)&&(CKEDITOR.dom.element.setMarker(e,l,"selected_cell",!0),f.push(l))}}CKEDITOR.dom.element.clearAllMarkers(e);return f}
function e(b,d){for(var c=q(b)?b:a(b),f=c[0],e=f.getAscendant("table"),f=f.getDocument(),g=c[0].getParent(),h=g.$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=new CKEDITOR.dom.element(e.$.rows[k]),h=d?h:k,g=d?g:c,c=CKEDITOR.tools.buildTableMap(e),e=c[h],h=d?c[h-1]:c[h+1],c=c[0].length,f=f.createElement("tr"),k=0;e[k]&&k<c;k++){var l;1<e[k].rowSpan&&h&&e[k]==h[k]?(l=e[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(e[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),f.append(l),
l=l.$);k+=l.colSpan-1}d?f.insertBefore(g):f.insertAfter(g);return f}function c(b){if(b instanceof CKEDITOR.dom.selection){var d=b.getRanges(),f=a(b),e=f[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(e),h=f[0].getParent().$.rowIndex,f=f[f.length-1],k=f.getParent().$.rowIndex+f.$.rowSpan-1,f=[];b.reset();for(b=h;b<=k;b++){for(var l=g[b],m=new CKEDITOR.dom.element(e.$.rows[b]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),q=p.getParent().$.rowIndex;1==p.$.rowSpan?p.remove():(--p.$.rowSpan,
q==b&&(q=g[b+1],q[n-1]?p.insertAfter(new CKEDITOR.dom.element(q[n-1])):(new CKEDITOR.dom.element(e.$.rows[b+1])).append(p,1)));n+=p.$.colSpan-1}f.push(m)}g=e.$.rows;d[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||e.$.parentNode);for(b=f.length;0<=b;b--)c(f[b]);return e.$.parentNode?h:(d[0].select(),null)}b instanceof CKEDITOR.dom.element&&(e=b.getAscendant("table"),1==e.$.rows.length?e.remove():b.remove());return null}function b(a){for(var b=
a.getParent().$.cells,d=0,c=0;c<b.length;c++){var f=b[c],d=d+f.colSpan;if(f==a.$)break}return d-1}function g(a,d){for(var c=d?Infinity:0,f=0;f<a.length;f++){var e=b(a[f]);if(d?e<c:e>c)c=e}return c}function m(b,d){for(var c=q(b)?b:a(b),f=c[0].getAscendant("table"),e=g(c,1),c=g(c),h=d?e:c,k=CKEDITOR.tools.buildTableMap(f),f=[],e=[],c=[],l=k.length,m=0;m<l;m++)f.push(k[m][h]),e.push(d?k[m][h-1]:k[m][h+1]);for(m=0;m<l;m++)f[m]&&(1<f[m].colSpan&&e[m]==f[m]?(k=f[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(f[m]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[d?"insertBefore":"insertAfter"].call(k,h),c.push(k),k=k.$),m+=k.rowSpan-1);return c}function k(b){function d(a){var b,c,f;b=a.getRanges();if(1!==b.length)return a;b=b[0];if(b.collapsed||0!==b.endOffset)return a;c=b.endContainer;f=c.getName().toLowerCase();if("td"!==f&&"th"!==f)return a;for((f=c.getPrevious())||(f=c.getParent().getPrevious().getLast());f.type!==CKEDITOR.NODE_TEXT&&"br"!==f.getName().toLowerCase();)if(f=f.getLast(),!f)return a;
b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);return b.select()}CKEDITOR.env.webkit&&!b.isFake&&(b=d(b));var c=b.getRanges(),f=a(b),e=f[0],g=f[f.length-1],f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k,l,m=[];b.reset();var n=0;for(b=h.length;n<b;n++)for(var p=0,q=h[n].length;p<q;p++)void 0===k&&h[n][p]==e.$&&(k=p),h[n][p]==g.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<h.length;p++)g=h[p],e=new CKEDITOR.dom.element(f.$.rows[p]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,
p+=g.$.rowSpan-1,e.$.cells.length||m.push(e));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(f.$.parentNode);m.length==b&&(c[0].moveToPosition(f,CKEDITOR.POSITION_AFTER_END),c[0].select(),f.remove());return k}function l(a,b){var d=a.getStartElement().getAscendant({td:1,th:1},!0);if(d){var c=d.clone();c.appendBogus();b?c.insertBefore(d):c.insertAfter(d)}}function d(b){if(b instanceof CKEDITOR.dom.selection){var c=
b.getRanges(),f=a(b),e=f[0]&&f[0].getAscendant("table"),g;a:{var k=0;g=f.length-1;for(var l={},m,n;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);g=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?g=k.getLast():(k=f[g].getParent(),g=(k=k.getNext())?k.getChild(0):null)}b.reset();for(b=
f.length-1;0<=b;b--)d(f[b]);g?h(g,!0):e&&(c[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),c[0].select(),e.remove())}else b instanceof CKEDITOR.dom.element&&(c=b.getParent(),1==c.getChildCount()?c.remove():b.remove())}function h(a,b){var d=a.getDocument(),c=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(c.focus(),d.focus());d=new CKEDITOR.dom.range(d);d["moveToElementEdit"+(b?"End":"Start")](a)||(d.selectNodeContents(a),d.collapse(b?!1:!0));d.select(!0)}function f(a,b,d){a=a[b];
if("undefined"==typeof d)return a;for(b=0;a&&b<a.length;b++){if(d.is&&a[b]==d.$)return b;if(b==d)return new CKEDITOR.dom.element(a[b])}return d.is?-1:null}function n(b,d,c){var e=a(b),g;if((d?1!=e.length:2>e.length)||(g=b.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;var h;b=e[0];g=b.getAscendant("table");var k=CKEDITOR.tools.buildTableMap(g),l=k.length,m=k[0].length,n=b.getParent().$.rowIndex,p=f(k,n,b);if(d){var q;try{var v=parseInt(b.getAttribute("rowspan"),10)||1;
h=parseInt(b.getAttribute("colspan"),10)||1;q=k["up"==d?n-v:"down"==d?n+v:n]["left"==d?p-h:"right"==d?p+h:p]}catch(x){return!1}if(!q||b.$==q)return!1;e["up"==d||"left"==d?"unshift":"push"](new CKEDITOR.dom.element(q))}d=b.getDocument();var M=n,v=q=0,H=!c&&new CKEDITOR.dom.documentFragment(d),E=0;for(d=0;d<e.length;d++){h=e[d];var O=h.getParent(),S=h.getFirst(),Q=h.$.colSpan,L=h.$.rowSpan,O=O.$.rowIndex,W=f(k,O,h),E=E+Q*L,v=Math.max(v,W-p+Q);q=Math.max(q,O-n+L);c||(Q=h,(L=Q.getBogus())&&L.remove(),
Q.trim(),h.getChildren().count()&&(O==M||!S||S.isBlockBoundary&&S.isBlockBoundary({br:1})||(M=H.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!M||M.is&&M.is("br")||H.append("br")),h.moveChildren(H)),d?h.remove():h.setHtml(""));M=O}if(c)return q*v==E;H.moveChildren(b);b.appendBogus();v>=m?b.removeAttribute("rowSpan"):b.$.rowSpan=q;q>=l?b.removeAttribute("colSpan"):b.$.colSpan=v;c=new CKEDITOR.dom.nodeList(g.$.rows);e=c.count();for(d=e-1;0<=d;d--)g=c.getItem(d),g.$.cells.length||(g.remove(),e++);return b}
function p(b,d){var c=a(b);if(1<c.length)return!1;if(d)return!0;var c=c[0],e=c.getParent(),g=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=e.$.rowIndex,l=f(h,k,c),m=c.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),e=k+n,g=new CKEDITOR.dom.element(g.$.rows[e]),h=f(h,e),p,e=c.clone(),k=0;k<h.length;k++)if(p=h[k],p.parentNode==g.$&&k>l){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||g.append(e)}else for(m=n=1,g=e.clone(),g.insertAfter(e),g.append(e=c.clone()),
p=f(h,k),l=0;l<p.length;l++)p[l].rowSpan++;e.appendBogus();c.$.rowSpan=n;e.$.rowSpan=m;1==n&&c.removeAttribute("rowSpan");1==m&&e.removeAttribute("rowSpan");return e}function v(b,d){var c=a(b);if(1<c.length)return!1;if(d)return!0;var c=c[0],e=c.getParent(),g=e.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=f(g,e.$.rowIndex,c),k=c.$.colSpan;if(1<k)e=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=e=1,l=[],m=0;m<g.length;m++){var n=g[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(g=
0;g<l.length;g++)l[g].colSpan++}g=c.clone();g.insertAfter(c);g.appendBogus();c.$.colSpan=e;g.$.colSpan=k;1==e&&c.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var x=/^(?:td|th)$/,q=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(b){function f(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(a,
d){var c=b.addCommand(a,d);b.addFeature(c)}var q=b.lang.table,r=CKEDITOR.tools.style.parse,x="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",f({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:x,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&
r.background(a.styles.background).color},right:function(a){a.styles["background-color"]=r.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&
(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");g("rowDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();(a=c(a))&&h(a)}}));g("rowInsertBefore",f({requiredContent:"table",exec:function(b){b=
b.getSelection();b=a(b);e(b,!0)}}));g("rowInsertAfter",f({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);e(b)}}));g("columnDelete",f({requiredContent:"table",exec:function(a){a=a.getSelection();(a=k(a))&&h(a,!0)}}));g("columnInsertBefore",f({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);m(b,!0)}}));g("columnInsertAfter",f({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);m(b)}}));g("cellDelete",f({requiredContent:"table",exec:function(a){a=
a.getSelection();d(a)}}));g("cellMerge",f({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());h(b.cell,!0)}}));g("cellMergeRight",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");h(b.cell,!0)}}));g("cellMergeDown",f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");h(b.cell,!0)}}));g("cellVerticalSplit",
f({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){h(v(a.getSelection()))}}));g("cellHorizontalSplit",f({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){h(p(a.getSelection()))}}));g("cellInsertBefore",f({requiredContent:"table",exec:function(a){a=a.getSelection();l(a,!0)}}));g("cellInsertAfter",f({requiredContent:"table",exec:function(a){a=a.getSelection();l(a)}}));b.addMenuItems&&b.addMenuItems({tablecell:{label:q.cell.menu,group:"tablecell",
order:1,getItems:function(){var d=b.getSelection(),c=a(d),d={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(d,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(d,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(d,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:v(d,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
tablecell_split_horizontal:p(d,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};b.filter.check(x)&&(d.tablecell_properties=0<c.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return d}},tablecell_insertBefore:{label:q.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:q.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:q.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:q.cell.merge,
group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:q.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:q.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:q.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:q.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:q.cell.title,
group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:q.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:q.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:q.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:q.row.deleteRow,
group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:q.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:q.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:q.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:q.column.deleteColumn,
group:"tablecolumn",command:"columnDelete",order:15}});b.contextMenu&&b.contextMenu.addListener(function(a,b,d){return(a=d.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:b,insertRow:e,insertColumn:m,getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)})();CKEDITOR.tools.buildTableMap=function(a,e,c,b,g){a=a.$.rows;c=c||0;b="number"===typeof b?b:a.length-
1;g="number"===typeof g?g:-1;var m=-1,k=[];for(e=e||0;e<=b;e++){m++;!k[m]&&(k[m]=[]);for(var l=-1,d=c;d<=(-1===g?a[e].cells.length-1:g);d++){var h=a[e].cells[d];if(!h)break;for(l++;k[m][l];)l++;for(var f=isNaN(h.colSpan)?1:h.colSpan,h=isNaN(h.rowSpan)?1:h.rowSpan,n=0;n<h&&!(e+n>b);n++){k[m+n]||(k[m+n]=[]);for(var p=0;p<f;p++)k[m+n][l+p]=a[e].cells[d]}l+=f-1;if(-1!==g&&l>=g)break}}return k};(function(){function a(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function e(a,
b){var d=a.getAscendant("table"),c=b.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(d),e=h(a),g=h(b),k=[],l={},m,n;d.contains(c)&&(b=b.getAscendant({td:1,th:1}),g=h(b));e>g&&(d=e,e=g,g=d,d=a,a=b,b=d);for(d=0;d<f[e].length;d++)if(a.$===f[e][d]){m=d;break}for(d=0;d<f[g].length;d++)if(b.$===f[g][d]){n=d;break}m>n&&(d=m,m=n,n=d);for(d=e;d<=g;d++)for(e=m;e<=n;e++)c=new CKEDITOR.dom.element(f[d][e]),c.$&&!c.getCustomData("selected_cell")&&(k.push(c),CKEDITOR.dom.element.setMarker(l,c,"selected_cell",
!0));CKEDITOR.dom.element.clearAllMarkers(l);return k}function c(a){if(a)return a=a.clone(),a.enlarge(CKEDITOR.ENLARGE_ELEMENT),(a=a.getEnclosedNode())&&a.is&&a.is(CKEDITOR.dtd.$tableContent)}function b(a){return(a=a.editable().findOne(".cke_table-faked-selection"))&&a.getAscendant("table")}function g(a,b){var d=a.editable().find(".cke_table-faked-selection"),c=a.editable().findOne("[data-cke-table-faked-selection-table]"),f;a.fire("lockSnapshot");a.editable().removeClass("cke_table-faked-selection-editor");
for(f=0;f<d.count();f++)d.getItem(f).removeClass("cke_table-faked-selection");c&&c.data("cke-table-faked-selection-table",!1);a.fire("unlockSnapshot");b&&(u={active:!1},a.getSelection().isInTable()&&a.getSelection().reset())}function m(a,b){var d=[],c,f;for(f=0;f<b.length;f++)c=a.createRange(),c.setStartBefore(b[f]),c.setEndAfter(b[f]),d.push(c);a.getSelection().selectRanges(d)}function k(a){var b=a.editable().find(".cke_table-faked-selection");1>b.count()||(b=e(b.getItem(0),b.getItem(b.count()-1)),
m(a,b))}function l(b,d,c){var f=t(b.getSelection(!0));d=d.is("table")?null:d;var h;(h=u.active&&!u.first)&&!(h=d)&&(h=b.getSelection().getRanges(),h=1<f.length||h[0]&&!h[0].collapsed?!0:!1);if(h)u.first=d||f[0],u.dirty=d?!1:1!==f.length;else if(u.active&&d&&u.first.getAscendant("table").equals(d.getAscendant("table"))){f=e(u.first,d);if(!u.dirty&&1===f.length&&!a(c.data.getTarget()))return g(b,"mouseup"===c.name);u.dirty=!0;u.last=d;m(b,f)}}function d(a){var b=(a=a.editor||a.sender.editor)&&a.getSelection(),
d=b&&b.getRanges()||[],c=d&&d[0].getEnclosedNode(),c=c&&c.type==CKEDITOR.NODE_ELEMENT&&c.is("img"),f;if(b&&(g(a),b.isInTable()&&b.isFake))if(c)a.getSelection().reset();else if(!d[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")){1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table")&&(f=d[0]._getTableElement());f=t(b,f);a.fire("lockSnapshot");for(b=0;b<f.length;b++)f[b].addClass("cke_table-faked-selection");0<f.length&&(a.editable().addClass("cke_table-faked-selection-editor"),
f[0].getAscendant("table").data("cke-table-faked-selection-table",""));a.fire("unlockSnapshot")}}function h(a){return a.getAscendant("tr",!0).$.rowIndex}function f(d){function c(a,b){return a&&b?a.equals(b)||a.contains(b)||b.contains(a)||a.getCommonAncestor(b).is(r):!1}function e(a){return!a.getAscendant("table",!0)&&a.getDocument().equals(m.document)}function h(a,b,d,c){if("mousedown"===a.name&&(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT||!c))return!0;if(b=a.name===(CKEDITOR.env.gecko?
"mousedown":"mouseup")&&!e(a.data.getTarget()))a=a.data.getTarget().getAscendant({td:1,th:1},!0),b=!(a&&a.hasClass("cke_table-faked-selection"));return b}if(d.data.getTarget().getName&&("mouseup"===d.name||!a(d.data.getTarget()))){var m=d.editor||d.listenerData.editor,n=m.getSelection(1),p=b(m),q=d.data.getTarget(),v=q&&q.getAscendant({td:1,th:1},!0),q=q&&q.getAscendant("table",!0),r={table:1,thead:1,tbody:1,tfoot:1,tr:1,td:1,th:1};q&&q.hasAttribute("data-cke-tableselection-ignored")||(h(d,n,p,q)&&
g(m,!0),!u.active&&"mousedown"===d.name&&CKEDITOR.tools.getMouseButton(d)===CKEDITOR.MOUSE_BUTTON_LEFT&&q&&(u={active:!0},CKEDITOR.document.on("mouseup",f,null,{editor:m})),(v||q)&&l(m,v||q,d),"mouseup"===d.name&&(CKEDITOR.tools.getMouseButton(d)===CKEDITOR.MOUSE_BUTTON_LEFT&&(e(d.data.getTarget())||c(p,q))&&k(m),u={active:!1},CKEDITOR.document.removeListener("mouseup",f)))}}function n(a){var b=a.data.getTarget().getAscendant("table",!0);b&&b.hasAttribute("data-cke-tableselection-ignored")||(b=a.data.getTarget().getAscendant({td:1,
th:1},!0))&&!b.hasClass("cke_table-faked-selection")&&(a.cancel(),a.data.preventDefault())}function p(a,b){function d(a){a.cancel()}var c=a.getSelection(),f=c.createBookmarks(),e=a.document,g=a.createRange(),h=e.getDocumentElement().$,k=CKEDITOR.env.ie&&9>CKEDITOR.env.version,l=a.blockless||CKEDITOR.env.ie?"span":"div",m,n,p,q;e.getById("cke_table_copybin")||(m=e.createElement(l),n=e.createElement(l),n.setAttributes({id:"cke_table_copybin","data-cke-temp":"1"}),m.setStyles({position:"absolute",width:"1px",
height:"1px",overflow:"hidden"}),m.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-5000px"),m.setHtml(a.getSelectedHtml(!0)),a.fire("lockSnapshot"),n.append(m),a.editable().append(n),q=a.on("selectionChange",d,null,null,0),k&&(p=h.scrollTop),g.selectNodeContents(m),g.select(),k&&(h.scrollTop=p),setTimeout(function(){n.remove();c.selectBookmarks(f);q.removeListener();a.fire("unlockSnapshot");b&&(a.extractSelectedHtml(),a.fire("saveSnapshot"))},100))}function v(a){var b=a.editor||a.sender.editor,
d=b.getSelection();d.isInTable()&&(d.getRanges()[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored")||p(b,"cut"===a.name))}function x(a){this._reset();a&&this.setSelectedCells(a)}function q(a,b,d){a.on("beforeCommandExec",function(d){-1!==CKEDITOR.tools.array.indexOf(b,d.data.name)&&(d.data.selectedCells=t(a.getSelection()))});a.on("afterCommandExec",function(c){-1!==CKEDITOR.tools.array.indexOf(b,c.data.name)&&d(a,c.data)})}var u={active:!1},w,t,z,r,y;x.prototype={};x.prototype._reset=
function(){this.cells={first:null,last:null,all:[]};this.rows={first:null,last:null}};x.prototype.setSelectedCells=function(a){this._reset();a=a.slice(0);this._arraySortByDOMOrder(a);this.cells.all=a;this.cells.first=a[0];this.cells.last=a[a.length-1];this.rows.first=a[0].getAscendant("tr");this.rows.last=this.cells.last.getAscendant("tr")};x.prototype.getTableMap=function(){var a=z(this.cells.first),b;a:{b=this.cells.last;var d=b.getAscendant("table"),c=h(b),d=CKEDITOR.tools.buildTableMap(d),f;for(f=
0;f<d[c].length;f++)if((new CKEDITOR.dom.element(d[c][f])).equals(b)){b=f;break a}b=void 0}return CKEDITOR.tools.buildTableMap(this._getTable(),h(this.rows.first),a,h(this.rows.last),b)};x.prototype._getTable=function(){return this.rows.first.getAscendant("table")};x.prototype.insertRow=function(a,b,d){if("undefined"===typeof a)a=1;else if(0>=a)return;for(var c=this.cells.first.$.cellIndex,f=this.cells.last.$.cellIndex,e=d?[]:this.cells.all,g,h=0;h<a;h++)g=r(d?this.cells.all:e,b),g=CKEDITOR.tools.array.filter(g.find("td, th").toArray(),
function(a){return d?!0:a.$.cellIndex>=c&&a.$.cellIndex<=f}),e=b?g.concat(e):e.concat(g);this.setSelectedCells(e)};x.prototype.insertColumn=function(a){function b(a){a=h(a);return a>=f&&a<=e}if("undefined"===typeof a)a=1;else if(0>=a)return;for(var d=this.cells,c=d.all,f=h(d.first),e=h(d.last),d=0;d<a;d++)c=c.concat(CKEDITOR.tools.array.filter(y(c),b));this.setSelectedCells(c)};x.prototype.emptyCells=function(a){a=a||this.cells.all;for(var b=0;b<a.length;b++)a[b].setHtml("")};x.prototype._arraySortByDOMOrder=
function(a){a.sort(function(a,b){return a.getPosition(b)&CKEDITOR.POSITION_PRECEDING?-1:1})};var A={onPaste:function(a){function b(a){return Math.max.apply(null,CKEDITOR.tools.array.map(a,function(a){return a.length},0))}function d(a){var b=f.createRange();b.selectNodeContents(a);b.select()}var f=a.editor,g=f.getSelection(),h=g.getRanges(),h=h.length&&h[0]._getTableElement({table:1});if(!h||!h.hasAttribute("data-cke-tableselection-ignored")){var k=t(g),h=this.findTableInPastedContent(f,a.data.dataValue),
l=g.isInTable(!0)&&this.isBoundarySelection(g),n,p;!k.length||1===k.length&&!c(g.getRanges()[0])&&!l||l&&!h||(k=k[0].getAscendant("table"),n=new x(t(g,k)),f.once("afterPaste",function(){var a;if(p){a=new CKEDITOR.dom.element(p[0][0]);var b=p[p.length-1];a=e(a,new CKEDITOR.dom.element(b[b.length-1]))}else a=n.cells.all;m(f,a)}),h?(a.stop(),l?(n.insertRow(1,1===l,!0),g.selectElement(n.rows.first)):(n.emptyCells(),m(f,n.cells.all)),a=n.getTableMap(),p=CKEDITOR.tools.buildTableMap(h),n.insertRow(p.length-
a.length),n.insertColumn(b(p)-b(a)),a=n.getTableMap(),this.pasteTable(n,a,p),f.fire("saveSnapshot"),setTimeout(function(){f.fire("afterPaste")},0)):(d(n.cells.first),f.once("afterPaste",function(){f.fire("lockSnapshot");n.emptyCells(n.cells.all.slice(1));m(f,n.cells.all);f.fire("unlockSnapshot")})))}},isBoundarySelection:function(a){a=a.getRanges()[0];var b=a.endContainer.getAscendant("tr",!0);if(b&&a.collapsed){if(a.checkBoundaryOfElement(b,CKEDITOR.START))return 1;if(a.checkBoundaryOfElement(b,
CKEDITOR.END))return 2}return 0},findTableInPastedContent:function(a,b){var d=a.dataProcessor,c=new CKEDITOR.dom.element("body");d||(d=new CKEDITOR.htmlDataProcessor(a));c.setHtml(d.toHtml(b),{fixForBody:!1});return 1<c.getChildCount()?null:c.findOne("table")},pasteTable:function(a,b,d){var c,f=z(a.cells.first),e=a._getTable(),g={},h,k,l,m;for(l=0;l<d.length;l++)for(h=new CKEDITOR.dom.element(e.$.rows[a.rows.first.$.rowIndex+l]),m=0;m<d[l].length;m++)if(k=new CKEDITOR.dom.element(d[l][m]),c=b[l]&&
b[l][m]?new CKEDITOR.dom.element(b[l][m]):null,k&&!k.getCustomData("processed")){if(c&&c.getParent())k.replace(c);else if(0===m||d[l][m-1])(c=0!==m?new CKEDITOR.dom.element(d[l][m-1]):null)&&h.equals(c.getParent())?k.insertAfter(c):0<f?h.$.cells[f]?k.insertAfter(new CKEDITOR.dom.element(h.$.cells[f])):h.append(k):h.append(k,!0);CKEDITOR.dom.element.setMarker(g,k,"processed",!0)}else k.getCustomData("processed")&&c&&c.remove();CKEDITOR.dom.element.clearAllMarkers(g)}};CKEDITOR.plugins.tableselection=
{getCellsBetween:e,keyboardIntegration:function(a){function b(a){var d=a.getEnclosedNode();d&&"function"===typeof d.is&&d.is({td:1,th:1})?d.setText(""):a.deleteContents();CKEDITOR.tools.array.forEach(a._find("td"),function(a){a.appendBogus()})}var d=a.editable();d.attachListener(d,"keydown",function(a){function d(b,c){if(!c.length)return null;var e=a.createRange(),g=CKEDITOR.dom.range.mergeRanges(c);CKEDITOR.tools.array.forEach(g,function(a){a.enlarge(CKEDITOR.ENLARGE_ELEMENT)});var h=g[0].getBoundaryNodes(),
k=h.startNode,h=h.endNode;if(k&&k.is&&k.is(f)){for(var l=k.getAscendant("table",!0),m=k.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l),n=!1,p=function(a){return!k.contains(a)&&a.is&&a.is("td","th")};m&&!p(m);)m=m.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT,l);!m&&h&&h.is&&!h.is("table")&&h.getNext()&&(m=h.getNext().findOne("td, th"),n=!0);if(m)e["moveToElementEdit"+(n?"Start":"End")](m);else e.setStartBefore(k.getAscendant("table",!0)),e.collapse(!0);g[0].deleteContents();return[e]}if(k)return e.moveToElementEditablePosition(k),
[e]}var c={37:1,38:1,39:1,40:1,8:1,46:1,13:1},f=CKEDITOR.tools.extend({table:1},CKEDITOR.dtd.$tableContent);delete f.td;delete f.th;return function(f){var e=f.data.getKey(),g=f.data.getKeystroke(),h,k=37===e||38==e,l,m,n;if(c[e]&&!a.readOnly&&(h=a.getSelection())&&h.isInTable()&&h.isFake){l=h.getRanges();m=l[0]._getTableElement();n=l[l.length-1]._getTableElement();if(13!==e||a.plugins.enterkey)f.data.preventDefault(),f.cancel();if(36<e&&41>e)l[0].moveToElementEditablePosition(k?m:n,!k),h.selectRanges([l[0]]);
else if(13!==e||13===g||g===CKEDITOR.SHIFT+13){for(f=0;f<l.length;f++)b(l[f]);(f=d(m,l))?l=f:l[0].moveToElementEditablePosition(m);h.selectRanges(l);13===e&&a.plugins.enterkey?(a.fire("lockSnapshot"),13===g?a.execCommand("enter"):a.execCommand("shiftEnter"),a.fire("unlockSnapshot"),a.fire("saveSnapshot")):13!==e&&a.fire("saveSnapshot")}}}}(a),null,null,-1);d.attachListener(d,"keypress",function(d){var c=a.getSelection(),f=d.data.$.charCode||13===d.data.getKey(),e;if(!a.readOnly&&c&&c.isInTable()&&
c.isFake&&f&&!(d.data.getKeystroke()&CKEDITOR.CTRL)){d=c.getRanges();f=d[0].getEnclosedNode().getAscendant({td:1,th:1},!0);for(e=0;e<d.length;e++)b(d[e]);f&&(d[0].moveToElementEditablePosition(f),c.selectRanges([d[0]]))}},null,null,-1)}};CKEDITOR.plugins.add("tableselection",{requires:"clipboard,tabletools",isSupportedEnvironment:function(){return!(CKEDITOR.env.ie&&11>CKEDITOR.env.version)},onLoad:function(){w=CKEDITOR.plugins.tabletools;t=w.getSelectedCells;z=w.getCellColIndex;r=w.insertRow;y=w.insertColumn;
CKEDITOR.document.appendStyleSheet(this.path+"styles/tableselection.css")},init:function(a){this.isSupportedEnvironment()&&(a.addContentsCss&&a.addContentsCss(this.path+"styles/tableselection.css"),a.on("contentDom",function(){var b=a.editable(),c=b.isInline()?b:a.document,e={editor:a};b.attachListener(c,"mousedown",f,null,e);b.attachListener(c,"mousemove",f,null,e);b.attachListener(c,"mouseup",f,null,e);b.attachListener(b,"dragstart",n);b.attachListener(a,"selectionCheck",d);CKEDITOR.plugins.tableselection.keyboardIntegration(a);
CKEDITOR.plugins.clipboard&&!CKEDITOR.plugins.clipboard.isCustomCopyCutSupported&&(b.attachListener(b,"cut",v),b.attachListener(b,"copy",v))}),a.on("paste",A.onPaste,A),q(a,"rowInsertBefore rowInsertAfter columnInsertBefore columnInsertAfter cellInsertBefore cellInsertAfter".split(" "),function(a,b){m(a,b.selectedCells)}),q(a,["cellMerge","cellMergeRight","cellMergeDown"],function(a,b){m(a,[b.commandData.cell])}),q(a,["cellDelete"],function(a){g(a,!0)}))}})})();(function(){CKEDITOR.plugins.add("templates",
{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var a={},e={};CKEDITOR.addTemplates=function(c,b){a[c]=b};CKEDITOR.getTemplates=function(c){return a[c]};CKEDITOR.loadTemplates=function(a,b){for(var g=[],m=0,k=a.length;m<k;m++)e[a[m]]||(g.push(a[m]),
e[a[m]]=1);g.length?CKEDITOR.scriptLoader.load(g,b):setTimeout(b,0)}})();CKEDITOR.config.templates_files=[CKEDITOR.getUrl("plugins/templates/templates/default.js")];CKEDITOR.config.templates_replaceContent=!0;"use strict";(function(){function a(a,b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var e=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],c={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function c(a){g.enabled&&!1!==a.data.command.canUndo&&
g.save()}function f(){g.enabled=a.readOnly?!1:"wysiwyg"==a.mode;g.onChange()}var g=a.undoManager=new b(a),l=g.editingHandler=new k(g),m=a.addCommand("undo",{exec:function(){g.undo()&&(a.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),x=a.addCommand("redo",{exec:function(){g.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[e[0],"undo"],[e[1],"redo"],[e[2],"redo"]]);g.onChange=function(){m.setState(g.undoable()?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED);x.setState(g.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",c);a.on("afterCommandExec",c);a.on("saveSnapshot",function(a){g.save(a.data&&a.data.contentOnly)});a.on("contentDom",l.attachListeners,l);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&g.save(!0)});a.on("mode",f);a.on("readOnly",f);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",
toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){g.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){g.currentImage&&g.update()});a.on("lockSnapshot",function(a){a=a.data;g.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",g.unlock,g)}});CKEDITOR.plugins.undo={};var b=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,"")})};b.prototype={type:function(a,c){var f=b.getKeyGroup(a),e=this.strokesRecorded[f]+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[f]=e;this.previousKeyGroup=f},keyGroupChanged:function(a){return b.getKeyGroup(a)!=
this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,c){var e=this.editor;if(this.locked||"ready"!=e.status||"wysiwyg"!=e.mode)return!1;var k=e.editable();if(!k||
"ready"!=k.status)return!1;k=this.snapshots;b||(b=new g(e));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==c&&e.fire("change");k.splice(this.index+1,k.length-this.index-1);k.length==this.limit&&k.shift();this.index=k.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);
a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,e;if(c)if(a)for(e=this.index-1;0<=e;e--){if(a=b[e],!c.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e<b.length;e++)if(a=b[e],!c.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 g(this.editor));for(var b=this.index,c=this.snapshots;0<b&&this.currentImage.equalsContent(c[b-
1]);)--b;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var b=this.snapshots,c=b[b.length-1];return c.equalsContent(a)&&!c.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;else if(a)this.locked={level:1};else{var c=null;if(b)c=!0;else{var e=new g(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(e)&&(c=e)}this.locked={update:c,level:1}}},
unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=new g(this.editor,!0);a.equalsContent(b)||this.update()}}},addFilterRule:function(a){this._filterRules.push(a)}};b.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};b.keyGroups={PRINTABLE:0,FUNCTIONAL:1};b.isNavigationKey=function(a){return!!b.navigationKeyCodes[a]};b.getKeyGroup=function(a){var e=b.keyGroups;return c[a]?e.FUNCTIONAL:e.PRINTABLE};b.getOppositeKeyGroup=
function(a){var c=b.keyGroups;return a==c.FUNCTIONAL?c.PRINTABLE:c.FUNCTIONAL};b.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&b.getKeyGroup(a)==b.keyGroups.FUNCTIONAL};var g=CKEDITOR.plugins.undo.Image=function(b,c){this.editor=b;b.fire("beforeUndoImage");var f=b.getSnapshot();f&&(this.contents=a(f,b.undoManager._filterRules));c||(this.bookmarks=(f=f&&b.getSelection())&&f.createBookmarks2(!0));b.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;g.prototype={equalsContent:function(a){var b=
this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(m,""),a=a.replace(m,""));return b!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var c=0;c<b.length;c++){var e=b[c],g=a[c];if(e.startOffset!=g.startOffset||e.endOffset!=g.endOffset||!CKEDITOR.tools.arrayCompare(e.start,g.start)||!CKEDITOR.tools.arrayCompare(e.end,g.end))return!1}}return!0}};var k=CKEDITOR.plugins.undo.NativeEditingHandler=
function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new l;this.lastKeydownImage=null};k.prototype={onKeydown:function(a){var c=a.data.getKey();if(229!==c)if(-1<CKEDITOR.tools.indexOf(e,a.data.getKeystroke()))a.data.preventDefault();else if(this.keyEventsStack.cleanUp(a),a=this.undoManager,this.keyEventsStack.getLast(c)||this.keyEventsStack.push(c),this.lastKeydownImage=new g(a.editor),b.isNavigationKey(c)||this.undoManager.keyGroupChanged(c))if(a.strokesRecorded[0]||a.strokesRecorded[1])a.save(!1,
this.lastKeydownImage,!1),a.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(a){var c=this.undoManager;a=a.data.getKey();var f=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);
if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new g(c.editor,!0))))if(0<f)c.type(a);else if(b.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new g(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,c=a.editable(),
f=this;c.attachListener(c,"keydown",function(a){f.onKeydown(a);if(b.ieFunctionalKeysBug(a.data.getKey()))f.onInput()},null,null,999);c.attachListener(c,CKEDITOR.env.ie?"keypress":"input",f.onInput,f,null,999);c.attachListener(c,"keyup",f.onKeyup,f,null,999);c.attachListener(c,"paste",f.ignoreInputEventListener,f,null,999);c.attachListener(c,"drop",f.ignoreInputEventListener,f,null,999);a.on("afterPaste",f.activateInputEventListener,f,null,999);c.attachListener(c.isInline()?c:a.document.getDocumentElement(),
"click",function(){f.onNavigationKey()},null,null,999);c.attachListener(this.undoManager.editor,"blur",function(){f.keyEventsStack.remove(9)},null,null,999)}};var l=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};l.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);
return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}})();
"use strict";(function(){function a(a,b){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),doc:a.document,win:a.window},b,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function e(a,b){CKEDITOR.tools.extend(this,b,{editor:a},!0)}function c(a,b){var c=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:c,inline:c.isInline(),doc:a.document,win:a.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},
b,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var e=CKEDITOR.tools.bind(this.queryViewport,this),k=CKEDITOR.tools.bind(this.hideVisible,this),l=CKEDITOR.tools.bind(this.removeAll,this);c.attachListener(this.winTop,"resize",e);c.attachListener(this.winTop,"scroll",e);c.attachListener(this.winTop,"resize",k);c.attachListener(this.win,"scroll",k);c.attachListener(this.inline?c: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);c.attachListener(a,"resize",e);c.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({},
m,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},g,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function b(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(k[a.getComputedStyle("float")]||k[a.getAttribute("align")]);return b&&
!l[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;a.prototype={start:function(a){var b=this,c=this.editor,e=this.doc,g,k,l,m,u=CKEDITOR.tools.eventsBuffer(50,function(){c.readOnly||"wysiwyg"!=c.mode||(b.relations={},(k=e.$.elementFromPoint(l,m))&&k.nodeType&&(g=new CKEDITOR.dom.element(k),b.traverseSearch(g),isNaN(l+m)||b.pixelSearch(g,l,m),a&&a(b.relations,l,m)))});this.listener=this.editable.attachListener(this.target,
"mousemove",function(a){l=a.data.$.clientX;m=a.data.$.clientY;u.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){u.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var c=this.editor.createRange();c.moveToPosition(this.relations[b.uid].element,
a[b.type]);return c}}(),store:function(){function a(b,c,d){var e=b.getUniqueId();e in d?d[e].type|=c:d[e]={element:b,type:c}}return function(c,e){var g;e&CKEDITOR.LINEUTILS_AFTER&&b(g=c.getNext())&&g.isVisible()&&(a(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_AFTER);e&CKEDITOR.LINEUTILS_INSIDE&&b(g=c.getFirst())&&g.isVisible()&&(a(g,CKEDITOR.LINEUTILS_BEFORE,this.relations),e^=CKEDITOR.LINEUTILS_INSIDE);a(c,e,this.relations)}}(),traverseSearch:function(a){var c,e,g;do if(g=a.$["data-cke-expando"],
!(g&&g in this.relations)){if(a.equals(this.editable))break;if(b(a))for(c in this.lookups)(e=this.lookups[c](a))&&this.store(a,e)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(d,e,g,k,l){for(var m=0,u;l(g);){g+=k;if(25==++m)break;if(u=this.doc.$.elementFromPoint(e,g))if(u==d)m=0;else if(c(d,u)&&(m=0,b(u=new CKEDITOR.dom.element(u))))return u}}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,e,g){var h=this.win.getViewPaneSize().height,k=a.call(this,c.$,e,g,-1,function(a){return 0<a});e=a.call(this,c.$,e,g,1,function(a){return a<h});if(k)for(this.traverseSearch(k);!k.getParent().equals(c);)k=k.getParent();if(e)for(this.traverseSearch(e);!e.getParent().equals(c);)e=e.getParent();for(;k||e;){k&&(k=k.getNext(b));if(!k||k.equals(e))break;this.traverseSearch(k);e&&(e=e.getPrevious(b));if(!e||e.equals(k))break;this.traverseSearch(e)}}}(),
greedySearch:function(){this.relations={};for(var a=this.editable.getElementsByTag("*"),c=0,e,g,k;e=a.getItem(c++);)if(!e.equals(this.editable)&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasAttribute("contenteditable")||!e.isReadOnly())&&b(e)&&e.isVisible())for(k in this.lookups)(g=this.lookups[k](e))&&this.store(e,g);return this.relations}};e.prototype={locate:function(){function a(c,d){var e=c.element[d===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&b(e)?(c.siblingRect=e.getClientRect(),
d==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):d==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(b){var c;this.locations={};for(var e in b)c=b[e],c.elementRect=c.element.getClientRect(),c.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(e,CKEDITOR.LINEUTILS_BEFORE,a(c,CKEDITOR.LINEUTILS_BEFORE)),c.type&CKEDITOR.LINEUTILS_AFTER&&this.store(e,CKEDITOR.LINEUTILS_AFTER,a(c,CKEDITOR.LINEUTILS_AFTER)),c.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(e,CKEDITOR.LINEUTILS_INSIDE,(c.elementRect.top+c.elementRect.bottom)/2);return this.locations}}(),sort:function(){var a,b,c,e;return function(g,k){a=this.locations;b=[];for(var l in a)for(var m in a[l])if(c=Math.abs(g-a[l][m]),b.length){for(e=0;e<b.length;e++)if(c<b[e].dist){b.splice(e,0,{uid:+l,type:m,dist:c});break}e==b.length&&b.push({uid:+l,type:m,dist:c})}else b.push({uid:+l,type:m,dist:c});return"undefined"!=typeof k?b.slice(0,k):b}}(),store:function(a,
b,c){this.locations[a]||(this.locations[a]={});this.locations[a][b]=c}};var g={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},m={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};c.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var b=a.getUniqueId();
a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},placeLine:function(a,b){var c,e,g;if(c=this.getStyle(a.uid,a.type)){for(g in this.visible)if(this.visible[g].getCustomData("hash")!==this.hash){e=this.visible[g];break}if(!e)for(g in this.hidden)if(this.hidden[g].getCustomData("hash")!==this.hash){this.showLine(e=this.hidden[g]);
break}e||this.showLine(e=this.addLine());e.setCustomData("hash",this.hash);this.visible[e.getUniqueId()]=e;e.setStyles(c);b&&b(e)}},getStyle:function(a,b){var c=this.relations[a],e=this.locations[a][b],g={};g.width=c.siblingRect?Math.max(c.siblingRect.width,c.elementRect.width):c.elementRect.width;g.top=this.inline?e+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+e;if(g.top-this.winTopScroll.y<this.rect.top||g.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
g.left=c.elementRect.left-this.rect.relativeX:(0<c.elementRect.left?g.left=this.rect.left+c.elementRect.left:(g.width+=c.elementRect.left,g.left=this.rect.left),0<(c=g.left+g.width-(this.rect.left+this.winPane.width))&&(g.width-=c));g.left+=this.winTopScroll.x;for(var k in g)g[k]=CKEDITOR.tools.cssLength(g[k]);return g},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,b){this.relations=a;this.locations=b;this.hash=Math.random()},
cleanup:function(){var a,b;for(b in this.visible)a=this.visible[b],a.getCustomData("hash")!==this.hash&&this.hideLine(a)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(a){a=a.getClientRect();var b=this.container.getDocumentPosition(),c=this.container.getComputedStyle("position");a.relativeX=a.relativeY=
0;"static"!=c&&(a.relativeY=b.y,a.relativeX=b.x,a.top-=a.relativeY,a.bottom-=a.relativeY,a.left-=a.relativeX,a.right-=a.relativeX);return a}};var k={left:1,right:1,center:1},l={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:a,locator:e,liner:c}})();(function(){function a(a){return a.getName&&!a.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(a){if(CKEDITOR.env.webkit){var c=CKEDITOR.plugins.widgetselection;a.on("contentDom",function(a){a=a.editor;var e=
a.editable();e.attachListener(e,"keydown",function(a){a.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){c.addFillers(e)||c.removeFillers(e)},0)},null,null,-1);a.on("selectionCheck",function(a){c.removeFillers(a.editor.editable())});a.on("paste",function(a){a.data.dataValue=c.cleanPasteData(a.data.dataValue)});"selectall"in a.plugins&&c.addSelectAllIntegration(a)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",
fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(e){var c=e.editor;if(!this.isWholeContentSelected(e)&&0<e.getChildCount()){var b=e.getFirst(a),g=e.getLast(a);b&&b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable()&&(this.startFiller=this.createFiller(),e.append(this.startFiller,1));g&&g.type==CKEDITOR.NODE_ELEMENT&&!g.isEditable()&&(this.endFiller=this.createFiller(!0),e.append(this.endFiller,0));if(this.hasFiller(e))return c=c.createRange(),c.selectNodeContents(e),c.select(),!0}return!1},
removeFillers:function(a){if(this.hasFiller(a)&&!this.isWholeContentSelected(a)){var c=a.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),b=a.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&c&&this.startFiller.equals(c)?this.removeFiller(this.startFiller,a):this.startFiller=c;this.endFiller&&b&&this.endFiller.equals(b)?this.removeFiller(this.endFiller,a):this.endFiller=b}},cleanPasteData:function(a){a&&a.length&&(a=a.replace(this.createFillerRegex(),
"").replace(this.createFillerRegex(!0),""));return a},isWholeContentSelected:function(a){var c=a.editor.getSelection().getRanges()[0];return!c||c&&c.collapsed?!1:(c=c.clone(),c.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(c&&a&&c.startContainer&&c.endContainer&&0===c.startOffset&&c.endOffset===a.getChildCount()&&c.startContainer.equals(a)&&c.endContainer.equals(a)))},hasFiller:function(a){return 0<a.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(a){var c=new CKEDITOR.dom.element(this.fillerTagName);
c.setHtml(this.fillerContent);c.setAttribute(this.fillerAttribute,a?"end":"start");c.setAttribute("data-cke-temp",1);c.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return c},removeFiller:function(a,c){if(a){var b=c.editor,g=c.editor.getSelection().getRanges()[0].startPath(),m=b.createRange(),k,l;g.contains(a)&&(k=a.getHtml(),l=!0);g="start"==a.getAttribute(this.fillerAttribute);a.remove();k&&0<k.length&&
k!=this.fillerContent?(c.insertHtmlIntoRange(k,b.getSelection().getRanges()[0]),m.setStartAt(c.getChild(c.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),b.getSelection().selectRanges([m])):l&&(g?m.setStartAt(c.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):m.setEndAt(c.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),c.editor.getSelection().selectRanges([m]))}},createFillerRegex:function(a){var c=this.createFiller(a).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,
"\x3e[^\x3c]*\x3c");return new RegExp((a?"":"^")+c+(a?"$":""))},addSelectAllIntegration:function(a){var c=this;a.editable().attachListener(a,"beforeCommandExec",function(b){var g=a.editable();"selectAll"==b.data.name&&g&&c.addFillers(g)},null,null,9999)}}})();"use strict";(function(){function a(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};F(this);B(this);this.on("checkWidgets",
k);this.editor.on("contentDomInvalidated",this.checkWidgets,this);C(this);r(this);y(this);z(this);A(this)}function e(a,b,c,d,f){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:e.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);S(this,d);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));f&&this.setData(f);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;V(this);this.fire("data",this.data);this.isInited()&&g.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function c(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 b(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),f,g=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(e,b,c&&c.startupData))?(e=f.once("edit",function(b){if(b.data.dialog)f.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(f,!0)});b.once("hide",function(){c.removeListener();
e.removeListener()})});else d()},null,null,999),f.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function g(a,b){function c(a,d){var e=b.upcast.split(","),f,g;for(g=0;g<e.length;g++)if(f=e[g],f===a.name)return b.upcasts[f].call(this,a,d);return!1}function d(b,c,e){var f=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,
0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c,b,f):d(e,b,f))}function m(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function k(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,f,g,h;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(f=k.count();d<f;d++){g=k.getItem(d);if(h=!this.getByElement(g,!0)){a:{h=q;for(var l=g;l=l.getParent();)if(h(l)){h=!0;break a}h=!1}h=!h}h&&b.contains(g)&&(g.addClass("cke_widget_new"),c.push(this.initOn(g.getFirst(e.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function l(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=d(a),c=h(a),e=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=
1,b.value=b.value.replace(/^\s/g,"\x26nbsp;"),e=!0);c&&c.value&&c.value.match(/\s$/g)&&(c.parent.attributes["data-cke-white-space-last"]=1,c.value=c.value.replace(/\s$/g,"\x26nbsp;"),e=!0);e&&(a.attributes["data-cke-widget-white-space"]=1)}}function d(a){return a.find(function(a){return 3===a.type},!0).shift()}function h(a){return a.find(function(a){return 3===a.type},!0).pop()}function f(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 f,g,h,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(e.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(f=d.length;k<f;++k)if(!1===d[k](a))return;for(k=0;k<l;++k)if(f=c[k],h={},g=f[0](a,h))return g instanceof CKEDITOR.htmlParser.element&&(a=g),a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(h)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,f[1]]),!1}}}}function p(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 v(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 v(e,b,c)}}a.add(c,b)}function x(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function q(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 w(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function t(a,
b){return CKEDITOR.tools.trim(b)}function z(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;e.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id",d.id),b.focus(),d.focus())});b.on("drop",function(c){var d=c.data.dataTransfer,e=d.getData("cke/widget-id"),f=d.getTransferType(b),d=b.createRange();""!==e&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c.cancel():""!==e&&f==CKEDITOR.DATA_TRANSFER_INTERNAL&&(e=a.instances[e])&&
(d.setStartBefore(e.wrapper),d.setEndAfter(e.wrapper),c.data.dragRange=d,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",e.getClipboardHtml()),b.widgets.destroy(e,!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)&&!e.isDomNestedEditable(b)&&
!a._.draggedWidget.wrapper.contains(b)){var c=e.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 r(a){var b=
a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,f,g;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();f=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;g=0;f&&(f.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(g=1,a.focused!=f&&b.getSelection().removeAllRanges()):e.getNestedEditable(f.wrapper,d)?f=null:(c.data.preventDefault(),CKEDITOR.env.ie||f.focus()))});c.attachListener(d,"mouseup",function(){g&&
f&&f.wrapper&&(g=0,f.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){f&&f.wrapper&&c.contains(f.wrapper)&&(f.focus(),f=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!e.getNestedEditable(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function y(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 A(a){function b(d){1>a.selected.length||M(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 C(a){var b=a.editor;b.on("selectionCheck",function(){a.fire("checkSelection")});a.on("checkSelection",a.checkSelection,a);b.on("selectionChange",function(c){var d=(c=e.getNestedEditable(b.editable(),c.data.selection.getStartElement()))&&a.getByElement(c),f=a.widgetHoldingFocusedEditable;f?f===d&&f.focusedEditable.equals(c)||(u(a,f,null),d&&c&&u(a,d,c)):d&&c&&u(a,d,c)});b.on("dataReady",function(){G(a).commit()});b.on("blur",function(){var b;(b=a.focused)&&
m(a,b);(b=a.widgetHoldingFocusedEditable)&&u(a,b,null)})}function B(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var f=CKEDITOR.tools.getNextNumber(),g=[];b.data.downcastingSessionId=f;c[f]=g;b.data.dataValue.forEach(function(b){var c=b.attributes,f;if("data-cke-widget-white-space"in c){f=d(b);var k=h(b);f.parent.attributes["data-cke-white-space-first"]&&(f.value=f.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
c){if(c=a.instances[c["data-cke-widget-id"]])f=b.getFirst(e.isParserWidgetElement),g.push({wrapper:b,element:f,widget:c,editables:{}}),"1"!=f.attributes["data-cke-widget-keep-attr"]&&delete f.attributes["data-widget"]}else if("data-cke-widget-editable"in c)return 0<g.length&&(g[g.length-1].editables[c["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=c[a.data.downcastingSessionId],d,e,f,g,h,k;d=b.shift();){e=
d.widget;f=d.element;g=e._.downcastFn&&e._.downcastFn.call(e,f);a.data.widgetsCopy&&e.getClipboardHtml&&(g=CKEDITOR.htmlParser.fragment.fromHtml(e.getClipboardHtml()),g=g.children[0]);for(k in d.editables)h=d.editables[k],delete h.attributes.contenteditable,h.setHtml(e.editables[k].getData());g||(g=f);d.wrapper.replaceWith(g)}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function F(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=n(a),f;for(b.data.dataValue.forEach(d.iterator,
CKEDITOR.NODE_ELEMENT,!0);f=d.toBeWrapped.pop();){var g=f[0],h=g.parent;h.type==CKEDITOR.NODE_ELEMENT&&h.attributes["data-cke-widget-wrapper"]&&h.replaceWith(g);a.wrapElement(f[0],f[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&e.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&e.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),f,g,h=
0,k=c.count();h<k;++h)f=c.getItem(h),g=f.getFirst(e.isDomWidgetElement),g.type==CKEDITOR.NODE_ELEMENT&&g.data("widget")?(g.replace(f),a.wrapElement(g)):f.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(X,t);a.range&&(a=e.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 G(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 f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&m(a,
g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function J(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"").replace(/<span[^>]*cke_widget_drag_handler_container[^>]*.*?<\/span>/gmi,
"")})}function K(a,b,c){var d=0;b=H(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function D(a){a.cancel()}function M(a,b){function c(){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)}var d=a.widgets.focused,e,f,g;R.hasCopyBin(a)||(f=new R(a,{beforeDestroy:function(){!b&&
d&&d.focus();g&&a.getSelection().selectBookmarks(g);e&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(d?a.widgets.del(d):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),d||(e=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),g=a.getSelection().createBookmarks(!0)),f.handle(c()))}function H(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function E(){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 O(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function S(a,b){Q(a);L(a);W(a);T(a);N(a);aa(a);ba(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();e.getNestedEditable(a,c)||a.inline&&e.isDomDragHandler(c)||b.data.preventDefault()});
a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){M(a.editor,b==CKEDITOR.CTRL+88);return}if(b in P||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 Q(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}
function L(a){if(a.parts){var b={},c,d;for(d in a.parts)c=a.wrapper.findOne(a.parts[d]),b[d]=c;a.parts=b}}function W(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 T(a){if(!0===a.mask)Z(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,ga,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 f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function Z(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 ga(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(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 N(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(e.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",U,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function U(a){function b(){var c;for(p.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,
f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.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,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),
p=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;p.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}}function aa(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);
for(c in a)this.addClass(c);b=a}})}function ba(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function V(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function da(){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,f=0;f<e;){if(c.call(d,a[f],f,a))return a[f];f++}}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 f in a)if(("object"!==typeof a[f]||"object"!==typeof c[f]||!b(a[f],c[f]))&&a[f]!==c[f])return!1;return!0}return function(c){return b(a.getDefinition(),c.getDefinition())}}var f=a.widget,g;d[f]||(d[f]={});for(var h=0,k=a.group.length;h<
k;h++)g=a.group[h],d[f][g]||(d[f][g]=[]),g=d[f][g],b(g,e(a))||g.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 f=0,g=this.group.length;f<g;f++){c=d[this.widget][this.group[f]];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 e.isDomWidgetWrapper(a)?(a=a.getFirst(e.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}'),
da())},beforeInit:function(b){void 0!==CKEDITOR.document.$.querySelectorAll&&(b.widgets=new a(b))},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"});w(a);J(a.undoManager)}}});a.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,c){var d=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=a;
c._=c._||{};d.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));b(d,c);g(this,c);this.registered[a]=c;if(c.dialog&&d.plugins.dialog)var e=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var b=a.dialog;a.getMode||b.getName()!==c.dialog||(a.getMode=function(){var a=b.getModel(d);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});e.removeListener()});return c},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},
checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=G(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=e.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(),f=0;f<e;++f)(c=this.getByElement(d.getItem(f),!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,
a)},finalizeCreation:function(a){(a=a.getFirst())&&e.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 e(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(e.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=x(d,a.getName()))&&l(a);c=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());c.setAttributes(p(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=x(d,a.name))&&l(a);c=new CKEDITOR.htmlParser.element(e?"span":"div",p(e,b));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var f;d&&(f=a.getIndex(),a.remove());c.add(a);d&&v(d,f,c)}return c},_tests_createEditableFilter:f};CKEDITOR.event.implementOn(a.prototype);e.prototype=
{addClass:function(a){this.element.addClass(a);this.wrapper.addClass(e.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){K(this,a,1)},checkStyleActive:function(a){a=H(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",O);c.removeListener("blur",E);this.editor.focusManager.remove(c);if(c.filter){for(var e in this.repository.instances){var f=this.repository.instances[e];f.editables&&(f=f.editables[a])&&f!==c&&c.filter===f.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 d=this._findOneNotNested(b.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new c(this.editor,d,{filter:f.call(this.repository,this.name,a,b)}),this.editables[a]=d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":d.enterMode}),d.filter&&d.data("cke-filter",d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),b.pathName&&d.data("cke-display-name",
b.pathName),this.editor.focusManager.add(d),d.on("focus",O,this),CKEDITOR.env.ie&&d.on("blur",E,this),d._.initialSetData=!0,d.setData(d.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(e.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()},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(e.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){K(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&&(V(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};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(e.prototype);e.getNestedEditable=function(a,b){return!b||b.equals(a)?null:e.isDomNestedEditable(b)?b:e.getNestedEditable(a,b.getParent())};e.isDomDragHandler=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};e.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};e.isDomNestedEditable=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};e.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};e.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};e.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};e.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};e.isParserWidgetWrapper=
function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};e.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";c.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.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 X=/^(?:<(?: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,P={37:1,38:1,39:1,40:1,8:1,46:1};P[CKEDITOR.SHIFT+121]=1;
var R=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,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,n,p,q;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);n=c.on("selectionChange",D,null,null,0);p=c.widgets.on("checkSelection",D,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();p.removeListener();c.fire("unlockSnapshot");h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!R.getCopyBin(a)},
getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=e;e.repository=a;e.nestedEditable=c})();(function(){function a(a,b,e){this.editor=a;this.notification=null;this._message=new CKEDITOR.template(b);this._singularMessage=e?new CKEDITOR.template(e):null;this._tasks=[];this._doneTasks=this._doneWeights=this._totalWeights=0}function e(a){this._weight=a||1;this._doneWeight=0;this._isCanceled=!1}CKEDITOR.plugins.add("notificationaggregator",{requires:"notification"});
a.prototype={createTask:function(a){a=a||{};var b=!this.notification,e;b&&(this.notification=this._createNotification());e=this._addTask(a);e.on("updated",this._onTaskUpdate,this);e.on("done",this._onTaskDone,this);e.on("canceled",function(){this._removeTask(e)},this);this.update();b&&this.notification.show();return e},update:function(){this._updateNotification();this.isFinished()&&this.fire("finished")},getPercentage:function(){return 0===this.getTaskCount()?1:this._doneWeights/this._totalWeights},
isFinished:function(){return this.getDoneTaskCount()===this.getTaskCount()},getTaskCount:function(){return this._tasks.length},getDoneTaskCount:function(){return this._doneTasks},_updateNotification:function(){this.notification.update({message:this._getNotificationMessage(),progress:this.getPercentage()})},_getNotificationMessage:function(){var a=this.getTaskCount(),b={current:this.getDoneTaskCount(),max:a,percentage:Math.round(100*this.getPercentage())};return(1==a&&this._singularMessage?this._singularMessage:
this._message).output(b)},_createNotification:function(){return new CKEDITOR.plugins.notification(this.editor,{type:"progress"})},_addTask:function(a){a=new e(a.weight);this._tasks.push(a);this._totalWeights+=a._weight;return a},_removeTask:function(a){var b=CKEDITOR.tools.indexOf(this._tasks,a);-1!==b&&(a._doneWeight&&(this._doneWeights-=a._doneWeight),this._totalWeights-=a._weight,this._tasks.splice(b,1),this.update())},_onTaskUpdate:function(a){this._doneWeights+=a.data;this.update()},_onTaskDone:function(){this._doneTasks+=
1;this.update()}};CKEDITOR.event.implementOn(a.prototype);e.prototype={done:function(){this.update(this._weight)},update:function(a){if(!this.isDone()&&!this.isCanceled()){a=Math.min(this._weight,a);var b=a-this._doneWeight;this._doneWeight=a;this.fire("updated",b);this.isDone()&&this.fire("done")}},cancel:function(){this.isDone()||this.isCanceled()||(this._isCanceled=!0,this.fire("canceled"))},isDone:function(){return this._weight===this._doneWeight},isCanceled:function(){return this._isCanceled}};
CKEDITOR.event.implementOn(e.prototype);CKEDITOR.plugins.notificationAggregator=a;CKEDITOR.plugins.notificationAggregator.task=e})();"use strict";(function(){CKEDITOR.plugins.add("uploadwidget",{requires:"widget,clipboard,filetools,notificationaggregator",init:function(a){a.filter.allow("*[!data-widget,!data-cke-upload-id]")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported}});CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,
{addUploadWidget:function(a,e,c){var b=CKEDITOR.fileTools,g=a.uploadRepository,m=c.supportedTypes?10:20;if(c.fileToElement)a.on("paste",function(c){c=c.data;var l=a.widgets.registered[e],d=c.dataTransfer,h=d.getFilesCount(),f=l.loadMethod||"loadAndUpload",m,p;if(!c.dataValue&&h)for(p=0;p<h;p++)if(m=d.getFile(p),!l.supportedTypes||b.isTypeSupported(m,l.supportedTypes)){var v=l.fileToElement(m);m=g.create(m,void 0,l.loaderType);v&&(m[f](l.uploadUrl,l.additionalRequestParameters),CKEDITOR.fileTools.markElement(v,
e,m.id),"loadAndUpload"!=f&&"upload"!=f||l.skipNotifications||CKEDITOR.fileTools.bindNotifications(a,m),c.dataValue+=v.getOuterHtml())}},null,null,m);CKEDITOR.tools.extend(c,{downcast:function(){return new CKEDITOR.htmlParser.text("")},init:function(){var b=this,c=this.wrapper.findOne("[data-cke-upload-id]").data("cke-upload-id"),d=g.loaders[c],e=CKEDITOR.tools.capitalize,f,m;d.on("update",function(g){if("abort"===d.status&&"function"===typeof b.onAbort)b.onAbort(d);if(b.wrapper&&b.wrapper.getParent()){a.fire("lockSnapshot");
g="on"+e(d.status);if("abort"===d.status||"function"!==typeof b[g]||!1!==b[g](d))m="cke_upload_"+d.status,b.wrapper&&m!=f&&(f&&b.wrapper.removeClass(f),b.wrapper.addClass(m),f=m),"error"!=d.status&&"abort"!=d.status||a.widgets.del(b);a.fire("unlockSnapshot")}else CKEDITOR.instances[a.name]&&a.editable().find('[data-cke-upload-id\x3d"'+c+'"]').count()||d.abort(),g.removeListener()});d.update()},replaceWith:function(b,c){if(""===b.trim())a.widgets.del(this);else{var d=this==a.widgets.focused,e=a.editable(),
f=a.createRange(),g,m;d||(m=a.getSelection().createBookmarks());f.setStartBefore(this.wrapper);f.setEndAfter(this.wrapper);d&&(g=f.createBookmark());e.insertHtmlIntoRange(b,f,c);a.widgets.checkWidgets({initOnlyNew:!0});a.widgets.destroy(this,!0);d?(f.moveToBookmark(g),f.select()):a.getSelection().selectBookmarks(m)}},_getLoader:function(){var a=this.wrapper.findOne("[data-cke-upload-id]");return a?this.editor.uploadRepository.loaders[a.data("cke-upload-id")]:null}});a.widgets.add(e,c)},markElement:function(a,
e,c){a.setAttributes({"data-cke-upload-id":c,"data-widget":e})},bindNotifications:function(a,e){function c(){b=a._.uploadWidgetNotificaionAggregator;if(!b||b.isFinished())b=a._.uploadWidgetNotificaionAggregator=new CKEDITOR.plugins.notificationAggregator(a,a.lang.uploadwidget.uploadMany,a.lang.uploadwidget.uploadOne),b.once("finished",function(){var c=b.getTaskCount();0===c?b.notification.hide():b.notification.update({message:1==c?a.lang.uploadwidget.doneOne:a.lang.uploadwidget.doneMany.replace("%1",
c),type:"success",important:1})})}var b,g=null;e.on("update",function(){!g&&e.uploadTotal&&(c(),g=b.createTask({weight:e.uploadTotal}));g&&"uploading"==e.status&&g.update(e.uploaded)});e.on("uploaded",function(){g&&g.done()});e.on("error",function(){g&&g.cancel();a.showNotification(e.message,"warning")});e.on("abort",function(){g&&g.cancel();CKEDITOR.instances[a.name]&&a.showNotification(a.lang.uploadwidget.abort,"info")})}})})();"use strict";(function(){function a(a){9>=a&&(a="0"+a);return String(a)}
function e(b){var e=new Date,e=[e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()];c+=1;return"image-"+CKEDITOR.tools.array.map(e,a).join("")+"-"+c+"."+b}var c=0;CKEDITOR.plugins.add("uploadimage",{requires:"uploadwidget",onLoad:function(){CKEDITOR.addCss(".cke_upload_uploading img{opacity: 0.3}")},isSupportedEnvironment:function(){return CKEDITOR.plugins.clipboard.isFileApiSupported},init:function(a){if(this.isSupportedEnvironment()){var c=CKEDITOR.fileTools,m=
c.getUploadUrl(a.config,"image");m&&(c.addUploadWidget(a,"uploadimage",{supportedTypes:/image\/(jpeg|png|gif|bmp)/,uploadUrl:m,fileToElement:function(){var a=new CKEDITOR.dom.element("img");a.setAttribute("src","data:image/gif;base64,R0lGODlhDgAOAIAAAAAAAP///yH5BAAAAAAALAAAAAAOAA4AAAIMhI+py+0Po5y02qsKADs\x3d");return a},parts:{img:"img"},onUploading:function(a){this.parts.img.setAttribute("src",a.data)},onUploaded:function(a){var b=this.parts.img.$;this.replaceWith('\x3cimg src\x3d"'+a.url+'" width\x3d"'+
(a.responseData.width||b.naturalWidth)+'" height\x3d"'+(a.responseData.height||b.naturalHeight)+'"\x3e')}}),a.on("paste",function(k){if(k.data.dataValue.match(/<img[\s\S]+data:/i)){k=k.data;var l=document.implementation.createHTMLDocument(""),l=new CKEDITOR.dom.element(l.body),d,h,f;l.data("cke-editable",1);l.appendHtml(k.dataValue);d=l.find("img");for(f=0;f<d.count();f++){h=d.getItem(f);var n=h.getAttribute("src"),p=n&&"data:"==n.substring(0,5),v=null===h.data("cke-realelement");p&&v&&!h.data("cke-upload-id")&&
!h.isReadOnly(1)&&(p=(p=n.match(/image\/([a-z]+?);/i))&&p[1]||"jpg",n=a.uploadRepository.create(n,e(p)),n.upload(m),c.markElement(h,"uploadimage",n.id),c.bindNotifications(a,n))}k.dataValue=l.getHtml()}}))}}})})();CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(a){a.config.wsc_onFinish="function"===typeof a.config.wsc_onFinish?a.config.wsc_onFinish:function(){};a.config.wsc_onClose="function"===typeof a.config.wsc_onClose?a.config.wsc_onClose:function(){}},parseConfig:function(a){a.config.wsc_customerId=
a.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";a.config.wsc_customDictionaryIds=a.config.wsc_customDictionaryIds||CKEDITOR.config.wsc_customDictionaryIds||"";a.config.wsc_userDictionaryName=a.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"";a.config.wsc_customLoaderScript=a.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript;a.config.wsc_interfaceLang=a.config.wsc_interfaceLang;
CKEDITOR.config.wsc_cmd=a.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell";CKEDITOR.config.wsc_version="v4.3.0-master-d769233";CKEDITOR.config.wsc_removeGlobalVariable=!0},onLoad:function(a){"moono-lisa"==(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(CKEDITOR.getUrl(this.path+"skins/"+CKEDITOR.skin.name+"/wsc.css"))},init:function(a){var e=CKEDITOR.env;this.parseConfig(a);this.parseApi(a);a.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&
!CKEDITOR.env.air&&document.domain==window.location.hostname&&!(e.ie&&(8>e.version||e.quirks))};"undefined"==typeof a.plugins.scayt&&a.ui.addButton&&a.ui.addButton("SpellChecker",{label:a.lang.wsc.toolbar,click:function(a){var b=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(b=b.replace(/\s/g,""))?a.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?
"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}});(function(){function a(a){function b(a){var c=!1;f.attachListener(f,"keydown",function(){var b=l.getBody().getElementsByTag(a);if(!c){for(var d=0;d<b.count();d++)b.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);f.attachListener(f,"keyup",function(){var b=l.getElementsByTag(a);c&&(1==b.count()&&!b.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(b.getItem(0).getAttributes())&&b.getItem(0).remove(1),
c=!1)})}var c=this.editor;if(c&&!c.isDetached()){var l=a.document,d=l.body,h=l.getElementById("cke_actscrpt");h&&h.parentNode.removeChild(h);(h=l.getElementById("cke_shimscrpt"))&&h.parentNode.removeChild(h);(h=l.getElementById("cke_basetagscrpt"))&&h.parentNode.removeChild(h);d.contentEditable=!0;CKEDITOR.env.ie&&(d.hideFocus=!0,d.disabled=!0,d.removeAttribute("disabled"));delete this._.isLoadingData;this.$=d;l=new CKEDITOR.dom.document(l);this.setup();this.fixInitialSelection();var f=this;CKEDITOR.env.ie&&
!CKEDITOR.env.edge&&l.getDocumentElement().addClass(l.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&c.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&c.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)l.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){c.editable().focus()})});e(c);try{c.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||
CKEDITOR.env.ie&&"CSS1Compat"==c.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){c.getSelection().scrollIntoView()},0);else if(c.window.$.innerHeight>this.$.offsetHeight){var d=c.createRange();d[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(l,"blur",function(){try{l.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&
this.attachListener(l,"touchend",function(){a.focus()});d=c.document.getElementsByTag("title").getItem(0);d.data("cke-title",d.getText());CKEDITOR.env.ie&&(c.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");c.fire("contentDom");this._.isPendingFocus&&(c.focus(),this._.isPendingFocus=!1);setTimeout(function(){c.fire("dataReady")},0)},0,this)}}function e(a){function b(){var d;a.editable().attachListener(a,"selectionChange",function(){var b=
a.getSelection().getSelectedElement();b&&(d&&(d.detachEvent("onresizestart",c),d=null),b.$.attachEvent("onresizestart",c),d=b.$)})}function c(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var e=a.document.$;e.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);e.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(d){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function c(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");
var b=[],c;for(c in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+c+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var b;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});a.addMode("wysiwyg",function(c){function e(f){f&&f.removeListener();a.isDestroyed()||a.isDetached()||(a.editable(new b(a,d.$.contentWindow.document.body)),a.setData(a.getData(1),c))}var l="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",l=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(l)+"}())":"",d=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+
l+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');d.setStyles({width:"100%",height:"100%"});d.addClass("cke_wysiwyg_frame").addClass("cke_reset");l=a.ui.space("contents");l.append(d);var h=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(h)d.on("load",e);var f=a.title,n=a.fire("ariaEditorHelpLabel",{}).label;f&&(CKEDITOR.env.ie&&n&&(f+=", "+n),d.setAttribute("title",f));if(n){var f=CKEDITOR.tools.getNextId(),p=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+
n+"\x3c/span\x3e");l.append(p,1);d.setAttribute("aria-describedby",f)}a.on("beforeModeUnload",function(a){a.removeListener();p&&p.remove()});d.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!h&&e();a.fire("ariaWidget",d)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,c=b.contentsCss;CKEDITOR.tools.isArray(c)||(b.contentsCss=c?[c]:[]);b.contentsCss.push(a)};b=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=
CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,b){var e=this.editor;if(b)this.setHtml(a),this.fixInitialSelection(),e.fire("dataReady");else{this._.isLoadingData=!0;e._.dataStore={id:1};var l=e.config,d=l.fullPage,h=l.docType,f=CKEDITOR.tools.buildStyleHtml(c()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');d||(f+=CKEDITOR.tools.buildStyleHtml(e.config.contentsCss));
var n=l.baseHref?'\x3cbase href\x3d"'+l.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";d&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){e.docType=h=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){e.xmlDeclaration=a;return""}));a=e.dataProcessor.toHtml(a);d?(/<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*>/,f+"$\x26"),a=h+a):a=l.docType+'\x3chtml dir\x3d"'+l.contentsLangDirection+'" lang\x3d"'+(l.contentsLanguage||e.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+f+"\x3c/head\x3e\x3cbody"+(l.bodyId?' id\x3d"'+l.bodyId+'"':"")+(l.bodyClass?' class\x3d"'+l.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")));l='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(l+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(l+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');a=a.replace(/(?=\s*<\/(:?head)>)/,l);this.clearCustomData();this.clearListeners();e.fire("contentDomUnload");var p=this.getDocument();try{p.write(a)}catch(v){setTimeout(function(){p.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,c=b.fullPage,e=c&&a.docType,d=c&&a.xmlDeclaration,
h=this.getDocument(),c=c?h.getDocumentElement().getOuterHtml():h.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/<br>(?=\s*(:?$|<\/body>))/,""));c=a.dataProcessor.toDataFormat(c);d&&(c=d+"\n"+c);e&&(c=e+"\n"+c);return c},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:b.baseProto.focus.call(this)},detach:function(){var a=this.editor,c=a.document,a=a.container.findOne("iframe.cke_wysiwyg_frame");b.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber);
c.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);a&&(a.clearCustomData(),(c=a.removeCustomData("onResize"))&&c.removeListener(),a.isDetached()||a.remove())}}})})();CKEDITOR.config.disableObjectResizing=!1;CKEDITOR.config.disableNativeTableHandles=!0;CKEDITOR.config.disableNativeSpellChecker=!0;CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,basicstyles,bidi,blockquote,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,copyformatting,menu,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,popup,filetools,filebrowser,find,fakeobjects,flash,floatingspace,listblock,richcombo,font,format,forms,horizontalrule,htmlwriter,iframe,image,indent,indentblock,indentlist,justify,menubutton,language,link,list,liststyle,magicline,maximize,newpage,pagebreak,pastetools,pastefromgdocs,pastefromword,pastetext,preview,print,removeformat,resize,save,scayt,selectall,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,tableselection,templates,undo,lineutils,widgetselection,widget,notificationaggregator,uploadwidget,uploadimage,wsc,wysiwygarea";
CKEDITOR.config.skin="moono-lisa";(function(){var a=function(a,c){var b=CKEDITOR.getUrl("plugins/"+c);a=a.split(",");for(var g=0;g<a.length;g++)CKEDITOR.skin.icons[a[g]]={path:b,offset:-a[++g],bgsize:a[++g]}};CKEDITOR.env.hidpi?a("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,bgcolor,384,,textcolor,408,,copyformatting,432,,creatediv,456,,find-rtl,480,,find,504,,replace,528,,flash,552,,button,576,,checkbox,600,,form,624,,hiddenfield,648,,imagebutton,672,,radio,696,,select-rtl,720,,select,744,,textarea-rtl,768,,textarea,792,,textfield-rtl,816,,textfield,840,,horizontalrule,864,,iframe,888,,image,912,,indent-rtl,936,,indent,960,,outdent-rtl,984,,outdent,1008,,justifyblock,1032,,justifycenter,1056,,justifyleft,1080,,justifyright,1104,,language,1128,,anchor-rtl,1152,,anchor,1176,,link,1200,,unlink,1224,,bulletedlist-rtl,1248,,bulletedlist,1272,,numberedlist-rtl,1296,,numberedlist,1320,,maximize,1344,,newpage-rtl,1368,,newpage,1392,,pagebreak-rtl,1416,,pagebreak,1440,,pastefromword-rtl,1464,,pastefromword,1488,,pastetext-rtl,1512,,pastetext,1536,,preview-rtl,1560,,preview,1584,,print,1608,,removeformat,1632,,save,1656,,scayt,1680,,selectall,1704,,showblocks-rtl,1728,,showblocks,1752,,smiley,1776,,source-rtl,1800,,source,1824,,specialchar,1848,,table,1872,,templates-rtl,1896,,templates,1920,,redo-rtl,1944,,redo,1968,,undo-rtl,1992,,undo,2016,,simplebox,4080,auto,spellchecker,2064,",
"icons_hidpi.png"):a("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,bgcolor,384,auto,textcolor,408,auto,copyformatting,432,auto,creatediv,456,auto,find-rtl,480,auto,find,504,auto,replace,528,auto,flash,552,auto,button,576,auto,checkbox,600,auto,form,624,auto,hiddenfield,648,auto,imagebutton,672,auto,radio,696,auto,select-rtl,720,auto,select,744,auto,textarea-rtl,768,auto,textarea,792,auto,textfield-rtl,816,auto,textfield,840,auto,horizontalrule,864,auto,iframe,888,auto,image,912,auto,indent-rtl,936,auto,indent,960,auto,outdent-rtl,984,auto,outdent,1008,auto,justifyblock,1032,auto,justifycenter,1056,auto,justifyleft,1080,auto,justifyright,1104,auto,language,1128,auto,anchor-rtl,1152,auto,anchor,1176,auto,link,1200,auto,unlink,1224,auto,bulletedlist-rtl,1248,auto,bulletedlist,1272,auto,numberedlist-rtl,1296,auto,numberedlist,1320,auto,maximize,1344,auto,newpage-rtl,1368,auto,newpage,1392,auto,pagebreak-rtl,1416,auto,pagebreak,1440,auto,pastefromword-rtl,1464,auto,pastefromword,1488,auto,pastetext-rtl,1512,auto,pastetext,1536,auto,preview-rtl,1560,auto,preview,1584,auto,print,1608,auto,removeformat,1632,auto,save,1656,auto,scayt,1680,auto,selectall,1704,auto,showblocks-rtl,1728,auto,showblocks,1752,auto,smiley,1776,auto,source-rtl,1800,auto,source,1824,auto,specialchar,1848,auto,table,1872,auto,templates-rtl,1896,auto,templates,1920,auto,redo-rtl,1944,auto,redo,1968,auto,undo-rtl,1992,auto,undo,2016,auto,simplebox,2040,auto,spellchecker,2064,auto",
"icons.png")})()}})();