/*
Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"J3PE",version:"4.11.4",revision:"e1836357e",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),h=0;h<c.length;h++){var d=c[h].src.match(e);if(d){b=d[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(b){-1==b.indexOf(":/")&&0!==b.indexOf("/")&&(b=this.basePath+b);this.timestamp&&"/"!=b.charAt(b.length-1)&&!/[&?]t=/.test(b)&&(b+=(0<=b.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return b},
domReady:function(){function b(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",b,!1),c()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),c())}catch(d){}}function c(){for(var d;d=e.shift();)d()}var e=[];return function(d){function g(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(g,1);return}b()}e.push(d);"complete"===document.readyState&&setTimeout(b,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
b,!1),window.addEventListener("load",b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);d=!1;try{d=!window.frameElement}catch(m){}document.documentElement.doScroll&&d&&g()}}}()},c=window.CKEDITOR_GETURL;if(c){var h=f.getUrl;f.getUrl=function(b){return c.call(f,b)||h.call(f,b)}}return f}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(e){var f=CKEDITOR.event.prototype,c;for(c in f)null==e[c]&&(e[c]=f[c])},
CKEDITOR.event.prototype=function(){function e(e){var b=f(this);return b[e]||(b[e]=new c(e))}var f=function(c){c=c.getPrivate&&c.getPrivate()||c._||(c._={});return c.events||(c.events={})},c=function(c){this.name=c;this.listeners=[]};c.prototype={getListenerIndex:function(c){for(var b=0,e=this.listeners;b<e.length;b++)if(e[b].fn==c)return b;return-1}};return{define:function(c,b){var f=e.call(this,c);CKEDITOR.tools.extend(f,b,!0)},on:function(c,b,f,k,d){function g(a,n,d,g){a={name:c,sender:this,editor:a,
data:n,listenerData:k,stop:d,cancel:g,removeListener:m};return!1===b.call(f,a)?!1:a.data}function m(){n.removeListener(c,b)}var a=e.call(this,c);if(0>a.getListenerIndex(b)){a=a.listeners;f||(f=this);isNaN(d)&&(d=10);var n=this;g.fn=b;g.priority=d;for(var x=a.length-1;0<=x;x--)if(a[x].priority<=d)return a.splice(x+1,0,g),{removeListener:m};a.unshift(g)}return{removeListener:m}},once:function(){var c=Array.prototype.slice.call(arguments),b=c[1];c[1]=function(c){c.removeListener();return b.apply(this,
arguments)};return this.on.apply(this,c)},capture:function(){CKEDITOR.event.useCapture=1;var c=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return c},fire:function(){var c=0,b=function(){c=1},e=0,k=function(){e=1};return function(d,g,m){var a=f(this)[d];d=c;var n=e;c=e=0;if(a){var x=a.listeners;if(x.length)for(var x=x.slice(0),u,t=0;t<x.length;t++){if(a.errorProof)try{u=x[t].call(this,m,g,b,k)}catch(p){}else u=x[t].call(this,m,g,b,k);!1===u?e=1:"undefined"!=typeof u&&(g=u);if(c||e)break}}g=
e?!1:"undefined"==typeof g?!0:g;c=d;e=n;return g}}(),fireOnce:function(c,b,e){b=this.fire(c,b,e);delete f(this)[c];return b},removeListener:function(c,b){var e=f(this)[c];if(e){var k=e.getListenerIndex(b);0<=k&&e.listeners.splice(k,1)}},removeAllListeners:function(){var c=f(this),b;for(b in c)delete c[b]},hasListeners:function(c){return(c=f(this)[c])&&0<c.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(e,f){e in{instanceReady:1,loaded:1}&&(this[e]=!0);return CKEDITOR.event.prototype.fire.call(this,e,f,this)},CKEDITOR.editor.prototype.fireOnce=function(e,f){e in{instanceReady:1,loaded:1}&&(this[e]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,e,f,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var e=navigator.userAgent.toLowerCase(),f=e.match(/edge[ \/](\d+.?\d*)/),c=-1<e.indexOf("trident/"),c=!(!f&&!c),c={ie:c,edge:!!f,webkit:!c&&
-1<e.indexOf(" applewebkit/"),air:-1<e.indexOf(" adobeair/"),mac:-1<e.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<e.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(e),isCustomDomain:function(){if(!this.ie)return!1;var b=document.domain,c=window.location.hostname;return b!=c&&b!="["+c+"]"},secure:"https:"==location.protocol};c.gecko="Gecko"==navigator.product&&!c.webkit&&!c.ie;c.webkit&&(-1<e.indexOf("chrome")?c.chrome=
!0:c.safari=!0);var h=0;c.ie&&(h=f?parseFloat(f[1]):c.quirks||!document.documentMode?parseFloat(e.match(/msie (\d+)/)[1]):document.documentMode,c.ie9Compat=9==h,c.ie8Compat=8==h,c.ie7Compat=7==h,c.ie6Compat=7>h||c.quirks);c.gecko&&(f=e.match(/rv:([\d\.]+)/))&&(f=f[1].split("."),h=1E4*f[0]+100*(f[1]||0)+1*(f[2]||0));c.air&&(h=parseFloat(e.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(h=parseFloat(e.match(/ applewebkit\/(\d+)/)[1]));c.version=h;c.isCompatible=!(c.ie&&7>h)&&!(c.gecko&&4E4>h)&&!(c.webkit&&
534>h);c.hidpi=2<=window.devicePixelRatio;c.needsBrFiller=c.gecko||c.webkit||c.ie&&10<h;c.needsNbspFiller=c.ie&&11>h;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 e=document.createElement("script");e.type="text/javascript";e.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(e)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)};(function(){CKEDITOR.domReady(function(){var e=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status=
"basic_ready",e&&e._load?e():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*f))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(e,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:f})},CKEDITOR.error=function(e,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
{type:"error",errorCode:e,additionalData:f})},CKEDITOR.on("log",function(e){if(window.console&&window.console.log){var f=console[e.data.type]?e.data.type:"log",c=e.data.errorCode;if(e=e.data.additionalData)console[f]("[CKEDITOR] Error code: "+c+".",e);else console[f]("[CKEDITOR] Error code: "+c+".");console[f]("[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 e(a,d,g){this._minInterval=
a;this._context=g;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(d,g||{});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 n=(new Date).getTime()-b._lastOutput;n<b._minInterval?b._scheduledTimer=setTimeout(a,b._minInterval-n):a()}}}function f(a,d,g){e.call(this,a,d,g);this._args=[];var b=this;this.input=CKEDITOR.tools.override(this.input,function(a){return function(){b._args=
Array.prototype.slice.call(arguments);a.call(this)}})}var c=[],h=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,l=/>/g,k=/</g,d=/"/g,g=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,m={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},a=function(a,d){return"#"==d[0]?String.fromCharCode(parseInt(d.slice(1),10)):m[d]};CKEDITOR.on("reset",function(){c=[]});CKEDITOR.tools={arrayCompare:function(a,d){if(!a&&!d)return!0;if(!a||!d||a.length!=d.length)return!1;
for(var g=0;g<a.length;g++)if(a[g]!=d[g])return!1;return!0},getIndex:function(a,d){for(var g=0;g<a.length;++g)if(d(a[g]))return g;return-1},clone:function(a){var d;if(a&&a instanceof Array){d=[];for(var g=0;g<a.length;g++)d[g]=CKEDITOR.tools.clone(a[g]);return d}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;d=new a.constructor;for(g in a)d[g]=CKEDITOR.tools.clone(a[g]);return d},
capitalize:function(a,d){return a.charAt(0).toUpperCase()+(d?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var d=arguments.length,g,b;"boolean"==typeof(g=arguments[d-1])?d--:"boolean"==typeof(g=arguments[d-2])&&(b=arguments[d-1],d-=2);for(var c=1;c<d;c++){var e=arguments[c],m;for(m in e)if(!0===g||null==a[m])if(!b||m in b)a[m]=e[m]}return a},prototypedCopy:function(a){var d=function(){};d.prototype=a;return new d},copy:function(a){var d={},g;for(g in a)d[g]=a[g];return d},isArray:function(a){return"[object Array]"==
Object.prototype.toString.call(a)},isEmpty:function(a){for(var d in a)if(a.hasOwnProperty(d))return!1;return!0},cssVendorPrefix:function(a,d,g){if(g)return h+a+":"+d+";"+a+":"+d;g={};g[a]=d;g[h+a]=d;return g},cssStyleToDomStyle:function(){var a=document.createElement("div").style,d="undefined"!=typeof a.cssFloat?"cssFloat":"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?d:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=
[].concat(a);for(var d,g=[],b=0;b<a.length;b++)if(d=a[b])/@import|[{}]/.test(d)?g.push("\x3cstyle\x3e"+d+"\x3c/style\x3e"):g.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+d+'"\x3e');return g.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(b,"\x26amp;").replace(l,"\x26gt;").replace(k,"\x26lt;")},htmlDecode:function(n){return n.replace(g,a)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(d,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},
transformPlainTextToHtml:function(a,d){var g=d==CKEDITOR.ENTER_BR,b=this.htmlEncode(a.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),c=d==CKEDITOR.ENTER_P?"p":"div";if(!g){var m=/\n{2}/g;if(m.test(b))var e="\x3c"+c+"\x3e",h="\x3c/"+c+"\x3e",b=e+b.replace(m,function(){return h+e})+h}b=b.replace(/\n/g,"\x3cbr\x3e");g||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+c+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,
function(a,n){return n+"\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",d=0;8>d;d++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,d){var g=d(a);g.prototype=a.prototype;return g},setTimeout:function(a,d,g,b,c){c||(c=window);g||(g=c);return c.setTimeout(function(){b?a.apply(g,[].concat(b)):a.apply(g)},
d||0)},throttle:function(a,d,g){return new this.buffers.throttle(a,d,g)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,"")}}(),indexOf:function(a,d){if("function"==typeof d)for(var g=0,b=a.length;g<b;g++){if(d(a[g]))return g}else{if(a.indexOf)return a.indexOf(d);g=0;for(b=a.length;g<
b;g++)if(a[g]===d)return g}return-1},search:function(a,d){var g=CKEDITOR.tools.indexOf(a,d);return 0<=g?a[g]:null},bind:function(a,d){return function(){return a.apply(d,arguments)}},createClass:function(a){var d=a.$,g=a.base,b=a.privates||a._,c=a.proto;a=a.statics;!d&&(d=function(){g&&this.base.apply(this,arguments)});if(b)var m=d,d=function(){var a=this._||(this._={}),d;for(d in b){var g=b[d];a[d]="function"==typeof g?CKEDITOR.tools.bind(g,this):g}m.apply(this,arguments)};g&&(d.prototype=this.prototypedCopy(g.prototype),
d.prototype.constructor=d,d.base=g,d.baseProto=g.prototype,d.prototype.base=function(){this.base=g.prototype.base;g.apply(this,arguments);this.base=arguments.callee});c&&this.extend(d.prototype,c,!0);a&&this.extend(d,a,!0);return d},addFunction:function(a,d){return c.push(function(){return a.apply(d||this,arguments)})-1},removeFunction:function(a){c[a]=null},callFunction:function(a){var d=c[a];return d&&d.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,
d;return function(g){d=CKEDITOR.tools.trim(g+"")+"px";return a.test(d)?d:g||""}}(),convertToPx:function(){var a;return function(d){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(d)){var g=0>parseFloat(d);g&&(d=d.replace("-",""));a.setStyle("width",d);d=a.$.clientWidth;return g?-d:d}return d}}(),repeat:function(a,d){return Array(d+
1).join(a)},tryThese:function(){for(var a,d=0,g=arguments.length;d<g;d++){var b=arguments[d];try{a=b();break}catch(c){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var d=arguments,g=this;window.setTimeout(function(){a.apply(g,d)},0)}},normalizeCssText:function(a,d){var g=[],b,c=CKEDITOR.tools.parseCssText(a,!0,d);for(b in c)g.push(b+":"+c[b]);g.sort();return g.length?g.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,
function(a,d,g,n){a=[d,g,n];for(d=0;3>d;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,d,g,n){a=d.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+n})},parseCssText:function(a,d,g){var b={};g&&(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,g,n){d&&(g=g.toLowerCase(),"font-family"==g&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));b[g]=n});return b},writeCssText:function(a,d){var g,b=[];for(g in a)b.push(g+":"+a[g]);d&&b.sort();return b.join("; ")},objectCompare:function(a,d,g){var b;if(!a&&!d)return!0;if(!a||!d)return!1;for(b in a)if(a[b]!=d[b])return!1;if(!g)for(b in d)if(a[b]!=d[b])return!1;return!0},objectKeys:function(a){var d=
[],g;for(g in a)d.push(g);return d},convertArrayToObject:function(a,d){var g={};1==arguments.length&&(d=!0);for(var b=0,c=a.length;b<c;++b)g[a[b]]=d;return g},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(d){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,d,g){return new this.buffers.event(a,d,g)},enableHtml5Elements:function(a,d){for(var g="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=g.length,c;b--;)c=a.createElement(g[b]),d&&a.appendChild(c)},checkIfAnyArrayItemMatches:function(a,d){for(var g=0,b=a.length;g<b;++g)if(a[g].match(d))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,d){for(var g in a)if(g.match(d))return!0;return!1},keystrokeToString:function(a,d){var g=this.keystrokeToArray(a,d);g.display=g.display.join("+");g.aria=g.aria.join("+");return g},keystrokeToArray:function(a,d){var g=d&16711680,b=d&65535,c=CKEDITOR.env.mac,m=[],e=[];g&CKEDITOR.CTRL&&(m.push(c?
"⌘":a[17]),e.push(c?a[224]:a[17]));g&CKEDITOR.ALT&&(m.push(c?"⌥":a[18]),e.push(a[18]));g&CKEDITOR.SHIFT&&(m.push(c?"⇧":a[16]),e.push(a[16]));b&&(a[b]?(m.push(a[b]),e.push(a[b])):(m.push(String.fromCharCode(b)),e.push(String.fromCharCode(b))));return{display:m,aria:e}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();for(var d=document.cookie.split(";"),g,b,c=0;c<d.length;c++)if(g=d[c].split("\x3d"),
b=decodeURIComponent(CKEDITOR.tools.trim(g[0]).toLowerCase()),b===a)return decodeURIComponent(1<g.length?g[1]:"");return null},setCookie:function(a,d){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(d)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],d="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var g=0;40>g;g++)a.push(Math.floor(256*Math.random()));
for(g=0;g<a.length;g++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[g]%36),d=d+(.5<Math.random()?b.toUpperCase():b);a=d;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.data?a.data.$:a)?CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.ie6Compat)?4===a.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:1===a.button?
CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:a.button:!1},convertHexStringToBytes:function(a){var d=[],g=a.length/2,b;for(b=0;b<g;b++)d.push(parseInt(a.substr(2*b,2),16));return d},convertBytesToBase64:function(a){var d="",g=a.length,b;for(b=0;b<g;b+=3){var c=a.slice(b,b+3),m=c.length,e=[],h;if(3>m)for(h=m;3>h;h++)c[h]=0;e[0]=(c[0]&252)>>2;e[1]=(c[0]&3)<<4|c[1]>>4;e[2]=(c[1]&15)<<2|(c[2]&192)>>6;e[3]=c[2]&63;for(h=0;4>h;h++)d=h<=m?d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e[h]):
d+"\x3d"}return d},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",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 d={},g=this._findColor(a);g.length&&(d.color=g[0],CKEDITOR.tools.array.forEach(g,function(d){a=a.replace(d,"")}));if(a=CKEDITOR.tools.trim(a))d.unprocessed=a;return d},margin:function(a){function d(a){g.top=b[a[0]];g.right=
b[a[1]];g.bottom=b[a[2]];g.left=b[a[3]]}var g={},b=a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(b.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 g},border:function(a){var d={},g=a.split(/\s+/g);a=CKEDITOR.tools.style.parse._findColor(a);a.length&&(d.color=a[0]);CKEDITOR.tools.array.forEach(g,function(a){d.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,a)?!d.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&
(d.width=a):d.style=a});return d},_findColor:function(a){var d=[],g=CKEDITOR.tools.array,d=d.concat(a.match(this._rgbaRegExp)||[]),d=d.concat(a.match(this._hslaRegExp)||[]);return d=d.concat(g.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,d,g){var b=[];this.forEach(a,function(c,m){d.call(g,c,m,a)&&b.push(c)});return b},forEach:function(a,d,g){var b=a.length,c;for(c=0;c<b;c++)d.call(g,
a[c],c,a)},map:function(a,d,g){for(var b=[],c=0;c<a.length;c++)b.push(d.call(g,a[c],c,a));return b},reduce:function(a,d,g,b){for(var c=0;c<a.length;c++)g=d.call(b,g,a[c],c,a);return g},every:function(a,d,g){if(!a.length)return!0;d=this.filter(a,d,g);return a.length===d.length}},object:{findKey:function(a,d){if("object"!==typeof a)return null;for(var g in a)if(a[g]===d)return g;return null},merge:function(a,d){var g=CKEDITOR.tools,b=g.clone(a),c=g.clone(d);g.array.forEach(g.objectKeys(c),function(a){b[a]=
"object"===typeof c[a]&&"object"===typeof b[a]?g.object.merge(b[a],c[a]):c[a]});return b}},getAbsoluteRectPosition:function(a,d){function g(a){if(a){var d=a.getClientRect();b.top+=d.top;b.left+=d.left;"x"in b&&"y"in b&&(b.x+=d.x,b.y+=d.y);g(a.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(d);g(a.getFrame());var c=CKEDITOR.document.getWindow().getScrollPosition();b.top+=c.y;b.left+=c.x;"x"in b&&"y"in b&&(b.y+=c.y,b.x+=c.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};e.prototype={reset:function(){this._lastOutput=
0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);this._scheduledTimer=0}};f.prototype=CKEDITOR.tools.prototypedCopy(e.prototype);f.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};f.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=e;CKEDITOR.tools.buffers.throttle=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 e=CKEDITOR.tools.extend,f=function(d,a){for(var g=CKEDITOR.tools.clone(d),b=1;b<arguments.length;b++){a=arguments[b];for(var c in a)delete g[c]}return g},c={},h={},b={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},l={command:1,link:1,meta:1,noscript:1,script:1,style:1},k={},d={"#":1},g={center:1,dir:1,noframes:1};e(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},d,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});e(h,b,c,g);f={a:f(c,{a:1,button:1}),abbr:c,address:h,area:k,article:h,aside:h,audio:e({source:1,track:1},h),b:c,base:k,bdi:c,bdo:c,blockquote:h,body:h,br:k,button:f(c,{a:1,button:1}),canvas:c,caption:h,cite:c,code:c,col:k,colgroup:{col:1},command:k,datalist:e({option:1},c),dd:h,del:c,details:e({summary:1},h),dfn:c,div:h,dl:{dt:1,dd:1},dt:h,em:c,embed:k,fieldset:e({legend:1},h),figcaption:h,figure:e({figcaption:1},
h),footer:h,form:h,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,head:e({title:1,base:1},l),header:h,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:k,html:e({head:1,body:1},h,l),i:c,iframe:d,img:k,input:k,ins:c,kbd:c,keygen:k,label:c,legend:c,li:h,link:k,main:h,map:h,mark:c,menu:e({li:1},h),meta:k,meter:f(c,{meter:1}),nav:h,noscript:e({link:1,meta:1,style:1},c),object:e({param:1},c),ol:{li:1},optgroup:{option:1},option:d,output:c,p:c,param:k,pre:c,progress:f(c,{progress:1}),q:c,rp:c,rt:c,ruby:e({rp:1,rt:1},c),s:c,samp:c,
script:d,section:h,select:{optgroup:1,option:1},small:c,source:k,span:c,strong:c,style:d,sub:c,summary:e({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:h,textarea:d,tfoot:{tr:1},th:h,thead:{tr:1},time:f(c,{time:1}),title:d,tr:{th:1,td:1},track:k,u:c,ul:{li:1},"var":c,video:e({source:1,track:1},h),wbr:k,acronym:c,applet:e({param:1},h),basefont:k,big:c,center:h,dialog:k,dir:{li:1},font:c,isindex:k,noframes:h,strike:c,tt:c};e(f,{$block:e({audio:1,
dd:1,dt:1,figcaption:1,li:1,video:1},b,g),$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:e({body:1,head:1,html:1},f.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 f}(),CKEDITOR.dom.event=function(e){this.$=e},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var e=this.getKey();if(this.$.ctrlKey||this.$.metaKey)e+=CKEDITOR.CTRL;this.$.shiftKey&&(e+=CKEDITOR.SHIFT);this.$.altKey&&(e+=CKEDITOR.ALT);return e},preventDefault:function(e){var f=this.$;f.preventDefault?f.preventDefault():f.returnValue=!1;e&&this.stopPropagation()},
stopPropagation:function(){var e=this.$;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},getTarget:function(){var e=this.$.target||this.$.srcElement;return e?new CKEDITOR.dom.node(e):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var e=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(e.documentElement.scrollLeft||e.body.scrollLeft),y:this.$.pageY||this.$.clientY+(e.documentElement.scrollTop||e.body.scrollTop)}}},CKEDITOR.CTRL=1114112,
CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(e){e&&(this.$=e)},CKEDITOR.dom.domObject.prototype=function(){var e=function(e,c){return function(h){"undefined"!=typeof CKEDITOR&&e.fire(c,new CKEDITOR.dom.event(h))}};return{getPrivate:function(){var e;(e=this.getCustomData("_"))||this.setCustomData("_",e={});return e},on:function(f){var c=this.getCustomData("_cke_nativeListeners");
c||(c={},this.setCustomData("_cke_nativeListeners",c));c[f]||(c=c[f]=e(this,f),this.$.addEventListener?this.$.addEventListener(f,c,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+f,c));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(e){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(e)){var c=this.getCustomData("_cke_nativeListeners"),h=c&&c[e];h&&(this.$.removeEventListener?this.$.removeEventListener(e,
h,!1):this.$.detachEvent&&this.$.detachEvent("on"+e,h),delete c[e])}},removeAllListeners:function(){var e=this.getCustomData("_cke_nativeListeners"),c;for(c in e){var h=e[c];this.$.detachEvent?this.$.detachEvent("on"+c,h):this.$.removeEventListener&&this.$.removeEventListener(c,h,!1);delete e[c]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(e){var f={};CKEDITOR.on("reset",function(){f={}});e.equals=function(c){try{return c&&c.$===this.$}catch(e){return!1}};e.setCustomData=function(c,
e){var b=this.getUniqueId();(f[b]||(f[b]={}))[c]=e;return this};e.getCustomData=function(c){var e=this.$["data-cke-expando"];return(e=e&&f[e])&&c in e?e[c]:null};e.removeCustomData=function(c){var e=this.$["data-cke-expando"],e=e&&f[e],b,l;e&&(b=e[c],l=c in e,delete e[c]);return l?b:null};e.clearCustomData=function(){this.removeAllListeners();var c=this.$["data-cke-expando"];c&&delete f[c]};e.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};
CKEDITOR.event.implementOn(e)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(e){return e?new CKEDITOR.dom[e.nodeType==CKEDITOR.NODE_DOCUMENT?"document":e.nodeType==CKEDITOR.NODE_ELEMENT?"element":e.nodeType==CKEDITOR.NODE_TEXT?"text":e.nodeType==CKEDITOR.NODE_COMMENT?"comment":e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](e):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=
3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(e,f){e.append(this,f);return e},clone:function(e,f){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(f||
b.nodeType!=CKEDITOR.NODE_ELEMENT||b.removeAttribute("id",!1),e){b=b.childNodes;for(var h=0;h<b.length;h++)c(b[h])}}function h(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.getName();":"==c[0]&&b.renameNode(c.substring(1))}if(e)for(c=0;c<b.getChildCount();c++)h(b.getChild(c))}}var b=this.$.cloneNode(e);c(b);b=new CKEDITOR.dom.node(b);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==
CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&h(b);return b},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(e){e.$.parentNode.insertBefore(this.$,e.$.nextSibling);return e},insertBefore:function(e){e.$.parentNode.insertBefore(this.$,e.$);return e},insertBeforeMe:function(e){this.$.parentNode.insertBefore(e.$,this.$);return e},getAddress:function(e){for(var f=[],c=this.getDocument().$.documentElement,h=this.$;h&&h!=c;){var b=h.parentNode;
b&&f.unshift(this.getIndex.call({$:h},e));h=b}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(e){function f(b,d){var g=d?b.nextSibling:b.previousSibling;return g&&g.nodeType==CKEDITOR.NODE_TEXT?c(g)?f(g,d):g:null}function c(b){return!b.nodeValue||b.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var h=this.$,b=-1,l;if(!this.$.parentNode||e&&h.nodeType==CKEDITOR.NODE_TEXT&&c(h)&&!f(h)&&!f(h,!0))return-1;
do e&&h!=this.$&&h.nodeType==CKEDITOR.NODE_TEXT&&(l||c(h))||(b++,l=h.nodeType==CKEDITOR.NODE_TEXT);while(h=h.previousSibling);return b},getNextSourceNode:function(e,f,c){if(c&&!c.call){var h=c;c=function(b){return!b.equals(h)}}e=!e&&this.getFirst&&this.getFirst();var b;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;e=this.getNext()}for(;!e&&(b=(b||this).getParent());){if(c&&!1===c(b,!0))return null;e=b.getNext()}return!e||c&&!1===c(e)?null:f&&f!=e.type?e.getNextSourceNode(!1,
f,c):e},getPreviousSourceNode:function(e,f,c){if(c&&!c.call){var h=c;c=function(b){return!b.equals(h)}}e=!e&&this.getLast&&this.getLast();var b;if(!e){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;e=this.getPrevious()}for(;!e&&(b=(b||this).getParent());){if(c&&!1===c(b,!0))return null;e=b.getPrevious()}return!e||c&&!1===c(e)?null:f&&e.type!=f?e.getPreviousSourceNode(!1,f,c):e},getPrevious:function(e){var f=this.$,c;do c=(f=f.previousSibling)&&10!=f.nodeType&&new CKEDITOR.dom.node(f);
while(c&&e&&!e(c));return c},getNext:function(e){var f=this.$,c;do c=(f=f.nextSibling)&&new CKEDITOR.dom.node(f);while(c&&e&&!e(c));return c},getParent:function(e){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||e&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(f):null},getParents:function(e){var f=this,c=[];do c[e?"push":"unshift"](f);while(f=f.getParent());return c},getCommonAncestor:function(e){if(e.equals(this))return this;if(e.contains&&e.contains(this))return e;
var f=this.contains?this:this.getParent();do if(f.contains(e))return f;while(f=f.getParent());return null},getPosition:function(e){var f=this.$,c=e.$;if(f.compareDocumentPosition)return f.compareDocumentPosition(c);if(f==c)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&e.type==CKEDITOR.NODE_ELEMENT){if(f.contains){if(f.contains(c))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(c.contains(f))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in
f)return 0>f.sourceIndex||0>c.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:f.sourceIndex<c.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}f=this.getAddress();e=e.getAddress();for(var c=Math.min(f.length,e.length),h=0;h<c;h++)if(f[h]!=e[h])return f[h]<e[h]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return f.length<e.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(e,f){var c=
this.$,h,b;f||(c=c.parentNode);"function"==typeof e?(b=!0,h=e):(b=!1,h=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof e?b==e:b in e});for(;c;){if(h(b?new CKEDITOR.dom.node(c):c))return new CKEDITOR.dom.node(c);try{c=c.parentNode}catch(l){c=null}}return null},hasAscendant:function(e,f){var c=this.$;f||(c=c.parentNode);for(;c;){if(c.nodeName&&c.nodeName.toLowerCase()==e)return!0;c=c.parentNode}return!1},move:function(e,f){e.append(this.remove(),f)},remove:function(e){var f=
this.$,c=f.parentNode;if(c){if(e)for(;e=f.firstChild;)c.insertBefore(f.removeChild(e),f);c.removeChild(f)}return this},replace:function(e){this.insertBefore(e);e.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var e;this.getFirst&&(e=this.getFirst());){if(e.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.ltrim(e.getText()),c=e.getLength();if(f)f.length<c&&(e.split(c-f.length),this.$.removeChild(this.$.firstChild));else{e.remove();continue}}break}},rtrim:function(){for(var e;this.getLast&&
(e=this.getLast());){if(e.type==CKEDITOR.NODE_TEXT){var f=CKEDITOR.tools.rtrim(e.getText()),c=e.getLength();if(f)f.length<c&&(e.split(f.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{e.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(e=this.$.lastChild)&&1==e.type&&"br"==e.nodeName.toLowerCase()&&e.parentNode.removeChild(e)},isReadOnly:function(e){var f=this;this.type!=CKEDITOR.NODE_ELEMENT&&(f=this.getParent());CKEDITOR.env.edge&&f&&f.is("textarea","input")&&(e=!0);
if(!e&&f&&"undefined"!=typeof f.$.isContentEditable)return!(f.$.isContentEditable||f.data("cke-editable"));for(;f;){if(f.data("cke-editable"))return!1;if(f.hasAttribute("contenteditable"))return"false"==f.getAttribute("contenteditable");f=f.getParent()}return!0}}),CKEDITOR.dom.window=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var e=
this.$.document,f="CSS1Compat"==e.compatMode;return{width:(f?e.documentElement.clientWidth:e.body.clientWidth)||0,height:(f?e.documentElement.clientHeight:e.body.clientHeight)||0}},getScrollPosition:function(){var e=this.$;if("pageXOffset"in e)return{x:e.pageXOffset||0,y:e.pageYOffset||0};e=e.document;return{x:e.documentElement.scrollLeft||e.body.scrollLeft||0,y:e.documentElement.scrollTop||e.body.scrollTop||0}},getFrame:function(){var e=this.$.frameElement;return e?new CKEDITOR.dom.element.get(e):
null}}),CKEDITOR.dom.document=function(e){CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(e){if(this.$.createStyleSheet)this.$.createStyleSheet(e);else{var f=new CKEDITOR.dom.element("link");f.setAttributes({rel:"stylesheet",type:"text/css",href:e});this.getHead().append(f)}},appendStyleText:function(e){if(this.$.createStyleSheet){var f=this.$.createStyleSheet("");
f.cssText=e}else{var c=new CKEDITOR.dom.element("style",this);c.append(new CKEDITOR.dom.text(e,this));this.getHead().append(c)}return f||c.$.sheet},createElement:function(e,f){var c=new CKEDITOR.dom.element(e,this);f&&(f.attributes&&c.setAttributes(f.attributes),f.styles&&c.setStyles(f.styles));return c},createText:function(e){return new CKEDITOR.dom.text(e,this)},focus:function(){this.getWindow().focus()},getActive:function(){var e;try{e=this.$.activeElement}catch(f){return null}return new CKEDITOR.dom.element(e)},
getById:function(e){return(e=this.$.getElementById(e))?new CKEDITOR.dom.element(e):null},getByAddress:function(e,f){for(var c=this.$.documentElement,h=0;c&&h<e.length;h++){var b=e[h];if(f)for(var l=-1,k=0;k<c.childNodes.length;k++){var d=c.childNodes[k];if(!0!==f||3!=d.nodeType||!d.previousSibling||3!=d.previousSibling.nodeType)if(l++,l==b){c=d;break}}else c=c.childNodes[b]}return c?new CKEDITOR.dom.node(c):null},getElementsByTag:function(e,f){CKEDITOR.env.ie&&8>=document.documentMode||!f||(e=f+":"+
e);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e=e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(e){this.$.open("text/html",
"replace");CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(e);this.$.close()},find:function(e){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e))},findOne:function(e){return(e=this.$.querySelector(e))?new CKEDITOR.dom.element(e):null},_getHtml5ShivFrag:function(){var e=this.getCustomData("html5ShivFrag");e||(e=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(e,
!0),this.setCustomData("html5ShivFrag",e));return e}}),CKEDITOR.dom.nodeList=function(e){this.$=e},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(e){return 0>e||e>=this.$.length?null:(e=this.$[e])?new CKEDITOR.dom.node(e):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(e){return new CKEDITOR.dom.node(e)})}},CKEDITOR.dom.element=function(e,f){"string"==typeof e&&(e=(f?f.$:document).createElement(e));CKEDITOR.dom.domObject.call(this,
e)},CKEDITOR.dom.element.get=function(e){return(e="string"==typeof e?document.getElementById(e)||document.getElementsByName(e)[0]:e)&&(e.$?e:new CKEDITOR.dom.element(e))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(e,f){var c=new CKEDITOR.dom.element("div",f);c.setHtml(e);return c.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(e,f,c,h){var b=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),
l=f.getCustomData("list_marker_names")||f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");e[b]=f;l[c]=1;return f.setCustomData(c,h)},CKEDITOR.dom.element.clearAllMarkers=function(e){for(var f in e)CKEDITOR.dom.element.clearMarkers(e,e[f],1)},CKEDITOR.dom.element.clearMarkers=function(e,f,c){var h=f.getCustomData("list_marker_names"),b=f.getCustomData("list_marker_id"),l;for(l in h)f.removeCustomData(l);f.removeCustomData("list_marker_names");c&&(f.removeCustomData("list_marker_id"),
delete e[b])},function(){function e(d,g){return-1<(" "+d+" ").replace(l," ").indexOf(" "+g+" ")}function f(d){var g=!0;d.$.id||(d.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),g=!1);return function(){g||d.removeAttribute("id")}}function c(d,g){var b=CKEDITOR.tools.escapeCss(d.$.id);return"#"+b+" "+g.split(/,\s*/).join(", #"+b+" ")}function h(d){for(var g=0,b=0,a=k[d].length;b<a;b++)g+=parseFloat(this.getComputedStyle(k[d][b])||0,10)||0;return g}var b=document.createElement("_").classList,b="undefined"!==
typeof b&&null!==String(b.add).match(/\[Native code\]/gi),l=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:b?function(d){this.$.classList.add(d);return this}:function(d){var g=this.$.className;g&&(e(g,d)||(g+=" "+d));this.$.className=g||d;return this},removeClass:b?function(d){var g=this.$;g.classList.remove(d);g.className||g.removeAttribute("class");return this}:function(d){var g=this.getAttribute("class");g&&e(g,d)&&((g=g.replace(new RegExp("(?:^|\\s+)"+
d+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",g):this.removeAttribute("class"));return this},hasClass:function(d){return e(this.$.className,d)},append:function(d,g){"string"==typeof d&&(d=this.getDocument().createElement(d));g?this.$.insertBefore(d.$,this.$.firstChild):this.$.appendChild(d.$);return d},appendHtml:function(d){if(this.$.childNodes.length){var g=new CKEDITOR.dom.element("div",this.getDocument());g.setHtml(d);g.moveChildren(this)}else this.setHtml(d)},appendText:function(d){null!=
this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=d:this.append(new CKEDITOR.dom.text(d))},appendBogus:function(d){if(d||CKEDITOR.env.needsBrFiller){for(d=this.getLast();d&&d.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(d.getText());)d=d.getPrevious();d&&d.is&&d.is("br")||(d=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&d.setAttribute("type","_moz"),this.append(d))}},breakParent:function(d,g){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(d);
var a=b.extractContents(!1,g||!1),c;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");c=a.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),b.append(c);b.insertAfter(this);b.remove(!0)}else a.insertAfterNode(this)},contains:document.compareDocumentPosition?function(d){return!!(this.$.compareDocumentPosition(d.$)&16)}:function(d){var g=this.$;return d.type!=CKEDITOR.NODE_ELEMENT?g.contains(d.getParent().$):
g!=d.$&&g.contains(d.$)},focus:function(){function d(){try{this.$.focus()}catch(d){}}return function(g){g?CKEDITOR.tools.setTimeout(d,100,this):d.call(this)}}(),getHtml:function(){var d=this.$.innerHTML;return CKEDITOR.env.ie?d.replace(/<\?[^>]*>/g,""):d},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var d=this.$.ownerDocument.createElement("div");d.appendChild(this.$.cloneNode(!0));return d.innerHTML},getClientRect:function(d){var g=CKEDITOR.tools.extend({},
this.$.getBoundingClientRect());!g.width&&(g.width=g.right-g.left);!g.height&&(g.height=g.bottom-g.top);return d?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),g):g},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(d){try{var g=this.$;if(this.getParent())return g.innerHTML=d;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(g);g.innerHTML=d;b.removeChild(g);return d}catch(a){this.$.innerHTML="";g=new CKEDITOR.dom.element("body",this.getDocument());g.$.innerHTML=d;for(g=g.getChildren();g.count();)this.append(g.getItem(0));
return d}}:function(d){return this.$.innerHTML=d},setText:function(){var d=document.createElement("p");d.innerHTML="x";d=d.textContent;return function(g){this.$[d?"textContent":"innerText"]=g}}(),getAttribute:function(){var d=function(d){return this.$.getAttribute(d,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d){switch(d){case "class":d="className";break;case "http-equiv":d="httpEquiv";break;case "name":return this.$.name;case "tabindex":return d=this.$.getAttribute(d,
2),0!==d&&0===this.$.tabIndex&&(d=null),d;case "checked":return d=this.$.attributes.getNamedItem(d),(d.specified?d.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[d];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(d,2)}:d}(),getAttributes:function(d){var g={},b=this.$.attributes,a;d=CKEDITOR.tools.isArray(d)?
d:[];for(a=0;a<b.length;a++)-1===CKEDITOR.tools.indexOf(d,b[a].name)&&(g[b[a].name]=b[a].value);return g},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(d){var g=this.getWindow().$.getComputedStyle(this.$,null);return g?g.getPropertyValue(d):""}:function(d){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(d)]},getDtd:function(){var d=CKEDITOR.dtd[this.getName()];this.getDtd=
function(){return d};return d},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var d=this.$.tabIndex;return 0!==d||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?d:-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 d=this.$.nodeName.toLowerCase();
if(CKEDITOR.env.ie&&8>=document.documentMode){var g=this.$.scopeName;"HTML"!=g&&(d=g.toLowerCase()+":"+d)}this.getName=function(){return d};return this.getName()},getValue:function(){return this.$.value},getFirst:function(d){var g=this.$.firstChild;(g=g&&new CKEDITOR.dom.node(g))&&d&&!d(g)&&(g=g.getNext(d));return g},getLast:function(d){var g=this.$.lastChild;(g=g&&new CKEDITOR.dom.node(g))&&d&&!d(g)&&(g=g.getPrevious(d));return g},getStyle:function(d){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(d)]},
is:function(){var d=this.getName();if("object"==typeof arguments[0])return!!arguments[0][d];for(var g=0;g<arguments.length;g++)if(arguments[g]==d)return!0;return!1},isEditable:function(d){var g=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[g]||CKEDITOR.dtd.$empty[g]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==d?(d=CKEDITOR.dtd[g]||
CKEDITOR.dtd.span,!(!d||!d["#"])):!0},isIdentical:function(d){var g=this.clone(0,1);d=d.clone(0,1);g.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);d.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(g.$.isEqualNode)return g.$.style.cssText=CKEDITOR.tools.normalizeCssText(g.$.style.cssText),d.$.style.cssText=CKEDITOR.tools.normalizeCssText(d.$.style.cssText),g.$.isEqualNode(d.$);g=g.getOuterHtml();d=
d.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(g),g=b.getHtml(),b.setHtml(d),d=b.getHtml())}return g==d},isVisible:function(){var d=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),g,b;d&&CKEDITOR.env.webkit&&(g=this.getWindow(),!g.equals(CKEDITOR.document.getWindow())&&(b=g.$.frameElement)&&(d=(new CKEDITOR.dom.element(b)).isVisible()));return!!d},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;
for(var d=this.getChildren(),g=0,b=d.count();g<b;g++){var a=d.getItem(g);if(a.type!=CKEDITOR.NODE_ELEMENT||!a.data("cke-bookmark"))if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEmptyInlineRemoveable()||a.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(a.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var d=this.$.attributes,g=0;g<d.length;g++){var b=d[g];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 d=this.$.attributes,g=d.length,b={"data-cke-expando":1,_moz_dirty:1};return 0<g&&(2<g||!b[d[0].nodeName]||2==g&&!b[d[1].nodeName])},hasAttribute:function(){function d(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(b){return"name"==b?!!this.$.name:d.call(this,b)}:d:function(d){return!!this.$.attributes.getNamedItem(d)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(d,b){var c=this.$;d=d.$;if(c!=d){var a;if(b)for(;a=c.lastChild;)d.insertBefore(c.removeChild(a),d.firstChild);else for(;a=c.firstChild;)d.appendChild(c.removeChild(a))}},mergeSiblings:function(){function d(d,b,a){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var c=
[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(c.push(b),b=a?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(d.isIdentical(b)){for(var e=a?d.getLast():d.getFirst();c.length;)c.shift().move(d,!a);b.moveChildren(d,!a);b.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))d(this,this.getNext(),!0),d(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
visibility:""})},setAttribute:function(){var d=function(d,b){this.$.setAttribute(d,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?d.call(this,"contentEditable",c):d.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{d.apply(this,
arguments)}catch(a){}else d.apply(this,arguments);return this}:d}(),setAttributes:function(d){for(var b in d)this.setAttribute(b,d[b]);return this},setValue:function(d){this.$.value=d;return this},removeAttribute:function(){var d=function(d){this.$.removeAttribute(d)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d){"class"==d?d="className":"tabindex"==d?d="tabIndex":"contenteditable"==d&&(d="contentEditable");this.$.removeAttribute(d)}:d}(),removeAttributes:function(d){if(CKEDITOR.tools.isArray(d))for(var b=
0;b<d.length;b++)this.removeAttribute(d[b]);else for(b in d=d||this.getAttributes(),d)d.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(d){var b=this.$.style;if(b.removeProperty||"border"!=d&&"margin"!=d&&"padding"!=d)b.removeProperty?b.removeProperty(d):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(d)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],a;"border"==d&&(a=["color","style","width"]);for(var b=[],e=0;e<c.length;e++)if(a)for(var h=
0;h<a.length;h++)b.push([d,c[e],a[h]].join("-"));else b.push([d,c[e]].join("-"));for(d=0;d<b.length;d++)this.removeStyle(b[d])}},setStyle:function(d,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(d)]=b;return this},setStyles:function(d){for(var b in d)this.setStyle(b,d[b]);return this},setOpacity:function(d){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(d=Math.round(100*d),this.setStyle("filter",100<=d?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+d+")")):this.setStyle("opacity",d)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select",
"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var d,b=this.getElementsByTag("*"),c=0,a=b.count();c<a;c++)d=b.getItem(c),d.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var d=this;"html"!=d.getName();){if("static"!=d.getComputedStyle("position"))return d;d=d.getParent()}return null},getDocumentPosition:function(d){var b=0,c=0,a=this.getDocument(),e=a.getBody(),h="BackCompat"==a.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
8!==CKEDITOR.env.version:1)){var f=this.$.getBoundingClientRect(),k=a.$.documentElement,l=k.clientTop||e.$.clientTop||0,r=k.clientLeft||e.$.clientLeft||0,v=!0;CKEDITOR.env.ie&&(v=a.getDocumentElement().contains(this),a=a.getBody().contains(this),v=h&&a||!h&&v);v&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=e.$.scrollLeft||k.scrollLeft,c=e.$.scrollTop||k.scrollTop):(c=h?e.$:k,b=c.scrollLeft,c=c.scrollTop),b=f.left+b-r,c=f.top+c-l)}else for(l=this,r=null;l&&"body"!=l.getName()&&
"html"!=l.getName();){b+=l.$.offsetLeft-l.$.scrollLeft;c+=l.$.offsetTop-l.$.scrollTop;l.equals(this)||(b+=l.$.clientLeft||0,c+=l.$.clientTop||0);for(;r&&!r.equals(l);)b-=r.$.scrollLeft,c-=r.$.scrollTop,r=r.getParent();r=l;l=(f=l.$.offsetParent)?new CKEDITOR.dom.element(f):null}d&&(f=this.getWindow(),l=d.getWindow(),!f.equals(l)&&f.$.frameElement&&(d=(new CKEDITOR.dom.element(f.$.frameElement)).getDocumentPosition(d),b+=d.x,c+=d.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
h||(b+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:b,y:c}},scrollIntoView:function(d){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,d,1),b.is("html")){var c=b.getWindow();try{var a=c.$.frameElement;a&&(b=new CKEDITOR.dom.element(a))}catch(e){}}while(b=b.getParent())}},scrollIntoParent:function(d,b,c){var a,e,h,f;function l(a,b){/body|html/.test(d.getName())?
d.getWindow().$.scrollBy(a,b):(d.$.scrollLeft+=a,d.$.scrollTop+=b)}function k(a,d){var b={x:0,y:0};if(!a.is(v?"body":"html")){var c=a.$.getBoundingClientRect();b.x=c.left;b.y=c.top}c=a.getWindow();c.equals(d)||(c=k(CKEDITOR.dom.element.get(c.$.frameElement),d),b.x+=c.x,b.y+=c.y);return b}function r(a,d){return parseInt(a.getComputedStyle("margin-"+d)||0,10)||0}!d&&(d=this.getWindow());h=d.getDocument();var v="BackCompat"==h.$.compatMode;d instanceof CKEDITOR.dom.window&&(d=v?h.getBody():h.getDocumentElement());
CKEDITOR.env.webkit&&(h=this.getEditor(!1))&&(h._.previousScrollTop=null);h=d.getWindow();e=k(this,h);var q=k(d,h),B=this.$.offsetHeight;a=this.$.offsetWidth;var w=d.$.clientHeight,y=d.$.clientWidth;h=e.x-r(this,"left")-q.x||0;f=e.y-r(this,"top")-q.y||0;a=e.x+a+r(this,"right")-(q.x+y)||0;e=e.y+B+r(this,"bottom")-(q.y+w)||0;(0>f||0<e)&&l(0,!0===b?f:!1===b?e:0>f?f:e);c&&(0>h||0<a)&&l(0>h?h:a,0)},setState:function(d,b,c){b=b||"cke";switch(d){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},
getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(c){b.src=b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,c){var e=this.$.attributes;c=c||{};for(var a=0;a<e.length;a++){var n=e[a],h=n.nodeName.toLowerCase(),f;if(!(h in c))if("checked"==h&&(f=this.getAttribute(h)))b.setAttribute(h,f);else if(!CKEDITOR.env.ie||this.hasAttribute(h))f=this.getAttribute(h),null===f&&(f=n.nodeValue),b.setAttribute(h,f)}""!==this.$.style.cssText&&
(b.$.style.cssText=this.$.style.cssText)},renameNode:function(b){if(this.getName()!=b){var c=this.getDocument();b=new CKEDITOR.dom.element(b,c);this.copyAttributes(b);this.moveChildren(b);this.getParent(!0)&&this.$.parentNode.replaceChild(b.$,this.$);b.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=b.$;delete this.getName}},getChild:function(){function b(d,c){var a=d.childNodes;if(0<=c&&c<a.length)return a[c]}return function(c){var e=this.$;if(c.slice)for(c=c.slice();0<c.length&&e;)e=b(e,
c.shift());else e=b(e,c);return e?new CKEDITOR.dom.node(e):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function b(d){return d.type==CKEDITOR.NODE_ELEMENT&&d.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(c){c.data.getTarget().getAscendant(b,!0)||c.data.preventDefault()})},getDirection:function(b){return b?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(b,c){b="data-"+b;if(void 0===c)return this.getAttribute(b);!1===c?this.removeAttribute(b):this.setAttribute(b,c);return null},getEditor:function(b){var c=CKEDITOR.instances,e,a,h;b=b||void 0===b;for(e in c)if(a=c[e],a.element.equals(this)&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!b&&(h=a.editable())&&(h.equals(this)||h.contains(this)))return a;return null},find:function(b){var g=f(this);b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c(this,
b)));g();return b},findOne:function(b){var g=f(this);b=this.$.querySelector(c(this,b));g();return b?new CKEDITOR.dom.element(b):null},forEach:function(b,c,e){if(!(e||c&&this.type!=c))var a=b(this);if(!1!==a){e=this.getChildren();for(var h=0;h<e.count();h++)a=e.getItem(h),a.type==CKEDITOR.NODE_ELEMENT?a.forEach(b,c):c&&a.type!=c||b(a)}}});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(b,c,e){"number"==typeof c&&(!e||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(c-=h.call(this,b)),this.setStyle(b,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(b,c){var e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||0;c&&(e-=h.call(this,b));return e}}(),CKEDITOR.dom.documentFragment=function(e){e=e||CKEDITOR.document;this.$=e.type==CKEDITOR.NODE_DOCUMENT?e.$.createDocumentFragment():e},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,
CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(e){e=e.$;e.parentNode.insertBefore(this.$,e.nextSibling)},getHtml:function(){var e=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(e);return e.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,
getChildCount:1,getChild:1,getChildren:1}),function(){function e(a,b){var d=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(d.collapsed)return this.end(),null;d.optimize()}var c,g=d.startContainer;c=d.endContainer;var e=d.startOffset,h=d.endOffset,n,m=this.guard,f=this.type,l=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var k=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),z=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(h):c.getNext();this._.guardLTR=function(a,
b){return(!b||!k.equals(a))&&(!z||!a.equals(z))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(d.root))}}if(a&&!this._.guardRTL){var J=g.type==CKEDITOR.NODE_ELEMENT?g:g.getParent(),E=g.type==CKEDITOR.NODE_ELEMENT?e?g.getChild(e-1):null:g.getPrevious();this._.guardRTL=function(a,b){return(!b||!J.equals(a))&&(!E||!a.equals(E))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(d.root))}}var H=a?this._.guardRTL:this._.guardLTR;n=m?function(a,b){return!1===H(a,b)?!1:m(a,b)}:H;this.current?c=this.current[l](!1,
f,n):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<h?c.getChild(h-1):!1===n(c,!0)?null:c.getPreviousSourceNode(!0,f,n)):(c=g,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(e))||(c=!1===n(g,!0)?null:g.getNextSourceNode(!0,f,n)))),c&&!1===n(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!b)return c}else if(b&&this.evaluator)return!1;c=c[l](!1,f,n)}this.end();return this.current=null}function f(a){for(var b,d=null;b=e.call(this,a);)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 e.call(this)},previous:function(){return e.call(this,1)},checkForward:function(){return!1!==e.call(this,0,1)},checkBackward:function(){return!1!==e.call(this,1,1)},lastForward:function(){return f.call(this)},lastBackward:function(){return f.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},h={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in h||!c[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function d(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(c){var g,e;g=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(e=c.getParent())&&d(e);g=a?g:g||d(c);return!!(b^g)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var d;b&&b.type==CKEDITOR.NODE_TEXT&&(d=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
return!!(a^d)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.env.webkit?1:0;return function(c){b(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent()),c=c.$.offsetWidth<=d);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(d){return!!(b^d.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function d(a){return!l(a)&&!k(a)}return function(c){var g=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&b.test(c.getText());g&&(g=c.getParent(),
c=c.getNext(d),g=g.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^g)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var b=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),k=CKEDITOR.dom.walker.bookmark(),d=CKEDITOR.dom.walker.temp(),g=function(a){return k(a)||l(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
CKEDITOR.dom.walker.ignored=function(a){return function(b){b=l(b)||k(b)||d(b);return!!(a^b)}};var m=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var d=0,c=b.getChildCount();d<c;++d)if(!m(b.getChild(d)))return!!a;return!a}};var a=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},d;for(d in a)CKEDITOR.dtd[d]["#"]&&(b[d]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
function(b){return function(d){d=m(d)?!1:d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&(d.is(CKEDITOR.dtd.$inline)||d.is("hr")||"false"==d.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&d.is(n)&&a(d))?!0:!1;return!!(b^d)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(g(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&b.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(e){this.endOffset=this.endContainer=
this.startOffset=this.startContainer=null;this.collapsed=!0;var f=e instanceof CKEDITOR.dom.document;this.document=f?e:e.getDocument();this.root=f?e.getBody():e},function(){function e(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function f(a,b,d,c,g){function e(a,b,d,c){var h=d?a.getPrevious():a.getNext();if(c&&f)return h;w||c?b.append(a.clone(!0,g),d):(a.remove(),l&&b.append(a,d));return h}function h(){var a,b,d,c=Math.min(I.length,
C.length);for(a=0;a<c;a++)if(b=I[a],d=C[a],!b.equals(d))return a;return a-1}function m(){var b=S-1,d=H&&F&&!k.equals(A);b<O-1||b<P-1||d?(d?a.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START):P==b+1&&E?a.moveToPosition(C[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(C[b+1],CKEDITOR.POSITION_BEFORE_START),c&&(b=I[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 f=0===b,l=1==b,w=2==b;b=w||l;var k=a.startContainer,A=a.endContainer,D=a.startOffset,z=a.endOffset,J,E,H,F,G,L;if(w&&A.type==CKEDITOR.NODE_TEXT&&(k.equals(A)||k.type===CKEDITOR.NODE_ELEMENT&&k.getFirst().equals(A)))d.append(a.document.createText(A.substring(D,z)));else{A.type==CKEDITOR.NODE_TEXT?w?L=!0:A=A.split(z):0<A.getChildCount()?z>=A.getChildCount()?(A=A.getChild(z-1),E=!0):A=A.getChild(z):F=E=!0;k.type==
CKEDITOR.NODE_TEXT?w?G=!0:k.split(D):0<k.getChildCount()?0===D?(k=k.getChild(D),J=!0):k=k.getChild(D-1):H=J=!0;for(var I=k.getParents(),C=A.getParents(),S=h(),O=I.length-1,P=C.length-1,K=d,V,T,Y,Z=-1,M=S;M<=O;M++){T=I[M];Y=T.getNext();for(M!=O||T.equals(C[M])&&O<P?b&&(V=K.append(T.clone(0,g))):J?e(T,K,!1,H):G&&K.append(a.document.createText(T.substring(D)));Y;){if(Y.equals(C[M])){Z=M;break}Y=e(Y,K)}K=V}K=d;for(M=S;M<=P;M++)if(d=C[M],Y=d.getPrevious(),d.equals(I[M]))b&&(K=K.getChild(0));else{M!=P||
d.equals(I[M])&&P<O?b&&(V=K.append(d.clone(0,g))):E?e(d,K,!1,F):L&&K.append(a.document.createText(d.substring(0,z)));if(M>Z)for(;Y;)Y=e(Y,K,!0);K=V}w||m()}}function c(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),c=CKEDITOR.dom.walker.bogus();return function(g){return d(g)||b(g)?!0:c(g)&&!a?a=!0:g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(l)?!1:!0}}function h(a){var b=CKEDITOR.dom.walker.whitespaces(),
d=CKEDITOR.dom.walker.bookmark(1);return function(c){return d(c)||b(c)?!0:!a&&k(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function b(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&m(a)&&(b=a);return g(a)&&!(k(a)&&a.equals(b))})}}var l={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(),
d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,g=CKEDITOR.dom.walker.editable(),m=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||f(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||f(this,0,null,a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,1,d,a,"undefined"==typeof b?!0:b);return d},createBookmark:function(a){var b,d,c,g,e=this.collapsed;b=this.document.createElement("span");
b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(c="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",c+(e?"C":"S")));e||(d=b.clone(),d.setHtml("\x26nbsp;"),a&&d.setAttribute("id",c+"E"),g=this.clone(),g.collapse(),g.insertNode(d));g=this.clone();g.collapse(!0);g.insertNode(b);d?(this.setStartAfter(b),this.setEndBefore(d)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(e?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:e}},createBookmark2:function(){function a(a){var b=
a.container,c=a.offset,g;g=b;var e=c;g=g.type!=CKEDITOR.NODE_ELEMENT||0===e||e==g.getChildCount()?0:g.getChild(e-1).type==CKEDITOR.NODE_TEXT&&g.getChild(e).type==CKEDITOR.NODE_TEXT;g&&(b=b.getChild(c-1),c=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<c){a:{for(g=b;c--;)if(e=g.getChild(c).getIndex(!0),0<=e){c=e;break a}c=-1}c+=1}if(b.type==CKEDITOR.NODE_TEXT){g=b;for(e=0;(g=g.getPrevious())&&g.type==CKEDITOR.NODE_TEXT;)e+=g.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
g=e;b.getText()?c+=g:(e=b.getPrevious(d),g?(c=g,b=e?e.getNext():b.getParent().getFirst()):(b=b.getParent(),c=e?e.getIndex(!0)+1:0))}a.container=b;a.offset=c}function b(a,d){var c=d.getCustomData("cke-fillingChar");if(c){var g=a.container;c.equals(g)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=g.getIndex(),a.container=g.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(d){var c=this.collapsed,g={container:this.startContainer,
offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};d&&(a(g),b(g,this.root),c||(a(e),b(e,this.root)));return{start:g.container.getAddress(d),end:c?null:e.container.getAddress(d),startOffset:g.offset,endOffset:e.offset,normalized:d,collapsed:c,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,c=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,d);c?this.setEnd(c,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,c=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT)if(g=a.getChildCount(),g>d)a=a.getChild(d);else if(1>g)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=
a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(g=b.getChildCount(),g>c)b=b.getChild(c).getPreviousSourceNode(!0);else if(1>g)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,c=this.endContainer,d=d.equals(c)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset):
d:d.getCommonAncestor(c);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,c=this.startOffset,g=this.collapsed;if((!a||g)&&d&&d.type==CKEDITOR.NODE_TEXT){if(c)if(c>=d.getLength())c=d.getIndex()+1,d=d.getParent();else{var e=d.split(c),c=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):d.equals(this.endContainer)&&(this.endOffset+=1)}else c=d.getIndex(),d=d.getParent();
this.setStart(d,c);if(g){this.collapse(!0);return}}d=this.endContainer;c=this.endOffset;b||g||!d||d.type!=CKEDITOR.NODE_TEXT||(c?(c>=d.getLength()||d.split(c),c=d.getIndex()+1):c=d.getIndex(),d=d.getParent(),this.setEnd(d,c))},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:var e=function(a,b){var d=new CKEDITOR.dom.range(m);
d.setStart(a,b);d.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),g;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=d.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;J=g!=a?g.getText():g.substring(b);if(c.test(J))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),m=this.root,f,l,k,y,A,D=!1,z,J;z=this.startContainer;var E=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(E&&(z=!CKEDITOR.tools.trim(z.substring(0,E)).length&&
z,D=!!z),z&&((y=z.getPrevious())||(k=z.getParent()))):(E&&(y=z.getChild(E-1)||z.getLast()),y||(k=z));for(k=d(k);k||y;){if(k&&!y){!A&&k.equals(h)&&(A=!0);if(g?k.isBlockBoundary():!m.contains(k))break;D&&"inline"==k.getComputedStyle("display")||(D=!1,A?f=k:this.setStartBefore(k));y=k.getPrevious()}for(;y;)if(z=!1,y.type==CKEDITOR.NODE_COMMENT)y=y.getPrevious();else{if(y.type==CKEDITOR.NODE_TEXT)J=y.getText(),c.test(J)&&(y=null),z=/[\s\ufeff]$/.test(J);else if((y.$.offsetWidth>(CKEDITOR.env.webkit?1:
0)||b&&y.is("br"))&&!y.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[y.getName()]){J=y.getText();if(c.test(J))y=null;else for(var E=y.$.getElementsByTagName("*"),H=0,F;F=E[H++];)if(!CKEDITOR.dtd.$removeEmpty[F.nodeName.toLowerCase()]){y=null;break}y&&(z=!!J.length)}else y=null;z&&(D?A?f=k:k&&this.setStartBefore(k):D=!0);if(y){z=y.getPrevious();if(!k&&!z){k=y;y=null;break}y=z}else k=null}k&&(k=d(k.getParent()))}z=this.endContainer;E=this.endOffset;k=y=null;A=D=!1;z.type==CKEDITOR.NODE_TEXT?
CKEDITOR.tools.trim(z.substring(E)).length?D=!0:(D=!z.getLength(),E==z.getLength()?(y=z.getNext())||(k=z.getParent()):e(z,E)&&(k=z.getParent())):(y=z.getChild(E))||(k=z);for(;k||y;){if(k&&!y){!A&&k.equals(h)&&(A=!0);if(g?k.isBlockBoundary():!m.contains(k))break;D&&"inline"==k.getComputedStyle("display")||(D=!1,A?l=k:k&&this.setEndAfter(k));y=k.getNext()}for(;y;){z=!1;if(y.type==CKEDITOR.NODE_TEXT)J=y.getText(),e(y,0)||(y=null),z=/^[\s\ufeff]/.test(J);else if(y.type==CKEDITOR.NODE_ELEMENT){if((0<y.$.offsetWidth||
b&&y.is("br"))&&!y.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[y.getName()]){J=y.getText();if(c.test(J))y=null;else for(E=y.$.getElementsByTagName("*"),H=0;F=E[H++];)if(!CKEDITOR.dtd.$removeEmpty[F.nodeName.toLowerCase()]){y=null;break}y&&(z=!!J.length)}else y=null}else z=1;z&&D&&(A?l=k:this.setEndAfter(k));if(y){z=y.getNext();if(!k&&!z){k=y;y=null;break}y=z}else k=null}k&&(k=d(k.getParent()))}f&&l&&(h=f.contains(l)?l:f,this.setStartBefore(h),this.setEndAfter(h));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:k=
new CKEDITOR.dom.range(this.root);m=this.root;k.setStartAt(m,CKEDITOR.POSITION_AFTER_START);k.setEnd(this.startContainer,this.startOffset);k=new CKEDITOR.dom.walker(k);var G,L,I=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),C=null,S=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(C){if(C.equals(a)){C=null;return}}else C=a;else if(C)return;var b=I(a);b||(G=a);return b},g=function(a){var b=S(a);!b&&a.is&&a.is("br")&&
(L=a);return b};k.guard=S;k=k.lastBackward();G=G||m;this.setStartAt(G,!G.is("br")&&(!k&&this.checkStartOfBlock()||k&&G.contains(k))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){k=this.clone();k=new CKEDITOR.dom.walker(k);var O=CKEDITOR.dom.walker.whitespaces(),P=CKEDITOR.dom.walker.bookmark();k.evaluator=function(a){return!O(a)&&!P(a)};if((k=k.previous())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br"))break}k=this.clone();k.collapse();k.setEndAt(m,
CKEDITOR.POSITION_BEFORE_END);k=new CKEDITOR.dom.walker(k);k.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?g:S;G=C=L=null;k=k.lastForward();G=G||m;this.setEndAt(G,!k&&this.checkEndOfBlock()||k&&G.contains(k)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);L&&this.setEndAfter(L)}},shrink:function(a,b,d){var c="boolean"===typeof d?d:d&&"boolean"===typeof d.shrinkOnBlockBoundary?d.shrinkOnBlockBoundary:!0,g=d&&d.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var e=this.clone(),h=
this.startContainer,m=this.endContainer,f=this.startOffset,k=this.endOffset,l=d=1;h&&h.type==CKEDITOR.NODE_TEXT&&(f?f>=h.getLength()?e.setStartAfter(h):(e.setStartBefore(h),d=0):e.setStartBefore(h));m&&m.type==CKEDITOR.NODE_TEXT&&(k?k>=m.getLength()?e.setEndAfter(m):(e.setEndAfter(m),l=0):e.setEndBefore(m));var e=new CKEDITOR.dom.walker(e),y=CKEDITOR.dom.walker.bookmark(),A=CKEDITOR.dom.walker.bogus();e.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
var D;e.guard=function(b,d){if(g&&A(b)||y(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(D)||!1===c&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||(D=b);return!0};d&&(h=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(h,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(e.reset(),(e=e[a==CKEDITOR.SHRINK_ELEMENT?
"lastBackward":"previous"]())&&this.setEndAt(e,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!d&&!l)}},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(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||(this._setEndContainer(a),this.endOffset=b);e(this)},setEnd:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+
1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a),this.startOffset=b);e(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);
break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}e(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);
break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}e(this)},fixBlock:function(a,b){var d=this.createBookmark(),c=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(c);c.trim();this.insertNode(c);var g=c.getBogus();g&&g.remove();c.appendBogus();this.moveToBookmark(d);return c},splitBlock:function(a,b){var d=new CKEDITOR.dom.elementPath(this.startContainer,this.root),c=new CKEDITOR.dom.elementPath(this.endContainer,this.root),
g=d.block,e=c.block,h=null;if(!d.blockLimit.equals(c.blockLimit))return null;"br"!=a&&(g||(g=this.fixBlock(!0,a),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,a)));d=g&&this.checkStartOfBlock();c=e&&this.checkEndOfBlock();this.deleteContents();g&&g.equals(e)&&(c?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),e=null):d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g,
CKEDITOR.POSITION_BEFORE_START),g=null):(e=this.splitElement(g,b||!1),g.is("ul","ol")||g.appendBogus()));return{previousBlock:g,nextBlock:e,wasStartOfBlock:d,wasEndOfBlock:c,elementPath:h}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,b||!1),c=a.clone(!1,b||!1);d.appendTo(c);c.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAtEnd:function(){function a(a){return function(c){return b(c)||
d(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isEmptyInlineRemoveable()||a.is("table")&&c.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var d=this.createBookmark(),c=this[b?"endPath":"startPath"](),g=c.block||c.blockLimit,e;g&&!g.equals(c.root)&&!g.getFirst(a(g));)e=g.getParent(),this[b?"setEndAt":"setStartAt"](g,CKEDITOR.POSITION_AFTER_END),g.remove(1),g=e;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,b){var d=b==CKEDITOR.START,c=this.clone();c.collapse(d);c[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=h(d);return c[d?"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)),d.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)),d.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 c=this.clone();c.collapse(1);c.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var c=this.clone();c.collapse();c.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(c);
d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(a,b){for(;a;){if(a.type==CKEDITOR.NODE_ELEMENT){if("false"==a.getAttribute("contentEditable")&&!a.data("cke-editable"))return 0;if(a.is("html")||"true"==a.getAttribute("contentEditable")&&(a.contains(b)||a.equals(b)))break}a=a.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 c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&d.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=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 g=a,e=c,h=void 0;g.type==CKEDITOR.NODE_ELEMENT&&g.isEditable(!1)&&(h=g[b?"getLast":"getFirst"](m));e||h||(h=g[b?"getPrevious":"getNext"](m));a=h}return!!c},moveToClosestEditablePosition:function(a,b){var d,c=0,g,e,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),
d.moveToPosition(a,h[b?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))c=1;else if(g=d[b?"getNextEditableNode":"getPreviousEditableNode"]())c=1,(e=g.type==CKEDITOR.NODE_ELEMENT)&&g.is(CKEDITOR.dtd.$block)&&"false"==g.getAttribute("contenteditable")?(d.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(g,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&g.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(g,0),d.collapse()):d.moveToPosition(g,h[b?1:0]);c&&this.moveToRange(d);
return!!c},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 c=a.next();
a.reset();return c&&c.equals(a.previous())?c: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:b(),getPreviousEditableNode:b(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.startContainer,d=
this.endContainer,c=b.getAscendant("table",!0),g=d.getAscendant("table",!0);return c&&!this.root.contains(c)?null:CKEDITOR.env.safari&&c&&d.equals(this.root)?b.getAscendant(a,!0):this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):c&&g&&(c.equals(g)||c.contains(g)||g.contains(c))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,c,g=this.clone();g.optimize();(c=g.startContainer.type==
CKEDITOR.NODE_TEXT)?(d=g.startContainer.getText(),b=g.startContainer.split(g.startOffset),a.insertAfter(g.startContainer)):g.insertNode(a);a.scrollIntoView();c&&(g.startContainer.setText(d),b.remove());a.remove()},getClientRects:function(){function a(a,b){var d=CKEDITOR.tools.array.map(a,function(a){return a}),c=new CKEDITOR.dom.range(b.root),g,e,h;b.startContainer instanceof CKEDITOR.dom.element&&(e=0===b.startOffset&&b.startContainer.hasAttribute("data-widget"));b.endContainer instanceof CKEDITOR.dom.element&&
(h=(h=b.endOffset===(b.endContainer.getChildCount?b.endContainer.getChildCount():b.endContainer.length))&&b.endContainer.hasAttribute("data-widget"));e&&c.setStart(b.startContainer.getParent(),b.startContainer.getIndex());h&&c.setEnd(b.endContainer.getParent(),b.endContainer.getIndex()+1);if(e||h)b=c;c=b.cloneContents();c=CKEDITOR.dom.document.prototype.find.call(c,"[data-cke-widget-id]").toArray();if(c=CKEDITOR.tools.array.map(c,function(a){var d=b.root.editor;a=a.getAttribute("data-cke-widget-id");
return d.widgets.instances[a].element}))return c=CKEDITOR.tools.array.map(c,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;g=this.root.getDocument().$.createRange();g.setStart(b.getParent().$,b.getIndex());g.setEnd(b.getParent().$,b.getIndex()+1);b=g.getClientRects();b.widgetRect=a.getClientRect();return b},b),CKEDITOR.tools.array.forEach(c,function(a){function b(g){CKEDITOR.tools.array.forEach(d,function(b,e){var h=CKEDITOR.tools.objectCompare(a[g],b);h||(h=CKEDITOR.tools.objectCompare(a.widgetRect,
b));h&&(Array.prototype.splice.call(d,e,a.length-g,a.widgetRect),c=!0)});c||(g<d.length-1?b(g+1):d.push(a.widgetRect))}var c;b(0)}),d}function b(a,d,g){var e;d.collapsed?g.startContainer instanceof CKEDITOR.dom.element?(a=g.checkStartOfBlock(),e=new CKEDITOR.dom.text("​"),a?g.startContainer.append(e,!0):0===g.startOffset?e.insertBefore(g.startContainer.getFirst()):(g=g.startContainer.getChildren().getItem(g.startOffset-1),e.insertAfter(g)),d.setStart(e.$,0),d.setEnd(e.$,0),a=d.getClientRects(),e.remove()):
g.startContainer instanceof CKEDITOR.dom.text&&(""===g.startContainer.getText()?(g.startContainer.setText("​"),a=d.getClientRects(),g.startContainer.setText("")):a=[c(g.createBookmark())]):a=[c(g.createBookmark())];return a}function d(a,b,c){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(c.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function c(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(c){var g=this.root.getDocument().$.createRange(),
e;g.setStart(this.startContainer.$,this.startOffset);g.setEnd(this.endContainer.$,this.endOffset);e=g.getClientRects();e=a(e,this);e.length||(e=b(e,g,this));return CKEDITOR.tools.array.map(e,function(a){return d(a,c,this)},this)}:function(a){return[d(c(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var d=this.getCommonAncestor(),c=this.getBoundaryNodes(),g=[],e,h,m,f;if(d&&d.find)for(h=
d.find(a),e=0;e<h.count();e++)if(d=h.getItem(e),b||!d.isReadOnly())m=d.getPosition(c.startNode)&CKEDITOR.POSITION_FOLLOWING||c.startNode.equals(d),f=d.getPosition(c.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||c.endNode.equals(d),m&&f&&g.push(d);return g}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var d=a[a.length-1],c=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(d){var g=new CKEDITOR.dom.range(b.root),c=new CKEDITOR.dom.walker(g),
e=CKEDITOR.dom.walker.whitespaces();g.setStart(d.endContainer,d.endOffset);g.setEnd(b.startContainer,b.startOffset);for(g=c.next();e(g)||b.endContainer.equals(g);)g=c.next();c=!g}c?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 e(b){1>arguments.length||(this.range=b,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function f(b){var a=[];b.forEach(function(b){if("true"==b.getAttribute("contenteditable"))return a.push(b),!1},CKEDITOR.NODE_ELEMENT,!0);return a}function c(b,a,d,g){a:{null==g&&(g=f(d));for(var e;e=g.shift();)if(e.getDtd().p){g={element:e,remaining:g};break a}g=null}if(!g)return 0;
if((e=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&!e.check(a))return c(b,a,d,g.remaining);a=new CKEDITOR.dom.range(g.element);a.selectNodeContents(g.element);a=a.createIterator();a.enlargeBr=b.enlargeBr;a.enforceRealBlocks=b.enforceRealBlocks;a.activeFilter=a.filter=e;b._.nestedEditable={element:g.element,container:d,remaining:g.remaining,iterator:a};return 1}function h(b,a,d){if(!a)return!1;b=b.clone();b.collapse(!d);return b.checkBoundaryOfElement(a,d?CKEDITOR.START:CKEDITOR.END)}
var b=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),d=function(b){return l(b)&&k(b)},g={dd:1,dt:1,li:1};e.prototype={getNextParagraph:function(e){var a,f,k,u,t;e=e||"p";if(this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;this.activeFilter=this.filter;if(c(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,
this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;if(!this._.started){var p=this.range.clone();f=p.startPath();var r=p.endPath(),v=!p.collapsed&&h(p,f.block),q=!p.collapsed&&h(p,r.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);v&&p.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);q&&p.setEndAt(r.block,CKEDITOR.POSITION_AFTER_START);f=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&
!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);p.collapsed||(f=new CKEDITOR.dom.walker(p.clone()),r=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=r,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(p.clone()),f.evaluator=r,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(r=this.range.clone(),
r.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),r.checkEndOfBlock()&&(r=new CKEDITOR.dom.elementPath(r.endContainer,r.root),this._.lastNode=(r.block||r.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(f)),p=null);this._.started=1;f=p}r=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;r;){var v=0,q=r.hasAscendant("pre"),B=r.type!=CKEDITOR.NODE_ELEMENT,
w=0;if(B)r.type==CKEDITOR.NODE_TEXT&&b.test(r.getText())&&(B=0);else{var y=r.getName();if(CKEDITOR.dtd.$block[y]&&"false"==r.getAttribute("contenteditable")){a=r;c(this,e,a);break}else if(r.isBlockBoundary(this.forceBrBreak&&!q&&{br:1})){if("br"==y)B=1;else if(!f&&!r.getChildCount()&&"hr"!=y){a=r;k=r.equals(p);break}f&&(f.setEndAt(r,CKEDITOR.POSITION_BEFORE_START),"br"!=y&&(this._.nextNode=r));v=1}else{if(r.getFirst()){f||(f=this.range.clone(),f.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));r=r.getFirst();
continue}B=1}}B&&!f&&(f=this.range.clone(),f.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));k=(!v||B)&&r.equals(p);if(f&&!v)for(;!r.getNext(d)&&!k;){y=r.getParent();if(y.isBlockBoundary(this.forceBrBreak&&!q&&{br:1})){v=1;B=0;k||y.equals(p);f.setEndAt(y,CKEDITOR.POSITION_BEFORE_END);break}r=y;B=1;k=r.equals(p);w=1}B&&f.setEndAt(r,CKEDITOR.POSITION_AFTER_END);r=this._getNextSourceNode(r,w,p);if((k=!r)||v&&f)break}if(!a){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=
null;a=new CKEDITOR.dom.elementPath(f.startContainer,f.root);r=a.blockLimit;v={div:1,th:1,td:1};a=a.block;!a&&r&&!this.enforceRealBlocks&&v[r.getName()]&&f.checkStartOfBlock()&&f.checkEndOfBlock()&&!r.equals(f.root)?a=r:!a||this.enforceRealBlocks&&a.is(g)?(a=this.range.document.createElement(e),f.extractContents().appendTo(a),a.trim(),f.insertNode(a),u=t=!0):"li"!=a.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(a=a.clone(!1),f.extractContents().appendTo(a),a.trim(),t=f.splitBlock(),u=!t.wasStartOfBlock,
t=!t.wasEndOfBlock,f.insertNode(a)):k||(this._.nextNode=a.equals(p)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,1,p))}u&&(u=a.getPrevious())&&u.type==CKEDITOR.NODE_ELEMENT&&("br"==u.getName()?u.remove():u.getLast()&&"br"==u.getLast().$.nodeName.toLowerCase()&&u.getLast().remove());t&&(u=a.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&"br"==u.getName()&&(!CKEDITOR.env.needsBrFiller||u.getPrevious(l)||u.getNext(l))&&u.remove();this._.nextNode||(this._.nextNode=k||a.equals(p)||!p?null:this._getNextSourceNode(a,
1,p));return a},_getNextSourceNode:function(b,a,d){function c(a){return!(a.equals(d)||a.equals(g))}var g=this.range.root;for(b=b.getNextSourceNode(a,null,c);!l(b);)b=b.getNextSourceNode(a,null,c);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new e(this)}}(),CKEDITOR.command=function(e,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&e.focus();return!1===this.fire("exec")?!0:!1!==f.exec.call(this,
e,c)};this.refresh=function(c,b){if(!this.readOnly&&c.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[c.mode]&&this.disable();return!1===this.fire("refresh",{editor:c,path:b})?!0:f.refresh&&!1!==f.refresh.apply(this,arguments)};var c;this.checkAllowed=function(h){return h||"boolean"!=typeof c?c=e.activeFilter.checkFeature(this):c};CKEDITOR.tools.extend(this,f,{modes:{wysiwyg:1},
editorFocus:1,contextSensitive:!!f.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(e){if(this.state==e||e!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=
this.state;this.state=e;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,
docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function e(a,b,d,c,g){var e,h;a=[];for(e in b){h=b[e];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:H(h);"$"!=e.charAt(0)&&(h.elements=e);d&&(h.featureName=d.toLowerCase());var f=h;f.elements=k(f.elements,
/\s+/)||null;f.propertiesOnly=f.propertiesOnly||!0===f.elements;var m=/\s*,\s*/,r=void 0;for(r in L){f[r]=k(f[r],m)||null;var l=f,n=I[r],w=k(f[I[r]],m),C=f[r],A=[],y=!0,q=void 0;w?y=!1:w={};for(q in C)"!"==q.charAt(0)&&(q=q.slice(1),A.push(q),w[q]=!0,y=!1);for(;q=A.pop();)C[q]=C["!"+q],delete C["!"+q];l[n]=(y?!1:w)||null}f.match=f.match||null;c.push(h);a.push(h)}b=g.elements;g=g.generic;var x;d=0;for(c=a.length;d<c;++d){e=H(a[d]);h=!0===e.classes||!0===e.styles||!0===e.attributes;f=e;r=n=m=void 0;
for(m in L)f[m]=v(f[m]);l=!0;for(r in I){m=I[r];n=f[m];w=[];C=void 0;for(C in n)-1<C.indexOf("*")?w.push(new RegExp("^"+C.replace(/\*/g,".*")+"$")):w.push(C);n=w;n.length&&(f[m]=n,l=!1)}f.nothingRequired=l;f.noProperties=!(f.attributes||f.classes||f.styles);if(!0===e.elements||null===e.elements)g[h?"unshift":"push"](e);else for(x in f=e.elements,delete e.elements,f)if(b[x])b[x][h?"unshift":"push"](e);else b[x]=[e]}}function f(a,b,g,e){if(!a.match||a.match(b))if(e||d(a,b))if(a.propertiesOnly||(g.valid=
!0),g.allAttributes||(g.allAttributes=c(a.attributes,b.attributes,g.validAttributes)),g.allStyles||(g.allStyles=c(a.styles,b.styles,g.validStyles)),!g.allClasses){a=a.classes;b=b.classes;e=g.validClasses;if(a)if(!0===a)a=!0;else{for(var h=0,f=b.length,m;h<f;++h)m=b[h],e[m]||(e[m]=a(m));a=!1}else a=!1;g.allClasses=a}}function c(a,b,d){if(!a)return!1;if(!0===a)return!0;for(var c in b)d[c]||(d[c]=a(c));return!1}function h(a,d,c){if(!a.match||a.match(d)){if(a.noProperties)return!1;c.hadInvalidAttribute=
b(a.attributes,d.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=b(a.styles,d.styles)||c.hadInvalidStyle;a=a.classes;d=d.classes;if(a){for(var g=!1,e=!0===a,h=d.length;h--;)if(e||a(d[h]))d.splice(h,1),g=!0;a=g}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function b(a,b){if(!a)return!1;var d=!1,c=!0===a,g;for(g in b)if(c||a(g))delete b[g],d=!0;return d}function l(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=F(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var d={},c=0,g;for(g in a)d[g]=a[g],c++;return c?d:!1}function d(a,b){if(a.nothingRequired)return!0;var d,c,e,h;if(e=a.requiredClasses)for(h=b.classes,d=0;d<e.length;++d)if(c=e[d],"string"==typeof c){if(-1==CKEDITOR.tools.indexOf(h,c))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,c))return!1;return g(b.styles,
a.requiredStyles)&&g(b.attributes,a.requiredAttributes)}function g(a,b){if(!b)return!0;for(var d=0,c;d<b.length;++d)if(c=b[d],"string"==typeof c){if(!(c in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,c))return!1;return!0}function m(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function a(a){var b,d,c,g,e={},h=1;for(a=F(a);b=a.match(C);)(d=b[2])?(c=n(d,"styles"),g=n(d,"attrs"),d=n(d,"classes")):c=g=d=null,e["$"+h++]=
{elements:b[1],classes:d,styles:c,attributes:g},a=a.slice(b[0].length);return e}function n(a,b){var d=a.match(S[b]);return d?F(d[1]):null}function x(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 u(a,b,d,c){var g=0,e;c.toHtml&&(b.name=b.name.replace(O,"$1"));if(c.doCallbacks&&a.elementCallbacks){a:{e=a.elementCallbacks;for(var m=0,k=e.length,l;m<k;++m)if(l=
e[m](b)){e=l;break a}e=void 0}if(e)return e}if(c.doTransform&&(e=a._.transformations[b.name])){x(b);for(m=0;m<e.length;++m)y(a,b,e[m]);p(b)}if(c.doFilter){a:{m=b.name;k=a._;a=k.allowedRules.elements[m];e=k.allowedRules.generic;m=k.disallowedRules.elements[m];k=k.disallowedRules.generic;l=c.skipRequired;var n={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},w,C;if(a||e){x(b);if(m)for(w=
0,C=m.length;w<C;++w)if(!1===h(m[w],b,n)){a=null;break a}if(k)for(w=0,C=k.length;w<C;++w)h(k[w],b,n);if(a)for(w=0,C=a.length;w<C;++w)f(a[w],b,n,l);if(e)for(w=0,C=e.length;w<C;++w)f(e[w],b,n,l);a=n}else a=null}if(!a||!a.valid)return d.push(b),1;C=a.validAttributes;var A=a.validStyles;e=a.validClasses;var m=b.attributes,I=b.styles,k=b.classes;l=b.classBackup;var q=b.styleBackup,v,H,E=[],n=[],F=/^data-cke-/;w=!1;delete m.style;delete m["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(v in m)C[v]||
(F.test(v)?v==(H=v.replace(/^data-cke-saved-/,""))||C[H]||(delete m[v],w=!0):(delete m[v],w=!0));if(!a.allStyles||a.hadInvalidStyle){for(v in I)a.allStyles||A[v]?E.push(v+":"+I[v]):w=!0;E.length&&(m.style=E.sort().join("; "))}else q&&(m.style=q);if(!a.allClasses||a.hadInvalidClass){for(v=0;v<k.length;++v)(a.allClasses||e[k[v]])&&n.push(k[v]);n.length&&(m["class"]=n.sort().join(" "));l&&n.length<l.split(/\s+/).length&&(w=!0)}else l&&(m["class"]=l);w&&(g=1);if(!c.skipFinalValidation&&!r(b))return d.push(b),
1}c.toHtml&&(b.name=b.name.replace(P,"cke:$1"));return g}function t(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 p(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 r(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 v(a){if(!a)return!1;if(!0===a)return!0;var b=t(a);return function(d){return d in a||b&&d.match(b)}}function q(){return new CKEDITOR.htmlParser.element("br")}function B(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||E.$block[a.name])}function w(a,b,d){var c=a.name;if(E.$empty[c]||!a.children.length)"hr"==c&&"br"==b?a.replaceWith(q()):(a.parent&&d.push({check:"it",el:a.parent}),a.remove());else if(E.$block[c]||"tr"==c)if("br"==b)a.previous&&!B(a.previous)&&(b=q(),b.insertBefore(a)),
a.next&&!B(a.next)&&(b=q(),b.insertAfter(a)),a.replaceWithChildren();else{var c=a.children,g;b:{g=E[b];for(var e=0,h=c.length,f;e<h;++e)if(f=c[e],f.type==CKEDITOR.NODE_ELEMENT&&!g[f.name]){g=!1;break b}g=!0}if(g)a.name=b,a.attributes={},d.push({check:"parent-down",el:a});else{g=a.parent;for(var e=g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==g.name,m,k,h=c.length;0<h;)f=c[--h],e&&(f.type==CKEDITOR.NODE_TEXT||f.type==CKEDITOR.NODE_ELEMENT&&E.$inline[f.name])?(m||(m=new CKEDITOR.htmlParser.element(b),
m.insertAfter(a),d.push({check:"parent-down",el:m})),m.add(f,0)):(m=null,k=E[g.name]||E.span,f.insertAfter(a),g.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||f.type!=CKEDITOR.NODE_ELEMENT||k[f.name]||d.push({check:"el-up",el:f}));a.remove()}}else c in{style:1,script:1}?a.remove():(a.parent&&d.push({check:"it",el:a.parent}),a.replaceWithChildren())}function y(a,b,d){var c,g;for(c=0;c<d.length;++c)if(g=d[c],!(g.check&&!a.check(g.check,!1)||g.left&&!g.left(b))){g.right(b,K);break}}function A(a,b){var d=b.getDefinition(),
c=d.attributes,g=d.styles,e,h,f,m;if(a.name!=d.element)return!1;for(e in c)if("class"==e)for(d=c[e].split(/\s+/),f=a.classes.join("|");m=d.pop();){if(-1==f.indexOf(m))return!1}else if(a.attributes[e]!=c[e])return!1;for(h in g)if(a.styles[h]!=g[h])return!1;return!0}function D(a,b){var d,c;"string"==typeof a?d=a:a instanceof CKEDITOR.style?c=a:(d=a[0],c=a[1]);return[{element:d,left:c,right:function(a,d){d.transform(a,b)}}]}function z(a){return function(b){return A(b,a)}}function J(a){return function(b,
d){d[a](b)}}var E=CKEDITOR.dtd,H=CKEDITOR.tools.copy,F=CKEDITOR.tools.trim,G=["","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 c=d.config.allowedContent;!0===c?this.disabled=!0:(c||(this.customConfig=!1),this.allow(c,"config",1),this.allow(d.config.extraAllowedContent,"extra",1),this.allow(G[d.enterMode]+" "+G[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(!l(this,b,c))return!1;var g,h;if("string"==typeof b)b=
a(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),d,c);g=b.getDefinition();b={};c=g.attributes;b[g.element]=g={styles:g.styles,requiredStyles:g.styles&&CKEDITOR.tools.objectKeys(g.styles)};c&&(c=H(c),g.classes=c["class"]?c["class"].split(/\s+/):null,g.requiredClasses=g.classes,delete c["class"],g.attributes=c,g.requiredAttributes=c&&CKEDITOR.tools.objectKeys(c))}else if(CKEDITOR.tools.isArray(b)){for(g=0;g<b.length;++g)h=this.allow(b[g],
d,c);return h}e(this,b,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,d,c){if(this.disabled)return!1;var g=this,e=[],h=this.editor&&this.editor.config.protectedSource,f,m=!1,k={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.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(f=u(g,a,e,k),f&1)m=!0;else if(f&2)return!1}else if(a.type==
CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var c=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var l,r,n;if(h)for(r=0;r<h.length;++r)if((n=c.match(h[r]))&&n[0].length==c.length){d=!0;break a}c=CKEDITOR.htmlParser.fragment.fromHtml(c);1==c.children.length&&(l=c.children[0]).type==CKEDITOR.NODE_ELEMENT&&u(g,l,d,k);d=!d.length}d||e.push(a)}},null,!0);e.length&&(m=!0);var l;a=[];c=G[c||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;d=
e.pop();)d.type==CKEDITOR.NODE_ELEMENT?w(d,c,a):d.remove();for(;l=a.pop();)if(d=l.el,d.parent)switch(n=E[d.parent.name]||E.span,l.check){case "it":E.$removeEmpty[d.name]&&!d.children.length?w(d,c,a):r(d)||w(d,c,a);break;case "el-up":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[d.name]||w(d,c,a);break;case "parent-down":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[d.name]||w(d.parent,c,a)}return m},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(!l(this,b,!0))return!1;"string"==typeof b&&(b=a(b));e(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,d,c=[],g;for(b=0;b<a.length&&!g;++b)d=a[b],("string"==typeof d||d instanceof CKEDITOR.style)&&this.check(d)&&(g=d);if(g){for(b=0;b<a.length;++b)c.push(D(a[b],g));this.addTransformations(c)}}},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 c=this._.transformations,g;for(g=0;g<a.length;++g){b=
a[g];var e=void 0,h=void 0,f=void 0,m=void 0,k=void 0,l=void 0;d=[];for(h=0;h<b.length;++h)f=b[h],"string"==typeof f?(f=f.split(/\s*:\s*/),m=f[0],k=null,l=f[1]):(m=f.check,k=f.left,l=f.right),e||(e=f,e=e.element?e.element:m?m.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),k instanceof CKEDITOR.style&&(k=z(k)),d.push({check:m==e?null:m,left:k,right:"string"==typeof l?J(l):l});b=e;c[b]||(c[b]=[]);c[b].push(d)}}},check:function(b,d,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(b)){for(var g=
b.length;g--;)if(this.check(b[g],d,c))return!0;return!1}var e,h;if("string"==typeof b){h=b+"\x3c"+(!1===d?"0":"1")+(c?"1":"0")+"\x3e";if(h in this._.cachedChecks)return this._.cachedChecks[h];e=a(b).$1;var f=e.styles,g=e.classes;e.name=e.elements;e.classes=g=g?g.split(/\s*,\s*/):[];e.styles=m(f);e.attributes=m(e.attributes);e.children=[];g.length&&(e.attributes["class"]=g.join(" "));f&&(e.attributes.style=CKEDITOR.tools.writeCssText(e.styles))}else e=b.getDefinition(),f=e.styles,g=e.attributes||{},
f&&!CKEDITOR.tools.isEmpty(f)?(f=H(f),g.style=CKEDITOR.tools.writeCssText(f,!0)):f={},e={name:e.element,attributes:g,classes:g["class"]?g["class"].split(/\s+/):[],styles:f,children:[]};var f=CKEDITOR.tools.clone(e),k=[],l;if(!1!==d&&(l=this._.transformations[e.name])){for(g=0;g<l.length;++g)y(this,e,l[g]);p(e)}u(this,f,k,{doFilter:!0,doTransform:!1!==d,skipRequired:!c,skipFinalValidation:!c});0<k.length?c=!1:((d=e.attributes["class"])&&(e.attributes["class"]=e.attributes["class"].split(" ").sort().join(" ")),
c=CKEDITOR.tools.objectCompare(e.attributes,f.attributes,!0),d&&(e.attributes["class"]=d));"string"==typeof b&&(this._.cachedChecks[h]=c);return c},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(d,c){var g=a.slice(),e;if(this.check(G[d]))return d;for(c||(g=g.reverse());e=g.pop();)if(this.check(e))return b[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=
b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var L={styles:1,attributes:1,classes:1},I={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},
C=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,S={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},O=/^cke:(object|embed|param)$/,P=/^(object|embed|param)$/,K;K=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 c=a.attributes[b];c&&(/^\d+$/.test(c)&&(c+="px"),a.styles[d]=c)}delete a.attributes[b]},lengthToAttribute:function(a,b,d){d=d||b;if(!(d in a.attributes)){var c=a.styles[b],g=c&&c.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[d]=g[1]:"cke-test"==c&&(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(c){a.styles["margin-top"]=d[c[0]];a.styles["margin-right"]=d[c[1]];a.styles["margin-bottom"]=d[c[2]];a.styles["margin-left"]=d[c[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(),c=d.styles,g=d.attributes,e,h,f,m;a.name=d.element;for(e in g)if("class"==e)for(d=a.classes.join("|"),f=g[e].split(/\s+/);m=f.pop();)-1==d.indexOf(m)&&a.classes.push(m);else a.attributes[e]=g[e];for(h in c)a.styles[h]=c[h]}}}}(),function(){CKEDITOR.focusManager=
function(e){if(e.focusManager)return e.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:e};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(e){this._.timer&&clearTimeout(this._.timer);e&&(this.currentActive=e);this.hasFocus||this._.locked||((e=CKEDITOR.currentInstance)&&e.focusManager.blur(1),this.hasFocus=!0,(e=this._.editor.container)&&e.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},
blur:function(e){function f(){if(this.hasFocus){this.hasFocus=!1;var c=this._.editor.container;c&&c.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var c=CKEDITOR.focusManager._.blurDelay;e||!c?f.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;f.call(this)},c,this)}},add:function(e,f){var c=e.getCustomData("focusmanager");if(!c||c!=this){c&&c.remove(e);var c="focus",h="blur";f&&(CKEDITOR.env.ie?(c="focusin",
h="focusout"):CKEDITOR.event.useCapture=1);var b={blur:function(){e.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(e)}};e.on(c,b.focus,this);e.on(h,b.blur,this);f&&(CKEDITOR.event.useCapture=0);e.setCustomData("focusmanager",this);e.setCustomData("focusmanager_handlers",b)}},remove:function(e){e.removeCustomData("focusmanager");var f=e.removeCustomData("focusmanager_handlers");e.removeListener("blur",f.blur);e.removeListener("focus",f.focus)}}}(),CKEDITOR.keystrokeHandler=function(e){if(e.keystrokeHandler)return e.keystrokeHandler;
this.keystrokes={};this.blockedKeystrokes={};this._={editor:e};return this},function(){var e,f=function(c){c=c.data;var b=c.getKeystroke(),f=this.keystrokes[b],k=this._.editor;e=!1===k.fire("key",{keyCode:b,domEvent:c});e||(f&&(e=!1!==k.execCommand(f,{from:"keystrokeHandler"})),e||(e=!!this.blockedKeystrokes[b]));e&&c.preventDefault(!0);return!e},c=function(c){e&&(e=!1,c.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(e){e.on("keydown",f,this);if(CKEDITOR.env.gecko&&
CKEDITOR.env.mac)e.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(e,f,c){e&&CKEDITOR.lang.languages[e]||(e=this.detect(f,e));var h=this;f=function(){h[e].dir=h.rtl[e]?"rtl":"ltr";c(e,h[e])};this[e]?f():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+e+".js"),f,this)},detect:function(e,f){var c=this.languages;f=f||navigator.userLanguage||navigator.language||e;var h=f.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),b=h[1],h=h[2];c[b+"-"+h]?b=b+"-"+h:c[b]||(b=null);CKEDITOR.lang.detect=b?function(){return b}:function(b){return b};return b||
e}}}(),CKEDITOR.scriptLoader=function(){var e={},f={};return{load:function(c,h,b,l){var k="string"==typeof c;k&&(c=[c]);b||(b=CKEDITOR);var d=c.length,g=[],m=[],a=function(a){h&&(k?h.call(b,a):h.call(b,g,m))};if(0===d)a(!0);else{var n=function(b,c){(c?g:m).push(b);0>=--d&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(c))},x=function(a,b){e[a]=1;var d=f[a];delete f[a];for(var c=0;c<d.length;c++)d[c](a,b)},u=function(a){if(e[a])n(a,!0);else{var b=f[a]||(f[a]=[]);b.push(n);if(!(1<
b.length)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:a});h&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?d.$.onreadystatechange=function(){if("loaded"==d.$.readyState||"complete"==d.$.readyState)d.$.onreadystatechange=null,x(a,!0)}:(d.$.onload=function(){setTimeout(function(){d.$.onload=null;d.$.onerror=null;x(a,!0)},0)},d.$.onerror=function(){d.$.onload=null;d.$.onerror=null;x(a,!1)}));d.appendTo(CKEDITOR.document.getHead())}}};l&&
CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t<d;t++)u(c[t])}},queue:function(){function c(){var b;(b=e[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var e=[];return function(b,f){var k=this;e.push({scriptUrl:b,callback:function(){f&&f.apply(this,arguments);e.shift();c.call(k)}});1==e.length&&c.call(this)}}()}}(),CKEDITOR.resourceManager=function(e,f){this.basePath=e;this.fileName=f;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype=
{add:function(e,f){if(this.registered[e])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+e+'" is already registered.');var c=this.registered[e]=f||{};c.name=e;c.path=this.getPath(e);CKEDITOR.fire(e+CKEDITOR.tools.capitalize(this.fileName)+"Ready",c);return this.get(e)},get:function(e){return this.registered[e]||null},getPath:function(e){var f=this.externals[e];return CKEDITOR.getUrl(f&&f.dir||this.basePath+e+"/")},getFilePath:function(e){var f=this.externals[e];return CKEDITOR.getUrl(this.getPath(e)+
(f?f.file:this.fileName+".js"))},addExternal:function(e,f,c){e=e.split(",");for(var h=0;h<e.length;h++){var b=e[h];c||(f=f.replace(/[^\/]+$/,function(b){c=b;return""}));this.externals[b]={dir:f,file:c||this.fileName+".js"}}},load:function(e,f,c){CKEDITOR.tools.isArray(e)||(e=e?[e]:[]);for(var h=this.loaded,b=this.registered,l=[],k={},d={},g=0;g<e.length;g++){var m=e[g];if(m)if(h[m]||b[m])d[m]=this.get(m);else{var a=this.getFilePath(m);l.push(a);a in k||(k[a]=[]);k[a].push(m)}}CKEDITOR.scriptLoader.load(l,
function(a,b){if(b.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+k[b[0]].join(",")+'" was not found at "'+b[0]+'".');for(var g=0;g<a.length;g++)for(var e=k[a[g]],m=0;m<e.length;m++){var l=e[m];d[l]=this.get(l);h[l]=1}f.call(c,d)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(e){var f={};return function(c,h,b){var l={},k=function(d){e.call(this,d,function(d){CKEDITOR.tools.extend(l,
d);var c=[],a;for(a in d){var e=d[a],x=e&&e.requires;if(!f[a]){if(e.icons)for(var u=e.icons.split(","),t=u.length;t--;)CKEDITOR.skin.addIcon(u[t],e.path+"icons/"+(CKEDITOR.env.hidpi&&e.hidpi?"hidpi/":"")+u[t]+".png");f[a]=1}if(x)for(x.split&&(x=x.split(",")),e=0;e<x.length;e++)l[x[e]]||c.push(x[e])}if(c.length)k.call(this,c);else{for(a in l)e=l[a],e.onLoad&&!e.onLoad._called&&(!1===e.onLoad()&&delete l[a],e.onLoad._called=1);h&&h.call(b||window,l)}},this)};k.call(this,c)}}),CKEDITOR.plugins.setLang=
function(e,f,c){var h=this.get(e);e=h.langEntries||(h.langEntries={});h=h.lang||(h.lang=[]);h.split&&(h=h.split(","));-1==CKEDITOR.tools.indexOf(h,f)&&h.push(f);e[f]=c},CKEDITOR.ui=function(e){if(e.ui)return e.ui;this.items={};this.instances={};this.editor=e;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(e,f,c){c.name=e.toLowerCase();var h=this.items[e]={type:f,command:c.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(h,c)},get:function(e){return this.instances[e]},
create:function(e){var f=this.items[e],c=f&&this._.handlers[f.type],h=f&&f.command&&this.editor.getCommand(f.command),c=c&&c.create.apply(this,f.args);this.instances[e]=c;h&&h.uiItems.push(c);c&&!c.type&&(c.type=f.type);return c},addHandler:function(e,f){this._.handlers[e]=f},space:function(e){return CKEDITOR.document.getById(this.spaceId(e))},spaceId:function(e){return this.editor.id+"_"+e}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function e(a,b,g){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);
if(void 0!==b){if(!(b instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!g)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!c(b,g))throw Error('The specified element mode is not supported on element: "'+b.getName()+'".');this.element=b;this.elementMode=g;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&
(b.getId()||b.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||f();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",h);this.on("selectionChange",function(a){l(this,a.data.path)});this.on("activeFilterChange",
function(){l(this,this.elementPath(),!0)});this.on("mode",h);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(){"destroyed"!==this.status?d(this,a):CKEDITOR.warn("editor-incorrect-destroy")},
0,this)}function f(){do var a="editor"+ ++t;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 h(){var a=this.commands,d;for(d in a)b(this,a[d])}function b(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function l(a,b,d){if(b){var c,g,e=a.commands;for(g in e)c=e[g],(d||c.contextSensitive)&&
c.refresh(a,b)}}function k(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),d=p[b]||(p[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 d(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var d in b.on)a.on(d,b.on[d]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}d=
a.config;a.readOnly=d.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=d.tabIndex||a.element&&a.element.getAttribute("tabindex")||
0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:d.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:d.shiftEnterMode;d.skin&&(CKEDITOR.skinName=d.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);g(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);k(a)||a.fireOnce("customConfigLoaded")}function g(a){CKEDITOR.skin.loadPart("editor",function(){m(a)})}function m(b){CKEDITOR.lang.load(b.config.language,
b.config.defaultLanguage,function(d,c){var g=b.config.title;b.langCode=d;b.lang=CKEDITOR.tools.prototypedCopy(c);b.title="string"==typeof g||!1===g?g:[b.lang.editor,b.name].join(", ");b.config.contentsLangDirection||(b.config.contentsLangDirection=b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?b.element.getDirection(1):b.lang.dir);b.fire("langLoaded");a(b)})}function a(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,c=b(d.plugins),g=b(d.extraPlugins),e=b(d.removePlugins);if(g)var h=new RegExp("(?:^|,)(?:"+g.replace(/,/g,"|")+")(?\x3d,|$)","g"),c=c.replace(h,""),c=c+(","+g);if(e)var f=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),c=c.replace(f,"");CKEDITOR.env.air&&(c+=",adobeair");CKEDITOR.plugins.load(c.split(","),function(b){var c=[],g=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var h in b){var m=
b[h],k=m.lang,l=null,n=m.requires,w;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(w=n.match(f)))for(;n=w.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:h});k&&!a.lang[h]&&(k.split&&(k=k.split(",")),0<=CKEDITOR.tools.indexOf(k,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(k,l)?l:0<=CKEDITOR.tools.indexOf(k,"en")?"en":k[0]),m.langEntries&&m.langEntries[l]?(a.lang[h]=m.langEntries[l],l=null):e.push(CKEDITOR.getUrl(m.path+
"lang/"+l+".js")));g.push(l);c.push(m)}CKEDITOR.scriptLoader.load(e,function(){for(var b=["beforeInit","init","afterInit"],e=0;e<b.length;e++)for(var h=0;h<c.length;h++){var f=c[h];0===e&&g[h]&&f.lang&&f.langEntries&&(a.lang[f.name]=f.langEntries[g[h]]);if(f[b[e]])f[b[e]](a)}a.fireOnce("pluginsLoaded");d.keystrokes&&a.setKeystroke(a.config.keystrokes);for(h=0;h<a.config.blockedKeystrokes.length;h++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[h]]=1;a.status="loaded";a.fireOnce("loaded");
CKEDITOR.fire("instanceLoaded",null,a)})})}function x(){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 u(a,b){function d(a){var b=a.startContainer,c=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(c)&&a.endOffset===b.getChildCount())?!0:!1}function c(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():
b.clone(!0)}for(var g=new CKEDITOR.dom.documentFragment,e,h,f,m=0;m<a.length;m++){var k=a[m],l=k.startContainer.getAscendant("tr",!0);d(k)?(e||(e=l.getAscendant("table").clone(),e.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),g.append(e),e=e.findOne("thead, tbody, tfoot")),h&&h.equals(l)||(h=l,f=l.clone(),e.append(f)),f.append(c(k))):g.append(k.cloneContents())}return e?g:b.getHtmlFromRange(a[0])}e.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=e;var t=0,p={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,
{plugins:{detectConflict:function(a,b){for(var d=0;d<b.length;d++){var c=b[d];if(this[c])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:c}),!0}return!1}},addCommand:function(a,d){d.name=a.toLowerCase();var c=d instanceof CKEDITOR.command?d:new CKEDITOR.command(this,d);this.mode&&b(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){d.updateElement();d._.required&&!c.getValue()&&!1===d.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&
a.apply)}var d=this,c=d.element,g=new CKEDITOR.dom.element(c.$.form);c.is("textarea")&&g&&(g.on("submit",a),b(g.$.submit)&&(g.$.submit=CKEDITOR.tools.override(g.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),d.on("destroy",function(){g.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,d=this;this.fire("beforeDestroy");!a&&x.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.objectKeys(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),
c={name:a,commandData:b||{},command:d};return d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",c)&&(c.returnValue=d.exec(c.commandData),!d.async&&!1!==this.fire("afterCommandExec",c))?c.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 c=!0,g=b;b&&"object"==typeof b&&(d=b.internal,g=b.callback,c=!b.noSnapshot);!d&&c&&this.fire("saveSnapshot");if(g||!d)this.once("dataReady",function(a){!d&&c&&this.fire("saveSnapshot");g&&g.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=u(d,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var d=this.editable(),c=this.getSelection().getRanges(),g=new CKEDITOR.dom.documentFragment,e;if(!d||0===c.length)return null;for(e=0;e<c.length;e++)g.append(d.extractHtmlFromRange(c[e],b));b||this.getSelection().selectRanges([c[0]]);return a?g.getHtml():g},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==
this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return x.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],d,c,g=b.length;g--;)d=b[g],c=0,CKEDITOR.tools.isArray(d)&&(c=d[1],d=d[0]),c?a[d]=c:delete a[d]},getCommandKeystroke:function(a,b){var d="string"===typeof a?this.getCommand(a):a,c=[];if(d){var g=CKEDITOR.tools.object.findKey(this.commands,
d),e=this.keystrokeHandler.keystrokes;if(d.fakeKeystroke)c.push(d.fakeKeystroke);else for(var h in e)e[h]===g&&c.push(h)}return b?c:c[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)}})}(),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 e=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,f={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 h,b,l=0,k;h=this._.htmlPartsRegex.exec(c);){b=h.index;if(b>l)if(l=c.substring(l,b),k)k.push(l);else this.onText(l);
l=this._.htmlPartsRegex.lastIndex;if(b=h[1])if(b=b.toLowerCase(),k&&CKEDITOR.dtd.$cdata[b]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(b);continue}if(k)k.push(h[0]);else if(b=h[3]){if(b=b.toLowerCase(),!/="/.test(b)){var d={},g,m=h[4];h=!!h[5];if(m)for(;g=e.exec(m);){var a=g[1].toLowerCase();g=g[2]||g[3]||g[4]||"";d[a]=!g&&f[a]?a:CKEDITOR.tools.htmlDecodeAttr(g)}this.onTagOpen(b,d,h);!k&&CKEDITOR.dtd.$cdata[b]&&(k=[])}}else if(b=h[2])this.onComment(b)}if(c.length>l)this.onText(c.substring(l,
c.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(e){this._.output.push("\x3c",e)},openTagClose:function(e,f){f?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(e,f){"string"==typeof f&&(f=CKEDITOR.tools.htmlEncodeAttr(f));this._.output.push(" ",e,'\x3d"',f,'"')},closeTag:function(e){this._.output.push("\x3c/",e,"\x3e")},text:function(e){this._.output.push(e)},comment:function(e){this._.output.push("\x3c!--",
e,"--\x3e")},write:function(e){this._.output.push(e)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(e){var f=this._.output.join("");e&&this.reset();return f}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var e=this.parent.children,f=CKEDITOR.tools.indexOf(e,this),c=this.previous,h=this.next;c&&(c.next=h);h&&(h.previous=c);e.splice(f,1);this.parent=null},replaceWith:function(e){var f=this.parent.children,
c=CKEDITOR.tools.indexOf(f,this),h=e.previous=this.previous,b=e.next=this.next;h&&(h.next=e);b&&(b.previous=e);f[c]=e;e.parent=this.parent;this.parent=null},insertAfter:function(e){var f=e.parent.children,c=CKEDITOR.tools.indexOf(f,e),h=e.next;f.splice(c+1,0,this);this.next=e.next;this.previous=e;e.next=this;h&&(h.previous=this);this.parent=e.parent},insertBefore:function(e){var f=e.parent.children,c=CKEDITOR.tools.indexOf(f,e);f.splice(c,0,this);this.next=e;(this.previous=e.previous)&&(e.previous.next=
this);e.previous=this;this.parent=e.parent},getAscendant:function(e){var f="function"==typeof e?e:"string"==typeof e?function(c){return c.name==e}:function(c){return c.name in e},c=this.parent;for(;c&&c.type==CKEDITOR.NODE_ELEMENT;){if(f(c))return c;c=c.parent}return null},wrapWith:function(e){this.replaceWith(e);e.add(this);return e},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(e){return e||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=
function(e){this.value=e;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(e,f){var c=this.value;if(!(c=e.onComment(f,c,this)))return this.remove(),!1;if("string"!=typeof c)return this.replaceWith(c),!1;this.value=c;return!0},writeHtml:function(e,f){f&&this.filter(f);e.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(e){this.value=e;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=
CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(e,f){if(!(this.value=e.onText(f,this.value,this)))return this.remove(),!1},writeHtml:function(e,f){f&&this.filter(f);e.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(e){this.value=e};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(e){e.write(this.value)}})}(),"use strict",
CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function e(b){return b.attributes["data-cke-survive"]?!1:"a"==b.name&&b.attributes.href||CKEDITOR.dtd.$removeEmpty[b.name]}var f=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},h=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),b={ul:"li",
ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(l,k,d){function g(a){var b;if(0<r.length)for(var d=0;d<r.length;d++){var c=r[d],g=c.name,e=CKEDITOR.dtd[g],h=q.name&&CKEDITOR.dtd[q.name];h&&!h[g]||a&&e&&!e[a]&&CKEDITOR.dtd[a]?g==q.name&&(n(q,q.parent,1),d--):(b||(m(),b=1),c=c.clone(),c.parent=q,q=c,r.splice(d,1),d--)}}function m(){for(;v.length;)n(v.shift(),q)}function a(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=
a.children.length,d=a.children[b-1],c;d&&d.type==CKEDITOR.NODE_TEXT&&((c=CKEDITOR.tools.rtrim(d.value))?d.value=c:a.children.length=b-1)}}function n(b,c,g){c=c||q||p;var h=q;void 0===b.previous&&(x(c,b)&&(q=c,t.onTagOpen(d,{}),b.returnPoint=c=q),a(b),e(b)&&!b.children.length||c.add(b),"pre"==b.name&&(w=!1),"textarea"==b.name&&(B=!1));b.returnPoint?(q=b.returnPoint,delete b.returnPoint):q=g?c:h}function x(a,b){if((a==p||"body"==a.name)&&d&&(!a.name||CKEDITOR.dtd[a.name][d])){var c,g;return(c=b.attributes&&
(g=b.attributes["data-cke-real-element-type"])?g:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function u(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var t=new CKEDITOR.htmlParser,p=k instanceof CKEDITOR.htmlParser.element?k:"string"==typeof k?new CKEDITOR.htmlParser.element(k):new CKEDITOR.htmlParser.fragment,r=[],v=[],q=p,B="textarea"==p.name,w="pre"==p.name;t.onTagOpen=
function(a,b,d,k){b=new CKEDITOR.htmlParser.element(a,b);b.isUnknown&&d&&(b.isEmpty=!0);b.isOptionalClose=k;if(e(b))r.push(b);else{if("pre"==a)w=!0;else{if("br"==a&&w){q.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==a&&(B=!0)}if("br"==a)v.push(b);else{for(;!(k=(d=q.name)?CKEDITOR.dtd[d]||(q._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):h,b.isUnknown||q.isUnknown||k[a]);)if(q.isOptionalClose)t.onTagClose(d);else if(a in c&&d in c)d=q.children,(d=d[d.length-1])&&"li"==d.name||n(d=new CKEDITOR.htmlParser.element("li"),
q),!b.returnPoint&&(b.returnPoint=q),q=d;else if(a in CKEDITOR.dtd.$listItem&&!u(a,d))t.onTagOpen("li"==a?"ul":"dl",{},0,1);else if(d in f&&!u(a,d))!b.returnPoint&&(b.returnPoint=q),q=q.parent;else if(d in CKEDITOR.dtd.$inline&&r.unshift(q),q.parent)n(q,q.parent,1);else{b.isOrphan=1;break}g(a);m();b.parent=q;b.isEmpty?n(b):q=b}}};t.onTagClose=function(a){for(var b=r.length-1;0<=b;b--)if(a==r[b].name){r.splice(b,1);return}for(var c=[],g=[],e=q;e!=p&&e.name!=a;)e._.isBlockLike||g.unshift(e),c.push(e),
e=e.returnPoint||e.parent;if(e!=p){for(b=0;b<c.length;b++){var h=c[b];n(h,h.parent)}q=e;e._.isBlockLike&&m();n(e,e.parent);e==q&&(q=q.parent);r=r.concat(g)}"body"==a&&(d=!1)};t.onText=function(a){if(!(q._.hasInlineStarted&&!v.length||w||B)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var c=q.name,e=c?CKEDITOR.dtd[c]||(q._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):h;if(!B&&!e["#"]&&c in f)t.onTagOpen(b[c]||""),t.onText(a);else{m();g();w||B||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=
new CKEDITOR.htmlParser.text(a);if(x(q,a))this.onTagOpen(d,{},0,1);q.add(a)}};t.onCDATA=function(a){q.add(new CKEDITOR.htmlParser.cdata(a))};t.onComment=function(a){m();g();q.add(new CKEDITOR.htmlParser.comment(a))};t.parse(l);for(m();q!=p;)n(q,q.parent,1);a(p);return p};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(b,c){isNaN(c)&&(c=this.children.length);var d=0<c?this.children[c-1]:null;if(d){if(b._.isBlockLike&&d.type==CKEDITOR.NODE_TEXT&&(d.value=CKEDITOR.tools.rtrim(d.value),
0===d.value.length)){this.children.pop();this.add(b);return}d.next=b}b.previous=d;b.parent=this;this.children.splice(c,0,b);this._.hasInlineStarted||(this._.hasInlineStarted=b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&!b._.isBlockLike)},filter:function(b,c){c=this.getFilterContext(c);b.onRoot(c,this);this.filterChildren(b,!1,c)},filterChildren:function(b,c,d){if(this.childrenFilteredBy!=b.id){d=this.getFilterContext(d);if(c&&!this.parent)b.onRoot(d,this);this.childrenFilteredBy=b.id;
for(c=0;c<this.children.length;c++)!1===this.children[c].filter(b,d)&&c--}},writeHtml:function(b,c){c&&this.filter(c);this.writeChildrenHtml(b)},writeChildrenHtml:function(b,c,d){var g=this.getFilterContext();if(d&&!this.parent&&c)c.onRoot(g,this);c&&this.filterChildren(c,!1,g);c=0;d=this.children;for(g=d.length;c<g;c++)d[c].writeHtml(b)},forEach:function(b,c,d){if(!(d||c&&this.type!=c))var g=b(this);if(!1!==g){d=this.children;for(var e=0;e<d.length;e++)g=d[e],g.type==CKEDITOR.NODE_ELEMENT?g.forEach(b,
c):c&&g.type!=c||b(g)}},getFilterContext:function(b){return b||{}}}}(),"use strict",function(){function e(){this.rules=[]}function f(c,h,b,f){var k,d;for(k in h)(d=c[k])||(d=c[k]=new e),d.add(h[k],b,f)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(c){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new e;this.attributeNameRules=new e;this.elementsRules={};this.attributesRules={};this.textRules=new e;this.commentRules=new e;this.rootRules=new e;c&&this.addRules(c,10)},
proto:{addRules:function(c,e){var b;"number"==typeof e?b=e:e&&"priority"in e&&(b=e.priority);"number"!=typeof b&&(b=10);"object"!=typeof e&&(e={});c.elementNames&&this.elementNameRules.addMany(c.elementNames,b,e);c.attributeNames&&this.attributeNameRules.addMany(c.attributeNames,b,e);c.elements&&f(this.elementsRules,c.elements,b,e);c.attributes&&f(this.attributesRules,c.attributes,b,e);c.text&&this.textRules.add(c.text,b,e);c.comment&&this.commentRules.add(c.comment,b,e);c.root&&this.rootRules.add(c.root,
b,e)},applyTo:function(c){c.filter(this)},onElementName:function(c,e){return this.elementNameRules.execOnName(c,e)},onAttributeName:function(c,e){return this.attributeNameRules.execOnName(c,e)},onText:function(c,e,b){return this.textRules.exec(c,e,b)},onComment:function(c,e,b){return this.commentRules.exec(c,e,b)},onRoot:function(c,e){return this.rootRules.exec(c,e)},onElement:function(c,e){for(var b=[this.elementsRules["^"],this.elementsRules[e.name],this.elementsRules.$],f,k=0;3>k;k++)if(f=b[k]){f=
f.exec(c,e,this);if(!1===f)return null;if(f&&f!=e)return this.onNode(c,f);if(e.parent&&!e.name)break}return e},onNode:function(c,e){var b=e.type;return b==CKEDITOR.NODE_ELEMENT?this.onElement(c,e):b==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(c,e.value)):b==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(c,e.value)):null},onAttribute:function(c,e,b,f){return(b=this.attributesRules[b])?b.exec(c,f,e,this):f}}});CKEDITOR.htmlParser.filterRulesGroup=e;e.prototype=
{add:function(c,e,b){this.rules.splice(this.findIndex(e),0,{value:c,priority:e,options:b})},addMany:function(c,e,b){for(var f=[this.findIndex(e),0],k=0,d=c.length;k<d;k++)f.push({value:c[k],priority:e,options:b});this.rules.splice.apply(this.rules,f)},findIndex:function(c){for(var e=this.rules,b=e.length-1;0<=b&&c<e[b].priority;)b--;return b+1},exec:function(c,e){var b=e instanceof CKEDITOR.htmlParser.node||e instanceof CKEDITOR.htmlParser.fragment,f=Array.prototype.slice.call(arguments,1),k=this.rules,
d=k.length,g,m,a,n;for(n=0;n<d;n++)if(b&&(g=e.type,m=e.name),a=k[n],!(c.nonEditable&&!a.options.applyToAll||c.nestedEditable&&a.options.excludeNestedEditable)){a=a.value.apply(null,f);if(!1===a||b&&a&&(a.name!=m||a.type!=g))return a;null!=a&&(f[0]=e=a)}return e},execOnName:function(c,e){for(var b=0,f=this.rules,k=f.length,d;e&&b<k;b++)d=f[b],c.nonEditable&&!d.options.applyToAll||c.nestedEditable&&d.options.excludeNestedEditable||(e=e.replace(d.value[0],d.value[1]));return e}}}(),function(){function e(a,
d){function g(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function e(a,b){return function(d){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=[],m=c(d),k,w;if(m)for(f(m,1)&&e.push(m);m;)l(m)&&(k=h(m))&&f(k)&&((w=h(k))&&!l(w)?e.push(k):(g(n).insertAfter(k),k.remove())),m=m.previous;for(m=0;m<e.length;m++)e[m].remove();if(e=!a||!1!==("function"==typeof b?b(d):b))n||CKEDITOR.env.needsBrFiller||d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?
n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||d.name in CKEDITOR.dtd.tr||d.name in CKEDITOR.dtd.$listItem)?(e=c(d),e=!e||"form"==d.name&&"input"==e.name):e=!1:e=!1;e&&d.add(g(a))}}}function f(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(q))&&(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 C)||!n&&((d=a.previous)&&"br"==d.name||!d||l(d)))?!0:!1}var m={elements:{}},n="html"==d,C=CKEDITOR.tools.extend({},A),r;for(r in C)"#"in w[r]||delete C[r];for(r in C)m.elements[r]=e(n,a.config.fillEmptyBlocks);m.root=e(n,!1);m.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&&b(c);)c=c.next;var e=h(d);!c&&l(d.parent)?k(d.parent,
g(a)):l(c)&&e&&!l(e)&&g(a).insertBefore(c)}}}}(n);return m}function f(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&&b(a);)a=a.previous;return a}function h(a){for(a=a.previous;a&&b(a);)a=a.previous;return a}function b(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function l(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 d(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function g(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function m(a){return a.replace(H,function(a,b,d){return"\x3c"+b+d.replace(F,
function(a,b){return G.test(b)&&-1==d.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function a(a,b){return a.replace(b,function(a,b,d){0===a.indexOf("\x3ctextarea")&&(a=b+p(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(C,function(a,b){return decodeURIComponent(b)})}function x(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
function(a){return"\x3c!--"+B+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function u(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,b){var d=b.toLowerCase(),c=b.toUpperCase(),e=t(d);d!==c&&(e+="|"+t(c));return a+("("+e+")")},"")}function t(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 c in b)b[c]&&(a+="|"+b[c]);return a}function p(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,
function(a,b){return decodeURIComponent(b)})}function r(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 v(a,b){var d=[],c=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,c=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(c);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,
function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var f=0;f<c.length;f++)a=a.replace(c[f],function(a){a=a.replace(g,function(a,b,c){return d[c]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(d.push(a)-1)+"--\x3e"});a=a.replace(g,function(a,b,c){return"\x3c!--"+B+(b?"{C}":"")+encodeURIComponent(d[c]).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){e[e.id]=decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,e){return"\x3c"+d+c+"\x3e"+r(p(e),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(D);d.addRules(z,{applyToAll:!0});d.addRules(e(b,"data"),
{applyToAll:!0});c.addRules(J);c.addRules(E,{applyToAll:!0});c.addRules(e(b,"html"),{applyToAll:!0});b.on("toHtml",function(d){d=d.data;var c=d.dataValue,e,c=c.replace(S,""),c=v(c,b),c=a(c,I),c=m(c),c=a(c,L),c=c.replace(O,"$1cke:$2"),c=c.replace(K,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=d.context||b.editable().getName();var g;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==
e&&(e="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",g=1);e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");g&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(P,"$1$2");c=n(c);c=p(c);e=!1===d.fixForBody?!1:f(d.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,d.context,e);e&&(g=c,!g.children.length&&CKEDITOR.dtd[g.name][e]&&(e=new CKEDITOR.htmlParser.element(e),g.add(e)));d.dataValue=c},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=x(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,f(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,c=g.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(!0);d=p(d);d=r(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype=
{toHtml:function(a,b,d,c){var e=this.editor,g,f,h,m;b&&"object"==typeof b?(g=b.context,d=b.fixForBody,c=b.dontFilter,f=b.filter,h=b.enterMode,m=b.protectedWhitespaces):g=b;g||null===g||(g=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:g,fixForBody:d,dontFilter:c,filter:f||e.filter,enterMode:h||e.enterMode,protectedWhitespaces:m}).dataValue},toDataFormat:function(a,b){var d,c,e;b&&(d=b.context,c=b.filter,e=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",
{dataValue:a,filter:c||this.editor.filter,context:d,enterMode:e||this.editor.enterMode}).dataValue}};var q=/(?:&nbsp;|\xa0)$/,B="{cke_protected}",w=CKEDITOR.dtd,y="caption colgroup col thead tfoot tbody".split(" "),A=CKEDITOR.tools.extend({},w.$blockLimit,w.$block),D={elements:{input:d,textarea:d}},z={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}}}},J={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}}},E={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,
""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],c,e=0;e<d.length;e++)c="data-cke-saved-"+d[e],c in b&&delete b[d[e]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var d,c;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(d=CKEDITOR.tools.indexOf(y,a.name),c=CKEDITOR.tools.indexOf(y,b.name));-1<d&&-1<c&&d!=c||(d=a.parent?a.getIndex():-1,c=b.parent?b.getIndex():-1);return d>c?
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:g,textarea:g},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var H=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,G=/^(href|src|name)$/i,L=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
I=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,C=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,S=new RegExp("("+u("\x3ccke:encoded\x3e")+"(.*?)"+u("\x3c/cke:encoded\x3e")+")|("+u("\x3c")+u("/")+"?"+u("cke:encoded\x3e")+")","gi"),O=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,P=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,K=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(e,f){this.name=e;this.attributes=f||{};this.children=
[];var c=e||"",h=c.match(/^cke:(.*)/);h&&(c=h[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[e];this.isUnknown=!CKEDITOR.dtd[e];this._={isBlockLike:c,hasInlineStarted:this.isEmpty||!c}},CKEDITOR.htmlParser.cssStyle=function(e){var f={};((e instanceof CKEDITOR.htmlParser.element?e.attributes.style:e)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(c,e,b){"font-family"==e&&(b=b.replace(/["']/g,""));f[e.toLowerCase()]=b});return{rules:f,populate:function(c){var e=this.toString();e&&(c instanceof CKEDITOR.dom.element?c.setAttribute("style",e):c instanceof CKEDITOR.htmlParser.element?c.attributes.style=e:c.style=e)},toString:function(){var c=[],e;for(e in f)f[e]&&c.push(e,":",f[e],";");return c.join("")}}},function(){function e(c){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof c?b.name==c:b.name in c)}}var f=
function(c,b){c=c[0];b=b[0];return c<b?-1:c>b?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(c,b){var e=this,f,d;b=e.getFilterContext(b);if(!e.parent)c.onRoot(b,e);for(;;){f=e.name;if(!(d=c.onElementName(b,f)))return this.remove(),!1;e.name=d;if(!(e=c.onElement(b,e)))return this.remove(),
!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==f)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(),!1}f=e.attributes;var g,m;for(g in f){for(d=f[g];;)if(m=c.onAttributeName(b,g))if(m!=g)delete f[g],g=m;else break;else{delete f[g];break}m&&(!1===(d=c.onAttribute(b,e,m,d))?delete f[m]:f[m]=d)}e.isEmpty||this.filterChildren(c,!1,b);return!0},filterChildren:c.filterChildren,writeHtml:function(c,b){b&&this.filter(b);var e=this.name,
k=[],d=this.attributes,g,m;c.openTag(e,d);for(g in d)k.push([g,d[g]]);c.sortAttributes&&k.sort(f);g=0;for(m=k.length;g<m;g++)d=k[g],c.attribute(d[0],d[1]);c.openTagClose(e,this.isEmpty);this.writeChildrenHtml(c);this.isEmpty||c.closeTag(e)},writeChildrenHtml:c.writeChildrenHtml,replaceWithChildren:function(){for(var c=this.children,b=c.length;b;)c[--b].insertAfter(this);this.remove()},forEach:c.forEach,getFirst:function(c){if(!c)return this.children.length?this.children[0]:null;"function"!=typeof c&&
(c=e(c));for(var b=0,f=this.children.length;b<f;++b)if(c(this.children[b]))return this.children[b];return null},getHtml:function(){var c=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(c);return c.getHtml()},setHtml:function(c){c=this.children=CKEDITOR.htmlParser.fragment.fromHtml(c).children;for(var b=0,e=c.length;b<e;++b)c[b].parent=this},getOuterHtml:function(){var c=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(c);return c.getHtml()},split:function(c){for(var b=this.children.splice(c,
this.children.length-c),e=this.clone(),f=0;f<b.length;++f)b[f].parent=e;e.children=b;b[0]&&(b[0].previous=null);0<c&&(this.children[c-1].next=null);this.parent.add(e,this.getIndex()+1);return e},find:function(c,b){void 0===b&&(b=!1);var e=[],f;for(f=0;f<this.children.length;f++){var d=this.children[f];"function"==typeof c&&c(d)?e.push(d):"string"==typeof c&&d.name===c&&e.push(d);b&&d.find&&(e=e.concat(d.find(c,b)))}return e},addClass:function(c){if(!this.hasClass(c)){var b=this.attributes["class"]||
"";this.attributes["class"]=b+(b?" ":"")+c}},removeClass:function(c){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+c+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(c){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+c+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(c){var b=[];c||(c={nonEditable:!1,nestedEditable:!1});c.nonEditable||"false"!=this.attributes.contenteditable?c.nonEditable&&
!c.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",!0);if(b.length){c=CKEDITOR.tools.copy(c);for(var e=0;e<b.length;e+=2)c[b[e]]=b[e+1]}return c}},!0)}(),function(){var e=/{([^}]+)}/g;CKEDITOR.template=function(e){this.source=String(e)};CKEDITOR.template.prototype.output=function(f,c){var h=this.source.replace(e,function(b,c){return void 0!==f[c]?f[c]:b});return c?c.push(h):h}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=
new CKEDITOR.dom.document(document),CKEDITOR.add=function(e){function f(){CKEDITOR.currentInstance==e&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[e.name]=e;e.on("focus",function(){CKEDITOR.currentInstance!=e&&(CKEDITOR.currentInstance=e,CKEDITOR.fire("currentInstance"))});e.on("blur",f);e.on("destroy",f);CKEDITOR.fire("instance",null,e)},CKEDITOR.remove=function(e){delete CKEDITOR.instances[e.name]},function(){var e={};CKEDITOR.addTemplate=function(f,c){var h=
e[f];if(h)return h;h={name:f,source:c};CKEDITOR.fire("template",h);return e[f]=new CKEDITOR.template(h.source)};CKEDITOR.getTemplate=function(f){return e[f]}}(),function(){var e=[];CKEDITOR.addCss=function(f){e.push(f)};CKEDITOR.getCss=function(){return e.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(e,f){if(!CKEDITOR.env.isCompatible)return null;
e=CKEDITOR.dom.element.get(e);if(e.getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';var c=new CKEDITOR.editor(f,e,CKEDITOR.ELEMENT_MODE_INLINE),h=e.is("textarea")?e:null;h?(c.setData(h.getValue(),null,!0),e=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!c.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+h.getValue()+"\x3c/div\x3e",CKEDITOR.document),e.insertAfter(h),h.hide(),h.$.form&&c._attachToForm()):c.setData(e.getHtml(),
null,!0);c.on("loaded",function(){c.fire("uiReady");c.editable(e);c.container=e;c.ui.contentsElement=e;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(){h&&(c.container.clearCustomData(),c.container.remove(),h.show());c.element.clearCustomData();delete c.element});return c};CKEDITOR.inlineAll=function(){var e,f,c;for(c in CKEDITOR.dtd.$editable)for(var h=
CKEDITOR.document.getElementsByTag(c),b=0,l=h.count();b<l;b++)e=h.getItem(b),"true"==e.getAttribute("contenteditable")&&(f={element:e,config:{}},!1!==CKEDITOR.fire("inline",f)&&CKEDITOR.inline(e,f.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function e(e,b,l,k){if(!CKEDITOR.env.isCompatible)return null;e=CKEDITOR.dom.element.get(e);if(e.getEditor())throw'The editor instance "'+e.getEditor().name+'" is already attached to the provided element.';
var d=new CKEDITOR.editor(b,e,k);k==CKEDITOR.ELEMENT_MODE_REPLACE&&(e.setStyle("visibility","hidden"),d._.required=e.hasAttribute("required"),e.removeAttribute("required"));l&&d.setData(l,null,!0);d.on("loaded",function(){c(d);k==CKEDITOR.ELEMENT_MODE_REPLACE&&d.config.autoUpdateElement&&e.$.form&&d._attachToForm();d.setMode(d.config.startupMode,function(){d.resetDirty();d.status="ready";d.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,d)})});d.on("destroy",f);return d}function f(){var c=
this.container,b=this.element;c&&(c.clearCustomData(),c.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function c(c){var b=c.name,e=c.element,f=c.elementMode,d=c.fire("uiSpace",{space:"top",html:""}).html,g=c.fire("uiSpace",{space:"bottom",html:""}).html,m=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"'+(c.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(c.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
b=CKEDITOR.dom.element.createFromHtml(m.output({id:c.id,name:b,langDir:c.lang.dir,langCode:c.langCode,voiceLabel:c.title,topHtml:d?'\x3cspan id\x3d"'+c.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+d+"\x3c/span\x3e":"",contentId:c.ui.spaceId("contents"),bottomHtml:g?'\x3cspan id\x3d"'+c.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+g+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));f==CKEDITOR.ELEMENT_MODE_REPLACE?
(e.hide(),b.insertAfter(e)):e.append(b);c.container=b;c.ui.contentsElement=c.ui.space("contents");d&&c.ui.space("top").unselectable();g&&c.ui.space("bottom").unselectable();e=c.config.width;f=c.config.height;e&&b.setStyle("width",CKEDITOR.tools.cssLength(e));f&&c.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(f));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){c.focus()});c.fireOnce("uiReady")}CKEDITOR.replace=function(c,b){return e(c,b,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
CKEDITOR.appendTo=function(c,b,f){return e(c,b,f,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var c=document.getElementsByTagName("textarea"),b=0;b<c.length;b++){var e=null,f=c[b];if(f.name||f.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(f.className))continue}else if("function"==typeof arguments[0]&&(e={},!1===arguments[0](f,e)))continue;this.replace(f,e)}}};CKEDITOR.editor.prototype.addMode=function(c,b){(this._.modes||(this._.modes=
{}))[c]=b};CKEDITOR.editor.prototype.setMode=function(c,b){var e=this,f=this._.modes;if(c!=e.mode&&f&&f[c]){e.fire("beforeSetMode",c);if(e.mode){var d=e.checkDirty(),f=e._.previousModeData,g,m=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=g=e.getData(1);"source"==e.mode&&f==g&&(e.fire("lockSnapshot",{forceUpdate:!0}),m=1);e.ui.space("contents").setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[c](function(){e.mode=c;void 0!==d&&!d&&
e.resetDirty();m?e.fire("unlockSnapshot"):"wysiwyg"==c&&e.fire("saveSnapshot");setTimeout(function(){e.fire("mode");b&&b.call(e)},0)})}};CKEDITOR.editor.prototype.resize=function(c,b,e,f){var d=this.container,g=this.ui.space("contents"),m=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;f=f?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):d;f.setSize("width",c,!0);m&&(m.style.width="1%");var a=(f.$.offsetHeight||0)-(g.$.clientHeight||
0),d=Math.max(b-(e?0:a),0);b=e?b+a:b;g.setStyle("height",d+"px");m&&(m.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:d,outerWidth:c||f.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(c){return c?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function e(a){var b=a.editor,d=a.data.path,c=d.blockLimit,e=a.data.selection,
g=e.getRanges()[0],m;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(e=f(e,d))e.appendBogus(),m=CKEDITOR.env.ie;k(b,d.block,c)&&g.collapsed&&!g.getCommonAncestor().isReadOnly()&&(d=g.clone(),d.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),c=new CKEDITOR.dom.walker(d),c.guard=function(a){return!h(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!c.checkForward()||d.checkStartOfBlock()&&d.checkEndOfBlock())&&(b=g.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
(b=b.getFirst(h))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),m=1,a.cancel());m&&g.select()}function f(a,b){if(a.isFake)return 0;var d=b.block||b.blockLimit,c=d&&d.getLast(h);if(!(!d||!d.isBlockBoundary()||c&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||d.is("pre")||d.getBogus()))return d}function c(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function h(b){return a(b)&&
n(b)}function b(a,b){return function(d){var c=d.data.$.toElement||d.data.$.fromElement||d.data.$.relatedTarget;(c=c&&c.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(c):null)&&(b.equals(c)||b.contains(c))||a.call(this,d)}}function l(a){function b(a){return function(b,c){c&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(e)&&(d=b);if(!(c||!h(b)||a&&u(b)))return!1}}var d,c=a.getRanges()[0];a=a.root;var e={table:1,ul:1,ol:1,dl:1};if(c.startPath().contains(e)){var g=c.clone();g.collapse(1);g.setStartAt(a,
CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=b();a.checkBackward();if(d)return g=c.clone(),g.collapse(),g.setEndAt(d,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=b(!0),d=!1,a.checkForward(),d}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 d(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?
a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function m(a,b,d){var c=a.getCommonAncestor(b);for(b=a=d?b:a;(a=a.getParent())&&!c.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var a,n,x,u,t,p,r,v,q,B;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,d){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",d=b(d,this),c[0]=a,c[1]=d);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,
1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,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 c=this.editor;c.focus();c.fire("saveSnapshot");
d||(d=c.getSelection().getRanges()[0]);p(this,b||"html",a,d);d.select();g(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,d){p(this,d||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,b){var d=this.editor;d.focus();d.fire("saveSnapshot");var c=d.activeEnterMode,d=d.getSelection(),e=a.getName(),e=CKEDITOR.dtd.$block[e];b||(b=d.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),e&&((e=
a.getNext(function(a){return h(a)&&!u(a)}))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)?e.getDtd()["#"]?b.moveToElementEditStart(e):b.moveToElementEditEnd(a):e||c==CKEDITOR.ENTER_BR||(e=b.fixBlock(!0,c==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(e))));d.selectRanges([b]);g(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var d=this.editor,c=d.config.enterMode,e=a.getName(),g=CKEDITOR.dtd.$block[e];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})?r(b):b.startContainer.is(CKEDITOR.dtd.$list)&&v(b));var f,m;if(g)for(;(f=b.getCommonAncestor(0,1))&&(m=CKEDITOR.dtd[f.getName()])&&(!m||!m[e]);)f.getName()in CKEDITOR.dtd.span?b.splitElement(f):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(f),b.collapse(!0),f.remove()):b.splitBlock(c==CKEDITOR.ENTER_DIV?"div":"p",d.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.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},
fixInitialSelection:function(){function a(){var b=d.getDocument().$,c=b.getSelection(),e;a:if(c.anchorNode&&c.anchorNode==d.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=d.getDocument().getActive())&&e.equals(d)&&!c.anchorNode){e=!0;break a}e=void 0}e&&(e=new CKEDITOR.dom.range(d),e.moveToElementEditStart(d),b=b.createRange(),b.setStart(e.startContainer.$,e.startOffset),b.collapse(!0),c.removeAllRanges(),c.addRange(b))}function b(){var a=d.getDocument().$,c=a.selection,e=d.getDocument().getActive();"None"==
c.type&&e.equals(d)&&(c=new CKEDITOR.dom.range(d),a=a.body.createTextRange(),c.moveToElementEditStart(d),c=c.startContainer,c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent()),a.moveToElementText(c.$),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()};q.eol.detect(a,this);q.bogus.exclude(a);q.cell.shrink(a);a.fragment=a.range.cloneContents();q.tree.rebuild(a,this);q.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=B,c={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(c);c.bookmark=a.createBookmark();delete c.range;var g=this.editor.createRange();
g.moveToPosition(c.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);c.targetBookmark=g.createBookmark();d.list.detectMerge(c,this);d.table.detectRanges(c,this);d.block.detectMerge(c,this);c.tableContentsRanges?(d.table.deleteRanges(c),a.moveToBookmark(c.bookmark),c.range=a):(a.moveToBookmark(c.bookmark),c.range=a,a.extractContents(d.detectExtractMerge(c)));a.moveToBookmark(c.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(c,this);d.table.purge(c,this);d.block.merge(c,this);
if(b){d=a.startPath();if(c=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var c=d.block.getElementsByTag("span"),g=0,f;if(c)for(;f=c.getItem(g++);)if(!n(f)){c=!0;break a}c=!1}c=!c}c&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),x(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var b=this.editor;this.attachListener(b,"beforeGetData",function(){var a=
this.getData();this.is("textarea")||!1!==b.config.ignoreEmptyParagraph&&(a=a.replace(t,function(a,b){return b}));b.setData(a,null,1)},this);this.attachListener(b,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(b,"afterSetData",function(){this.setData(b.getData(1))},this);this.attachListener(b,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(b,"beforeFocus",function(){var a=b.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},
this);this.attachListener(b,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(b,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(b,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(b.readOnly);this.attachClass("cke_editable");b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):b.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||
this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+b.config.contentsLangDirection);b.keystrokeHandler.blockedKeystrokes[8]=+b.readOnly;b.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){b._.previousScrollTop=b.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var d=function(){var a=b.editable();
null!=b._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=b._.previousScrollTop,b._.previousScrollTop=null,this.removeListener("scroll",d))};this.on("scroll",d)}b.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,b.once("contentDom",function(){b.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",b.tabIndex);if(!this.is("textarea")){b.document=this.getDocument();b.window=this.getWindow();var e=b.document;this.changeAttr("spellcheck",
!b.config.disableNativeSpellChecker);var g=b.config.contentsLangDirection;this.getDirection(1)!=g&&this.changeAttr("dir",g);var f=CKEDITOR.getCss();if(f){var g=e.getHead(),k=g.getCustomData("stylesheet");k?f!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText=f:k.setText(f)):(f=e.appendStyleText(f),f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement),g.setCustomData("stylesheet",f),f.data("cke-temp",1))}g=e.getCustomData("stylesheet_ref")||0;e.setCustomData("stylesheet_ref",
g+1);this.setCustomData("cke_includeReadonly",!b.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(b,"key",function(d){if(b.readOnly)return!0;var c=d.data.domEvent.getKey(),e;d=b.getSelection();if(0!==d.getRanges().length){if(c in n){var g,f=d.getRanges()[0],m=f.startPath(),h,k,r,c=8==c;CKEDITOR.env.ie&&
11>CKEDITOR.env.version&&(g=d.getSelectedElement())||(g=l(d))?(b.fire("saveSnapshot"),f.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g.remove(),f.select(),b.fire("saveSnapshot"),e=1):f.collapsed&&((h=m.block)&&(r=h[c?"getPrevious":"getNext"](a))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("table")&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),f[c?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),f["moveToElementEdit"+(c?"End":"Start")](r),f.select(),b.fire("saveSnapshot"),
e=1):m.blockLimit&&m.blockLimit.is("td")&&(k=m.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(r=k[c?"getPrevious":"getNext"](a))?(b.fire("saveSnapshot"),f["moveToElementEdit"+(c?"End":"Start")](r),f.checkStartOfBlock()&&f.checkEndOfBlock()?r.remove():f.select(),b.fire("saveSnapshot"),e=1):(k=m.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(k,c?CKEDITOR.START:CKEDITOR.END)&&(e=1))}return!e}});b.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
this.attachListener(this,"keyup",function(a){a.data.getKeystroke()in n&&!this.getFirst(h)&&(this.appendBogus(),a=b.createRange(),a.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),a.select())});this.attachListener(this,"dblclick",function(a){if(b.readOnly)return!1;a={element:a.data.getTarget()};b.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",c);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var d=a.data.getTarget();d.is("img","hr",
"input","textarea","select")&&!d.isReadOnly()&&(b.getSelection().selectElement(d),d.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&b.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(t,""))){var d=b.createRange();d.moveToElementEditStart(a);
d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var d=a.data.domEvent.getKey();if(d in n&&(a=b.getSelection(),0!==a.getRanges().length)){var d=8==d,c=a.getRanges()[0];a=c.startPath();if(c.collapsed)a:{var e=
a.block;if(e&&c[d?"checkStartOfBlock":"checkEndOfBlock"]()&&c.moveToClosestEditablePosition(e,!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")){b.fire("saveSnapshot");g.remove();a=!0;break a}}c=c.startPath().block;if(!c||c&&c.contains(e))a=void 0;else{b.fire("saveSnapshot");var f;(f=(d?c:e).getBogus())&&f.remove();f=b.getSelection();g=f.createBookmarks();(d?e:c).moveChildren(d?
c:e,!1);a.lastElement.mergeSiblings();m(e,c,!d);f.selectBookmarks(g);a=!0}}else a=!1}else d=c,f=a.block,c=d.endPath().block,f&&c&&!f.equals(c)?(b.fire("saveSnapshot"),(e=f.getBogus())&&e.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),c.getParent()&&(c.moveChildren(f,!1),a.lastElement.mergeSiblings(),m(f,c,!0)),d=b.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),a=!0):a=!1;if(!a)return;b.getSelection().scrollIntoView();
b.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var 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())}}this.editor.fire("contentDomUnload");
delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?
"true":"1"),a.setAttribute("contentEditable",!1))});b.on("selectionChange",function(a){if(!b.readOnly){var d=b.getSelection();d&&!d.isLocked&&(d=b.checkDirty(),b.fire("lockSnapshot"),e(a),b.fire("unlockSnapshot"),!d&&b.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 c=
b.fire("ariaEditorHelpLabel",{}).label;if(c&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+c+"\x3c/span\x3e");d.append(c);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");a=CKEDITOR.dom.walker.whitespaces(!0);n=CKEDITOR.dom.walker.bookmark(!1,
!0);x=CKEDITOR.dom.walker.empty();u=CKEDITOR.dom.walker.bogus();t=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var e,g,f,m,h=[],k=c.range.startContainer;e=c.range.startPath();for(var k=n[k.getName()],l=0,r=d.getChildren(),x=r.count(),p=-1,q=-1,A=0,E=e.contains(n.$list);l<x;++l)e=r.getItem(l),a(e)?(f=e.getName(),E&&f in CKEDITOR.dtd.$list?
h=h.concat(b(e,c)):(m=!!k[f],"br"!=f||!e.data("cke-eol")||l&&l!=x-1||(A=(g=l?h[l-1].node:r.getItem(l+1))&&(!a(g)||!g.is("br")),g=g&&a(g)&&n.$block[g.getName()]),-1!=p||m||(p=l),m||(q=l),h.push({isElement:1,isLineBreak:A,isBlock:e.isBlockBoundary(),hasBlockSibling:g,node:e,name:f,allowed:m}),g=A=0)):h.push({isElement:0,node:e,allowed:1});-1<p&&(h[p].firstNotAllowed=1);-1<q&&(h[q].lastNotAllowed=1);return h}function c(b,d){var e=[],g=b.getChildren(),f=g.count(),m,h=0,k=n[d],l=!b.is(n.$inline)||b.is("br");
for(l&&e.push(" ");h<f;h++)m=g.getItem(h),a(m)&&!m.is(k)?e=e.concat(c(m,d)):e.push(m);l&&e.push(" ");return e}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function g(b){return b&&a(b)&&(b.is(n.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function f(b,d,c,e){var g=b.clone(),m,h;g.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);(m=(new CKEDITOR.dom.walker(g)).next())&&a(m)&&l[m.getName()]&&(h=m.getPrevious())&&a(h)&&!h.getParent().equals(b.startContainer)&&c.contains(h)&&
e.contains(m)&&m.isIdentical(h)&&(m.moveChildren(h),m.remove(),f(b,d,c,e))}function m(b,d){function c(b,d){if(d.isBlock&&d.isElement&&!d.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var e=d.endContainer.getChild(d.endOffset),g=d.endContainer.getChild(d.endOffset-1);e&&c(e,b[b.length-1]);g&&c(g,b[0])&&(d.setEnd(d.endContainer,d.endOffset-1),d.collapse())}var n=CKEDITOR.dtd,l={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},r={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,
h6:1},x=CKEDITOR.tools.extend({},n.$inline);delete x.br;return function(l,C,p,q){var v=l.editor,t=!1;"unfiltered_html"==C&&(C="html",t=!0);if(!q.checkReadOnly()){var u=(new CKEDITOR.dom.elementPath(q.startContainer,q.root)).blockLimit||q.root;l={type:C,dontFilter:t,editable:l,editor:v,range:q,blockLimit:u,mergeCandidates:[],zombies:[]};C=l.range;q=l.mergeCandidates;var F,B;"text"==l.type&&C.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(F=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
C.document),C.insertNode(F),C.setStartAfter(F));t=new CKEDITOR.dom.elementPath(C.startContainer);l.endPath=u=new CKEDITOR.dom.elementPath(C.endContainer);if(!C.collapsed){var v=u.block||u.blockLimit,Z=C.getCommonAncestor();v&&!v.equals(Z)&&!v.contains(Z)&&C.checkEndOfBlock()&&l.zombies.push(v);C.deleteContents()}for(;(B=e(C))&&a(B)&&B.isBlockBoundary()&&t.contains(B);)C.moveToPosition(B,CKEDITOR.POSITION_BEFORE_END);f(C,l.blockLimit,t,u);F&&(C.setEndBefore(F),C.collapse(),F.remove());F=C.startPath();
if(v=F.contains(g,!1,1))C.splitElement(v),l.inlineStylesRoot=v,l.inlineStylesPeak=F.lastElement;F=C.createBookmark();(v=F.startNode.getPrevious(h))&&a(v)&&g(v)&&q.push(v);(v=F.startNode.getNext(h))&&a(v)&&g(v)&&q.push(v);for(v=F.startNode;(v=v.getParent())&&g(v);)q.push(v);C.moveToBookmark(F);if(F=p){F=l.range;if("text"==l.type&&l.inlineStylesRoot){B=l.inlineStylesPeak;C=B.getDocument().createText("{cke-peak}");for(q=l.inlineStylesRoot.getParent();!B.equals(q);)C=C.appendTo(B.clone()),B=B.getParent();
p=C.getOuterHtml().split("{cke-peak}").join(p)}B=l.blockLimit.getName();if(/^\s+|\s+$/.test(p)&&"span"in CKEDITOR.dtd[B]){var M='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';p=M+p+M}p=l.editor.dataProcessor.toHtml(p,{context:null,fixForBody:!1,protectedWhitespaces:!!M,dontFilter:l.dontFilter,filter:l.editor.activeFilter,enterMode:l.editor.activeEnterMode});B=F.document.createElement("body");B.setHtml(p);M&&(B.getFirst().remove(),B.getLast().remove());if((M=F.startPath().block)&&(1!=
M.getChildCount()||!M.getBogus()))a:{var R;if(1==B.getChildCount()&&a(R=B.getFirst())&&R.is(r)&&!R.hasAttribute("contenteditable")){M=R.getElementsByTag("*");F=0;for(q=M.count();F<q;F++)if(C=M.getItem(F),!C.is(x))break a;R.moveChildren(R.getParent(1));R.remove()}}l.dataWrapper=B;F=p}if(F){R=l.range;F=R.document;var N;B=l.blockLimit;q=0;var W,M=[],U,Q;p=v=0;var X,ca;C=R.startContainer;var t=l.endPath.elements[0],da,u=t.getPosition(C),Z=!!t.getCommonAncestor(C)&&u!=CKEDITOR.POSITION_IDENTICAL&&!(u&
CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);C=b(l.dataWrapper,l);for(m(C,R);q<C.length;q++){u=C[q];if(N=u.isLineBreak){N=R;X=B;var ba=void 0,ea=void 0;u.hasBlockSibling?N=1:(ba=N.startContainer.getAscendant(n.$block,1))&&ba.is({div:1,p:1})?(ea=ba.getPosition(X),ea==CKEDITOR.POSITION_IDENTICAL||ea==CKEDITOR.POSITION_CONTAINS?N=0:(X=N.splitElement(ba),N.moveToPosition(X,CKEDITOR.POSITION_AFTER_START),N=1)):N=0}if(N)p=0<q;else{N=R.startPath();!u.isBlock&&k(l.editor,N.block,N.blockLimit)&&
(Q=d(l.editor))&&(Q=F.createElement(Q),Q.appendBogus(),R.insertNode(Q),CKEDITOR.env.needsBrFiller&&(W=Q.getBogus())&&W.remove(),R.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END));if((N=R.startPath().block)&&!N.equals(U)){if(W=N.getBogus())W.remove(),M.push(N);U=N}u.firstNotAllowed&&(v=1);if(v&&u.isElement){N=R.startContainer;for(X=null;N&&!n[N.getName()][u.name];){if(N.equals(B)){N=null;break}X=N;N=N.getParent()}if(N)X&&(ca=R.splitElement(X),l.zombies.push(ca),l.zombies.push(X));else{X=B.getName();
da=!q;N=q==C.length-1;X=c(u.node,X);for(var ba=[],ea=X.length,fa=0,ga=void 0,ha=0,ia=-1;fa<ea;fa++)ga=X[fa]," "==ga?(ha||da&&!fa||(ba.push(new CKEDITOR.dom.text(" ")),ia=ba.length),ha=1):(ba.push(ga),ha=0);N&&ia==ba.length&&ba.pop();da=ba}}if(da){for(;N=da.pop();)R.insertNode(N);da=0}else R.insertNode(u.node);u.lastNotAllowed&&q<C.length-1&&((ca=Z?t:ca)&&R.setEndAt(ca,CKEDITOR.POSITION_AFTER_START),v=0);R.collapse()}}1!=C.length?W=!1:(W=C[0],W=W.isElement&&"false"==W.node.getAttribute("contenteditable"));
W&&(p=!0,N=C[0].node,R.setStartAt(N,CKEDITOR.POSITION_BEFORE_START),R.setEndAt(N,CKEDITOR.POSITION_AFTER_END));l.dontMoveCaret=p;l.bogusNeededBlocks=M}W=l.range;var aa;ca=l.bogusNeededBlocks;for(da=W.createBookmark();U=l.zombies.pop();)U.getParent()&&(Q=W.clone(),Q.moveToElementEditStart(U),Q.removeEmptyBlocksAtEnd());if(ca)for(;U=ca.pop();)CKEDITOR.env.needsBrFiller?U.appendBogus():U.append(W.document.createText(" "));for(;U=l.mergeCandidates.pop();)U.mergeSiblings();W.moveToBookmark(da);if(!l.dontMoveCaret){for(U=
e(W);U&&a(U)&&!U.is(n.$empty);){if(U.isBlockBoundary())W.moveToPosition(U,CKEDITOR.POSITION_BEFORE_END);else{if(g(U)&&U.getHtml().match(/(\s|&nbsp;)$/g)){aa=null;break}aa=W.clone();aa.moveToPosition(U,CKEDITOR.POSITION_BEFORE_END)}U=U.getLast(h)}aa&&W.moveToRange(aa)}}}}();r=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,c){d=a.getDocument().createElement(d);a.append(d,c);return d}function d(a){var b=a.count(),c;for(b;0<b--;)c=a.getItem(b),CKEDITOR.tools.trim(c.getHtml())||(c.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&c.getChildCount()&&c.getFirst().remove())}return function(c){var e=c.startContainer,g=e.getAscendant("table",1),f=!1;d(g.getElementsByTag("td"));d(g.getElementsByTag("th"));g=c.clone();g.setStart(e,0);g=a(g).lastBackward();g||(g=c.clone(),g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),
g=a(g).lastForward(),f=!0);g||(g=e);g.is("table")?(c.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),g.remove()):(g.is({tbody:1,thead:1,tfoot:1})&&(g=b(g,"tr",f)),g.is("tr")&&(g=b(g,g.getParent().is("thead")?"th":"td",f)),(e=g.getBogus())&&e.remove(),c.moveToPosition(g,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();v=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,c=!1,e;e=b.clone();e.setStart(d,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),c=!0);e||(e=d);e.is(CKEDITOR.dtd.$list)?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),e.remove()):((d=e.getBogus())&&d.remove(),b.moveToPosition(e,c?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_BEFORE_END),b.select())}}();q={eol:{detect:function(a,b){var d=a.range,c=d.clone(),e=d.clone(),g=new CKEDITOR.dom.elementPath(d.startContainer,b),f=new CKEDITOR.dom.elementPath(d.endContainer,b);c.collapse(1);e.collapse();g.block&&c.checkBoundaryOfElement(g.block,CKEDITOR.END)&&(d.setStartAfter(g.block),a.prependEolBr=1);f.block&&e.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(d.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),c;a.appendEolBr&&(c=
this.createEolBr(d),a.fragment.append(c));!a.prependEolBr||c&&!c.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||!u(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(c,b),g=new CKEDITOR.dom.elementPath(d.startContainer,b),
d=new CKEDITOR.dom.elementPath(d.endContainer,b),f;c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());if(e.blockLimit.is({tr:1,table:1})){var m=e.contains("table").getParent();f=function(a){return!a.equals(m)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(g=g.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!g.equals(d))){var h=e.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(h)}}f||(f=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,
b,c,f)},rebuildFragment:function(a,b,d,c){for(var e;d&&!d.equals(b)&&c(d);)e=d.clone(0,1),a.fragment.appendTo(e),a.fragment=e,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer,c=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};B=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,e){a(c);a(e,1);for(var g;g=
e.getNext();)g.insertAfter(c),c=g;x(d)&&d.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode);d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),g=d.endPath(),f=e.contains(CKEDITOR.dtd.$list),m=g.contains(CKEDITOR.dtd.$list);a.mergeList=f&&m&&f.getParent().equals(m.getParent())&&!f.equals(m);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||
a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var c=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(c,d),f=new CKEDITOR.dom.elementPath(e,d);if(a.mergeList){var m=g.contains(CKEDITOR.dtd.$list),h=f.contains(CKEDITOR.dtd.$list);m.equals(h)||(h.moveChildren(m),h.remove())}a.mergeListItems&&(g=g.contains(CKEDITOR.dtd.$listItem),
f=f.contains(CKEDITOR.dtd.$listItem),g.equals(f)||b(f,c,e));c.remove();e.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 c=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(c,d),f=new CKEDITOR.dom.elementPath(e,
d),g=g.block,f=f.block;g&&f&&!g.equals(f)&&b(f,c,e);c.remove();e.remove()}}},table:function(){function a(c){var e=[],g,f=new CKEDITOR.dom.walker(c),m=c.startPath().contains(d),h=c.endPath().contains(d),k={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var n="visited_"+(f?"out":"in");if(a.getCustomData(n))return;CKEDITOR.dom.element.setMarker(k,a,n,1)}if(f&&m&&a.equals(m))g=c.clone(),g.setEndAt(m,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!f&&h&&a.equals(h))g=c.clone(),g.setStartAt(h,
CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(n=!f)n=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!m||b(a,m))&&(!h||b(a,h));if(!n&&(n=f))if(a.is(d))var n=m&&m.getAscendant("table",!0),l=h&&h.getAscendant("table",!0),r=a.getAscendant("table",!0),n=n&&n.contains(r)||l&&l.contains(r);else n=void 0;n&&(g=c.clone(),g.selectNodeContents(a),e.push(g))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(k);return e}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(d);
return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&c)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(1<e){var c=b.startPath().contains("table"),g=b.endPath().contains("table");c&&g&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(g,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),
b.setEndAfter(g),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(e,g){var f=c(g,e.bookmark),m=f.clone(),h,k,n=f.getCommonAncestor();n.is(CKEDITOR.dtd.$tableContent)&&!n.is(d)&&(n=n.getAscendant("table",!0));k=n;n=new CKEDITOR.dom.elementPath(f.startContainer,k);k=new CKEDITOR.dom.elementPath(f.endContainer,k);n=n.contains("table");k=k.contains("table");if(n||k)n&&k&&b(n,k)?(e.tableSurroundingRange=m,m.setStartAt(n,CKEDITOR.POSITION_AFTER_END),m.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),
m=f.clone(),m.setEndAt(n,CKEDITOR.POSITION_AFTER_END),h=f.clone(),h.setStartAt(k,CKEDITOR.POSITION_BEFORE_START),h=a(m).concat(a(h))):n?k||(e.tableSurroundingRange=m,m.setStartAt(n,CKEDITOR.POSITION_AFTER_END),f.setEndAt(n,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=m,m.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(k,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=h?h:a(f)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),x(b.startContainer)&&
b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,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 c=b.startPath(),e;k(a,c.block,c.blockLimit)&&(e=d(a))&&(e=b.document.createElement(e),e.appendBogus(),b.insertNode(e),b.moveToPosition(e,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function e(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function f(a,b){if(0===a.length||e(a[0].getEnclosedNode()))return!1;var d,c;if((d=!b&&
1===a.length)&&!(d=a[0].collapsed)){var g=a[0];d=g.startContainer.getAscendant({td:1,th:1},!0);var f=g.endContainer.getAscendant({td:1,th:1},!0);c=CKEDITOR.tools.trim;d&&d.equals(f)&&!d.findOne("td, th, tr, tbody, table")?(g=g.cloneContents(),d=g.getFirst()?c(g.getFirst().getText())!==c(d.getText()):!0):d=!1}if(d)return!1;for(c=0;c<a.length;c++)if(d=a[c]._getTableElement(),!d)return!1;return!0}function c(a){function b(a){a=a.find("td, th");var d=[],c;for(c=0;c<a.count();c++)d.push(a.getItem(c));return d}
var d=[],c,e;for(e=0;e<a.length;e++)c=a[e]._getTableElement(),c.is&&c.is({td:1,th:1})?d.push(c):d=d.concat(b(c));return d}function h(a){a=c(a);var b="",d=[],e,g;for(g=0;g<a.length;g++)e&&!e.equals(a[g].getAscendant("tr"))?(b+=d.join("\t")+"\n",e=a[g].getAscendant("tr"),d=[]):0===g&&(e=a[g].getAscendant("tr")),d.push(a[g].getText());return b+=d.join("\t")}function b(a){var b=this.root.editor,d=b.getSelection(1);this.reset();w=!0;d.root.once("selectionchange",function(a){a.cancel()},null,null,0);d.selectRanges([a[0]]);
d=this._.cache;d.ranges=new CKEDITOR.dom.rangeList(a);d.type=CKEDITOR.SELECTION_TEXT;d.selectedElement=a[0]._getTableElement();d.selectedText=h(a);d.nativeSel=null;this.isFake=1;this.rev=v++;b._.fakeSelection=this;w=!1;this.root.fire("selectionchange")}function l(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);var d;if(!(d=!b)&&(d=!b.isHidden())){d=a;var c=b.getRanges(),g=d.getRanges(),m=c.length&&c[0]._getTableElement()&&c[0]._getTableElement().getAscendant("table",!0),h=g.length&&g[0]._getTableElement()&&
g[0]._getTableElement().getAscendant("table",!0),k=1===c.length&&c[0]._getTableElement()&&c[0]._getTableElement().is("table"),n=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table");if(e(d.getSelectedElement()))d=!1;else{var l=1===c.length&&c[0].collapsed,g=f(c,!!CKEDITOR.env.webkit)&&f(g);m=m&&h?m.equals(h)||h.contains(m):!1;m&&(l||g)?(k&&!n&&d.selectRanges(c),d=!0):d=!1}d=!d}d&&(a.reset(),a=0)}if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||d||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:a,path:b}))}function k(){A=!0;y||(d.call(this),y=CKEDITOR.tools.setTimeout(d,200,this))}function d(){y=null;A&&(CKEDITOR.tools.setTimeout(l,0,this),A=
!1)}function g(a){return D(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function m(a){function b(d,c){return d&&d.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(c?"End":"Start")](d):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var d=a.startContainer,c=a.getPreviousNode(g,null,d),e=a.getNextNode(g,null,d);return b(c)||b(e,1)||!(c||e||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function a(a){n(a,!1);var b=a.getDocument().createText(q);
a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==b){var c=a.getDocument().getSelection().getNative(),e=c&&"None"!=c.type&&c.getRangeAt(0),g=q.length;if(d.getLength()>g&&e&&e.intersectsNode(d.$)){var f=[{node:c.anchorNode,offset:c.anchorOffset},{node:c.focusNode,offset:c.focusOffset}];c.anchorNode==d.$&&c.anchorOffset>g&&(f[0].offset-=g);c.focusNode==d.$&&c.focusOffset>g&&(f[1].offset-=g)}}d.setText(x(d.getText(),1));f&&(d=a.getDocument().$,
c=d.getSelection(),d=d.createRange(),d.setStart(f[0].node,f[0].offset),d.collapse(!0),c.removeAllRanges(),c.addRange(d),c.extend(f[1].node,f[1].offset))}}function x(a,b){return b?a.replace(B,function(a,b){return b?" ":""}):a.replace(q,"")}function u(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 c=a.getSelection(1),e=a.createRange(),g=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(d,CKEDITOR.POSITION_AFTER_START);e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([e]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function t(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var e=a.getSelection().getRanges(),
g=e[0];1==e.length&&g.collapsed&&(c=g[38>c?"getPreviousEditableNode":"getNextEditableNode"]())&&c.type==CKEDITOR.NODE_ELEMENT&&"false"==c.getAttribute("contenteditable")&&(a.getSelection().fake(c),d.data.preventDefault(),d.cancel())}}}function p(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 c=d.startContainer,e;c&&!((e=c.type==CKEDITOR.NODE_ELEMENT)&&c.is("body")||!c.isReadOnly());)e&&"false"==
c.getAttribute("contentEditable")&&d.setStartAfter(c),c=c.getParent();c=d.startContainer;e=d.endContainer;var g=d.startOffset,f=d.endOffset,m=d.clone();c&&c.type==CKEDITOR.NODE_TEXT&&(g>=c.getLength()?m.setStartAfter(c):m.setStartBefore(c));e&&e.type==CKEDITOR.NODE_TEXT&&(f?m.setEndAfter(e):m.setEndBefore(e));c=new CKEDITOR.dom.walker(m);c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var e=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);c.getPosition(m.endContainer)&
CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(c),e.collapsed||a.splice(b+1,0,e));return!0}return!1};c.next()}}return a}var r="function"!=typeof window.getSelection,v=1,q=CKEDITOR.tools.repeat("​",7),B=new RegExp(q+"( )?","g"),w,y,A,D=CKEDITOR.dom.walker.invisible(1),z=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,c=d.createRange(),
e;if(!d.readOnly)return(e=c.moveToClosestEditablePosition(b.selected,a))||(e=c.moveToClosestEditablePosition(b.selected,!a)),e&&d.getSelection().selectRanges([c]),d.fire("saveSnapshot"),b.selected.remove(),e||(c.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([c])),d.fire("saveSnapshot"),!1}}var d=a(),c=a(1);return{37:d,38:d,39:c,40:c,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(){q=new CKEDITOR.dom.selection(d.getSelection());q.lock()}function b(){g.removeListener("mouseup",b);h.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==e.$&&d.select()}function c(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?
a:null:null}var e=d.document,g=CKEDITOR.document,f=d.editable(),m=e.getBody(),h=e.getDocumentElement(),x=f.isInline(),p,q;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();0!==p&&(a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==f.$&&(a=d.createRange(),a.moveToElementEditStart(f),a.select())},null,null,-2);f.attachListener(f,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){p=d._.previousActive&&
d._.previousActive.equals(e.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=f.$.scrollTop;CKEDITOR.env.webkit&&p&&a&&(f.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(p);p=0},null,null,-1);f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie||x)r?f.attachListener(f,"beforedeactivate",a,null,null,-1):f.attachListener(d,"selectionCheck",a,null,null,-1),f.attachListener(f,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){d.lockSelection(q);
p=1},null,null,-1),f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!x){var v;f.attachListener(f,"mousedown",function(a){2==a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(v=d.window.getScrollPosition()))});f.attachListener(f,"mouseup",function(a){2==a.data.$.button&&v&&(d.document.$.documentElement.scrollLeft=v.x,d.document.$.documentElement.scrollTop=v.y);v=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var w,
u;h.on("mousedown",function(a){function b(a){a=a.data.$;if(w){var d=m.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(c){}w.setEndPoint(0>u.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);w.select()}}function d(){h.removeListener("mousemove",b);g.removeListener("mouseup",d);h.removeListener("mouseup",d);w.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<h.$.clientHeight&&a.$.x<h.$.clientWidth){w=m.$.createTextRange();try{w.moveToPoint(a.$.clientX,a.$.clientY)}catch(c){}u=
w.duplicate();h.on("mousemove",b);g.on("mouseup",d);h.on("mouseup",d)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)h.on("mousedown",function(a){a.data.getTarget().is("html")&&(g.on("mouseup",b),h.on("mouseup",b))})}}f.attachListener(f,"selectionchange",l,d);f.attachListener(f,"keyup",k,d);f.attachListener(f,"touchstart",k,d);f.attachListener(f,"touchend",k,d);CKEDITOR.env.ie&&f.attachListener(f,"keydown",function(a){var b=this.getSelection(1),d=c(b);d&&!d.equals(f)&&(b.selectElement(d),a.data.preventDefault())},
d);f.attachListener(f,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(x&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var A;f.attachListener(f,"mousedown",function(){A=1});f.attachListener(e.getDocumentElement(),"mouseup",function(){A&&k.call(d);A=0})}else f.attachListener(CKEDITOR.env.ie?f:e.getDocumentElement(),"mouseup",k,d);CKEDITOR.env.webkit&&f.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:f.hasFocus&&
n(f)}},null,null,-1);f.attachListener(f,"keydown",t(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 c=z[a.data.keyCode];if(c)return c({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=x(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=x(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?l: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:v++;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 c,e;if(a)if(a.getRangeAt)c=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(g){}c=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!c||
c.type!=CKEDITOR.NODE_ELEMENT&&c.type!=CKEDITOR.NODE_TEXT||!this.root.equals(c)&&!this.root.contains(c))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 J={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:x,
_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:q});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=r?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:r?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),c=d.type;"Text"==c&&(b=CKEDITOR.SELECTION_TEXT);"Control"==c&&(b=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&
(b=CKEDITOR.SELECTION_TEXT)}catch(e){}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),c=d.startContainer;c==d.endContainer&&1==c.nodeType&&1==d.endOffset-d.startOffset&&J[c.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=r?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}
var b=function(b,d){b=b.duplicate();b.collapse(d);var c=b.parentElement();if(!c.hasChildNodes())return{container:c,offset:0};for(var e=c.children,g,f,m=b.duplicate(),h=0,k=e.length-1,n=-1,l,r;h<=k;)if(n=Math.floor((h+k)/2),g=e[n],m.moveToElementText(g),l=m.compareEndPoints("StartToStart",b),0<l)k=n-1;else if(0>l)h=n+1;else return{container:c,offset:a(g)};if(-1==n||n==e.length-1&&0>l){m.moveToElementText(c);m.setEndPoint("StartToStart",b);m=m.text.replace(/(\r\n|\r)/g,"\n").length;e=c.childNodes;if(!m)return g=
e[e.length-1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:e.length}:{container:g,offset:g.nodeValue.length};for(c=e.length;0<m&&0<c;)f=e[--c],f.nodeType==CKEDITOR.NODE_TEXT&&(r=f,m-=f.nodeValue.length);return{container:r,offset:-m}}m.collapse(0<l?!0:!1);m.setEndPoint(0<l?"StartToStart":"EndToStart",b);m=m.text.replace(/(\r\n|\r)/g,"\n").length;if(!m)return{container:c,offset:a(g)+(0<l?0:1)};for(;0<m;)try{f=g[0<l?"previousSibling":"nextSibling"],f.nodeType==CKEDITOR.NODE_TEXT&&(m-=f.nodeValue.length,
r=f),g=f}catch(x){return{container:c,offset:a(g)}}return{container:r,offset:0<l?-m:r.nodeValue.length+m}};return function(){var a=this.getNative(),d=a&&a.createRange(),c=this.getType();if(!a)return[];if(c==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),c=b(d,!0),a.setStart(new CKEDITOR.dom.node(c.container),c.offset),c=b(d),a.setEnd(new CKEDITOR.dom.node(c.container),c.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
a.collapse(),[a];if(c==CKEDITOR.SELECTION_ELEMENT){for(var c=[],e=0;e<d.length;e++){for(var g=d.item(e),f=g.parentNode,m=0,a=new CKEDITOR.dom.range(this.root);m<f.childNodes.length&&f.childNodes[m]!=g;m++);a.setStart(new CKEDITOR.dom.node(f),m);a.setEnd(new CKEDITOR.dom.node(f),m+1);c.push(a)}return c}return[]}}():function(){var a=[],b,d=this.getNative();if(!d)return a;for(var c=0;c<d.rangeCount;c++){var e=d.getRangeAt(c);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(e.startContainer),
e.startOffset);b.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(b)}return a};return function(b){var d=this._.cache,c=d.ranges;c||(d.ranges=c=new CKEDITOR.dom.rangeList(a.call(this)));return b?p(new CKEDITOR.dom.rangeList(c.slice())):c}}(),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,c,e=2;e&&!((d=a.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&J[d.getName()]&&(c=d));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return c&&c.$});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=r?"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 d=this.getSelectedElement(),c=this.getRanges(),e=this.isFake;this.isLocked=0;this.reset();a&&(a=d||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",
1)&&(f(c)?b.call(this,c):e?this.fake(d):d?this.selectElement(d):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var b=a._.hiddenSelectionContainer;if(b){var 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=v++},selectElement:function(a){var b=
new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(d){var c=this.root.editor,e=c&&c._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,g,h=0;h<d.length;++h)g=d[h],g.endContainer.equals(e)&&(g.endOffset=Math.min(g.endOffset,e.getChildCount()));if(d.length)if(this.isLocked){var k=CKEDITOR.document.getActive();this.unlock();this.selectRanges(d);this.lock();k&&!k.equals(this.root)&&k.focus()}else{var l;a:{var x,p;if(1==d.length&&
!(p=d[0]).collapsed&&(l=p.getEnclosedNode())&&l.type==CKEDITOR.NODE_ELEMENT&&(p=p.clone(),p.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(x=p.getEnclosedNode())&&x.type==CKEDITOR.NODE_ELEMENT&&(l=x),"false"==l.getAttribute("contenteditable")))break a;l=void 0}if(l)this.fake(l);else if(c&&c.plugins.tableselection&&CKEDITOR.plugins.tableselection.isSupportedEnvironment&&f(d)&&!w)b.call(this,d);else{if(r){x=CKEDITOR.dom.walker.whitespaces(!0);l=/\ufeff|\u00a0/;p={table:1,tbody:1,tr:1};1<d.length&&(c=d[d.length-
1],d[0].setEnd(c.endContainer,c.endOffset));c=d[0];d=c.collapsed;var q,v,u;if((e=c.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in J&&(!e.is("a")||!e.getText()))try{u=e.$.createControlRange();u.addElement(e.$);u.select();return}catch(t){}if(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in p||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in p)c.shrink(CKEDITOR.NODE_ELEMENT,!0),d=c.collapsed;u=c.createBookmark();p=u.startNode;d||(k=u.endNode);
u=c.document.$.body.createTextRange();u.moveToElementText(p.$);u.moveStart("character",1);k?(l=c.document.$.body.createTextRange(),l.moveToElementText(k.$),u.setEndPoint("EndToEnd",l),u.moveEnd("character",-1)):(q=p.getNext(x),v=p.hasAscendant("pre"),q=!(q&&q.getText&&q.getText().match(l))&&(v||!p.hasPrevious()||p.getPrevious().is&&p.getPrevious().is("br")),v=c.document.createElement("span"),v.setHtml("\x26#65279;"),v.insertBefore(p),q&&c.document.createText("﻿").insertBefore(p));c.setStartBefore(p);
p.remove();d?(q?(u.moveStart("character",-1),u.select(),c.document.$.selection.clear()):u.select(),c.moveToPosition(v,CKEDITOR.POSITION_BEFORE_START),v.remove()):(c.setEndBefore(k),k.remove(),u.select())}else{k=this.getNative();if(!k)return;this.removeAllRanges();for(u=0;u<d.length;u++){if(u<d.length-1&&(q=d[u],v=d[u+1],l=q.clone(),l.setStart(q.endContainer,q.endOffset),l.setEnd(v.startContainer,v.startOffset),!l.collapsed&&(l.shrink(CKEDITOR.NODE_ELEMENT,!0),c=l.getCommonAncestor(),l=l.getEnclosedNode(),
c.isReadOnly()||l&&l.isReadOnly()))){v.setStart(q.startContainer,q.startOffset);d.splice(u--,1);continue}c=d[u];v=this.document.$.createRange();c.collapsed&&CKEDITOR.env.webkit&&m(c)&&(l=a(this.root),c.insertNode(l),(q=l.getNext())&&!l.getPrevious()&&q.type==CKEDITOR.NODE_ELEMENT&&"br"==q.getName()?(n(this.root),c.moveToPosition(q,CKEDITOR.POSITION_BEFORE_START)):c.moveToPosition(l,CKEDITOR.POSITION_AFTER_END));v.setStart(c.startContainer.$,c.startOffset);try{v.setEnd(c.endContainer.$,c.endOffset)}catch(A){if(0<=
A.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))c.collapse(1),v.setEnd(c.endContainer.$,c.endOffset);else throw A;}k.addRange(v)}}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();u(d,b);var c=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(e);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;
c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=v++;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 f(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,c=0;c<a.length;c++){var e=new CKEDITOR.dom.range(this.root);e.moveToBookmark(a[c]);b.push(e)}a.isFake&&(d=f(b)?b[0]._getTableElement():b[0].getEnclosedNode(),d&&d.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!f(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[r?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function e(a,b){for(var d,c;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))d=a;else if(!c){var e=a.getAttribute("contentEditable");
"false"==e?d=a:"true"==e&&(c=1)}return d}function f(a,b,d,c){return(a.getPosition(b)|c)==c&&(!d.childRule||d.childRule(a))}function c(a){var d=a.document;if(a.collapsed)d=v(this,d),a.insertNode(d),a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var g=this.element,m=this._.definition,h,k=m.ignoreReadonly,n=k||m.includeReadonly;null==n&&(n=a.root.getCustomData("cke_includeReadonly"));var l=CKEDITOR.dtd[g];l||(h=!0,l=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var r=a.createBookmark(),
x=r.startNode,p=r.endNode,q=x,u;if(!k){var w=a.getCommonAncestor(),k=e(x,w),w=e(p,w);k&&(q=k.getNextSourceNode(!0));w&&(p=w)}for(q.getPosition(p)==CKEDITOR.POSITION_FOLLOWING&&(q=0);q;){k=!1;if(q.equals(p))q=null,k=!0;else{var Q=q.type==CKEDITOR.NODE_ELEMENT?q.getName():null,w=Q&&"false"==q.getAttribute("contentEditable"),A=Q&&q.getAttribute("data-nostyle");if(Q&&q.data("cke-bookmark")||q.type===CKEDITOR.NODE_COMMENT){q=q.getNextSourceNode(!0);continue}if(w&&n&&CKEDITOR.dtd.$block[Q])for(var B=q,
y=b(B),z=void 0,D=y.length,fa=0,B=D&&new CKEDITOR.dom.range(B.getDocument());fa<D;++fa){var z=y[fa],J=CKEDITOR.filter.instances[z.data("cke-filter")];if(J?J.check(this):1)B.selectNodeContents(z),c.call(this,B)}y=Q?!l[Q]||A?0:w&&!n?0:f(q,p,m,L):1;if(y)if(z=q.getParent(),y=m,D=g,fa=h,!z||!(z.getDtd()||CKEDITOR.dtd.span)[D]&&!fa||y.parentRule&&!y.parentRule(z))k=!0;else{if(u||Q&&CKEDITOR.dtd.$removeEmpty[Q]&&(q.getPosition(p)|L)!=L||(u=a.clone(),u.setStartBefore(q)),Q=q.type,Q==CKEDITOR.NODE_TEXT||w||
Q==CKEDITOR.NODE_ELEMENT&&!q.getChildCount()){for(var Q=q,H;(k=!Q.getNext(F))&&(H=Q.getParent(),l[H.getName()])&&f(H,x,m,I);)Q=H;u.setEndAfter(Q)}}else k=!0;q=q.getNextSourceNode(A||w)}if(k&&u&&!u.collapsed){for(var k=v(this,d),w=k.hasAttributes(),A=u.getCommonAncestor(),Q={},y={},z={},D={},E,aa,G;k&&A;){if(A.getName()==g){for(E in m.attributes)!D[E]&&(G=A.getAttribute(aa))&&(k.getAttribute(E)==G?y[E]=1:D[E]=1);for(aa in m.styles)!z[aa]&&(G=A.getStyle(aa))&&(k.getStyle(aa)==G?Q[aa]=1:z[aa]=1)}A=A.getParent()}for(E in y)k.removeAttribute(E);
for(aa in Q)k.removeStyle(aa);w&&!k.hasAttributes()&&(k=null);k?(u.extractContents().appendTo(k),u.insertNode(k),t.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(k),u.insertNode(k),t.call(this,k),k.remove(!0));u=null}}a.moveToBookmark(r);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function h(a){function b(){for(var a=new CKEDITOR.dom.elementPath(c.getParent()),d=new CKEDITOR.dom.elementPath(n.getParent()),
e=null,g=null,f=0;f<a.elements.length;f++){var m=a.elements[f];if(m==a.block||m==a.blockLimit)break;l.checkElementRemovable(m,!0)&&(e=m)}for(f=0;f<d.elements.length;f++){m=d.elements[f];if(m==d.block||m==d.blockLimit)break;l.checkElementRemovable(m,!0)&&(g=m)}g&&n.breakParent(g);e&&c.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var d=a.createBookmark(),c=d.startNode,e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var g=new CKEDITOR.dom.elementPath(c.getParent(),a.root),f,m=0,h;m<
g.elements.length&&(h=g.elements[m])&&h!=g.block&&h!=g.blockLimit;m++)if(this.checkElementRemovable(h)){var k;!e&&a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(k=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(f=h,f.match=k?"start":"end"):(h.mergeSiblings(),h.is(this.element)?u.call(this,h):p(h,w(this)[h.getName()]))}if(f){e=c;for(m=0;;m++){h=g.elements[m];if(h.equals(f))break;else if(h.match)continue;else h=h.clone();h.append(e);e=h}e["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var n=
d.endNode,l=this;b();for(g=c;!g.equals(n);)f=g.getNextSourceNode(),g.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(g)&&(g.getName()==this.element?u.call(this,g):p(g,w(this)[g.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(c)&&(b(),f=c.getNext())),g=f}a.moveToBookmark(d);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function b(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function l(a){var b=a.getEnclosedNode()||
a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&q(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 c in d)a.removeAttribute(c,d[c]);if(b.styles)for(var e in b.styles)b.styles.hasOwnProperty(e)&&a.removeStyle(e)}}function d(a){var b=a.createBookmark(!0),d=a.createIterator();d.enforceRealBlocks=!0;this._.enterMode&&
(d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var c,e=a.document,g;c=d.getNextParagraph();)!c.isReadOnly()&&(d.activeFilter?d.activeFilter.check(this):1)&&(g=v(this,e,c),m(c,g));a.moveToBookmark(b)}function g(a){var b=a.createBookmark(1),d=a.createIterator();d.enforceRealBlocks=!0;d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var c,e;c=d.getNextParagraph();)this.checkElementRemovable(c)&&(c.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==
CKEDITOR.ENTER_P?"p":"div"))&&c.copyAttributes(e),m(c,e)):u.call(this,c));a.moveToBookmark(b)}function m(b,d){var c=!d;c&&(d=b.getDocument().createElement("div"),b.copyAttributes(d));var e=d&&d.is("pre"),g=b.is("pre"),f=!e&&g;if(e&&!g){g=d;(f=b.getBogus())&&f.remove();f=b.getHtml();f=n(f,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");f=f.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+|&nbsp;)/g," ");f=f.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var m=b.getDocument().createElement("div");
m.append(g);g.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";g.copyAttributes(m.getFirst());g=m.getFirst().remove()}else g.setHtml(f);d=g}else f?d=x(c?[b.getHtml()]:a(b),d):b.moveChildren(d);d.replace(b);if(e){var c=d,h;(h=c.getPrevious(G))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(e=n(h.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+e+"\x3c/pre\x3e":c.setHtml(e),h.remove())}else c&&r(d)}function a(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 c="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(c=b);d&&(e=d);return""});return c+a.replace(b,d)+e}function x(a,b){var d;1<a.length&&(d=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var c=0;c<a.length;c++){var e=a[c],e=e.replace(/(\r\n|\r)/g,"\n"),e=n(e,/^[ \t]*\n/,
""),e=n(e,/\n$/,""),e=n(e,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(d){var g=b.clone();g.setHtml(e);d.append(g)}else b.setHtml(e)}return d||b}function u(a,b){var d=this._.definition,c=d.attributes,d=d.styles,e=w(this)[a.getName()],g=CKEDITOR.tools.isEmpty(c)&&
CKEDITOR.tools.isEmpty(d),f;for(f in c)if("class"!=f&&!this._.definition.fullMatch||a.getAttribute(f)==y(f,c[f]))b&&"data-"==f.slice(0,5)||(g=a.hasAttribute(f),a.removeAttribute(f));for(var m in d)this._.definition.fullMatch&&a.getStyle(m)!=y(m,d[m],!0)||(g=g||!!a.getStyle(m),a.removeStyle(m));p(a,e,z[a.getName()]);g&&(this._.definition.alwaysRemoveElement?r(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?r(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))}function t(a){for(var b=w(this),d=a.getElementsByTag(this.element),c,e=d.count();0<=--e;)c=d.getItem(e),c.isReadOnly()||u.call(this,c,!0);for(var g in b)if(g!=this.element)for(d=a.getElementsByTag(g),e=d.count()-1;0<=e;e--)c=d.getItem(e),c.isReadOnly()||p(c,b[g])}function p(a,b,d){if(b=b&&b.attributes)for(var c=0;c<b.length;c++){var e=b[c][0],g;if(g=a.getAttribute(e)){var f=b[c][1];(null===f||f.test&&f.test(g)||"string"==typeof f&&g==f)&&a.removeAttribute(e)}}d||r(a)}function r(a,b){if(!a.hasAttributes()||
b)if(CKEDITOR.dtd.$block[a.getName()]){var d=a.getPrevious(G),c=a.getNext(G);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br",1);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else d=a.getFirst(),c=a.getLast(),a.remove(!0),d&&(d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings(),c&&!d.equals(c)&&c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings())}function v(a,b,d){var c;c=a.element;"*"==c&&(c="span");c=new CKEDITOR.dom.element(c,b);d&&d.copyAttributes(c);
c=q(c,a);b.getCustomData("doc_processing_style")&&c.hasAttribute("id")?c.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return c}function q(a,b){var d=b._.definition,c=d.attributes,d=CKEDITOR.style.getStyleText(d);if(c)for(var e in c)a.setAttribute(e,c[e]);d&&a.setAttribute("style",d);a.getDocument().removeCustomData("doc_processing_style");return a}function B(a,b){for(var d in a)a[d]=a[d].replace(H,function(a,d){return b[d]})}function w(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 c=0;c<d.length;c++){var e=d[c],g,f;"string"==typeof e?g=e.toLowerCase():(g=e.element?e.element.toLowerCase():a.element,f=e.attributes);e=b[g]||(b[g]={});if(f){var e=e.attributes=e.attributes||[],m;for(m in f)e.push([m.toLowerCase(),f[m]])}}}return b}function y(a,b,d){var c=new CKEDITOR.dom.element("span");c[d?"setStyle":"setAttribute"](a,b);return c[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 c in a)if(!(c in b)||d(b[c],c)!=d(a[c],c)&&"inherit"!=a[c]&&"inherit"!=b[c])return!1;return!0}function D(a,b,d){var c=a.getRanges();b=b?this.removeFromRange:this.applyToRange;var e,g;if(a.isFake&&a.isInTable())for(e=[],g=0;g<c.length;g++)e.push(c[g].clone());for(var f=c.createIterator();g=f.getNextRange();)b.call(this,
g,d);a.selectRanges(e||c)}var z={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},J={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},E=/\s*(?:;\s*|$)/,H=/#\((.+?)\)/g,F=CKEDITOR.dom.walker.bookmark(0,1),G=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),B(a.attributes,b),B(a.styles,b));d=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(z[d]?CKEDITOR.STYLE_BLOCK:J[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 D.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);D.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return D.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;
b||(this._.enterMode=a.activeEnterMode);D.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?d:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?h:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?k:null;return this.removeFromRange(a)},applyToObject:function(a){q(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,c=0,e;c<d.length;c++)if(e=d[c],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var g=e.getName();if(!("string"==typeof this.element?g==this.element:g in this.element))continue}if(this.checkElementRemovable(e,!0,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 c=a.getName();if("string"==typeof this.element?c==this.element:c in this.element){if(!b&&!a.hasAttributes())return!0;if(c=d._AC)d=c;else{var c={},e=0,g=d.attributes;
if(g)for(var f in g)e++,c[f]=g[f];if(f=CKEDITOR.style.getStyleText(d))c.style||e++,c.style=f;c._length=e;d=d._AC=c}if(d._length){for(var m in d)if("_length"!=m)if(c=a.getAttribute(m)||"","style"==m?A(d[m],c):d[m]==c){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=w(this)[a.getName()]){var c;if(!(b=b.attributes))return!0;for(d=0;d<b.length;d++)if(c=b[d][0],c=a.getAttribute(c)){var e=b[d][1];
if(null===e)return!0;if("string"==typeof e){if(c==e)return!0}else if(e.test(c))return!0}}return!1},buildPreview:function(a){var b=this._.definition,d=[],c=b.element;"bdo"==c&&(c="span");var d=["\x3c",c],e=b.attributes;if(e)for(var g in e)d.push(" ",g,'\x3d"',e[g],'"');(e=CKEDITOR.style.getStyleText(b))&&d.push(' style\x3d"',e,'"');d.push("\x3e",a||b.name,"\x3c/",c,"\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||"",c="";d.length&&(d=d.replace(E,";"));for(var e in b){var g=b[e],f=(e+":"+g).replace(E,";");"inherit"==g?c+=f:d+=f}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,!0));return a._ST=d+c};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 L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(e,f){this.requiredContent=this.allowedContent=this.style=e;CKEDITOR.tools.extend(this,f,!0)},CKEDITOR.styleCommand.prototype.exec=function(e){e.focus();this.state==CKEDITOR.TRISTATE_OFF?e.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&
e.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),CKEDITOR.loadStylesSet=function(e,f,c){CKEDITOR.stylesSet.addExternal(e,f,"");CKEDITOR.stylesSet.load(e,c)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(e,f){var c=this._.styleStateChangeCallbacks;c||(c=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(e){for(var b=0;b<
c.length;b++){var f=c[b],k=f.style.checkActive(e.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;f.fn.call(this,k)}}));c.push({style:e,fn:f})},applyStyle:function(e){e.apply(this)},removeStyle:function(e){e.remove(this)},getStylesSet:function(e){if(this._.stylesDefinitions)e(this._.stylesDefinitions);else{var f=this,c=f.config.stylesCombo_stylesSet||f.config.stylesSet;if(!1===c)e(null);else if(c instanceof Array)f._.stylesDefinitions=c,e(c);else{c||(c="default");var c=c.split(":"),h=c[0];
CKEDITOR.stylesSet.addExternal(h,c[1]?c.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(h,function(b){f._.stylesDefinitions=b[h];e(f._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(e,f){"string"==typeof e&&(e=(f?f.$:document).createComment(e));CKEDITOR.dom.domObject.call(this,e)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+
"--\x3e"}}),"use strict",function(){var e={},f={},c;for(c in CKEDITOR.dtd.$blockLimit)c in CKEDITOR.dtd.$list||(e[c]=1);for(c in CKEDITOR.dtd.$block)c in CKEDITOR.dtd.$blockLimit||c in CKEDITOR.dtd.$empty||(f[c]=1);CKEDITOR.dom.elementPath=function(c,b){var l=null,k=null,d=[],g=c,m;b=b||c.getDocument().getBody();g||(g=b);do if(g.type==CKEDITOR.NODE_ELEMENT){d.push(g);if(!this.lastElement&&(this.lastElement=g,g.is(CKEDITOR.dtd.$object)||"false"==g.getAttribute("contenteditable")))continue;if(g.equals(b))break;
if(!k&&(m=g.getName(),"true"==g.getAttribute("contenteditable")?k=g:!l&&f[m]&&(l=g),e[m])){if(m=!l&&"div"==m){a:{m=g.getChildren();for(var a=0,n=m.count();a<n;a++){var x=m.getItem(a);if(x.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[x.getName()]){m=!0;break a}}m=!1}m=!m}m?l=g:k=g}}while(g=g.getParent());k||(k=b);this.block=l;this.blockLimit=k;this.root=b;this.elements=d}}(),CKEDITOR.dom.elementPath.prototype={compare:function(e){var f=this.elements;e=e&&e.elements;if(!e||f.length!=e.length)return!1;
for(var c=0;c<f.length;c++)if(!f[c].equals(e[c]))return!1;return!0},contains:function(e,f,c){var h=0,b;"string"==typeof e&&(b=function(b){return b.getName()==e});e instanceof CKEDITOR.dom.element?b=function(b){return b.equals(e)}:CKEDITOR.tools.isArray(e)?b=function(b){return-1<CKEDITOR.tools.indexOf(e,b.getName())}:"function"==typeof e?b=e:"object"==typeof e&&(b=function(b){return b.getName()in e});var l=this.elements,k=l.length;f&&(c?h+=1:--k);c&&(l=Array.prototype.slice.call(l,0),l.reverse());
for(;h<k;h++)if(b(l[h]))return l[h];return null},isContextFor:function(e){var f;return e in CKEDITOR.dtd.$block?(f=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!f.getDtd()[e]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(e,f){"string"==typeof e&&(e=(f?f.$:document).createTextNode(e));this.$=e},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,
{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(e){this.$.nodeValue=e},split:function(e){var f=this.$.parentNode,c=f.childNodes.length,h=this.getLength(),b=this.getDocument(),l=new CKEDITOR.dom.text(this.$.splitText(e),b);f.childNodes.length==c&&(e>=h?(l=b.createText(""),l.insertAfter(this)):(e=b.createText(""),e.insertAfter(l),e.remove()));return l},substring:function(e,f){return"number"!=typeof f?this.$.nodeValue.substr(e):
this.$.nodeValue.substring(e,f)}}),function(){function e(c,e,b){var f=c.serializable,k=e[b?"endContainer":"startContainer"],d=b?"endOffset":"startOffset",g=f?e.document.getById(c.startNode):c.startNode;c=f?e.document.getById(c.endNode):c.endNode;k.equals(g.getPrevious())?(e.startOffset=e.startOffset-k.getLength()-c.getPrevious().getLength(),k=c.getNext()):k.equals(c.getPrevious())&&(e.startOffset-=k.getLength(),k=c.getNext());k.equals(g.getParent())&&e[d]++;k.equals(c.getParent())&&e[d]++;e[b?"endContainer":
"startContainer"]=k;return e}CKEDITOR.dom.rangeList=function(c){if(c instanceof CKEDITOR.dom.rangeList)return c;c?c instanceof CKEDITOR.dom.range&&(c=[c]):c=[];return CKEDITOR.tools.extend(c,f)};var f={createIterator:function(){var c=this,e=CKEDITOR.dom.walker.bookmark(),b=[],f;return{getNextRange:function(k){f=void 0===f?0:f+1;var d=c[f];if(d&&1<c.length){if(!f)for(var g=c.length-1;0<=g;g--)b.unshift(c[g].createBookmark(!0));if(k)for(var m=0;c[f+m+1];){var a=d.document;k=0;g=a.getById(b[m].endNode);
for(a=a.getById(b[m+1].startNode);;){g=g.getNextSourceNode(!1);if(a.equals(g))k=1;else if(e(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary())continue;break}if(!k)break;m++}for(d.moveToBookmark(b.shift());m--;)g=c[++f],g.moveToBookmark(b.shift()),d.setEnd(g.endContainer,g.endOffset)}return d}}},createBookmarks:function(c){for(var f=[],b,l=0;l<this.length;l++){f.push(b=this[l].createBookmark(c,!0));for(var k=l+1;k<this.length;k++)this[k]=e(b,this[k]),this[k]=e(b,this[k],!0)}return f},createBookmarks2:function(c){for(var e=
[],b=0;b<this.length;b++)e.push(this[b].createBookmark2(c));return e},moveToBookmarks:function(c){for(var e=0;e<this.length;e++)this[e].moveToBookmark(c[e])}}}(),function(){function e(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function f(b){var a=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(a)for(var a=a.split(",").sort(function(a,b){return a>b?-1:1}),c=0,g;c<a.length;c++)if(g=a[c],d.ie&&(g.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==
g)&&(g="ie"),d[g]){b+="_"+a[c];break}return CKEDITOR.getUrl(e()+b+".css")}function c(b,a){l[b]||(CKEDITOR.document.appendStyleSheet(f(b)),l[b]=1);a&&a()}function h(b){var a=b.getById(k);a||(a=b.getHead().append("style"),a.setAttribute("id",k),a.setAttribute("type","text/css"));return a}function b(b,a,d){var c,e,g;if(CKEDITOR.env.webkit)for(a=a.split("}").slice(0,-1),e=0;e<a.length;e++)a[e]=a[e].split("{");for(var f=0;f<b.length;f++)if(CKEDITOR.env.webkit)for(e=0;e<a.length;e++){g=a[e][1];for(c=0;c<
d.length;c++)g=g.replace(d[c][0],d[c][1]);b[f].$.sheet.addRule(a[e][0],g)}else{g=a;for(c=0;c<d.length;c++)g=g.replace(d[c][0],d[c][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?b[f].$.styleSheet.cssText+=g:b[f].$.innerHTML+=g}}var l={};CKEDITOR.skin={path:e,loadPart:function(b,a){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e()+"skin.js"),function(){c(b,a)}):c(b,a)},getPath:function(b){return CKEDITOR.getUrl(f(b))},icons:{},addIcon:function(b,a,d,c){b=
b.toLowerCase();this.icons[b]||(this.icons[b]={path:a,offset:d||0,bgsize:c||"16px"})},getIconStyle:function(b,a,d,c,e){var g;b&&(b=b.toLowerCase(),a&&(g=this.icons[b+"-rtl"]),g||(g=this.icons[b]));b=d||g&&g.path||"";c=c||g&&g.offset;e=e||g&&g.bgsize||"16px";b&&(b=b.replace(/'/g,"\\'"));return b&&"background-image:url('"+CKEDITOR.getUrl(b)+"');background-position:0 "+c+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(c){var a=
h(CKEDITOR.document);return(this.setUiColor=function(c){this.uiColor=c;var e=CKEDITOR.skin.chameleon,f="",m="";"function"==typeof e&&(f=e(this,"editor"),m=e(this,"panel"));c=[[g,c]];b([a],f,c);b(d,m,c)}).call(this,c)}});var k="cke_ui_color",d=[],g=/\$color/g;CKEDITOR.on("instanceLoaded",function(c){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var a=c.editor;c=function(c){c=(c.data[0]||c.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!c.getById("cke_ui_color")){var e=h(c);
d.push(e);a.on("destroy",function(){d=CKEDITOR.tools.array.filter(d,function(a){return e!==a})});(c=a.getUiColor())&&b([e],CKEDITOR.skin.chameleon(a,"panel"),[[g,c]])}};a.on("panelShow",c);a.on("menuShow",c);a.config.uiColor&&a.setUiColor(a.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var e=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);
e.appendTo(CKEDITOR.document.getHead());try{var f=e.getComputedStyle("border-top-color"),c=e.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!f||f!=c)}catch(h){CKEDITOR.env.hc=!1}e.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(e=CKEDITOR._.pending)for(delete CKEDITOR._.pending,f=0;f<e.length;f++)CKEDITOR.editor.prototype.constructor.apply(e[f][0],e[f][1]),CKEDITOR.add(e[f][0])}(),
CKEDITOR.skin.name="moono-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var e=function(){return function(c,e){for(var b=c.match(/[^#]./g),f=0;3>f;f++){var k=f,d;d=parseInt(b[f],16);d=("0"+(0>e?0|d*(1+e):0|d+(255-d)*e).toString(16)).slice(-2);b[k]=d}return"#"+b.join("")}}(),f={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,h){var b=e(c.uiColor,.4),b={id:"."+c.id,defaultBorder:e(b,-.2),toolbarElementsBorder:e(b,-.25),defaultBackground:b,lightBackground:e(b,.8),darkBackground:e(b,-.15),ckeButtonOn:e(b,.4),ckeResizer:e(b,-.4),ckeColorauto:e(b,.8),dialogBody:e(b,.7),dialogTab:e(b,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:e(b,-.6),menubuttonHover:e(b,.1),menubuttonIcon:e(b,.5),menubuttonIconHover:e(b,.3)};return f[h].output(b).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var e=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var d=[this._],a=1;a<arguments.length;a++)d.push(arguments[a]);d.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,d);return this._},f={build:function(b,d,a){return new CKEDITOR.ui.dialog.textInput(b,d,a)}},c={build:function(b,d,a){return new CKEDITOR.ui.dialog[d.type](b,d,a)}},h={isChanged:function(){return this.getValue()!=
this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},b=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,d){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},
this)},this),this._.domOnChangeRegistered=!0);this.on("change",d)}},!0),l=/^on([A-Z]\w+)/,k=function(b){for(var d in b)(l.test(d)||"title"==d||"type"==d)&&delete b[d];return b},d=function(b){b=b.data.getKeystroke();b==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):b==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,d,a,c){if(!(4>arguments.length)){var f=e.call(this,d);f.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var h={role:d.role||"presentation"};d.includeLabel&&(h["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,d,a,"div",null,h,function(){var a=[],e=d.required?" cke_required":"";"horizontal"!=d.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',c.call(this,b,d),"\x3c/div\x3e"):(e={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+e+'" id\x3d"'+f.labelId+'" for\x3d"'+f.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(d.controlStyle?' style\x3d"'+d.controlStyle+
'"':"")+"\x3e"+c.call(this,b,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,e,a));return a.join("")})}},textInput:function(b,c,a){if(!(3>arguments.length)){e.call(this,c);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+c.type,id:f,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(h.maxlength=c.maxLength);c.size&&(h.size=c.size);c.inputStyle&&(h.style=c.inputStyle);var k=this,l=!1;b.on("load",function(){k.getInputElement().on("keydown",
function(a){13==a.data.getKeystroke()&&(l=!0)});k.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);k.bidi&&d.call(k,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&&
(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,c,a){if(!(3>arguments.length)){e.call(this,c);var f=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};c.validate&&(this.validate=c.validate);k.rows=c.rows||5;k.cols=c.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(k.style=c.inputStyle);c.dir&&(k.dir=c.dir);if(f.bidi)b.on("load",
function(){f.getInputElement().on("keyup",d)},f);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],b;for(b in k)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(k[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,
d,a){if(!(3>arguments.length)){var c=e.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,d,a,"span",null,null,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],f=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};k(a);d["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);
c.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,e,"input",null,h);e.push(' \x3clabel id\x3d"',f,'" for\x3d"',h.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,d,a){if(!(3>arguments.length)){e.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var c=[],f=this;d.role="radiogroup";d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,
b,d,a,function(){for(var a=[],e=[],h=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",l=0;l<d.items.length;l++){var v=d.items[l],q=void 0!==v[2]?v[2]:v[0],B=void 0!==v[1]?v[1]:v[0],w=CKEDITOR.tools.getNextId()+"_radio_input",y=w+"_label",w=CKEDITOR.tools.extend({},d,{id:w,title:null,type:null},!0),q=CKEDITOR.tools.extend({},w,{title:q},!0),A={type:"radio","class":"cke_dialog_ui_radio_input",name:h,value:B,"aria-labelledby":y},D=[];f._["default"]==B&&(A.checked="checked");k(w);k(q);"undefined"!=typeof w.inputStyle&&
(w.style=w.inputStyle);w.keyboardFocusable=!0;c.push(new CKEDITOR.ui.dialog.uiElement(b,w,D,"input",null,A));D.push(" ");new CKEDITOR.ui.dialog.uiElement(b,q,D,"label",null,{id:y,"for":A.id},v[0]);a.push(D.join(""))}new CKEDITOR.ui.dialog.hbox(b,c,a,e);return e.join("")});this._.children=c}},button:function(b,d,a){if(arguments.length){"function"==typeof d&&(d=d(b.getParentEditor()));e.call(this,d,{disabled:d.disabled||!1});CKEDITOR.event.implementOn(this);var c=this;b.on("load",function(){var a=this.getElement();
(function(){a.on("click",function(a){c.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(c.click(),a.data.preventDefault())})})();a.unselectable()},this);var f=CKEDITOR.tools.extend({},d);delete f.style;var h=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,f,a,"a",null,{style:d.style,href:"javascript:void(0)",title:d.label,hidefocus:"true","class":d["class"],role:"button","aria-labelledby":h},'\x3cspan id\x3d"'+h+'" class\x3d"cke_dialog_ui_button"\x3e'+
CKEDITOR.tools.htmlEncode(d.label)+"\x3c/span\x3e")}},select:function(b,d,a){if(!(3>arguments.length)){var c=e.call(this,d);d.validate&&(this.validate=d.validate);c.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,d,a,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],f=[],h={id:c.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_',
d.type,'" role\x3d"presentation"');d.width&&e.push('style\x3d"width:'+d.width+'" ');e.push("\x3e");void 0!==d.size&&(h.size=d.size);void 0!==d.multiple&&(h.multiple=d.multiple);k(a);for(var l=0,v;l<d.items.length&&(v=d.items[l]);l++)f.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==v[1]?v[1]:v[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(v[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);c.select=new CKEDITOR.ui.dialog.uiElement(b,a,e,"select",null,
h,f.join(""));e.push("\x3c/div\x3e");return e.join("")})}},file:function(b,d,a){if(!(3>arguments.length)){void 0===d["default"]&&(d["default"]="");var c=CKEDITOR.tools.extend(e.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);b.on("load",function(){CKEDITOR.document.getById(c.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,a,function(){c.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"',
c.frameId,'" title\x3d"',d.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,d,a){var c=this;if(!(3>arguments.length)){e.call(this,d);d.validate&&(this.validate=d.validate);var f=CKEDITOR.tools.extend({},d),h=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(a){var c=
d["for"];a=h?h.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(c[0],c[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(d["for"][0],d["for"][1])._.buttons.push(c)});CKEDITOR.ui.dialog.button.call(this,b,f,a)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,a=/\/$/;return function(c,e,f){if(!(3>arguments.length)){var h=[],k=e.html;"\x3c"!=k.charAt(0)&&(k="\x3cspan\x3e"+k+"\x3c/span\x3e");var l=e.focus;if(l){var v=this.focus;
this.focus=function(){("function"==typeof l?l:v).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,c,e,h,"span",null,null,"");h=h.join("").match(b);k=k.match(d)||["","",""];a.test(k[1])&&(k[1]=k[1].slice(0,-1),k[2]="/"+k[2]);f.push([k[1]," ",h[1]||"",k[2]].join(""))}}}(),fieldset:function(b,d,a,c,e){var f=e.label;this._={children:d};CKEDITOR.ui.dialog.uiElement.call(this,b,e,c,"fieldset",null,null,function(){var b=
[];f&&b.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var d=0;d<a.length;d++)b.push(a[d]);return b.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(b){var d=CKEDITOR.document.getById(this._.labelId);1>d.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(d):d.getChild(0).$.nodeValue=
b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:b},!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 b=this.getElement();b&&b.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(b,d){this.on("click",function(){d.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},
focus:function(){var b=this.selectParentTab();setTimeout(function(){var d=b.getInputElement();d&&d.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var d=b.getInputElement();d&&(d.$.focus(),d.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var d=b&&b.charAt(0);(d="‪"==d?"ltr":"‫"==d?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(d)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},
getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var d=this.getDirectionMarker();d&&(b=("ltr"==d?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var d=this.getInputElement();b?d.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&d.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},h,!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(b,d,a){var c=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;c.$.text=b;c.$.value=void 0===d||null===d?b:d;void 0===a||null===a?CKEDITOR.env.ie?e.add(c.$):e.add(c.$,null):e.add(c.$,a);return this},remove:function(b){this.getInputElement().$.remove(b);
return this},clear:function(){for(var b=this.getInputElement().$;0<b.length;)b.remove(0);return this},keyboardFocusable:!0},h,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,d){this.getInputElement().$.checked=b;!d&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(d,
c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return b.onChange.apply(this,arguments);d.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",c);return null}},keyboardFocusable:!0},h,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,d){for(var a=this._.children,c,e=0;e<a.length&&(c=a[e]);e++)c.getElement().$.checked=
c.getValue()==b;!d&&this.fire("change",{value:b})},getValue:function(){for(var b=this._.children,d=0;d<b.length;d++)if(b[d].getElement().$.checked)return b[d].getValue();return null},accessKeyUp:function(){var b=this._.children,d;for(d=0;d<b.length;d++)if(b[d].getElement().$.checked){b[d].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(d,c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return b.onChange.apply(this,arguments);d.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",c);return null}}},h,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,h,{getInputElement:function(){var b=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<b.$.forms.length?new CKEDITOR.dom.element(b.$.forms[0].elements[0]):
this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var d=/^on([A-Z]\w+)/,a,c=function(a,b,d,c){a.on("formLoaded",function(){a.getInputElement().on(d,c,a)})},e;for(e in b)if(a=e.match(d))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,b[e]):c(this,this._.dialog,a[1].toLowerCase(),b[e]);return this},reset:function(){function b(){a.$.open();
var g="";c.size&&(g=c.size-(CKEDITOR.env.ie?7:0));var q=d.frameId+"_input";a.$.write(['\x3chtml dir\x3d"'+k+'" lang\x3d"'+l+'"\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"'+k+'" lang\x3d"'+l+'" action\x3d"',CKEDITOR.tools.htmlEncode(c.action),'"\x3e\x3clabel id\x3d"',d.labelId,'" for\x3d"',q,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(c.label),
'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',q,'" aria-labelledby\x3d"',d.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(c.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<g?g:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+f+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+h+")}","\x3c/script\x3e"].join(""));
a.$.close();for(g=0;g<e.length;g++)e[g].enable()}var d=this._,a=CKEDITOR.document.getById(d.frameId).getFrameDocument(),c=d.definition,e=d.buttons,f=this.formLoadedNumber,h=this.formUnloadNumber,k=d.dialog._.editor.lang.dir,l=d.dialog._.editor.langCode;f||(f=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),h=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(f);
CKEDITOR.tools.removeFunction(h)}));CKEDITOR.env.gecko?setTimeout(b,500):b()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(b,d){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",d)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=
new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",f);CKEDITOR.dialog.addUIElement("password",f);CKEDITOR.dialog.addUIElement("tel",f);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(b,d,a){for(var c=d.children,e,f=[],h=[],k=0;k<c.length&&(e=c[k]);k++){var l=[];f.push(l);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(b,e,l))}return new CKEDITOR.ui.dialog[d.type](b,h,f,a,d)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function e(){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 f(){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"),c=0,e=d.length;c<
e;c++){var g=new CKEDITOR.dom.element(d[c]);"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 h(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 b(){var a=
this.getInputElement();a&&a.removeAttribute("aria-invalid")}function l(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",p).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]),c=d.getChild(0),e=d.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(d);
!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(d.getParent()));c.unselectable();e.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:c,close:e,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 d(a){function b(){a.layout()}var d=CKEDITOR.document.getWindow();
d.on("resize",b);a.on("hide",function(){d.removeListener("resize",b)})}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function m(a){function b(d){var k=a.getSize(),m=CKEDITOR.document.getWindow().getViewPaneSize(),l=d.data.$.screenX,n=d.data.$.screenY,r=l-c.x,q=n-c.y;c={x:l,y:n};e.x+=r;e.y+=q;a.move(e.x+h[3]<f?-h[3]:e.x-h[1]>m.width-k.width-f?m.width-k.width+("rtl"==g.lang.dir?0:h[1]):e.x,e.y+h[0]<f?-h[0]:e.y-h[2]>m.height-k.height-f?m.height-k.height+h[2]:e.y,1);d.data.preventDefault()}
function d(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=D.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,e=null,g=a.getParentEditor(),f=g.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(g){c={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",
d);e=a.getPosition();if(CKEDITOR.env.ie6Compat){var f=D.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",d)}g.data.preventDefault()},a)}function a(a){function b(d){var n="rtl"==g.lang.dir,r=l.width,q=l.height,p=r+(d.data.$.screenX-m.x)*(n?-1:1)*(a._.moved?1:2),v=q+(d.data.$.screenY-m.y)*(a._.moved?1:2),x=a._.element.getFirst(),x=n&&x.getComputedStyle("right"),w=a.getPosition();w.y+v>k.height&&(v=k.height-w.y);(n?x:w.x)+p>k.width&&(p=k.width-(n?x:w.x));if(e==CKEDITOR.DIALOG_RESIZE_WIDTH||
e==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(c.minWidth||0,p-f);if(e==CKEDITOR.DIALOG_RESIZE_HEIGHT||e==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(c.minHeight||0,v-h);a.resize(r,q);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=D.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,e=c.resizable;
if(e!=CKEDITOR.DIALOG_RESIZE_NONE){var g=a.getParentEditor(),f,h,k,m,l,n,r=CKEDITOR.tools.addFunction(function(c){l=a.getSize();var e=a.parts.contents;e.$.getElementsByTagName("iframe").length&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),e.append(n));h=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));f=l.width-a.parts.contents.getSize("width",
1);m={x:c.screenX,y:c.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(e=D.getChild(0).getFrameDocument(),e.on("mousemove",b),e.on("mouseup",d));c.preventDefault&&c.preventDefault()});a.on("load",function(){var b="";e==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":e==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+
b+" cke_resizer_"+g.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(g.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+r+', event )"\x3e'+("ltr"==g.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});g.on("destroy",function(){CKEDITOR.tools.removeFunction(r)})}}function n(a){a.data.preventDefault(1)}function x(a){var b=CKEDITOR.document.getWindow(),d=a.config,c=CKEDITOR.skinName||a.config.skin,e=d.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=d.dialog_backgroundCoverOpacity,
g=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(e,c,g),f=A[d];f?f.show():(g=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",g,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+e,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(e="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+e+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",g.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),
g.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+e+"' );document.close();")+"})())"),g.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),g.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(g.join("")),f.setOpacity(void 0!==c?c:.5),f.on("keydown",n),f.on("keypress",n),f.on("keyup",n),f.appendTo(CKEDITOR.document.getBody()),
A[d]=f);a.focusManager.add(f);D=f;a=function(){var a=b.getViewPaneSize();f.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),d=CKEDITOR.dialog._.currentTop;f.setStyles({left:a.x+"px",top:a.y+"px"});if(d){do a=d.getPosition(),d.move(a.x,a.y);while(d=d._.parentDialog)}};y=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||f.focus();if(CKEDITOR.env.ie6Compat){var k=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=
window.onscroll||function(){};window.onscroll=k},0);h()}}function u(a){D&&(a.focusManager.remove(D),a=CKEDITOR.document.getWindow(),D.hide(),D=null,a.removeListener("resize",y),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),y=null)}var t=CKEDITOR.tools.cssLength,p='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" 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"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 g(){var a=z._.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 k(a){var b=z._.focusList;a=a||0;if(!(1>b.length)){var d=z._.currentFocusIndex;z._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var e=d,g=1<z._.pageCount;do{e+=a;if(g&&!z._.tabBarMode&&(e==b.length||-1==e)){z._.tabBarMode=!0;z._.tabs[z._.currentTabId][0].focus();
z._.currentFocusIndex=-1;return}e=(e+b.length)%b.length;if(e==d)break}while(a&&!b[e].isFocusable());b[e].focus();"text"==b[e].type&&b[e].select()}}function n(a){if(z==CKEDITOR.dialog._.currentTop){var b=a.data.getKeystroke(),c="rtl"==d.lang.dir,g=[37,38,39,40];B=t=0;if(9==b||b==CKEDITOR.SHIFT+9)k(b==CKEDITOR.SHIFT+9?-1:1),B=1;else if(b==CKEDITOR.ALT+121&&!z._.tabBarMode&&1<z.getPageCount())z._.tabBarMode=!0,z._.tabs[z._.currentTabId][0].focus(),z._.currentFocusIndex=-1,B=1;else if(-1!=CKEDITOR.tools.indexOf(g,
b)&&z._.tabBarMode)b=-1!=CKEDITOR.tools.indexOf([c?39:37,38],b)?e.call(z):f.call(z),z.selectPage(b),z._.tabs[b][0].focus(),B=1;else if(13!=b&&32!=b||!z._.tabBarMode)if(13==b)b=a.data.getTarget(),b.is("a","button","select","textarea")||b.is("input")&&"button"==b.$.type||((b=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(b.click,0,b),B=1),t=1;else if(27==b)(b=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(b.click,0,b):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),t=1;else return;else this.selectPage(this._.currentTabId),
this._.tabBarMode=!1,this._.currentFocusIndex=-1,k(1),B=1;q(a)}}function q(a){B?a.data.preventDefault(1):t&&a.data.stopPropagation()}var p=CKEDITOR.dialog._.dialogDefinitions[c],v=CKEDITOR.tools.clone(r),x=d.config.dialog_buttonsOrder||"OS",A=d.lang.dir,u={},B,t;("OS"==x&&CKEDITOR.env.mac||"rtl"==x&&"ltr"==A||"ltr"==x&&"rtl"==A)&&v.buttons.reverse();p=CKEDITOR.tools.extend(p(d),v);p=CKEDITOR.tools.clone(p);p=new w(this,p);v=l(d);this._={editor:d,element:v.element,name:c,contentSize:{width:0,height:0},
size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=v.parts;CKEDITOR.tools.setTimeout(function(){d.fire("ariaWidget",this.parts.contents)},0,this);v={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};v["rtl"==A?"right":"left"]=0;this.parts.dialog.setStyles(v);CKEDITOR.event.call(this);this.definition=p=CKEDITOR.fire("dialogDefinition",
{name:c,definition:p},d).definition;if(!("removeDialogTabs"in d._)&&d.config.removeDialogTabs){v=d.config.removeDialogTabs.split(";");for(A=0;A<v.length;A++)if(x=v[A].split(":"),2==x.length){var y=x[0];u[y]||(u[y]=[]);u[y].push(x[1])}d._.removeDialogTabs=u}if(d._.removeDialogTabs&&(u=d._.removeDialogTabs[c]))for(A=0;A<u.length;A++)p.removeContents(u[A]);if(p.onLoad)this.on("load",p.onLoad);if(p.onShow)this.on("show",p.onShow);if(p.onHide)this.on("hide",p.onHide);if(p.onOk)this.on("ok",function(a){d.fire("saveSnapshot");
setTimeout(function(){d.fire("saveSnapshot")},0);!1===p.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(p.onCancel)this.on("cancel",function(a){!1===p.onCancel.call(this,a)&&(a.data.hide=!1)});var z=this,Q=function(a){var b=z._.contents,d=!1,c;for(c in b)for(var e in b[c])if(d=a.call(this,b[c][e]))return};this.on("ok",function(a){Q(function(b){if(b.validate){var d=b.validate(this),c="string"==typeof d||!1===d;c&&(a.data.hide=!1,a.stop());h.call(b,!c,"string"==typeof d?
d:void 0);return c}})},this,null,0);this.on("cancel",function(a){Q(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=k;var X=this._.element;d.focusManager.add(X,1);this.on("show",function(){X.on("keydown",n,this);if(CKEDITOR.env.gecko)X.on("keypress",q,this)});this.on("hide",
function(){X.removeListener("keydown",n);CKEDITOR.env.gecko&&X.removeListener("keypress",q);Q(function(a){b.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(){g();var a=1<z._.pageCount;d.config.dialog_startupFocusTab&&a?(z._.tabBarMode=!0,z._.tabs[z._.currentTabId][0].focus(),z._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-1,p.onFocus?
(a=p.onFocus.call(this))&&a.focus():k(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);m(this);a(this);(new CKEDITOR.dom.text(p.title,CKEDITOR.document)).appendTo(this.parts.title);for(A=0;A<p.contents.length;A++)(u=p.contents[A])&&this.addPage(u);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,k(1)),a.data.preventDefault())},this);A=[];u=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:p.buttons},A).getChild();this.parts.footer.setHtml(A.join(""));for(A=0;A<u.length;A++)this._.buttons[u[A].id]=u[A]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){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"}),"rtl"==this._.editor.lang.dir&&this._.position&&(this._.position.x=CKEDITOR.document.getWindow().getViewPaneSize().width-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)),this._.contentSize={width: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 c=this._.element.getFirst(),e="rtl"==this._.editor.lang.dir,g="fixed"==c.getComputedStyle("position");CKEDITOR.env.ie&&c.setStyle("zoom","100%");g&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},g||(g=CKEDITOR.document.getWindow().getScrollPosition(),a+=g.x,b+=g.y),e&&(g=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-g.width-a),b={top:(0<b?b:0)+"px"},
b[e?"right":"left"]=(0<a?a:0)+"px",c.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","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,x(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",J);a.on("keyup",E);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],e=this._.tabs[a.id],g=a.requiredContent,f=0;if(e){for(var h in this._.contents[a.id]){var k=this._.contents[a.id][h];"hbox"!=k.type&&"vbox"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():(k.enable(),f++))}!f||g&&!this._.editor.activeFilter.check(g)?e[0].addClass("cke_dialog_tab_disabled"):
e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();d(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,b=this.getSize(),d=CKEDITOR.document.getWindow().getViewPaneSize(),c=
(d.width-b.width)/2,e=(d.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<e?e:0)>d.height||b.width+(0<c?c:0)>d.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:c,this._.moved?this._.position.y:e)},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(F(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 u(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",J);a.removeListener("keyup",E);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)+'"':"",c=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),e=this._.contents[a.id]={},g=c.getChild(),f=0;c=g.shift();)c.notAllowed||"hbox"==c.type||"vbox"==c.type||f++,e[c.id]=c,"function"==typeof c.getChild&&g.push.apply(g,c.getChild());f||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");c=CKEDITOR.env;e="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',
0<this._.pageCount?" cke_last":"cke_first",d,a.hidden?' style\x3d"display:none"':"",' id\x3d"',e,'"',c.gecko&&!c.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",e);this._.tabs[a.id]=[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&&
(H(this,this,"CTRL+"+a.accessKey,L,G),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],e=this._.tabs[b][1];b!=a&&(d.removeClass("cke_dialog_tab_selected"),e.hide());e.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(a){var b=this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(e.call(this)),b.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=
this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var 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)}}};CKEDITOR.tools.extend(CKEDITOR.dialog,{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 r={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},v=function(a,b,d){for(var c=0,e;e=a[c];c++)if(e.id==b||d&&e[d]&&(e=v(e[d],b,d)))return e;return null},q=function(a,b,d,c,e){if(d){for(var g=0,f;f=a[g];g++){if(f.id==d)return a.splice(g,0,b),b;if(c&&f[c]&&(f=q(f[c],b,d,c,!0)))return f}if(e)return null}a.push(b);return b},B=function(a,b,d){for(var c=0,e;e=a[c];c++){if(e.id==b)return a.splice(c,1);if(d&&e[d]&&(e=B(e[d],
b,d)))return e}return null},w=function(a,b){this.dialog=a;for(var d=b.contents,c=0,e;e=d[c];c++)d[c]=e&&new g(a,e);CKEDITOR.tools.extend(this,b)};w.prototype={getContents:function(a){return v(this.contents,a)},getButton:function(a){return v(this.buttons,a)},addContents:function(a,b){return q(this.contents,a,b)},addButton:function(a,b){return q(this.buttons,a,b)},removeContents:function(a){B(this.contents,a)},removeButton:function(a){B(this.buttons,a)}};g.prototype={get:function(a){return v(this.elements,
a,"children")},add:function(a,b){return q(this.elements,a,b,"children")},remove:function(a){B(this.elements,a,"children")}};var y,A={},D,z={},J=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,c=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=z[(b?"CTRL+":"")+(d?"ALT+":"")+(c?"SHIFT+":"")+e])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},E=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,
c=a.data.$.shiftKey,e=String.fromCharCode(a.data.$.keyCode);(b=z[(b?"CTRL+":"")+(d?"ALT+":"")+(c?"SHIFT+":"")+e])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))},H=function(a,b,d,c,e){(z[d]||(z[d]=[])).push({uiElement:a,dialog:b,key:d,keyup:e||a.accessKeyUp,keydown:c||a.accessKeyDown})},F=function(a){for(var b in z){for(var d=z[b],c=d.length-1;0<=c;c--)d[c].dialog!=a&&d[c].uiElement!=a||d.splice(c,1);0===d.length&&delete z[b]}},G=function(a,
b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},L=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,d,c,e,g,f){if(!(4>arguments.length)){var h=(c.call?c(b):c)||"div",k=["\x3c",h," "],m=(e&&e.call?e(b):e)||{},l=(g&&g.call?g(b):g)||{},n=(f&&f.call?f.call(this,a,b):f)||"",r=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);l.id=r;var q={};b.type&&(q["cke_dialog_ui_"+
b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var p=l["class"]&&l["class"].split?l["class"].split(" "):[],r=0;r<p.length;r++)p[r]&&(q[p[r]]=1);p=[];for(r in q)p.push(r);l["class"]=p.join(" ");b.title&&(l.title=b.title);q=(b.style||"").split(";");b.align&&(p=b.align,m["margin-left"]="left"==p?0:"auto",m["margin-right"]="right"==p?0:"auto");for(r in m)q.push(r+":"+m[r]);b.hidden&&q.push("display:none");for(r=q.length-1;0<=r;r--)""===q[r]&&q.splice(r,1);0<q.length&&(l.style=
(l.style?l.style+"; ":"")+q.join("; "));for(r in l)k.push(r+'\x3d"'+CKEDITOR.tools.htmlEncode(l[r])+'" ');k.push("\x3e",n,"\x3c/",h,"\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&&H(this,a,"CTRL+"+b.accessKey);var v=this;a.on("load",function(){var b=v.getInputElement();if(b){var d=v.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;v.fire("focus");
d&&this.addClass(d)});b.on("blur",function(){v.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=v.focusIndex}))}},hbox:function(a,b,d,c,e){if(!(4>arguments.length)){this._||(this._={});var g=this._.children=b,f=e&&e.widths||null,h=e&&e.height||null,k,m={role:"presentation"};e&&e.align&&(m.align=e.align);CKEDITOR.ui.dialog.uiElement.call(this,
a,e||{type:"hbox"},c,"table",{},m,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",c=[];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" ');f?f[k]&&c.push("width:"+t(f[k])):c.push("width:"+Math.floor(100/d.length)+"%");h&&c.push("height:"+t(h));e&&void 0!==e.padding&&c.push("padding:"+t(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&
g[k].align&&c.push("text-align:"+g[k].align);0<c.length&&a.push('style\x3d"'+c.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,c,e){if(!(3>arguments.length)){this._||(this._={});var g=this._.children=b,f=e&&e.width||null,h=e&&e.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,e||{type:"vbox"},c,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];
b.push('style\x3d"');e&&e.expand&&b.push("height:100%;");b.push("width:"+t(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(e&&e.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var c=0;c<d.length;c++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');f&&k.push("width:"+t(f||"100%"));h?k.push("height:"+t(h[c])):e&&e.expand&&k.push("height:"+Math.floor(100/d.length)+"%");
e&&void 0!==e.padding&&k.push("padding:"+t(e.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g[c].align&&k.push("text-align:"+g[c].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',d[c],"\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,c=function(a,b,d,c){b.on("load",function(){a.getInputElement().on(d,c,a)})},e;for(e in a)if(d=e.match(b))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,a[e]):c(this,this._.dialog,d[1].toLowerCase(),a[e]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},
disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,d){for(var c=b.children,e,g=[],f=[],h=0;h<c.length&&(e=c[h]);h++){var k=[];g.push(k);f.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(a,e,k))}return new CKEDITOR.ui.dialog[b.type](a,
f,g,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+)?$/,c=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,e=/^(((\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,c=CKEDITOR.VALIDATE_AND,e=[],g;for(g=0;g<a.length;g++)if("function"==typeof a[g])e.push(a[g]);else break;g<a.length&&"string"==typeof a[g]&&(d=a[g],g++);g<a.length&&"number"==typeof a[g]&&(c=a[g]);var f=c==CKEDITOR.VALIDATE_AND?!0:!1;for(g=0;g<e.length;g++)f=c==CKEDITOR.VALIDATE_AND?f&&
e[g](b):f||e[g](b);return f?!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 e.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return c.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 A)A[d].remove();A={}}a=a.editor._.storedDialogs;for(var c in a)a[c].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var d=null,c=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&x(this);if("function"==typeof c)d=this._.storedDialogs||(this._.storedDialogs={}),d=d[a]||(d[a]=new CKEDITOR.dialog(this,a)),b&&b.call(d,d),d.show();else{if("failed"==c)throw u(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)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return d}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(e){e.on("doubleclick",function(f){f.data.dialog&&e.openDialog(f.data.dialog)},null,null,999)}}),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,
ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(e){var f=this;e.addCommand("a11yHelp",{exec:function(){var c=e.langCode,c=f.availableLangs[c]?c:f.availableLangs[c.replace(/-.*/,"")]?c.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f.path+"dialogs/lang/"+c+".js"),function(){e.lang.a11yhelp=f.langEntries[c];e.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},
readOnly:1,canUndo:!1});e.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");e.on("ariaEditorHelpLabel",function(c){c.data.label=e.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(e){var f=e.addCommand("about",new CKEDITOR.dialogCommand("about"));f.modes={wysiwyg:1,source:1};f.canUndo=!1;f.readOnly=1;e.ui.addButton&&e.ui.addButton("About",{label:e.lang.about.dlgTitle,command:"about",toolbar:"about"});
CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),"use strict",function(){function e(e){function c(){l=e.document;k=l[CKEDITOR.env.ie?"getBody":"getDocumentElement"]();d=CKEDITOR.env.quirks?l.getBody():l.getDocumentElement();var a=CKEDITOR.env.quirks?d:d.findOne("body");a&&(a.setStyle("height","auto"),a.setStyle("min-height",CKEDITOR.env.safari?"0%":"auto"));g=CKEDITOR.dom.element.createFromHtml('\x3cspan style\x3d"margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;"\x3e'+
(CKEDITOR.env.webkit?"\x26nbsp;":"")+"\x3c/span\x3e",l)}function h(){x&&d.setStyle("overflow-y","hidden");var c=e.window.getViewPaneSize().height,h;k.append(g);h=g.getDocumentPosition(l).y+g.$.offsetHeight;g.remove();h+=m;h=Math.max(h,a);h=Math.min(h,n);h!=c&&b!=h&&(h=e.fire("autoGrow",{currentHeight:c,newHeight:h}).newHeight,e.resize(e.container.getStyle("width"),h,!0),b=h);x||(h<n&&d.$.scrollHeight>d.$.clientHeight?d.setStyle("overflow-y","hidden"):d.removeStyle("overflow-y"))}var b,l,k,d,g,m=e.config.autoGrow_bottomSpace||
0,a=void 0!==e.config.autoGrow_minHeight?e.config.autoGrow_minHeight:200,n=e.config.autoGrow_maxHeight||Infinity,x=!e.config.autoGrow_maxHeight;e.addCommand("autogrow",{exec:h,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var u={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},t;for(t in u)e.on(t,function(a){"wysiwyg"==a.editor.mode&&setTimeout(function(){var a=e.getCommand("maximize");!e.window||a&&a.state==CKEDITOR.TRISTATE_ON?b=null:(h(),x||h())},100)});e.on("afterCommandExec",
function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?d.removeStyle("overflow-y"):h())});e.on("contentDom",c);c();e.config.autoGrow_onStartup&&e.editable().isVisible()&&e.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(f){if(f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)f.on("instanceReady",function(){f.editable().isInline()?f.ui.space("contents").setStyle("height","auto"):e(f)})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(e){var f=
0,c=function(b,d,c,m){if(m){m=new CKEDITOR.style(m);var a=h[c];a.unshift(m);e.attachStyleStateChange(m,function(a){!e.readOnly&&e.getCommand(c).setState(a)});e.addCommand(c,new CKEDITOR.styleCommand(m,{contentForms:a}));e.ui.addButton&&e.ui.addButton(b,{label:d,command:c,toolbar:"basicstyles,"+(f+=10)})}},h={bold:["strong","b",["span",function(b){b=b.styles["font-weight"];return"bold"==b||700<=+b}]],italic:["em","i",["span",function(b){return"italic"==b.styles["font-style"]}]],underline:["u",["span",
function(b){return"underline"==b.styles["text-decoration"]}]],strike:["s","strike",["span",function(b){return"line-through"==b.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},b=e.config,l=e.lang.basicstyles;c("Bold",l.bold,"bold",b.coreStyles_bold);c("Italic",l.italic,"italic",b.coreStyles_italic);c("Underline",l.underline,"underline",b.coreStyles_underline);c("Strike",l.strike,"strike",b.coreStyles_strike);c("Subscript",l.subscript,"subscript",b.coreStyles_subscript);c("Superscript",
l.superscript,"superscript",b.coreStyles_superscript);e.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},
function(){var e={exec:function(e){var c=e.getCommand("blockquote").state,h=e.getSelection(),b=h&&h.getRanges()[0];if(b){var l=h.createBookmarks();if(CKEDITOR.env.ie){var k=l[0].startNode,d=l[0].endNode,g;if(k&&"blockquote"==k.getParent().getName())for(g=k;g=g.getNext();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){k.move(g,!0);break}if(d&&"blockquote"==d.getParent().getName())for(g=d;g=g.getPrevious();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){d.move(g);break}}var m=b.createIterator();
m.enlargeBr=e.config.enterMode!=CKEDITOR.ENTER_BR;if(c==CKEDITOR.TRISTATE_OFF){for(k=[];c=m.getNextParagraph();)k.push(c);1>k.length&&(c=e.document.createElement(e.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),d=l.shift(),b.insertNode(c),c.append(new CKEDITOR.dom.text("﻿",e.document)),b.moveToBookmark(d),b.selectNodeContents(c),b.collapse(!0),d=b.createBookmark(),k.push(c),l.unshift(d));g=k[0].getParent();b=[];for(d=0;d<k.length;d++)c=k[d],g=g.getCommonAncestor(c.getParent());for(c={table:1,tbody:1,
tr:1,ol:1,ul:1};c[g.getName()];)g=g.getParent();for(d=null;0<k.length;){for(c=k.shift();!c.getParent().equals(g);)c=c.getParent();c.equals(d)||b.push(c);d=c}for(;0<b.length;)if(c=b.shift(),"blockquote"==c.getName()){for(d=new CKEDITOR.dom.documentFragment(e.document);c.getFirst();)d.append(c.getFirst().remove()),k.push(d.getLast());d.replace(c)}else k.push(c);b=e.document.createElement("blockquote");for(b.insertBefore(k[0]);0<k.length;)c=k.shift(),b.append(c)}else if(c==CKEDITOR.TRISTATE_ON){d=[];
for(g={};c=m.getNextParagraph();){for(k=b=null;c.getParent();){if("blockquote"==c.getParent().getName()){b=c.getParent();k=c;break}c=c.getParent()}b&&k&&!k.getCustomData("blockquote_moveout")&&(d.push(k),CKEDITOR.dom.element.setMarker(g,k,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(g);c=[];k=[];for(g={};0<d.length;)m=d.shift(),b=m.getParent(),m.getPrevious()?m.getNext()?(m.breakParent(m.getParent()),k.push(m.getNext())):m.remove().insertAfter(b):m.remove().insertBefore(b),b.getCustomData("blockquote_processed")||
(k.push(b),CKEDITOR.dom.element.setMarker(g,b,"blockquote_processed",!0)),c.push(m);CKEDITOR.dom.element.clearAllMarkers(g);for(d=k.length-1;0<=d;d--){b=k[d];a:{g=b;for(var m=0,a=g.getChildCount(),n=void 0;m<a&&(n=g.getChild(m));m++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){g=!1;break a}g=!0}g&&b.remove()}if(e.config.enterMode==CKEDITOR.ENTER_BR)for(b=!0;c.length;)if(m=c.shift(),"div"==m.getName()){d=new CKEDITOR.dom.documentFragment(e.document);!b||!m.getPrevious()||m.getPrevious().type==
CKEDITOR.NODE_ELEMENT&&m.getPrevious().isBlockBoundary()||d.append(e.document.createElement("br"));for(b=m.getNext()&&!(m.getNext().type==CKEDITOR.NODE_ELEMENT&&m.getNext().isBlockBoundary());m.getFirst();)m.getFirst().remove().appendTo(d);b&&d.append(e.document.createElement("br"));d.replace(m);b=!1}}h.selectBookmarks(l);e.focus()}},refresh:function(e,c){this.setState(e.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(f){f.blockless||(f.addCommand("blockquote",e),f.ui.addButton&&f.ui.addButton("Blockquote",{label:f.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function e(c,e){CKEDITOR.tools.extend(this,e,{editor:c,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:c._.notificationArea});e.type||(this.type="info");this.element=this._createElement();c.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}
function f(c){var e=this;this.editor=c;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);c.on("destroy",function(){e._removeListeners();e.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(c){function e(b){var c=new CKEDITOR.dom.element("div");c.setStyles({position:"fixed","margin-left":"-9999px"});c.setAttributes({"aria-live":"assertive",
"aria-atomic":"true"});c.setText(b);CKEDITOR.document.getBody().append(c);setTimeout(function(){c.remove()},100)}c._.notificationArea=new f(c);c.showNotification=function(b,e,f){var d,g;"progress"==e?d=f:g=f;b=new CKEDITOR.plugins.notification(c,{message:b,type:e,progress:d,duration:g});b.show();return b};c.on("key",function(b){if(27==b.data.keyCode){var f=c._.notificationArea.notifications;f.length&&(e(c.lang.notification.closed),f[f.length-1].hide(),b.cancel())}})}});e.prototype={show:function(){!1!==
this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(c){var e=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:c})&&(e=!1);var b=this.element,f=b.findOne(".cke_notification_message"),k=b.findOne(".cke_notification_progress"),d=c.type;b.removeAttribute("role");c.progress&&"progress"!=this.type&&(d="progress");d&&(b.removeClass(this._getClass()),b.removeAttribute("aria-label"),this.type=d,b.addClass(this._getClass()),
b.setAttribute("aria-label",this.type),"progress"!=this.type||k?"progress"!=this.type&&k&&k.remove():(k=this._createProgressElement(),k.insertBefore(f)));void 0!==c.message&&(this.message=c.message,f.setHtml(this.message));void 0!==c.progress&&(this.progress=c.progress,k&&k.setStyle("width",this._getPercentageProgress()));e&&c.important&&(b.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=c.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 c=this,e,b,f=this.editor.lang.common.close;e=new CKEDITOR.dom.element("div");e.addClass("cke_notification");e.addClass(this._getClass());e.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&e.append(this._createProgressElement());b=new CKEDITOR.dom.element("p");b.addClass("cke_notification_message");b.setHtml(this.message);
e.append(b);b=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+f+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');e.append(b);b.on("click",function(){c.editor.focus();c.hide()});return e},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var c=new CKEDITOR.dom.element("span");c.addClass("cke_notification_progress");
c.setStyle("width",this._getPercentageProgress());return c},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var c=this,e;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)e=this.duration;else if("info"==this.type||"success"==this.type)e="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;e&&(c._hideTimeoutId=setTimeout(function(){c.hide()},e))}};f.prototype=
{add:function(c){this.notifications.push(c);this.element.append(c.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(c){var e=CKEDITOR.tools.indexOf(this.notifications,c);0>e||(this.notifications.splice(e,1),c.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var c=this.editor,e=c.config,b=new CKEDITOR.dom.element("div");b.addClass("cke_notifications_area");
b.setAttribute("id","cke_notifications_area_"+c.name);b.setStyle("z-index",e.baseFloatZIndex-2);return b},_attachListeners:function(){var c=CKEDITOR.document.getWindow(),e=this.editor;c.on("scroll",this._uiBuffer.input);c.on("resize",this._uiBuffer.input);e.on("change",this._changeBuffer.input);e.on("floatingSpaceLayout",this._layout,this,null,20);e.on("blur",this._layout,this,null,20)},_removeListeners:function(){var c=CKEDITOR.document.getWindow(),e=this.editor;c.removeListener("scroll",this._uiBuffer.input);
c.removeListener("resize",this._uiBuffer.input);e.removeListener("change",this._changeBuffer.input);e.removeListener("floatingSpaceLayout",this._layout);e.removeListener("blur",this._layout)},_layout:function(){function c(){e.setStyle("left",v(q+f.width-n-x))}var e=this.element,b=this.editor,f=b.ui.contentsElement.getClientRect(),k=b.ui.contentsElement.getDocumentPosition(),d,g,m=e.getClientRect(),a,n=this._notificationWidth,x=this._notificationMargin;a=CKEDITOR.document.getWindow();var u=a.getScrollPosition(),
t=a.getViewPaneSize(),p=CKEDITOR.document.getBody(),r=p.getDocumentPosition(),v=CKEDITOR.tools.cssLength;n&&x||(a=this.element.getChild(0),n=this._notificationWidth=a.getClientRect().width,x=this._notificationMargin=parseInt(a.getComputedStyle("margin-left"),10)+parseInt(a.getComputedStyle("margin-right"),10));b.toolbar&&(d=b.ui.space("top"),g=d.getClientRect());d&&d.isVisible()&&g.bottom>f.top&&g.bottom<f.bottom-m.height?e.setStyles({position:"fixed",top:v(g.bottom)}):0<f.top?e.setStyles({position:"absolute",
top:v(k.y)}):k.y+f.height-m.height>u.y?e.setStyles({position:"fixed",top:0}):e.setStyles({position:"absolute",top:v(k.y+f.height-m.height)});var q="fixed"==e.getStyle("position")?f.left:"static"!=p.getComputedStyle("position")?k.x-r.x:k.x;f.width<n+x?k.x+n+x>u.x+t.width?c():e.setStyle("left",v(q)):k.x+n+x>u.x+t.width?e.setStyle("left",v(q)):k.x+f.width/2+n/2+x>u.x+t.width?e.setStyle("left",v(q-k.x+u.x+t.width-n-x)):0>f.left+f.width-n-x?c():0>f.left+f.width/2-n/2?e.setStyle("left",v(q-k.x+u.x)):e.setStyle("left",
v(q+f.width/2-n/2-x/2))}};CKEDITOR.plugins.notification=e}(),function(){var e='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=
' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f="";CKEDITOR.env.ie&&(f='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var e=e+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+f+'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"),h=CKEDITOR.addTemplate("button",e);CKEDITOR.plugins.add("button",{beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_BUTTON,
CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(b){CKEDITOR.tools.extend(this,b,{title:b.label,click:b.click||function(c){c.execCommand(b.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(b){return new CKEDITOR.ui.button(b)}};CKEDITOR.ui.button.prototype={render:function(b,e){function f(){var a=b.mode;a&&(a=this.modes[a]?void 0!==d[a]?d[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=b.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:
a,this.setState(a),this.refresh&&this.refresh())}var d=null,g=CKEDITOR.env,m=this._.id=CKEDITOR.tools.getNextId(),a="",n=this.command,x,u,t;this._.editor=b;var p={id:m,button:this,editor:b,focus:function(){CKEDITOR.document.getById(m).focus()},execute:function(){this.button.click(b)},attach:function(a){this.button.attach(a)}},r=CKEDITOR.tools.addFunction(function(a){if(p.onkey)return a=new CKEDITOR.dom.event(a),!1!==p.onkey(p,a.getKeystroke())}),v=CKEDITOR.tools.addFunction(function(a){var b;p.onfocus&&
(b=!1!==p.onfocus(p,new CKEDITOR.dom.event(a)));return b}),q=0;p.clickFn=x=CKEDITOR.tools.addFunction(function(){q&&(b.unlockSelection(1),q=0);p.execute();g.iOS&&b.focus()});this.modes?(d={},b.on("beforeModeUnload",function(){b.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(d[b.mode]=this._.state)},this),b.on("activeFilterChange",f,this),b.on("mode",f,this),!this.readOnly&&b.on("readOnly",f,this)):n&&(n=b.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),a+=n.state==CKEDITOR.TRISTATE_ON?
"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var B;if(this.directional)b.on("contentDirChanged",function(a){var d=CKEDITOR.document.getById(this._.id),c=d.getFirst();a=a.data;a!=b.lang.dir?d.addClass("cke_"+a):d.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(B,"rtl"==a,this.icon,this.iconOffset))},this);n?(u=b.getCommandKeystroke(n))&&(t=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,u)):a+="off";u=this.name||this.command;var w=
null,y=this.icon;B=u;this.icon&&!/\./.test(this.icon)?(B=this.icon,y=null):(this.icon&&(w=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(w=this.iconHiDpi));w?(CKEDITOR.skin.addIcon(w,w),y=null):w=B;a={id:m,name:u,iconName:B,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:a,ariaDisabled:"disabled"==a?"true":"false",title:this.title+(t?" ("+t.display+")":""),ariaShortcut:t?b.lang.common.keyboardShortcut+" "+t.aria:"",titleJs:g.gecko&&!g.hc?"":(this.title||
"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:r,focusFn:v,clickFn:x,style:CKEDITOR.skin.getIconStyle(w,"rtl"==b.lang.dir,y,this.iconOffset),arrowHtml:this.hasArrow?c.output():""};h.output(a,e);if(this.onRender)this.onRender();return p},setState:function(b){if(this._.state==b)return!1;this._.state=b;var c=CKEDITOR.document.getById(this._.id);return c?(c.setState(b,"cke_button"),c.setAttribute("aria-disabled",b==CKEDITOR.TRISTATE_DISABLED),
this.hasArrow?c.setAttribute("aria-expanded",b==CKEDITOR.TRISTATE_ON):b===CKEDITOR.TRISTATE_ON?c.setAttribute("aria-pressed",!0):c.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(b){if(this._.feature)return this._.feature;var c=this;this.allowedContent||this.requiredContent||!this.command||(c=b.getCommand(this.command)||c);return this._.feature=c}};CKEDITOR.ui.prototype.addButton=function(b,c){this.add(b,CKEDITOR.UI_BUTTON,c)}}(),function(){function e(b){function c(){for(var a=
e(),g=CKEDITOR.tools.clone(b.config.toolbarGroups)||f(b),h=0;h<g.length;h++){var m=g[h];if("/"!=m){"string"==typeof m&&(m=g[h]={name:m});var l,r=m.groups;if(r)for(var v=0;v<r.length;v++)l=r[v],(l=a[l])&&d(m,l);(l=a[m.name])&&d(m,l)}}return g}function e(){var a={},d,c,g;for(d in b.ui.items)c=b.ui.items[d],g=c.toolbar||"others",g=g.split(","),c=g[0],g=parseInt(g[1]||-1,10),a[c]||(a[c]=[]),a[c].push({name:d,order:g});for(c in a)a[c]=a[c].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 a}function d(a,d){if(d.length){a.items?a.items.push(b.ui.create("-")):a.items=[];for(var c;c=d.shift();)c="string"==typeof c?c:c.name,h&&-1!=CKEDITOR.tools.indexOf(h,c)||(c=b.ui.create(c))&&b.addFeature(c)&&a.items.push(c)}}function g(a){var b=[],c,e,g;for(c=0;c<a.length;++c)e=a[c],g={},"/"==e?b.push(e):CKEDITOR.tools.isArray(e)?(d(g,CKEDITOR.tools.clone(e)),b.push(g)):e.items&&(d(g,CKEDITOR.tools.clone(e.items)),g.name=e.name,b.push(g));return b}var h=b.config.removeButtons,
h=h&&h.split(","),a=b.config.toolbar;"string"==typeof a&&(a=b.config["toolbar_"+a]);return b.toolbar=a?g(a):c()}function f(b){return b._.toolbarGroups||(b._.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 b=0,c;c=this.toolbars[b++];)for(var e=0,d;d=c.items[e++];)if(d.focus){d.focus();return}};var h={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(b){b.toolbox&&(b.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){b.toolbox.focus()},100):b.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",
{requires:"button",init:function(b){var f,k=function(d,c){var e,a="rtl"==b.lang.dir,h=b.config.toolbarGroupCycling,x=a?37:39,a=a?39:37,h=void 0===h||h;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!e||!e.items.length;)if(e=9==c?(e?e.next:d.toolbar.next)||b.toolbox.toolbars[0]:(e?e.previous:d.toolbar.previous)||b.toolbox.toolbars[b.toolbox.toolbars.length-1],e.items.length)for(d=e.items[f?e.items.length-1:0];d&&!d.focus;)(d=f?d.previous:d.next)||(e=0);d&&d.focus();return!1;case x:e=d;do e=e.next,!e&&
h&&(e=d.toolbar.items[0]);while(e&&!e.focus);e?e.focus():k(d,9);return!1;case 40:return d.button&&d.button.hasArrow?d.execute():k(d,40==c?x:a),!1;case a:case 38:e=d;do e=e.previous,!e&&h&&(e=d.toolbar.items[d.toolbar.items.length-1]);while(e&&!e.focus);e?e.focus():(f=1,k(d,CKEDITOR.SHIFT+9),f=0);return!1;case 27:return b.focus(),!1;case 13:case 32:return d.execute(),!1}return!0};b.on("uiSpace",function(d){if(d.data.space==b.config.toolbarLocation){d.removeListener();b.toolbox=new c;var g=CKEDITOR.tools.getNextId(),
f=['\x3cspan id\x3d"',g,'" class\x3d"cke_voice_label"\x3e',b.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+b.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',g,'" onmousedown\x3d"return false;"\x3e'],g=!1!==b.config.toolbarStartupExpanded,a,h;b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&f.push('\x3cspan class\x3d"cke_toolbox_main"'+(g?"\x3e":' style\x3d"display:none"\x3e'));for(var l=b.toolbox.toolbars,u=e(b),t=u.length,
p=0;p<t;p++){var r,v=0,q,B=u[p],w="/"!==B&&("/"===u[p+1]||p==t-1),y;if(B)if(a&&(f.push("\x3c/span\x3e"),h=a=0),"/"===B)f.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{y=B.items||B;for(var A=0;A<y.length;A++){var D=y[A],z;if(D){var J=function(a){a=a.render(b,f);E=v.items.push(a)-1;0<E&&(a.previous=v.items[E-1],a.previous.next=a);a.toolbar=v;a.onkey=k;a.onfocus=function(){b.toolbox.focusCommandExecuted||b.focus()}};if(D.type==CKEDITOR.UI_SEPARATOR)h=a&&D;else{z=!1!==D.canGroup;
if(!v){r=CKEDITOR.tools.getNextId();v={id:r,items:[]};q=B.name&&(b.lang.toolbar.toolbarGroups[B.name]||B.name);f.push('\x3cspan id\x3d"',r,'" class\x3d"cke_toolbar'+(w?' cke_toolbar_last"':'"'),q?' aria-labelledby\x3d"'+r+'_label"':"",' role\x3d"toolbar"\x3e');q&&f.push('\x3cspan id\x3d"',r,'_label" class\x3d"cke_voice_label"\x3e',q,"\x3c/span\x3e");f.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var E=l.push(v)-1;0<E&&(v.previous=l[E-1],v.previous.next=v)}z?a||(f.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),
a=1):a&&(f.push("\x3c/span\x3e"),a=0);h&&(J(h),h=0);J(D)}}}a&&(f.push("\x3c/span\x3e"),h=a=0);v&&f.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}b.config.toolbarCanCollapse&&f.push("\x3c/span\x3e");if(b.config.toolbarCanCollapse&&b.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var H=CKEDITOR.tools.addFunction(function(){b.execCommand("toolbarCollapse")});b.on("destroy",function(){CKEDITOR.tools.removeFunction(H)});b.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=
a.ui.space("toolbar_collapser"),d=b.getPrevious(),c=a.ui.space("contents"),e=d.getParent(),g=parseInt(c.$.style.height,10),f=e.$.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?"▲":"◀");c.setStyle("height",g-(e.$.offsetHeight-f)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,
contentsHeight:c.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});b.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");f.push('\x3ca title\x3d"'+(g?b.lang.toolbar.toolbarCollapse:b.lang.toolbar.toolbarExpand)+'" id\x3d"'+b.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');g||f.push(" cke_toolbox_collapser_min");f.push('" onclick\x3d"CKEDITOR.tools.callFunction('+H+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',
"\x3c/a\x3e")}f.push("\x3c/span\x3e");d.data.html+=f.join("")}});b.on("destroy",function(){if(this.toolbox){var b,c=0,e,a,f;for(b=this.toolbox.toolbars;c<b.length;c++)for(a=b[c].items,e=0;e<a.length;e++)f=a[e],f.clickFn&&CKEDITOR.tools.removeFunction(f.clickFn),f.keyDownFn&&CKEDITOR.tools.removeFunction(f.keyDownFn)}});b.on("uiReady",function(){var d=b.ui.space("toolbox");d&&b.focusManager.add(d,1)});b.addCommand("toolbarFocus",h);b.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");b.ui.add("-",CKEDITOR.UI_SEPARATOR,
{});b.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(b,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(b,c,e){var d=f(this.editor),g=0===c,h={name:b};if(e){if(e=CKEDITOR.tools.search(d,function(a){return a.name==e})){!e.groups&&(e.groups=[]);if(c&&(c=CKEDITOR.tools.indexOf(e.groups,c),0<=c)){e.groups.splice(c+1,0,b);return}g?e.groups.splice(0,0,b):e.groups.push(b);
return}c=null}c&&(c=CKEDITOR.tools.indexOf(d,function(a){return a.name==c}));g?d.splice(0,0,b):"number"==typeof c?d.splice(c+1,0,h):d.push(b)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function e(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 f(a){function b(){var d=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var c=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||z.initPasteDataTransfer(b,a),b.data.preventDefault())};d.on("copy",c);d.on("cut",c);d.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}d.on(z.mainPasteEvent,function(a){"beforepaste"==z.mainPasteEvent&&J||y(a)});"beforepaste"==z.mainPasteEvent&&(d.on("paste",function(a){E||(g(),a.data.preventDefault(),
y(a),h("paste"))}),d.on("contextmenu",f,null,null,0),d.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||f()},null,null,0));d.on("beforecut",function(){!J&&k(a)});var e;d.attachListener(CKEDITOR.env.ie?d:a.document.getDocumentElement(),"mouseup",function(){e=setTimeout(A,0)});a.on("destroy",function(){clearTimeout(e)});d.on("keyup",A)}function d(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==
this.type&&k();var b;var d=this.type;if(CKEDITOR.env.ie)b=h(d);else try{b=a.document.$.execCommand(d,!1,null)}catch(c){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function c(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function d(b,f){f="undefined"!==typeof f?f:!0;b?(b.method="paste",b.dataTransfer||(b.dataTransfer=z.initPasteDataTransfer()),e(a,b,f)):g&&!a._.forcePasteDialog&&a.showNotification(k,"info",a.config.clipboard_notificationDuration);
a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:c,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var c=this,g="undefined"!==typeof b.notification?b.notification:!0,f=b.type,h=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),k="string"===typeof g?g:a.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+h.aria+'"\x3e'+h.display+"\x3c/kbd\x3e"),h="string"===typeof b?b:b.dataValue;f&&!0!==a.config.forcePasteAsPlainText&&
"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=f:delete a._.nextPasteType;"string"===typeof h?d({dataValue:h}):a.getClipboardData(d)}}}function g(){E=1;setTimeout(function(){E=0},100)}function f(){J=1;setTimeout(function(){J=0},10)}function h(b){var d=a.document,c=d.getBody(),e=!1,g=function(){e=!0};c.on(b,g);7<CKEDITOR.env.version?d.$.execCommand(b):d.$.selection.createRange().execCommand(b);c.removeListener(b,g);return e}function k(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=
a.getSelection(),d,c,e;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(d=b.getSelectedElement())&&(c=b.getRanges()[0],e=a.document.createText(""),e.insertBefore(d),c.setStartBefore(e),c.setEndAfter(d),b.selectRanges([c]),setTimeout(function(){d.getParent()&&(e.remove(),b.selectElement(d))},0))}}function m(b,d){var c=a.document,e=a.editable(),g=function(a){a.cancel()},f;if(!c.getById("cke_pastebin")){var h=a.getSelection(),k=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var l=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&
!e.is("body")||CKEDITOR.env.ie?"div":"body",c);l.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var n=0,c=c.getWindow();CKEDITOR.env.webkit?(e.append(l),l.addClass("cke_editable"),e.is("body")||(n="static"!=e.getComputedStyle("position")?e:CKEDITOR.dom.element.get(e.$.offsetParent),n=n.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(l);l.setStyles({position:"absolute",top:c.getScrollPosition().y-n+10+"px",width:"1px",height:Math.max(1,c.getViewPaneSize().height-
20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&l.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(n=l.getParent().isReadOnly())?(l.setOpacity(0),l.setAttribute("contenteditable",!0)):l.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",g,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)f=e.once("blur",g,null,null,-100);n&&l.focus();n=new CKEDITOR.dom.range(l);n.selectNodeContents(l);var r=n.select();CKEDITOR.env.ie&&
(f=e.once("blur",function(){a.lockSelection(r)}));var q=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=q);f&&f.removeListener();CKEDITOR.env.ie&&e.focus();h.selectBookmarks(k);l.remove();var b;CKEDITOR.env.webkit&&(b=l.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&(l=b);a.removeListener("selectionChange",g);d(l.getHtml())},0)}}function l(){if("paste"==z.mainPasteEvent)return a.fire("beforePaste",{type:"auto",
method:"paste"}),!1;a.focus();g();var b=a.focusManager;b.lock();if(a.editable().fire(z.mainPasteEvent)&&!h("paste"))return b.unlock(),!1;b.unlock();return!0}function w(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();g();"paste"==z.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function y(b){var d={type:"auto",method:"paste",
dataTransfer:z.initPasteDataTransfer(b)};d.dataTransfer.cacheData();var c=!1!==a.fire("beforePaste",d);c&&z.canClipboardApiBeTrusted(d.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){e(a,d)},0)):m(b,function(b){d.dataValue=b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");c&&e(a,d)})}function A(){if("wysiwyg"==a.mode){var b=D("paste");a.getCommand("cut").setState(D("cut"));a.getCommand("copy").setState(D("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function D(b){var d=
a.getSelection(),d=d&&d.getRanges()[0];if((a.readOnly||d&&d.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();d=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var z=CKEDITOR.plugins.clipboard,J=0,E=0;(function(){a.on("key",w);a.on("contentDom",b);a.on("selectionChange",A);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:D("cut"),
copy:D("copy"),paste:D("paste")}});var d=null;a.on("menuShow",function(){d&&(d.removeListener(),d=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(d=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(d,
c,e,g,f){var h=a.lang.clipboard[c];a.addCommand(c,e);a.ui.addButton&&a.ui.addButton(d,{label:h,command:c,toolbar:"clipboard,"+g});a.addMenuItems&&a.addMenuItem(c,{label:h,command:c,group:"clipboard",order:f})}b("Cut","cut",d("cut"),10,1);b("Copy","copy",d("copy"),20,4);b("Paste","paste",c(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();
d({type:f,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var g=!1,f="auto";d||(d=b,b=null);a.on("beforePaste",function(a){a.removeListener();g=!0;f=a.data.type},null,null,1E3);a.on("paste",c,null,null,0);!1===l()&&(a.removeListener("paste",c),a._.forcePasteDialog&&g&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",e),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);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 h(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 b(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 l(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 d(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function g(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function d(b,c,g){c.select();e(a,{dataTransfer:g,method:"drop"},1);g.sourceEditor.fire("saveSnapshot");g.sourceEditor.editable().extractHtmlFromRange(b);g.sourceEditor.getSelection().selectRanges([b]);g.sourceEditor.fire("saveSnapshot")}
function c(d,g){d.select();e(a,{dataTransfer:g,method:"drop"},1);b.resetDragDataTransfer()}function g(b,d,c){var e={$:b.data.$,target:b.data.getTarget()};d&&(e.dragRange=d);c&&(e.dropRange=c);!1===a.fire(b.name,e)&&b.data.preventDefault()}function f(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var h=a.editable(),k=CKEDITOR.plugins.clipboard.getDropTarget(a),m=a.ui.space("top"),l=a.ui.space("bottom");b.preventDefaultDropOnElement(m);b.preventDefaultDropOnElement(l);
h.attachListener(k,"dragstart",g);h.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);h.attachListener(a,"dragstart",function(d){b.initDragDataTransfer(d,a)},null,null,2);h.attachListener(a,"dragstart",function(){var d=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=d?f(d.startContainer):null,b.dragEndContainerChildCount=d?f(d.endContainer):null)},null,null,100);h.attachListener(k,"dragend",g);h.attachListener(a,"dragend",
b.initDragDataTransfer,b,null,1);h.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);h.attachListener(k,"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()}});h.attachListener(k,"drop",function(d){if(!d.data.$.defaultPrevented){d.data.preventDefault();var c=d.data.getTarget();
if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=b.getRangeAtDropPosition(d,a),e=b.dragRange;c&&g(d,e,c)}}},null,null,9999);h.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);h.attachListener(a,"drop",function(e){if(e=e.data){var g=e.dropRange,f=e.dragRange,h=e.dataTransfer;h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){b.internalDrop(f,g,h,a)},0):h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(f,g,h):c(g,h)}},null,null,9999)})}
var m;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){var d,e=b(a);a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content");a.pasteFilter=e.get(d);f(a);g(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var k=["image/png","image/jpeg","image/gif"],m;a.on("paste",function(b){var d=b.data,c=d.dataTransfer;
if(!d.dataValue&&"paste"==d.method&&c&&1==c.getFilesCount()&&m!=c.id&&(c=c.getFile(0),-1!=CKEDITOR.tools.indexOf(k,c.type))){var e=new FileReader;e.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';a.fire("paste",b.data)},!1);e.addEventListener("abort",function(){a.fire("paste",b.data)},!1);e.addEventListener("error",function(){a.fire("paste",b.data)},!1);e.readAsDataURL(c);m=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,e,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=e=c;e&&(b=e.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(b){b=b.data;var d=a._.nextPasteType||b.type,g=b.dataValue,
f,k=a.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;f="html"==d||"html"==b.preSniffing?"html":c(g);delete a._.nextPasteType;"htmlifiedtext"==f&&(g=h(a.config,g));if("text"==d&&"html"==f)g=l(a,g,e.get("plain-text"));else if(m&&a.pasteFilter&&!b.dontFilter||n)g=l(a,g,a.pasteFilter);b.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);b.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==
d&&(d="html"==f||"html"==k?"html":"text");b.type=d;b.dataValue=g;delete b.preSniffing;delete b.startsWithEOL;delete b.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,
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.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 e(a,d,c){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.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 g=b.startContainer;"number"==typeof c&&"number"==typeof d&&g.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,g,d)||e(a.endContainer,g,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(a,b,d,c){var g=CKEDITOR.plugins.clipboard,f=c.editable(),h,k;c.fire("saveSnapshot");c.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,g.dragStartContainerChildCount,g.dragEndContainerChildCount);(k=this.isDropRangeAffectedByDragRange(a,b))||(h=a.createBookmark(!1));g=b.clone().createBookmark(!1);k&&(h=a.createBookmark(!1));a=h.startNode;b=
h.endNode;k=g.startNode;b&&a.getPosition(k)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(k)&CKEDITOR.POSITION_FOLLOWING&&k.insertBefore(a);a=c.createRange();a.moveToBookmark(h);f.extractHtmlFromRange(a,1);b=c.createRange();g.startNode.getCommonAncestor(f)||(g=c.getSelection().createBookmarks()[0]);b.moveToBookmark(g);e(c,{dataTransfer:d,method:"drop",range:b},1);c.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,c=d.clientX,e=d.clientY,g=b.getSelection(!0).getRanges()[0],
f=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(c,e))d=b.document.$.caretRangeFromPoint(c,e),f.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset),f.collapse(!0);else if(d.rangeParent)f.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&g&&b.editable().hasFocus)return g;if(document.body.createTextRange){b.focus();d=b.document.getBody().$.createTextRange();
try{for(var h=!1,k=0;20>k&&!h;k++){if(!h)try{d.moveToPoint(c,e-k),h=!0}catch(m){}if(!h)try{d.moveToPoint(c,e+k),h=!0}catch(l){}}if(h){var y="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+y+'"\x3e​\x3c/span\x3e');var A=b.document.getById(y);f.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START);A.remove()}else{var D=b.document.$.elementFromPoint(c,e),z=new CKEDITOR.dom.element(D),J;if(z.equals(b.editable())||"html"==z.getName())return g&&g.startContainer&&!g.startContainer.equals(b.editable())?
g:null;J=z.getClientRect();c<J.left?f.setStartAt(z,CKEDITOR.POSITION_AFTER_START):f.setStartAt(z,CKEDITOR.POSITION_BEFORE_END);f.collapse(!0)}}catch(E){return null}}else return null}return f},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",d)}};m=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(m);this.id||(this.id="Text"==m?"":"cke-"+
CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==m||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 e=d.indexOf("\x3c/html\x3e"),d=-1!==e?d.substring(0,e+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"==m&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(d){}},storeId:function(){"Text"!==m&&this.setData(m,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(a){a=
b._.normalizeType(a);var d=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a,!0),d=b._stripHtml(d));d&&(b._.data[a]=d)}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.objectKeys(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"!=m&&(a[m]=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,e=this._dataTransfer.$;try{e.setData(a,c),d&&(this._dataTransfer._.nativeHtmlCache=c)}catch(g){if(this._isUnsupportedMimeTypeError(g)){d=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(d._customTypes,a)&&d._customTypes.push(a);var d=this._getFallbackTypeContent(),
f=this._getFallbackTypeData();f[a]=c;try{c=this._applyDataComment(d,f),e.setData(this._customDataFallbackType,c),this._dataTransfer._.nativeHtmlCache=c}catch(h){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.objectKeys(b).length&&(d="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return d+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,function(){CKEDITOR.plugins.add("panel",{beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});
CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(c,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=c;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(c){return new CKEDITOR.ui.panel(c)}};var e=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),
f=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(h,
b){var l={editorId:h.id,id:this.id,langCode:h.langCode,dir:h.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":h.config.baseFloatZIndex+1};this.getHolderElement=function(){var b=this._.holder;if(!b){if(this.isFramed){var b=this.document.getById(this.id+"_frame"),e=b.getParent(),b=b.getFrameDocument();CKEDITOR.env.iOS&&e.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});e=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},
this));b.write(c.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+e+");"},l)));b.getWindow().$.CKEDITOR=CKEDITOR;b.on("keydown",function(b){var a=b.data.getKeystroke(),d=this.document.getById(this.id).getAttribute("dir");if("input"!==b.data.getTarget().getName()||37!==a&&39!==a)this._.onKeyDown&&!1===this._.onKeyDown(a)?"input"===b.data.getTarget().getName()&&32===a||b.data.preventDefault():(27==a||a==("rtl"==d?39:37))&&
this.onEscape&&!1===this.onEscape(a)&&b.data.preventDefault()},this);b=b.getBody();b.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(e)}else b=this.document.getById(this.id);this._.holder=b}return b};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();")+"}())":"";l.frame=f.output({id:this.id+"_frame",src:k})}k=e.output(l);b&&
b.push(k);return k},addBlock:function(c,b){b=this._.blocks[c]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),b);this._.currentBlock||this.showBlock(c);return b},getBlock:function(c){return this._.blocks[c]},showBlock:function(c){c=this._.blocks[c];var b=this._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=c;CKEDITOR.fire("ariaWidget",e);c._.focusIndex=-1;this._.onKeyDown=
c.onKeyDown&&CKEDITOR.tools.bind(c.onKeyDown,c);c.show();return c},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(c,b){this.element=c.append(c.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||
this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(c){-1!=c&&(c=this._.getItems().getItem(this._.focusIndex=c),CKEDITOR.env.webkit&&c.getDocument().getWindow().focus(),c.focus(),this.onMark&&this.onMark(c))},markFirstDisplayed:function(c){for(var b=function(b){return b.type==CKEDITOR.NODE_ELEMENT&&"none"==b.getStyle("display")},e=this._.getItems(),f,d,g=e.count()-1;0<=g;g--)if(f=e.getItem(g),f.getAscendant(b)||(d=f,this._.focusIndex=
g),"true"==f.getAttribute("aria-selected")){d=f;this._.focusIndex=g;break}d&&(c&&c(),CKEDITOR.env.webkit&&d.getDocument().getWindow().focus(),d.focus(),this.onMark&&this.onMark(d))},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(c,b){var e=this.keys[c];switch(e){case "next":for(var f=this._.focusIndex,e=this._.getItems(),
d;d=e.getItem(++f);)if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=f;d.focus(!0);break}return d||b?!1:(this._.focusIndex=-1,this.onKeyDown(c,1));case "prev":f=this._.focusIndex;for(e=this._.getItems();0<f&&(d=e.getItem(--f));){if(d.getAttribute("_cke_focus")&&d.$.offsetWidth){this._.focusIndex=f;d.focus(!0);break}d=null}return d||b?!1:(this._.focusIndex=e.count(),this.onKeyDown(c,1));case "click":case "mouseup":return f=this._.focusIndex,(d=0<=f&&this._.getItems().getItem(f))&&
(d.$[e]?d.$[e]():d.$["on"+e]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function e(c,e,b,l,k){k=CKEDITOR.tools.genKey(e.getUniqueId(),b.getUniqueId(),c.lang.dir,c.uiColor||"",l.css||"",k||"");var d=f[k];d||(d=f[k]=new CKEDITOR.ui.panel(e,l),d.element=b.append(CKEDITOR.dom.element.createFromHtml(d.render(c),e)),d.element.setStyles({display:"none",position:"absolute"}));return d}var f={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(c,f,b,
l){function k(){a.hide()}b.forceIFrame=1;b.toolbarRelated&&c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(f=CKEDITOR.document.getById("cke_"+c.name));var d=f.getDocument();l=e(c,d,f,b,l||0);var g=l.element,m=g.getFirst(),a=this;g.disableContextMenu();this.element=g;this._={editor:c,panel:l,parentElement:f,definition:b,document:d,iframe:m,children:[],dir:c.lang.dir,showBlockParams:null,markFirst:void 0!==b.markFirst?b.markFirst:!0};c.on("mode",k);c.on("resize",k);d.getWindow().on("resize",function(){this.reposition()},
this)},proto:{addBlock:function(c,e){return this._.panel.addBlock(c,e)},addListBlock:function(c,e){return this._.panel.addListBlock(c,e)},getBlock:function(c){return this._.panel.getBlock(c)},showBlock:function(c,e,b,f,k,d){var g=this._.panel,m=g.showBlock(c);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,a=this._.iframe,
a=CKEDITOR.env.ie&&!CKEDITOR.env.edge?a:new CKEDITOR.dom.window(a.$.contentWindow),x=n.getDocument(),u=this._.parentElement.getPositionedAncestor(),t=e.getDocumentPosition(x),x=u?u.getDocumentPosition(x):{x:0,y:0},p="rtl"==this._.dir,r=t.x+(f||0)-x.x,v=t.y+(k||0)-x.y;!p||1!=b&&4!=b?p||2!=b&&3!=b||(r+=e.$.offsetWidth-1):r+=e.$.offsetWidth;if(3==b||4==b)v+=e.$.offsetHeight-1;this._.panel._.offsetParentId=e.getId();n.setStyles({top:v+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");
this._.editor.focusManager.add(a);this._.blurSet||(CKEDITOR.event.useCapture=!0,a.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),a.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},
this),a.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);g.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(m.autoSize){var b=m.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?m.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=m.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");g._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");p&&(r-=n.$.offsetWidth);n.setStyle("left",r+"px");var b=g.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),c=a.width||a.right-a.left,e=a.height||a.bottom-a.top,f=p?a.right:
b.width-a.left,h=p?b.width-a.right:a.left;p?f<c&&(r=h>c?r+c:b.width>c?r-a.left:r-a.right+b.width):f<c&&(r=h>c?r-c:b.width>c?r-a.right+b.width:r-a.left);c=a.top;b.height-a.top<e&&(v=c>e?v-e:b.height>e?v-a.bottom+b.height:v-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&(b=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==b.getName()&&(b=b.getDocument().getBody()),"rtl"==b.getComputedStyle("direction")&&(r=CKEDITOR.env.ie8Compat?r-2*n.getDocument().getDocumentElement().$.scrollLeft:r-(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:v+"px",left:r+"px"});n.setOpacity(1);d&&d()},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();m.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?
CKEDITOR.tools.setTimeout(function(){m.markFirstDisplayed?m.markFirstDisplayed():m._.markFirstDisplayed()},0):m.markFirstDisplayed?m.markFirstDisplayed():m._.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 c=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,c))},focus:function(){if(CKEDITOR.env.webkit){var c=CKEDITOR.document.getActive();
c&&!c.equals(this._.iframe)&&c.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var c=this._.iframe.getFrameDocument().getActive();c&&c.is("a")&&(this._.lastFocused=c)},hide:function(c){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(c=c&&this._.returnFocus)CKEDITOR.env.webkit&&c.type&&c.getWindow().$.focus(),c.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(c){var e=this._.panel;void 0!==c&&(e.allowBlur=c);return e.allowBlur},showAsChild:function(c,e,b,f,k,d){if(this._.activeChild!=c||c._.panel._.offsetParentId!=b.getId())this.hideChild(),c.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},
this),this._.activeChild=c,this._.focused=!1,c.showBlock(e,b,f,k,d),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){c.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(c){var e=this._.activeChild;e&&(delete e.onHide,delete this._.activeChild,e.hide(),c&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var c=CKEDITOR.tools.isEmpty(CKEDITOR.instances),e;for(e in f){var b=f[e];c?b.destroy():b.element.hide()}c&&(f={})})}(),CKEDITOR.plugins.add("menu",
{requires:"floatpanel",beforeInit:function(e){for(var f=e.config.menu_groups.split(","),c=e._.menuGroups={},h=e._.menuItems={},b=0;b<f.length;b++)c[f[b]]=b+1;e.addMenuGroup=function(b,e){c[b]=e||100};e.addMenuItem=function(b,e){c[e.group]&&(h[b]=new CKEDITOR.menuItem(this,b,e))};e.addMenuItems=function(b){for(var c in b)this.addMenuItem(c,b[c])};e.getMenuItem=function(b){return h[b]};e.removeMenuItem=function(b){delete h[b]}}}),function(){function e(b){b.sort(function(b,d){return b.group<d.group?
-1:b.group>d.group?1:b.order<d.order?-1:b.order>d.order?1:0})}var f='\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"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&
(f+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var f=f+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),c=CKEDITOR.addTemplate("menuItem",f+'\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'),
h=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),b=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(b,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=b;this.items=[];this._.listeners=[];this._.level=c.level||1;var d=CKEDITOR.tools.extend({},c.panel,{css:[CKEDITOR.skin.getPath("editor")],
level:this._.level-1,block:{}}),e=d.block.attributes=d.attributes||{};!e.role&&(e.role="menu");this._.panelDefinition=d},_:{onShow:function(){var b=this.editor.getSelection(),c=b&&b.getStartElement(),d=this.editor.elementPath(),e=this._.listeners;this.removeAll();for(var f=0;f<e.length;f++){var a=e[f](c,b,d);if(a)for(var h in a){var x=this.editor.getMenuItem(h);!x||x.command&&!this.editor.getCommand(x.command).state||(x.state=a[h],this.add(x))}}},onClick:function(b){this.hide();if(b.onClick)b.onClick();
else b.command&&this.editor.execCommand(b.command)},onEscape:function(b){var c=this.parent;c?c._.panel.hideChild(1):27==b&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(b){var c=this._.subMenu,d=this.items[b];if(d=d.getItems&&d.getItems()){c?c.removeAll():(c=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),c.parent=this,c._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var e in d){var f=
this.editor.getMenuItem(e);f&&(f.state=d[e],c.add(f))}var a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(b));setTimeout(function(){c.show(a,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(b){b.order||(b.order=this.items.length);this.items.push(b)},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,a=this.editor,h=this._.panel,x=this._.element;
if(!h){h=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);h.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);h.onShow=function(){h._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};h.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);x=h.addBlock(this.id,this._.panelDefinition.block);x.autoSize=!0;var u=x.keys;u[40]="next";u[9]="next";u[38]=
"prev";u[CKEDITOR.SHIFT+9]="prev";u["rtl"==a.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";u[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(u[13]="mouseup");x=this._.element=x.element;u=x.getDocument();u.getBody().setStyle("overflow","hidden");u.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(b){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,a.config.menu_subMenuDelay||
400,this,[b])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}e(f);for(var u=a.elementPath(),u=['\x3cdiv class\x3d"cke_menu'+(u&&u.direction()!=a.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],t=f.length,p=t&&f[0].group,
r=0;r<t;r++){var v=f[r];p!=v.group&&(u.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),p=v.group);v.render(this,r,u)}u.push("\x3c/div\x3e");x.setHtml(u.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,b,c,d,g):h.showBlock(this.id,b,c,d,g);a.fire("menuShow",[h])},addListener:function(b){this._.listeners.push(b)},hide:function(b){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(b)},findItemByCommandName:function(b){var c=
CKEDITOR.tools.array.filter(this.items,function(d){return b===d.command});return c.length?(c=c[0],{item:c,element:this._.element.findOne("."+c.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(b,c,d){CKEDITOR.tools.extend(this,d,{order:0,className:"cke_menubutton__"+c});this.group=b._.menuGroups[this.group];this.editor=b;this.name=c},proto:{render:function(e,f,d){var g=e.id+String(f),m="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,a="",n=this.editor,
x,u,t=m==CKEDITOR.TRISTATE_ON?"on":m==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(a=' aria-checked\x3d"'+(m==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var p=this.getItems,r="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",v=this.name;this.icon&&!/\./.test(this.icon)&&(v=this.icon);this.command&&(x=n.getCommand(this.command),(x=n.getCommandKeystroke(x))&&(u=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,x)));e={id:g,name:this.name,
iconName:v,label:this.label,cls:this.className||"",state:t,hasPopup:p?"true":"false",disabled:m==CKEDITOR.TRISTATE_DISABLED,title:this.label+(u?" ("+u.display+")":""),ariaShortcut:u?n.lang.common.keyboardShortcut+" "+u.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:e._.itemOverFn,moveOutFn:e._.itemOutFn,clickFn:e._.itemClickFn,index:f,iconStyle:CKEDITOR.skin.getIconStyle(v,"rtl"==this.editor.lang.dir,v==this.icon?null:this.icon,this.iconOffset),shortcutHtml:u?b.output({shortcut:u.display}):
"",arrowHtml:p?h.output({label:r}):"",role:this.role?this.role:"menuitem",ariaChecked:a};c.output(e,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(e){this.base.call(this,e,{panel:{css:e.config.contextmenu_contentsCss,
className:"cke_menu_panel",attributes:{"aria-label":e.lang.contextmenu.options}}})},proto:{addTarget:function(e,f){function c(){b=!1}var h,b;e.on("contextmenu",function(c){c=c.data;var d=CKEDITOR.env.webkit?h:CKEDITOR.env.mac?c.$.metaKey:c.$.ctrlKey;if(!f||!d)if(c.preventDefault(),!b){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var d=this.editor,e=(new CKEDITOR.dom.elementPath(c.getTarget(),d.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);e&&"false"==e.getAttribute("contenteditable")&&
d.getSelection().fake(e)}var e=c.getTarget().getDocument(),m=c.getTarget().getDocument().getDocumentElement(),d=!e.equals(CKEDITOR.document),e=e.getWindow().getScrollPosition(),a=d?c.$.clientX:c.$.pageX||e.x+c.$.clientX,l=d?c.$.clientY:c.$.pageY||e.y+c.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(m,null,a,l)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var l=function(){h=0};e.on("keydown",function(b){h=CKEDITOR.env.mac?b.data.$.metaKey:b.data.$.ctrlKey});e.on("keyup",l);
e.on("contextmenu",l)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(e.on("keydown",function(c){c.data.$.shiftKey&&121===c.data.$.keyCode&&(b=!0)},null,null,0),e.on("keyup",c),e.on("contextmenu",c))},open:function(e,f,c,h){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),e=e||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(e,f,c,h))}}})},beforeInit:function(e){var f=e.contextMenu=new CKEDITOR.plugins.contextMenu(e);
e.on("contentDom",function(){f.addTarget(e.editable(),!1!==e.config.browserContextMenuOnCtrl)});e.addCommand("contextMenu",{exec:function(c){var e=0,b=0,f=c.getSelection().getRanges(),f=f[f.length-1].getClientRects(c.editable().isInline());if(f=f[f.length-1])e=f["rtl"===c.lang.dir?"left":"right"],b=f.bottom;c.contextMenu.open(c.document.getBody().getParent(),null,e,b)}});e.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");e.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function e(b,
c){function e(d){d=a.list[d];var c;d.equals(b.editable())||"true"==d.getAttribute("contenteditable")?(c=b.createRange(),c.selectNodeContents(d),c=c.select()):(c=b.getSelection(),c.selectElement(d));CKEDITOR.env.ie&&b.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(d)});b.focus()}function d(){m&&m.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete a.list}var g=b.ui.spaceId("path"),m,a=b._.elementsPath,n=a.idBase;c.html+='\x3cspan id\x3d"'+g+'_label" class\x3d"cke_voice_label"\x3e'+
b.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+g+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+g+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';b.on("uiReady",function(){var a=b.ui.space("path");a&&b.focusManager.add(a,1)});a.onClick=e;var x=CKEDITOR.tools.addFunction(e),u=CKEDITOR.tools.addFunction(function(d,c){var g=a.idBase,f;c=new CKEDITOR.dom.event(c);f="rtl"==b.lang.dir;switch(c.getKeystroke()){case f?39:37:case 9:return(f=
CKEDITOR.document.getById(g+(d+1)))||(f=CKEDITOR.document.getById(g+"0")),f.focus(),!1;case f?37:39:case CKEDITOR.SHIFT+9:return(f=CKEDITOR.document.getById(g+(d-1)))||(f=CKEDITOR.document.getById(g+(a.list.length-1))),f.focus(),!1;case 27:return b.focus(),!1;case 13:case 32:return e(d),!1}return!0});b.on("selectionChange",function(d){for(var c=[],e=a.list=[],f=[],k=a.filters,l=!0,w=d.data.path.elements,y=w.length;y--;){var A=w[y],D=0;d=A.data("cke-display-name")?A.data("cke-display-name"):A.data("cke-real-element-type")?
A.data("cke-real-element-type"):A.getName();(l=A.hasAttribute("contenteditable")?"true"==A.getAttribute("contenteditable"):l)||A.hasAttribute("contenteditable")||(D=1);for(var z=0;z<k.length;z++){var J=k[z](A,d);if(!1===J){D=1;break}d=J||d}D||(e.unshift(A),f.unshift(d))}e=e.length;for(k=0;k<e;k++)d=f[k],l=b.lang.elementspath.eleTitle.replace(/%1/,d),d=h.output({id:n+k,label:l,text:d,jsTitle:"javascript:void('"+d+"')",index:k,keyDownFn:u,clickFn:x}),c.unshift(d);m||(m=CKEDITOR.document.getById(g));
f=m;f.setHtml(c.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');b.fire("elementsPathUpdate",{space:f})});b.on("readOnly",d);b.on("contentDomUnload",d);b.addCommand("elementsPathFocus",f.toolbarFocus);b.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var f={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(b){(b=CKEDITOR.document.getById(b._.elementsPath.idBase+"0"))&&b.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 h=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&&e(b,c.data)})}})}(),function(){function e(b,a,c){c=b.config.forceEnterMode||c;if("wysiwyg"==b.mode){a||(a=b.activeEnterMode);var e=b.elementPath();e&&!e.isContextFor("p")&&(a=CKEDITOR.ENTER_BR,c=1);b.fire("saveSnapshot");a==CKEDITOR.ENTER_BR?k(b,a,null,c):d(b,a,null,c);b.fire("saveSnapshot")}}function f(b){b=
b.getSelection().getRanges(!0);for(var a=b.length-1;0<a;a--)b[a].deleteContents();return b[0]}function c(b){var a=b.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(b.root.equals(a))return b;a=new CKEDITOR.dom.range(a);a.moveToRange(b);return a}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){e(a)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,
exec:function(a){e(a,a.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var h=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(),l,k,d,g;CKEDITOR.plugins.enterkey={enterBlock:function(d,a,e,l){function u(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],v.lastElement.getName())||1!==v.lastElement.getChildCount())return!1;a=v.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?
!1:!0}if(e=e||f(d)){e=c(e);var t=e.document,p=e.checkStartOfBlock(),r=e.checkEndOfBlock(),v=d.elementPath(e.startContainer),q=v.block,B=a==CKEDITOR.ENTER_DIV?"div":"p",w;if(q&&p&&r){p=q.getParent();if(p.is("li")&&1<p.getChildCount()){t=new CKEDITOR.dom.element("li");w=d.createRange();t.insertAfter(p);q.remove();w.setStart(t,0);d.getSelection().selectRanges([w]);return}if(q.is("li")||q.getParent().is("li")){q.is("li")||(q=q.getParent(),p=q.getParent());w=p.getParent();e=!q.hasPrevious();var y=!q.hasNext();
l=d.getSelection();var B=l.createBookmarks(),A=q.getDirection(1),r=q.getAttribute("class"),D=q.getAttribute("style"),z=w.getDirection(1)!=A;d=d.enterMode!=CKEDITOR.ENTER_BR||z||D||r;if(w.is("li"))e||y?(e&&y&&p.remove(),q[y?"insertAfter":"insertBefore"](w)):q.breakParent(w);else{if(d)if(v.block.is("li")?(w=t.createElement(a==CKEDITOR.ENTER_P?"p":"div"),z&&w.setAttribute("dir",A),D&&w.setAttribute("style",D),r&&w.setAttribute("class",r),q.moveChildren(w)):w=v.block,e||y)w[e?"insertBefore":"insertAfter"](p);
else q.breakParent(p),w.insertAfter(p);else if(q.appendBogus(!0),e||y)for(;t=q[e?"getFirst":"getLast"]();)t[e?"insertBefore":"insertAfter"](p);else for(q.breakParent(p);t=q.getLast();)t.insertAfter(p);q.remove()}l.selectBookmarks(B);return}if(q&&q.getParent().is("blockquote")){q.breakParent(q.getParent());q.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||q.getPrevious().remove();q.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||q.getNext().remove();e.moveToElementEditStart(q);e.select();
return}}else if(q&&q.is("pre")&&!r){k(d,a,e,l);return}if(D=e.splitBlock(B)){d=D.previousBlock;q=D.nextBlock;p=D.wasStartOfBlock;r=D.wasEndOfBlock;q?(y=q.getParent(),y.is("li")&&(q.breakParent(y),q.move(q.getNext(),1))):d&&(y=d.getParent())&&y.is("li")&&(d.breakParent(y),y=d.getNext(),e.moveToElementEditStart(y),d.move(d.getPrevious()));if(p||r)if(u(a))e.moveToElementEditStart(e.getTouchedStartNode());else{if(d){if(d.is("li")||!g.test(d.getName())&&!d.is("pre"))w=d.clone()}else q&&(w=q.clone());w?
l&&!w.is("li")&&w.renameNode(B):y&&y.is("li")?w=y:(w=t.createElement(B),d&&(A=d.getDirection())&&w.setAttribute("dir",A));if(t=D.elementPath)for(a=0,l=t.elements.length;a<l;a++){B=t.elements[a];if(B.equals(t.block)||B.equals(t.blockLimit))break;CKEDITOR.dtd.$removeEmpty[B.getName()]&&(B=B.clone(),w.moveChildren(B),w.append(B))}w.appendBogus();w.getParent()||e.insertNode(w);w.is("li")&&w.removeAttribute("value");!CKEDITOR.env.ie||!p||r&&d.getChildCount()||(e.moveToElementEditStart(r?d:w),e.select());
e.moveToElementEditStart(p&&!r?q:w)}else q.is("li")&&(w=e.clone(),w.selectNodeContents(q),w=new CKEDITOR.dom.walker(w),w.evaluator=function(a){return!(b(a)||h(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(y=w.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?t.createElement("br"):t.createText(" ")).insertBefore(y)),q&&e.moveToElementEditStart(q);e.select();e.scrollIntoView()}}},enterBr:function(b,a,
c,e){if(c=c||f(b)){var h=c.document,k=c.checkEndOfBlock(),l=new CKEDITOR.dom.elementPath(b.getSelection().getStartElement()),r=l.block,v=r&&l.block.getName();e||"li"!=v?(!e&&k&&g.test(v)?(k=r.getDirection())?(h=h.createElement("div"),h.setAttribute("dir",k),h.insertAfter(r),c.setStart(h,0)):(h.createElement("br").insertAfter(r),CKEDITOR.env.gecko&&h.createText("").insertAfter(r),c.setStartAt(r.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(b="pre"==v&&CKEDITOR.env.ie&&
8>CKEDITOR.env.version?h.createText("\r"):h.createElement("br"),c.deleteContents(),c.insertNode(b),CKEDITOR.env.needsBrFiller?(h.createText("﻿").insertAfter(b),k&&(r||l.blockLimit).appendBogus(),b.getNext().$.nodeValue="",c.setStartAt(b.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(b,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):d(b,a,c,e)}}};l=CKEDITOR.plugins.enterkey;k=l.enterBr;d=l.enterBlock;g=/^h[1-6]$/}(),function(){function e(e,c){var h={},b=[],l={nbsp:" ",
shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};e=e.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(d,a){var e=c?"\x26"+a+";":l[a];h[e]=c?l[a]:"\x26"+a+";";b.push(e);return""});e=e.replace(/,$/,"");if(!c&&e){e=e.split(",");var k=document.createElement("div"),d;k.innerHTML="\x26"+e.join(";\x26")+";";d=k.innerHTML;k=null;for(k=0;k<d.length;k++){var g=d.charAt(k);h[g]="\x26"+e[k]+";";b.push(g)}}h.regex=b.join(c?"|":"");return h}CKEDITOR.plugins.add("entities",{afterInit:function(f){function c(a){return g[a]}
function h(a){return"force"!=b.entities_processNumerical&&k[a]?k[a]:"\x26#"+a.charCodeAt(0)+";"}var b=f.config;if(f=(f=f.dataProcessor)&&f.htmlFilter){var l=[];!1!==b.basicEntities&&l.push("nbsp,gt,lt,amp");b.entities&&(l.length&&l.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"),
b.entities_latin&&l.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"),b.entities_greek&&l.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"),
b.entities_additional&&l.push(b.entities_additional));var k=e(l.join(",")),d=k.regex?"["+k.regex+"]":"a^";delete k.regex;b.entities&&b.entities_processNumerical&&(d="[^ -~]|"+d);var d=new RegExp(d,"g"),g=e("nbsp,gt,lt,amp,shy",!0),m=new RegExp(g.regex,"g");f.addRules({text:function(a){return a.replace(m,c).replace(d,h)}},{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(e,f,c,h){f=f||"80%";c=c||"70%";"string"==typeof f&&1<f.length&&"%"==f.substr(f.length-1,1)&&(f=parseInt(window.screen.width*parseInt(f,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>f&&(f=640);420>c&&(c=420);var b=parseInt((window.screen.height-c)/2,10),l=parseInt((window.screen.width-
f)/2,10);h=(h||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+f+",height\x3d"+c+",top\x3d"+b+",left\x3d"+l;var k=window.open("",null,h,!0);if(!k)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(k.moveTo(l,b),k.resizeTo(f,c)),k.focus(),k.location.href=e}catch(d){window.open(e,null,h,!0)}return!0}}),"use strict",function(){function e(b){this.editor=b;this.loaders=
[]}function f(b,e,f){var d=b.config.fileTools_defaultFileName;this.editor=b;this.lang=b.lang;"string"===typeof e?(this.data=e,this.file=c(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=e,this.total=this.file.size,this.loaded=0);f?this.fileName=f:this.file.name?this.fileName=this.file.name:(b=this.file.type.split("/"),d&&(b[0]=d),this.fileName=b.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}
function c(b){var c=b.match(h)[1];b=b.replace(h,"");b=atob(b);var e=[],d,g,f,a;for(d=0;d<b.length;d+=512){g=b.slice(d,d+512);f=Array(g.length);for(a=0;a<g.length;a++)f[a]=g.charCodeAt(a);g=new Uint8Array(f);e.push(g)}return new Blob(e,{type:c})}CKEDITOR.plugins.add("filetools",{beforeInit:function(b){b.uploadRepository=new e(b);b.on("fileUploadRequest",function(b){var c=b.data.fileLoader;c.xhr.open("POST",c.uploadUrl,!0);b.data.requestData.upload={file:c.file,name:c.fileName}},null,null,5);b.on("fileUploadRequest",
function(c){var e=c.data.fileLoader,d=new FormData;c=c.data.requestData;var g=b.config.fileTools_requestHeaders,f,a;for(a in c){var h=c[a];"object"===typeof h&&h.file?d.append(a,h.file,h.name):d.append(a,h)}d.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(g)for(f in g)e.xhr.setRequestHeader(f,g[f]);e.xhr.send(d)},null,null,999);b.on("fileUploadResponse",function(b){var c=b.data.fileLoader,d=c.xhr,e=b.data;try{var f=JSON.parse(d.responseText);f.error&&f.error.message&&(e.message=f.error.message);
if(f.uploaded)for(var a in f)e[a]=f[a];else b.cancel()}catch(h){e.message=c.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:d.responseText}),b.cancel()}},null,null,999)}});e.prototype={create:function(b,c,e){e=e||f;var d=this.loaders.length;b=new e(this.editor,b,c);b.id=d;this.loaders[d]=b;this.fire("instanceCreated",b);return b},isFinished:function(){for(var b=0;b<this.loaders.length;++b)if(!this.loaders[b].isFinished())return!1;return!0}};f.prototype={loadAndUpload:function(b,
c){var e=this;this.once("loaded",function(d){d.cancel();e.once("update",function(b){b.cancel()},null,null,0);e.upload(b,c)},null,null,0);this.load()},load:function(){var b=this,c=this.reader=new FileReader;b.changeStatus("loading");this.abort=function(){b.reader.abort()};c.onabort=function(){b.changeStatus("abort")};c.onerror=function(){b.message=b.lang.filetools.loadError;b.changeStatus("error")};c.onprogress=function(c){b.loaded=c.loaded;b.update()};c.onload=function(){b.loaded=b.total;b.data=c.result;
b.changeStatus("loaded")};c.readAsDataURL(this.file)},upload:function(b,c){var e=c||{};b?(this.uploadUrl=b,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:e})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function b(){"error"!=e.status&&(e.message=e.lang.filetools.networkError,e.changeStatus("error"))}function c(){"abort"!=e.status&&
e.changeStatus("abort")}var e=this,d=this.xhr;e.abort=function(){d.abort();c()};d.onerror=b;d.onabort=c;d.upload?(d.upload.onprogress=function(b){b.lengthComputable&&(e.uploadTotal||(e.uploadTotal=b.total),e.uploaded=b.loaded,e.update())},d.upload.onerror=b,d.upload.onabort=c):(e.uploadTotal=e.total,e.update());d.onload=function(){e.update();if("abort"!=e.status)if(e.uploaded=e.uploadTotal,200>d.status||299<d.status)e.message=e.lang.filetools["httpError"+d.status],e.message||(e.message=e.lang.filetools.httpError.replace("%1",
d.status)),e.changeStatus("error");else{for(var b={fileLoader:e},c=["message","fileName","url"],a=e.editor.fire("fileUploadResponse",b),f=0;f<c.length;f++){var h=c[f];"string"===typeof b[h]&&(e[h]=b[h])}e.responseData=b;delete e.responseData.fileLoader;!1===a?e.changeStatus("error"):e.changeStatus("uploaded")}}},changeStatus:function(b){this.status=b;if("error"==b||"abort"==b||"loaded"==b||"uploaded"==b)this.abort=function(){};this.fire(b);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};
CKEDITOR.event.implementOn(e.prototype);CKEDITOR.event.implementOn(f.prototype);var h=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:e,fileLoader:f,getUploadUrl:function(b,c){var e=CKEDITOR.tools.capitalize;return c&&b[c+"UploadUrl"]?b[c+"UploadUrl"]:b.uploadUrl?b.uploadUrl:c&&b["filebrowser"+e(c,1)+"UploadUrl"]?b["filebrowser"+e(c,1)+"UploadUrl"]+"\x26responseType\x3djson":b.filebrowserUploadUrl?b.filebrowserUploadUrl+
"\x26responseType\x3djson":null},isTypeSupported:function(b,c){return!!b.type.match(c)},isFileUploadSupported:"function"===typeof FileReader&&"function"===typeof(new FileReader).readAsDataURL&&"function"===typeof FormData&&"function"===typeof(new FormData).append&&"function"===typeof XMLHttpRequest&&"function"===typeof Blob})}(),function(){function e(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 f(a){return!a.match(/command=QuickUpload/)||
a.match(/(\?|&)responseType=json/)?a:e(a,{responseType:"json"})}function c(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function h(){var a=this.getDialog(),b=a.getParentEditor();b._.filebrowserSe=this;var d=b.config["filebrowser"+c(a.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",a=b.config["filebrowser"+c(a.getName())+"WindowHeight"]||b.config.filebrowserWindowHeight||"70%",g=this.filebrowser.params||{};g.CKEditor=b.name;g.CKEditorFuncNum=b._.filebrowserFn;g.langCode||
(g.langCode=b.langCode);g=e(this.filebrowser.url,g);b.popup(g,d,a,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function b(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 l(){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(a,b,d){var c=d.params||{};c.CKEditor=a.name;c.CKEditorFuncNum=a._.filebrowserFn;c.langCode||(c.langCode=a.langCode);b.action=e(d.url,c);b.filebrowser=d}function d(e,m,u,t){if(t&&t.length)for(var p,r=t.length;r--;)if(p=t[r],"hbox"!=p.type&&"vbox"!=p.type&&"fieldset"!=p.type||d(e,m,u,p.children),p.filebrowser)if("string"==typeof p.filebrowser&&(p.filebrowser={action:"fileButton"==
p.type?"QuickUpload":"Browse",target:p.filebrowser}),"Browse"==p.filebrowser.action){var v=p.filebrowser.url;void 0===v&&(v=e.config["filebrowser"+c(m)+"BrowseUrl"],void 0===v&&(v=e.config.filebrowserBrowseUrl));v&&(p.onClick=h,p.filebrowser.url=v,p.hidden=!1)}else if("QuickUpload"==p.filebrowser.action&&p["for"]&&(v=p.filebrowser.url,void 0===v&&(v=e.config["filebrowser"+c(m)+"UploadUrl"],void 0===v&&(v=e.config.filebrowserUploadUrl)),v)){var q=p.onClick;p.onClick=function(d){var c=d.sender,h=c.getDialog().getContentElement(this["for"][0],
this["for"][1]).getInputElement(),k=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(q&&!1===q.call(c,d))return!1;if(l.call(c,d)){if("form"!==e.config.filebrowserUploadMethod&&k)return d=e.uploadRepository.create(h.$.files[0]),d.on("uploaded",function(b){var d=b.sender.responseData;a.call(b.sender.editor,d.url,d.message)}),d.on("error",g.bind(this)),d.on("abort",g.bind(this)),d.loadAndUpload(f(v)),"xhr";b(h);return!0}return!1};p.filebrowser.url=v;p.hidden=!1;k(e,u.getContents(p["for"][0]).get(p["for"][1]),
p.filebrowser)}}function g(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 m(a,b,d){if(-1!==d.indexOf(";")){d=d.split(";");for(var c=0;c<d.length;c++)if(m(a,b,d[c]))return!0;return!1}return(a=a.getContents(b).get(d).filebrowser)&&a.url}function a(a,b){var d=this._.filebrowserSe.getDialog(),c=this._.filebrowserSe["for"],e=this._.filebrowserSe.filebrowser.onSelect;c&&d.getContentElement(c[0],c[1]).reset();if("function"!=
typeof b||!1!==b.call(this._.filebrowserSe))if(!e||!1!==e.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(":"),e=d.getContentElement(c[0],c[1]))e.setValue(a),d.selectPage(c[0])}CKEDITOR.plugins.add("filebrowser",{requires:"popup,filetools",init:function(b){b._.filebrowserFn=CKEDITOR.tools.addFunction(a,b);b.on("destroy",function(){CKEDITOR.tools.removeFunction(this._.filebrowserFn)})}});CKEDITOR.on("dialogDefinition",
function(a){if(a.editor.plugins.filebrowser)for(var b=a.data.definition,c,e=0;e<b.contents.length;++e)if(c=b.contents[e])d(a.editor,a.data.name,b,c.elements),c.hidden&&c.filebrowser&&(c.hidden=!m(b,c.id,c.filebrowser))})}(),function(){function e(e){var b=e.config,l=e.fire("uiSpace",{space:"top",html:""}).html,k=function(){function a(b,d,e){g.setStyle(d,c(e));g.setStyle("position",b)}function d(b){var c=l.getDocumentPosition();switch(b){case "top":a("absolute","top",c.y-q-y);break;case "pin":a("fixed",
"top",D);break;case "bottom":a("absolute","top",c.y+(r.height||r.bottom-r.top)+y)}m=b}var m,l,p,r,v,q,B,w=b.floatSpaceDockedOffsetX||0,y=b.floatSpaceDockedOffsetY||0,A=b.floatSpacePinnedOffsetX||0,D=b.floatSpacePinnedOffsetY||0;return function(a){if(l=e.editable()){var n=a&&"focus"==a.name;n&&g.show();e.fire("floatingSpaceLayout",{show:n});g.removeStyle("left");g.removeStyle("right");p=g.getClientRect();r=l.getClientRect();v=f.getViewPaneSize();q=p.height;B="pageXOffset"in f.$?f.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;
m?(q+y<=r.top?d("top"):q+y>v.height-r.bottom?d("pin"):d("bottom"),a=v.width/2,a=b.floatSpacePreferRight?"right":0<r.left&&r.right<v.width&&r.width>p.width?"rtl"==b.contentsLangDirection?"right":"left":a-r.left>r.right-a?"left":"right",p.width>v.width?(a="left",n=0):(n="left"==a?0<r.left?r.left:0:r.right<v.width?v.width-r.right:0,n+p.width>v.width&&(a="left"==a?"right":"left",n=0)),g.setStyle(a,c(("pin"==m?A:w)+n+("pin"==m?0:"left"==a?B:-B)))):(m="pin",d("pin"),k(a))}}}();if(l){var d=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}"'+(e.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(e.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'),g=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(d.output({content:l,
id:e.id,langDir:e.lang.dir,langCode:e.langCode,name:e.name,style:"display:none;z-index:"+(b.baseFloatZIndex-1),topId:e.ui.spaceId("top"),voiceLabel:e.title}))),m=CKEDITOR.tools.eventsBuffer(500,k),a=CKEDITOR.tools.eventsBuffer(100,k);g.unselectable();g.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});e.on("focus",function(b){k(b);e.on("change",m.input);f.on("scroll",a.input);f.on("resize",a.input)});e.on("blur",function(){g.hide();e.removeListener("change",
m.input);f.removeListener("scroll",a.input);f.removeListener("resize",a.input)});e.on("destroy",function(){f.removeListener("scroll",a.input);f.removeListener("resize",a.input);g.clearCustomData();g.remove()});e.focusManager.hasFocus&&g.show();e.focusManager.add(g,1)}}var f=CKEDITOR.document.getWindow(),c=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(c){c.on("loaded",function(){e(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var e=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),f=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"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'),h=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(b,c){return this.addBlock(b,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(b,c){c=c||{};var e=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&&
(e["aria-multiselectable"]=!0);!e.role&&(e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=e.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);
delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(b){var c=this.toggle(b);if(this.onClick)this.onClick(b,c)},this));return this._.click}},proto:{add:function(b,c,e){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[b]=d;var g;g=CKEDITOR.tools.htmlEncodeAttr(b).replace(h,"\\'");b={id:d,val:g,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),
title:CKEDITOR.tools.htmlEncodeAttr(e||b),text:c||b};this._.pendingList.push(f.output(b))},startGroup:function(b){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[b]=e;this._.pendingHtml.push(c.output({id:e,label:b}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(b){var c=this.isMarked(b);c?this.unmark(b):this.mark(b);return!c},hideGroup:function(b){var c=(b=this.element.getDocument().getById(this._.groups[b]))&&
b.getNext();b&&(b.setStyle("display","none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(b){this.element.getDocument().getById(this._.items[b]).setStyle("display","none")},showAll:function(){var b=this._.items,c=this._.groups,e=this.element.getDocument(),d;for(d in b)e.getById(b[d]).setStyle("display","");for(var g in c)b=e.getById(c[g]),d=b.getNext(),b.setStyle("display",""),d&&"ul"==d.getName()&&d.setStyle("display","")},mark:function(b){this.multiSelect||this.unmarkAll();
b=this._.items[b];var c=this.element.getDocument().getById(b);c.addClass("cke_selected");this.element.getDocument().getById(b+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(c)},markFirstDisplayed:function(){var b=this;this._.markFirstDisplayed(function(){b.multiSelect||b.unmarkAll()})},unmark:function(b){var c=this.element.getDocument();b=this._.items[b];var e=c.getById(b);e.removeClass("cke_selected");c.getById(b+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(e)},
unmarkAll:function(){var b=this._.items,c=this.element.getDocument(),e;for(e in b){var d=b[e];c.getById(d).removeClass("cke_selected");c.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(b){return this.element.getDocument().getById(this._.items[b]).hasClass("cke_selected")},focus:function(b){this._.focusIndex=-1;var c=this.element.getElementsByTag("a"),e,d=-1;if(b)for(e=this.element.getDocument().getById(this._.items[b]).getFirst();b=c.getItem(++d);){if(b.equals(e)){this._.focusIndex=
d;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var e='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+
(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var e=e+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?
'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),f=CKEDITOR.addTemplate("combo",e);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=
CKEDITOR.tools.createClass({$:function(c){CKEDITOR.tools.extend(this,c,{canGroup:!1,title:c.label,modes:{wysiwyg:1},editorFocus:1});c=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=c.parent&&c.parent.getDocument()||CKEDITOR.document;c.className="cke_combopanel";c.block={multiSelect:c.multiSelect,attributes:c.attributes};c.toolbarRelated=!0;this._={panelDefinition:c,items:{},listeners:[]}},proto:{renderHtml:function(c){var e=[];this.render(c,e);return e.join("")},
render:function(c,e){function b(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a=this.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;c.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=CKEDITOR.env,k="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(a){x&&(c.unlockSelection(1),x=0);m.execute(a)},this),g=this,m={id:k,combo:this,focus:function(){CKEDITOR.document.getById(k).getChild(1).focus()},
execute:function(a){var b=g._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(g.createPanel(c),b.on)b.panel.hide();else{g.commit();var d=g.getValue();d?b.list.mark(d):b.list.unmarkAll();b.panel.showBlock(g.id,new CKEDITOR.dom.element(a),4)}},clickFn:d};this._.listeners.push(c.on("activeFilterChange",b,this));this._.listeners.push(c.on("mode",b,this));this._.listeners.push(c.on("selectionChange",b,this));!this.readOnly&&this._.listeners.push(c.on("readOnly",b,this));var a=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:m.onkey(m,c)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){m.onfocus&&m.onfocus()}),x=0;m.keyDownFn=a;l={id:k,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:a,focusFn:n,clickFn:d};f.output(l,e);if(this.onRender)this.onRender();return m},createPanel:function(c){if(!this._.panel){var e=
this._.panelDefinition,b=this._.panelDefinition.block,f=e.parent||CKEDITOR.document.getBody(),k="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(c,f,e),e=d.addListBlock(this.id,b),g=this;d.onShow=function(){this.element.addClass(k);g.setState(CKEDITOR.TRISTATE_ON);g._.on=1;g.editorFocus&&!c.focusManager.hasFocus&&c.focus();if(g.onOpen)g.onOpen()};d.onHide=function(b){this.element.removeClass(k);g.setState(g.modes&&g.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g._.on=0;
if(!b&&g.onClose)g.onClose()};d.onEscape=function(){d.hide(1)};e.onClick=function(b,a){g.onClick&&g.onClick.call(g,b,a);d.hide()};this._.panel=d;this._.list=e;d.getBlock(this.id).onHide=function(){g._.on=0;g.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(c,e){this._.value=c;var b=this.document.getById("cke_"+this.id+"_text");b&&(c||e?b.removeClass("cke_combo_inlinelabel"):(e=this.label,b.addClass("cke_combo_inlinelabel")),b.setText("undefined"!=typeof e?e:c))},getValue:function(){return this._.value||
""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(c){this._.list.mark(c)},hideItem:function(c){this._.list.hideItem(c)},hideGroup:function(c){this._.list.hideGroup(c)},showAll:function(){this._.list.showAll()},add:function(c,e,b){this._.items[c]=b||c;this._.list.add(c,e,b)},startGroup:function(c){this._.list.startGroup(c)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(c){if(this._.state!=
c){var e=this.document.getById("cke_"+this.id);e.setState(c,"cke_combo");c==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",!0):e.removeAttribute("aria-disabled");this._.state=c}},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(c){c.removeListener()});this._.listeners=[]}},statics:{handler:{create:function(c){return new CKEDITOR.ui.richCombo(c)}}}});CKEDITOR.ui.prototype.addRichCombo=function(c,e){this.add(c,CKEDITOR.UI_RICHCOMBO,e)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(e){if(!e.blockless){for(var f=e.config,c=e.lang.format,h=f.format_tags.split(";"),b={},l=0,k=[],d=0;d<h.length;d++){var g=h[d],m=new CKEDITOR.style(f["format_"+g]);if(!e.filter.customConfig||e.filter.check(m))l++,
b[g]=m,b[g]._.enterMode=e.config.enterMode,k.push(m)}0!==l&&e.ui.addRichCombo("Format",{label:c.label,title:c.panelTitle,toolbar:"styles,20",allowedContent:k,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!1,attributes:{"aria-label":c.panelTitle}},init:function(){this.startGroup(c.panelTitle);for(var a in b){var d=c["tag_"+a];this.add(a,b[a].buildPreview(d),d)}},onClick:function(a){e.focus();e.fire("saveSnapshot");a=b[a];var d=e.elementPath();a.checkActive(d,e)||e.applyStyle(a);
setTimeout(function(){e.fire("saveSnapshot")},0)},onRender:function(){e.on("selectionChange",function(a){var d=this.getValue();a=a.data.path;this.refresh();for(var c in b)if(b[c].checkActive(a,e)){c!=d&&this.setValue(c,e.lang.format["tag_"+c]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in b)e.activeFilter.check(b[a])||this.hideItem(a)},refresh:function(){var a=e.elementPath();if(a){if(a.isContextFor("p"))for(var d in b)if(e.activeFilter.check(b[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"},function(){var e=
{canUndo:!1,exec:function(e){var c=e.document.createElement("hr");e.insertElement(c)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(f){f.blockless||(f.addCommand("horizontalrule",e),f.ui.addButton&&f.ui.addButton("HorizontalRule",{label:f.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(e){var f=new CKEDITOR.htmlWriter;f.forceSimpleAmpersand=e.config.forceSimpleAmpersand;
f.indentationChars=e.config.dataIndentationChars||"\t";e.dataProcessor.writer=f}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var e=CKEDITOR.dtd,f;for(f in CKEDITOR.tools.extend({},e.$nonBodyContent,e.$block,e.$listItem,e.$tableContent))this.setRules(f,{indent:!e[f]["#"],
breakBeforeOpen:1,breakBeforeClose:!e[f]["#"],breakAfterClose:1,needsSpace:f in e.$block&&!(f in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(e){var f=this._.rules[e];this._.afterCloser&&f&&f.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():f&&f.breakBeforeOpen&&(this.lineBreak(),
this.indentation());this._.output.push("\x3c",e);this._.afterCloser=0},openTagClose:function(e,f){var c=this._.rules[e];f?(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"==e&&(this._.inPre=1)},attribute:function(e,f){"string"==typeof f&&(f=CKEDITOR.tools.htmlEncodeAttr(f),this.forceSimpleAmpersand&&(f=f.replace(/&amp;/g,"\x26")));
this._.output.push(" ",e,'\x3d"',f,'"')},closeTag:function(e){var f=this._.rules[e];f&&f.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():f&&f.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",e,"\x3e");"pre"==e&&(this._.inPre=0);f&&f.breakAfterClose&&(this.lineBreak(),this._.needsSpace=f.needsSpace);this._.afterCloser=1},text:function(e){this._.indent&&(this.indentation(),!this._.inPre&&(e=CKEDITOR.tools.ltrim(e)));
this._.output.push(e)},comment:function(e){this._.indent&&this.indentation();this._.output.push("\x3c!--",e,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(e,f){var c=
this._.rules[e];c?CKEDITOR.tools.extend(c,f,!0):this._.rules[e]=f}}}),"use strict",function(){function e(b,d){CKEDITOR.tools.extend(this,{editor:b,editable:b.editable(),doc:b.document,win:b.window},d,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function f(b,d){CKEDITOR.tools.extend(this,d,{editor:b},!0)}function c(d,c){var a=d.editable();CKEDITOR.tools.extend(this,{editor:d,editable:a,inline:a.isInline(),doc:d.document,
win:d.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},c,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var e=CKEDITOR.tools.bind(this.queryViewport,this),f=CKEDITOR.tools.bind(this.hideVisible,this),h=CKEDITOR.tools.bind(this.removeAll,this);a.attachListener(this.winTop,"resize",e);a.attachListener(this.winTop,"scroll",e);a.attachListener(this.winTop,"resize",f);a.attachListener(this.win,"scroll",f);a.attachListener(this.inline?
a: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);a.attachListener(d,"resize",e);a.attachListener(d,"mode",h);d.on("destroy",h);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({},
l,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},b,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},b,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function h(b){var c;if(c=b&&b.type==CKEDITOR.NODE_ELEMENT)c=!(k[b.getComputedStyle("float")]||k[b.getAttribute("align")]);return c&&
!d[b.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;e.prototype={start:function(b){var d=this,a=this.editor,c=this.doc,e,f,h,k,l=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(d.relations={},(f=c.$.elementFromPoint(h,k))&&f.nodeType&&(e=new CKEDITOR.dom.element(f),d.traverseSearch(e),isNaN(h+k)||d.pixelSearch(e,h,k),b&&b(d.relations,h,k)))});this.listener=this.editable.attachListener(this.target,
"mousemove",function(a){h=a.data.$.clientX;k=a.data.$.clientY;l.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){l.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var b={};b[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;b[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;b[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(d){var a=this.editor.createRange();a.moveToPosition(this.relations[d.uid].element,
b[d.type]);return a}}(),store:function(){function b(d,a,c){var e=d.getUniqueId();e in c?c[e].type|=a:c[e]={element:d,type:a}}return function(d,a){var c;a&CKEDITOR.LINEUTILS_AFTER&&h(c=d.getNext())&&c.isVisible()&&(b(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_AFTER);a&CKEDITOR.LINEUTILS_INSIDE&&h(c=d.getFirst())&&c.isVisible()&&(b(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_INSIDE);b(d,a,this.relations)}}(),traverseSearch:function(b){var d,a,c;do if(c=b.$["data-cke-expando"],
!(c&&c in this.relations)){if(b.equals(this.editable))break;if(h(b))for(d in this.lookups)(a=this.lookups[d](b))&&this.store(b,a)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(a,c,e,g,f){for(var k=0,l;f(e);){e+=g;if(25==++k)break;if(l=this.doc.$.elementFromPoint(c,e))if(l==a)k=0;else if(d(a,l)&&(k=0,h(l=new CKEDITOR.dom.element(l))))return l}}var d=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:
function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(a,d,c){var e=this.win.getViewPaneSize().height,f=b.call(this,a.$,d,c,-1,function(a){return 0<a});d=b.call(this,a.$,d,c,1,function(a){return a<e});if(f)for(this.traverseSearch(f);!f.getParent().equals(a);)f=f.getParent();if(d)for(this.traverseSearch(d);!d.getParent().equals(a);)d=d.getParent();for(;f||d;){f&&(f=f.getNext(h));if(!f||f.equals(d))break;this.traverseSearch(f);d&&(d=d.getPrevious(h));if(!d||d.equals(f))break;this.traverseSearch(d)}}}(),
greedySearch:function(){this.relations={};for(var b=this.editable.getElementsByTag("*"),d=0,a,c,e;a=b.getItem(d++);)if(!a.equals(this.editable)&&a.type==CKEDITOR.NODE_ELEMENT&&(a.hasAttribute("contenteditable")||!a.isReadOnly())&&h(a)&&a.isVisible())for(e in this.lookups)(c=this.lookups[e](a))&&this.store(a,c);return this.relations}};f.prototype={locate:function(){function b(d,a){var c=d.element[a===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return c&&h(c)?(d.siblingRect=c.getClientRect(),
a==CKEDITOR.LINEUTILS_BEFORE?(d.siblingRect.bottom+d.elementRect.top)/2:(d.elementRect.bottom+d.siblingRect.top)/2):a==CKEDITOR.LINEUTILS_BEFORE?d.elementRect.top:d.elementRect.bottom}return function(d){var a;this.locations={};for(var c in d)a=d[c],a.elementRect=a.element.getClientRect(),a.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(c,CKEDITOR.LINEUTILS_BEFORE,b(a,CKEDITOR.LINEUTILS_BEFORE)),a.type&CKEDITOR.LINEUTILS_AFTER&&this.store(c,CKEDITOR.LINEUTILS_AFTER,b(a,CKEDITOR.LINEUTILS_AFTER)),a.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(c,CKEDITOR.LINEUTILS_INSIDE,(a.elementRect.top+a.elementRect.bottom)/2);return this.locations}}(),sort:function(){var b,d,a,c;return function(e,f){b=this.locations;d=[];for(var h in b)for(var k in b[h])if(a=Math.abs(e-b[h][k]),d.length){for(c=0;c<d.length;c++)if(a<d[c].dist){d.splice(c,0,{uid:+h,type:k,dist:a});break}c==d.length&&d.push({uid:+h,type:k,dist:a})}else d.push({uid:+h,type:k,dist:a});return"undefined"!=typeof f?d.slice(0,f):d}}(),store:function(b,
d,a){this.locations[b]||(this.locations[b]={});this.locations[b][d]=a}};var b={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},l={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};c.prototype={removeAll:function(){for(var b in this.hidden)this.hidden[b].remove(),delete this.hidden[b];for(b in this.visible)this.visible[b].remove(),delete this.visible[b]},hideLine:function(b){var d=b.getUniqueId();
b.hide();this.hidden[d]=b;delete this.visible[d]},showLine:function(b){var d=b.getUniqueId();b.show();this.visible[d]=b;delete this.hidden[d]},hideVisible:function(){for(var b in this.visible)this.hideLine(this.visible[b])},placeLine:function(b,d){var a,c,e;if(a=this.getStyle(b.uid,b.type)){for(e in this.visible)if(this.visible[e].getCustomData("hash")!==this.hash){c=this.visible[e];break}if(!c)for(e in this.hidden)if(this.hidden[e].getCustomData("hash")!==this.hash){this.showLine(c=this.hidden[e]);
break}c||this.showLine(c=this.addLine());c.setCustomData("hash",this.hash);this.visible[c.getUniqueId()]=c;c.setStyles(a);d&&d(c)}},getStyle:function(b,d){var a=this.relations[b],c=this.locations[b][d],e={};e.width=a.siblingRect?Math.max(a.siblingRect.width,a.elementRect.width):a.elementRect.width;e.top=this.inline?c+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+c;if(e.top-this.winTopScroll.y<this.rect.top||e.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?
e.left=a.elementRect.left-this.rect.relativeX:(0<a.elementRect.left?e.left=this.rect.left+a.elementRect.left:(e.width+=a.elementRect.left,e.left=this.rect.left),0<(a=e.left+e.width-(this.rect.left+this.winPane.width))&&(e.width-=a));e.left+=this.winTopScroll.x;for(var f in e)e[f]=CKEDITOR.tools.cssLength(e[f]);return e},addLine:function(){var b=CKEDITOR.dom.element.createFromHtml(this.lineTpl);b.appendTo(this.container);return b},prepare:function(b,d){this.relations=b;this.locations=d;this.hash=Math.random()},
cleanup:function(){var b,d;for(d in this.visible)b=this.visible[d],b.getCustomData("hash")!==this.hash&&this.hideLine(b)},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(b){b=b.getClientRect();var d=this.container.getDocumentPosition(),a=this.container.getComputedStyle("position");b.relativeX=b.relativeY=
0;"static"!=a&&(b.relativeY=d.y,b.relativeX=d.x,b.top-=b.relativeY,b.bottom-=b.relativeY,b.left-=b.relativeX,b.right-=b.relativeX);return b}};var k={left:1,right:1,center:1},d={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:e,locator:f,liner:c}}(),function(){function e(e){return e.getName&&!e.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(e){if(CKEDITOR.env.webkit){var c=CKEDITOR.plugins.widgetselection;e.on("contentDom",function(e){e=e.editor;var b=e.editable();
b.attachListener(b,"keydown",function(e){e.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){c.addFillers(b)||c.removeFillers(b)},0)},null,null,-1);e.on("selectionCheck",function(b){c.removeFillers(b.editor.editable())});e.on("paste",function(b){b.data.dataValue=c.cleanPasteData(b.data.dataValue)});"selectall"in e.plugins&&c.addSelectAllIntegration(e)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",
fillerTagName:"div",addFillers:function(f){var c=f.editor;if(!this.isWholeContentSelected(f)&&0<f.getChildCount()){var h=f.getFirst(e),b=f.getLast(e);h&&h.type==CKEDITOR.NODE_ELEMENT&&!h.isEditable()&&(this.startFiller=this.createFiller(),f.append(this.startFiller,1));b&&b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable()&&(this.endFiller=this.createFiller(!0),f.append(this.endFiller,0));if(this.hasFiller(f))return c=c.createRange(),c.selectNodeContents(f),c.select(),!0}return!1},removeFillers:function(e){if(this.hasFiller(e)&&
!this.isWholeContentSelected(e)){var c=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),h=e.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&c&&this.startFiller.equals(c)?this.removeFiller(this.startFiller,e):this.startFiller=c;this.endFiller&&h&&this.endFiller.equals(h)?this.removeFiller(this.endFiller,e):this.endFiller=h}},cleanPasteData:function(e){e&&e.length&&(e=e.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));
return e},isWholeContentSelected:function(e){var c=e.editor.getSelection().getRanges()[0];return!c||c&&c.collapsed?!1:(c=c.clone(),c.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(c&&e&&c.startContainer&&c.endContainer&&0===c.startOffset&&c.endOffset===e.getChildCount()&&c.startContainer.equals(e)&&c.endContainer.equals(e)))},hasFiller:function(e){return 0<e.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(e){var c=new CKEDITOR.dom.element(this.fillerTagName);c.setHtml(this.fillerContent);
c.setAttribute(this.fillerAttribute,e?"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(e,c){if(e){var h=c.editor,b=c.editor.getSelection().getRanges()[0].startPath(),l=h.createRange(),k,d;b.contains(e)&&(k=e.getHtml(),d=!0);b="start"==e.getAttribute(this.fillerAttribute);e.remove();k&&0<k.length&&k!=this.fillerContent?(c.insertHtmlIntoRange(k,
h.getSelection().getRanges()[0]),l.setStartAt(c.getChild(c.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),h.getSelection().selectRanges([l])):d&&(b?l.setStartAt(c.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):l.setEndAt(c.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),c.editor.getSelection().selectRanges([l]))}},createFillerRegex:function(e){var c=this.createFiller(e).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((e?
"":"^")+c+(e?"$":""))},addSelectAllIntegration:function(e){var c=this;e.editable().attachListener(e,"beforeCommandExec",function(h){var b=e.editable();"selectAll"==h.data.name&&b&&c.addFillers(b)},null,null,9999)}}}(),"use strict",function(){function e(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};J(this);z(this);this.on("checkWidgets",k);this.editor.on("contentDomInvalidated",
this.checkWidgets,this);D(this);w(this);y(this);B(this);A(this)}function f(a,b,d,c,e){var g=a.editor;CKEDITOR.tools.extend(this,c,{editor:g,id:b,inline:"span"==d.getParent().getName(),element:d,data:CKEDITOR.tools.extend({},"function"==typeof c.defaults?c.defaults():c.defaults),dataReady:!1,inited:!1,ready:!1,edit:f.prototype.edit,focusedEditable:null,definition:c,repository:a,draggable:!1!==c.draggable,_:{downcastFn:c.downcast&&"string"==typeof c.downcast?c.downcasts[c.downcast]:c.downcast}},!0);
a.fire("instanceCreated",this);Z(this,c);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;R(this);this.fire("data",this.data);this.isInited()&&g.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function c(a,b,d){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=d.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 h(a,b){a.addCommand(b.name,{exec:function(a,d){function c(){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:d});else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.dom.element.createFromHtml(b.template.output(e)),
g,f=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(f.getDocument());h.append(f);(g=a.widgets.initOn(e,b,d&&d.startupData))?(e=g.once("edit",function(b){if(b.data.dialog)g.once("dialog",function(b){b=b.data;var d,e;d=b.once("ok",c,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(g,!0)});b.once("hide",function(){d.removeListener();e.removeListener()})});else c()},null,null,999),g.edit(),e.removeListener()):c()}},allowedContent:b.allowedContent,
requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function b(a,b){function d(a,c){var e=b.upcast.split(","),g,f;for(f=0;f<e.length;f++)if(g=e[f],g===a.name)return b.upcasts[g].call(this,a,c);return!1}function c(b,d,e){var g=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>g&&(g=a._.upcasts.length);a._.upcasts.splice(g,0,[CKEDITOR.tools.bind(b,d),d.name,e])}var e=b.upcast,g=b.upcastPriority||10;e&&("string"==typeof e?c(d,
b,g):c(e,b,g))}function l(a,b){a.focused=null;if(b.isInited()){var d=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!d&&b.editor.resetDirty()}}function k(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),d=this.instances,c,e,g,h;if(b){for(c in d)d[c].isReady()&&!b.contains(d[c].wrapper)&&this.destroy(d[c],!0);if(a&&a.initOnlyNew)d=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),d=[];c=0;for(e=k.count();c<e;c++){g=k.getItem(c);if(h=!this.getByElement(g,
!0)){a:{h=p;for(var m=g;m=m.getParent();)if(h(m)){h=!0;break a}h=!1}h=!h}h&&b.contains(g)&&(g.addClass("cke_widget_new"),d.push(this.initOn(g.getFirst(f.isDomWidgetElement))))}}a&&a.focusInited&&1==d.length&&d[0].focus()}}}function d(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=g(a),d=m(a),c=!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;"),c=!0);d&&d.value&&d.value.match(/\s$/g)&&(d.parent.attributes["data-cke-white-space-last"]=
1,d.value=d.value.replace(/\s$/g,"\x26nbsp;"),c=!0);c&&(a.attributes["data-cke-widget-white-space"]=1)}}function g(a){return a.find(function(a){return 3===a.type},!0).shift()}function m(a){return a.find(function(a){return 3===a.type},!0).pop()}function a(a,b,d){if(!d.allowedContent&&!d.disallowedContent)return null;var c=this._.filters[a];c||(this._.filters[a]=c={});a=c[b];a||(a=d.allowedContent?new CKEDITOR.filter(d.allowedContent):this.editor.filter.clone(),c[b]=a,d.disallowedContent&&a.disallow(d.disallowedContent));
return a}function n(a){var b=[],d=a._.upcasts,c=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,g,h,k,m;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(f.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(m=d.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(e=c.length;k<e;++k)if(!1===c[k](a))return;for(k=0;k<m;++k)if(e=d[k],h={},g=e[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,e[1]]),!1}}}}function x(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 u(a,b,d){if(a.type==CKEDITOR.NODE_ELEMENT){var c=CKEDITOR.dtd[a.name];if(c&&!c[d.name]){var c=a.split(b),e=a.parent;b=c.getIndex();a.children.length||(--b,a.remove());c.children.length||
c.remove();return u(e,b,d)}}a.add(d,b)}function t(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function p(a){return a.hasAttribute("data-cke-temp")}function r(a,b,d,c){var e=a.editor;e.fire("lockSnapshot");d?(c=d.data("cke-widget-editable"),c=b.editables[c],a.widgetHoldingFocusedEditable=b,b.focusedEditable=c,d.addClass("cke_widget_editable_focused"),c.filter&&e.setActiveFilter(c.filter),e.setActiveEnterMode(c.enterMode,c.shiftEnterMode)):(c||b.focusedEditable.removeClass("cke_widget_editable_focused"),
b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function v(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function q(a,b){return CKEDITOR.tools.trim(b)}function B(a){var b=a.editor,d=CKEDITOR.plugins.lineutils;b.on("dragstart",function(d){var c=d.data.target;f.isDomDragHandler(c)&&(c=a.getByElement(c),d.data.dataTransfer.setData("cke/widget-id",
c.id),b.focus(),c.focus())});b.on("drop",function(d){var c=d.data.dataTransfer,e=c.getData("cke/widget-id"),g=c.getTransferType(b),c=b.createRange();""!==e&&g===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d.cancel():""!==e&&g==CKEDITOR.DATA_TRANSFER_INTERNAL&&(e=a.instances[e])&&(c.setStartBefore(e.wrapper),c.setEndAfter(e.wrapper),d.data.dragRange=c,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,d.data.dataTransfer.setData("text/html",
b.editable().getHtmlFromRange(c).getHtml()),b.widgets.destroy(e,!0))});b.on("contentDom",function(){var c=b.editable();CKEDITOR.tools.extend(a,{finder:new d.finder(b,{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!f.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var d=f.getNestedEditable(c,b);if(d){b=a._.draggedWidget;if(a.getByElement(d)==b)return;d=CKEDITOR.filter.instances[d.data("cke-filter")];b=b.requiredContent;if(d&&b&&!d.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|
CKEDITOR.LINEUTILS_AFTER}}}}),locator:new d.locator(b),liner:new d.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function w(a){var b=a.editor;b.on("contentDom",function(){var d=b.editable(),c=d.isInline()?d:b.document,e,g;d.attachListener(c,"mousedown",function(d){var c=d.data.getTarget();e=c instanceof CKEDITOR.dom.element?a.getByElement(c):null;g=0;e&&(e.inline&&c.type==CKEDITOR.NODE_ELEMENT&&
c.hasAttribute("data-cke-widget-drag-handler")?(g=1,a.focused!=e&&b.getSelection().removeAllRanges()):f.getNestedEditable(e.wrapper,c)?e=null:(d.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});d.attachListener(c,"mouseup",function(){g&&e&&e.wrapper&&(g=0,e.focus())});CKEDITOR.env.ie&&d.attachListener(c,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&d.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick",function(b){var d=a.getByElement(b.data.element);if(d&&!f.getNestedEditable(d.wrapper,
b.data.element))return d.fire("doubleclick",{element:b.data.element})},null,null,1)}function y(a){a.editor.on("key",function(b){var d=a.focused,c=a.widgetHoldingFocusedEditable,e;d?e=d.fire("key",{keyCode:b.data.keyCode}):c&&(d=b.data.keyCode,b=c.focusedEditable,d==CKEDITOR.CTRL+65?(d=b.getBogus(),c=c.editor.createRange(),c.selectNodeContents(b),d&&c.setEndAt(d,CKEDITOR.POSITION_BEFORE_START),c.select(),e=!1):8==d||46==d?(e=c.editor.getSelection().getRanges(),c=e[0],e=!(1==e.length&&c.collapsed&&
c.checkBoundaryOfElement(b,CKEDITOR[8==d?"START":"END"]))):e=void 0);return e},null,null,1)}function A(a){function b(d){a.focused&&G(a.focused,"cut"==d.name)}var d=a.editor;d.on("contentDom",function(){var a=d.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function D(a){var b=a.editor;b.on("selectionCheck",function(){a.fire("checkSelection")});a.on("checkSelection",a.checkSelection,a);b.on("selectionChange",function(d){var c=(d=f.getNestedEditable(b.editable(),d.data.selection.getStartElement()))&&
a.getByElement(d),e=a.widgetHoldingFocusedEditable;e?e===c&&e.focusedEditable.equals(d)||(r(a,e,null),c&&d&&r(a,c,d)):c&&d&&r(a,c,d)});b.on("dataReady",function(){E(a).commit()});b.on("blur",function(){var b;(b=a.focused)&&l(a,b);(b=a.widgetHoldingFocusedEditable)&&r(a,b,null)})}function z(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var c=CKEDITOR.tools.getNextNumber(),e=[];b.data.downcastingSessionId=c;d[c]=e;b.data.dataValue.forEach(function(b){var d=b.attributes,c;if("data-cke-widget-white-space"in
d){c=g(b);var h=m(b);c.parent.attributes["data-cke-white-space-first"]&&(c.value=c.value.replace(/^&nbsp;/g," "));h.parent.attributes["data-cke-white-space-last"]&&(h.value=h.value.replace(/&nbsp;$/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])c=b.getFirst(f.isParserWidgetElement),e.push({wrapper:b,element:c,widget:d,editables:{}}),"1"!=c.attributes["data-cke-widget-keep-attr"]&&delete c.attributes["data-widget"]}else if("data-cke-widget-editable"in d)return e[e.length-
1].editables[d["data-cke-widget-editable"]]=b,!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId){a=d[a.data.downcastingSessionId];for(var b,c,e,g,f,h;b=a.shift();){c=b.widget;e=b.element;g=c._.downcastFn&&c._.downcastFn.call(c,e);for(h in b.editables)f=b.editables[h],delete f.attributes.contenteditable,f.setHtml(c.editables[h].getData());g||(g=e);b.wrapper.replaceWith(g)}}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}
function J(a){var b=a.editor,d,c;b.on("toHtml",function(b){var c=n(a),e;for(b.data.dataValue.forEach(c.iterator,CKEDITOR.NODE_ELEMENT,!0);e=c.toBeWrapped.pop();){var g=e[0],h=g.parent;h.type==CKEDITOR.NODE_ELEMENT&&h.attributes["data-cke-widget-wrapper"]&&h.replaceWith(g);a.wrapElement(e[0],e[1])}d=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&f.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&f.isParserWidgetWrapper(b.data.dataValue.children[0])},
null,null,8);b.on("dataReady",function(){if(c)for(var d=b.editable().find(".cke_widget_wrapper"),e,g,h=0,k=d.count();h<k;++h)e=d.getItem(h),g=e.getFirst(f.isDomWidgetElement),g.type==CKEDITOR.NODE_ELEMENT&&g.data("widget")?(g.replace(e),a.wrapElement(g)):e.remove();c=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(c=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(W,q);a.range&&(a=f.getNestedEditable(b.editable(),
a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(c){c.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:d}),b.fire("unlockSnapshot"))})}function E(a){var b=a.selected,d=[],c=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&d.push(a);a=CKEDITOR.tools.indexOf(c,a);0<=a&&c.splice(a,1);return this},focus:function(a){e=a;return this},
commit:function(){var g=a.focused!==e,f,h;a.editor.fire("lockSnapshot");for(g&&(f=a.focused)&&l(a,f);f=c.pop();)b.splice(CKEDITOR.tools.indexOf(b,f),1),f.isInited()&&(h=f.editor.checkDirty(),f.setSelected(!1),!h&&f.editor.resetDirty());g&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;f=d.pop();)b.push(f),f.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function H(a,b,d){var c=0;b=L(b);var e=a.data.classes||{},g;if(b){for(e=
CKEDITOR.tools.clone(e);g=b.pop();)d?e[g]||(c=e[g]=1):e[g]&&(delete e[g],c=1);c&&a.setData("classes",e)}}function F(a){a.cancel()}function G(a,b){var d=a.editor,c=d.document,e=CKEDITOR.env.edge&&16<=CKEDITOR.env.version;if(!c.getById("cke_copybin")){var g=!d.blockless&&!CKEDITOR.env.ie||e?"div":"span",e=c.createElement(g),f=c.createElement(g),g=CKEDITOR.env.ie&&9>CKEDITOR.env.version;f.setAttributes({id:"cke_copybin","data-cke-temp":"1"});e.setStyles({position:"absolute",width:"1px",height:"1px",
overflow:"hidden"});e.setStyle("ltr"==d.config.contentsLangDirection?"left":"right","-5000px");var h=d.createRange();h.setStartBefore(a.wrapper);h.setEndAfter(a.wrapper);e.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+d.editable().getHtmlFromRange(h).getHtml()+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');d.fire("saveSnapshot");d.fire("lockSnapshot");f.append(e);d.editable().append(f);var k=d.on("selectionChange",F,null,null,0),m=a.repository.on("checkSelection",F,
null,null,0);if(g)var l=c.getDocumentElement().$,q=l.scrollTop;h=d.createRange();h.selectNodeContents(e);h.select();g&&(l.scrollTop=q);setTimeout(function(){b||a.focus();f.remove();k.removeListener();m.removeListener();d.fire("unlockSnapshot");b&&!d.readOnly&&(a.repository.del(a),d.fire("saveSnapshot"))},100)}}function L(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function I(){var a=CKEDITOR.document.getActive(),b=this.editor,d=b.editable();(d.isInline()?d:b.document.getWindow().getFrame()).equals(a)&&
b.focusManager.focus(d)}function C(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function S(a){var b=null;a.on("data",function(){var a=this.data.classes,d;if(b!=a){for(d in b)a&&a[d]||this.removeClass(d);for(d in a)this.addClass(d);b=a}})}function O(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 P(a){if(a.draggable){var b=a.editor,d=a.wrapper.getLast(f.isDomDragHandlerContainer),c;d?c=d.findOne("img"):(d=new CKEDITOR.dom.element("span",b.document),d.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)"}),c=new CKEDITOR.dom.element("img",b.document),c.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&&c.setAttribute("draggable","true"),d.append(c),a.wrapper.append(d));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&&(c.on("mousedown",K,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))c.on("dragstart",
function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=d}}function K(a){function b(){var d;for(r.reset();d=h.pop();)d.removeListener();var c=k;d=a.sender;var e=this.repository.finder,g=this.repository.liner,f=this.editor,m=this.editor.editable();CKEDITOR.tools.isEmpty(g.visible)||(c=e.getRange(c[0]),this.focus(),f.fire("drop",{dropRange:c,target:c.startContainer}));m.removeClass("cke_widget_dragging");g.hideVisible();f.fire("dragend",{target:d})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var d=
this.repository.finder,c=this.repository.locator,e=this.repository.liner,g=this.editor,f=g.editable(),h=[],k=[],m,l;this.repository._.draggedWidget=this;var q=d.greedySearch(),r=CKEDITOR.tools.eventsBuffer(50,function(){m=c.locate(q);k=c.sort(l,1);k.length&&(e.prepare(q,m),e.placeLine(k[0]),e.cleanup())});f.addClass("cke_widget_dragging");h.push(f.on("mousemove",function(a){l=a.data.$.clientY;r.input()}));g.fire("dragstart",{target:a.sender});h.push(g.document.once("mouseup",b,this));f.isInline()||
h.push(CKEDITOR.document.once("mouseup",b,this))}}function V(a){var b,d,c=a.editables;a.editables={};if(a.editables)for(b in c)d=c[b],a.initEditable(b,"string"==typeof d?{selector:d}:d)}function T(a){if(a.mask){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 Y(a){if(a.parts){var b={},d,c;for(c in a.parts)d=a.wrapper.findOne(a.parts[c]),
b[c]=d;a.parts=b}}function Z(a,b){M(a);Y(a);V(a);T(a);P(a);S(a);O(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var d=b.data.getTarget();f.getNestedEditable(a,d)||a.inline&&f.isDomDragHandler(d)||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){G(a,b==CKEDITOR.CTRL+88);return}if(b in U||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 M(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function R(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function N(){function a(){}function b(a,d,c){return c&&this.checkElement(a)?(a=c.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function d(a){function b(a,
d,c){for(var e=a.length,g=0;g<e;){if(d.call(c,a[g],g,a))return a[g];g++}}function e(a){function b(a,d){var c=CKEDITOR.tools.objectKeys(a),e=CKEDITOR.tools.objectKeys(d);if(c.length!==e.length)return!1;for(var g in a)if(("object"!==typeof a[g]||"object"!==typeof d[g]||!b(a[g],d[g]))&&a[g]!==d[g])return!1;return!0}return function(d){return b(a.getDefinition(),d.getDefinition())}}var g=a.widget,f;c[g]||(c[g]={});for(var h=0,k=a.group.length;h<k;h++)f=a.group[h],c[g][f]||(c[g][f]=[]),f=c[g][f],b(f,e(a))||
f.push(a)}var c={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget;(this.group="string"==typeof a.group?[a.group]:a.group)&&d(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,
d,e=!1;if(!(a instanceof CKEDITOR.editor))return!1;d=a.elementPath();if(this.checkApplicable(d,a))for(var g=0,f=this.group.length;g<f;g++){b=c[this.widget][this.group[g]];for(var h=0;h<b.length;h++)b[h]!==this&&b[h].checkActive(d,a)&&(a.widgets.focused.removeStyle(b[h]),e=!0)}return e},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 f.isDomWidgetWrapper(a)?(a=a.getFirst(f.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,d={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;d[a.styleableElements]={classes:b,propertiesOnly:!0};return d}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:none;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}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_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}"),
N())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new e(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,d,c,e;for(c in b)d=b[c],(e=d.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(d.name,!0),{label:e,command:d.name,toolbar:"insert,10"});v(a)}}});e.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,d){d=CKEDITOR.tools.prototypedCopy(d);d.name=a;d._=d._||{};this.editor.fire("widgetDefinition",
d);d.template&&(d.template=new CKEDITOR.template(d.template));h(this.editor,d);b(this,d);return this.registered[a]=d},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),d=E(this),c;if(b&&(c=this.getByElement(b,!0)))return d.focus(c).select(c).commit();a=a.getRanges()[0];if(!a||a.collapsed)return d.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=f.isDomWidgetWrapper;b=a.next();)d.select(this.getByElement(b));
d.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,d=b.createRange(),c;(c=d.moveToClosestEditablePosition(a.wrapper,!0))||(c=d.moveToClosestEditablePosition(a.wrapper,!1));c&&b.getSelection().selectRanges([d])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&r(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,
b){var d,c,e=this.instances;if(b&&!a){c=b.find(".cke_widget_wrapper");for(var e=c.count(),g=0;g<e;++g)(d=this.getByElement(c.getItem(g),!0))&&this.destroy(d)}else for(c in e)d=e[c],this.destroy(d,a)},finalizeCreation:function(a){(a=a.getFirst())&&f.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(d){return d.is(b)&&d.data("cke-widget-id")}var b={div:1,span:1};return function(b,d){if(!b)return null;
var c=a(b);if(!d&&!c){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(c=a(b)))}return this.instances[c]||null}}(),initOn:function(a,b,d){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var c=this.wrapElement(a,b.name);return c?c.hasClass("cke_widget_new")?(a=new f(this,this._.nextId++,a,b,d),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=[],d,c=a.count();c--;)(d=this.initOn(a.getItem(c).getFirst(f.isDomWidgetElement)))&&b.push(d);return b},onWidget:function(a){var b=Array.prototype.slice.call(arguments);b.shift();for(var d in this.instances){var c=this.instances[d];c.name==a&&c.on.apply(c,b)}this.on("instanceCreated",function(d){d=d.data;d.name==a&&d.on.apply(d,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,d={},c=0;b=a.pop();)-1==b.indexOf("cke_")&&(d[b]=c=1);return c?
d:null},wrapElement:function(a,b){var c=null,e,g;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");e=this.registered[b];if(!e)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);(g=t(e,a.getName()))&&d(a);c=new CKEDITOR.dom.element(g?"span":"div");c.setAttributes(x(g,b));c.data("cke-display-name",e.pathName?e.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"];e=this.registered[b];if(!e)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);(g=t(e,a.name))&&d(a);c=new CKEDITOR.htmlParser.element(g?"span":"div",x(g,b));c.attributes["data-cke-display-name"]=
e.pathName?e.pathName:a.name;e=a.parent;var f;e&&(f=a.getIndex(),a.remove());c.add(a);e&&u(e,f,c)}return c},_tests_createEditableFilter:a};CKEDITOR.event.implementOn(e.prototype);f.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(f.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){H(this,a,1)},checkStyleActive:function(a){a=L(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 d=this.editables[a],c=!0;d.removeListener("focus",C);d.removeListener("blur",I);this.editor.focusManager.remove(d);if(d.filter){for(var e in this.repository.instances){var g=this.repository.instances[e];
g.editables&&(g=g.editables[a])&&g!==d&&d.filter===g.filter&&(c=!1)}c&&(d.filter.destroy(),(c=this.repository._.filters[this.name])&&delete c[a])}b||(this.repository.destroyAll(!1,d),d.removeClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),d.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 d,c;!1!==b.fire("dialog",a)&&(d=a.on("show",function(){a.setupContent(b)}),c=a.on("ok",function(){var d,c=b.on("data",function(a){d=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);c.removeListener();d&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){d.removeListener();c.removeListener()}))});return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},hasClass:function(a){return this.element.hasClass(a)},
initEditable:function(b,d){var e=this._findOneNotNested(d.selector);return e&&e.is(CKEDITOR.dtd.$editable)?(e=new c(this.editor,e,{filter:a.call(this.repository,this.name,b,d)}),this.editables[b]=e,e.setAttributes({contenteditable:"true","data-cke-widget-editable":b,"data-cke-enter-mode":e.enterMode}),e.filter&&e.data("cke-filter",e.filter.id),e.addClass("cke_widget_editable"),e.removeClass("cke_widget_editable_focused"),d.pathName&&e.data("cke-display-name",d.pathName),this.editor.focusManager.add(e),
e.on("focus",C,this),CKEDITOR.env.ie&&e.on("blur",I,this),e._.initialSetData=!0,e.setData(e.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,d,c=0;c<a.count();c++)if(b=a.getItem(c),d=b.getAscendant(f.isDomWidgetWrapper),this.wrapper.equals(d))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(f.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){H(this,a,0)},setData:function(a,b){var d=this.data,c=0;if("string"==typeof a)d[a]!==b&&(d[a]=b,c=1);else{var e=a;for(a in e)d[a]!==e[a]&&(c=1,d[a]=e[a])}c&&this.dataReady&&(R(this),this.fire("data",d));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.$,d=this._.dragHandlerOffset,b={x:b.offsetLeft,y:b.offsetTop-15};d&&b.x==d.x&&b.y==d.y||(d=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px",display:"block"}),a.fire("unlockSnapshot"),!d&&a.resetDirty(),this._.dragHandlerOffset=b)}};
CKEDITOR.event.implementOn(f.prototype);f.getNestedEditable=function(a,b){return!b||b.equals(a)?null:f.isDomNestedEditable(b)?b:f.getNestedEditable(a,b.getParent())};f.isDomDragHandler=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};f.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};f.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};
f.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};f.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};f.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};f.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};f.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};
f.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 W=/^(?:<(?: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,U={37:1,38:1,39:1,40:1,8:1,46:1};U[CKEDITOR.SHIFT+121]=1;CKEDITOR.plugins.widget=f;f.repository=e;f.nestedEditable=c}(),"use strict",function(){function e(b){function d(){this.deflated||
(b.widgets.focused==this.widget&&(this.focused=!0),b.widgets.destroy(this.widget),this.deflated=!0)}function e(){var a=b.editable(),d=b.document;if(this.deflated)this.widget=b.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,a)).block&&(a=d.createElement(b.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),a.replace(this.widget.wrapper),this.widget.wrapper.move(a)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;
else{var c=this.widget,a=g,d=c.wrapper,f=c.data.align,c=c.data.hasCaption;if(a){for(var h=3;h--;)d.removeClass(a[h]);"center"==f?c&&d.addClass(a[1]):"none"!=f&&d.addClass(a[u[f]])}else"center"==f?(c?d.setStyle("text-align","center"):d.removeStyle("text-align"),d.removeStyle("float")):("none"==f?d.removeStyle("float"):d.setStyle("float",f),d.removeStyle("text-align"))}}var g=b.config.image2_alignClasses,h=b.config.image2_captionedClass;return{allowedContent:m(b),requiredContent:"img[src,alt]",features:a(b),
styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var a=this.features;this.data.hasCaption&&!b.filter.checkFeature(a.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||b.filter.checkFeature(a.align)||(this.data.align="none");this.shiftState({widget:this,
element:this.element,oldData:this.oldData,newData:this.data,deflate:d,inflate:e});this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&&delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var c in this.data.classes)this.parts.image.removeClass(c);if(b.filter.checkFeature(a.dimension)){a=this.data;a={width:a.width,
height:a.height};c=this.parts.image;for(var g in a)a[g]?c.setAttribute(g,a[g]):c.removeAttribute(g)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var a=CKEDITOR.plugins.image2,d=this.parts.image,c={hasCaption:!!this.parts.caption,src:d.getAttribute("src"),alt:d.getAttribute("alt")||"",width:d.getAttribute("width")||"",height:d.getAttribute("height")||"",lock:this.ready?a.checkHasNaturalRatio(d):!0},e=d.getAscendant("a");e&&this.wrapper.contains(e)&&(this.parts.link=e);c.align||
(d=c.hasCaption?this.element:d,g?(d.hasClass(g[0])?c.align="left":d.hasClass(g[2])&&(c.align="right"),c.align?d.removeClass(g[u[c.align]]):c.align="none"):(c.align=d.getStyle("float")||"none",d.removeStyle("float")));b.plugins.link&&this.parts.link&&(c.link=a.getLinkAttributesParser()(b,this.parts.link),(d=c.link.advanced)&&d.advCSSClasses&&(d.advCSSClasses=CKEDITOR.tools.trim(d.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(c.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(c);
b.filter.checkFeature(this.features.dimension)&&!0!==b.config.image2_disableResizer&&l(this);this.shiftState=a.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF;if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF});this.on("dialog",function(a){a.data.widget=this},this)},addClass:function(a){n(this).addClass(a)},hasClass:function(a){return n(this).hasClass(a)},removeClass:function(a){n(this).removeClass(a)},
getClasses:function(){var a=new RegExp("^("+[].concat(h,g).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),d;for(d in b)a.test(d)&&delete b[d];return b}}(),upcast:f(b),downcast:c(b),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||"")+" "+this.pathName)}}}function f(a){var d=h(a),c=a.config.image2_captionedClass;return function(a,e){var g={width:1,height:1},f=a.name,h;if(!a.attributes["data-cke-realelement"]&&
(d(a)?("div"==f&&(h=a.getFirst("figure"))&&(a.replaceWith(h),a=h),e.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==f&&a.hasClass(c)?h=a.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:b(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in g)(g=h.attributes[k])&&g.match(t)&&delete h.attributes[k];return a}}}function c(a){var b=a.config.image2_alignClasses;return function(a){var d="a"==a.name?a.getFirst():
a,c=d.attributes,e=this.data.align;if(!this.inline){var g=a.getFirst("span");g&&g.replaceWith(g.getFirst({img:1,a:1}))}e&&"none"!=e&&(g=CKEDITOR.tools.parseCssText(c.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1,right:1}&&(b?d.addClass(b[u[e]]):g["float"]=e),b||CKEDITOR.tools.isEmpty(g)||(c.style=CKEDITOR.tools.writeCssText(g)));return a}}function h(a){var d=a.config.image2_captionedClass,c=a.config.image2_alignClasses,
e={figure:1,a:1,img:1};return function(g){if(!(g.name in{div:1,p:1}))return!1;var f=g.children;if(1!==f.length)return!1;f=f[0];if(!(f.name in e))return!1;if("p"==g.name){if(!b(f))return!1}else if("figure"==f.name){if(!f.hasClass(d))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!b(f))return!1;return(c?g.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(g.attributes.style||"",!0)["text-align"])?!0:!1}}function b(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function l(a){var b=
a.editor,d=b.editable(),c=b.document,e=a.resizer=c.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("​",c));if(a.inline)a.wrapper.append(e);else{var g=a.parts.link||a.parts.image,f=g.getParent(),h=c.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(g);h.append(e);a.element.append(h,!0);f.is("span")&&f.remove()}e.on("mousedown",function(g){function f(a,b,d){var e=CKEDITOR.document,g=[];c.equals(e)||
g.push(e.on(a,b));g.push(c.on(a,b));if(d)for(a=g.length;a--;)d.push(g.pop())}function h(){V=w+l*Z;T=Math.round(V/x)}function k(){T=y-M;V=Math.round(T*x)}var m=a.parts.image,l="right"==a.data.align?-1:1,n=g.data.$.screenX,A=g.data.$.screenY,w=m.$.clientWidth,y=m.$.clientHeight,x=w/y,u=[],t="cke_image_s"+(~l?"e":"w"),K,V,T,Y,Z,M,R;b.fire("saveSnapshot");f("mousemove",function(a){K=a.data.$;Z=K.screenX-n;M=A-K.screenY;R=Math.abs(Z/M);1==l?0>=Z?0>=M?h():R>=x?h():k():0>=M?R>=x?k():h():k():0>=Z?0>=M?R>=
x?k():h():k():0>=M?h():R>=x?h():k();15<=V&&15<=T?(m.setAttributes({width:V,height:T}),Y=!0):Y=!1},u);f("mouseup",function(){for(var c;c=u.pop();)c.removeListener();d.removeClass(t);e.removeClass("cke_image_resizing");Y&&(a.setData({width:V,height:T}),b.fire("saveSnapshot"));Y=!1},u);d.addClass(t);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function k(a){var b=[],d;return function(c){var e=a.getCommand("justify"+
c);if(e){b.push(function(){e.refresh(a,a.elementPath())});if(c in{right:1,left:1,center:1})e.on("exec",function(d){var e=g(a);if(e){e.setData("align",c);for(e=b.length;e--;)b[e]();d.cancel()}});e.on("refresh",function(b){var e=g(a),f={right:1,left:1,center:1};e&&(void 0===d&&(d=a.filter.checkFeature(a.widgets.registered.image.features.align)),d?this.setState(e.data.align==c?CKEDITOR.TRISTATE_ON:c in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}
function d(a){if(a.plugins.link){var b=CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var d=b.onShow,c=b.onOk;b.onShow=function(){var b=g(a),c=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),c.hide()):(c.show(),d.apply(this,arguments))};b.onOk=function(){var b=g(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);
b.setData("link",d)}else c.apply(this,arguments)}}});a.on("destroy",function(){b.removeListener()});a.getCommand("unlink").on("exec",function(b){var d=g(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())});a.getCommand("unlink").on("refresh",function(b){var d=g(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}function g(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function m(a){var b=
a.config.image2_alignClasses;a={div:{match:h(a)},p:{match:h(a)},img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+a.config.image2_captionedClass},figcaption:!0};b?(a.div.classes=b[1],a.p.classes=a.div.classes,a.img.classes=b[0]+","+b[2],a.figure.classes+=","+a.img.classes):(a.div.styles="text-align",a.p.styles="text-align",a.img.styles="float",a.figure.styles="float,display");return a}function a(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+
(a?"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}}function n(a){return a.data.hasCaption?a.element:a.parts.image}var x=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),u={left:0,center:1,right:2},t=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')},
init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,d=a.lang.image2,c=e(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;c.pathName=d.pathName;c.editables.caption.pathName=d.pathNameCaption;a.widgets.add("image",c);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:d.menu,command:"image",
group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=k(a),e;for(e in b)c(e);d(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,g){var f={};e?f.attributes={"class":e[1]}:f.styles={"text-align":"center"};f=c.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",f);d(f,g);g.move(f);return f}function d(b,c){if(c.getParent()){var e=a.createRange();e.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);
c.remove();f.insertElementIntoRange(b,e)}else b.replace(c)}var c=a.document,e=a.config.image2_alignClasses,g=a.config.image2_captionedClass,f=a.editable(),h=["hasCaption","align","link"],k={align:function(d,c,g){var f=d.element;d.changed.align?d.newData.hasCaption||("center"==g&&(d.deflate(),d.element=b(a,f)),d.changed.hasCaption||"center"!=c||"center"==g||(d.deflate(),c=f.findOne("a,img"),c.replace(f),d.element=c)):"center"==g&&d.changed.hasCaption&&!d.newData.hasCaption&&(d.deflate(),d.element=
b(a,f));!e&&f.is("figure")&&("center"==g?f.setStyle("display","inline-block"):f.removeStyle("display"))},hasCaption:function(b,e,f){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),f?(f=CKEDITOR.dom.element.createFromHtml(x.output({captionedClass:g,captionPlaceholder:a.lang.image2.captionPlaceholder}),c),d(f,b.element),e.replace(f.findOne("img")),b.element=f):(e.replace(b.element),b.element=e))},link:function(b,d,e){if(b.changed.link){var g=b.element.is("img")?
b.element:b.element.findOne("img"),f=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(d||(k=c.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(g),g.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||f).setAttributes(e.set),e.removed.length&&(k||f).removeAttributes(e.removed)):(e=f.findOne("img"),e.replace(f),k=e);h&&(b.element=k)}}};return function(a){var b,d;
a.changed={};for(d=0;d<h.length;d++)b=h[d],a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:!1;for(d=0;d<h.length;d++)b=h[d],k[b](a,a.oldData?a.oldData[b]:null,a.newData[b]);a.inflate()}},checkHasNaturalRatio:function(a){var b=a.$;a=this.getNatural(a);return Math.round(b.clientWidth/a.width*a.height)==b.clientHeight||Math.round(b.clientHeight/a.height*a.width)==b.clientWidth},getNatural:function(a){if(a.$.naturalWidth)a={width:a.$.naturalWidth,height:a.$.naturalHeight};else{var b=new Image;b.src=
a.getAttribute("src");a={width:b.width,height:b.height}}return a},getLinkAttributesGetter:function(){return CKEDITOR.plugins.link.getLinkAttributes},getLinkAttributesParser:function(){return CKEDITOR.plugins.link.parseLinkAttributes}}}(),CKEDITOR.config.image2_captionedClass="image",function(){function e(e,b){var l,k;b.on("refresh",function(b){var e=[f],h;for(h in b.data.states)e.push(b.data.states[h]);this.setState(CKEDITOR.tools.search(e,c)?c:f)},b,null,100);b.on("exec",function(b){l=e.getSelection();
k=l.createBookmarks(1);b.data||(b.data={});b.data.done=!1},b,null,0);b.on("exec",function(){e.forceNextSelectionCheck();l.selectBookmarks(k)},b,null,100)}var f=CKEDITOR.TRISTATE_DISABLED,c=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(c){var b=CKEDITOR.plugins.indent.genericDefinition;e(c,c.addCommand("indent",new b(!0)));e(c,c.addCommand("outdent",new b));c.ui.addButton&&(c.ui.addButton("Indent",{label:c.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),
c.ui.addButton("Outdent",{label:c.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));c.on("dirChanged",function(b){var e=c.createRange(),d=b.data.node;e.setStartBefore(d);e.setEndAfter(d);for(var g=new CKEDITOR.dom.walker(e),f;f=g.next();)if(f.type==CKEDITOR.NODE_ELEMENT)if(!f.equals(d)&&f.getDirection())e.setStartAfter(f),g=new CKEDITOR.dom.walker(e);else{var a=c.config.indentClasses;if(a)for(var n="ltr"==b.data.dir?["_rtl",""]:["","_rtl"],x=0;x<a.length;x++)f.hasClass(a[x]+
n[0])&&(f.removeClass(a[x]+n[0]),f.addClass(a[x]+n[1]));a=f.getStyle("margin-right");n=f.getStyle("margin-left");a?f.setStyle("margin-left",a):f.removeStyle("margin-left");n?f.setStyle("margin-right",n):f.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(c){this.isIndent=!!c;this.startDisabled=!this.isIndent},specificDefinition:function(c,b,e){this.name=b;this.editor=c;this.jobs={};this.enterBr=c.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=
e?"indent":"outdent";this.indentKey=e?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(c,b){c.on("pluginsLoaded",function(){for(var c in b)(function(b,d){var c=b.getCommand(d.relatedGlobal),e;for(e in d.jobs)c.on("exec",function(a){a.data.done||(b.fire("lockSnapshot"),d.execJob(b,e)&&(a.data.done=!0),b.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(d.database))},this,null,e),c.on("refresh",function(a){a.data.states||(a.data.states={});a.data.states[d.name+"@"+e]=d.refreshJob(b,
e,a.data.path)},this,null,e);b.addFeature(d)})(this,b[c])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(c,b){var e=this.jobs[b];if(e.state!=f)return e.exec.call(this,c)},refreshJob:function(c,b,e){b=this.jobs[b];c.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,c,e):b.state=f;return b.state},getContext:function(c){return c.contains(this.context)}}}(),function(){function e(b){function e(g){for(var f=
l.startContainer,q=l.endContainer;f&&!f.getParent().equals(g);)f=f.getParent();for(;q&&!q.getParent().equals(g);)q=q.getParent();if(!f||!q)return!1;for(var B=[],w=!1;!w;)f.equals(q)&&(w=!0),B.push(f),f=f.getNext();if(1>B.length)return!1;f=g.getParents(!0);for(q=0;q<f.length;q++)if(f[q].getName&&k[f[q].getName()]){g=f[q];break}for(var f=h.isIndent?1:-1,q=B[0],B=B[B.length-1],w=CKEDITOR.plugins.list.listToArray(g,a),p=w[B.getCustomData("listarray_index")].indent,q=q.getCustomData("listarray_index");q<=
B.getCustomData("listarray_index");q++)if(w[q].indent+=f,0<f){for(var A=w[q].parent,u=q-1;0<=u;u--)if(w[u].indent===f){A=w[u].parent;break}w[q].parent=new CKEDITOR.dom.element(A.getName(),A.getDocument())}for(q=B.getCustomData("listarray_index")+1;q<w.length&&w[q].indent>p;q++)w[q].indent+=f;f=CKEDITOR.plugins.list.arrayToList(w,a,null,b.config.enterMode,g.getDirection());if(!h.isIndent){var z;if((z=g.getParent())&&z.is("li"))for(var B=f.listNode.getChildren(),t=[],E,q=B.count()-1;0<=q;q--)(E=B.getItem(q))&&
E.is&&E.is("li")&&t.push(E)}f&&f.listNode.replace(g);if(t&&t.length)for(q=0;q<t.length;q++){for(E=g=t[q];(E=E.getNext())&&E.is&&E.getName()in k;)CKEDITOR.env.needsNbspFiller&&!g.getFirst(c)&&g.append(l.document.createText(" ")),g.append(E);g.insertAfter(z)}f&&b.fire("contentDomInvalidated");return!0}for(var h=this,a=this.database,k=this.context,l,u=b.getSelection(),u=(u&&u.getRanges()).createIterator();l=u.getNextRange();){for(var t=l.getCommonAncestor();t&&(t.type!=CKEDITOR.NODE_ELEMENT||!k[t.getName()]);){if(b.editable().equals(t)){t=
!1;break}t=t.getParent()}t||(t=l.startPath().contains(k))&&l.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);if(!t){var p=l.getEnclosedNode();p&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()in k&&(l.setStartAt(p,CKEDITOR.POSITION_AFTER_START),l.setEndAt(p,CKEDITOR.POSITION_BEFORE_END),t=p)}t&&l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in k&&(p=new CKEDITOR.dom.walker(l),p.evaluator=f,l.startContainer=p.next());t&&l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in
k&&(p=new CKEDITOR.dom.walker(l),p.evaluator=f,l.endContainer=p.previous());if(t)return e(t)}return 0}function f(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.is("li")}function c(d){return h(d)&&b(d)}var h=CKEDITOR.dom.walker.whitespaces(!0),b=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.TRISTATE_DISABLED,k=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(a){f.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];a.on("key",
function(b){var d=a.elementPath();if("wysiwyg"==a.mode&&b.data.keyCode==this.indentKey&&d){var c=this.getContext(d);!c||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,d,c)||(a.execCommand(this.relatedGlobal),b.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:l}:function(a,b){return!this.getContext(b)||this.isIndent?l:k},
exec:CKEDITOR.tools.bind(e,this)}}var f=CKEDITOR.plugins.indent;f.registerCommands(b,{indentlist:new c(b,"indentlist",!0),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,f.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(b,c,e){var a=c.contains(f);e||(e=c.contains(b));return e&&a&&a.equals(e.getFirst(f))}}(),function(){function e(c,b){b=void 0===b||b;var e;if(b)e=c.getComputedStyle("text-align");
else{for(;!c.hasAttribute||!c.hasAttribute("align")&&!c.getStyle("text-align");){e=c.getParent();if(!e)break;c=e}e=c.getStyle("text-align")||c.getAttribute("align")||""}e&&(e=e.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!e&&b&&(e="rtl"==c.getComputedStyle("direction")?"right":"left");return e}function f(c,b,e){this.editor=c;this.name=b;this.value=e;this.context="p";b=c.config.justifyClasses;var f=c.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(e){case "left":this.cssClassName=
b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?\x3d$|\\s)");this.requiredContent=f+"("+this.cssClassName+")"}else this.requiredContent=f+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};c.config.enterMode==CKEDITOR.ENTER_BR&&
(this.allowedContent.div=!0)}function c(c){var b=c.editor,e=b.createRange();e.setStartBefore(c.data.node);e.setEndAfter(c.data.node);for(var f=new CKEDITOR.dom.walker(e),d;d=f.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(c.data.node)&&d.getDirection())e.setStartAfter(d),f=new CKEDITOR.dom.walker(e);else{var g=b.config.justifyClasses;g&&(d.hasClass(g[0])?(d.removeClass(g[0]),d.addClass(g[2])):d.hasClass(g[2])&&(d.removeClass(g[2]),d.addClass(g[0])));g=d.getStyle("text-align");"left"==g?d.setStyle("text-align",
"right"):"right"==g&&d.setStyle("text-align","left")}}f.prototype={exec:function(c){var b=c.getSelection(),f=c.config.enterMode;if(b){for(var k=b.createBookmarks(),d=b.getRanges(),g=this.cssClassName,m,a,n=c.config.useComputedState,n=void 0===n||n,x=d.length-1;0<=x;x--)for(m=d[x].createIterator(),m.enlargeBr=f!=CKEDITOR.ENTER_BR;a=m.getNextParagraph(f==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){var u=a.getName(),t;t=c.activeFilter.check(u+"{text-align}");if((u=c.activeFilter.check(u+"("+g+")"))||
t){a.removeAttribute("align");a.removeStyle("text-align");var p=g&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),r=this.state==CKEDITOR.TRISTATE_OFF&&(!n||e(a,!0)!=this.value);g&&u?r?a.addClass(g):p||a.removeAttribute("class"):r&&t&&a.setStyle("text-align",this.value)}}c.focus();c.forceNextSelectionCheck();b.selectBookmarks(k)}},refresh:function(c,b){var f=b.block||b.blockLimit,k=f.getName(),d=f.equals(c.editable()),k=this.cssClassName?c.activeFilter.check(k+"("+
this.cssClassName+")"):c.activeFilter.check(k+"{text-align}");d&&!CKEDITOR.dtd.$list[b.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!d&&k?this.setState(e(f,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(e){if(!e.blockless){var b=new f(e,"justifyleft","left"),l=new f(e,"justifycenter","center"),k=new f(e,"justifyright","right"),d=new f(e,"justifyblock",
"justify");e.addCommand("justifyleft",b);e.addCommand("justifycenter",l);e.addCommand("justifyright",k);e.addCommand("justifyblock",d);e.ui.addButton&&(e.ui.addButton("JustifyLeft",{label:e.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),e.ui.addButton("JustifyCenter",{label:e.lang.common.center,command:"justifycenter",toolbar:"align,20"}),e.ui.addButton("JustifyRight",{label:e.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),e.ui.addButton("JustifyBlock",{label:e.lang.common.justify,
command:"justifyblock",toolbar:"align,40"}));e.on("dirChanged",c)}}})}(),CKEDITOR.plugins.add("menubutton",{requires:"button,menu",onLoad:function(){var e=function(e){var c=this._,h=c.menu;c.state!==CKEDITOR.TRISTATE_DISABLED&&(c.on&&h?h.hide():(c.previousState=c.state,h||(h=c.menu=new CKEDITOR.menu(e,{panel:{className:"cke_menu_panel",attributes:{"aria-label":e.lang.common.options}}}),h.onHide=CKEDITOR.tools.bind(function(){var b=this.command?e.getCommand(this.command).modes:this.modes;this.setState(!b||
b[e.mode]?c.previousState:CKEDITOR.TRISTATE_DISABLED);c.on=0},this),this.onMenu&&h.addListener(this.onMenu)),this.setState(CKEDITOR.TRISTATE_ON),c.on=1,setTimeout(function(){h.show(CKEDITOR.document.getById(c.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(f){delete f.panel;this.base(f);this.hasArrow="menu";this.click=e},statics:{handler:{create:function(e){return new CKEDITOR.ui.menuButton(e)}}}})},beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_MENUBUTTON,
CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",{requires:"menubutton",init:function(e){var f=e.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],c=this,h=e.lang.language,b={},l,k,d,g;e.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(d,a){var c=b["language_"+a];if(c)d[c.style.checkActive(d.elementPath(),d)?"removeStyle":"applyStyle"](c.style)},
refresh:function(b){this.setState(c.getCurrentLangElement(b)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(g=0;g<f.length;g++)l=f[g].split(":"),k=l[0],d="language_"+k,b[d]={label:l[1],langId:k,group:"language",order:g,ltr:"rtl"!=(""+l[2]).toLowerCase(),onClick:function(){e.execCommand("language",this.langId)},role:"menuitemcheckbox"},b[d].style=new CKEDITOR.style({element:"span",attributes:{lang:k,dir:b[d].ltr?"ltr":"rtl"}});b.language_remove={label:h.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,
order:b.length,onClick:function(){var b=c.getCurrentLangElement(e);b&&e.execCommand("language",b.getAttribute("lang"))}};e.addMenuGroup("language",1);e.addMenuGroup("language_remove");e.addMenuItems(b);e.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:h.button,allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",toolbar:"bidi,30",command:"language",onMenu:function(){var d={},a=c.getCurrentLangElement(e),g;for(g in b)d[g]=CKEDITOR.TRISTATE_OFF;d.language_remove=a?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED;a&&(d["language_"+a.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return d}});e.addRemoveFormatFilter&&e.addRemoveFormatFilter(function(b){return!(b.is("span")&&b.getAttribute("dir")&&b.getAttribute("lang"))})},getCurrentLangElement:function(e){var f=e.elementPath();e=f&&f.elements;var c;if(f)for(var h=0;h<e.length;h++)f=e[h],!c&&"span"==f.getName()&&f.hasAttribute("dir")&&f.hasAttribute("lang")&&(c=f);return c}})}(),function(){function e(a,b,d,c){for(var e=CKEDITOR.plugins.list.listToArray(b.root,
d),g=[],f=0;f<b.contents.length;f++){var h=b.contents[f];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(g.push(h),CKEDITOR.dom.element.setMarker(d,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,m,f=0;f<g.length;f++){var l=g[f].getCustomData("listarray_index");k=e[l].parent;k.is(this.type)||(m=h.createElement(this.type),k.copyAttributes(m,{start:1,type:1}),m.removeStyle("list-style-type"),e[l].parent=m)}d=CKEDITOR.plugins.list.arrayToList(e,d,null,a.config.enterMode);
for(var n,e=d.listNode.getChildCount(),f=0;f<e&&(n=d.listNode.getChild(f));f++)n.getName()==this.type&&c.push(n);d.listNode.replace(b.root);a.fire("contentDomInvalidated")}function f(a,b,d){var c=b.contents,e=b.root.getDocument(),g=[];if(1==c.length&&c[0].equals(b.root)){var f=e.createElement("div");c[0].moveChildren&&c[0].moveChildren(f);c[0].append(f);c[0]=f}b=b.contents[0].getParent();for(f=0;f<c.length;f++)b=b.getCommonAncestor(c[f].getParent());a=a.config.useComputedState;var h,k;a=void 0===
a||a;for(f=0;f<c.length;f++)for(var m=c[f],l;l=m.getParent();){if(l.equals(b)){g.push(m);!k&&m.getDirection()&&(k=1);m=m.getDirection(a);null!==h&&(h=h&&h!=m?null:m);break}m=l}if(!(1>g.length)){c=g[g.length-1].getNext();f=e.createElement(this.type);for(d.push(f);g.length;)d=g.shift(),a=e.createElement("li"),m=d,m.is("pre")||t.test(m.getName())||"false"==m.getAttribute("contenteditable")?d.appendTo(a):(d.copyAttributes(a),h&&d.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),d.moveChildren(a),
d.remove()),a.appendTo(f);h&&k&&f.setAttribute("dir",h);c?f.insertBefore(c):f.appendTo(b)}}function c(a,b,d){function c(d){if(!(!(m=k[d?"getFirst":"getLast"]())||m.is&&m.isBlockBoundary()||!(l=b.root[d?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||l.is&&l.isBlockBoundary({br:1})))a.document.createElement("br")[d?"insertBefore":"insertAfter"](m)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,d),g=[],f=0;f<b.contents.length;f++){var h=b.contents[f];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&
(g.push(h),CKEDITOR.dom.element.setMarker(d,h,"list_item_processed",!0))}h=null;for(f=0;f<g.length;f++)h=g[f].getCustomData("listarray_index"),e[h].indent=-1;for(f=h+1;f<e.length;f++)if(e[f].indent>e[f-1].indent+1){g=e[f-1].indent+1-e[f].indent;for(h=e[f].indent;e[f]&&e[f].indent>=h;)e[f].indent+=g,f++;f--}var k=CKEDITOR.plugins.list.arrayToList(e,d,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,m,l;c(!0);c();k.replace(b.root);a.fire("contentDomInvalidated")}function h(a,b){this.name=
a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function b(a,b,d,c){for(var e,g;e=a[c?"getLast":"getFirst"](p);)(g=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",g),e.remove(),d?e[c?"insertBefore":"insertAfter"](d):b.append(e,c),d=e}function l(a){function d(c){var e=a[c?"getPrevious":"getNext"](x);e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a.getName())&&(b(a,e,null,!c),a.remove(),a=e)}d();d(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 d(a,d,c){a.fire("saveSnapshot");c.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var e=c.extractContents();d.trim(!1,!0);var f=d.createBookmark(),h=new CKEDITOR.dom.elementPath(d.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,m=new CKEDITOR.dom.elementPath(c.startContainer),n=m.contains(CKEDITOR.dtd.$listItem),m=m.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():m&&(k=m.getPrevious(x))&&
u(k)&&k.remove();(k=e.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=d.startContainer.getChild(d.startOffset))?e.insertBefore(k):d.startContainer.append(e);n&&(e=g(n))&&(h.contains(n)?(b(e,n.getParent(),n),e.remove()):h.append(e));for(;c.checkStartOfBlock()&&c.checkEndOfBlock();){m=c.startPath();e=m.block;if(!e)break;e.is("li")&&(h=e.getParent(),e.equals(h.getLast(x))&&e.equals(h.getFirst(x))&&(e=h));c.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove()}c=c.clone();e=
a.editable();c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=function(a){return x(a)&&!u(a)};(c=c.next())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in CKEDITOR.dtd.$list&&l(c);d.moveToBookmark(f);d.select();a.fire("saveSnapshot")}function g(a){return(a=a.getLast(x))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in m?a:null}var m={ol:1,ul:1},a=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),x=function(b){return!(a(b)||n(b))},u=CKEDITOR.dom.walker.bogus();
CKEDITOR.plugins.list={listToArray:function(a,b,d,c,e){if(!m[a.getName()])return[];c||(c=0);d||(d=[]);for(var g=0,f=a.getChildCount();g<f;g++){var h=a.getChild(g);h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(h,b,d,c+1);if("li"==h.$.nodeName.toLowerCase()){var k={parent:a,indent:c,element:h,contents:[]};e?k.grandparent=e:(k.grandparent=a.getParent(),k.grandparent&&"li"==k.grandparent.$.nodeName.toLowerCase()&&(k.grandparent=k.grandparent.getParent()));
b&&CKEDITOR.dom.element.setMarker(b,h,"listarray_index",d.length);d.push(k);for(var l=0,n=h.getChildCount(),p;l<n;l++)p=h.getChild(l),p.type==CKEDITOR.NODE_ELEMENT&&m[p.getName()]?CKEDITOR.plugins.list.listToArray(p,b,d,c+1,k.grandparent):k.contents.push(p)}}return d},arrayToList:function(a,b,d,c,e){d||(d=0);if(!a||a.length<d+1)return null;for(var g,f=a[d].parent.getDocument(),h=new CKEDITOR.dom.documentFragment(f),k=null,l=d,p=Math.max(a[d].indent,0),u=null,t,G,L=c==CKEDITOR.ENTER_P?"p":"div";;){var I=
a[l];g=I.grandparent;t=I.element.getDirection(1);if(I.indent==p){k&&a[l].parent.getName()==k.getName()||(k=a[l].parent.clone(!1,1),e&&k.setAttribute("dir",e),h.append(k));u=k.append(I.element.clone(0,1));t!=k.getDirection(1)&&u.setAttribute("dir",t);for(g=0;g<I.contents.length;g++)u.append(I.contents[g].clone(1,1));l++}else if(I.indent==Math.max(p,0)+1)I=a[l-1].element.getDirection(1),l=CKEDITOR.plugins.list.arrayToList(a,null,l,c,I!=t?t:null),!u.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=
f.$.documentMode&&u.append(f.createText(" ")),u.append(l.listNode),l=l.nextIndex;else if(-1==I.indent&&!d&&g){m[g.getName()]?(u=I.element.clone(!1,!0),t!=g.getDirection(1)&&u.setAttribute("dir",t)):u=new CKEDITOR.dom.documentFragment(f);var k=g.getDirection(1)!=t,C=I.element,S=C.getAttribute("class"),O=C.getAttribute("style"),P=u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(c!=CKEDITOR.ENTER_BR||k||O||S),K,V=I.contents.length,T;for(g=0;g<V;g++)if(K=I.contents[g],n(K)&&1<V)P?T=K.clone(1,1):u.append(K.clone(1,
1));else if(K.type==CKEDITOR.NODE_ELEMENT&&K.isBlockBoundary()){k&&!K.getDirection()&&K.setAttribute("dir",t);G=K;var Y=C.getAttribute("style");Y&&G.setAttribute("style",Y.replace(/([^;])$/,"$1;")+(G.getAttribute("style")||""));S&&K.addClass(S);G=null;T&&(u.append(T),T=null);u.append(K.clone(1,1))}else P?(G||(G=f.createElement(L),u.append(G),k&&G.setAttribute("dir",t)),O&&G.setAttribute("style",O),S&&G.setAttribute("class",S),T&&(G.append(T),T=null),G.append(K.clone(1,1))):u.append(K.clone(1,1));
T&&((G||u).append(T),T=null);u.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&l!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(t=u.getLast())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("br")&&t.remove(),(t=u.getLast(x))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is(CKEDITOR.dtd.$block)||u.append(f.createElement("br")));t=u.$.nodeName.toLowerCase();"div"!=t&&"p"!=t||u.appendBogus();h.append(u);k=null;l++}else return null;G=null;if(a.length<=l||Math.max(a[l].indent,0)<p)break}if(b)for(a=h.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&
(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(d=a,f=e=c=void 0,c=d.getDirection()))){for(e=d.getParent();e&&!(f=e.getDirection());)e=e.getParent();c==f&&d.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:h,nextIndex:l}}};var t=/^h[1-6]$/,p=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);h.prototype={exec:function(a){function b(a){return m[a.root.getName()]&&!d(a.root,[CKEDITOR.NODE_COMMENT])}function d(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),
function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function g(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(a,a.elementPath());var h=a.config,k=a.getSelection(),n=k&&k.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var p=a.editable();if(p.getFirst(x)){var u=1==n.length&&n[0];(h=u&&u.getEnclosedNode())&&h.is&&this.type==h.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else h.enterMode==
CKEDITOR.ENTER_BR?p.appendBogus():n[0].fixBlock(1,h.enterMode==CKEDITOR.ENTER_P?"p":"div"),k.selectRanges(n)}for(var h=k.createBookmarks(!0),p=[],t={},n=n.createIterator(),E=0;(u=n.getNextRange())&&++E;){var H=u.getBoundaryNodes(),F=H.startNode,G=H.endNode;F.type==CKEDITOR.NODE_ELEMENT&&"td"==F.getName()&&u.setStartAt(H.startNode,CKEDITOR.POSITION_AFTER_START);G.type==CKEDITOR.NODE_ELEMENT&&"td"==G.getName()&&u.setEndAt(H.endNode,CKEDITOR.POSITION_BEFORE_END);u=u.createIterator();for(u.forceBrBreak=
this.state==CKEDITOR.TRISTATE_OFF;H=u.getNextParagraph();)if(!H.getCustomData("list_block")&&!g(H)){CKEDITOR.dom.element.setMarker(t,H,"list_block",1);for(var L=a.elementPath(H),F=L.elements,G=0,L=L.blockLimit,I,C=F.length-1;0<=C&&(I=F[C]);C--)if(m[I.getName()]&&L.contains(I)){L.removeCustomData("list_group_object_"+E);(F=I.getCustomData("list_group_object"))?F.contents.push(H):(F={root:I,contents:[H]},p.push(F),CKEDITOR.dom.element.setMarker(t,I,"list_group_object",F));G=1;break}G||(G=L,G.getCustomData("list_group_object_"+
E)?G.getCustomData("list_group_object_"+E).contents.push(H):(F={root:G,contents:[H]},CKEDITOR.dom.element.setMarker(t,G,"list_group_object_"+E,F),p.push(F)))}}for(I=[];0<p.length;)F=p.shift(),this.state==CKEDITOR.TRISTATE_OFF?b(F)||(m[F.root.getName()]?e.call(this,a,F,t,I):f.call(this,a,F,I)):this.state==CKEDITOR.TRISTATE_ON&&m[F.root.getName()]&&!b(F)&&c.call(this,a,F,t);for(C=0;C<I.length;C++)l(I[C]);CKEDITOR.dom.element.clearAllMarkers(t);k.selectBookmarks(h);a.focus()},refresh:function(a,b){var d=
b.contains(m,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 h("numberedlist","ol")),a.addCommand("bulletedlist",new h("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(),e;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var f=a.getSelection().getRanges()[0],h=f&&f.startPath();if(f&&f.collapsed){var l=8==c,n=a.editable(),p=new CKEDITOR.dom.walker(f.clone());p.evaluator=function(a){return x(a)&&!u(a)};p.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=f.clone();if(l){var t;(t=h.contains(m))&&f.checkBoundaryOfElement(t,
CKEDITOR.START)&&(t=t.getParent())&&t.is("li")&&(t=g(t))?(e=t,t=t.getPrevious(x),c.moveToPosition(t&&u(t)?t:e,CKEDITOR.POSITION_BEFORE_START)):(p.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),p.range.setEnd(f.startContainer,f.startOffset),(t=p.previous())&&t.type==CKEDITOR.NODE_ELEMENT&&(t.getName()in m||t.is("li"))&&(t.is("li")||(p.range.selectNodeContents(t),p.reset(),p.evaluator=k,t=p.previous()),e=t,c.moveToElementEditEnd(e),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));
if(e)d(a,c,f),b.cancel();else{var E=h.contains(m);E&&f.checkBoundaryOfElement(E,CKEDITOR.START)&&(e=E.getFirst(x),f.checkBoundaryOfElement(e,CKEDITOR.START)&&(t=E.getPrevious(x),g(e)?t&&(f.moveToElementEditEnd(t),f.select()):a.execCommand("outdent"),b.cancel()))}}else if(e=h.contains("li")){if(p.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),l=(n=e.getLast(x))&&k(n)?n:e,h=0,(t=p.next())&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in m&&t.equals(n)?(h=1,t=p.next()):f.checkBoundaryOfElement(l,CKEDITOR.END)&&
(h=2),h&&t){f=f.clone();f.moveToElementEditStart(t);if(1==h&&(c.optimize(),!c.startContainer.equals(e))){for(e=c.startContainer;e.is(CKEDITOR.dtd.$inline);)E=e,e=e.getParent();E&&c.moveToPosition(E,CKEDITOR.POSITION_AFTER_END)}2==h&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),f.endPath().block&&f.moveToPosition(f.endPath().block,CKEDITOR.POSITION_AFTER_START));d(a,c,f);b.cancel()}}else p.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(t=p.next())&&t.type==CKEDITOR.NODE_ELEMENT&&
t.is(m)&&(t=t.getFirst(x),h.block&&f.checkStartOfBlock()&&f.checkEndOfBlock()?(h.block.remove(),f.moveToElementEditStart(t),f.select()):g(t)?(f.moveToElementEditStart(t),f.select()):(f=f.clone(),f.moveToElementEditStart(t),d(a,c,f)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),"use strict",function(){function e(a,b,d){return n(b)&&n(d)&&d.equals(b.getNext(function(a){return!(ca(a)||da(a)||x(a))}))}function f(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 h(a,b,d){w(a,b);w(a,d);a=b.size.bottom;d=d.size.top;return a&&d?0|(a+d)/2:a||d}function b(b,d,c){return d=d[c?"getPrevious":"getNext"](function(d){return d&&d.type==CKEDITOR.NODE_TEXT&&!ca(d)||n(d)&&!x(d)&&!a(b,d)})}function l(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 d(a){var b=a.doc,d=E('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+W+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),c=CKEDITOR.getUrl(this.path+"images/"+(H.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");z(d,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[z(E('\x3cspan title\x3d"'+
a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:W+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+c+") center no-repeat "+a.boxColor+";cursor:pointer;"+(H.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(H.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),z(E(Q,b),{base:U+
"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"]}),z(E(Q,b),{base:U+"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(){w(a,this);var b=a.holdDistance,d=this.size;return d&&l(a.mouse.y,
d.top-b,d.bottom+b)&&l(a.mouse.x,d.left-b,d.right+b)?!0:!1},place:function(){var b=a.view,d=a.editable,c=a.trigger,e=c.upper,g=c.lower,f=e||g,h=f.getParent(),k={};this.trigger=c;e&&w(a,e,!0);g&&w(a,g,!0);w(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=f.size.left-f.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=f.size.outerWidth+f.size.margin.left+f.size.margin.right+b.scroll.x,k.right="");e&&g?
k.top=e.size.margin.bottom===g.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<g.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-g.size.margin.top:e?g||(k.top=e.size.bottom+e.size.margin.bottom):k.top=g.size.top-g.size.margin.top;c.is(P)||l(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(P)):c.is(K)||l(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(K)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(V));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var m in k)k[m]=CKEDITOR.tools.cssLength(k[m]);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 J("span",a.doc)});for(b=d.lineChildren.length;b--;)d.lineChildren[b].appendTo(d);
d.look(V);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(b){d.detach();g(a,function(b){var d=a.line.trigger;b[d.is(I)?"insertBefore":"insertAfter"](d.is(I)?d.lower:d.upper)},!0);a.editor.focus();H.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});d.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=d}function g(a,b,d){var c=new CKEDITOR.dom.range(a.doc),e=a.editor,g;H.ie&&a.enterMode==CKEDITOR.ENTER_BR?g=a.doc.createText(T):
(g=(g=k(a.element,!0))&&g.data("cke-enter-mode")||a.enterMode,g=new J(L[g],a.doc),g.is("br")||a.doc.createText(T).appendTo(g));d&&e.fire("saveSnapshot");b(g);c.moveToPosition(g,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([c]);a.hotNode=g;d&&e.fire("saveSnapshot")}function m(a,d){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function e(b){var c=H.ie&&9>H.version?" ":T,f=a.hotNode&&a.hotNode.getText()==c&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!d;g(a,function(c){f&&
a.hotNode&&a.hotNode.remove();c[d?"insertAfter":"insertBefore"](b);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!d});a.lastCmdDirection=!!d});H.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(g){g=g.getSelection().getStartElement();var f;g=g.getAscendant(R,1);if(!p(a,g)&&g&&!g.equals(a.editable)&&!g.contains(a.editable)){(f=k(g))&&"false"==f.getAttribute("contenteditable")&&(g=f);a.element=g;f=b(a,g,!d);var h;n(f)&&f.is(a.triggers)&&
f.is(M)&&(!b(a,f,!d)||(h=b(a,f,!d))&&n(h)&&h.is(a.triggers))?e(f):(h=c(a,g),n(h)&&(b(a,h,!d)?(g=b(a,h,!d))&&n(g)&&g.is(a.triggers)&&e(h):e(h)))}}}()}}function a(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 x(a){if(!n(a))return!1;var b;(b=u(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function u(a){return!!{absolute:1,
fixed:1}[a.getComputedStyle("position")]}function t(a,b){return n(b)?b.is(a.triggers):null}function p(a,b){if(!b)return!1;for(var d=b.getParents(1),c=d.length;c--;)for(var e=a.tabuList.length;e--;)if(d[c].hasAttribute(a.tabuList[e]))return!0;return!1}function r(a,b,d){b=b[d?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(Z)});if(!b)return!1;w(a,b);return d?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function v(b){var d=b.editable,c=b.mouse,e=b.view,g=b.triggerOffset;y(b);var h=c.y>
(b.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),d=d[h?"getLast":"getFirst"](function(a){return!(ca(a)||da(a))});if(!d)return null;a(b,d)&&(d=b.line.wrap[h?"getPrevious":"getNext"](function(a){return!(ca(a)||da(a))}));if(!n(d)||x(d)||!t(b,d))return null;w(b,d);return!h&&0<=d.size.top&&l(c.y,0,d.size.top+g)?(b=b.inInlineMode||0===e.scroll.y?P:V,new f([null,d,I,O,b])):h&&d.size.bottom<=e.pane.height&&l(c.y,d.size.bottom-g,e.pane.height)?(b=b.inInlineMode||
l(d.size.bottom,e.pane.height-g,e.pane.height)?K:V,new f([d,null,C,O,b])):null}function q(a){var d=a.mouse,e=a.view,g=a.triggerOffset,h=c(a);if(!h)return null;w(a,h);var g=Math.min(g,0|h.size.outerHeight/2),k=[],m,q;if(l(d.y,h.size.top-1,h.size.top+g))q=!1;else if(l(d.y,h.size.bottom-g,h.size.bottom+1))q=!0;else return null;if(x(h)||r(a,h,q)||h.getParent().is(Y))return null;var p=b(a,h,!q);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(x(p)||!t(a,p)||p.getParent().is(Y))return null;
k=[p,h][q?"reverse":"concat"]().concat([S,O])}}else h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?(y(a),q&&l(d.y,h.size.bottom-g,e.pane.height)&&l(h.size.bottom,e.pane.height-g,e.pane.height)?m=K:l(d.y,0,h.size.top+g)&&(m=P)):m=V,k=[null,h][q?"reverse":"concat"]().concat([q?C:I,O,m,h.equals(a.editable[q?"getLast":"getFirst"](a.isRelevant))?q?K:P:V]);return 0 in k?new f(k):null}function B(a,b,d,c){for(var e=b.getDocumentPosition(),g={},f={},h={},k={},m=ea.length;m--;)g[ea[m]]=parseInt(b.getComputedStyle.call(b,
"border-"+ea[m]+"-width"),10)||0,h[ea[m]]=parseInt(b.getComputedStyle.call(b,"padding-"+ea[m]),10)||0,f[ea[m]]=parseInt(b.getComputedStyle.call(b,"margin-"+ea[m]),10)||0;d&&!c||A(a,c);k.top=e.y-(d?0:a.view.scroll.y);k.left=e.x-(d?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+g.top+g.bottom);k.width=k.outerWidth-(h.left+h.right+g.left+g.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,
left:b.$.scrollLeft});return z({border:g,padding:h,margin:f,ignoreScroll:d},k,!0)}function w(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-N)return null;return z(b.size,B(a,b,d),{date:+new Date},!0)}function y(a,b){a.view.editable=B(a,a.editable,b,!0)}function A(a,b){a.view||(a.view={});var d=a.view;if(!(!b&&d&&d.date>new Date-N)){var c=a.win,d=c.getScrollPosition(),c=c.getViewPaneSize();z(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 D(a,b,d,c){for(var e=c,g=c,h=0,k=!1,m=!1,l=a.view.pane.height,q=a.mouse;q.y+h<l&&0<q.y-h;){k||(k=b(e,c));m||(m=b(g,c));!k&&0<q.y-h&&(e=d(a,{x:q.x,y:q.y-h}));!m&&q.y+h<l&&(g=d(a,{x:q.x,y:q.y+h}));if(k&&m)break;h+=2}return new f([e,g,null,null])}CKEDITOR.plugins.add("magicline",{init:function(e){var h=e.config,k=h.magicline_triggerOffset||30,l={editor:e,
enterMode:h.enterMode,triggerOffset:k,holdDistance:0|k*(h.magicline_holdDistance||.5),boxColor:h.magicline_color||"#ff0000",rtl:"rtl"==h.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(h.magicline_tabuList||[]),triggers:h.magicline_everywhere?R:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},r,t,w;l.isRelevant=function(b){return n(b)&&!a(l,b)&&!x(b)};e.on("contentDom",function(){var k=e.editable(),n=e.document,x=e.window;z(l,{editable:k,inInlineMode:k.isInline(),doc:n,win:x,
hotNode:null},!0);l.boundary=l.inInlineMode?l.editable:l.doc.getDocumentElement();k.is(G.$inline)||(l.inInlineMode&&!u(k)&&k.setStyles({position:"relative",top:null,left:null}),d.call(this,l),A(l),k.attachListener(e,"beforeUndoImage",function(){l.line.detach()}),k.attachListener(e,"beforeGetData",function(){l.line.wrap.getParent()&&(l.line.detach(),e.once("getData",function(){l.line.attach()},null,null,1E3))},null,null,0),k.attachListener(l.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(a){if("wysiwyg"==
e.mode)if(l.inInlineMode){var b=a.data.$.clientX;a=a.data.$.clientY;A(l);y(l,!0);var d=l.view.editable,c=l.view.scroll;b>d.left-c.x&&b<d.right-c.x&&a>d.top-c.y&&a<d.bottom-c.y||(clearTimeout(w),w=null,l.line.detach())}else clearTimeout(w),w=null,l.line.detach()}),k.attachListener(k,"keyup",function(){l.hiddenMode=0}),k.attachListener(k,"keydown",function(a){if("wysiwyg"==e.mode)switch(a.data.getKeystroke()){case 2228240:case 16:l.hiddenMode=1,l.line.detach()}}),k.attachListener(l.inInlineMode?k:n,
"mousemove",function(a){t=!0;if("wysiwyg"==e.mode&&!e.readOnly&&!w){var b={x:a.data.$.clientX,y:a.data.$.clientY};w=setTimeout(function(){l.mouse=b;w=l.trigger=null;A(l);t&&!l.hiddenMode&&e.focusManager.hasFocus&&!l.line.mouseNear()&&(l.element=X(l,!0))&&((l.trigger=v(l)||q(l)||ba(l))&&!p(l,l.trigger.upper||l.trigger.lower)?l.line.attach().place():(l.trigger=null,l.line.detach()),t=!1)},30)}}),k.attachListener(x,"scroll",function(){"wysiwyg"==e.mode&&(l.line.detach(),H.webkit&&(l.hiddenMode=1,clearTimeout(r),
r=setTimeout(function(){l.mouseDown||(l.hiddenMode=0)},50)))}),k.attachListener(F?n:x,"mousedown",function(){"wysiwyg"==e.mode&&(l.line.detach(),l.hiddenMode=1,l.mouseDown=1)}),k.attachListener(F?n:x,"mouseup",function(){l.hiddenMode=0;l.mouseDown=0}),e.addCommand("accessPreviousSpace",m(l)),e.addCommand("accessNextSpace",m(l,!0)),e.setKeystroke([[h.magicline_keystrokePrevious,"accessPreviousSpace"],[h.magicline_keystrokeNext,"accessNextSpace"]]),e.on("loadSnapshot",function(){var a,b,d,c;for(c in{p:1,
br:1,div:1})for(a=e.document.getElementsByTag(c),d=a.count();d--;)if((b=a.getItem(d)).data("cke-magicline-hot")){l.hotNode=b;l.lastCmdDirection="true"===b.data("cke-magicline-dir")?!0:!1;return}}),e._.magiclineBackdoor={accessFocusSpace:g,boxTrigger:f,isLine:a,getAscendantTrigger:c,getNonEmptyNeighbour:b,getSize:B,that:l,triggerEdge:q,triggerEditable:v,triggerExpand:ba})},this)}});var z=CKEDITOR.tools.extend,J=CKEDITOR.dom.element,E=J.createFromHtml,H=CKEDITOR.env,F=CKEDITOR.env.ie&&9>CKEDITOR.env.version,
G=CKEDITOR.dtd,L={},I=128,C=64,S=32,O=16,P=4,K=2,V=1,T=" ",Y=G.$listItem,Z=G.$tableContent,M=z({},G.$nonEditable,G.$empty),R=G.$block,N=100,W="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",U=W+"border-color:transparent;display:block;border-style:solid;",Q="\x3cspan\x3e"+T+"\x3c/span\x3e";L[CKEDITOR.ENTER_BR]="br";L[CKEDITOR.ENTER_P]="p";L[CKEDITOR.ENTER_DIV]="div";f.prototype={set:function(a,b,d){this.properties=
a+b+(d||V);return this},is:function(a){return(this.properties&a)==a}};var X=function(){function b(a,d){var c=a.$.elementFromPoint(d.x,d.y);return c&&c.nodeType?new CKEDITOR.dom.element(c):null}return function(d,c,e){if(!d.mouse)return null;var g=d.doc,f=d.line.wrap;e=e||d.mouse;var h=b(g,e);c&&a(d,h)&&(f.hide(),h=b(g,e),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||H.ie&&9>H.version&&!d.boundary.equals(h)&&!d.boundary.contains(h)?null:h}}(),ca=CKEDITOR.dom.walker.whitespaces(),da=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
ba=function(){function b(a){var c=a.element,g,f,k;if(!n(c)||c.contains(a.editable)||c.isReadOnly())return null;k=D(a,function(a,b){return!b.equals(a)},function(a,b){return X(a,!0,b)},c);g=k.upper;f=k.lower;if(e(a,g,f))return k.set(S,8);if(g&&c.contains(g))for(;!g.getParent().equals(c);)g=g.getParent();else g=c.getFirst(function(b){return d(a,b)});if(f&&c.contains(f))for(;!f.getParent().equals(c);)f=f.getParent();else f=c.getLast(function(b){return d(a,b)});if(!g||!f)return null;w(a,g);w(a,f);if(!l(a.mouse.y,
g.size.top,f.size.bottom))return null;for(var c=Number.MAX_VALUE,m,q,r,p;f&&!f.equals(g)&&(q=g.getNext(a.isRelevant));)m=Math.abs(h(a,g,q)-a.mouse.y),m<c&&(c=m,r=g,p=q),g=q,w(a,g);if(!r||!p||!l(a.mouse.y,r.size.top,p.size.bottom))return null;k.upper=r;k.lower=p;return k.set(S,8)}function d(b,c){return!(c&&c.type==CKEDITOR.NODE_TEXT||da(c)||x(c)||a(b,c)||c.type==CKEDITOR.NODE_ELEMENT&&c.$&&c.is("br"))}return function(a){var d=b(a),c;if(c=d){c=d.upper;var g=d.lower;c=!c||!g||x(g)||x(c)||g.equals(c)||
c.equals(g)||g.contains(c)||c.contains(g)?!1:t(a,c)&&t(a,g)&&e(a,c,g)?!0:!1}return c?d:null}}(),ea=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function e(b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||"form"!=b.getName())return[];for(var c=[],d=["style","className"],e=0;e<d.length;e++){var f=b.$.elements.namedItem(d[e]);f&&(f=new CKEDITOR.dom.element(f),c.push([f,
f.nextSibling]),f.remove())}return c}function f(b,c){if(b&&b.type==CKEDITOR.NODE_ELEMENT&&"form"==b.getName()&&0<c.length)for(var d=c.length-1;0<=d;d--){var e=c[d][0],f=c[d][1];f?e.insertBefore(f):e.appendTo(b)}}function c(b,c){var d=e(b),g={},h=b.$;c||(g["class"]=h.className||"",h.className="");g.inline=h.style.cssText||"";c||(h.style.cssText="position: static; overflow: visible");f(d);return g}function h(b,c){var d=e(b),g=b.$;"class"in c&&(g.className=c["class"]);"inline"in c&&(g.style.cssText=
c.inline);f(d)}function b(b){if(!b.editable().isInline()){var c=CKEDITOR.instances,d;for(d in c){var e=c[d];"wysiwyg"!=e.mode||e.readOnly||(e=e.document.getBody(),e.setAttribute("contentEditable",!1),e.setAttribute("contentEditable",!0))}b.editable().hasFocus&&(b.toolbox.focus(),b.focus())}}CKEDITOR.plugins.add("maximize",{init:function(e){function f(){var a=m.getViewPaneSize();e.resize(a.width,a.height,null,!0)}if(e.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var d=e.lang,g=CKEDITOR.document,m=g.getWindow(),
a,n,x,u=CKEDITOR.TRISTATE_OFF;e.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var t=e.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),p=e.ui.space("contents");if("wysiwyg"==e.mode){var r=e.getSelection();a=r&&r.getRanges();n=m.getScrollPosition()}else{var v=e.editable().$;a=!CKEDITOR.env.ie&&[v.selectionStart,v.selectionEnd];n=[v.scrollLeft,v.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){m.on("resize",
f);x=m.getScrollPosition();for(r=e.container;r=r.getParent();)r.setCustomData("maximize_saved_styles",c(r)),r.setStyle("z-index",e.config.baseFloatZIndex-5);p.setCustomData("maximize_saved_styles",c(p,!0));t.setCustomData("maximize_saved_styles",c(t,!0));p={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};g.getDocumentElement().setStyles(p);!CKEDITOR.env.gecko&&g.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||g.getBody().setStyles(p);CKEDITOR.env.ie?
setTimeout(function(){m.$.scrollTo(0,0)},0):m.$.scrollTo(0,0);t.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");t.$.offsetLeft;t.setStyles({"z-index":e.config.baseFloatZIndex-5,left:"0px",top:"0px"});t.addClass("cke_maximized");f();p=t.getDocumentPosition();t.setStyles({left:-1*p.x+"px",top:-1*p.y+"px"});CKEDITOR.env.gecko&&b(e)}else if(this.state==CKEDITOR.TRISTATE_ON){m.removeListener("resize",f);for(var r=[p,t],q=0;q<r.length;q++)h(r[q],r[q].getCustomData("maximize_saved_styles")),
r[q].removeCustomData("maximize_saved_styles");for(r=e.container;r=r.getParent();)h(r,r.getCustomData("maximize_saved_styles")),r.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){m.$.scrollTo(x.x,x.y)},0):m.$.scrollTo(x.x,x.y);t.removeClass("cke_maximized");CKEDITOR.env.webkit&&(t.setStyle("display","inline"),setTimeout(function(){t.setStyle("display","block")},0));e.fire("resize",{outerHeight:e.container.$.offsetHeight,contentsHeight:p.$.offsetHeight,outerWidth:e.container.$.offsetWidth})}this.toggleState();
if(r=this.uiItems[0])p=this.state==CKEDITOR.TRISTATE_OFF?d.maximize.maximize:d.maximize.minimize,r=CKEDITOR.document.getById(r._.id),r.getChild(1).setHtml(p),r.setAttribute("title",p),r.setAttribute("href",'javascript:void("'+p+'");');"wysiwyg"==e.mode?a?(CKEDITOR.env.gecko&&b(e),e.getSelection().selectRanges(a),(v=e.getSelection().getStartElement())&&v.scrollIntoView(!0)):m.$.scrollTo(n.x,n.y):(a&&(v.selectionStart=a[0],v.selectionEnd=a[1]),v.scrollLeft=n[0],v.scrollTop=n[1]);a=n=null;u=this.state;
e.fire("maximize",this.state)},canUndo:!1});e.ui.addButton&&e.ui.addButton("Maximize",{label:d.maximize.maximize,command:"maximize",toolbar:"tools,10"});e.on("mode",function(){var a=e.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:u)},null,null,100)}}})}(),function(){function e(e,c,h){var b=CKEDITOR.cleanWord;b?h():(e=CKEDITOR.getUrl(e.config.pasteFromWordCleanupFile||c+"filter/default.js"),CKEDITOR.scriptLoader.load(e,h,null,!0));return!b}CKEDITOR.plugins.add("pastefromword",
{requires:"clipboard",init:function(f){function c(b){var d=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,c,e=[];if(d&&b.editor.filter.check("img[src]")&&(c=d.extractTagsFromHtml(b.data.dataValue),0!==c.length&&(d=d.extractFromRtf(b.data.dataTransfer["text/rtf"]),0!==d.length&&(CKEDITOR.tools.array.forEach(d,function(a){e.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),c.length===e.length))))for(d=
0;d<c.length;d++)0===c[d].indexOf("file://")&&e[d]&&(b.data.dataValue=b.data.dataValue.replace(c[d],e[d]))}var h=0,b=this.path,l=void 0===f.config.pasteFromWord_inlineImages?!0:f.config.pasteFromWord_inlineImages;f.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(b,d){h=1;b.execCommand("paste",{type:"html",notification:d&&"undefined"!==typeof d.notification?d.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(f,"PasteFromWord",{label:f.lang.pastefromword.toolbar,command:"pastefromword",
toolbar:"clipboard,50"});f.on("paste",function(c){var d=c.data,g=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?d.dataTransfer.getData("text/html",!0):null,m=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?d.dataTransfer.getData("text/rtf"):null,g=g||d.dataValue,a={dataValue:g,dataTransfer:{"text/rtf":m}},m=/(class=\"?Mso|style=(?:\"|\')[^\"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,m=/<meta\s*name=(?:\"|\')?generator(?:\"|\')?\s*content=(?:\"|\')?microsoft/gi.test(g)||m.test(g);if(g&&
(h||m)&&(!1!==f.fire("pasteFromWord",a)||h)){d.dontFilter=!0;var l=e(f,b,function(){if(l)f.fire("paste",d);else if(!f.config.pasteFromWordPromptCleanup||h||confirm(f.lang.pastefromword.confirmCleanup))a.dataValue=CKEDITOR.cleanWord(a.dataValue,f),f.fire("afterPasteFromWord",a),d.dataValue=a.dataValue,!0===f.config.forcePasteAsPlainText?d.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==f.config.forcePasteAsPlainText||(d.type="html");h=0});l&&c.cancel()}},null,null,3);
if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&l)f.on("afterPasteFromWord",c)}})}(),function(){var e={canUndo:!1,async:!0,exec:function(e,c){var h=e.lang,b=CKEDITOR.tools.keystrokeToString(h.common.keyboard,e.getCommandKeystroke(CKEDITOR.env.ie?e.commands.paste:this)),l=c&&"undefined"!==typeof c.notification?c.notification:!c||!c.from||"keystrokeHandler"===c.from&&CKEDITOR.env.ie,h=l&&"string"===typeof l?l:h.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+b.aria+'"\x3e'+
b.display+"\x3c/kbd\x3e");e.execCommand("paste",{type:"text",notification:l?h:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(f){var c=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;f.addCommand("pastetext",e);f.setKeystroke(c,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(f,"PasteText",{label:f.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(f.config.forcePasteAsPlainText)f.on("beforePaste",
function(c){"html"!=c.data.type&&(c.data.type="text")});f.on("pasteState",function(c){f.getCommand("pastetext").setState(c.data)})}})}(),CKEDITOR.plugins.add("removeformat",{init:function(e){e.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);e.ui.addButton&&e.ui.addButton("RemoveFormat",{label:e.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(e){for(var f=e._.removeFormatRegex||
(e._.removeFormatRegex=new RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),c=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),h=CKEDITOR.plugins.removeformat.filter,b=e.getSelection().getRanges().createIterator(),l=function(a){return a.type==CKEDITOR.NODE_ELEMENT},k=[],d;d=b.getNextRange();){var g=d.createBookmark();d=e.createRange();d.setStartBefore(g.startNode);g.endNode&&d.setEndAfter(g.endNode);d.collapsed||d.enlarge(CKEDITOR.ENLARGE_ELEMENT);
var m=d.createBookmark(),a=m.startNode,n=m.endNode,x=function(a){for(var b=e.elementPath(a),d=b.elements,c=1,g;(g=d[c])&&!g.equals(b.block)&&!g.equals(b.blockLimit);c++)f.test(g.getName())&&h(e,g)&&a.breakParent(g)};x(a);if(n)for(x(n),a=a.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);a&&!a.equals(n);)if(a.isReadOnly()){if(a.getPosition(n)&CKEDITOR.POSITION_CONTAINS)break;a=a.getNext(l)}else x=a.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==a.getName()&&a.data("cke-realelement")||a.hasAttribute("data-cke-bookmark")||
!h(e,a)||(f.test(a.getName())?a.remove(1):(a.removeAttributes(c),e.fire("removeFormatCleanup",a))),a=x;m.startNode.remove();m.endNode&&m.endNode.remove();d.moveToBookmark(g);k.push(d)}e.forceNextSelectionCheck();e.getSelection().selectRanges(k)}}},filter:function(e,f){for(var c=e._.removeFormatFilters||[],h=0;h<c.length;h++)if(!1===c[h](f))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(e){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(e)},
CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",function(){function e(c,e,b){var l,k;if(b="string"==typeof b?CKEDITOR.document.getById(b):new CKEDITOR.dom.element(b))if(l=c.fire("uiSpace",{space:e,html:""}).html)c.on("uiSpace",function(b){b.data.space==e&&b.cancel()},null,null,1),k=b.append(CKEDITOR.dom.element.createFromHtml(f.output({id:c.id,
name:c.name,langDir:c.lang.dir,langCode:c.langCode,space:e,spaceId:c.ui.spaceId(e),content:l}))),b.getCustomData("cke_hasshared")?k.hide():b.setCustomData("cke_hasshared",1),k.unselectable(),k.on("mousedown",function(b){b=b.data;b.getTarget().hasAscendant("a",1)||b.preventDefault()}),c.focusManager.add(k,1),c.on("focus",function(){for(var d=0,c,e=b.getChildren();c=e.getItem(d);d++)c.type==CKEDITOR.NODE_ELEMENT&&!c.equals(k)&&c.hasClass("cke_shared")&&c.hide();k.show()}),c.on("destroy",function(){k.remove()})}
var f=CKEDITOR.addTemplate("sharedcontainer",'\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_shared cke_detached cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{spaceId}" class\x3d"cke_{space}" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');CKEDITOR.plugins.add("sharedspace",{init:function(c){c.on("loaded",
function(){var f=c.config.sharedSpaces;if(f)for(var b in f)e(c,b,f[b])},null,null,9)}})}(),function(){var e={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(e){this.toggleState();this.refresh(e)},refresh:function(e){if(e.document){var c=this.state!=CKEDITOR.TRISTATE_ON||e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!e.focusManager.hasFocus?"removeClass":"attachClass";e.editable()[c]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var e="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),
c,h,b,l,k=CKEDITOR.getUrl(this.path),d=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),g=d?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",m,a;for(c=h=b=l="";m=e.pop();)a=e.length?",":"",c+=".cke_show_blocks "+m+g+a,b+=".cke_show_blocks.cke_contents_ltr "+m+g+a,l+=".cke_show_blocks.cke_contents_rtl "+m+g+a,h+=".cke_show_blocks "+m+g+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+m+".png")+")}";CKEDITOR.addCss((c+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(h,
b+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));d||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(f){function c(){h.refresh(f)}if(!f.blockless){var h=f.addCommand("showblocks",e);h.canUndo=!1;f.config.startupOutlineBlocks&&h.setState(CKEDITOR.TRISTATE_ON);f.ui.addButton&&f.ui.addButton("ShowBlocks",{label:f.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});f.on("mode",function(){h.state!=CKEDITOR.TRISTATE_DISABLED&&h.refresh(f)});f.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(f.on("focus",c),f.on("blur",c));f.on("contentDom",function(){h.state!=CKEDITOR.TRISTATE_DISABLED&&
h.refresh(f)})}}})}(),function(){var e={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(e){this.toggleState();this.refresh(e)},refresh:function(e){if(e.document){var c=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";e.editable()[c]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var e;e=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \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(e)},init:function(f){var c=f.addCommand("showborders",e);c.canUndo=!1;!1!==f.config.startupShowBorders&&c.setState(CKEDITOR.TRISTATE_ON);f.on("mode",function(){c.state!=CKEDITOR.TRISTATE_DISABLED&&c.refresh(f)},null,null,100);f.on("contentDom",function(){c.state!=CKEDITOR.TRISTATE_DISABLED&&c.refresh(f)});f.on("removeFormatCleanup",function(c){c=c.data;f.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&c.is("table")&&(!c.hasAttribute("border")||
0>=parseInt(c.getAttribute("border"),10))&&c.addClass("cke_show_border")})},afterInit:function(e){var c=e.dataProcessor;e=c&&c.dataFilter;c=c&&c.htmlFilter;e&&e.addRules({elements:{table:function(c){c=c.attributes;var b=c["class"],e=parseInt(c.border,10);e&&!(0>=e)||b&&-1!=b.indexOf("cke_show_border")||(c["class"]=(b||"")+" cke_show_border")}}});c&&c.addRules({elements:{table:function(c){c=c.attributes;var b=c["class"];b&&(c["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(e){var c=e.data.name;if("table"==c||"tableProperties"==c)if(e=e.data.definition,c=e.getContents("info").get("txtBorder"),c.commit=CKEDITOR.tools.override(c.commit,function(c){return function(b,e){c.apply(this,arguments);var f=parseInt(this.getValue(),10);e[!f||0>=f?"addClass":"removeClass"]("cke_show_border")}}),e=(e=e.getContents("advanced"))&&e.get("advCSSClasses"))e.setup=CKEDITOR.tools.override(e.setup,function(c){return function(){c.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),e.commit=CKEDITOR.tools.override(e.commit,function(c){return function(b,e){c.apply(this,arguments);parseInt(e.getAttribute("border"),10)||e.addClass("cke_show_border")}})})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(f){function c(){var c=b&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+
"px");this.show();c&&this.focus()}if(f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var h=CKEDITOR.plugins.sourcearea;f.addMode("source",function(b){var h=f.ui.space("contents").getDocument().createElement("textarea");h.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",f.config.sourceAreaTabSize||4)));h.setAttribute("dir","ltr");h.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");
f.ui.space("contents").append(h);h=f.editable(new e(f,h));h.setData(f.getData(1));CKEDITOR.env.ie&&(h.attachListener(f,"resize",c,h),h.attachListener(CKEDITOR.document.getWindow(),"resize",c,h),CKEDITOR.tools.setTimeout(c,0,h));f.fire("ariaWidget",this);b()});f.addCommand("source",h.commands.source);f.ui.addButton&&f.ui.addButton("Source",{label:f.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});f.on("mode",function(){f.getCommand("source").setState("source"==f.mode?CKEDITOR.TRISTATE_ON:
CKEDITOR.TRISTATE_OFF)});var b=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var e=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(e){this.setValue(e);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(e){this[(e?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){e.baseProto.detach.call(this);this.clearCustomData();
this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){"wysiwyg"==e.mode&&e.fire("saveSnapshot");e.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);e.setMode("source"==e.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("sourcedialog",{requires:"dialog",init:function(e){e.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js");
e.ui.addButton&&e.ui.addButton("Sourcedialog",{label:e.lang.sourcedialog.toolbar,command:"sourcedialog",toolbar:"mode,10"})}}),CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,
uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(e){var f=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");e.addCommand("specialchar",{exec:function(){var c=e.langCode,c=f.availableLangs[c]?c:f.availableLangs[c.replace(/-.*/,"")]?c.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f.path+"dialogs/lang/"+c+".js"),function(){CKEDITOR.tools.extend(e.lang.specialchar,f.langEntries[c]);e.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});e.ui.addButton&&
e.ui.addButton("SpecialChar",{label:e.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \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(e){var f=e.config,c=e.lang.stylescombo,h={},b=[],l=[];e.on("stylesSet",function(c){if(c=c.data.styles){for(var d,g,m,a=0,n=c.length;a<n;a++)(d=c[a],e.blockless&&d.element in CKEDITOR.dtd.$block||"string"==typeof d.type&&!CKEDITOR.style.customHandlers[d.type]||(g=d.name,d=new CKEDITOR.style(d),e.filter.customConfig&&!e.filter.check(d)))||(d._name=g,d._.enterMode=f.enterMode,d._.type=m=d.assignedTo||d.type,d._.weight=
a+1E3*(m==CKEDITOR.STYLE_OBJECT?1:m==CKEDITOR.STYLE_BLOCK?2:3),h[g]=d,b.push(d),l.push(d));b.sort(function(a,b){return a._.weight-b._.weight})}});e.ui.addRichCombo("Styles",{label:c.label,title:c.panelTitle,toolbar:"styles,10",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!0,attributes:{"aria-label":c.panelTitle}},init:function(){var e,d,g,f,a,h;a=0;for(h=b.length;a<h;a++)e=b[a],d=e._name,f=e._.type,f!=g&&(this.startGroup(c["panelTitle"+String(f)]),
g=f),this.add(d,e.type==CKEDITOR.STYLE_OBJECT?d:e.buildPreview(),d);this.commit()},onClick:function(b){e.focus();e.fire("saveSnapshot");b=h[b];var d=e.elementPath();if(b.group&&b.removeStylesFromSameGroup(e))e.applyStyle(b);else e[b.checkActive(d,e)?"removeStyle":"applyStyle"](b);e.fire("saveSnapshot")},onRender:function(){e.on("selectionChange",function(b){var d=this.getValue();b=b.data.path.elements;for(var c=0,f=b.length,a;c<f;c++){a=b[c];for(var l in h)if(h[l].checkElementRemovable(a,!0,e)){l!=
d&&this.setValue(l);return}}this.setValue("")},this)},onOpen:function(){var b=e.getSelection(),b=b.getSelectedElement()||b.getStartElement()||e.editable(),b=e.elementPath(b),d=[0,0,0,0];this.showAll();this.unmarkAll();for(var g in h){var f=h[g],a=f._.type;f.checkApplicable(b,e,e.activeFilter)?d[a]++:this.hideItem(g);f.checkActive(b,e)&&this.mark(g)}d[CKEDITOR.STYLE_BLOCK]||this.hideGroup(c["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);d[CKEDITOR.STYLE_INLINE]||this.hideGroup(c["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
d[CKEDITOR.STYLE_OBJECT]||this.hideGroup(c["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var b=e.elementPath();if(b){for(var d in h)if(h[d].checkApplicable(b,e,e.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){h={};b=[]}})}})}(),function(){function e(b){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(c){if(c.editable().hasFocus){var e=c.getSelection(),d;if(d=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,
th:1},1)){var e=c.createRange(),g=CKEDITOR.tools.tryThese(function(){var a=d.getParent().$.cells[d.$.cellIndex+(b?-1:1)];a.parentNode.parentNode;return a},function(){var a=d.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(b?-1:1)];return a.cells[b?a.cells.length-1:0]});if(g||b)if(g)g=new CKEDITOR.dom.element(g),e.moveToElementEditStart(g),e.checkStartOfBlock()&&e.checkEndOfBlock()||e.selectNodeContents(g);else return!0;else{for(var f=d.getAscendant("table").$,g=d.getParent().$.cells,f=
new CKEDITOR.dom.element(f.insertRow(-1),c.document),a=0,h=g.length;a<h;a++)f.append((new CKEDITOR.dom.element(g[a],c.document)).clone(!1,!1)).appendBogus();e.moveToElementEditStart(f)}e.select(!0);return!0}}return!1}}}var f={editorFocus:!1,modes:{wysiwyg:1,source:1}},c={exec:function(b){b.container.focusNext(!0,b.tabIndex)}},h={exec:function(b){b.container.focusPrevious(!0,b.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(b){for(var l=!1!==b.config.enableTabKeyTools,k=b.config.tabSpaces||0,
d="";k--;)d+=" ";if(d)b.on("key",function(c){9==c.data.keyCode&&(b.insertText(d),c.cancel())});if(l)b.on("key",function(d){(9==d.data.keyCode&&b.execCommand("selectNextCell")||d.data.keyCode==CKEDITOR.SHIFT+9&&b.execCommand("selectPreviousCell"))&&d.cancel()});b.addCommand("blur",CKEDITOR.tools.extend(c,f));b.addCommand("blurBack",CKEDITOR.tools.extend(h,f));b.addCommand("selectNextCell",e());b.addCommand("selectPreviousCell",e(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(e,f){var c=
void 0===f?this.getTabIndex():f,h,b,l,k,d,g;if(0>=c)for(d=this.getNextSourceNode(e,CKEDITOR.NODE_ELEMENT);d;){if(d.isVisible()&&0===d.getTabIndex()){l=d;break}d=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(d=this.getDocument().getBody().getFirst();d=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!h)if(!b&&d.equals(this)){if(b=!0,e){if(!(d=d.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;h=1}}else b&&!this.contains(d)&&(h=1);if(d.isVisible()&&!(0>(g=d.getTabIndex()))){if(h&&g==c){l=
d;break}g>c&&(!l||!k||g<k)?(l=d,k=g):l||0!==g||(l=d,k=g)}}l&&l.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(e,f){for(var c=void 0===f?this.getTabIndex():f,h,b,l,k=0,d,g=this.getDocument().getBody().getLast();g=g.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!h)if(!b&&g.equals(this)){if(b=!0,e){if(!(g=g.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;h=1}}else b&&!this.contains(g)&&(h=1);if(g.isVisible()&&!(0>(d=g.getTabIndex())))if(0>=c){if(h&&0===d){l=g;break}d>k&&
(l=g,k=d)}else{if(h&&d==c){l=g;break}d<c&&(!l||d>k)&&(l=g,k=d)}}l&&l.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(e){function f(c){return CKEDITOR.tools.extend(c||{},{contextSensitive:1,refresh:function(b,c){this.setState(c.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!e.blockless){var c=e.lang.table;e.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+
(e.plugins.dialogadvtab?"table"+e.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(c){if(c.styles){var b;if(c.styles.border)b=CKEDITOR.tools.style.parse.border(c.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var e=c.styles;e["border-left"]&&e["border-left"]===e["border-right"]&&e["border-right"]===e["border-top"]&&
e["border-top"]===e["border-bottom"]&&(b=CKEDITOR.tools.style.parse.border(e["border-top"]))}b&&b.style&&"solid"===b.style&&b.width&&0!==parseFloat(b.width)&&(c.attributes.border=1);"collapse"==c.styles["border-collapse"]&&(c.attributes.cellspacing=0)}}}]]}));e.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",f()));e.addCommand("tableDelete",f({exec:function(c){var b=c.elementPath().contains("table",1);if(b){var e=b.getParent(),f=c.editable();1!=e.getChildCount()||e.is("td",
"th")||e.equals(f)||(b=e);c=c.createRange();c.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();c.select()}}}));e.ui.addButton&&e.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");e.addMenuItems&&e.addMenuItems({table:{label:c.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:c.deleteTable,command:"tableDelete",group:"table",
order:1}});e.on("doubleclick",function(c){c.data.element.is("table")&&(c.data.dialog="tableProperties")});e.contextMenu&&e.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function e(a,b){function d(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function c(a){0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!t.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(g,a,"selected_cell",
!0),e.push(a))}var e=[],g={};if(!a)return e;for(var f=a.getRanges(),h=0;h<f.length;h++){var k=f[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&d(k)&&e.push(k);else{var k=new CKEDITOR.dom.walker(k),m;for(k.guard=c;m=k.next();)m.type==CKEDITOR.NODE_ELEMENT&&m.is(CKEDITOR.dtd.table)||(m=m.getAscendant({td:1,th:1},!0))&&!m.getCustomData("selected_cell")&&d(m)&&(CKEDITOR.dom.element.setMarker(g,m,"selected_cell",!0),e.push(m))}}CKEDITOR.dom.element.clearAllMarkers(g);return e}
function f(a,b){for(var d=p(a)?a:e(a),c=d[0],g=c.getAscendant("table"),c=c.getDocument(),f=d[0].getParent(),h=f.$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(g.$.rows[k]),h=b?h:k,f=b?f:d,d=CKEDITOR.tools.buildTableMap(g),g=d[h],h=b?d[h-1]:d[h+1],d=d[0].length,c=c.createElement("tr"),k=0;g[k]&&k<d;k++){var m;1<g[k].rowSpan&&h&&g[k]==h[k]?(m=g[k],m.rowSpan+=1):(m=(new CKEDITOR.dom.element(g[k])).clone(),m.removeAttribute("rowSpan"),m.appendBogus(),c.append(m),
m=m.$);k+=m.colSpan-1}b?c.insertBefore(f):c.insertAfter(f);return c}function c(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),d=e(a),g=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(g),h=d[0].getParent().$.rowIndex,d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[];a.reset();for(a=h;a<=k;a++){for(var m=f[a],l=new CKEDITOR.dom.element(g.$.rows[a]),n=0;n<m.length;n++){var p=new CKEDITOR.dom.element(m[n]),t=p.getParent().$.rowIndex;1==p.$.rowSpan?p.remove():(--p.$.rowSpan,
t==a&&(t=f[a+1],t[n-1]?p.insertAfter(new CKEDITOR.dom.element(t[n-1])):(new CKEDITOR.dom.element(g.$.rows[a+1])).append(p,1)));n+=p.$.colSpan-1}d.push(l)}f=g.$.rows;b[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(f[k+1]||(0<h?f[h-1]:null)||g.$.parentNode);for(a=d.length;0<=a;a--)c(d[a]);return g.$.parentNode?h:(b[0].select(),null)}a instanceof CKEDITOR.dom.element&&(g=a.getAscendant("table"),1==g.$.rows.length?g.remove():a.remove());return null}function h(a){for(var b=
a.getParent().$.cells,d=0,c=0;c<b.length;c++){var e=b[c],d=d+e.colSpan;if(e==a.$)break}return d-1}function b(a,b){for(var d=b?Infinity:0,c=0;c<a.length;c++){var e=h(a[c]);if(b?e<d:e>d)d=e}return d}function l(a,d){for(var c=p(a)?a:e(a),g=c[0].getAscendant("table"),f=b(c,1),c=b(c),h=d?f:c,k=CKEDITOR.tools.buildTableMap(g),g=[],f=[],c=[],m=k.length,l=0;l<m;l++)g.push(k[l][h]),f.push(d?k[l][h-1]:k[l][h+1]);for(l=0;l<m;l++)g[l]&&(1<g[l].colSpan&&f[l]==g[l]?(k=g[l],k.colSpan+=1):(h=new CKEDITOR.dom.element(g[l]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[d?"insertBefore":"insertAfter"].call(k,h),c.push(k),k=k.$),l+=k.rowSpan-1);return c}function k(a){function b(a){var d,c,e;d=a.getRanges();if(1!==d.length)return a;d=d[0];if(d.collapsed||0!==d.endOffset)return a;c=d.endContainer;e=c.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=c.getPrevious())||(e=c.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;
d.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return d.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=b(a));var d=a.getRanges(),c=e(a),g=c[0],f=c[c.length-1],c=g.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(c),k,m,l=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var p=0,t=h[n].length;p<t;p++)void 0===k&&h[n][p]==g.$&&(k=p),h[n][p]==f.$&&(m=p);for(n=k;n<=m;n++)for(p=0;p<h.length;p++)f=h[p],g=new CKEDITOR.dom.element(c.$.rows[p]),f=new CKEDITOR.dom.element(f[n]),f.$&&(1==f.$.colSpan?f.remove():--f.$.colSpan,
p+=f.$.rowSpan-1,g.$.cells.length||l.push(g));k=h[0].length-1>m?new CKEDITOR.dom.element(h[0][m+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(c.$.parentNode);l.length==a&&(d[0].moveToPosition(c,CKEDITOR.POSITION_AFTER_END),d[0].select(),c.remove());return k}function d(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 g(a){if(a instanceof CKEDITOR.dom.selection){var b=
a.getRanges(),d=e(a),c=d[0]&&d[0].getAscendant("table"),f;a:{var h=0;f=d.length-1;for(var k={},l,n;l=d[h++];)CKEDITOR.dom.element.setMarker(k,l,"delete_cell",!0);for(h=0;l=d[h++];)if((n=l.getPrevious())&&!n.getCustomData("delete_cell")||(n=l.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(k);f=n;break a}CKEDITOR.dom.element.clearAllMarkers(k);h=d[0].getParent();(h=h.getPrevious())?f=h.getLast():(h=d[f].getParent(),f=(h=h.getNext())?h.getChild(0):null)}a.reset();for(a=
d.length-1;0<=a;a--)g(d[a]);f?m(f,!0):c&&(b[0].moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),b[0].select(),c.remove())}else a instanceof CKEDITOR.dom.element&&(b=a.getParent(),1==b.getChildCount()?b.remove():a.remove())}function m(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 a(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 g=e(b),f;if((d?1!=g.length:2>g.length)||(f=b.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;var h;b=g[0];f=b.getAscendant("table");var k=CKEDITOR.tools.buildTableMap(f),m=k.length,l=k[0].length,n=b.getParent().$.rowIndex,p=a(k,n,b);if(d){var t;try{var u=parseInt(b.getAttribute("rowspan"),10)||1;
h=parseInt(b.getAttribute("colspan"),10)||1;t=k["up"==d?n-u:"down"==d?n+u:n]["left"==d?p-h:"right"==d?p+h:p]}catch(x){return!1}if(!t||b.$==t)return!1;g["up"==d||"left"==d?"unshift":"push"](new CKEDITOR.dom.element(t))}d=b.getDocument();var L=n,u=t=0,I=!c&&new CKEDITOR.dom.documentFragment(d),C=0;for(d=0;d<g.length;d++){h=g[d];var S=h.getParent(),O=h.getFirst(),P=h.$.colSpan,K=h.$.rowSpan,S=S.$.rowIndex,V=a(k,S,h),C=C+P*K,u=Math.max(u,V-p+P);t=Math.max(t,S-n+K);c||(P=h,(K=P.getBogus())&&K.remove(),
P.trim(),h.getChildren().count()&&(S==L||!O||O.isBlockBoundary&&O.isBlockBoundary({br:1})||(L=I.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!L||L.is&&L.is("br")||I.append("br")),h.moveChildren(I)),d?h.remove():h.setHtml(""));L=S}if(c)return t*u==C;I.moveChildren(b);b.appendBogus();u>=l?b.removeAttribute("rowSpan"):b.$.rowSpan=t;t>=m?b.removeAttribute("colSpan"):b.$.colSpan=u;c=new CKEDITOR.dom.nodeList(f.$.rows);g=c.count();for(d=g-1;0<=d;d--)f=c.getItem(d),f.$.cells.length||(f.remove(),g++);return b}
function x(b,d){var c=e(b);if(1<c.length)return!1;if(d)return!0;var c=c[0],g=c.getParent(),f=g.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k=g.$.rowIndex,m=a(h,k,c),l=c.$.rowSpan,n;if(1<l){n=Math.ceil(l/2);for(var l=Math.floor(l/2),g=k+n,f=new CKEDITOR.dom.element(f.$.rows[g]),h=a(h,g),p,g=c.clone(),k=0;k<h.length;k++)if(p=h[k],p.parentNode==f.$&&k>m){g.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||f.append(g)}else for(l=n=1,f=g.clone(),f.insertAfter(g),f.append(g=c.clone()),
p=a(h,k),m=0;m<p.length;m++)p[m].rowSpan++;g.appendBogus();c.$.rowSpan=n;g.$.rowSpan=l;1==n&&c.removeAttribute("rowSpan");1==l&&g.removeAttribute("rowSpan");return g}function u(b,d){var c=e(b);if(1<c.length)return!1;if(d)return!0;var c=c[0],g=c.getParent(),f=g.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),h=a(f,g.$.rowIndex,c),k=c.$.colSpan;if(1<k)g=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=g=1,m=[],l=0;l<f.length;l++){var n=f[l];m.push(n[h]);1<n[h].rowSpan&&(l+=n[h].rowSpan-1)}for(f=
0;f<m.length;f++)m[f].colSpan++}f=c.clone();f.insertAfter(c);f.appendBogus();c.$.colSpan=g;f.$.colSpan=k;1==g&&c.removeAttribute("colSpan");1==k&&f.removeAttribute("colSpan");return f}var t=/^(?:td|th)$/,p=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function b(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 h(b,
d){var c=a.addCommand(b,d);a.addFeature(c)}var p=a.lang.table,t=CKEDITOR.tools.style.parse,y="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(" ");h("cellProperties",new CKEDITOR.dialogCommand("cellProperties",b({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:y,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&
t.background(a.styles.background).color},right:function(a){a.styles["background-color"]=t.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&
(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");h("rowDelete",b({requiredContent:"table",exec:function(a){a=a.getSelection();(a=c(a))&&m(a)}}));h("rowInsertBefore",b({requiredContent:"table",exec:function(a){a=
a.getSelection();a=e(a);f(a,!0)}}));h("rowInsertAfter",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);f(a)}}));h("columnDelete",b({requiredContent:"table",exec:function(a){a=a.getSelection();(a=k(a))&&m(a,!0)}}));h("columnInsertBefore",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);l(a,!0)}}));h("columnInsertAfter",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=e(a);l(a)}}));h("cellDelete",b({requiredContent:"table",exec:function(a){a=
a.getSelection();g(a)}}));h("cellMerge",b({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());m(b.cell,!0)}}));h("cellMergeRight",b({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");m(b.cell,!0)}}));h("cellMergeDown",b({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");m(b.cell,!0)}}));h("cellVerticalSplit",
b({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){m(u(a.getSelection()))}}));h("cellHorizontalSplit",b({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){m(x(a.getSelection()))}}));h("cellInsertBefore",b({requiredContent:"table",exec:function(a){a=a.getSelection();d(a,!0)}}));h("cellInsertAfter",b({requiredContent:"table",exec:function(a){a=a.getSelection();d(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",
order:1,getItems:function(){var b=a.getSelection(),d=e(b),b={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(b,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(b,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:u(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,
tablecell_split_horizontal:x(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.filter.check(y)&&(b.tablecell_properties=0<d.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return b}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,
group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,
group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,
group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,
group:"tablecolumn",command:"columnDelete",order:15}});a.contextMenu&&a.contextMenu.addListener(function(a,b,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:h,insertRow:f,insertColumn:l,getSelectedCells:e};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(e,f,c,h,b){e=e.$.rows;c=c||0;h="number"===typeof h?h:e.length-
1;b="number"===typeof b?b:-1;var l=-1,k=[];for(f=f||0;f<=h;f++){l++;!k[l]&&(k[l]=[]);for(var d=-1,g=c;g<=(-1===b?e[f].cells.length-1:b);g++){var m=e[f].cells[g];if(!m)break;for(d++;k[l][d];)d++;for(var a=isNaN(m.colSpan)?1:m.colSpan,m=isNaN(m.rowSpan)?1:m.rowSpan,n=0;n<m&&!(f+n>h);n++){k[l+n]||(k[l+n]=[]);for(var x=0;x<a;x++)k[l+n][d+x]=e[f].cells[g]}d+=a-1;if(-1!==b&&d>=b)break}}return k},function(){function e(b){return CKEDITOR.env.ie?b.$.clientWidth:parseInt(b.getComputedStyle("width"),10)}function f(b,
d){var a=b.getComputedStyle("border-"+d+"-width"),c={thin:"0px",medium:"1px",thick:"2px"};0>a.indexOf("px")&&(a=a in c&&"none"!=b.getComputedStyle("border-style")?c[a]:0);return parseInt(a,10)}function c(b){var d=[],a={},c="rtl"==b.getComputedStyle("direction");CKEDITOR.tools.array.forEach(b.$.rows,function(e,h){var k=-1,l=0,r=null;e?(l=new CKEDITOR.dom.element(e),r={height:l.$.offsetHeight,position:l.getDocumentPosition()}):r=void 0;for(var l=r.height,r=r.position,v=0,q=e.cells.length;v<q;v++){var B=
new CKEDITOR.dom.element(e.cells[v]),w=e.cells[v+1]&&new CKEDITOR.dom.element(e.cells[v+1]),k=k+(B.$.colSpan||1),y,A,D=B.getDocumentPosition().x;c?A=D+f(B,"left"):y=D+B.$.offsetWidth-f(B,"right");w?(D=w.getDocumentPosition().x,c?y=D+w.$.offsetWidth-f(w,"right"):A=D+f(w,"left")):(D=b.getDocumentPosition().x,c?y=D:A=D+b.$.offsetWidth);B=Math.max(A-y,3);B={table:b,index:k,x:y,y:r.y,width:B,height:l,rtl:c};a[k]=a[k]||[];a[k].push(B);B.alignedPillars=a[k];d.push(B)}});return d}function h(b){(b.data||b).preventDefault()}
function b(b){function c(){v=0;r.setOpacity(0);B&&a();var b=t.table;setTimeout(function(){b.removeCustomData("_cke_table_pillars")},0);p.removeListener("dragstart",h)}function a(){for(var a=t.rtl,d=a?A.length:y.length,c=0,h=0;h<d;h++){var m=y[h],l=A[h],n=t.table;CKEDITOR.tools.setTimeout(function(e,f,h,m,l,p){e&&e.setStyle("width",k(Math.max(f+p,1)));h&&h.setStyle("width",k(Math.max(m-p,1)));l&&n.setStyle("width",k(l+p*(a?-1:1)));++c==d&&b.fire("saveSnapshot")},0,this,[m,m&&e(m),l,l&&e(l),(!m||!l)&&
e(n)+f(n,"left")+f(n,"right"),B])}}function l(a){h(a);b.fire("saveSnapshot");a=t.index;for(var d=CKEDITOR.tools.buildTableMap(t.table),c=[],f=[],k=Number.MAX_VALUE,m=k,n=t.rtl,w=0,S=d.length;w<S;w++){var O=d[w],P=O[a+(n?1:0)],O=O[a+(n?0:1)],P=P&&new CKEDITOR.dom.element(P),O=O&&new CKEDITOR.dom.element(O);P&&O&&P.equals(O)||(P&&(k=Math.min(k,e(P))),O&&(m=Math.min(m,e(O))),c.push(P),f.push(O))}y=c;A=f;D=t.x-k;z=t.x+m;r.setOpacity(.5);q=parseInt(r.getStyle("left"),10);B=0;v=1;r.on("mousemove",u);p.on("dragstart",
h);p.on("mouseup",x,this)}function x(a){a.removeListener();c()}function u(a){w(a.data.getPageOffset().x)}var t,p,r,v,q,B,w,y,A,D,z;p=b.document;r=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-temp\x3d1 contenteditable\x3dfalse unselectable\x3don style\x3d"position:absolute;cursor:col-resize;filter:alpha(opacity\x3d0);opacity:0;padding:0;background-color:#004;background-image:none;border:0px none;z-index:10"\x3e\x3c/div\x3e',p);b.on("destroy",function(){r.remove()});d||p.getDocumentElement().append(r);
this.attachTo=function(a){var b,c,e;v||(d&&(p.getBody().append(r),B=0),t=a,b=t.alignedPillars[0],c=t.alignedPillars[t.alignedPillars.length-1],e=b.y,b=c.height+c.y-b.y,r.setStyles({width:k(a.width),height:k(b),left:k(a.x),top:k(e)}),d&&r.setOpacity(.25),r.on("mousedown",l,this),p.getBody().setStyle("cursor","col-resize"),r.show())};w=this.move=function(a,b){if(!t)return 0;if(!(v||a>=t.x&&a<=t.x+t.width&&b>=t.y&&b<=t.y+t.height))return t=null,v=B=0,p.removeListener("mouseup",x),r.removeListener("mousedown",
l),r.removeListener("mousemove",u),p.getBody().setStyle("cursor","auto"),d?r.remove():r.hide(),0;var c=a-Math.round(r.$.offsetWidth/2);if(v){if(c==D||c==z)return 1;c=Math.max(c,D);c=Math.min(c,z);B=c-q}r.setStyle("left",k(c));return 1}}function l(b){var d=b.data.getTarget();if("mouseout"==b.name){if(!d.is("table"))return;for(var a=new CKEDITOR.dom.element(b.data.$.relatedTarget||b.data.$.toElement);a&&a.$&&!a.equals(d)&&!a.is("body");)a=a.getParent();if(!a||a.equals(d))return}d.getAscendant("table",
1).removeCustomData("_cke_table_pillars");b.removeListener()}var k=CKEDITOR.tools.cssLength,d=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(d){d.on("contentDom",function(){var e,a=d.editable();a.attachListener(a.isInline()?a:d.document,"mousemove",function(a){a=a.data;var f=a.getTarget();if(f.type==CKEDITOR.NODE_ELEMENT){var k=a.getPageOffset().x,t=a.getPageOffset().y;if(e&&e.move(k,t))h(a);else if(f.is("table")||
f.getAscendant({thead:1,tbody:1,tfoot:1},1))if(a=f.getAscendant("table",1),d.editable().contains(a)){(f=a.getCustomData("_cke_table_pillars"))||(a.setCustomData("_cke_table_pillars",f=c(a)),a.on("mouseout",l),a.on("mousedown",l));a:{a=f;for(var f=0,p=a.length;f<p;f++){var r=a[f];if(k>=r.x&&k<=r.x+r.width&&t>=r.y&&t<=r.y+r.height){k=r;break a}}k=null}k&&(!e&&(e=new b(d)),e.attachTo(k))}}})})}})}(),"use strict",function(){var e=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],f={8:1,
46:1};CKEDITOR.plugins.add("undo",{init:function(b){function g(b){a.enabled&&!1!==b.data.command.canUndo&&a.save()}function f(){a.enabled=b.readOnly?!1:"wysiwyg"==b.mode;a.onChange()}var a=b.undoManager=new c(b),h=a.editingHandler=new l(a),k=b.addCommand("undo",{exec:function(){a.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),u=b.addCommand("redo",{exec:function(){a.redo()&&(b.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});b.setKeystroke([[e[0],
"undo"],[e[1],"redo"],[e[2],"redo"]]);a.onChange=function(){k.setState(a.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);u.setState(a.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",g);b.on("afterCommandExec",g);b.on("saveSnapshot",function(b){a.save(b.data&&b.data.contentOnly)});b.on("contentDom",h.attachListeners,h);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload",function(){"wysiwyg"==b.mode&&a.save(!0)});b.on("mode",
f);b.on("readOnly",f);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));b.resetUndo=function(){a.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){a.currentImage&&a.update()});b.on("lockSnapshot",function(b){b=b.data;a.lock(b&&b.dontUpdate,b&&b.forceUpdate)});b.on("unlockSnapshot",a.unlock,a)}});CKEDITOR.plugins.undo={};var c=CKEDITOR.plugins.undo.UndoManager=
function(b){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=b.config.undoStackSize||20;this.strokesLimit=25;this.editor=b;this.reset()};c.prototype={type:function(b,e){var f=c.getKeyGroup(b),a=this.strokesRecorded[f]+1;e=e||a>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());e?(a=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[f]=a;this.previousKeyGroup=f},keyGroupChanged:function(b){return c.getKeyGroup(b)!=
this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(b,c,e){var a=this.editor;if(this.locked||"ready"!=a.status||"wysiwyg"!=a.mode)return!1;var f=a.editable();if(!f||
"ready"!=f.status)return!1;f=this.snapshots;c||(c=new h(a));if(!1===c.contents)return!1;if(this.currentImage)if(c.equalsContent(this.currentImage)){if(b||c.equalsSelection(this.currentImage))return!1}else!1!==e&&a.fire("change");f.splice(this.index+1,f.length-this.index-1);f.length==this.limit&&f.shift();this.index=f.push(c)-1;this.currentImage=c;!1!==e&&this.refreshState();return!0},restoreImage:function(b){var c=this.editor,e;b.bookmarks&&(c.focus(),e=c.getSelection());this.locked={level:999};this.editor.loadSnapshot(b.contents);
b.bookmarks?e.selectBookmarks(b.bookmarks):CKEDITOR.env.ie&&(e=this.editor.document.getBody().$.createTextRange(),e.collapse(!0),e.select());this.locked=null;this.index=b.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();c.fire("change")},getNextImage:function(b){var c=this.snapshots,e=this.currentImage,a;if(e)if(b)for(a=this.index-1;0<=a;a--){if(b=c[a],!e.equalsContent(b))return b.index=a,b}else for(a=this.index+1;a<c.length;a++)if(b=c[a],!e.equalsContent(b))return b.index=
a,b;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 b=this.getNextImage(!0);if(b)return this.restoreImage(b),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var b=this.getNextImage(!1);if(b)return this.restoreImage(b),!0}return!1},update:function(b){if(!this.locked){b||(b=new h(this.editor));for(var c=this.index,e=this.snapshots;0<c&&this.currentImage.equalsContent(e[c-
1]);)--c;e.splice(c,this.index-c+1,b);this.index=c;this.currentImage=b}},updateSelection:function(b){if(!this.snapshots.length)return!1;var c=this.snapshots,e=c[c.length-1];return e.equalsContent(b)&&!e.equalsSelection(b)?(this.currentImage=c[c.length-1]=b,!0):!1},lock:function(b,c){if(this.locked)this.locked.level++;else if(b)this.locked={level:1};else{var e=null;if(c)e=!0;else{var a=new h(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(a)&&(e=a)}this.locked={update:e,level:1}}},
unlock:function(){if(this.locked&&!--this.locked.level){var b=this.locked.update;this.locked=null;if(!0===b)this.update();else if(b){var c=new h(this.editor,!0);b.equalsContent(c)||this.update()}}}};c.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};c.keyGroups={PRINTABLE:0,FUNCTIONAL:1};c.isNavigationKey=function(b){return!!c.navigationKeyCodes[b]};c.getKeyGroup=function(b){var e=c.keyGroups;return f[b]?e.FUNCTIONAL:e.PRINTABLE};c.getOppositeKeyGroup=function(b){var e=c.keyGroups;return b==
e.FUNCTIONAL?e.PRINTABLE:e.FUNCTIONAL};c.ieFunctionalKeysBug=function(b){return CKEDITOR.env.ie&&c.getKeyGroup(b)==c.keyGroups.FUNCTIONAL};var h=CKEDITOR.plugins.undo.Image=function(b,c){this.editor=b;b.fire("beforeUndoImage");var e=b.getSnapshot();CKEDITOR.env.ie&&e&&(e=e.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=e;c||(this.bookmarks=(e=e&&b.getSelection())&&e.createBookmarks2(!0));b.fire("afterUndoImage")},b=/\b(?:href|src|name)="[^"]*?"/gi;h.prototype={equalsContent:function(c){var e=
this.contents;c=c.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(e=e.replace(b,""),c=c.replace(b,""));return e!=c?!1:!0},equalsSelection:function(b){var c=this.bookmarks;b=b.bookmarks;if(c||b){if(!c||!b||c.length!=b.length)return!1;for(var e=0;e<c.length;e++){var a=c[e],f=b[e];if(a.startOffset!=f.startOffset||a.endOffset!=f.endOffset||!CKEDITOR.tools.arrayCompare(a.start,f.start)||!CKEDITOR.tools.arrayCompare(a.end,f.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=
function(b){this.undoManager=b;this.ignoreInputEvent=!1;this.keyEventsStack=new k;this.lastKeydownImage=null};l.prototype={onKeydown:function(b){var f=b.data.getKey();if(229!==f)if(-1<CKEDITOR.tools.indexOf(e,b.data.getKeystroke()))b.data.preventDefault();else if(this.keyEventsStack.cleanUp(b),b=this.undoManager,this.keyEventsStack.getLast(f)||this.keyEventsStack.push(f),this.lastKeydownImage=new h(b.editor),c.isNavigationKey(f)||this.undoManager.keyGroupChanged(f))if(b.strokesRecorded[0]||b.strokesRecorded[1])b.save(!1,
this.lastKeydownImage,!1),b.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var b=this.keyEventsStack.getLast();b||(b=this.keyEventsStack.push(0));this.keyEventsStack.increment(b.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(b.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var e=this.undoManager;b=b.data.getKey();var f=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);
if(!(c.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new h(e.editor,!0))))if(0<f)e.type(b);else if(c.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(b){var c=this.undoManager;!b&&c.save(!0,null,!1)||c.updateSelection(new h(c.editor));c.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var b=this.undoManager.editor,e=b.editable(),
f=this;e.attachListener(e,"keydown",function(a){f.onKeydown(a);if(c.ieFunctionalKeysBug(a.data.getKey()))f.onInput()},null,null,999);e.attachListener(e,CKEDITOR.env.ie?"keypress":"input",f.onInput,f,null,999);e.attachListener(e,"keyup",f.onKeyup,f,null,999);e.attachListener(e,"paste",f.ignoreInputEventListener,f,null,999);e.attachListener(e,"drop",f.ignoreInputEventListener,f,null,999);b.on("afterPaste",f.activateInputEventListener,f,null,999);e.attachListener(e.isInline()?e:b.document.getDocumentElement(),
"click",function(){f.onNavigationKey()},null,null,999);e.attachListener(this.undoManager.editor,"blur",function(){f.keyEventsStack.remove(9)},null,null,999)}};var k=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};k.prototype={push:function(b){b=this.stack.push({keyCode:b,inputs:0});return this.stack[b-1]},getLastIndex:function(b){if("number"!=typeof b)return this.stack.length-1;for(var c=this.stack.length;c--;)if(this.stack[c].keyCode==b)return c;return-1},getLast:function(b){b=this.getLastIndex(b);
return-1!=b?this.stack[b]:null},increment:function(b){this.getLast(b).inputs++},remove:function(b){b=this.getLastIndex(b);-1!=b&&this.stack.splice(b,1)},resetInputs:function(b){if("number"==typeof b)this.getLast(b).inputs=0;else for(b=this.stack.length;b--;)this.stack[b].inputs=0},getTotalInputs:function(){for(var b=this.stack.length,c=0;b--;)c+=this.stack[b].inputs;return c},cleanUp:function(b){b=b.data.$;b.ctrlKey||b.metaKey||this.remove(17);b.shiftKey||this.remove(16);b.altKey||this.remove(18)}}}(),
function(){function e(b){function c(b){var e=!1;a.attachListener(a,"keydown",function(){var a=d.getBody().getElementsByTag(b);if(!e){for(var c=0;c<a.count();c++)a.getItem(c).setCustomData("retain",!0);e=!0}},null,null,1);a.attachListener(a,"keyup",function(){var a=d.getElementsByTag(b);e&&(1==a.count()&&!a.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(a.getItem(0).getAttributes())&&a.getItem(0).remove(1),e=!1)})}var e=this.editor,d=b.document,g=d.body,h=d.getElementById("cke_actscrpt");
h&&h.parentNode.removeChild(h);(h=d.getElementById("cke_shimscrpt"))&&h.parentNode.removeChild(h);(h=d.getElementById("cke_basetagscrpt"))&&h.parentNode.removeChild(h);g.contentEditable=!0;CKEDITOR.env.ie&&(g.hideFocus=!0,g.disabled=!0,g.removeAttribute("disabled"));delete this._.isLoadingData;this.$=g;d=new CKEDITOR.dom.document(d);this.setup();this.fixInitialSelection();var a=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&d.getDocumentElement().addClass(d.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&
e.enterMode!=CKEDITOR.ENTER_P?c("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&e.enterMode!=CKEDITOR.ENTER_DIV&&c("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)d.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){e.editable().focus()})});f(e);try{e.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==e.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=
a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){e.getSelection().scrollIntoView()},0);else if(e.window.$.innerHeight>this.$.offsetHeight){var c=e.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(d,"blur",function(){try{d.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(d,"touchend",function(){b.focus()});g=e.document.getElementsByTag("title").getItem(0);
g.data("cke-title",g.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)},0,this)}function f(b){function c(){var d;b.editable().attachListener(b,"selectionChange",function(){var a=b.getSelection().getSelectedElement();a&&(d&&(d.detachEvent("onresizestart",e),d=null),a.$.attachEvent("onresizestart",
e),d=a.$)})}function e(b){b.returnValue=!1}if(CKEDITOR.env.gecko)try{var d=b.document.$;d.execCommand("enableObjectResizing",!1,!b.config.disableObjectResizing);d.execCommand("enableInlineTableEditing",!1,!b.config.disableNativeTableHandles)}catch(f){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&b.config.disableObjectResizing&&c(b)}function c(){var b=[];if(8<=CKEDITOR.document.$.documentMode){b.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var c=[],e;for(e in CKEDITOR.dtd.$removeEmpty)c.push("html.CSS1Compat "+
e+"[contenteditable\x3dfalse]");b.push(c.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(b.push("html{height:100% !important}"),b.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));b.push("html{cursor:text;*cursor:auto}");b.push("img,input,textarea{cursor:default}");return b.join("\n")}var h;CKEDITOR.plugins.add("wysiwygarea",{init:function(b){b.config.fullPage&&b.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});b.addMode("wysiwyg",function(c){function e(a){a&&a.removeListener();b.editable(new h(b,f.$.contentWindow.document.body));b.setData(b.getData(1),c)}var d="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",d=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(d)+"}())":"",f=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+d+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');
f.setStyles({width:"100%",height:"100%"});f.addClass("cke_wysiwyg_frame").addClass("cke_reset");d=b.ui.space("contents");d.append(f);var m=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(m)f.on("load",e);var a=b.title,n=b.fire("ariaEditorHelpLabel",{}).label;a&&(CKEDITOR.env.ie&&n&&(a+=", "+n),f.setAttribute("title",a));if(n){var a=CKEDITOR.tools.getNextId(),x=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+a+'" class\x3d"cke_voice_label"\x3e'+n+"\x3c/span\x3e");d.append(x,1);f.setAttribute("aria-describedby",
a)}b.on("beforeModeUnload",function(a){a.removeListener();x&&x.remove()});f.setAttributes({tabIndex:b.tabIndex,allowTransparency:"true"});!m&&e();b.fire("ariaWidget",f)})}});CKEDITOR.editor.prototype.addContentsCss=function(b){var c=this.config,e=c.contentsCss;CKEDITOR.tools.isArray(e)||(c.contentsCss=e?[e]:[]);c.contentsCss.push(b)};h=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(e,
0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(b,e){var f=this.editor;if(e)this.setHtml(b),this.fixInitialSelection(),f.fire("dataReady");else{this._.isLoadingData=!0;f._.dataStore={id:1};var d=f.config,g=d.fullPage,h=d.docType,a=CKEDITOR.tools.buildStyleHtml(c()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');g||(a+=CKEDITOR.tools.buildStyleHtml(f.config.contentsCss));var n=d.baseHref?'\x3cbase href\x3d"'+
d.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";g&&(b=b.replace(/<!DOCTYPE[^>]*>/i,function(a){f.docType=h=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){f.xmlDeclaration=a;return""}));b=f.dataProcessor.toHtml(b);g?(/<body[\s|>]/.test(b)||(b="\x3cbody\x3e"+b),/<html[\s|>]/.test(b)||(b="\x3chtml\x3e"+b+"\x3c/html\x3e"),/<head[\s|>]/.test(b)?/<title[\s|>]/.test(b)||(b=b.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):b=b.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),
n&&(b=b.replace(/<head[^>]*?>/,"$\x26"+n)),b=b.replace(/<\/head\s*>/,a+"$\x26"),b=h+b):b=d.docType+'\x3chtml dir\x3d"'+d.contentsLangDirection+'" lang\x3d"'+(d.contentsLanguage||f.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+a+"\x3c/head\x3e\x3cbody"+(d.bodyId?' id\x3d"'+d.bodyId+'"':"")+(d.bodyClass?' class\x3d"'+d.bodyClass+'"':"")+"\x3e"+b+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(b=b.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&
(b=b.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));d='\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&&(d+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');b=b.replace(/(?=\s*<\/(:?head)>)/,d);this.clearCustomData();this.clearListeners();f.fire("contentDomUnload");var x=this.getDocument();try{x.write(b)}catch(u){setTimeout(function(){x.write(b)},0)}}},getData:function(b){if(b)return this.getHtml();b=this.editor;var c=b.config,e=c.fullPage,d=e&&b.docType,f=e&&b.xmlDeclaration,
h=this.getDocument(),e=e?h.getDocumentElement().getOuterHtml():h.getBody().getHtml();CKEDITOR.env.gecko&&c.enterMode!=CKEDITOR.ENTER_BR&&(e=e.replace(/<br>(?=\s*(:?$|<\/body>))/,""));e=b.dataProcessor.toDataFormat(e);f&&(e=f+"\n"+e);d&&(e=d+"\n"+e);return e},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:h.baseProto.focus.call(this)},detach:function(){var b=this.editor,c=b.document,e;try{e=b.window.getFrame()}catch(d){}h.baseProto.detach.call(this);this.clearCustomData();c.getDocumentElement().clearCustomData();
CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);e&&e.getParent()?(e.clearCustomData(),(b=e.removeCustomData("onResize"))&&b.removeListener(),e.remove()):CKEDITOR.warn("editor-destroy-iframe")}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,about,autogrow,basicstyles,blockquote,notification,button,toolbar,clipboard,panel,floatpanel,menu,contextmenu,elementspath,enterkey,entities,popup,filetools,filebrowser,floatingspace,listblock,richcombo,format,horizontalrule,htmlwriter,lineutils,widgetselection,widget,image2,indent,indentlist,justify,menubutton,language,list,magicline,maximize,pastefromword,pastetext,removeformat,sharedspace,showblocks,showborders,sourcearea,sourcedialog,specialchar,stylescombo,tab,table,tabletools,tableresize,undo,wysiwygarea",
CKEDITOR.config.skin="moono-lisa",function(){var e=function(e,c){var h=CKEDITOR.getUrl("plugins/"+c);e=e.split(",");for(var b=0;b<e.length;b++)CKEDITOR.skin.icons[e[b]]={path:h,offset:-e[++b],bgsize:e[++b]}};CKEDITOR.env.hidpi?e("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,blockquote,168,,copy-rtl,192,,copy,216,,cut-rtl,240,,cut,264,,paste-rtl,288,,paste,312,,horizontalrule,336,,image,360,,indent-rtl,384,,indent,408,,outdent-rtl,432,,outdent,456,,justifyblock,480,,justifycenter,504,,justifyleft,528,,justifyright,552,,language,576,,bulletedlist-rtl,600,,bulletedlist,624,,numberedlist-rtl,648,,numberedlist,672,,maximize,696,,pastefromword-rtl,720,,pastefromword,744,,pastetext-rtl,768,,pastetext,792,,removeformat,816,,showblocks-rtl,840,,showblocks,864,,source-rtl,888,,source,912,,sourcedialog-rtl,936,,sourcedialog,960,,specialchar,984,,table,1008,,redo-rtl,1032,,redo,1056,,undo-rtl,1080,,undo,1104,,simplebox,2256,auto",
"icons_hidpi.png"):e("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,blockquote,168,auto,copy-rtl,192,auto,copy,216,auto,cut-rtl,240,auto,cut,264,auto,paste-rtl,288,auto,paste,312,auto,horizontalrule,336,auto,image,360,auto,indent-rtl,384,auto,indent,408,auto,outdent-rtl,432,auto,outdent,456,auto,justifyblock,480,auto,justifycenter,504,auto,justifyleft,528,auto,justifyright,552,auto,language,576,auto,bulletedlist-rtl,600,auto,bulletedlist,624,auto,numberedlist-rtl,648,auto,numberedlist,672,auto,maximize,696,auto,pastefromword-rtl,720,auto,pastefromword,744,auto,pastetext-rtl,768,auto,pastetext,792,auto,removeformat,816,auto,showblocks-rtl,840,auto,showblocks,864,auto,source-rtl,888,auto,source,912,auto,sourcedialog-rtl,936,auto,sourcedialog,960,auto,specialchar,984,auto,table,1008,auto,redo-rtl,1032,auto,redo,1056,auto,undo-rtl,1080,auto,undo,1104,auto,simplebox,1128,auto",
"icons.png")}())})();