/*
Copyright (c) 2003-2018, 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 f=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"I648",version:"4.10.0",revision:"de1371d",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:f},status:"unloaded",basePath:function(){var d=window.CKEDITOR_BASEPATH||"";if(!d)for(var k=document.getElementsByTagName("script"),e=0;e<k.length;e++){var b=k[e].src.match(f);if(b){d=b[1];break}}-1==d.indexOf(":/")&&"//"!=d.slice(0,
2)&&(d=0===d.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+d:location.href.match(/^[^\?]*\/(?:)/)[0]+d);if(!d)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d}(),getUrl:function(d){-1==d.indexOf(":/")&&0!==d.indexOf("/")&&(d=this.basePath+d);this.timestamp&&"/"!=d.charAt(d.length-1)&&!/[&?]t=/.test(d)&&(d+=(0<=d.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return d},
domReady:function(){function d(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",d,!1),k()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",d),k())}catch(b){}}function k(){for(var b;b=e.shift();)b()}var e=[];return function(b){function g(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(g,1);return}d()}e.push(b);"complete"===document.readyState&&setTimeout(d,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
d,!1),window.addEventListener("load",d,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",d);window.attachEvent("onload",d);b=!1;try{b=!window.frameElement}catch(c){}document.documentElement.doScroll&&b&&g()}}}()},e=window.CKEDITOR_GETURL;if(e){var k=h.getUrl;h.getUrl=function(d){return e.call(h,d)||k.call(h,d)}}return h}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(f){var h=CKEDITOR.event.prototype,e;for(e in h)null==f[e]&&(f[e]=h[e])},
CKEDITOR.event.prototype=function(){function f(k){var d=h(this);return d[k]||(d[k]=new e(k))}var h=function(k){k=k.getPrivate&&k.getPrivate()||k._||(k._={});return k.events||(k.events={})},e=function(k){this.name=k;this.listeners=[]};e.prototype={getListenerIndex:function(k){for(var d=0,e=this.listeners;d<e.length;d++)if(e[d].fn==k)return d;return-1}};return{define:function(k,d){var e=f.call(this,k);CKEDITOR.tools.extend(e,d,!0)},on:function(k,d,e,h,b){function g(a,n,b,g){a={name:k,sender:this,editor:a,
data:n,listenerData:h,stop:b,cancel:g,removeListener:c};return!1===d.call(e,a)?!1:a.data}function c(){n.removeListener(k,d)}var a=f.call(this,k);if(0>a.getListenerIndex(d)){a=a.listeners;e||(e=this);isNaN(b)&&(b=10);var n=this;g.fn=d;g.priority=b;for(var w=a.length-1;0<=w;w--)if(a[w].priority<=b)return a.splice(w+1,0,g),{removeListener:c};a.unshift(g)}return{removeListener:c}},once:function(){var k=Array.prototype.slice.call(arguments),d=k[1];k[1]=function(k){k.removeListener();return d.apply(this,
arguments)};return this.on.apply(this,k)},capture:function(){CKEDITOR.event.useCapture=1;var k=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return k},fire:function(){var k=0,d=function(){k=1},e=0,f=function(){e=1};return function(b,g,c){var a=h(this)[b];b=k;var n=e;k=e=0;if(a){var w=a.listeners;if(w.length)for(var w=w.slice(0),v,p=0;p<w.length;p++){if(a.errorProof)try{v=w[p].call(this,c,g,d,f)}catch(r){}else v=w[p].call(this,c,g,d,f);!1===v?e=1:"undefined"!=typeof v&&(g=v);if(k||e)break}}g=
e?!1:"undefined"==typeof g?!0:g;k=b;e=n;return g}}(),fireOnce:function(k,d,e){d=this.fire(k,d,e);delete h(this)[k];return d},removeListener:function(k,d){var e=h(this)[k];if(e){var f=e.getListenerIndex(d);0<=f&&e.listeners.splice(f,1)}},removeAllListeners:function(){var e=h(this),d;for(d in e)delete e[d]},hasListeners:function(e){return(e=h(this)[e])&&0<e.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
function(f,h){f in{instanceReady:1,loaded:1}&&(this[f]=!0);return CKEDITOR.event.prototype.fire.call(this,f,h,this)},CKEDITOR.editor.prototype.fireOnce=function(f,h){f in{instanceReady:1,loaded:1}&&(this[f]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,f,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var f=navigator.userAgent.toLowerCase(),h=f.match(/edge[ \/](\d+.?\d*)/),e=-1<f.indexOf("trident/"),e=!(!h&&!e),e={ie:e,edge:!!h,webkit:!e&&
-1<f.indexOf(" applewebkit/"),air:-1<f.indexOf(" adobeair/"),mac:-1<f.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<f.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(f),isCustomDomain:function(){if(!this.ie)return!1;var d=document.domain,e=window.location.hostname;return d!=e&&d!="["+e+"]"},secure:"https:"==location.protocol};e.gecko="Gecko"==navigator.product&&!e.webkit&&!e.ie;e.webkit&&(-1<f.indexOf("chrome")?e.chrome=
!0:e.safari=!0);var k=0;e.ie&&(k=h?parseFloat(h[1]):e.quirks||!document.documentMode?parseFloat(f.match(/msie (\d+)/)[1]):document.documentMode,e.ie9Compat=9==k,e.ie8Compat=8==k,e.ie7Compat=7==k,e.ie6Compat=7>k||e.quirks);e.gecko&&(h=f.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),k=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));e.air&&(k=parseFloat(f.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(k=parseFloat(f.match(/ applewebkit\/(\d+)/)[1]));e.version=k;e.isCompatible=!(e.ie&&7>k)&&!(e.gecko&&4E4>k)&&!(e.webkit&&
534>k);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko||e.webkit||e.ie&&10<k;e.needsNbspFiller=e.ie&&11>k;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air");e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}()),"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 f=document.createElement("script");f.type="text/javascript";f.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(f)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(f){(this._.pending||(this._.pending=[])).push(f)};(function(){CKEDITOR.domReady(function(){var f=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;f&&(CKEDITOR.status=
"basic_ready",f&&f._load?f():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(f,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:f,additionalData:h})},CKEDITOR.error=function(f,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
{type:"error",errorCode:f,additionalData:h})},CKEDITOR.on("log",function(f){if(window.console&&window.console.log){var h=console[f.data.type]?f.data.type:"log",e=f.data.errorCode;if(f=f.data.additionalData)console[h]("[CKEDITOR] Error code: "+e+".",f);else console[h]("[CKEDITOR] Error code: "+e+".");console[h]("[CKEDITOR] For more information about this error go to https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_errors-section-"+e)}},null,null,999),CKEDITOR.dom={},function(){var f=[],h=CKEDITOR.env.gecko?
"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",e=/&/g,k=/>/g,d=/</g,l=/"/g,m=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,b={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},g=function(c,a){return"#"==a[0]?String.fromCharCode(parseInt(a.slice(1),10)):b[a]};CKEDITOR.on("reset",function(){f=[]});CKEDITOR.tools={arrayCompare:function(c,a){if(!c&&!a)return!0;if(!c||!a||c.length!=a.length)return!1;for(var n=0;n<c.length;n++)if(c[n]!=a[n])return!1;return!0},getIndex:function(c,a){for(var n=
0;n<c.length;++n)if(a(c[n]))return n;return-1},clone:function(c){var a;if(c&&c instanceof Array){a=[];for(var n=0;n<c.length;n++)a[n]=CKEDITOR.tools.clone(c[n]);return a}if(null===c||"object"!=typeof c||c instanceof String||c instanceof Number||c instanceof Boolean||c instanceof Date||c instanceof RegExp||c.nodeType||c.window===c)return c;a=new c.constructor;for(n in c)a[n]=CKEDITOR.tools.clone(c[n]);return a},capitalize:function(c,a){return c.charAt(0).toUpperCase()+(a?c.slice(1):c.slice(1).toLowerCase())},
extend:function(c){var a=arguments.length,n,b;"boolean"==typeof(n=arguments[a-1])?a--:"boolean"==typeof(n=arguments[a-2])&&(b=arguments[a-1],a-=2);for(var g=1;g<a;g++){var d=arguments[g],e;for(e in d)if(!0===n||null==c[e])if(!b||e in b)c[e]=d[e]}return c},prototypedCopy:function(c){var a=function(){};a.prototype=c;return new a},copy:function(c){var a={},n;for(n in c)a[n]=c[n];return a},isArray:function(c){return"[object Array]"==Object.prototype.toString.call(c)},isEmpty:function(c){for(var a in c)if(c.hasOwnProperty(a))return!1;
return!0},cssVendorPrefix:function(c,a,n){if(n)return h+c+":"+a+";"+c+":"+a;n={};n[c]=a;n[h+c]=a;return n},cssStyleToDomStyle:function(){var c=document.createElement("div").style,a="undefined"!=typeof c.cssFloat?"cssFloat":"undefined"!=typeof c.styleFloat?"styleFloat":"float";return function(c){return"float"==c?a:c.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(c){c=[].concat(c);for(var a,n=[],b=0;b<c.length;b++)if(a=c[b])/@import|[{}]/.test(a)?n.push("\x3cstyle\x3e"+
a+"\x3c/style\x3e"):n.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+a+'"\x3e');return n.join("")},htmlEncode:function(c){return void 0===c||null===c?"":String(c).replace(e,"\x26amp;").replace(k,"\x26gt;").replace(d,"\x26lt;")},htmlDecode:function(c){return c.replace(m,g)},htmlEncodeAttr:function(c){return CKEDITOR.tools.htmlEncode(c).replace(l,"\x26quot;")},htmlDecodeAttr:function(c){return CKEDITOR.tools.htmlDecode(c)},transformPlainTextToHtml:function(c,a){var n=a==CKEDITOR.ENTER_BR,
b=this.htmlEncode(c.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),g=a==CKEDITOR.ENTER_P?"p":"div";if(!n){var d=/\n{2}/g;if(d.test(b))var e="\x3c"+g+"\x3e",k="\x3c/"+g+"\x3e",b=e+b.replace(d,function(){return k+e})+k}b=b.replace(/\n/g,"\x3cbr\x3e");n||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+g+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,function(a,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,
"\x26nbsp;")},getNextNumber:function(){var c=0;return function(){return++c}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var c="e",a=0;8>a;a++)c+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return c},override:function(c,a){var n=a(c);n.prototype=c.prototype;return n},setTimeout:function(c,a,n,b,g){g||(g=window);n||(n=g);return g.setTimeout(function(){b?c.apply(n,[].concat(b)):c.apply(n)},a||0)},throttle:function(c,a,n){var b,g=0;n=n||{};return{input:function(){function d(){g=
(new Date).getTime();b=!1;a.apply(n,e)}var e=Array.prototype.slice.call(arguments);b&&(clearTimeout(b),b=0);var k=(new Date).getTime()-g;k<c?b=setTimeout(d,c-k):d()},reset:function(){b&&(clearTimeout(b),b=g=0)}}},trim:function(){var c=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(a){return a.replace(c,"")}}(),ltrim:function(){var c=/^[ \t\n\r]+/g;return function(a){return a.replace(c,"")}}(),rtrim:function(){var c=/[ \t\n\r]+$/g;return function(a){return a.replace(c,"")}}(),indexOf:function(c,
a){if("function"==typeof a)for(var n=0,b=c.length;n<b;n++){if(a(c[n]))return n}else{if(c.indexOf)return c.indexOf(a);n=0;for(b=c.length;n<b;n++)if(c[n]===a)return n}return-1},search:function(c,a){var n=CKEDITOR.tools.indexOf(c,a);return 0<=n?c[n]:null},bind:function(c,a){return function(){return c.apply(a,arguments)}},createClass:function(c){var a=c.$,n=c.base,b=c.privates||c._,g=c.proto;c=c.statics;!a&&(a=function(){n&&this.base.apply(this,arguments)});if(b)var d=a,a=function(){var a=this._||(this._=
{}),c;for(c in b){var n=b[c];a[c]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}d.apply(this,arguments)};n&&(a.prototype=this.prototypedCopy(n.prototype),a.prototype.constructor=a,a.base=n,a.baseProto=n.prototype,a.prototype.base=function(){this.base=n.prototype.base;n.apply(this,arguments);this.base=arguments.callee});g&&this.extend(a.prototype,g,!0);c&&this.extend(a,c,!0);return a},addFunction:function(c,a){return f.push(function(){return c.apply(a||this,arguments)})-1},removeFunction:function(c){f[c]=
null},callFunction:function(c){var a=f[c];return a&&a.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var c=/^-?\d+\.?\d*px$/,a;return function(n){a=CKEDITOR.tools.trim(n+"")+"px";return c.test(a)?a:n||""}}(),convertToPx:function(){var c;return function(a){c||(c=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(c));return/%$/.test(a)?
a:(c.setStyle("width",a),c.$.clientWidth)}}(),repeat:function(c,a){return Array(a+1).join(c)},tryThese:function(){for(var c,a=0,n=arguments.length;a<n;a++){var b=arguments[a];try{c=b();break}catch(g){}}return c},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(c){return function(){var a=arguments,n=this;window.setTimeout(function(){c.apply(n,a)},0)}},normalizeCssText:function(c,a){var n=[],b,g=CKEDITOR.tools.parseCssText(c,!0,a);for(b in g)n.push(b+":"+g[b]);
n.sort();return n.length?n.join(";")+";":""},convertRgbToHex:function(c){return c.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,c,b,g){a=[c,b,g];for(c=0;3>c;c++)a[c]=("0"+parseInt(a[c],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(c){return c.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,c,b,g){a=c.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+g})},parseCssText:function(c,a,b){var g={};
b&&(c=(new CKEDITOR.dom.element("span")).setAttribute("style",c).getAttribute("style")||"");c&&(c=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(c)));if(!c||";"==c)return g;c.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,b,n){a&&(b=b.toLowerCase(),"font-family"==b&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));g[b]=n});return g},writeCssText:function(c,a){var b,g=[];for(b in c)g.push(b+":"+c[b]);a&&g.sort();return g.join("; ")},objectCompare:function(c,
a,b){var g;if(!c&&!a)return!0;if(!c||!a)return!1;for(g in c)if(c[g]!=a[g])return!1;if(!b)for(g in a)if(c[g]!=a[g])return!1;return!0},objectKeys:function(c){var a=[],b;for(b in c)a.push(b);return a},convertArrayToObject:function(c,a){var b={};1==arguments.length&&(a=!0);for(var g=0,d=c.length;g<d;++g)b[c[g]]=a;return b},fixDomain:function(){for(var c;;)try{c=window.parent.document.domain;break}catch(a){c=c?c.replace(/.+?(?:\.|$)/,""):document.domain;if(!c)break;document.domain=c}return!!c},eventsBuffer:function(c,
a,b){function g(){e=(new Date).getTime();d=!1;b?a.call(b):a()}var d,e=0;return{input:function(){if(!d){var a=(new Date).getTime()-e;a<c?d=setTimeout(g,c-a):g()}},reset:function(){d&&clearTimeout(d);d=e=0}}},enableHtml5Elements:function(c,a){for(var b="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(" "),g=b.length,d;g--;)d=c.createElement(b[g]),a&&c.appendChild(d)},checkIfAnyArrayItemMatches:function(c,
a){for(var b=0,g=c.length;b<g;++b)if(c[b].match(a))return!0;return!1},checkIfAnyObjectPropertyMatches:function(c,a){for(var b in c)if(b.match(a))return!0;return!1},keystrokeToString:function(c,a){var b=this.keystrokeToArray(c,a);b.display=b.display.join("+");b.aria=b.aria.join("+");return b},keystrokeToArray:function(c,a){var b=a&16711680,g=a&65535,d=CKEDITOR.env.mac,e=[],k=[];b&CKEDITOR.CTRL&&(e.push(d?"⌘":c[17]),k.push(d?c[224]:c[17]));b&CKEDITOR.ALT&&(e.push(d?"⌥":c[18]),k.push(c[18]));b&CKEDITOR.SHIFT&&
(e.push(d?"⇧":c[16]),k.push(c[16]));g&&(c[g]?(e.push(c[g]),k.push(c[g])):(e.push(String.fromCharCode(g)),k.push(String.fromCharCode(g))));return{display:e,aria:k}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(c){c=c.toLowerCase();for(var a=document.cookie.split(";"),b,g,d=0;d<a.length;d++)if(b=a[d].split("\x3d"),g=decodeURIComponent(CKEDITOR.tools.trim(b[0]).toLowerCase()),g===c)return decodeURIComponent(1<b.length?
b[1]:"");return null},setCookie:function(c,a){document.cookie=encodeURIComponent(c)+"\x3d"+encodeURIComponent(a)+";path\x3d/"},getCsrfToken:function(){var c=CKEDITOR.tools.getCookie("ckCsrfToken");if(!c||40!=c.length){var c=[],a="";if(window.crypto&&window.crypto.getRandomValues)c=new Uint8Array(40),window.crypto.getRandomValues(c);else for(var b=0;40>b;b++)c.push(Math.floor(256*Math.random()));for(b=0;b<c.length;b++)var g="abcdefghijklmnopqrstuvwxyz0123456789".charAt(c[b]%36),a=a+(.5<Math.random()?
g.toUpperCase():g);c=a;CKEDITOR.tools.setCookie("ckCsrfToken",c)}return c},escapeCss:function(c){return c?window.CSS&&CSS.escape?CSS.escape(c):isNaN(parseInt(c.charAt(0),10))?c:"\\3"+c.charAt(0)+" "+c.substring(1,c.length):""},getMouseButton:function(c){var a=(c=c.data)&&c.$;return c&&a?CKEDITOR.env.ie&&9>CKEDITOR.env.version?4===a.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:1===a.button?CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:a.button:!1},convertHexStringToBytes:function(c){var a=[],b=c.length/
2,g;for(g=0;g<b;g++)a.push(parseInt(c.substr(2*g,2),16));return a},convertBytesToBase64:function(c){var a="",b=c.length,g;for(g=0;g<b;g+=3){var d=c.slice(g,g+3),e=d.length,k=[],f;if(3>e)for(f=e;3>f;f++)d[f]=0;k[0]=(d[0]&252)>>2;k[1]=(d[0]&3)<<4|d[1]>>4;k[2]=(d[1]&15)<<2|(d[2]&192)>>6;k[3]=d[2]&63;for(f=0;4>f;f++)a=f<=e?a+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k[f]):a+"\x3d"}return a},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(c){var a={},b=this._findColor(c);b.length&&(a.color=b[0],CKEDITOR.tools.array.forEach(b,function(a){c=c.replace(a,"")}));if(c=CKEDITOR.tools.trim(c))a.unprocessed=c;return a},margin:function(c){function a(a){b.top=g[a[0]];b.right=g[a[1]];b.bottom=g[a[2]];b.left=g[a[3]]}var b={},g=c.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(g.length){case 1:a([0,0,0,0]);break;case 2:a([0,
1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return b},border:function(c){var a={},b=c.split(/\s+/g);c=CKEDITOR.tools.style.parse._findColor(c);c.length&&(a.color=c[0]);CKEDITOR.tools.array.forEach(b,function(c){a.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,c)?!a.width&&CKEDITOR.tools.style.parse._widthRegExp.test(c)&&(a.width=c):a.style=c});return a},_findColor:function(c){var a=[],b=CKEDITOR.tools.array,a=a.concat(c.match(this._rgbaRegExp)||[]),a=a.concat(c.match(this._hslaRegExp)||
[]);return a=a.concat(b.filter(c.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(c,a,b){var g=[];this.forEach(c,function(d,e){a.call(b,d,e,c)&&g.push(d)});return g},forEach:function(c,a,b){var g=c.length,d;for(d=0;d<g;d++)a.call(b,c[d],d,c)},map:function(c,a,b){for(var g=[],d=0;d<c.length;d++)g.push(a.call(b,c[d],d,c));return g},reduce:function(c,a,b,g){for(var d=0;d<c.length;d++)b=a.call(g,
b,c[d],d,c);return b},every:function(c,a,b){if(!c.length)return!0;a=this.filter(c,a,b);return c.length===a.length}},object:{findKey:function(c,a){if("object"!==typeof c)return null;for(var b in c)if(c[b]===a)return b;return null},merge:function(c,a){var b=CKEDITOR.tools,g=b.clone(c),d=b.clone(a);b.array.forEach(b.objectKeys(d),function(a){g[a]="object"===typeof d[a]&&"object"===typeof g[a]?b.object.merge(g[a],d[a]):d[a]});return g}},getAbsoluteRectPosition:function(c,a){function b(a){if(a){var c=
a.getClientRect();g.top+=c.top;g.left+=c.left;"x"in g&&"y"in g&&(g.x+=c.x,g.y+=c.y);b(a.getWindow().getFrame())}}var g=CKEDITOR.tools.copy(a);b(c.getFrame());var d=CKEDITOR.document.getWindow().getScrollPosition();g.top+=d.y;g.left+=d.x;"x"in g&&"y"in g&&(g.y+=d.y,g.x+=d.x);g.right=g.left+g.width;g.bottom=g.top+g.height;return g}};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 f=CKEDITOR.tools.extend,h=function(c,a){for(var b=CKEDITOR.tools.clone(c),g=1;g<arguments.length;g++){a=arguments[g];for(var d in a)delete b[d]}return b},e={},k={},d={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},l={command:1,link:1,meta:1,noscript:1,script:1,style:1},m={},b={"#":1},g={center:1,dir:1,noframes:1};
f(e,{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},b,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});f(k,d,e,g);h={a:h(e,{a:1,button:1}),abbr:e,address:k,
area:m,article:k,aside:k,audio:f({source:1,track:1},k),b:e,base:m,bdi:e,bdo:e,blockquote:k,body:k,br:m,button:h(e,{a:1,button:1}),canvas:e,caption:k,cite:e,code:e,col:m,colgroup:{col:1},command:m,datalist:f({option:1},e),dd:k,del:e,details:f({summary:1},k),dfn:e,div:k,dl:{dt:1,dd:1},dt:k,em:e,embed:m,fieldset:f({legend:1},k),figcaption:k,figure:f({figcaption:1},k),footer:k,form:k,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,head:f({title:1,base:1},l),header:k,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:m,html:f({head:1,
body:1},k,l),i:e,iframe:b,img:m,input:m,ins:e,kbd:e,keygen:m,label:e,legend:e,li:k,link:m,main:k,map:k,mark:e,menu:f({li:1},k),meta:m,meter:h(e,{meter:1}),nav:k,noscript:f({link:1,meta:1,style:1},e),object:f({param:1},e),ol:{li:1},optgroup:{option:1},option:b,output:e,p:e,param:m,pre:e,progress:h(e,{progress:1}),q:e,rp:e,rt:e,ruby:f({rp:1,rt:1},e),s:e,samp:e,script:b,section:k,select:{optgroup:1,option:1},small:e,source:m,span:e,strong:e,style:b,sub:e,summary:f({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},e),
sup:e,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:k,textarea:b,tfoot:{tr:1},th:k,thead:{tr:1},time:h(e,{time:1}),title:b,tr:{th:1,td:1},track:m,u:e,ul:{li:1},"var":e,video:f({source:1,track:1},k),wbr:m,acronym:e,applet:f({param:1},k),basefont:m,big:e,center:k,dialog:m,dir:{li:1},font:e,isindex:m,noframes:k,strike:e,tt:e};f(h,{$block:f({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},d,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:e,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:f({body:1,head:1,html:1},h.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,
s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return h}(),CKEDITOR.dom.event=function(f){this.$=
f},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var f=this.getKey();if(this.$.ctrlKey||this.$.metaKey)f+=CKEDITOR.CTRL;this.$.shiftKey&&(f+=CKEDITOR.SHIFT);this.$.altKey&&(f+=CKEDITOR.ALT);return f},preventDefault:function(f){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;f&&this.stopPropagation()},stopPropagation:function(){var f=this.$;f.stopPropagation?f.stopPropagation():f.cancelBubble=!0},getTarget:function(){var f=
this.$.target||this.$.srcElement;return f?new CKEDITOR.dom.node(f):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var f=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(f.documentElement.scrollLeft||f.body.scrollLeft),y:this.$.pageY||this.$.clientY+(f.documentElement.scrollTop||f.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(f){f&&(this.$=f)},CKEDITOR.dom.domObject.prototype=function(){var f=function(f,e){return function(k){"undefined"!=typeof CKEDITOR&&f.fire(e,new CKEDITOR.dom.event(k))}};return{getPrivate:function(){var f;(f=this.getCustomData("_"))||this.setCustomData("_",f={});return f},on:function(h){var e=this.getCustomData("_cke_nativeListeners");e||(e={},this.setCustomData("_cke_nativeListeners",e));e[h]||(e=e[h]=f(this,h),this.$.addEventListener?this.$.addEventListener(h,e,
!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+h,e));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(f){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(f)){var e=this.getCustomData("_cke_nativeListeners"),k=e&&e[f];k&&(this.$.removeEventListener?this.$.removeEventListener(f,k,!1):this.$.detachEvent&&this.$.detachEvent("on"+f,k),delete e[f])}},removeAllListeners:function(){var f=this.getCustomData("_cke_nativeListeners"),
e;for(e in f){var k=f[e];this.$.detachEvent?this.$.detachEvent("on"+e,k):this.$.removeEventListener&&this.$.removeEventListener(e,k,!1);delete f[e]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(f){var h={};CKEDITOR.on("reset",function(){h={}});f.equals=function(e){try{return e&&e.$===this.$}catch(k){return!1}};f.setCustomData=function(e,k){var d=this.getUniqueId();(h[d]||(h[d]={}))[e]=k;return this};f.getCustomData=function(e){var k=this.$["data-cke-expando"];return(k=k&&h[k])&&
e in k?k[e]:null};f.removeCustomData=function(e){var k=this.$["data-cke-expando"],k=k&&h[k],d,f;k&&(d=k[e],f=e in k,delete k[e]);return f?d:null};f.clearCustomData=function(){this.removeAllListeners();var e=this.$["data-cke-expando"];e&&delete h[e]};f.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(f)}(CKEDITOR.dom.domObject.prototype),CKEDITOR.dom.node=function(f){return f?new CKEDITOR.dom[f.nodeType==
CKEDITOR.NODE_DOCUMENT?"document":f.nodeType==CKEDITOR.NODE_ELEMENT?"element":f.nodeType==CKEDITOR.NODE_TEXT?"text":f.nodeType==CKEDITOR.NODE_COMMENT?"comment":f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](f):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(f,h){f.append(this,h);return f},clone:function(f,h){function e(d){d["data-cke-expando"]&&(d["data-cke-expando"]=!1);if(d.nodeType==CKEDITOR.NODE_ELEMENT||d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(h||d.nodeType!=CKEDITOR.NODE_ELEMENT||d.removeAttribute("id",!1),f){d=d.childNodes;for(var k=0;k<d.length;k++)e(d[k])}}function k(d){if(d.type==
CKEDITOR.NODE_ELEMENT||d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(d.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var e=d.getName();":"==e[0]&&d.renameNode(e.substring(1))}if(f)for(e=0;e<d.getChildCount();e++)k(d.getChild(e))}}var d=this.$.cloneNode(f);e(d);d=new CKEDITOR.dom.node(d);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&k(d);return d},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},
insertAfter:function(f){f.$.parentNode.insertBefore(this.$,f.$.nextSibling);return f},insertBefore:function(f){f.$.parentNode.insertBefore(this.$,f.$);return f},insertBeforeMe:function(f){this.$.parentNode.insertBefore(f.$,this.$);return f},getAddress:function(f){for(var h=[],e=this.getDocument().$.documentElement,k=this.$;k&&k!=e;){var d=k.parentNode;d&&h.unshift(this.getIndex.call({$:k},f));k=d}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},
getIndex:function(f){function h(d,b){var g=b?d.nextSibling:d.previousSibling;return g&&g.nodeType==CKEDITOR.NODE_TEXT?e(g)?h(g,b):g:null}function e(d){return!d.nodeValue||d.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var k=this.$,d=-1,l;if(!this.$.parentNode||f&&k.nodeType==CKEDITOR.NODE_TEXT&&e(k)&&!h(k)&&!h(k,!0))return-1;do f&&k!=this.$&&k.nodeType==CKEDITOR.NODE_TEXT&&(l||e(k))||(d++,l=k.nodeType==CKEDITOR.NODE_TEXT);while(k=k.previousSibling);return d},getNextSourceNode:function(f,
h,e){if(e&&!e.call){var k=e;e=function(d){return!d.equals(k)}}f=!f&&this.getFirst&&this.getFirst();var d;if(!f){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;f=this.getNext()}for(;!f&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;f=d.getNext()}return!f||e&&!1===e(f)?null:h&&h!=f.type?f.getNextSourceNode(!1,h,e):f},getPreviousSourceNode:function(f,h,e){if(e&&!e.call){var k=e;e=function(d){return!d.equals(k)}}f=!f&&this.getLast&&this.getLast();var d;if(!f){if(this.type==
CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;f=this.getPrevious()}for(;!f&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;f=d.getPrevious()}return!f||e&&!1===e(f)?null:h&&f.type!=h?f.getPreviousSourceNode(!1,h,e):f},getPrevious:function(f){var h=this.$,e;do e=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(e&&f&&!f(e));return e},getNext:function(f){var h=this.$,e;do e=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(e&&f&&!f(e));return e},getParent:function(f){var h=
this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||f&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(f){var h=this,e=[];do e[f?"push":"unshift"](h);while(h=h.getParent());return e},getCommonAncestor:function(f){if(f.equals(this))return this;if(f.contains&&f.contains(this))return f;var h=this.contains?this:this.getParent();do if(h.contains(f))return h;while(h=h.getParent());return null},getPosition:function(f){var h=this.$,e=f.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(e);
if(h==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&f.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(e))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(e.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex<e.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();f=f.getAddress();
for(var e=Math.min(h.length,f.length),k=0;k<e;k++)if(h[k]!=f[k])return h[k]<f[k]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<f.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(f,h){var e=this.$,k,d;h||(e=e.parentNode);"function"==typeof f?(d=!0,k=f):(d=!1,k=function(d){d="string"==typeof d.nodeName?d.nodeName.toLowerCase():"";return"string"==typeof f?d==f:d in f});for(;e;){if(k(d?
new CKEDITOR.dom.node(e):e))return new CKEDITOR.dom.node(e);try{e=e.parentNode}catch(l){e=null}}return null},hasAscendant:function(f,h){var e=this.$;h||(e=e.parentNode);for(;e;){if(e.nodeName&&e.nodeName.toLowerCase()==f)return!0;e=e.parentNode}return!1},move:function(f,h){f.append(this.remove(),h)},remove:function(f){var h=this.$,e=h.parentNode;if(e){if(f)for(;f=h.firstChild;)e.insertBefore(h.removeChild(f),h);e.removeChild(h)}return this},replace:function(f){this.insertBefore(f);f.remove()},trim:function(){this.ltrim();
this.rtrim()},ltrim:function(){for(var f;this.getFirst&&(f=this.getFirst());){if(f.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(f.getText()),e=f.getLength();if(h)h.length<e&&(f.split(e-h.length),this.$.removeChild(this.$.firstChild));else{f.remove();continue}}break}},rtrim:function(){for(var f;this.getLast&&(f=this.getLast());){if(f.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(f.getText()),e=f.getLength();if(h)h.length<e&&(f.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));
else{f.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(f=this.$.lastChild)&&1==f.type&&"br"==f.nodeName.toLowerCase()&&f.parentNode.removeChild(f)},isReadOnly:function(f){var h=this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(f=!0);if(!f&&h&&"undefined"!=typeof h.$.isContentEditable)return!(h.$.isContentEditable||h.data("cke-editable"));for(;h;){if(h.data("cke-editable"))return!1;if(h.hasAttribute("contenteditable"))return"false"==
h.getAttribute("contenteditable");h=h.getParent()}return!0}}),CKEDITOR.dom.window=function(f){CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var f=this.$.document,h="CSS1Compat"==f.compatMode;return{width:(h?f.documentElement.clientWidth:f.body.clientWidth)||0,height:(h?f.documentElement.clientHeight:f.body.clientHeight)||0}},getScrollPosition:function(){var f=
this.$;if("pageXOffset"in f)return{x:f.pageXOffset||0,y:f.pageYOffset||0};f=f.document;return{x:f.documentElement.scrollLeft||f.body.scrollLeft||0,y:f.documentElement.scrollTop||f.body.scrollTop||0}},getFrame:function(){var f=this.$.frameElement;return f?new CKEDITOR.dom.element.get(f):null}}),CKEDITOR.dom.document=function(f){CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,
appendStyleSheet:function(f){if(this.$.createStyleSheet)this.$.createStyleSheet(f);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",type:"text/css",href:f});this.getHead().append(h)}},appendStyleText:function(f){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=f}else{var e=new CKEDITOR.dom.element("style",this);e.append(new CKEDITOR.dom.text(f,this));this.getHead().append(e)}return h||e.$.sheet},createElement:function(f,h){var e=new CKEDITOR.dom.element(f,
this);h&&(h.attributes&&e.setAttributes(h.attributes),h.styles&&e.setStyles(h.styles));return e},createText:function(f){return new CKEDITOR.dom.text(f,this)},focus:function(){this.getWindow().focus()},getActive:function(){var f;try{f=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(f)},getById:function(f){return(f=this.$.getElementById(f))?new CKEDITOR.dom.element(f):null},getByAddress:function(f,h){for(var e=this.$.documentElement,k=0;e&&k<f.length;k++){var d=f[k];if(h)for(var l=
-1,m=0;m<e.childNodes.length;m++){var b=e.childNodes[m];if(!0!==h||3!=b.nodeType||!b.previousSibling||3!=b.previousSibling.nodeType)if(l++,l==d){e=b;break}}else e=e.childNodes[d]}return e?new CKEDITOR.dom.node(e):null},getElementsByTag:function(f,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(f=h+":"+f);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(f))},getHead:function(){var f=this.$.getElementsByTagName("head")[0];return f=f?new CKEDITOR.dom.element(f):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(f){this.$.open("text/html","replace");CKEDITOR.env.ie&&(f=f.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(f);this.$.close()},find:function(f){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f))},
findOne:function(f){return(f=this.$.querySelector(f))?new CKEDITOR.dom.element(f):null},_getHtml5ShivFrag:function(){var f=this.getCustomData("html5ShivFrag");f||(f=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(f,!0),this.setCustomData("html5ShivFrag",f));return f}}),CKEDITOR.dom.nodeList=function(f){this.$=f},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(f){return 0>f||f>=this.$.length?null:(f=this.$[f])?new CKEDITOR.dom.node(f):null},
toArray:function(){return CKEDITOR.tools.array.map(this.$,function(f){return new CKEDITOR.dom.node(f)})}},CKEDITOR.dom.element=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createElement(f));CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.element.get=function(f){return(f="string"==typeof f?document.getElementById(f)||document.getElementsByName(f)[0]:f)&&(f.$?f:new CKEDITOR.dom.element(f))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(f,
h){var e=new CKEDITOR.dom.element("div",h);e.setHtml(f);return e.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(f,h,e,k){var d=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),l=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");f[d]=h;l[e]=1;return h.setCustomData(e,k)},CKEDITOR.dom.element.clearAllMarkers=function(f){for(var h in f)CKEDITOR.dom.element.clearMarkers(f,
f[h],1)},CKEDITOR.dom.element.clearMarkers=function(f,h,e){var k=h.getCustomData("list_marker_names"),d=h.getCustomData("list_marker_id"),l;for(l in k)h.removeCustomData(l);h.removeCustomData("list_marker_names");e&&(h.removeCustomData("list_marker_id"),delete f[d])},function(){function f(b,g){return-1<(" "+b+" ").replace(l," ").indexOf(" "+g+" ")}function h(b){var g=!0;b.$.id||(b.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),g=!1);return function(){g||b.removeAttribute("id")}}function e(b,g){var c=
CKEDITOR.tools.escapeCss(b.$.id);return"#"+c+" "+g.split(/,\s*/).join(", #"+c+" ")}function k(b){for(var g=0,c=0,a=m[b].length;c<a;c++)g+=parseFloat(this.getComputedStyle(m[b][c])||0,10)||0;return g}var d=document.createElement("_").classList,d="undefined"!==typeof d&&null!==String(d.add).match(/\[Native code\]/gi),l=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:d?function(b){this.$.classList.add(b);return this}:function(b){var g=this.$.className;
g&&(f(g,b)||(g+=" "+b));this.$.className=g||b;return this},removeClass:d?function(b){var g=this.$;g.classList.remove(b);g.className||g.removeAttribute("class");return this}:function(b){var g=this.getAttribute("class");g&&f(g,b)&&((g=g.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",g):this.removeAttribute("class"));return this},hasClass:function(b){return f(this.$.className,b)},append:function(b,g){"string"==typeof b&&(b=this.getDocument().createElement(b));
g?this.$.insertBefore(b.$,this.$.firstChild):this.$.appendChild(b.$);return b},appendHtml:function(b){if(this.$.childNodes.length){var g=new CKEDITOR.dom.element("div",this.getDocument());g.setHtml(b);g.moveChildren(this)}else this.setHtml(b)},appendText:function(b){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=b:this.append(new CKEDITOR.dom.text(b))},appendBogus:function(b){if(b||CKEDITOR.env.needsBrFiller){for(b=this.getLast();b&&b.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(b.getText());)b=
b.getPrevious();b&&b.is&&b.is("br")||(b=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&b.setAttribute("type","_moz"),this.append(b))}},breakParent:function(b,g){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(b);var a=c.extractContents(!1,g||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=a.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);
c.insertAfter(this);c.remove(!0)}else a.insertAfterNode(this)},contains:document.compareDocumentPosition?function(b){return!!(this.$.compareDocumentPosition(b.$)&16)}:function(b){var g=this.$;return b.type!=CKEDITOR.NODE_ELEMENT?g.contains(b.getParent().$):g!=b.$&&g.contains(b.$)},focus:function(){function b(){try{this.$.focus()}catch(b){}}return function(g){g?CKEDITOR.tools.setTimeout(b,100,this):b.call(this)}}(),getHtml:function(){var b=this.$.innerHTML;return CKEDITOR.env.ie?b.replace(/<\?[^>]*>/g,
""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(!0));return b.innerHTML},getClientRect:function(b){var g=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!g.width&&(g.width=g.right-g.left);!g.height&&(g.height=g.bottom-g.top);return b?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),g):g},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(b){try{var g=
this.$;if(this.getParent())return g.innerHTML=b;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(g);g.innerHTML=b;c.removeChild(g);return b}catch(a){this.$.innerHTML="";g=new CKEDITOR.dom.element("body",this.getDocument());g.$.innerHTML=b;for(g=g.getChildren();g.count();)this.append(g.getItem(0));return b}}:function(b){return this.$.innerHTML=b},setText:function(){var b=document.createElement("p");b.innerHTML="x";b=b.textContent;return function(g){this.$[b?"textContent":"innerText"]=g}}(),
getAttribute:function(){var b=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":return b=this.$.getAttribute(b,2),0!==b&&0===this.$.tabIndex&&(b=null),b;case "checked":return b=this.$.attributes.getNamedItem(b),(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b];
case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:b}(),getAttributes:function(b){var g={},c=this.$.attributes,a;b=CKEDITOR.tools.isArray(b)?b:[];for(a=0;a<c.length;a++)-1===CKEDITOR.tools.indexOf(b,c[a].name)&&(g[c[a].name]=c[a].value);return g},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},
getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(b){var g=this.getWindow().$.getComputedStyle(this.$,null);return g?g.getPropertyValue(b):""}:function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]},getDtd:function(){var b=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var b=this.$.tabIndex;return 0!==b||CKEDITOR.dtd.$tabIndex[this.getName()]||
0===parseInt(this.getAttribute("tabindex"),10)?b:-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 b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var g=this.$.scopeName;"HTML"!=g&&(b=g.toLowerCase()+":"+b)}this.getName=function(){return b};return this.getName()},getValue:function(){return this.$.value},
getFirst:function(b){var g=this.$.firstChild;(g=g&&new CKEDITOR.dom.node(g))&&b&&!b(g)&&(g=g.getNext(b));return g},getLast:function(b){var g=this.$.lastChild;(g=g&&new CKEDITOR.dom.node(g))&&b&&!b(g)&&(g=g.getPrevious(b));return g},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if("object"==typeof arguments[0])return!!arguments[0][b];for(var g=0;g<arguments.length;g++)if(arguments[g]==b)return!0;return!1},isEditable:function(b){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!==b?(b=CKEDITOR.dtd[g]||CKEDITOR.dtd.span,!(!b||!b["#"])):!0},isIdentical:function(b){var g=this.clone(0,1);b=b.clone(0,1);g.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);
b.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),b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),g.$.isEqualNode(b.$);g=g.getOuterHtml();b=b.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(g),g=c.getHtml(),c.setHtml(b),b=c.getHtml())}return g==
b},isVisible:function(){var b=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),g,c;b&&CKEDITOR.env.webkit&&(g=this.getWindow(),!g.equals(CKEDITOR.document.getWindow())&&(c=g.$.frameElement)&&(b=(new CKEDITOR.dom.element(c)).isVisible()));return!!b},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var b=this.getChildren(),g=0,c=b.count();g<c;g++){var a=b.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 b=this.$.attributes,g=0;g<b.length;g++){var c=b[g];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(c.specified)return!0}}return!1}:function(){var b=this.$.attributes,g=b.length,c={"data-cke-expando":1,_moz_dirty:1};
return 0<g&&(2<g||!c[b[0].nodeName]||2==g&&!c[b[1].nodeName])},hasAttribute:function(){function b(b){var c=this.$.attributes.getNamedItem(b);if("input"==this.getName())switch(b){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return b=this.getAttribute("type"),"checkbox"==b||"radio"==b?"on"!=this.$.value:!!this.$.value}return c?c.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(g){return"name"==g?!!this.$.name:b.call(this,g)}:b:function(b){return!!this.$.attributes.getNamedItem(b)}}(),
hide:function(){this.setStyle("display","none")},moveChildren:function(b,g){var c=this.$;b=b.$;if(c!=b){var a;if(g)for(;a=c.lastChild;)b.insertBefore(c.removeChild(a),b.firstChild);else for(;a=c.firstChild;)b.appendChild(c.removeChild(a))}},mergeSiblings:function(){function b(b,c,a){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=a?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var e=
a?b.getLast():b.getFirst();d.length;)d.shift().move(b,!a);c.moveChildren(b,!a);c.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(g){if(!1===g||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))b(this,this.getNext(),!0),b(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(b,c){this.$.setAttribute(b,c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(g,
c){"class"==g?this.$.className=c:"style"==g?this.$.style.cssText=c:"tabindex"==g?this.$.tabIndex=c:"checked"==g?this.$.checked=c:"contenteditable"==g?b.call(this,"contentEditable",c):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(g,c){if("src"==g&&c.match(/^http:\/\//))try{b.apply(this,arguments)}catch(a){}else b.apply(this,arguments);return this}:b}(),setAttributes:function(b){for(var g in b)this.setAttribute(g,b[g]);return this},setValue:function(b){this.$.value=
b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){"class"==b?b="className":"tabindex"==b?b="tabIndex":"contenteditable"==b&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var g=0;g<b.length;g++)this.removeAttribute(b[g]);else for(g in b=b||this.getAttributes(),b)b.hasOwnProperty(g)&&this.removeAttribute(g)},removeStyle:function(b){var g=
this.$.style;if(g.removeProperty||"border"!=b&&"margin"!=b&&"padding"!=b)g.removeProperty?g.removeProperty(b):g.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(b)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],a;"border"==b&&(a=["color","style","width"]);for(var g=[],d=0;d<c.length;d++)if(a)for(var e=0;e<a.length;e++)g.push([b,c[d],a[e]].join("-"));else g.push([b,c[d]].join("-"));for(b=0;b<g.length;b++)this.removeStyle(g[b])}},setStyle:function(b,
g){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]=g;return this},setStyles:function(b){for(var g in b)this.setStyle(g,b[g]);return this},setOpacity:function(b){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(b=Math.round(100*b),this.setStyle("filter",100<=b?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+b+")")):this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var b,
g=this.getElementsByTag("*"),c=0,a=g.count();c<a;c++)b=g.getItem(c),b.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var b=this;"html"!=b.getName();){if("static"!=b.getComputedStyle("position"))return b;b=b.getParent()}return null},getDocumentPosition:function(b){var g=0,c=0,a=this.getDocument(),d=a.getBody(),e="BackCompat"==a.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var k=this.$.getBoundingClientRect(),
f=a.$.documentElement,h=f.clientTop||d.$.clientTop||0,q=f.clientLeft||d.$.clientLeft||0,m=!0;CKEDITOR.env.ie&&(m=a.getDocumentElement().contains(this),a=a.getBody().contains(this),m=e&&a||!e&&m);m&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(g=d.$.scrollLeft||f.scrollLeft,c=d.$.scrollTop||f.scrollTop):(c=e?d.$:f,g=c.scrollLeft,c=c.scrollTop),g=k.left+g-q,c=k.top+c-h)}else for(h=this,q=null;h&&"body"!=h.getName()&&"html"!=h.getName();){g+=h.$.offsetLeft-h.$.scrollLeft;c+=h.$.offsetTop-
h.$.scrollTop;h.equals(this)||(g+=h.$.clientLeft||0,c+=h.$.clientTop||0);for(;q&&!q.equals(h);)g-=q.$.scrollLeft,c-=q.$.scrollTop,q=q.getParent();q=h;h=(k=h.$.offsetParent)?new CKEDITOR.dom.element(k):null}b&&(k=this.getWindow(),h=b.getWindow(),!k.equals(h)&&k.$.frameElement&&(b=(new CKEDITOR.dom.element(k.$.frameElement)).getDocumentPosition(b),g+=b.x,c+=b.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||e||(g+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:g,y:c}},
scrollIntoView:function(b){var g=this.getParent();if(g){do if((g.$.clientWidth&&g.$.clientWidth<g.$.scrollWidth||g.$.clientHeight&&g.$.clientHeight<g.$.scrollHeight)&&!g.is("body")&&this.scrollIntoParent(g,b,1),g.is("html")){var c=g.getWindow();try{var a=c.$.frameElement;a&&(g=new CKEDITOR.dom.element(a))}catch(d){}}while(g=g.getParent())}},scrollIntoParent:function(b,g,c){var a,d,e,k;function f(a,c){/body|html/.test(b.getName())?b.getWindow().$.scrollBy(a,c):(b.$.scrollLeft+=a,b.$.scrollTop+=c)}
function h(a,c){var b={x:0,y:0};if(!a.is(m?"body":"html")){var g=a.$.getBoundingClientRect();b.x=g.left;b.y=g.top}g=a.getWindow();g.equals(c)||(g=h(CKEDITOR.dom.element.get(g.$.frameElement),c),b.x+=g.x,b.y+=g.y);return b}function q(a,c){return parseInt(a.getComputedStyle("margin-"+c)||0,10)||0}!b&&(b=this.getWindow());e=b.getDocument();var m="BackCompat"==e.$.compatMode;b instanceof CKEDITOR.dom.window&&(b=m?e.getBody():e.getDocumentElement());CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=
null);e=b.getWindow();d=h(this,e);var l=h(b,e),A=this.$.offsetHeight;a=this.$.offsetWidth;var D=b.$.clientHeight,t=b.$.clientWidth;e=d.x-q(this,"left")-l.x||0;k=d.y-q(this,"top")-l.y||0;a=d.x+a+q(this,"right")-(l.x+t)||0;d=d.y+A+q(this,"bottom")-(l.y+D)||0;(0>k||0<d)&&f(0,!0===g?k:!1===g?d:0>k?k:d);c&&(0>e||0<a)&&f(0>e?e:a,0)},setState:function(b,g,c){g=g||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(g+"_on");this.removeClass(g+"_off");this.removeClass(g+"_disabled");c&&this.setAttribute("aria-pressed",
!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(g+"_disabled");this.removeClass(g+"_off");this.removeClass(g+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(g+"_off"),this.removeClass(g+"_on"),this.removeClass(g+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(g){b.src=
b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,g){var c=this.$.attributes;g=g||{};for(var a=0;a<c.length;a++){var d=c[a],e=d.nodeName.toLowerCase(),k;if(!(e in g))if("checked"==e&&(k=this.getAttribute(e)))b.setAttribute(e,k);else if(!CKEDITOR.env.ie||this.hasAttribute(e))k=this.getAttribute(e),null===k&&(k=d.nodeValue),b.setAttribute(e,k)}""!==this.$.style.cssText&&(b.$.style.cssText=this.$.style.cssText)},renameNode:function(b){if(this.getName()!=b){var g=
this.getDocument();b=new CKEDITOR.dom.element(b,g);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(b,c){var a=b.childNodes;if(0<=c&&c<a.length)return a[c]}return function(g){var c=this.$;if(g.slice)for(g=g.slice();0<g.length&&c;)c=b(c,g.shift());else c=b(c,g);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},
disableContextMenu:function(){function b(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(g){g.data.getTarget().getAscendant(b,!0)||g.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,g){b="data-"+b;if(void 0===g)return this.getAttribute(b);
!1===g?this.removeAttribute(b):this.setAttribute(b,g);return null},getEditor:function(b){var g=CKEDITOR.instances,c,a,d;b=b||void 0===b;for(c in g)if(a=g[c],a.element.equals(this)&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!b&&(d=a.editable())&&(d.equals(this)||d.contains(this)))return a;return null},find:function(b){var g=h(this);b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this,b)));g();return b},findOne:function(b){var g=h(this);b=this.$.querySelector(e(this,b));g();return b?new CKEDITOR.dom.element(b):
null},forEach:function(b,g,c){if(!(c||g&&this.type!=g))var a=b(this);if(!1!==a){c=this.getChildren();for(var d=0;d<c.count();d++)a=c.getItem(d),a.type==CKEDITOR.NODE_ELEMENT?a.forEach(b,g):g&&a.type!=g||b(a)}}});var m={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,g,c){"number"==typeof g&&(!c||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(g-=
k.call(this,b)),this.setStyle(b,g+"px"))};CKEDITOR.dom.element.prototype.getSize=function(b,g){var c=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(b)],this.$["client"+CKEDITOR.tools.capitalize(b)])||0;g&&(c-=k.call(this,b));return c}}(),CKEDITOR.dom.documentFragment=function(f){f=f||CKEDITOR.document;this.$=f.type==CKEDITOR.NODE_DOCUMENT?f.$.createDocumentFragment():f},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,
insertAfterNode:function(f){f=f.$;f.parentNode.insertBefore(this.$,f.nextSibling)},getHtml:function(){var f=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(f);return f.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 f(a,
c){var b=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(b.collapsed)return this.end(),null;b.optimize()}var g,d=b.startContainer;g=b.endContainer;var e=b.startOffset,k=b.endOffset,f,n=this.guard,h=this.type,m=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=g.type==CKEDITOR.NODE_ELEMENT?g:g.getParent(),z=g.type==CKEDITOR.NODE_ELEMENT?g.getChild(k):g.getNext();this._.guardLTR=function(a,c){return(!c||!l.equals(a))&&(!z||!a.equals(z))&&(a.type!=
CKEDITOR.NODE_ELEMENT||!c||!a.equals(b.root))}}if(a&&!this._.guardRTL){var I=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),E=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,c){return(!c||!I.equals(a))&&(!E||!a.equals(E))&&(a.type!=CKEDITOR.NODE_ELEMENT||!c||!a.equals(b.root))}}var F=a?this._.guardRTL:this._.guardLTR;f=n?function(a,c){return!1===F(a,c)?!1:n(a,c)}:F;this.current?g=this.current[m](!1,h,f):(a?g.type==CKEDITOR.NODE_ELEMENT&&(g=0<k?g.getChild(k-
1):!1===f(g,!0)?null:g.getPreviousSourceNode(!0,h,f)):(g=d,g.type==CKEDITOR.NODE_ELEMENT&&((g=g.getChild(e))||(g=!1===f(d,!0)?null:d.getNextSourceNode(!0,h,f)))),g&&!1===f(g)&&(g=null));for(;g&&!this._.end;){this.current=g;if(!this.evaluator||!1!==this.evaluator(g)){if(!c)return g}else if(c&&this.evaluator)return!1;g=g[m](!1,h,f)}this.end();return this.current=null}function h(a){for(var c,b=null;c=f.call(this,a);)b=c;return b}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=
a;this._={}},proto:{end:function(){this._.end=1},next:function(){return f.call(this)},previous:function(){return f.call(this,1)},checkForward:function(){return!1!==f.call(this,0,1)},checkBackward:function(){return!1!==f.call(this,1,1)},lastForward:function(){return h.call(this)},lastBackward:function(){return h.call(this,1)},reset:function(){delete this.current;this._={}}}});var e={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},k={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in k||!e[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(c){return!(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};
CKEDITOR.dom.walker.bookmark=function(a,c){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(g){var d,e;d=g&&g.type!=CKEDITOR.NODE_ELEMENT&&(e=g.getParent())&&b(e);d=a?d:d||b(g);return!!(c^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(c){var b;c&&c.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(c.getText())||CKEDITOR.env.webkit&&c.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^b)}};CKEDITOR.dom.walker.invisible=
function(a){var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(g){c(g)?g=1:(g.type==CKEDITOR.NODE_TEXT&&(g=g.getParent()),g=g.$.offsetWidth<=b);return!!(a^g)}};CKEDITOR.dom.walker.nodeType=function(a,c){return function(b){return!!(c^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function c(a){return!l(a)&&!m(a)}return function(b){var g=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&d.test(b.getText());g&&(g=b.getParent(),b=b.getNext(c),g=g.isBlockBoundary()&&
(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^g)}};CKEDITOR.dom.walker.temp=function(a){return function(c){c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent());c=c&&c.hasAttribute("data-cke-temp");return!!(a^c)}};var d=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),b=CKEDITOR.dom.walker.temp(),g=function(a){return m(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(c){c=l(c)||m(c)||b(c);return!!(a^c)}};var c=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var g=0,d=b.getChildCount();g<d;++g)if(!c(b.getChild(g)))return!!a;return!a}};var a=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var c={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(c[b]=1);return c}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(b){return function(g){g=
c(g)?!1:g.type==CKEDITOR.NODE_TEXT||g.type==CKEDITOR.NODE_ELEMENT&&(g.is(CKEDITOR.dtd.$inline)||g.is("hr")||"false"==g.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&g.is(n)&&a(g))?!0:!1;return!!(b^g)}};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&&d.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(f){this.endOffset=this.endContainer=this.startOffset=this.startContainer=
null;this.collapsed=!0;var h=f instanceof CKEDITOR.dom.document;this.document=h?f:f.getDocument();this.root=h?f.getBody():f},function(){function f(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function h(a,c,b,g,d){function e(a,c,b,g){var k=b?a.getPrevious():a.getNext();if(g&&h)return k;l||g?c.append(a.clone(!0,d),b):(a.remove(),m&&c.append(a,b));return k}function k(){var a,c,b,g=Math.min(O.length,C.length);for(a=0;a<g;a++)if(c=
O[a],b=C[a],!c.equals(b))return a;return a-1}function f(){var c=S-1,b=F&&H&&!t.equals(B);c<J-1||c<R-1||b?(b?a.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START):R==c+1&&E?a.moveToPosition(C[c],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(C[c+1],CKEDITOR.POSITION_BEFORE_START),g&&(c=O[c+1])&&c.type==CKEDITOR.NODE_ELEMENT&&(b=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),b.insertAfter(c),c.mergeSiblings(!1),a.moveToBookmark({startNode:b}))):
a.collapse(!0)}a.optimizeBookmark();var h=0===c,m=1==c,l=2==c;c=l||m;var t=a.startContainer,B=a.endContainer,y=a.startOffset,z=a.endOffset,I,E,F,H,G,L;if(l&&B.type==CKEDITOR.NODE_TEXT&&(t.equals(B)||t.type===CKEDITOR.NODE_ELEMENT&&t.getFirst().equals(B)))b.append(a.document.createText(B.substring(y,z)));else{B.type==CKEDITOR.NODE_TEXT?l?L=!0:B=B.split(z):0<B.getChildCount()?z>=B.getChildCount()?(B=B.getChild(z-1),E=!0):B=B.getChild(z):H=E=!0;t.type==CKEDITOR.NODE_TEXT?l?G=!0:t.split(y):0<t.getChildCount()?
0===y?(t=t.getChild(y),I=!0):t=t.getChild(y-1):F=I=!0;for(var O=t.getParents(),C=B.getParents(),S=k(),J=O.length-1,R=C.length-1,K=b,U,Y,Z,aa=-1,M=S;M<=J;M++){Y=O[M];Z=Y.getNext();for(M!=J||Y.equals(C[M])&&J<R?c&&(U=K.append(Y.clone(0,d))):I?e(Y,K,!1,F):G&&K.append(a.document.createText(Y.substring(y)));Z;){if(Z.equals(C[M])){aa=M;break}Z=e(Z,K)}K=U}K=b;for(M=S;M<=R;M++)if(b=C[M],Z=b.getPrevious(),b.equals(O[M]))c&&(K=K.getChild(0));else{M!=R||b.equals(O[M])&&R<J?c&&(U=K.append(b.clone(0,d))):E?e(b,
K,!1,H):L&&K.append(a.document.createText(b.substring(0,z)));if(M>aa)for(;Z;)Z=e(Z,K,!0);K=U}l||f()}}function e(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!0),g=CKEDITOR.dom.walker.bogus();return function(d){return b(d)||c(d)?!0:g(d)&&!a?a=!0:d.type==CKEDITOR.NODE_TEXT&&(d.hasAscendant("pre")||CKEDITOR.tools.trim(d.getText()).length)||d.type==CKEDITOR.NODE_ELEMENT&&!d.is(l)?!1:!0}}function k(a){var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(1);
return function(g){return b(g)||c(g)?!0:!a&&m(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&c(a)&&(b=a);return g(a)&&!(m(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},m=CKEDITOR.dom.walker.bogus(),b=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
g=CKEDITOR.dom.walker.editable(),c=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);
this.collapsed=!0},cloneContents:function(a){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,2,c,!1,"undefined"==typeof a?!0:a);return c},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,c){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,b,a,"undefined"==typeof c?!0:c);return b},createBookmark:function(a){var c,b,g,d,e=this.collapsed;c=this.document.createElement("span");c.data("cke-bookmark",1);c.setStyle("display",
"none");c.setHtml("\x26nbsp;");a&&(g="cke_bm_"+CKEDITOR.tools.getNextNumber(),c.setAttribute("id",g+(e?"C":"S")));e||(b=c.clone(),b.setHtml("\x26nbsp;"),a&&b.setAttribute("id",g+"E"),d=this.clone(),d.collapse(),d.insertNode(b));d=this.clone();d.collapse(!0);d.insertNode(c);b?(this.setStartAfter(c),this.setEndBefore(b)):this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END);return{startNode:a?g+(e?"C":"S"):c,endNode:a?g+"E":b,serializable:a,collapsed:e}},createBookmark2:function(){function a(a){var c=
a.container,g=a.offset,d;d=c;var e=g;d=d.type!=CKEDITOR.NODE_ELEMENT||0===e||e==d.getChildCount()?0:d.getChild(e-1).type==CKEDITOR.NODE_TEXT&&d.getChild(e).type==CKEDITOR.NODE_TEXT;d&&(c=c.getChild(g-1),g=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0<g){a:{for(d=c;g--;)if(e=d.getChild(g).getIndex(!0),0<=e){g=e;break a}g=-1}g+=1}if(c.type==CKEDITOR.NODE_TEXT){d=c;for(e=0;(d=d.getPrevious())&&d.type==CKEDITOR.NODE_TEXT;)e+=d.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
d=e;c.getText()?g+=d:(e=c.getPrevious(b),d?(g=d,c=e?e.getNext():c.getParent().getFirst()):(c=c.getParent(),g=e?e.getIndex(!0)+1:0))}a.container=c;a.offset=g}function c(a,b){var g=b.getCustomData("cke-fillingChar");if(g){var d=a.container;g.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(b){var g=this.collapsed,d={container:this.startContainer,
offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};b&&(a(d),c(d,this.root),g||(a(e),c(e,this.root)));return{start:d.container.getAddress(b),end:g?null:e.container.getAddress(b),startOffset:d.offset,endOffset:e.offset,normalized:b,collapsed:g,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var c=this.document.getByAddress(a.start,a.normalized),b=a.startOffset,g=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(c,b);g?this.setEnd(g,a):this.collapse(!0)}else c=
(b=a.serializable)?this.document.getById(a.startNode):a.startNode,a=b?this.document.getById(a.endNode):a.endNode,this.setStartBefore(c),c.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,c=this.endContainer,b=this.startOffset,g=this.endOffset,d;if(a.type==CKEDITOR.NODE_ELEMENT)if(d=a.getChildCount(),d>b)a=a.getChild(b);else if(1>d)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=
a.getNextSourceNode()||a}if(c.type==CKEDITOR.NODE_ELEMENT)if(d=c.getChildCount(),d>g)c=c.getChild(g).getPreviousSourceNode(!0);else if(1>d)c=c.getPreviousSourceNode();else{for(c=c.$;c.lastChild;)c=c.lastChild;c=new CKEDITOR.dom.node(c)}a.getPosition(c)&CKEDITOR.POSITION_FOLLOWING&&(a=c);return{startNode:a,endNode:c}},getCommonAncestor:function(a,c){var b=this.startContainer,g=this.endContainer,b=b.equals(g)?a&&b.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?b.getChild(this.startOffset):
b:b.getCommonAncestor(g);return c&&!b.is?b.getParent():b},optimize:function(){var a=this.startContainer,c=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;c=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,c=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);
c&&c.is&&c.is("span")&&c.data("cke-bookmark")&&this.setEndAt(c,CKEDITOR.POSITION_AFTER_END)},trim:function(a,c){var b=this.startContainer,g=this.startOffset,d=this.collapsed;if((!a||d)&&b&&b.type==CKEDITOR.NODE_TEXT){if(g)if(g>=b.getLength())g=b.getIndex()+1,b=b.getParent();else{var e=b.split(g),g=b.getIndex()+1,b=b.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):b.equals(this.endContainer)&&(this.endOffset+=1)}else g=b.getIndex(),b=b.getParent();
this.setStart(b,g);if(d){this.collapse(!0);return}}b=this.endContainer;g=this.endOffset;c||d||!b||b.type!=CKEDITOR.NODE_TEXT||(g?(g>=b.getLength()||b.split(g),g=b.getIndex()+1):g=b.getIndex(),b=b.getParent(),this.setEnd(b,g))},enlarge:function(a,c){function b(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var g=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var d=1;case CKEDITOR.ENLARGE_ELEMENT:var e=function(a,c){var b=new CKEDITOR.dom.range(f);
b.setStart(a,c);b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);var b=new CKEDITOR.dom.walker(b),d;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};d=b.next();){if(d.type!=CKEDITOR.NODE_TEXT)return!1;I=d!=a?d.getText():d.substring(c);if(g.test(I))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),f=this.root,h,m,l,t,B,y=!1,z,I;z=this.startContainer;var E=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(E&&(z=!CKEDITOR.tools.trim(z.substring(0,E)).length&&
z,y=!!z),z&&((t=z.getPrevious())||(l=z.getParent()))):(E&&(t=z.getChild(E-1)||z.getLast()),t||(l=z));for(l=b(l);l||t;){if(l&&!t){!B&&l.equals(k)&&(B=!0);if(d?l.isBlockBoundary():!f.contains(l))break;y&&"inline"==l.getComputedStyle("display")||(y=!1,B?h=l:this.setStartBefore(l));t=l.getPrevious()}for(;t;)if(z=!1,t.type==CKEDITOR.NODE_COMMENT)t=t.getPrevious();else{if(t.type==CKEDITOR.NODE_TEXT)I=t.getText(),g.test(I)&&(t=null),z=/[\s\ufeff]$/.test(I);else if((t.$.offsetWidth>(CKEDITOR.env.webkit?1:
0)||c&&t.is("br"))&&!t.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[t.getName()]){I=t.getText();if(g.test(I))t=null;else for(var E=t.$.getElementsByTagName("*"),F=0,H;H=E[F++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){t=null;break}t&&(z=!!I.length)}else t=null;z&&(y?B?h=l:l&&this.setStartBefore(l):y=!0);if(t){z=t.getPrevious();if(!l&&!z){l=t;t=null;break}t=z}else l=null}l&&(l=b(l.getParent()))}z=this.endContainer;E=this.endOffset;l=t=null;B=y=!1;z.type==CKEDITOR.NODE_TEXT?
CKEDITOR.tools.trim(z.substring(E)).length?y=!0:(y=!z.getLength(),E==z.getLength()?(t=z.getNext())||(l=z.getParent()):e(z,E)&&(l=z.getParent())):(t=z.getChild(E))||(l=z);for(;l||t;){if(l&&!t){!B&&l.equals(k)&&(B=!0);if(d?l.isBlockBoundary():!f.contains(l))break;y&&"inline"==l.getComputedStyle("display")||(y=!1,B?m=l:l&&this.setEndAfter(l));t=l.getNext()}for(;t;){z=!1;if(t.type==CKEDITOR.NODE_TEXT)I=t.getText(),e(t,0)||(t=null),z=/^[\s\ufeff]/.test(I);else if(t.type==CKEDITOR.NODE_ELEMENT){if((0<t.$.offsetWidth||
c&&t.is("br"))&&!t.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[t.getName()]){I=t.getText();if(g.test(I))t=null;else for(E=t.$.getElementsByTagName("*"),F=0;H=E[F++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){t=null;break}t&&(z=!!I.length)}else t=null}else z=1;z&&y&&(B?m=l:this.setEndAfter(l));if(t){z=t.getNext();if(!l&&!z){l=t;t=null;break}t=z}else l=null}l&&(l=b(l.getParent()))}h&&m&&(k=h.contains(m)?m:h,this.setStartBefore(k),this.setEndAfter(k));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:l=
new CKEDITOR.dom.range(this.root);f=this.root;l.setStartAt(f,CKEDITOR.POSITION_AFTER_START);l.setEnd(this.startContainer,this.startOffset);l=new CKEDITOR.dom.walker(l);var G,L,O=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 c=O(a);c||(G=a);return c},d=function(a){var c=S(a);!c&&a.is&&a.is("br")&&
(L=a);return c};l.guard=S;l=l.lastBackward();G=G||f;this.setStartAt(G,!G.is("br")&&(!l&&this.checkStartOfBlock()||l&&G.contains(l))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){l=this.clone();l=new CKEDITOR.dom.walker(l);var J=CKEDITOR.dom.walker.whitespaces(),R=CKEDITOR.dom.walker.bookmark();l.evaluator=function(a){return!J(a)&&!R(a)};if((l=l.previous())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br"))break}l=this.clone();l.collapse();l.setEndAt(f,
CKEDITOR.POSITION_BEFORE_END);l=new CKEDITOR.dom.walker(l);l.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?d:S;G=C=L=null;l=l.lastForward();G=G||f;this.setEndAt(G,!l&&this.checkEndOfBlock()||l&&G.contains(l)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);L&&this.setEndAfter(L)}},shrink:function(a,c,b){var g="boolean"===typeof b?b:b&&"boolean"===typeof b.shrinkOnBlockBoundary?b.shrinkOnBlockBoundary:!0,d=b&&b.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var e=this.clone(),k=
this.startContainer,f=this.endContainer,h=this.startOffset,l=this.endOffset,m=b=1;k&&k.type==CKEDITOR.NODE_TEXT&&(h?h>=k.getLength()?e.setStartAfter(k):(e.setStartBefore(k),b=0):e.setStartBefore(k));f&&f.type==CKEDITOR.NODE_TEXT&&(l?l>=f.getLength()?e.setEndAfter(f):(e.setEndAfter(f),m=0):e.setEndBefore(f));var e=new CKEDITOR.dom.walker(e),t=CKEDITOR.dom.walker.bookmark(),B=CKEDITOR.dom.walker.bogus();e.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
var y;e.guard=function(c,b){if(d&&B(c)||t(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||b&&c.equals(y)||!1===g&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return!1;b||c.type!=CKEDITOR.NODE_ELEMENT||(y=c);return!0};b&&(k=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);m&&(e.reset(),(e=e[a==CKEDITOR.SHRINK_ELEMENT?
"lastBackward":"previous"]())&&this.setEndAt(e,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!b&&!m)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var c=this.startContainer,b=c.getChild(this.startOffset);b?a.insertBefore(b):c.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,c){this.setStartAt(a,c);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);
this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=c;this.endContainer||(this._setEndContainer(a),this.endOffset=c);f(this)},setEnd:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex()+
1,a=a.getParent());this._setEndContainer(a);this.endOffset=c;this.startContainer||(this._setStartContainer(a),this.startOffset=c);f(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);
break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}f(this)},setEndAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);
break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}f(this)},fixBlock:function(a,c){var b=this.createBookmark(),g=this.document.createElement(c);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(g);g.trim();this.insertNode(g);var d=g.getBogus();d&&d.remove();g.appendBogus();this.moveToBookmark(b);return g},splitBlock:function(a,c){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),g=new CKEDITOR.dom.elementPath(this.endContainer,this.root),
d=b.block,e=g.block,k=null;if(!b.blockLimit.equals(g.blockLimit))return null;"br"!=a&&(d||(d=this.fixBlock(!0,a),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,a)));b=d&&this.checkStartOfBlock();g=e&&this.checkEndOfBlock();this.deleteContents();d&&d.equals(e)&&(g?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),e=null):b?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(d,
CKEDITOR.POSITION_BEFORE_START),d=null):(e=this.splitElement(d,c||!1),d.is("ul","ol")||d.appendBogus()));return{previousBlock:d,nextBlock:e,wasStartOfBlock:b,wasEndOfBlock:g,elementPath:k}},splitElement:function(a,c){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(!1,c||!1),g=a.clone(!1,c||!1);b.appendTo(g);g.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return g},removeEmptyBlocksAtEnd:function(){function a(a){return function(g){return c(g)||
b(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.isEmptyInlineRemoveable()||a.is("table")&&g.is("caption")?!1:!0}}var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!1);return function(c){for(var b=this.createBookmark(),g=this[c?"endPath":"startPath"](),d=g.block||g.blockLimit,e;d&&!d.equals(g.root)&&!d.getFirst(a(d));)e=d.getParent(),this[c?"setEndAt":"setStartAt"](d,CKEDITOR.POSITION_AFTER_END),d.remove(1),d=e;this.moveToBookmark(b)}}(),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,c){var b=c==CKEDITOR.START,g=this.clone();g.collapse(b);g[b?"setStartAt":"setEndAt"](a,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);g=new CKEDITOR.dom.walker(g);g.evaluator=k(b);return g[b?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,
c)),b.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=e();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),b.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,
this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=e();return a.checkForward()},getPreviousNode:function(a,c,b){var g=this.clone();g.collapse(1);g.setStartAt(b||this.root,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(g);b.evaluator=a;b.guard=c;return b.previous()},getNextNode:function(a,c,b){var g=this.clone();g.collapse();g.setEndAt(b||this.root,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(g);
b.evaluator=a;b.guard=c;return b.next()},checkReadOnly:function(){function a(a,c){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(c)||a.equals(c)))break}a=a.getParent()}return 1}return function(){var c=this.startContainer,b=this.endContainer;return!(a(c,b)&&a(b,c))}}(),moveToElementEditablePosition:function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,
g?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var d=0;a;){if(a.type==CKEDITOR.NODE_TEXT){g&&this.endContainer&&this.checkEndOfBlock()&&b.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,g?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);d=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,g?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),d=1;else if(g&&a.is("br")&&this.endContainer&&
this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,k=d,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(f=e[g?"getLast":"getFirst"](c));k||f||(f=e[g?"getPrevious":"getNext"](c));a=f}return!!d},moveToClosestEditablePosition:function(a,c){var b,g=0,d,e,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(b=new CKEDITOR.dom.range(this.root),
b.moveToPosition(a,k[c?0:1])):b=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))g=1;else if(d=b[c?"getNextEditableNode":"getPreviousEditableNode"]())g=1,(e=d.type==CKEDITOR.NODE_ELEMENT)&&d.is(CKEDITOR.dtd.$block)&&"false"==d.getAttribute("contenteditable")?(b.setStartAt(d,CKEDITOR.POSITION_BEFORE_START),b.setEndAt(d,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&d.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(b.setEnd(d,0),b.collapse()):b.moveToPosition(d,k[c?1:0]);g&&this.moveToRange(b);
return!!g},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),c=CKEDITOR.dom.walker.bookmark(!1,!0),b=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return b(a)&&c(a)};var g=a.next();
a.reset();return g&&g.equals(a.previous())?g:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:d(),getPreviousEditableNode:d(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.startContainer,b=
this.endContainer,g=c.getAscendant("table",!0),d=b.getAscendant("table",!0);return CKEDITOR.env.safari&&g&&b.equals(this.root)?c.getAscendant(a,!0):this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):g&&d&&(g.equals(d)||g.contains(d)||d.contains(g))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,b,g,d=this.clone();d.optimize();(g=d.startContainer.type==CKEDITOR.NODE_TEXT)?(b=d.startContainer.getText(),
c=d.startContainer.split(d.startOffset),a.insertAfter(d.startContainer)):d.insertNode(a);a.scrollIntoView();g&&(d.startContainer.setText(b),c.remove());a.remove()},getClientRects:function(){function a(a,c){var b=CKEDITOR.tools.array.map(a,function(a){return a}),g=new CKEDITOR.dom.range(c.root),d,e,k;c.startContainer instanceof CKEDITOR.dom.element&&(e=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(k=(k=c.endOffset===(c.endContainer.getChildCount?
c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));e&&g.setStart(c.startContainer.getParent(),c.startContainer.getIndex());k&&g.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(e||k)c=g;g=c.cloneContents();g=CKEDITOR.dom.document.prototype.find.call(g,"[data-cke-widget-id]").toArray();if(g=CKEDITOR.tools.array.map(g,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return g=
CKEDITOR.tools.array.map(g,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;d=this.root.getDocument().$.createRange();d.setStart(c.getParent().$,c.getIndex());d.setEnd(c.getParent().$,c.getIndex()+1);c=d.getClientRects();c.widgetRect=a.getClientRect();return c},c),CKEDITOR.tools.array.forEach(g,function(a){function c(d){CKEDITOR.tools.array.forEach(b,function(c,e){var k=CKEDITOR.tools.objectCompare(a[d],c);k||(k=CKEDITOR.tools.objectCompare(a.widgetRect,c));k&&(Array.prototype.splice.call(b,
e,a.length-d,a.widgetRect),g=!0)});g||(d<b.length-1?c(d+1):b.push(a.widgetRect))}var g;c(0)}),b}function c(a,b,d){var e;b.collapsed?d.startContainer instanceof CKEDITOR.dom.element?(a=d.checkStartOfBlock(),e=new CKEDITOR.dom.text("​"),a?d.startContainer.append(e,!0):0===d.startOffset?e.insertBefore(d.startContainer.getFirst()):(d=d.startContainer.getChildren().getItem(d.startOffset-1),e.insertAfter(d)),b.setStart(e.$,0),b.setEnd(e.$,0),a=b.getClientRects(),e.remove()):d.startContainer instanceof CKEDITOR.dom.text&&
(""===d.startContainer.getText()?(d.startContainer.setText("​"),a=b.getClientRects(),d.startContainer.setText("")):a=[g(d.createBookmark())]):a=[g(d.createBookmark())];return a}function b(a,c,g){a=CKEDITOR.tools.extend({},a);c&&(a=CKEDITOR.tools.getAbsoluteRectPosition(g.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function g(a){var c=a.startNode;a=a.endNode;var b;c.setText("​");c.removeStyle("display");a?(a.setText("​"),a.removeStyle("display"),
b=[c.getClientRect(),a.getClientRect()],a.remove()):b=[c.getClientRect(),c.getClientRect()];c.remove();return{right:Math.max(b[0].right,b[1].right),bottom:Math.max(b[0].bottom,b[1].bottom),left:Math.min(b[0].left,b[1].left),top:Math.min(b[0].top,b[1].top),width:Math.abs(b[0].left-b[1].left),height:Math.max(b[0].bottom,b[1].bottom)-Math.min(b[0].top,b[1].top)}}return void 0!==this.document.getSelection?function(g){var d=this.root.getDocument().$.createRange(),e;d.setStart(this.startContainer.$,this.startOffset);
d.setEnd(this.endContainer.$,this.endOffset);e=d.getClientRects();e=a(e,this);e.length||(e=c(e,d,this));return CKEDITOR.tools.array.map(e,function(a){return b(a,g,this)},this)}:function(a){return[b(g(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,c){var b=this.getCommonAncestor(),g=this.getBoundaryNodes(),d=[],e,k,f,h;if(b&&b.find)for(k=b.find(a),e=0;e<k.count();e++)if(b=k.getItem(e),c||!b.isReadOnly())f=
b.getPosition(g.startNode)&CKEDITOR.POSITION_FOLLOWING||g.startNode.equals(b),h=b.getPosition(g.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||g.endNode.equals(b),f&&h&&d.push(b);return d}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,c){var b=a[a.length-1],g=!1;c=c.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(b){var d=new CKEDITOR.dom.range(c.root),g=new CKEDITOR.dom.walker(d),e=CKEDITOR.dom.walker.whitespaces();d.setStart(b.endContainer,
b.endOffset);d.setEnd(c.startContainer,c.startOffset);for(d=g.next();e(d)||c.endContainer.equals(d);)d=g.next();g=!d}g?b.setEnd(c.endContainer,c.endOffset):a.push(c);return a},[])}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=
2,"use strict",function(){function f(c){1>arguments.length||(this.range=c,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function h(c){var a=[];c.forEach(function(c){if("true"==c.getAttribute("contenteditable"))return a.push(c),!1},CKEDITOR.NODE_ELEMENT,!0);return a}function e(c,a,b,g){a:{null==g&&(g=h(b));for(var d;d=g.shift();)if(d.getDtd().p){g={element:d,remaining:g};break a}g=null}if(!g)return 0;if((d=CKEDITOR.filter.instances[g.element.data("cke-filter")])&&
!d.check(a))return e(c,a,b,g.remaining);a=new CKEDITOR.dom.range(g.element);a.selectNodeContents(g.element);a=a.createIterator();a.enlargeBr=c.enlargeBr;a.enforceRealBlocks=c.enforceRealBlocks;a.activeFilter=a.filter=d;c._.nestedEditable={element:g.element,container:b,remaining:g.remaining,iterator:a};return 1}function k(c,a,b){if(!a)return!1;c=c.clone();c.collapse(!b);return c.checkBoundaryOfElement(a,b?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0),
b=function(c){return l(c)&&m(c)},g={dd:1,dt:1,li:1};f.prototype={getNextParagraph:function(c){var a,f,h,m,p;c=c||"p";if(this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(c))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;this.activeFilter=this.filter;if(e(this,c,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(c);this._.nestedEditable=
null}if(!this.range.root.getDtd()[c])return null;if(!this._.started){var r=this.range.clone();f=r.startPath();var q=r.endPath(),u=!r.collapsed&&k(r,f.block),x=!r.collapsed&&k(r,q.block,1);r.shrink(CKEDITOR.SHRINK_ELEMENT,!0);u&&r.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);x&&r.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=r.endContainer.hasAscendant("pre",!0)||r.startContainer.hasAscendant("pre",!0);r.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);
r.collapsed||(f=new CKEDITOR.dom.walker(r.clone()),q=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=q,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(r.clone()),f.evaluator=q,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,r.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&&
(q=new CKEDITOR.dom.elementPath(q.endContainer,q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&r.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=r.document.createText(""),this._.lastNode.insertAfter(f)),r=null);this._.started=1;f=r}q=this._.nextNode;r=this._.lastNode;for(this._.nextNode=null;q;){var u=0,x=q.hasAscendant("pre"),A=q.type!=CKEDITOR.NODE_ELEMENT,D=0;if(A)q.type==CKEDITOR.NODE_TEXT&&d.test(q.getText())&&(A=0);else{var t=q.getName();
if(CKEDITOR.dtd.$block[t]&&"false"==q.getAttribute("contenteditable")){a=q;e(this,c,a);break}else if(q.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){if("br"==t)A=1;else if(!f&&!q.getChildCount()&&"hr"!=t){a=q;h=q.equals(r);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=t&&(this._.nextNode=q));u=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}A=1}}A&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));
h=(!u||A)&&q.equals(r);if(f&&!u)for(;!q.getNext(b)&&!h;){t=q.getParent();if(t.isBlockBoundary(this.forceBrBreak&&!x&&{br:1})){u=1;A=0;h||t.equals(r);f.setEndAt(t,CKEDITOR.POSITION_BEFORE_END);break}q=t;A=1;h=q.equals(r);D=1}A&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,D,r);if((h=!q)||u&&f)break}if(!a){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;a=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=a.blockLimit;u={div:1,th:1,td:1};
a=a.block;!a&&q&&!this.enforceRealBlocks&&u[q.getName()]&&f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?a=q:!a||this.enforceRealBlocks&&a.is(g)?(a=this.range.document.createElement(c),f.extractContents().appendTo(a),a.trim(),f.insertNode(a),m=p=!0):"li"!=a.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(a=a.clone(!1),f.extractContents().appendTo(a),a.trim(),p=f.splitBlock(),m=!p.wasStartOfBlock,p=!p.wasEndOfBlock,f.insertNode(a)):h||(this._.nextNode=a.equals(r)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,
1,r))}m&&(m=a.getPrevious())&&m.type==CKEDITOR.NODE_ELEMENT&&("br"==m.getName()?m.remove():m.getLast()&&"br"==m.getLast().$.nodeName.toLowerCase()&&m.getLast().remove());p&&(m=a.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&"br"==m.getName()&&(!CKEDITOR.env.needsBrFiller||m.getPrevious(l)||m.getNext(l))&&m.remove();this._.nextNode||(this._.nextNode=h||a.equals(r)||!r?null:this._getNextSourceNode(a,1,r));return a},_getNextSourceNode:function(c,a,b){function g(a){return!(a.equals(b)||a.equals(d))}var d=
this.range.root;for(c=c.getNextSourceNode(a,null,g);!l(c);)c=c.getNextSourceNode(a,null,g);return c}};CKEDITOR.dom.range.prototype.createIterator=function(){return new f(this)}}(),CKEDITOR.command=function(f,h){this.uiItems=[];this.exec=function(e){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&f.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,f,e)};this.refresh=function(e,d){if(!this.readOnly&&e.readOnly)return!0;if(this.context&&!d.isContextFor(this.context)||
!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[e.mode]&&this.disable();return!1===this.fire("refresh",{editor:e,path:d})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var e;this.checkAllowed=function(k){return k||"boolean"!=typeof e?e=f.activeFilter.checkFeature(this):e};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype=
{enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(f){if(this.state==f||f!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=f;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 f(a,c,b,g,d){var e,f;a=[];for(e in c){f=c[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:F(f);"$"!=e.charAt(0)&&(f.elements=e);b&&(f.featureName=b.toLowerCase());var k=f;k.elements=m(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h=/\s*,\s*/,n=void 0;for(n in L){k[n]=m(k[n],
h)||null;var l=k,q=O[n],t=m(k[O[n]],h),C=k[n],D=[],J=!0,r=void 0;t?J=!1:t={};for(r in C)"!"==r.charAt(0)&&(r=r.slice(1),D.push(r),t[r]=!0,J=!1);for(;r=D.pop();)C[r]=C["!"+r],delete C["!"+r];l[q]=(J?!1:t)||null}k.match=k.match||null;g.push(f);a.push(f)}c=d.elements;d=d.generic;var w;b=0;for(g=a.length;b<g;++b){e=F(a[b]);f=!0===e.classes||!0===e.styles||!0===e.attributes;k=e;n=q=h=void 0;for(h in L)k[h]=u(k[h]);l=!0;for(n in O){h=O[n];q=k[h];t=[];C=void 0;for(C in q)-1<C.indexOf("*")?t.push(new RegExp("^"+
C.replace(/\*/g,".*")+"$")):t.push(C);q=t;q.length&&(k[h]=q,l=!1)}k.nothingRequired=l;k.noProperties=!(k.attributes||k.classes||k.styles);if(!0===e.elements||null===e.elements)d[f?"unshift":"push"](e);else for(w in k=e.elements,delete e.elements,k)if(c[w])c[w][f?"unshift":"push"](e);else c[w]=[e]}}function h(a,c,g,d){if(!a.match||a.match(c))if(d||b(a,c))if(a.propertiesOnly||(g.valid=!0),g.allAttributes||(g.allAttributes=e(a.attributes,c.attributes,g.validAttributes)),g.allStyles||(g.allStyles=e(a.styles,
c.styles,g.validStyles)),!g.allClasses){a=a.classes;c=c.classes;d=g.validClasses;if(a)if(!0===a)a=!0;else{for(var f=0,k=c.length,h;f<k;++f)h=c[f],d[h]||(d[h]=a(h));a=!1}else a=!1;g.allClasses=a}}function e(a,c,b){if(!a)return!1;if(!0===a)return!0;for(var g in c)b[g]||(b[g]=a(g));return!1}function k(a,c,b){if(!a.match||a.match(c)){if(a.noProperties)return!1;b.hadInvalidAttribute=d(a.attributes,c.attributes)||b.hadInvalidAttribute;b.hadInvalidStyle=d(a.styles,c.styles)||b.hadInvalidStyle;a=a.classes;
c=c.classes;if(a){for(var g=!1,e=!0===a,f=c.length;f--;)if(e||a(c[f]))c.splice(f,1),g=!0;a=g}else a=!1;b.hadInvalidClass=a||b.hadInvalidClass}}function d(a,c){if(!a)return!1;var b=!1,g=!0===a,d;for(d in c)if(g||a(d))delete c[d],b=!0;return b}function l(a,c,b){if(a.disabled||a.customConfig&&!b||!c)return!1;a._.cachedChecks={};return!0}function m(a,c){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=H(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(c));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var b={},g=0,d;for(d in a)b[d]=a[d],g++;return g?b:!1}function b(a,c){if(a.nothingRequired)return!0;var b,d,e,f;if(e=a.requiredClasses)for(f=c.classes,b=0;b<e.length;++b)if(d=e[b],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(f,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return!1;return g(c.styles,a.requiredStyles)&&g(c.attributes,a.requiredAttributes)}function g(a,c){if(!c)return!0;for(var b=0,g;b<c.length;++b)if(g=c[b],"string"==
typeof g){if(!(g in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,g))return!1;return!0}function c(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var c={};a.length;)c[a.shift()]="cke-test";return c}function a(a){var c,b,g,d,e={},f=1;for(a=H(a);c=a.match(C);)(b=c[2])?(g=n(b,"styles"),d=n(b,"attrs"),b=n(b,"classes")):g=d=b=null,e["$"+f++]={elements:c[1],classes:b,styles:g,attributes:d},a=a.slice(c[0].length);return e}function n(a,c){var b=a.match(S[c]);return b?H(b[1]):null}
function w(a){var c=a.styleBackup=a.attributes.style,b=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(c||"",1));a.classes||(a.classes=b?b.split(/\s+/):[])}function v(a,c,b,g){var d=0,e;g.toHtml&&(c.name=c.name.replace(J,"$1"));if(g.doCallbacks&&a.elementCallbacks){a:{e=a.elementCallbacks;for(var f=0,n=e.length,l;f<n;++f)if(l=e[f](c)){e=l;break a}e=void 0}if(e)return e}if(g.doTransform&&(e=a._.transformations[c.name])){w(c);for(f=0;f<e.length;++f)t(a,c,e[f]);r(c)}if(g.doFilter){a:{f=
c.name;n=a._;a=n.allowedRules.elements[f];e=n.allowedRules.generic;f=n.disallowedRules.elements[f];n=n.disallowedRules.generic;l=g.skipRequired;var m={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},C,D;if(a||e){w(c);if(f)for(C=0,D=f.length;C<D;++C)if(!1===k(f[C],c,m)){a=null;break a}if(n)for(C=0,D=n.length;C<D;++C)k(n[C],c,m);if(a)for(C=0,D=a.length;C<D;++C)h(a[C],c,m,l);if(e)for(C=
0,D=e.length;C<D;++C)h(e[C],c,m,l);a=m}else a=null}if(!a||!a.valid)return b.push(c),1;D=a.validAttributes;var O=a.validStyles;e=a.validClasses;var f=c.attributes,u=c.styles,n=c.classes;l=c.classBackup;var B=c.styleBackup,x,p,E=[],m=[],y=/^data-cke-/;C=!1;delete f.style;delete f["class"];delete c.classBackup;delete c.styleBackup;if(!a.allAttributes)for(x in f)D[x]||(y.test(x)?x==(p=x.replace(/^data-cke-saved-/,""))||D[p]||(delete f[x],C=!0):(delete f[x],C=!0));if(!a.allStyles||a.hadInvalidStyle){for(x in u)a.allStyles||
O[x]?E.push(x+":"+u[x]):C=!0;E.length&&(f.style=E.sort().join("; "))}else B&&(f.style=B);if(!a.allClasses||a.hadInvalidClass){for(x=0;x<n.length;++x)(a.allClasses||e[n[x]])&&m.push(n[x]);m.length&&(f["class"]=m.sort().join(" "));l&&m.length<l.split(/\s+/).length&&(C=!0)}else l&&(f["class"]=l);C&&(d=1);if(!g.skipFinalValidation&&!q(c))return b.push(c),1}g.toHtml&&(c.name=c.name.replace(R,"cke:$1"));return d}function p(a){var c=[],b;for(b in a)-1<b.indexOf("*")&&c.push(b.replace(/\*/g,".*"));return c.length?
new RegExp("^(?:"+c.join("|")+")$"):null}function r(a){var c=a.attributes,b;delete c.style;delete c["class"];if(b=CKEDITOR.tools.writeCssText(a.styles,!0))c.style=b;a.classes.length&&(c["class"]=a.classes.sort().join(" "))}function q(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 u(a){if(!a)return!1;if(!0===a)return!0;var c=p(a);return function(b){return b in a||c&&b.match(c)}}function x(){return new CKEDITOR.htmlParser.element("br")}
function A(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||E.$block[a.name])}function D(a,c,b){var g=a.name;if(E.$empty[g]||!a.children.length)"hr"==g&&"br"==c?a.replaceWith(x()):(a.parent&&b.push({check:"it",el:a.parent}),a.remove());else if(E.$block[g]||"tr"==g)if("br"==c)a.previous&&!A(a.previous)&&(c=x(),c.insertBefore(a)),a.next&&!A(a.next)&&(c=x(),c.insertAfter(a)),a.replaceWithChildren();else{var g=a.children,d;b:{d=E[c];for(var e=0,f=g.length,k;e<f;++e)if(k=g[e],k.type==CKEDITOR.NODE_ELEMENT&&
!d[k.name]){d=!1;break b}d=!0}if(d)a.name=c,a.attributes={},b.push({check:"parent-down",el:a});else{d=a.parent;for(var e=d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==d.name,h,n,f=g.length;0<f;)k=g[--f],e&&(k.type==CKEDITOR.NODE_TEXT||k.type==CKEDITOR.NODE_ELEMENT&&E.$inline[k.name])?(h||(h=new CKEDITOR.htmlParser.element(c),h.insertAfter(a),b.push({check:"parent-down",el:h})),h.add(k,0)):(h=null,n=E[d.name]||E.span,k.insertAfter(a),d.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||k.type!=CKEDITOR.NODE_ELEMENT||
n[k.name]||b.push({check:"el-up",el:k}));a.remove()}}else g in{style:1,script:1}?a.remove():(a.parent&&b.push({check:"it",el:a.parent}),a.replaceWithChildren())}function t(a,c,b){var g,d;for(g=0;g<b.length;++g)if(d=b[g],!(d.check&&!a.check(d.check,!1)||d.left&&!d.left(c))){d.right(c,K);break}}function B(a,c){var b=c.getDefinition(),g=b.attributes,d=b.styles,e,f,k,h;if(a.name!=b.element)return!1;for(e in g)if("class"==e)for(b=g[e].split(/\s+/),k=a.classes.join("|");h=b.pop();){if(-1==k.indexOf(h))return!1}else if(a.attributes[e]!=
g[e])return!1;for(f in d)if(a.styles[f]!=d[f])return!1;return!0}function y(a,c){var b,g;"string"==typeof a?b=a:a instanceof CKEDITOR.style?g=a:(b=a[0],g=a[1]);return[{element:b,left:g,right:function(a,b){b.transform(a,c)}}]}function z(a){return function(c){return B(c,a)}}function I(a){return function(c,b){b[a](c)}}var E=CKEDITOR.dtd,F=CKEDITOR.tools.copy,H=CKEDITOR.tools.trim,G=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){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;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var c=a.config.allowedContent;!0===c?this.disabled=!0:(c||(this.customConfig=!1),this.allow(c,"config",1),this.allow(a.config.extraAllowedContent,"extra",
1),this.allow(G[a.enterMode]+" "+G[a.shiftEnterMode],"default",1),this.disallow(a.config.disallowedContent))}else this.customConfig=!1,this.allow(a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(c,b,g){if(!l(this,c,g))return!1;var d,e;if("string"==typeof c)c=a(c);else if(c instanceof CKEDITOR.style){if(c.toAllowedContentRules)return this.allow(c.toAllowedContentRules(this.editor),b,g);d=c.getDefinition();c={};g=d.attributes;c[d.element]=d={styles:d.styles,requiredStyles:d.styles&&
CKEDITOR.tools.objectKeys(d.styles)};g&&(g=F(g),d.classes=g["class"]?g["class"].split(/\s+/):null,d.requiredClasses=d.classes,delete g["class"],d.attributes=g,d.requiredAttributes=g&&CKEDITOR.tools.objectKeys(g))}else if(CKEDITOR.tools.isArray(c)){for(d=0;d<c.length;++d)e=this.allow(c[d],b,g);return e}f(this,c,b,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,c,b,g){if(this.disabled)return!1;var d=this,e=[],f=this.editor&&this.editor.config.protectedSource,k,h=!1,n={doFilter:!b,
doTransform:!0,doCallbacks:!0,toHtml:c};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!c||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(k=v(d,a,e,n),k&1)h=!0;else if(k&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var b;a:{var g=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));b=[];var l,m,q;if(f)for(m=0;m<f.length;++m)if((q=g.match(f[m]))&&
q[0].length==g.length){b=!0;break a}g=CKEDITOR.htmlParser.fragment.fromHtml(g);1==g.children.length&&(l=g.children[0]).type==CKEDITOR.NODE_ELEMENT&&v(d,l,b,n);b=!b.length}b||e.push(a)}},null,!0);e.length&&(h=!0);var l;a=[];g=G[g||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var m;b=e.pop();)b.type==CKEDITOR.NODE_ELEMENT?D(b,g,a):b.remove();for(;l=a.pop();)if(b=l.el,b.parent)switch(m=E[b.parent.name]||E.span,l.check){case "it":E.$removeEmpty[b.name]&&!b.children.length?D(b,g,a):q(b)||
D(b,g,a);break;case "el-up":b.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[b.name]||D(b,g,a);break;case "parent-down":b.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[b.name]||D(b.parent,g,a)}return h},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(c){if(!l(this,c,!0))return!1;"string"==typeof c&&(c=a(c));f(this,c,null,this.disallowedContent,
this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var c,b,g=[],d;for(c=0;c<a.length&&!d;++c)b=a[c],("string"==typeof b||b instanceof CKEDITOR.style)&&this.check(b)&&(d=b);if(d){for(c=0;c<a.length;++c)g.push(y(a[c],d));this.addTransformations(g)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,
a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var c,b;if(!this.disabled&&a){var g=this._.transformations,d;for(d=0;d<a.length;++d){c=a[d];var e=void 0,f=void 0,k=void 0,h=void 0,n=void 0,l=void 0;b=[];for(f=0;f<c.length;++f)k=c[f],"string"==typeof k?(k=k.split(/\s*:\s*/),h=k[0],n=null,l=k[1]):(h=k.check,n=k.left,
l=k.right),e||(e=k,e=e.element?e.element:h?h.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),n instanceof CKEDITOR.style&&(n=z(n)),b.push({check:h==e?null:h,left:n,right:"string"==typeof l?I(l):l});c=e;g[c]||(g[c]=[]);g[c].push(b)}}},check:function(b,g,d){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(b)){for(var e=b.length;e--;)if(this.check(b[e],g,d))return!0;return!1}var f,k;if("string"==typeof b){k=b+"\x3c"+(!1===g?"0":"1")+(d?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];
e=a(b).$1;f=e.styles;var h=e.classes;e.name=e.elements;e.classes=h=h?h.split(/\s*,\s*/):[];e.styles=c(f);e.attributes=c(e.attributes);e.children=[];h.length&&(e.attributes["class"]=h.join(" "));f&&(e.attributes.style=CKEDITOR.tools.writeCssText(e.styles));f=e}else e=b.getDefinition(),f=e.styles,h=e.attributes||{},f&&!CKEDITOR.tools.isEmpty(f)?(f=F(f),h.style=CKEDITOR.tools.writeCssText(f,!0)):f={},f={name:e.element,attributes:h,classes:h["class"]?h["class"].split(/\s+/):[],styles:f,children:[]};var h=
CKEDITOR.tools.clone(f),n=[],l;if(!1!==g&&(l=this._.transformations[f.name])){for(e=0;e<l.length;++e)t(this,f,l[e]);r(f)}v(this,h,n,{doFilter:!0,doTransform:!1!==g,skipRequired:!d,skipFinalValidation:!d});g=0<n.length?!1:CKEDITOR.tools.objectCompare(f.attributes,h.attributes,!0)?!0:!1;"string"==typeof b&&(this._.cachedChecks[k]=g);return g},getAllowedEnterMode:function(){var a=["p","div","br"],c={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(b,g){var d=a.slice(),
e;if(this.check(G[b]))return b;for(g||(d=d.reverse());e=d.pop();)if(this.check(e))return c[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,c=CKEDITOR.tools.clone;a.allowedContent=c(this.allowedContent);a._.allowedRules=c(this._.allowedRules);a.disallowedContent=c(this.disallowedContent);a._.disallowedRules=c(this._.disallowedRules);a._.transformations=c(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];
delete this._;delete this.allowedContent;delete this.disallowedContent}};var L={styles:1,attributes:1,classes:1},O={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:/\(([^\)]+)\)/},J=/^cke:(object|embed|param)$/,R=/^(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,c,b){b=b||c;if(!(b in a.styles)){var g=a.attributes[c];g&&(/^\d+$/.test(g)&&(g+="px"),a.styles[b]=g)}delete a.attributes[c]},lengthToAttribute:function(a,c,b){b=b||c;if(!(b in a.attributes)){var g=a.styles[c],d=g&&g.match(/^(\d+)(?:\.\d*)?px$/);d?a.attributes[b]=d[1]:"cke-test"==g&&(a.attributes[b]="cke-test")}delete a.styles[c]},alignmentToStyle:function(a){if(!("float"in
a.styles)){var c=a.attributes.align;if("left"==c||"right"==c)a.styles["float"]=c}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var c=a.styles["float"];if("left"==c||"right"==c)a.attributes.align=c}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var c=CKEDITOR.tools.style.parse.border(a.styles.border);c.color&&(a.styles["border-color"]=c.color);c.style&&(a.styles["border-style"]=c.style);c.width&&(a.styles["border-width"]=c.width);
delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function c(g){a.styles["margin-top"]=
b[g[0]];a.styles["margin-right"]=b[g[1]];a.styles["margin-bottom"]=b[g[2]];a.styles["margin-left"]=b[g[3]]}if(a.styles.margin){var b=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(b.length){case 1:c([0,0,0,0]);break;case 2:c([0,1,0,1]);break;case 3:c([0,1,2,1]);break;case 4:c([0,1,2,3])}delete a.styles.margin}},matchesStyle:B,transform:function(a,c){if("string"==typeof c)a.name=c;else{var b=c.getDefinition(),g=b.styles,d=b.attributes,e,f,k,h;a.name=b.element;for(e in d)if("class"==e)for(b=
a.classes.join("|"),k=d[e].split(/\s+/);h=k.pop();)-1==b.indexOf(h)&&a.classes.push(h);else a.attributes[e]=d[e];for(f in g)a.styles[f]=g[f]}}}}(),function(){CKEDITOR.focusManager=function(f){if(f.focusManager)return f.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:f};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(f){this._.timer&&clearTimeout(this._.timer);f&&(this.currentActive=f);this.hasFocus||this._.locked||((f=CKEDITOR.currentInstance)&&
f.focusManager.blur(1),this.hasFocus=!0,(f=this._.editor.container)&&f.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(f){function h(){if(this.hasFocus){this.hasFocus=!1;var e=this._.editor.container;e&&e.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var e=CKEDITOR.focusManager._.blurDelay;f||!e?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;
h.call(this)},e,this)}},add:function(f,h){var e=f.getCustomData("focusmanager");if(!e||e!=this){e&&e.remove(f);var e="focus",k="blur";h&&(CKEDITOR.env.ie?(e="focusin",k="focusout"):CKEDITOR.event.useCapture=1);var d={blur:function(){f.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(f)}};f.on(e,d.focus,this);f.on(k,d.blur,this);h&&(CKEDITOR.event.useCapture=0);f.setCustomData("focusmanager",this);f.setCustomData("focusmanager_handlers",d)}},remove:function(f){f.removeCustomData("focusmanager");
var h=f.removeCustomData("focusmanager_handlers");f.removeListener("blur",h.blur);f.removeListener("focus",h.focus)}}}(),CKEDITOR.keystrokeHandler=function(f){if(f.keystrokeHandler)return f.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:f};return this},function(){var f,h=function(e){e=e.data;var d=e.getKeystroke(),h=this.keystrokes[d],m=this._.editor;f=!1===m.fire("key",{keyCode:d,domEvent:e});f||(h&&(f=!1!==m.execCommand(h,{from:"keystrokeHandler"})),f||(f=!!this.blockedKeystrokes[d]));
f&&e.preventDefault(!0);return!f},e=function(e){f&&(f=!1,e.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(f){f.on("keydown",h,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)f.on("keypress",e,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(f,h,e){f&&CKEDITOR.lang.languages[f]||(f=this.detect(h,f));var k=this;h=function(){k[f].dir=k.rtl[f]?"rtl":"ltr";e(f,k[f])};this[f]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+f+".js"),h,this)},detect:function(f,h){var e=this.languages;h=h||navigator.userLanguage||navigator.language||
f;var k=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),d=k[1],k=k[2];e[d+"-"+k]?d=d+"-"+k:e[d]||(d=null);CKEDITOR.lang.detect=d?function(){return d}:function(d){return d};return d||f}}}(),CKEDITOR.scriptLoader=function(){var f={},h={};return{load:function(e,k,d,l){var m="string"==typeof e;m&&(e=[e]);d||(d=CKEDITOR);var b=e.length,g=[],c=[],a=function(a){k&&(m?k.call(d,a):k.call(d,g,c))};if(0===b)a(!0);else{var n=function(d,e){(e?g:c).push(d);0>=--b&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),
a(e))},w=function(a,c){f[a]=1;var b=h[a];delete h[a];for(var g=0;g<b.length;g++)b[g](a,c)},v=function(a){if(f[a])n(a,!0);else{var c=h[a]||(h[a]=[]);c.push(n);if(!(1<c.length)){var b=new CKEDITOR.dom.element("script");b.setAttributes({type:"text/javascript",src:a});k&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?b.$.onreadystatechange=function(){if("loaded"==b.$.readyState||"complete"==b.$.readyState)b.$.onreadystatechange=null,w(a,!0)}:(b.$.onload=function(){setTimeout(function(){w(a,
!0)},0)},b.$.onerror=function(){w(a,!1)}));b.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var p=0;p<b;p++)v(e[p])}},queue:function(){function e(){var d;(d=f[0])&&this.load(d.scriptUrl,d.callback,CKEDITOR,0)}var f=[];return function(d,h){var m=this;f.push({scriptUrl:d,callback:function(){h&&h.apply(this,arguments);f.shift();e.call(m)}});1==f.length&&e.call(this)}}()}}(),CKEDITOR.resourceManager=function(f,h){this.basePath=f;this.fileName=
h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(f,h){if(this.registered[f])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+f+'" is already registered.');var e=this.registered[f]=h||{};e.name=f;e.path=this.getPath(f);CKEDITOR.fire(f+CKEDITOR.tools.capitalize(this.fileName)+"Ready",e);return this.get(f)},get:function(f){return this.registered[f]||null},getPath:function(f){var h=this.externals[f];return CKEDITOR.getUrl(h&&
h.dir||this.basePath+f+"/")},getFilePath:function(f){var h=this.externals[f];return CKEDITOR.getUrl(this.getPath(f)+(h?h.file:this.fileName+".js"))},addExternal:function(f,h,e){f=f.split(",");for(var k=0;k<f.length;k++){var d=f[k];e||(h=h.replace(/[^\/]+$/,function(d){e=d;return""}));this.externals[d]={dir:h,file:e||this.fileName+".js"}}},load:function(f,h,e){CKEDITOR.tools.isArray(f)||(f=f?[f]:[]);for(var k=this.loaded,d=this.registered,l=[],m={},b={},g=0;g<f.length;g++){var c=f[g];if(c)if(k[c]||
d[c])b[c]=this.get(c);else{var a=this.getFilePath(c);l.push(a);a in m||(m[a]=[]);m[a].push(c)}}CKEDITOR.scriptLoader.load(l,function(a,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+m[c[0]].join(",")+'" was not found at "'+c[0]+'".');for(var g=0;g<a.length;g++)for(var d=m[a[g]],f=0;f<d.length;f++){var l=d[f];b[l]=this.get(l);k[l]=1}h.call(e,b)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,
function(f){var h={};return function(e,k,d){var l={},m=function(b){f.call(this,b,function(b){CKEDITOR.tools.extend(l,b);var c=[],a;for(a in b){var e=b[a],f=e&&e.requires;if(!h[a]){if(e.icons)for(var v=e.icons.split(","),p=v.length;p--;)CKEDITOR.skin.addIcon(v[p],e.path+"icons/"+(CKEDITOR.env.hidpi&&e.hidpi?"hidpi/":"")+v[p]+".png");h[a]=1}if(f)for(f.split&&(f=f.split(",")),e=0;e<f.length;e++)l[f[e]]||c.push(f[e])}if(c.length)m.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);k&&k.call(d||window,l)}},this)};m.call(this,e)}}),CKEDITOR.plugins.setLang=function(f,h,e){var k=this.get(f);f=k.langEntries||(k.langEntries={});k=k.lang||(k.lang=[]);k.split&&(k=k.split(","));-1==CKEDITOR.tools.indexOf(k,h)&&k.push(h);f[h]=e},CKEDITOR.ui=function(f){if(f.ui)return f.ui;this.items={};this.instances={};this.editor=f;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(f,h,e){e.name=f.toLowerCase();var k=this.items[f]={type:h,
command:e.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(k,e)},get:function(f){return this.instances[f]},create:function(f){var h=this.items[f],e=h&&this._.handlers[h.type],k=h&&h.command&&this.editor.getCommand(h.command),e=e&&e.create.apply(this,h.args);this.instances[f]=e;k&&k.uiItems.push(e);e&&!e.type&&(e.type=h.type);return e},addHandler:function(f,h){this._.handlers[f]=h},space:function(f){return CKEDITOR.document.getById(this.spaceId(f))},spaceId:function(f){return this.editor.id+
"_"+f}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function f(a,c,g){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==c){if(!(c instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!g)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&g==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!e(c,g))throw Error('The specified element mode is not supported on element: "'+
c.getName()+'".');this.element=c;this.elementMode=g;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||h();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);
this.on("readOnly",k);this.on("selectionChange",function(a){l(this,a.data.path)});this.on("activeFilterChange",function(){l(this,this.elementPath(),!0)});this.on("mode",k);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?b(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function h(){do var a="editor"+ ++p;while(CKEDITOR.instances[a]);return a}function e(a,c){return c==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):c==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function k(){var a=this.commands,c;for(c in a)d(this,a[c])}function d(a,c){c[c.startDisabled?"disable":a.readOnly&&!c.readOnly?"disable":
c.modes[a.mode]?"enable":"disable"]()}function l(a,c,b){if(c){var g,d,e=a.commands;for(d in e)g=e[d],(b||g.contextSensitive)&&g.refresh(a,c)}}function m(a){var c=a.config.customConfig;if(!c)return!1;var c=CKEDITOR.getUrl(c),b=r[c]||(r[c]={});b.fn?(b.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=c&&m(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(c,function(){b.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};m(a)});return!0}function b(a,c){a.on("customConfigLoaded",
function(){if(c){if(c.on)for(var b in c.on)a.on(b,c.on[b]);CKEDITOR.tools.extend(a.config,c,!0);delete a.config.on}b=a.config;a.readOnly=b.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=b.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:b.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:b.shiftEnterMode;b.skin&&(CKEDITOR.skinName=b.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);g(a)});c&&null!=c.customConfig&&(a.config.customConfig=c.customConfig);
m(a)||a.fireOnce("customConfigLoaded")}function g(a){CKEDITOR.skin.loadPart("editor",function(){c(a)})}function c(c){CKEDITOR.lang.load(c.config.language,c.config.defaultLanguage,function(b,g){var d=c.config.title;c.langCode=b;c.lang=CKEDITOR.tools.prototypedCopy(g);c.title="string"==typeof d||!1===d?d:[c.lang.editor,c.name].join(", ");c.config.contentsLangDirection||(c.config.contentsLangDirection=c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?c.element.getDirection(1):c.lang.dir);c.fire("langLoaded");
a(c)})}function a(a){a.getStylesSet(function(c){a.once("loaded",function(){a.fire("stylesSet",{styles:c})},null,null,1);n(a)})}function n(a){function c(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var b=a.config,g=c(b.plugins),d=c(b.extraPlugins),e=c(b.removePlugins);if(d)var f=new RegExp("(?:^|,)(?:"+d.replace(/,/g,"|")+")(?\x3d,|$)","g"),g=g.replace(f,""),g=g+(","+d);if(e)var k=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),g=g.replace(k,
"");CKEDITOR.env.air&&(g+=",adobeair");CKEDITOR.plugins.load(g.split(","),function(c){var g=[],d=[],e=[];a.plugins=c;for(var f in c){var h=c[f],n=h.lang,l=null,m=h.requires,t;CKEDITOR.tools.isArray(m)&&(m=m.join(","));if(m&&(t=m.match(k)))for(;m=t.pop();)CKEDITOR.error("editor-plugin-required",{plugin:m.replace(",",""),requiredBy:f});n&&!a.lang[f]&&(n.split&&(n=n.split(",")),0<=CKEDITOR.tools.indexOf(n,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l=l!=a.langCode&&0<=CKEDITOR.tools.indexOf(n,
l)?l:0<=CKEDITOR.tools.indexOf(n,"en")?"en":n[0]),h.langEntries&&h.langEntries[l]?(a.lang[f]=h.langEntries[l],l=null):e.push(CKEDITOR.getUrl(h.path+"lang/"+l+".js")));d.push(l);g.push(h)}CKEDITOR.scriptLoader.load(e,function(){for(var c=["beforeInit","init","afterInit"],e=0;e<c.length;e++)for(var f=0;f<g.length;f++){var k=g[f];0===e&&d[f]&&k.lang&&k.langEntries&&(a.lang[k.name]=k.langEntries[d[f]]);if(k[c[e]])k[c[e]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);
for(f=0;f<a.config.blockedKeystrokes.length;f++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[f]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function w(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var c=this.getData();this.config.htmlEncodeOutput&&(c=CKEDITOR.tools.htmlEncode(c));a.is("textarea")?a.setValue(c):a.setHtml(c);return!0}return!1}function v(a,c){function b(a){var c=a.startContainer,g=a.endContainer;
return c.is&&(c.is("tr")||c.is("td")&&c.equals(g)&&a.endOffset===c.getChildCount())?!0:!1}function g(a){var c=a.startContainer;return c.is("tr")?a.cloneContents():c.clone(!0)}for(var d=new CKEDITOR.dom.documentFragment,e,f,k,h=0;h<a.length;h++){var n=a[h],l=n.startContainer.getAscendant("tr",!0);b(n)?(e||(e=l.getAscendant("table").clone(),e.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),d.append(e),e=e.findOne("thead, tbody, tfoot")),f&&f.equals(l)||(f=l,k=l.clone(),e.append(k)),k.append(g(n))):
d.append(n.cloneContents())}return e?d:c.getHtmlFromRange(a[0])}f.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=f;var p=0,r={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,c){c.name=a.toLowerCase();var b=c instanceof CKEDITOR.command?c:new CKEDITOR.command(this,c);this.mode&&d(this,b);return this.commands[a]=b},_attachToForm:function(){function a(c){b.updateElement();b._.required&&!g.getValue()&&!1===b.fire("required")&&c.data.preventDefault()}function c(a){return!!(a&&
a.call&&a.apply)}var b=this,g=b.element,d=new CKEDITOR.dom.element(g.$.form);g.is("textarea")&&d&&(d.on("submit",a),c(d.$.submit)&&(d.$.submit=CKEDITOR.tools.override(d.$.submit,function(c){return function(){a();c.apply?c.apply(this):c()}})),b.on("destroy",function(){d.removeListener("submit",a)}))},destroy:function(a){this.fire("beforeDestroy");!a&&w.call(this);this.editable(null);this.filter&&(this.filter.destroy(),delete this.filter);delete this.activeFilter;this.status="destroyed";this.fire("destroy");
this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,c){var b=this.getCommand(a),g={name:a,commandData:c||{},command:b};return b&&b.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",
g)&&(g.returnValue=b.exec(g.commandData),!b.async&&!1!==this.fire("afterCommandExec",g))?g.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var c=this._.data;"string"!=typeof c&&(c=(c=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?c.is("textarea")?c.getValue():c.getHtml():"");c={dataValue:c};!a&&this.fire("getData",c);return c.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=
this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,c,b){var g=!0,d=c;c&&"object"==typeof c&&(b=c.internal,d=c.callback,g=!c.noSnapshot);!b&&g&&this.fire("saveSnapshot");if(d||!b)this.once("dataReady",function(a){!b&&g&&this.fire("saveSnapshot");d&&d.call(a.editor)});a={dataValue:a};!b&&this.fire("setData",a);this._.data=a.dataValue;!b&&this.fire("afterSetData",
a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,c,b){this.fire("insertHtml",{dataValue:a,mode:c,range:b})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var c=this.editable(),b=this.getSelection(),b=b&&b.getRanges();if(!c||!b||0===b.length)return null;c=v(b,c);return a?
c.getHtml():c},extractSelectedHtml:function(a,c){var b=this.editable(),g=this.getSelection().getRanges(),d=new CKEDITOR.dom.documentFragment,e;if(!b||0===g.length)return null;for(e=0;e<g.length;e++)d.append(b.extractHtmlFromRange(g[e],c));c||this.getSelection().selectRanges([g[0]]);return a?d.getHtml():d},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},
updateElement:function(){return w.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,c=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],b,g,d=c.length;d--;)b=c[d],g=0,CKEDITOR.tools.isArray(b)&&(g=b[1],b=b[0]),g?a[b]=g:delete a[b]},getCommandKeystroke:function(a){if(a="string"===typeof a?this.getCommand(a):a){var c=CKEDITOR.tools.object.findKey(this.commands,a),b=this.keystrokeHandler.keystrokes,g;if(a.fakeKeystroke)return a.fakeKeystroke;
for(g in b)if(b.hasOwnProperty(g)&&b[g]==c)return g}return null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,c){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;c=c?this.blockless?
CKEDITOR.ENTER_BR:c:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=c)this.activeEnterMode=a,this.activeShiftEnterMode=c,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)}})}(),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 f=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(e){for(var k,d,l=0,m;k=this._.htmlPartsRegex.exec(e);){d=k.index;if(d>l)if(l=e.substring(l,d),m)m.push(l);else this.onText(l);
l=this._.htmlPartsRegex.lastIndex;if(d=k[1])if(d=d.toLowerCase(),m&&CKEDITOR.dtd.$cdata[d]&&(this.onCDATA(m.join("")),m=null),!m){this.onTagClose(d);continue}if(m)m.push(k[0]);else if(d=k[3]){if(d=d.toLowerCase(),!/="/.test(d)){var b={},g,c=k[4];k=!!k[5];if(c)for(;g=f.exec(c);){var a=g[1].toLowerCase();g=g[2]||g[3]||g[4]||"";b[a]=!g&&h[a]?a:CKEDITOR.tools.htmlDecodeAttr(g)}this.onTagOpen(d,b,k);!m&&CKEDITOR.dtd.$cdata[d]&&(m=[])}}else if(d=k[2])this.onComment(d)}if(e.length>l)this.onText(e.substring(l,
e.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(f){this._.output.push("\x3c",f)},openTagClose:function(f,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(f,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",f,'\x3d"',h,'"')},closeTag:function(f){this._.output.push("\x3c/",f,"\x3e")},text:function(f){this._.output.push(f)},comment:function(f){this._.output.push("\x3c!--",
f,"--\x3e")},write:function(f){this._.output.push(f)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(f){var h=this._.output.join("");f&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var f=this.parent.children,h=CKEDITOR.tools.indexOf(f,this),e=this.previous,k=this.next;e&&(e.next=k);k&&(k.previous=e);f.splice(h,1);this.parent=null},replaceWith:function(f){var h=this.parent.children,
e=CKEDITOR.tools.indexOf(h,this),k=f.previous=this.previous,d=f.next=this.next;k&&(k.next=f);d&&(d.previous=f);h[e]=f;f.parent=this.parent;this.parent=null},insertAfter:function(f){var h=f.parent.children,e=CKEDITOR.tools.indexOf(h,f),k=f.next;h.splice(e+1,0,this);this.next=f.next;this.previous=f;f.next=this;k&&(k.previous=this);this.parent=f.parent},insertBefore:function(f){var h=f.parent.children,e=CKEDITOR.tools.indexOf(h,f);h.splice(e,0,this);this.next=f;(this.previous=f.previous)&&(f.previous.next=
this);f.previous=this;this.parent=f.parent},getAscendant:function(f){var h="function"==typeof f?f:"string"==typeof f?function(e){return e.name==f}:function(e){return e.name in f},e=this.parent;for(;e&&e.type==CKEDITOR.NODE_ELEMENT;){if(h(e))return e;e=e.parent}return null},wrapWith:function(f){this.replaceWith(f);f.add(this);return f},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(f){return f||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=
function(f){this.value=f;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(f,h){var e=this.value;if(!(e=f.onComment(h,e,this)))return this.remove(),!1;if("string"!=typeof e)return this.replaceWith(e),!1;this.value=e;return!0},writeHtml:function(f,h){h&&this.filter(h);f.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(f){this.value=f;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=
CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(f,h){if(!(this.value=f.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(f,h){h&&this.filter(h);f.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(f){this.value=f};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(f){f.write(this.value)}})}(),"use strict",
CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function f(d){return d.attributes["data-cke-survive"]?!1:"a"==d.name&&d.attributes.href||CKEDITOR.dtd.$removeEmpty[d.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),e={ol:1,ul:1},k=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:"li",
ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(l,m,b){function g(a){var b;if(0<q.length)for(var g=0;g<q.length;g++){var d=q[g],e=d.name,f=CKEDITOR.dtd[e],k=x.name&&CKEDITOR.dtd[x.name];k&&!k[e]||a&&f&&!f[a]&&CKEDITOR.dtd[a]?e==x.name&&(n(x,x.parent,1),g--):(b||(c(),b=1),d=d.clone(),d.parent=x,x=d,q.splice(g,1),g--)}}function c(){for(;u.length;)n(u.shift(),x)}function a(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var c=
a.children.length,b=a.children[c-1],g;b&&b.type==CKEDITOR.NODE_TEXT&&((g=CKEDITOR.tools.rtrim(b.value))?b.value=g:a.children.length=c-1)}}function n(c,g,d){g=g||x||r;var e=x;void 0===c.previous&&(w(g,c)&&(x=g,p.onTagOpen(b,{}),c.returnPoint=g=x),a(c),f(c)&&!c.children.length||g.add(c),"pre"==c.name&&(D=!1),"textarea"==c.name&&(A=!1));c.returnPoint?(x=c.returnPoint,delete c.returnPoint):x=d?g:e}function w(a,c){if((a==r||"body"==a.name)&&b&&(!a.name||CKEDITOR.dtd[a.name][b])){var g,d;return(g=c.attributes&&
(d=c.attributes["data-cke-real-element-type"])?d:c.name)&&g in CKEDITOR.dtd.$inline&&!(g in CKEDITOR.dtd.head)&&!c.isOrphan||c.type==CKEDITOR.NODE_TEXT}}function v(a,c){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==c||"dt"==a&&"dd"==c||"dd"==a&&"dt"==c:!1}var p=new CKEDITOR.htmlParser,r=m instanceof CKEDITOR.htmlParser.element?m:"string"==typeof m?new CKEDITOR.htmlParser.element(m):new CKEDITOR.htmlParser.fragment,q=[],u=[],x=r,A="textarea"==r.name,D="pre"==r.name;p.onTagOpen=
function(a,b,d,l){b=new CKEDITOR.htmlParser.element(a,b);b.isUnknown&&d&&(b.isEmpty=!0);b.isOptionalClose=l;if(f(b))q.push(b);else{if("pre"==a)D=!0;else{if("br"==a&&D){x.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==a&&(A=!0)}if("br"==a)u.push(b);else{for(;!(l=(d=x.name)?CKEDITOR.dtd[d]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):k,b.isUnknown||x.isUnknown||l[a]);)if(x.isOptionalClose)p.onTagClose(d);else if(a in e&&d in e)d=x.children,(d=d[d.length-1])&&"li"==d.name||n(d=new CKEDITOR.htmlParser.element("li"),
x),!b.returnPoint&&(b.returnPoint=x),x=d;else if(a in CKEDITOR.dtd.$listItem&&!v(a,d))p.onTagOpen("li"==a?"ul":"dl",{},0,1);else if(d in h&&!v(a,d))!b.returnPoint&&(b.returnPoint=x),x=x.parent;else if(d in CKEDITOR.dtd.$inline&&q.unshift(x),x.parent)n(x,x.parent,1);else{b.isOrphan=1;break}g(a);c();b.parent=x;b.isEmpty?n(b):x=b}}};p.onTagClose=function(a){for(var g=q.length-1;0<=g;g--)if(a==q[g].name){q.splice(g,1);return}for(var d=[],e=[],f=x;f!=r&&f.name!=a;)f._.isBlockLike||e.unshift(f),d.push(f),
f=f.returnPoint||f.parent;if(f!=r){for(g=0;g<d.length;g++){var k=d[g];n(k,k.parent)}x=f;f._.isBlockLike&&c();n(f,f.parent);f==x&&(x=x.parent);q=q.concat(e)}"body"==a&&(b=!1)};p.onText=function(a){if(!(x._.hasInlineStarted&&!u.length||D||A)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var e=x.name,f=e?CKEDITOR.dtd[e]||(x._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):k;if(!A&&!f["#"]&&e in h)p.onTagOpen(d[e]||""),p.onText(a);else{c();g();D||A||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=
new CKEDITOR.htmlParser.text(a);if(w(x,a))this.onTagOpen(b,{},0,1);x.add(a)}};p.onCDATA=function(a){x.add(new CKEDITOR.htmlParser.cdata(a))};p.onComment=function(a){c();g();x.add(new CKEDITOR.htmlParser.comment(a))};p.parse(l);for(c();x!=r;)n(x,x.parent,1);a(r);return r};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(d,e){isNaN(e)&&(e=this.children.length);var b=0<e?this.children[e-1]:null;if(b){if(d._.isBlockLike&&b.type==CKEDITOR.NODE_TEXT&&(b.value=CKEDITOR.tools.rtrim(b.value),
0===b.value.length)){this.children.pop();this.add(d);return}b.next=d}d.previous=b;d.parent=this;this.children.splice(e,0,d);this._.hasInlineStarted||(this._.hasInlineStarted=d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&!d._.isBlockLike)},filter:function(d,e){e=this.getFilterContext(e);d.onRoot(e,this);this.filterChildren(d,!1,e)},filterChildren:function(d,e,b){if(this.childrenFilteredBy!=d.id){b=this.getFilterContext(b);if(e&&!this.parent)d.onRoot(b,this);this.childrenFilteredBy=d.id;
for(e=0;e<this.children.length;e++)!1===this.children[e].filter(d,b)&&e--}},writeHtml:function(d,e){e&&this.filter(e);this.writeChildrenHtml(d)},writeChildrenHtml:function(d,e,b){var g=this.getFilterContext();if(b&&!this.parent&&e)e.onRoot(g,this);e&&this.filterChildren(e,!1,g);e=0;b=this.children;for(g=b.length;e<g;e++)b[e].writeHtml(d)},forEach:function(d,e,b){if(!(b||e&&this.type!=e))var g=d(this);if(!1!==g){b=this.children;for(var c=0;c<b.length;c++)g=b[c],g.type==CKEDITOR.NODE_ELEMENT?g.forEach(d,
e):e&&g.type!=e||d(g)}},getFilterContext:function(d){return d||{}}}}(),"use strict",function(){function f(){this.rules=[]}function h(e,k,d,h){var m,b;for(m in k)(b=e[m])||(b=e[m]=new f),b.add(k[m],d,h)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new f;this.attributeNameRules=new f;this.elementsRules={};this.attributesRules={};this.textRules=new f;this.commentRules=new f;this.rootRules=new f;e&&this.addRules(e,10)},
proto:{addRules:function(e,f){var d;"number"==typeof f?d=f:f&&"priority"in f&&(d=f.priority);"number"!=typeof d&&(d=10);"object"!=typeof f&&(f={});e.elementNames&&this.elementNameRules.addMany(e.elementNames,d,f);e.attributeNames&&this.attributeNameRules.addMany(e.attributeNames,d,f);e.elements&&h(this.elementsRules,e.elements,d,f);e.attributes&&h(this.attributesRules,e.attributes,d,f);e.text&&this.textRules.add(e.text,d,f);e.comment&&this.commentRules.add(e.comment,d,f);e.root&&this.rootRules.add(e.root,
d,f)},applyTo:function(e){e.filter(this)},onElementName:function(e,f){return this.elementNameRules.execOnName(e,f)},onAttributeName:function(e,f){return this.attributeNameRules.execOnName(e,f)},onText:function(e,f,d){return this.textRules.exec(e,f,d)},onComment:function(e,f,d){return this.commentRules.exec(e,f,d)},onRoot:function(e,f){return this.rootRules.exec(e,f)},onElement:function(e,f){for(var d=[this.elementsRules["^"],this.elementsRules[f.name],this.elementsRules.$],h,m=0;3>m;m++)if(h=d[m]){h=
h.exec(e,f,this);if(!1===h)return null;if(h&&h!=f)return this.onNode(e,h);if(f.parent&&!f.name)break}return f},onNode:function(e,f){var d=f.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(e,f):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,f.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,f.value)):null},onAttribute:function(e,f,d,h){return(d=this.attributesRules[d])?d.exec(e,h,f,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=f;f.prototype=
{add:function(e,f,d){this.rules.splice(this.findIndex(f),0,{value:e,priority:f,options:d})},addMany:function(e,f,d){for(var h=[this.findIndex(f),0],m=0,b=e.length;m<b;m++)h.push({value:e[m],priority:f,options:d});this.rules.splice.apply(this.rules,h)},findIndex:function(e){for(var f=this.rules,d=f.length-1;0<=d&&e<f[d].priority;)d--;return d+1},exec:function(e,f){var d=f instanceof CKEDITOR.htmlParser.node||f instanceof CKEDITOR.htmlParser.fragment,h=Array.prototype.slice.call(arguments,1),m=this.rules,
b=m.length,g,c,a,n;for(n=0;n<b;n++)if(d&&(g=f.type,c=f.name),a=m[n],!(e.nonEditable&&!a.options.applyToAll||e.nestedEditable&&a.options.excludeNestedEditable)){a=a.value.apply(null,h);if(!1===a||d&&a&&(a.name!=c||a.type!=g))return a;null!=a&&(h[0]=f=a)}return f},execOnName:function(e,f){for(var d=0,h=this.rules,m=h.length,b;f&&d<m;d++)b=h[d],e.nonEditable&&!b.options.applyToAll||e.nestedEditable&&b.options.excludeNestedEditable||(f=f.replace(b.value[0],b.value[1]));return f}}}(),function(){function f(a,
c){function b(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function g(a,c){return function(g){if(g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=[],h=e(g),m,C;if(h)for(f(h,1)&&d.push(h);h;)l(h)&&(m=k(h))&&f(m)&&((C=k(m))&&!l(C)?d.push(m):(b(n).insertAfter(m),m.remove())),h=h.previous;for(h=0;h<d.length;h++)d[h].remove();if(d=!a||!1!==("function"==typeof c?c(g):c))n||CKEDITOR.env.needsBrFiller||g.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?
n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||g.name in CKEDITOR.dtd.tr||g.name in CKEDITOR.dtd.$listItem)?(d=e(g),d=!d||"form"==g.name&&"input"==d.name):d=!1:d=!1;d&&g.add(b(a))}}}function f(a,c){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var b;return a.type==CKEDITOR.NODE_TEXT&&(b=a.value.match(q))&&(b.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,b.index))).insertBefore(a),a.value=b[0]),!CKEDITOR.env.needsBrFiller&&
n&&(!c||a.parent.name in C)||!n&&((b=a.previous)&&"br"==b.name||!b||l(b)))?!0:!1}var h={elements:{}},n="html"==c,C=CKEDITOR.tools.extend({},D),t;for(t in C)"#"in x[t]||delete C[t];for(t in C)h.elements[t]=g(n,a.config.fillEmptyBlocks);h.root=g(n,!1);h.elements.br=function(a){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=c.attributes;if("data-cke-bogus"in g||"data-cke-eol"in g)delete g["data-cke-bogus"];else{for(g=c.next;g&&d(g);)g=g.next;var e=k(c);!g&&l(c.parent)?m(c.parent,
b(a)):l(g)&&e&&!l(e)&&b(a).insertBefore(g)}}}}(n);return h}function h(a,c){return a!=CKEDITOR.ENTER_BR&&!1!==c?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function e(a){for(a=a.children[a.children.length-1];a&&d(a);)a=a.previous;return a}function k(a){for(a=a.previous;a&&d(a);)a=a.previous;return a}function d(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function l(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in
D||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function m(a,c){var b=a.children[a.children.length-1];a.children.push(c);c.parent=a;b&&(b.next=c,c.previous=b)}function b(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 c(a){return a.replace(I,function(a,c,b){return"\x3c"+c+b.replace(E,
function(a,c){return F.test(c)&&-1==b.indexOf("data-cke-saved-"+c)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function a(a,c){return a.replace(c,function(a,c,b){0===a.indexOf("\x3ctextarea")&&(a=c+v(b).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(L,function(a,c){return decodeURIComponent(c)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
function(a){return"\x3c!--"+u+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function p(a,c){var b=c._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return b&&b[c]||""})}function r(a,c){var b=[],g=c.config.protectedSource,d=c._.dataStore||(c._.dataStore=
{id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,g=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(g);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(b.push(a)-1)+"--\x3e"});for(var f=0;f<g.length;f++)a=a.replace(g[f],function(a){a=a.replace(e,function(a,c,g){return b[g]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(b.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,c,g){return"\x3c!--"+u+(c?"{C}":
"")+encodeURIComponent(b[g]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,c){d[d.id]=decodeURIComponent(c);return"{cke_protected_"+d.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,b,g,d){return"\x3c"+b+g+"\x3e"+p(v(d),c)+"\x3c/"+b+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var g,
d,e=this;this.editor=b;this.dataFilter=g=new CKEDITOR.htmlParser.filter;this.htmlFilter=d=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;g.addRules(t);g.addRules(B,{applyToAll:!0});g.addRules(f(b,"data"),{applyToAll:!0});d.addRules(y);d.addRules(z,{applyToAll:!0});d.addRules(f(b,"html"),{applyToAll:!0});b.on("toHtml",function(g){g=g.data;var d=g.dataValue,e,d=r(d,b),d=a(d,G),d=c(d),d=a(d,H),d=d.replace(O,"$1cke:$2"),d=d.replace(S,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),
d=d.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),d=d.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=g.context||b.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",d="\x3cpre\x3e"+d+"\x3c/pre\x3e",f=1);e=b.document.createElement(e);e.setHtml("a"+d);d=e.getHtml().substr(1);d=d.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(d=d.replace(/^<pre>|<\/pre>$/gi,""));d=d.replace(C,"$1$2");d=n(d);d=v(d);e=!1===g.fixForBody?!1:
h(g.enterMode,b.config.autoParagraph);d=CKEDITOR.htmlParser.fragment.fromHtml(d,g.context,e);e&&(f=d,!f.children.length&&CKEDITOR.dtd[f.name][e]&&(e=new CKEDITOR.htmlParser.element(e),f.add(e)));g.dataValue=d},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var c=a.dataValue,
b=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(b);c=b.getHtml(!0);a.dataValue=w(c)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,h(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.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 c=a.data.dataValue,g=e.writer;g.reset();c.writeChildrenHtml(g);c=g.getHtml(!0);c=v(c);c=p(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,b,g){var d=this.editor,e,f,k,h;c&&"object"==typeof c?(e=c.context,b=c.fixForBody,g=c.dontFilter,f=c.filter,k=c.enterMode,h=c.protectedWhitespaces):e=c;e||null===e||(e=d.editable().getName());return d.fire("toHtml",{dataValue:a,context:e,fixForBody:b,dontFilter:g,
filter:f||d.filter,enterMode:k||d.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,c){var b,g,d;c&&(b=c.context,g=c.filter,d=c.enterMode);b||null===b||(b=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:g||this.editor.filter,context:b,enterMode:d||this.editor.enterMode}).dataValue}};var q=/(?:&nbsp;|\xa0)$/,u="{cke_protected}",x=CKEDITOR.dtd,A="caption colgroup col thead tfoot tbody".split(" "),D=CKEDITOR.tools.extend({},x.$blockLimit,
x.$block),t={elements:{input:b,textarea:b}},B={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var c=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===c.indexOf("javascript")||0===c.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},y={elements:{embed:function(a){var c=a.parent;if(c&&"object"==c.name){var b=c.attributes.width,c=c.attributes.height;
b&&(a.attributes.width=b);c&&(a.attributes.height=c)}},a:function(a){var c=a.attributes;if(!(a.children.length||c.name||c.id||a.attributes["data-cke-saved-name"]))return!1}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c=a.attributes;if(c){if(c["data-cke-temp"])return!1;for(var b=["name","href","src"],g,d=0;d<b.length;d++)g="data-cke-saved-"+b[d],g in c&&delete c[b[d]]}return a},
table:function(a){a.children.slice(0).sort(function(a,c){var b,g;a.type==CKEDITOR.NODE_ELEMENT&&c.type==a.type&&(b=CKEDITOR.tools.indexOf(A,a.name),g=CKEDITOR.tools.indexOf(A,c.name));-1<b&&-1<g&&b!=g||(b=a.parent?a.getIndex():-1,g=c.parent?c.getIndex():-1);return b>g?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;
delete a.attributes.contenteditable},style:function(a){var c=a.children[0];c&&c.value&&(c.value=CKEDITOR.tools.trim(c.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var c=a.children[0];!c&&m(a,c=new CKEDITOR.htmlParser.text);c.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&&(z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,
function(a){return a.toLowerCase()})});var I=/<(a|area|img|input|source)\b([^>]*)>/gi,E=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,F=/^(href|src|name)$/i,H=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,L=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,C=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,S=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),
"use strict",CKEDITOR.htmlParser.element=function(f,h){this.name=f;this.attributes=h||{};this.children=[];var e=f||"",k=e.match(/^cke:(.*)/);k&&(e=k[1]);e=!!(CKEDITOR.dtd.$nonBodyContent[e]||CKEDITOR.dtd.$block[e]||CKEDITOR.dtd.$listItem[e]||CKEDITOR.dtd.$tableContent[e]||CKEDITOR.dtd.$nonEditable[e]||"br"==e);this.isEmpty=!!CKEDITOR.dtd.$empty[f];this.isUnknown=!CKEDITOR.dtd[f];this._={isBlockLike:e,hasInlineStarted:this.isEmpty||!e}},CKEDITOR.htmlParser.cssStyle=function(f){var h={};((f instanceof
CKEDITOR.htmlParser.element?f.attributes.style:f)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,f,d){"font-family"==f&&(d=d.replace(/["']/g,""));h[f.toLowerCase()]=d});return{rules:h,populate:function(e){var f=this.toString();f&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",f):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=f:e.style=f)},toString:function(){var e=[],f;for(f in h)h[f]&&e.push(f,":",h[f],";");return e.join("")}}},function(){function f(e){return function(d){return d.type==
CKEDITOR.NODE_ELEMENT&&("string"==typeof e?d.name==e:d.name in e)}}var h=function(e,d){e=e[0];d=d[0];return e<d?-1:e>d?1:0},e=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:e.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,d){var f=this,h,b;d=f.getFilterContext(d);if(d.off)return!0;if(!f.parent)e.onRoot(d,f);for(;;){h=f.name;if(!(b=
e.onElementName(d,h)))return this.remove(),!1;f.name=b;if(!(f=e.onElement(d,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==h)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f),!1;if(!f.name)return this.replaceWithChildren(),!1}h=f.attributes;var g,c;for(g in h){for(b=h[g];;)if(c=e.onAttributeName(d,g))if(c!=g)delete h[g],g=c;else break;else{delete h[g];break}c&&(!1===(b=e.onAttribute(d,f,c,b))?delete h[c]:h[c]=b)}f.isEmpty||this.filterChildren(e,!1,
d);return!0},filterChildren:e.filterChildren,writeHtml:function(e,d){d&&this.filter(d);var f=this.name,m=[],b=this.attributes,g,c;e.openTag(f,b);for(g in b)m.push([g,b[g]]);e.sortAttributes&&m.sort(h);g=0;for(c=m.length;g<c;g++)b=m[g],e.attribute(b[0],b[1]);e.openTagClose(f,this.isEmpty);this.writeChildrenHtml(e);this.isEmpty||e.closeTag(f)},writeChildrenHtml:e.writeChildrenHtml,replaceWithChildren:function(){for(var e=this.children,d=e.length;d;)e[--d].insertAfter(this);this.remove()},forEach:e.forEach,
getFirst:function(e){if(!e)return this.children.length?this.children[0]:null;"function"!=typeof e&&(e=f(e));for(var d=0,h=this.children.length;d<h;++d)if(e(this.children[d]))return this.children[d];return null},getHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(e);return e.getHtml()},setHtml:function(e){e=this.children=CKEDITOR.htmlParser.fragment.fromHtml(e).children;for(var d=0,f=e.length;d<f;++d)e[d].parent=this},getOuterHtml:function(){var e=new CKEDITOR.htmlParser.basicWriter;
this.writeHtml(e);return e.getHtml()},split:function(e){for(var d=this.children.splice(e,this.children.length-e),f=this.clone(),h=0;h<d.length;++h)d[h].parent=f;f.children=d;d[0]&&(d[0].previous=null);0<e&&(this.children[e-1].next=null);this.parent.add(f,this.getIndex()+1);return f},find:function(e,d){void 0===d&&(d=!1);var f=[],h;for(h=0;h<this.children.length;h++){var b=this.children[h];"function"==typeof e&&e(b)?f.push(b):"string"==typeof e&&b.name===e&&f.push(b);d&&b.find&&(f=f.concat(b.find(e,
d)))}return f},addClass:function(e){if(!this.hasClass(e)){var d=this.attributes["class"]||"";this.attributes["class"]=d+(d?" ":"")+e}},removeClass:function(e){var d=this.attributes["class"];d&&((d=CKEDITOR.tools.trim(d.replace(new RegExp("(?:\\s+|^)"+e+"(?:\\s+|$)")," ")))?this.attributes["class"]=d:delete this.attributes["class"])},hasClass:function(e){var d=this.attributes["class"];return d?(new RegExp("(?:^|\\s)"+e+"(?\x3d\\s|$)")).test(d):!1},getFilterContext:function(e){var d=[];e||(e={off:!1,
nonEditable:!1,nestedEditable:!1});e.off||"off"!=this.attributes["data-cke-processor"]||d.push("off",!0);e.nonEditable||"false"!=this.attributes.contenteditable?e.nonEditable&&!e.nestedEditable&&"true"==this.attributes.contenteditable&&d.push("nestedEditable",!0):d.push("nonEditable",!0);if(d.length){e=CKEDITOR.tools.copy(e);for(var f=0;f<d.length;f+=2)e[d[f]]=d[f+1]}return e}},!0)}(),function(){var f=/{([^}]+)}/g;CKEDITOR.template=function(f){this.source=String(f)};CKEDITOR.template.prototype.output=
function(h,e){var k=this.source.replace(f,function(d,e){return void 0!==h[e]?h[e]:d});return e?e.push(k):k}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(f){CKEDITOR.instances[f.name]=f;f.on("focus",function(){CKEDITOR.currentInstance!=f&&(CKEDITOR.currentInstance=f,CKEDITOR.fire("currentInstance"))});f.on("blur",function(){CKEDITOR.currentInstance==f&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});
CKEDITOR.fire("instance",null,f)},CKEDITOR.remove=function(f){delete CKEDITOR.instances[f.name]},function(){var f={};CKEDITOR.addTemplate=function(h,e){var k=f[h];if(k)return k;k={name:h,source:e};CKEDITOR.fire("template",k);return f[h]=new CKEDITOR.template(k.source)};CKEDITOR.getTemplate=function(h){return f[h]}}(),function(){var f=[];CKEDITOR.addCss=function(h){f.push(h)};CKEDITOR.getCss=function(){return f.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(f,h){if(!CKEDITOR.env.isCompatible)return null;f=CKEDITOR.dom.element.get(f);if(f.getEditor())throw'The editor instance "'+f.getEditor().name+'" is already attached to the provided element.';var e=new CKEDITOR.editor(h,f,CKEDITOR.ELEMENT_MODE_INLINE),k=f.is("textarea")?f:null;k?(e.setData(k.getValue(),null,!0),f=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+
!!e.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+k.getValue()+"\x3c/div\x3e",CKEDITOR.document),f.insertAfter(k),k.hide(),k.$.form&&e._attachToForm()):e.setData(f.getHtml(),null,!0);e.on("loaded",function(){e.fire("uiReady");e.editable(f);e.container=f;e.ui.contentsElement=f;e.setData(e.getData(1));e.resetDirty();e.fire("contentDom");e.mode="wysiwyg";e.fire("mode");e.status="ready";e.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,e)},null,null,1E4);e.on("destroy",function(){k&&(e.container.clearCustomData(),
e.container.remove(),k.show());e.element.clearCustomData();delete e.element});return e};CKEDITOR.inlineAll=function(){var f,h,e;for(e in CKEDITOR.dtd.$editable)for(var k=CKEDITOR.document.getElementsByTag(e),d=0,l=k.count();d<l;d++)f=k.getItem(d),"true"==f.getAttribute("contenteditable")&&(h={element:f,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(f,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function f(f,
d,l,m){if(!CKEDITOR.env.isCompatible)return null;f=CKEDITOR.dom.element.get(f);if(f.getEditor())throw'The editor instance "'+f.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,f,m);m==CKEDITOR.ELEMENT_MODE_REPLACE&&(f.setStyle("visibility","hidden"),b._.required=f.hasAttribute("required"),f.removeAttribute("required"));l&&b.setData(l,null,!0);b.on("loaded",function(){e(b);m==CKEDITOR.ELEMENT_MODE_REPLACE&&b.config.autoUpdateElement&&f.$.form&&b._attachToForm();
b.setMode(b.config.startupMode,function(){b.resetDirty();b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)})});b.on("destroy",h);return b}function h(){var e=this.container,d=this.element;e&&(e.clearCustomData(),e.remove());d&&(d.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(d.show(),this._.required&&d.setAttribute("required","required")),delete this.element)}function e(e){var d=e.name,f=e.element,h=e.elementMode,b=e.fire("uiSpace",{space:"top",
html:""}).html,g=e.fire("uiSpace",{space:"bottom",html:""}).html,c=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(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':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
d=CKEDITOR.dom.element.createFromHtml(c.output({id:e.id,name:d,langDir:e.lang.dir,langCode:e.langCode,voiceLabel:e.title,topHtml:b?'\x3cspan id\x3d"'+e.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+b+"\x3c/span\x3e":"",contentId:e.ui.spaceId("contents"),bottomHtml:g?'\x3cspan id\x3d"'+e.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+g+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));h==CKEDITOR.ELEMENT_MODE_REPLACE?
(f.hide(),d.insertAfter(f)):f.append(d);e.container=d;e.ui.contentsElement=e.ui.space("contents");b&&e.ui.space("top").unselectable();g&&e.ui.space("bottom").unselectable();f=e.config.width;h=e.config.height;f&&d.setStyle("width",CKEDITOR.tools.cssLength(f));h&&e.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(h));d.disableContextMenu();CKEDITOR.env.webkit&&d.on("focus",function(){e.focus()});e.fireOnce("uiReady")}CKEDITOR.replace=function(e,d){return f(e,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
CKEDITOR.appendTo=function(e,d,h){return f(e,d,h,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var e=document.getElementsByTagName("textarea"),d=0;d<e.length;d++){var f=null,h=e[d];if(h.name||h.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(h.className))continue}else if("function"==typeof arguments[0]&&(f={},!1===arguments[0](h,f)))continue;this.replace(h,f)}}};CKEDITOR.editor.prototype.addMode=function(e,d){(this._.modes||(this._.modes=
{}))[e]=d};CKEDITOR.editor.prototype.setMode=function(e,d){var f=this,h=this._.modes;if(e!=f.mode&&h&&h[e]){f.fire("beforeSetMode",e);if(f.mode){var b=f.checkDirty(),h=f._.previousModeData,g,c=0;f.fire("beforeModeUnload");f.editable(0);f._.previousMode=f.mode;f._.previousModeData=g=f.getData(1);"source"==f.mode&&h==g&&(f.fire("lockSnapshot",{forceUpdate:!0}),c=1);f.ui.space("contents").setHtml("");f.mode=""}else f._.previousModeData=f.getData(1);this._.modes[e](function(){f.mode=e;void 0!==b&&!b&&
f.resetDirty();c?f.fire("unlockSnapshot"):"wysiwyg"==e&&f.fire("saveSnapshot");setTimeout(function(){f.fire("mode");d&&d.call(f)},0)})}};CKEDITOR.editor.prototype.resize=function(e,d,f,h){var b=this.container,g=this.ui.space("contents"),c=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;h=h?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):b;h.setSize("width",e,!0);c&&(c.style.width="1%");var a=(h.$.offsetHeight||0)-(g.$.clientHeight||
0),b=Math.max(d-(f?0:a),0);d=f?d+a:d;g.setStyle("height",b+"px");c&&(c.style.width="100%");this.fire("resize",{outerHeight:d,contentsHeight:b,outerWidth:e||h.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(e){return e?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function f(a){var c=a.editor,b=a.data.path,g=b.blockLimit,d=a.data.selection,
e=d.getRanges()[0],f;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(d=h(d,b))d.appendBogus(),f=CKEDITOR.env.ie;m(c,b.block,g)&&e.collapsed&&!e.getCommonAncestor().isReadOnly()&&(b=e.clone(),b.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),g=new CKEDITOR.dom.walker(b),g.guard=function(a){return!k(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!g.checkForward()||b.checkStartOfBlock()&&b.checkEndOfBlock())&&(c=e.fixBlock(!0,c.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
(c=c.getFirst(k))&&c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?:&nbsp;|\xa0)$/)&&c.remove(),f=1,a.cancel());f&&e.select()}function h(a,c){if(a.isFake)return 0;var b=c.block||c.blockLimit,g=b&&b.getLast(k);if(!(!b||!b.isBlockBoundary()||g&&g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()||b.is("pre")||b.getBogus()))return b}function e(a){var c=a.data.getTarget();c.is("input")&&(c=c.getAttribute("type"),"submit"!=c&&"reset"!=c||a.data.preventDefault())}function k(c){return a(c)&&
n(c)}function d(a,c){return function(b){var g=b.data.$.toElement||b.data.$.fromElement||b.data.$.relatedTarget;(g=g&&g.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(g):null)&&(c.equals(g)||c.contains(g))||a.call(this,b)}}function l(a){function c(a){return function(c,g){g&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(d)&&(b=c);if(!(g||!k(c)||a&&v(c)))return!1}}var b,g=a.getRanges()[0];a=a.root;var d={table:1,ul:1,ol:1,dl:1};if(g.startPath().contains(d)){var e=g.clone();e.collapse(1);e.setStartAt(a,
CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(e);a.guard=c();a.checkBackward();if(b)return e=g.clone(),e.collapse(),e.setEndAt(b,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(e),a.guard=c(!0),b=!1,a.checkForward(),b}return null}function m(a,c,b){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(b)&&!c||c&&"true"==c.getAttribute("contenteditable"))}function b(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?
a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){var c=a.editor;c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}function c(a,c,b){var g=a.getCommonAncestor(c);for(c=a=b?c:a;(a=a.getParent())&&!g.equals(a)&&1==a.getChildCount();)c=a;c.remove()}var a,n,w,v,p,r,q,u,x,A;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,c){this.base(c.$||c);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;
if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var c=this.$.scrollTop;this.$.focus();this.$.scrollTop=c}else this.$.focus();
else this.$.setActive()}catch(b){if(!CKEDITOR.env.ie)throw b;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,c){var b=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",c=d(c,this),b[0]=a,b[1]=c);return CKEDITOR.dom.element.prototype.on.apply(this,b)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var c=Array.prototype.slice.call(arguments,
1),c=a.on.apply(a,c);this._.listeners.push(c);return c},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(c){}},restoreAttrs:function(){var a=this._.attrChanges,c,b;for(b in a)a.hasOwnProperty(b)&&(c=a[b],null!==c?this.setAttribute(b,c):this.removeAttribute(b))},attachClass:function(a){var c=this.getCustomData("classes");this.hasClass(a)||(!c&&(c=[]),c.push(a),this.setCustomData("classes",c),this.addClass(a))},changeAttr:function(a,c){var b=this.getAttribute(a);
c!==b&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=b),this.setAttribute(a,c))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var c=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,c)},insertHtml:function(a,c,b){var d=this.editor;d.focus();d.fire("saveSnapshot");
b||(b=d.getSelection().getRanges()[0]);r(this,c||"html",a,b);b.select();g(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,c,b){r(this,b||"html",a,c);this.editor.fire("afterInsertHtml",{intoRange:c})},insertElement:function(a,c){var b=this.editor;b.focus();b.fire("saveSnapshot");var d=b.activeEnterMode,b=b.getSelection(),e=a.getName(),e=CKEDITOR.dtd.$block[e];c||(c=b.getRanges()[0]);this.insertElementIntoRange(a,c)&&(c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),e&&((e=
a.getNext(function(a){return k(a)&&!v(a)}))&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(CKEDITOR.dtd.$block)?e.getDtd()["#"]?c.moveToElementEditStart(e):c.moveToElementEditEnd(a):e||d==CKEDITOR.ENTER_BR||(e=c.fixBlock(!0,d==CKEDITOR.ENTER_DIV?"div":"p"),c.moveToElementEditStart(e))));b.selectRanges([c]);g(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,c){var b=this.editor,g=b.config.enterMode,d=a.getName(),e=CKEDITOR.dtd.$block[d];if(c.checkReadOnly())return!1;
c.deleteContents(1);c.startContainer.type==CKEDITOR.NODE_ELEMENT&&(c.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?q(c):c.startContainer.is(CKEDITOR.dtd.$list)&&u(c));var f,h;if(e)for(;(f=c.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[f.getName()])&&(!h||!h[d]);)f.getName()in CKEDITOR.dtd.span?c.splitElement(f):c.checkStartOfBlock()&&c.checkEndOfBlock()?(c.setStartBefore(f),c.collapse(!0),f.remove()):c.splitBlock(g==CKEDITOR.ENTER_DIV?"div":"p",b.editable());c.insertNode(a);return!0},setData:function(a,
c){c||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var c=this.getHtml();a||(c=this.editor.dataProcessor.toDataFormat(c));return c},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.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 c=b.getDocument().$,g=c.getSelection(),d;a:if(g.anchorNode&&g.anchorNode==b.$)d=!0;else{if(CKEDITOR.env.webkit&&(d=b.getDocument().getActive())&&d.equals(b)&&!g.anchorNode){d=!0;break a}d=void 0}d&&(d=new CKEDITOR.dom.range(b),d.moveToElementEditStart(b),c=c.createRange(),c.setStart(d.startContainer.$,d.startOffset),c.collapse(!0),g.removeAllRanges(),g.addRange(c))}function c(){var a=b.getDocument().$,g=a.selection,d=b.getDocument().getActive();"None"==
g.type&&d.equals(b)&&(g=new CKEDITOR.dom.range(b),a=a.body.createTextRange(),g.moveToElementEditStart(b),g=g.startContainer,g.type!=CKEDITOR.NODE_ELEMENT&&(g=g.getParent()),a.moveToElementText(g.$),a.collapse(!0),a.select())}var b=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),c());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);
a={doc:this.getDocument(),range:a.clone()};x.eol.detect(a,this);x.bogus.exclude(a);x.cell.shrink(a);a.fragment=a.range.cloneContents();x.tree.rebuild(a,this);x.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var b=A,g={range:a,doc:a.document},d=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),d;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.table.detectPurge(g);g.bookmark=a.createBookmark();delete g.range;var e=this.editor.createRange();
e.moveToPosition(g.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);g.targetBookmark=e.createBookmark();b.list.detectMerge(g,this);b.table.detectRanges(g,this);b.block.detectMerge(g,this);g.tableContentsRanges?(b.table.deleteRanges(g),a.moveToBookmark(g.bookmark),g.range=a):(a.moveToBookmark(g.bookmark),g.range=a,a.extractContents(b.detectExtractMerge(g)));a.moveToBookmark(g.targetBookmark);a.optimize();b.fixUneditableRangePosition(a);b.list.merge(g,this);b.table.purge(g,this);b.block.merge(g,this);
if(c){b=a.startPath();if(g=a.checkStartOfBlock()&&a.checkEndOfBlock()&&b.block&&!a.root.equals(b.block)){a:{var g=b.block.getElementsByTag("span"),e=0,f;if(g)for(;f=g.getItem(e++);)if(!n(f)){g=!0;break a}g=!1}g=!g}g&&(a.moveToPosition(b.block,CKEDITOR.POSITION_BEFORE_START),b.block.remove())}else b.autoParagraph(this.editor,a),w(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return d},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(p,function(a,c){return c}));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 g=function(){var a=b.editable();
null!=b._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=b._.previousScrollTop,b._.previousScrollTop=null,this.removeListener("scroll",g))};this.on("scroll",g)}b.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,b.once("contentDom",function(){b.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",b.tabIndex);if(!this.is("textarea")){b.document=this.getDocument();b.window=this.getWindow();var d=b.document;this.changeAttr("spellcheck",
!b.config.disableNativeSpellChecker);var f=b.config.contentsLangDirection;this.getDirection(1)!=f&&this.changeAttr("dir",f);var h=CKEDITOR.getCss();if(h){var f=d.getHead(),n=f.getCustomData("stylesheet");n?h!=n.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?n.$.styleSheet.cssText=h:n.setText(h)):(h=d.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),f.setCustomData("stylesheet",h),h.data("cke-temp",1))}f=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",
f+1);this.setCustomData("cke_includeReadonly",!b.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var c=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");c&&2!=a.$.button&&c.isReadOnly()&&a.preventDefault()});var m={8:1,46:1};this.attachListener(b,"key",function(c){if(b.readOnly)return!0;var g=c.data.domEvent.getKey(),d;c=b.getSelection();if(0!==c.getRanges().length){if(g in m){var e,f=c.getRanges()[0],h=f.startPath(),k,n,q,g=8==g;CKEDITOR.env.ie&&
11>CKEDITOR.env.version&&(e=c.getSelectedElement())||(e=l(c))?(b.fire("saveSnapshot"),f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),f.select(),b.fire("saveSnapshot"),d=1):f.collapsed&&((k=h.block)&&(q=k[g?"getPrevious":"getNext"](a))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&f[g?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),f[g?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),f["moveToElementEdit"+(g?"End":"Start")](q),f.select(),b.fire("saveSnapshot"),
d=1):h.blockLimit&&h.blockLimit.is("td")&&(n=h.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(n,g?CKEDITOR.START:CKEDITOR.END)&&(q=n[g?"getPrevious":"getNext"](a))?(b.fire("saveSnapshot"),f["moveToElementEdit"+(g?"End":"Start")](q),f.checkStartOfBlock()&&f.checkEndOfBlock()?q.remove():f.select(),b.fire("saveSnapshot"),d=1):(n=h.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(n,g?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});b.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
this.attachListener(this,"keyup",function(a){a.data.getKeystroke()in m&&!this.getFirst(k)&&(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",e);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var c=a.data.getTarget();c.is("img","hr",
"input","textarea","select")&&!c.isReadOnly()&&(b.getSelection().selectElement(c),c.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&b.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getOuterHtml().replace(p,""))){var c=b.createRange();c.moveToElementEditStart(a);c.select(!0)}});
CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var g=a.data.domEvent.getKey();if(g in m&&(a=b.getSelection(),0!==a.getRanges().length)){var g=8==g,d=a.getRanges()[0];a=d.startPath();if(d.collapsed)a:{var e=a.block;
if(e&&d[g?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(e,!g)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(g?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){b.fire("saveSnapshot");f.remove();a=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))a=void 0;else{b.fire("saveSnapshot");var h;(h=(g?d:e).getBogus())&&h.remove();h=b.getSelection();f=h.createBookmarks();(g?e:d).moveChildren(g?d:e,!1);
a.lastElement.mergeSiblings();c(e,d,!g);h.selectBookmarks(f);a=!0}}else a=!1}else g=d,h=a.block,d=g.endPath().block,h&&d&&!h.equals(d)?(b.fire("saveSnapshot"),(e=h.getBogus())&&e.remove(),g.enlarge(CKEDITOR.ENLARGE_INLINE),g.deleteContents(),d.getParent()&&(d.moveChildren(h,!1),a.lastElement.mergeSiblings(),c(h,d,!0)),g=b.getSelection().getRanges()[0],g.collapse(1),g.optimize(),""===g.startContainer.getHtml()&&g.startContainer.appendBogus(),g.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 c=a.getHead();if(c.getCustomData("stylesheet")){var b=a.getCustomData("stylesheet_ref");--b?a.setCustomData("stylesheet_ref",b):(a.removeCustomData("stylesheet_ref"),c.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");
delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var c=this._.editable;if(c&&a)return 0;arguments.length&&(c=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),null));return c};CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?
"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(a){if(!c.readOnly){var b=c.getSelection();b&&!b.isLocked&&(b=c.checkDirty(),c.fire("lockSnapshot"),f(a),c.fire("unlockSnapshot"),!b&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var c=a.editor;c.on("mode",function(){var a=c.editable();if(a&&a.isInline()){var b=c.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",b);b&&a.changeAttr("title",b);var g=
c.fire("ariaEditorHelpLabel",{}).label;if(g&&(b=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var d=CKEDITOR.tools.getNextId(),g=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+d+'" class\x3d"cke_voice_label"\x3e'+g+"\x3c/span\x3e");b.append(g);a.changeAttr("aria-describedby",d)}}})});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);w=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();p=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;r=function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT}function c(b,g){var d,e,f,h,k=[],m=g.range.startContainer;d=g.range.startPath();for(var m=n[m.getName()],l=0,q=b.getChildren(),r=q.count(),w=-1,p=-1,u=0,E=d.contains(n.$list);l<r;++l)d=q.getItem(l),a(d)?(f=d.getName(),E&&f in CKEDITOR.dtd.$list?
k=k.concat(c(d,g)):(h=!!m[f],"br"!=f||!d.data("cke-eol")||l&&l!=r-1||(u=(e=l?k[l-1].node:q.getItem(l+1))&&(!a(e)||!e.is("br")),e=e&&a(e)&&n.$block[e.getName()]),-1!=w||h||(w=l),h||(p=l),k.push({isElement:1,isLineBreak:u,isBlock:d.isBlockBoundary(),hasBlockSibling:e,node:d,name:f,allowed:h}),e=u=0)):k.push({isElement:0,node:d,allowed:1});-1<w&&(k[w].firstNotAllowed=1);-1<p&&(k[p].lastNotAllowed=1);return k}function g(c,b){var d=[],e=c.getChildren(),f=e.count(),h,k=0,m=n[b],l=!c.is(n.$inline)||c.is("br");
for(l&&d.push(" ");k<f;k++)h=e.getItem(k),a(h)&&!h.is(m)?d=d.concat(g(h,b)):d.push(h);l&&d.push(" ");return d}function d(c){return a(c.startContainer)&&c.startContainer.getChild(c.startOffset-1)}function e(c){return c&&a(c)&&(c.is(n.$removeEmpty)||c.is("a")&&!c.isBlockBoundary())}function f(c,b,g,d){var e=c.clone(),h,k;e.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(e)).next())&&a(h)&&l[h.getName()]&&(k=h.getPrevious())&&a(k)&&!k.getParent().equals(c.startContainer)&&g.contains(k)&&
d.contains(h)&&h.isIdentical(k)&&(h.moveChildren(k),h.remove(),f(c,b,g,d))}function h(c,b){function g(c,b){if(b.isBlock&&b.isElement&&!b.node.is("br")&&a(c)&&c.is("br"))return c.remove(),1}var d=b.endContainer.getChild(b.endOffset),e=b.endContainer.getChild(b.endOffset-1);d&&g(d,c[c.length-1]);e&&g(e,c[0])&&(b.setEnd(b.endContainer,b.endOffset-1),b.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},q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,
h6:1},r=CKEDITOR.tools.extend({},n.$inline);delete r.br;return function(l,C,w,p){var u=l.editor,x=!1;"unfiltered_html"==C&&(C="html",x=!0);if(!p.checkReadOnly()){var v=(new CKEDITOR.dom.elementPath(p.startContainer,p.root)).blockLimit||p.root;l={type:C,dontFilter:x,editable:l,editor:u,range:p,blockLimit:v,mergeCandidates:[],zombies:[]};C=l.range;p=l.mergeCandidates;var H,A;"text"==l.type&&C.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(H=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",
C.document),C.insertNode(H),C.setStartAfter(H));x=new CKEDITOR.dom.elementPath(C.startContainer);l.endPath=v=new CKEDITOR.dom.elementPath(C.endContainer);if(!C.collapsed){var u=v.block||v.blockLimit,aa=C.getCommonAncestor();u&&!u.equals(aa)&&!u.contains(aa)&&C.checkEndOfBlock()&&l.zombies.push(u);C.deleteContents()}for(;(A=d(C))&&a(A)&&A.isBlockBoundary()&&x.contains(A);)C.moveToPosition(A,CKEDITOR.POSITION_BEFORE_END);f(C,l.blockLimit,x,v);H&&(C.setEndBefore(H),C.collapse(),H.remove());H=C.startPath();
if(u=H.contains(e,!1,1))C.splitElement(u),l.inlineStylesRoot=u,l.inlineStylesPeak=H.lastElement;H=C.createBookmark();(u=H.startNode.getPrevious(k))&&a(u)&&e(u)&&p.push(u);(u=H.startNode.getNext(k))&&a(u)&&e(u)&&p.push(u);for(u=H.startNode;(u=u.getParent())&&e(u);)p.push(u);C.moveToBookmark(H);if(H=w){H=l.range;if("text"==l.type&&l.inlineStylesRoot){A=l.inlineStylesPeak;C=A.getDocument().createText("{cke-peak}");for(p=l.inlineStylesRoot.getParent();!A.equals(p);)C=C.appendTo(A.clone()),A=A.getParent();
w=C.getOuterHtml().split("{cke-peak}").join(w)}A=l.blockLimit.getName();if(/^\s+|\s+$/.test(w)&&"span"in CKEDITOR.dtd[A]){var M='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';w=M+w+M}w=l.editor.dataProcessor.toHtml(w,{context:null,fixForBody:!1,protectedWhitespaces:!!M,dontFilter:l.dontFilter,filter:l.editor.activeFilter,enterMode:l.editor.activeEnterMode});A=H.document.createElement("body");A.setHtml(w);M&&(A.getFirst().remove(),A.getLast().remove());if((M=H.startPath().block)&&(1!=
M.getChildCount()||!M.getBogus()))a:{var Q;if(1==A.getChildCount()&&a(Q=A.getFirst())&&Q.is(q)&&!Q.hasAttribute("contenteditable")){M=Q.getElementsByTag("*");H=0;for(p=M.count();H<p;H++)if(C=M.getItem(H),!C.is(r))break a;Q.moveChildren(Q.getParent(1));Q.remove()}}l.dataWrapper=A;H=w}if(H){Q=l.range;H=Q.document;var N;A=l.blockLimit;p=0;var V,M=[],T,P;w=u=0;var X,ca;C=Q.startContainer;var x=l.endPath.elements[0],W,v=x.getPosition(C),aa=!!x.getCommonAncestor(C)&&v!=CKEDITOR.POSITION_IDENTICAL&&!(v&
CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);C=c(l.dataWrapper,l);for(h(C,Q);p<C.length;p++){v=C[p];if(N=v.isLineBreak){N=Q;X=A;var ba=void 0,da=void 0;v.hasBlockSibling?N=1:(ba=N.startContainer.getAscendant(n.$block,1))&&ba.is({div:1,p:1})?(da=ba.getPosition(X),da==CKEDITOR.POSITION_IDENTICAL||da==CKEDITOR.POSITION_CONTAINS?N=0:(X=N.splitElement(ba),N.moveToPosition(X,CKEDITOR.POSITION_AFTER_START),N=1)):N=0}if(N)w=0<p;else{N=Q.startPath();!v.isBlock&&m(l.editor,N.block,N.blockLimit)&&
(P=b(l.editor))&&(P=H.createElement(P),P.appendBogus(),Q.insertNode(P),CKEDITOR.env.needsBrFiller&&(V=P.getBogus())&&V.remove(),Q.moveToPosition(P,CKEDITOR.POSITION_BEFORE_END));if((N=Q.startPath().block)&&!N.equals(T)){if(V=N.getBogus())V.remove(),M.push(N);T=N}v.firstNotAllowed&&(u=1);if(u&&v.isElement){N=Q.startContainer;for(X=null;N&&!n[N.getName()][v.name];){if(N.equals(A)){N=null;break}X=N;N=N.getParent()}if(N)X&&(ca=Q.splitElement(X),l.zombies.push(ca),l.zombies.push(X));else{X=A.getName();
W=!p;N=p==C.length-1;X=g(v.node,X);for(var ba=[],da=X.length,ea=0,ga=void 0,ha=0,ia=-1;ea<da;ea++)ga=X[ea]," "==ga?(ha||W&&!ea||(ba.push(new CKEDITOR.dom.text(" ")),ia=ba.length),ha=1):(ba.push(ga),ha=0);N&&ia==ba.length&&ba.pop();W=ba}}if(W){for(;N=W.pop();)Q.insertNode(N);W=0}else Q.insertNode(v.node);v.lastNotAllowed&&p<C.length-1&&((ca=aa?x:ca)&&Q.setEndAt(ca,CKEDITOR.POSITION_AFTER_START),u=0);Q.collapse()}}1!=C.length?V=!1:(V=C[0],V=V.isElement&&"false"==V.node.getAttribute("contenteditable"));
V&&(w=!0,N=C[0].node,Q.setStartAt(N,CKEDITOR.POSITION_BEFORE_START),Q.setEndAt(N,CKEDITOR.POSITION_AFTER_END));l.dontMoveCaret=w;l.bogusNeededBlocks=M}V=l.range;var fa;ca=l.bogusNeededBlocks;for(W=V.createBookmark();T=l.zombies.pop();)T.getParent()&&(P=V.clone(),P.moveToElementEditStart(T),P.removeEmptyBlocksAtEnd());if(ca)for(;T=ca.pop();)CKEDITOR.env.needsBrFiller?T.appendBogus():T.append(V.document.createText(" "));for(;T=l.mergeCandidates.pop();)T.mergeSiblings();V.moveToBookmark(W);if(!l.dontMoveCaret){for(T=
d(V);T&&a(T)&&!T.is(n.$empty);){if(T.isBlockBoundary())V.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END);else{if(e(T)&&T.getHtml().match(/(\s|&nbsp;)$/g)){fa=null;break}fa=V.clone();fa.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END)}T=T.getLast(k)}fa&&V.moveToRange(fa)}}}}();q=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};
return c}function c(a,b,g){b=a.getDocument().createElement(b);a.append(b,g);return b}function b(a){var c=a.count(),g;for(c;0<c--;)g=a.getItem(c),CKEDITOR.tools.trim(g.getHtml())||(g.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&g.getChildCount()&&g.getFirst().remove())}return function(g){var d=g.startContainer,e=d.getAscendant("table",1),f=!1;b(e.getElementsByTag("td"));b(e.getElementsByTag("th"));e=g.clone();e.setStart(d,0);e=a(e).lastBackward();e||(e=g.clone(),e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),
e=a(e).lastForward(),f=!0);e||(e=d);e.is("table")?(g.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),g.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=c(e,"tr",f)),e.is("tr")&&(e=c(e,e.getParent().is("thead")?"th":"td",f)),(d=e.getBogus())&&d.remove(),g.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();u=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||
a.is(CKEDITOR.dtd.$listItem)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return c}return function(c){var b=c.startContainer,g=!1,d;d=c.clone();d.setStart(b,0);d=a(d).lastBackward();d||(d=c.clone(),d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END),d=a(d).lastForward(),g=!0);d||(d=b);d.is(CKEDITOR.dtd.$list)?(c.setStartAt(d,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),d.remove()):((b=d.getBogus())&&b.remove(),c.moveToPosition(d,g?CKEDITOR.POSITION_AFTER_START:
CKEDITOR.POSITION_BEFORE_END),c.select())}}();x={eol:{detect:function(a,c){var b=a.range,g=b.clone(),d=b.clone(),e=new CKEDITOR.dom.elementPath(b.startContainer,c),f=new CKEDITOR.dom.elementPath(b.endContainer,c);g.collapse(1);d.collapse();e.block&&g.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(b.setStartAfter(e.block),a.prependEolBr=1);f.block&&d.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(b.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,c){var b=c.getDocument(),g;a.appendEolBr&&(g=
this.createEolBr(b),a.fragment.append(g));!a.prependEolBr||g&&!g.getPrevious()||a.fragment.append(this.createEolBr(b),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var c=a.range.getBoundaryNodes(),b=c.startNode,c=c.endNode;!c||!v(c)||b&&b.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var b=a.range,g=b.getCommonAncestor(),d=new CKEDITOR.dom.elementPath(g,c),e=new CKEDITOR.dom.elementPath(b.startContainer,c),
b=new CKEDITOR.dom.elementPath(b.endContainer,c),f;g.type==CKEDITOR.NODE_TEXT&&(g=g.getParent());if(d.blockLimit.is({tr:1,table:1})){var h=d.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(d.block&&d.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),b=b.contains(CKEDITOR.dtd.$list),!e.equals(b))){var k=d.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(k)}}f||(f=function(a){return!a.equals(d.block)&&!a.equals(d.blockLimit)});this.rebuildFragment(a,
c,g,f)},rebuildFragment:function(a,c,b,g){for(var d;b&&!b.equals(c)&&g(b);)d=b.clone(0,1),a.fragment.appendTo(d),a.fragment=d,b=b.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,b=a.endContainer,g=a.startOffset,d=a.endOffset;c.type==CKEDITOR.NODE_ELEMENT&&c.equals(b)&&c.is("tr")&&++g==d&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};A=function(){function a(c,b){var g=c.getParent();if(g.is(CKEDITOR.dtd.$inline))c[b?"insertBefore":"insertAfter"](g)}function c(b,g,d){a(g);a(d,1);for(var e;e=
d.getNext();)e.insertAfter(g),g=e;w(b)&&b.remove()}function g(a,c){var b=new CKEDITOR.dom.range(a);b.setStartAfter(c.startNode);b.setEndBefore(c.endNode);return b}return{list:{detectMerge:function(a,c){var b=g(c,a.bookmark),d=b.startPath(),e=b.endPath(),f=d.contains(CKEDITOR.dtd.$list),h=e.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=d.block&&e.block&&d.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||
a.mergeListItems)b=b.clone(),b.setStartBefore(a.bookmark.startNode),b.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=b.createBookmark()},merge:function(a,b){if(a.mergeListBookmark){var g=a.mergeListBookmark.startNode,d=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(g,b),f=new CKEDITOR.dom.elementPath(d,b);if(a.mergeList){var h=e.contains(CKEDITOR.dtd.$list),k=f.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),
f=f.contains(CKEDITOR.dtd.$listItem),e.equals(f)||c(f,g,d));g.remove();d.remove()}}},block:{detectMerge:function(a,c){if(!a.tableContentsRanges&&!a.mergeListBookmark){var b=new CKEDITOR.dom.range(c);b.setStartBefore(a.bookmark.startNode);b.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=b.createBookmark()}},merge:function(a,b){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var g=a.mergeBlockBookmark.startNode,d=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(g,b),f=new CKEDITOR.dom.elementPath(d,
b),e=e.block,f=f.block;e&&f&&!e.equals(f)&&c(f,g,d);g.remove();d.remove()}}},table:function(){function a(g){var d=[],e,f=new CKEDITOR.dom.walker(g),h=g.startPath().contains(b),k=g.endPath().contains(b),n={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(n,a,l,1)}if(f&&h&&a.equals(h))e=g.clone(),e.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),d.push(e);else if(!f&&k&&a.equals(k))e=g.clone(),e.setStartAt(k,
CKEDITOR.POSITION_AFTER_START),d.push(e);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&(!h||c(a,h))&&(!k||c(a,k));if(!l&&(l=f))if(a.is(b))var l=h&&h.getAscendant("table",!0),m=k&&k.getAscendant("table",!0),q=a.getAscendant("table",!0),l=l&&l.contains(q)||m&&m.contains(q);else l=void 0;l&&(e=g.clone(),e.selectNodeContents(a),d.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return d}function c(a,b){var g=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,d=a.getPosition(b);
return d===CKEDITOR.POSITION_IDENTICAL?!1:0===(d&g)}var b={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,g=c.clone();g.enlarge(CKEDITOR.ENLARGE_ELEMENT);var g=new CKEDITOR.dom.walker(g),d=0;g.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&++d};g.checkForward();if(1<d){var g=c.startPath().contains("table"),e=c.endPath().contains("table");g&&e&&c.checkBoundaryOfElement(g,CKEDITOR.START)&&c.checkBoundaryOfElement(e,CKEDITOR.END)&&(c=a.range.clone(),c.setStartBefore(g),
c.setEndAfter(e),a.purgeTableBookmark=c.createBookmark())}},detectRanges:function(d,e){var f=g(e,d.bookmark),h=f.clone(),k,n,l=f.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(b)&&(l=l.getAscendant("table",!0));n=l;l=new CKEDITOR.dom.elementPath(f.startContainer,n);n=new CKEDITOR.dom.elementPath(f.endContainer,n);l=l.contains("table");n=n.contains("table");if(l||n)l&&n&&c(l,n)?(d.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),h.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),
h=f.clone(),h.setEndAt(l,CKEDITOR.POSITION_AFTER_END),k=f.clone(),k.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),k=a(h).concat(a(k))):l?n||(d.tableSurroundingRange=h,h.setStartAt(l,CKEDITOR.POSITION_AFTER_END),f.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(d.tableSurroundingRange=h,h.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),f.setStartAt(n,CKEDITOR.POSITION_AFTER_START)),d.tableContentsRanges=k?k:a(f)},deleteRanges:function(a){for(var c;c=a.tableContentsRanges.pop();)c.extractContents(),w(c.startContainer)&&
c.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var c=a.doc,b=a.range.clone(),c=c.createElement("p");c.insertBefore(a.purgeTableBookmark.startNode);b.moveToBookmark(a.purgeTableBookmark);b.deleteContents();a.range.moveToPosition(c,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},
fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,c){var g=c.startPath(),d;m(a,g.block,g.blockLimit)&&(d=b(a))&&(d=c.document.createElement(d),d.appendBogus(),c.insertNode(d),c.moveToPosition(d,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function f(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,c){if(0===a.length||f(a[0].getEnclosedNode()))return!1;var b,g;if((b=!c&&
1===a.length)&&!(b=a[0].collapsed)){var d=a[0];b=d.startContainer.getAscendant({td:1,th:1},!0);var e=d.endContainer.getAscendant({td:1,th:1},!0);g=CKEDITOR.tools.trim;b&&b.equals(e)&&!b.findOne("td, th, tr, tbody, table")?(d=d.cloneContents(),b=d.getFirst()?g(d.getFirst().getText())!==g(b.getText()):!0):b=!1}if(b)return!1;for(g=0;g<a.length;g++)if(b=a[g]._getTableElement(),!b)return!1;return!0}function e(a){function c(a){a=a.find("td, th");var b=[],g;for(g=0;g<a.count();g++)b.push(a.getItem(g));return b}
var b=[],g,d;for(d=0;d<a.length;d++)g=a[d]._getTableElement(),g.is&&g.is({td:1,th:1})?b.push(g):b=b.concat(c(g));return b}function k(a){a=e(a);var c="",b=[],g,d;for(d=0;d<a.length;d++)g&&!g.equals(a[d].getAscendant("tr"))?(c+=b.join("\t")+"\n",g=a[d].getAscendant("tr"),b=[]):0===d&&(g=a[d].getAscendant("tr")),b.push(a[d].getText());return c+=b.join("\t")}function d(a){var c=this.root.editor,b=c.getSelection(1);this.reset();D=!0;b.root.once("selectionchange",function(a){a.cancel()},null,null,0);b.selectRanges([a[0]]);
b=this._.cache;b.ranges=new CKEDITOR.dom.rangeList(a);b.type=CKEDITOR.SELECTION_TEXT;b.selectedElement=a[0]._getTableElement();b.selectedText=k(a);b.nativeSel=null;this.isFake=1;this.rev=u++;c._.fakeSelection=this;D=!1;this.root.fire("selectionchange")}function l(){var a=this._.fakeSelection,c;if(a){c=this.getSelection(1);var b;if(!(b=!c)&&(b=!c.isHidden())){b=a;var g=c.getRanges(),d=b.getRanges(),e=g.length&&g[0]._getTableElement()&&g[0]._getTableElement().getAscendant("table",!0),k=d.length&&d[0]._getTableElement()&&
d[0]._getTableElement().getAscendant("table",!0),n=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table"),l=1===d.length&&d[0]._getTableElement()&&d[0]._getTableElement().is("table");if(f(b.getSelectedElement()))b=!1;else{var m=1===g.length&&g[0].collapsed,d=h(g,!!CKEDITOR.env.webkit)&&h(d);e=e&&k?e.equals(k)||k.contains(e):!1;e&&(m||d)?(n&&!l&&b.selectRanges(g),b=!0):b=!1}b=!b}b&&(a.reset(),a=0)}if(!a&&(a=c||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;
this.fire("selectionCheck",a);c=this.elementPath();c.compare(this._.selectionPreviousPath)||(b=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(c.blockLimit),CKEDITOR.env.webkit&&!b&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=c,this.fire("selectionChange",{selection:a,path:c}))}function m(){B=!0;t||(b.call(this),t=CKEDITOR.tools.setTimeout(b,200,this))}function b(){t=null;B&&(CKEDITOR.tools.setTimeout(l,0,this),B=!1)}function g(a){return y(a)||
a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function c(a){function c(b,g){return b&&b.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(g?"End":"Start")](b):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var b=a.startContainer,d=a.getPreviousNode(g,null,b),e=a.getNextNode(g,null,b);return c(d)||c(e,1)||!(d||e||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()&&b.getBogus())?!0:!1}function a(a){n(a,!1);var c=a.getDocument().createText(x);a.setCustomData("cke-fillingChar",
c);return c}function n(a,c){var b=a&&a.removeCustomData("cke-fillingChar");if(b){if(!1!==c){var g=a.getDocument().getSelection().getNative(),d=g&&"None"!=g.type&&g.getRangeAt(0),e=x.length;if(b.getLength()>e&&d&&d.intersectsNode(b.$)){var f=[{node:g.anchorNode,offset:g.anchorOffset},{node:g.focusNode,offset:g.focusOffset}];g.anchorNode==b.$&&g.anchorOffset>e&&(f[0].offset-=e);g.focusNode==b.$&&g.focusOffset>e&&(f[1].offset-=e)}}b.setText(w(b.getText(),1));f&&(b=a.getDocument().$,g=b.getSelection(),
b=b.createRange(),b.setStart(f[0].node,f[0].offset),b.collapse(!0),g.removeAllRanges(),g.addRange(b),g.extend(f[1].node,f[1].offset))}}function w(a,c){return c?a.replace(A,function(a,c){return c?" ":""}):a.replace(x,"")}function v(a,c){var b=c&&CKEDITOR.tools.htmlEncode(c)||"\x26nbsp;",b=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")+'"\x3e'+b+"\x3c/div\x3e",
a.document);a.fire("lockSnapshot");a.editable().append(b);var g=a.getSelection(1),d=a.createRange(),e=g.root.on("selectionchange",function(a){a.cancel()},null,null,0);d.setStartAt(b,CKEDITOR.POSITION_AFTER_START);d.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);g.selectRanges([d]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function p(a){var c={37:1,39:1,8:1,46:1};return function(b){var g=b.data.getKeystroke();if(c[g]){var d=a.getSelection().getRanges(),e=d[0];1==d.length&&
e.collapsed&&(g=e[38>g?"getPreviousEditableNode":"getNextEditableNode"]())&&g.type==CKEDITOR.NODE_ELEMENT&&"false"==g.getAttribute("contenteditable")&&(a.getSelection().fake(g),b.data.preventDefault(),b.cancel())}}}function r(a){for(var c=0;c<a.length;c++){var b=a[c];b.getCommonAncestor().isReadOnly()&&a.splice(c,1);if(!b.collapsed){if(b.startContainer.isReadOnly())for(var g=b.startContainer,d;g&&!((d=g.type==CKEDITOR.NODE_ELEMENT)&&g.is("body")||!g.isReadOnly());)d&&"false"==g.getAttribute("contentEditable")&&
b.setStartAfter(g),g=g.getParent();g=b.startContainer;d=b.endContainer;var e=b.startOffset,f=b.endOffset,h=b.clone();g&&g.type==CKEDITOR.NODE_TEXT&&(e>=g.getLength()?h.setStartAfter(g):h.setStartBefore(g));d&&d.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(d):h.setEndBefore(d));g=new CKEDITOR.dom.walker(h);g.evaluator=function(g){if(g.type==CKEDITOR.NODE_ELEMENT&&g.isReadOnly()){var d=b.clone();b.setEndBefore(g);b.collapsed&&a.splice(c--,1);g.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(d.setStartAfter(g),
d.collapsed||a.splice(c+1,0,d));return!0}return!1};g.next()}}return a}var q="function"!=typeof window.getSelection,u=1,x=CKEDITOR.tools.repeat("​",7),A=new RegExp(x+"( )?","g"),D,t,B,y=CKEDITOR.dom.walker.invisible(1),z=function(){function a(c){return function(a){var b=a.editor.createRange();b.moveToClosestEditablePosition(a.selected,c)&&a.editor.getSelection().selectRanges([b]);return!1}}function c(a){return function(c){var b=c.editor,g=b.createRange(),d;if(!b.readOnly)return(d=g.moveToClosestEditablePosition(c.selected,
a))||(d=g.moveToClosestEditablePosition(c.selected,!a)),d&&b.getSelection().selectRanges([g]),b.fire("saveSnapshot"),c.selected.remove(),d||(g.moveToElementEditablePosition(b.editable()),b.getSelection().selectRanges([g])),b.fire("saveSnapshot"),!1}}var b=a(),g=a(1);return{37:b,38:b,39:g,40:g,8:c(),46:c(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=b.getSelection();a&&a.removeAllRanges()}var b=a.editor;b.on("contentDom",function(){function a(){u=new CKEDITOR.dom.selection(b.getSelection());
u.lock()}function c(){e.removeListener("mouseup",c);k.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement()&&b.parentElement().ownerDocument==d.$&&b.select()}function g(a){if(CKEDITOR.env.ie){var c=(a=a.getRanges()[0])?a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&("false"==a.getAttribute("contenteditable")||"true"==a.getAttribute("contenteditable"))},!0):null;return a&&"false"==c.getAttribute("contenteditable")&&
c}}var d=b.document,e=CKEDITOR.document,f=b.editable(),h=d.getBody(),k=d.getDocumentElement(),w=f.isInline(),r,u;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();0!==r&&(a=b.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==f.$&&(a=b.createRange(),a.moveToElementEditStart(f),a.select())},null,null,-2);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){r&&CKEDITOR.env.webkit&&(r=b._.previousActive&&b._.previousActive.equals(d.getActive()))&&
null!=b._.previousScrollTop&&b._.previousScrollTop!=f.$.scrollTop&&(f.$.scrollTop=b._.previousScrollTop);b.unlockSelection(r);r=0},null,null,-1);f.attachListener(f,"mousedown",function(){r=0});if(CKEDITOR.env.ie||w)q?f.attachListener(f,"beforedeactivate",a,null,null,-1):f.attachListener(b,"selectionCheck",a,null,null,-1),f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){b.lockSelection(u);r=1},null,null,-1),f.attachListener(f,"mousedown",function(){r=0});if(CKEDITOR.env.ie&&!w){var t;
f.attachListener(f,"mousedown",function(a){2==a.data.$.button&&((a=b.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(t=b.window.getScrollPosition()))});f.attachListener(f,"mouseup",function(a){2==a.data.$.button&&t&&(b.document.$.documentElement.scrollLeft=t.x,b.document.$.documentElement.scrollTop=t.y);t=null});if("BackCompat"!=d.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var x,v;k.on("mousedown",function(a){function c(a){a=a.data.$;if(x){var b=h.$.createTextRange();
try{b.moveToPoint(a.clientX,a.clientY)}catch(g){}x.setEndPoint(0>v.compareEndPoints("StartToStart",b)?"EndToEnd":"StartToStart",b);x.select()}}function b(){k.removeListener("mousemove",c);e.removeListener("mouseup",b);k.removeListener("mouseup",b);x.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<k.$.clientHeight&&a.$.x<k.$.clientWidth){x=h.$.createTextRange();try{x.moveToPoint(a.$.clientX,a.$.clientY)}catch(g){}v=x.duplicate();k.on("mousemove",c);e.on("mouseup",b);k.on("mouseup",b)}})}if(7<
CKEDITOR.env.version&&11>CKEDITOR.env.version)k.on("mousedown",function(a){a.data.getTarget().is("html")&&(e.on("mouseup",c),k.on("mouseup",c))})}}f.attachListener(f,"selectionchange",l,b);f.attachListener(f,"keyup",m,b);f.attachListener(f,"keydown",function(a){var c=this.getSelection(1);g(c)&&(c.selectElement(g(c)),a.data.preventDefault())},b);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){b.forceNextSelectionCheck();b.selectionChange(1)});if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var A;
f.attachListener(f,"mousedown",function(){A=1});f.attachListener(d.getDocumentElement(),"mouseup",function(){A&&m.call(b);A=0})}else f.attachListener(CKEDITOR.env.ie?f:d.getDocumentElement(),"mouseup",m,b);CKEDITOR.env.webkit&&f.attachListener(d,"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",p(b),null,null,-1)});b.on("setData",function(){b.unlockSelection();CKEDITOR.env.webkit&&
c()});b.on("contentDomUnload",function(){b.unlockSelection()});if(CKEDITOR.env.ie9Compat)b.on("beforeDestroy",c,null,null,9);b.on("dataReady",function(){delete b._.fakeSelection;delete b._.hiddenSelectionContainer;b.selectionChange(1)});b.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),c=b.editable().getLast(a);c&&c.hasAttribute("data-cke-hidden-sel")&&(c.remove(),CKEDITOR.env.gecko&&(a=b.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&
a.remove())},null,null,100);b.on("key",function(a){if("wysiwyg"==b.mode){var c=b.getSelection();if(c.isFake){var g=z[a.data.keyCode];if(g)return g({editor:b,selected:c.getSelectedElement(),selection:c,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var c=a.editor;c.on("selectionChange",function(){var a=c.editable(),b=a.getCustomData("cke-fillingChar");b&&(b.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):b.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",
function(){n(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?l:m).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 c=this._.savedSelection;return c?(c.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=
function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var c=a;a=a.root}var b=a instanceof CKEDITOR.dom.element;this.rev=c?c.rev:u++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody();this.isLocked=
0;this._={cache:{}};if(c)return CKEDITOR.tools.extend(this._.cache,c._.cache),this.isFake=c.isFake,this.isLocked=c.isLocked,this;a=this.getNative();var g,d;if(a)if(a.getRangeAt)g=(d=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(d.commonAncestorContainer);else{try{d=a.createRange()}catch(e){}g=d&&CKEDITOR.dom.element.get(d.item&&d.item(0)||d.parentElement())}if(!g||g.type!=CKEDITOR.NODE_ELEMENT&&g.type!=CKEDITOR.NODE_TEXT||!this.root.equals(g)&&!this.root.contains(g))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 I={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:w,_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:x});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==
this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE;try{var b=this.getNative(),g=b.type;"Text"==g&&(c=CKEDITOR.SELECTION_TEXT);"Control"==g&&(c=CKEDITOR.SELECTION_ELEMENT);b.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(d){}return a.type=c}:function(){var a=this._.cache;if(a.type)return a.type;var c=
CKEDITOR.SELECTION_TEXT,b=this.getNative();if(!b||!b.rangeCount)c=CKEDITOR.SELECTION_NONE;else if(1==b.rangeCount){var b=b.getRangeAt(0),g=b.startContainer;g==b.endContainer&&1==g.nodeType&&1==b.endOffset-b.startOffset&&I[g.childNodes[b.startOffset].nodeName.toLowerCase()]&&(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=q?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,b){c=c.duplicate();c.collapse(b);var g=c.parentElement();if(!g.hasChildNodes())return{container:g,
offset:0};for(var d=g.children,e,f,h=c.duplicate(),k=0,n=d.length-1,l=-1,m,q;k<=n;)if(l=Math.floor((k+n)/2),e=d[l],h.moveToElementText(e),m=h.compareEndPoints("StartToStart",c),0<m)n=l-1;else if(0>m)k=l+1;else return{container:g,offset:a(e)};if(-1==l||l==d.length-1&&0>m){h.moveToElementText(g);h.setEndPoint("StartToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;d=g.childNodes;if(!h)return e=d[d.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:g,offset:d.length}:{container:e,offset:e.nodeValue.length};
for(g=d.length;0<h&&0<g;)f=d[--g],f.nodeType==CKEDITOR.NODE_TEXT&&(q=f,h-=f.nodeValue.length);return{container:q,offset:-h}}h.collapse(0<m?!0:!1);h.setEndPoint(0<m?"StartToStart":"EndToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;if(!h)return{container:g,offset:a(e)+(0<m?0:1)};for(;0<h;)try{f=e[0<m?"previousSibling":"nextSibling"],f.nodeType==CKEDITOR.NODE_TEXT&&(h-=f.nodeValue.length,q=f),e=f}catch(w){return{container:g,offset:a(e)}}return{container:q,offset:0<m?-h:q.nodeValue.length+h}};
return function(){var a=this.getNative(),b=a&&a.createRange(),g=this.getType();if(!a)return[];if(g==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),g=c(b,!0),a.setStart(new CKEDITOR.dom.node(g.container),g.offset),g=c(b),a.setEnd(new CKEDITOR.dom.node(g.container),g.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(g==CKEDITOR.SELECTION_ELEMENT){for(var g=[],d=0;d<b.length;d++){for(var e=
b.item(d),f=e.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<f.childNodes.length&&f.childNodes[h]!=e;h++);a.setStart(new CKEDITOR.dom.node(f),h);a.setEnd(new CKEDITOR.dom.node(f),h+1);g.push(a)}return g}return[]}}():function(){var a=[],c,b=this.getNative();if(!b)return a;for(var g=0;g<b.rangeCount;g++){var d=b.getRangeAt(g);c=new CKEDITOR.dom.range(this.root);c.setStart(new CKEDITOR.dom.node(d.startContainer),d.startOffset);c.setEnd(new CKEDITOR.dom.node(d.endContainer),d.endOffset);a.push(c)}return a};
return function(c){var b=this._.cache,g=b.ranges;g||(b.ranges=g=new CKEDITOR.dom.rangeList(a.call(this)));return c?r(new CKEDITOR.dom.rangeList(g.slice())):g}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var c;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var b=this.getRanges()[0];if(b){if(b.collapsed)c=b.startContainer,c.type!=CKEDITOR.NODE_ELEMENT&&(c=c.getParent());else{for(b.optimize();c=
b.startContainer,b.startOffset==(c.getChildCount?c.getChildCount():c.getLength())&&!c.isBlockBoundary();)b.setStartAfter(c);c=b.startContainer;if(c.type!=CKEDITOR.NODE_ELEMENT)return c.getParent();if((c=c.getChild(b.startOffset))&&c.type==CKEDITOR.NODE_ELEMENT)for(b=c.getFirst();b&&b.type==CKEDITOR.NODE_ELEMENT;)c=b,b=b.getFirst();else c=b.startContainer}c=c.$}}return a.startElement=c?new CKEDITOR.dom.element(c):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;
var c=this,b=CKEDITOR.tools.tryThese(function(){return c.getNative().createRange().item(0)},function(){for(var a=c.getRanges()[0].clone(),b,g,d=2;d&&!((b=a.getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&I[b.getName()]&&(g=b));d--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return g&&g.$});return a.selectedElement=b?new CKEDITOR.dom.element(b):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var c=this.getNative(),c=q?"Control"==c.type?"":c.createRange().text:
c.toString();return a.selectedText=c},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var c=this.getSelectedElement(),b=this.getRanges(),g=this.isFake;this.isLocked=0;this.reset();a&&(a=c||b[0]&&b[0].getCommonAncestor())&&a.getAscendant("body",1)&&(h(b)?d.call(this,b):g?this.fake(c):c?this.selectElement(c):this.selectRanges(b))}},reset:function(){this._.cache=
{};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;var c=a._.hiddenSelectionContainer;if(c){var b=a.checkDirty();a.fire("lockSnapshot");c.remove();a.fire("unlockSnapshot");!b&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=u++},selectElement:function(a){var c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(b){var g=
this.root.editor,e=g&&g._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,f,k=0;k<b.length;++k)f=b[k],f.endContainer.equals(e)&&(f.endOffset=Math.min(f.endOffset,e.getChildCount()));if(b.length)if(this.isLocked){var l=CKEDITOR.document.getActive();this.unlock();this.selectRanges(b);this.lock();l&&!l.equals(this.root)&&l.focus()}else{var m;a:{var w,r;if(1==b.length&&!(r=b[0]).collapsed&&(m=r.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(r=r.clone(),r.shrink(CKEDITOR.SHRINK_ELEMENT,
!0),(w=r.getEnclosedNode())&&w.type==CKEDITOR.NODE_ELEMENT&&(m=w),"false"==m.getAttribute("contenteditable")))break a;m=void 0}if(m)this.fake(m);else if(g&&g.plugins.tableselection&&CKEDITOR.plugins.tableselection.isSupportedEnvironment&&h(b)&&!D)d.call(this,b);else{if(q){w=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;r={table:1,tbody:1,tr:1};1<b.length&&(g=b[b.length-1],b[0].setEnd(g.endContainer,g.endOffset));g=b[0];b=g.collapsed;var p,u,t;if((e=g.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&
e.getName()in I&&(!e.is("a")||!e.getText()))try{t=e.$.createControlRange();t.addElement(e.$);t.select();return}catch(x){}if(g.startContainer.type==CKEDITOR.NODE_ELEMENT&&g.startContainer.getName()in r||g.endContainer.type==CKEDITOR.NODE_ELEMENT&&g.endContainer.getName()in r)g.shrink(CKEDITOR.NODE_ELEMENT,!0),b=g.collapsed;t=g.createBookmark();r=t.startNode;b||(l=t.endNode);t=g.document.$.body.createTextRange();t.moveToElementText(r.$);t.moveStart("character",1);l?(m=g.document.$.body.createTextRange(),
m.moveToElementText(l.$),t.setEndPoint("EndToEnd",m),t.moveEnd("character",-1)):(p=r.getNext(w),u=r.hasAscendant("pre"),p=!(p&&p.getText&&p.getText().match(m))&&(u||!r.hasPrevious()||r.getPrevious().is&&r.getPrevious().is("br")),u=g.document.createElement("span"),u.setHtml("\x26#65279;"),u.insertBefore(r),p&&g.document.createText("﻿").insertBefore(r));g.setStartBefore(r);r.remove();b?(p?(t.moveStart("character",-1),t.select(),g.document.$.selection.clear()):t.select(),g.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START),
u.remove()):(g.setEndBefore(l),l.remove(),t.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(t=0;t<b.length;t++){if(t<b.length-1&&(p=b[t],u=b[t+1],m=p.clone(),m.setStart(p.endContainer,p.endOffset),m.setEnd(u.startContainer,u.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),g=m.getCommonAncestor(),m=m.getEnclosedNode(),g.isReadOnly()||m&&m.isReadOnly()))){u.setStart(p.startContainer,p.startOffset);b.splice(t--,1);continue}g=b[t];u=this.document.$.createRange();
g.collapsed&&CKEDITOR.env.webkit&&c(g)&&(m=a(this.root),g.insertNode(m),(p=m.getNext())&&!m.getPrevious()&&p.type==CKEDITOR.NODE_ELEMENT&&"br"==p.getName()?(n(this.root),g.moveToPosition(p,CKEDITOR.POSITION_BEFORE_START)):g.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));u.setStart(g.startContainer.$,g.startOffset);try{u.setEnd(g.endContainer.$,g.endOffset)}catch(v){if(0<=v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))g.collapse(1),u.setEnd(g.endContainer.$,g.endOffset);else throw v;}l.addRange(u)}}this.reset();
this.root.fire("selectionchange")}}},fake:function(a,c){var b=this.root.editor;void 0===c&&a.hasAttribute("aria-label")&&(c=a.getAttribute("aria-label"));this.reset();v(b,c);var g=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);g.ranges=new CKEDITOR.dom.rangeList(d);g.selectedElement=g.startElement=a;g.type=CKEDITOR.SELECTION_ELEMENT;g.selectedText=g.nativeSel=null;this.isFake=1;this.rev=u++;b._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=
this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return h(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var c=[],b,g=0;g<
a.length;g++){var d=new CKEDITOR.dom.range(this.root);d.moveToBookmark(a[g]);c.push(d)}a.isFake&&(b=h(c)?c[0]._getTableElement():c[0].getEnclosedNode(),b&&b.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(c)?this.fake(b):this.selectRanges(c);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&
this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[q?"empty":"removeAllRanges"]()}catch(c){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function f(a,c){for(var b,g;(a=a.getParent())&&!a.equals(c);)if(a.getAttribute("data-nostyle"))b=a;else if(!g){var d=a.getAttribute("contentEditable");"false"==d?b=a:"true"==d&&(g=1)}return b}function h(a,
c,b,g){return(a.getPosition(c)|g)==g&&(!b.childRule||b.childRule(a))}function e(a){var c=a.document;if(a.collapsed)c=u(this,c),a.insertNode(c),a.moveToPosition(c,CKEDITOR.POSITION_BEFORE_END);else{var b=this.element,g=this._.definition,k,n=g.ignoreReadonly,l=n||g.includeReadonly;null==l&&(l=a.root.getCustomData("cke_includeReadonly"));var m=CKEDITOR.dtd[b];m||(k=!0,m=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var q=a.createBookmark(),r=q.startNode,w=q.endNode,t=r,x;if(!n){var v=
a.getCommonAncestor(),n=f(r,v),v=f(w,v);n&&(t=n.getNextSourceNode(!0));v&&(w=v)}for(t.getPosition(w)==CKEDITOR.POSITION_FOLLOWING&&(t=0);t;){n=!1;if(t.equals(w))t=null,n=!0;else{var P=t.type==CKEDITOR.NODE_ELEMENT?t.getName():null,v=P&&"false"==t.getAttribute("contentEditable"),A=P&&t.getAttribute("data-nostyle");if(P&&t.data("cke-bookmark")){t=t.getNextSourceNode(!0);continue}if(v&&l&&CKEDITOR.dtd.$block[P])for(var D=t,W=d(D),B=void 0,z=W.length,ea=0,D=z&&new CKEDITOR.dom.range(D.getDocument());ea<
z;++ea){var B=W[ea],y=CKEDITOR.filter.instances[B.data("cke-filter")];if(y?y.check(this):1)D.selectNodeContents(B),e.call(this,D)}W=P?!m[P]||A?0:v&&!l?0:h(t,w,g,L):1;if(W)if(B=t.getParent(),W=g,z=b,ea=k,!B||!(B.getDtd()||CKEDITOR.dtd.span)[z]&&!ea||W.parentRule&&!W.parentRule(B))n=!0;else{if(x||P&&CKEDITOR.dtd.$removeEmpty[P]&&(t.getPosition(w)|L)!=L||(x=a.clone(),x.setStartBefore(t)),P=t.type,P==CKEDITOR.NODE_TEXT||v||P==CKEDITOR.NODE_ELEMENT&&!t.getChildCount()){for(var P=t,I;(n=!P.getNext(H))&&
(I=P.getParent(),m[I.getName()])&&h(I,r,g,O);)P=I;x.setEndAfter(P)}}else n=!0;t=t.getNextSourceNode(A||v)}if(n&&x&&!x.collapsed){for(var n=u(this,c),v=n.hasAttributes(),A=x.getCommonAncestor(),P={},W={},B={},z={},E,G,F;n&&A;){if(A.getName()==b){for(E in g.attributes)!z[E]&&(F=A.getAttribute(G))&&(n.getAttribute(E)==F?W[E]=1:z[E]=1);for(G in g.styles)!B[G]&&(F=A.getStyle(G))&&(n.getStyle(G)==F?P[G]=1:B[G]=1)}A=A.getParent()}for(E in W)n.removeAttribute(E);for(G in P)n.removeStyle(G);v&&!n.hasAttributes()&&
(n=null);n?(x.extractContents().appendTo(n),x.insertNode(n),p.call(this,n),n.mergeSiblings(),CKEDITOR.env.ie||n.$.normalize()):(n=new CKEDITOR.dom.element("span"),x.extractContents().appendTo(n),x.insertNode(n),p.call(this,n),n.remove(!0));x=null}}a.moveToBookmark(q);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function k(a){function c(){for(var a=new CKEDITOR.dom.elementPath(g.getParent()),b=new CKEDITOR.dom.elementPath(l.getParent()),d=null,e=null,f=0;f<a.elements.length;f++){var h=
a.elements[f];if(h==a.block||h==a.blockLimit)break;m.checkElementRemovable(h,!0)&&(d=h)}for(f=0;f<b.elements.length;f++){h=b.elements[f];if(h==b.block||h==b.blockLimit)break;m.checkElementRemovable(h,!0)&&(e=h)}e&&l.breakParent(e);d&&g.breakParent(d)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var b=a.createBookmark(),g=b.startNode,d=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(g.getParent(),a.root),f,h=0,k;h<e.elements.length&&(k=e.elements[h])&&k!=e.block&&
k!=e.blockLimit;h++)if(this.checkElementRemovable(k)){var n;!d&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(n=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(f=k,f.match=n?"start":"end"):(k.mergeSiblings(),k.is(this.element)?v.call(this,k):r(k,D(this)[k.getName()]))}if(f){d=g;for(h=0;;h++){k=e.elements[h];if(k.equals(f))break;else if(k.match)continue;else k=k.clone();k.append(d);d=k}d["start"==f.match?"insertBefore":"insertAfter"](f)}}else{var l=b.endNode,m=this;c();for(e=g;!e.equals(l);)f=
e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?v.call(this,e):r(e,D(this)[e.getName()]),f.type==CKEDITOR.NODE_ELEMENT&&f.contains(g)&&(c(),f=g.getNext())),e=f}a.moveToBookmark(b);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function d(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function l(a){var c=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(c,
a.root)).contains(this.element,1))&&!a.isReadOnly()&&x(a,this)}function m(a){var c=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1)){var c=this._.definition,b=c.attributes;if(b)for(var g in b)a.removeAttribute(g,b[g]);if(c.styles)for(var d in c.styles)c.styles.hasOwnProperty(d)&&a.removeStyle(d)}}function b(a){var b=a.createBookmark(!0),g=a.createIterator();g.enforceRealBlocks=!0;this._.enterMode&&(g.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var d,
e=a.document,f;d=g.getNextParagraph();)!d.isReadOnly()&&(g.activeFilter?g.activeFilter.check(this):1)&&(f=u(this,e,d),c(d,f));a.moveToBookmark(b)}function g(a){var b=a.createBookmark(1),g=a.createIterator();g.enforceRealBlocks=!0;g.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var d,e;d=g.getNextParagraph();)this.checkElementRemovable(d)&&(d.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&d.copyAttributes(e),c(d,e)):
v.call(this,d));a.moveToBookmark(b)}function c(c,b){var g=!b;g&&(b=c.getDocument().createElement("div"),c.copyAttributes(b));var d=b&&b.is("pre"),e=c.is("pre"),f=!d&&e;if(d&&!e){e=b;(f=c.getBogus())&&f.remove();f=c.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 h=c.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+
f+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);b=e}else f?b=w(g?[c.getHtml()]:a(c),b):c.moveChildren(b);b.replace(c);if(d){var g=b,k;(k=g.getPrevious(G))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=n(k.getHtml(),/\n$/,"")+"\n\n"+n(g.getHtml(),/^\n/,""),CKEDITOR.env.ie?g.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":g.setHtml(d),k.remove())}else g&&q(b)}function a(a){var c=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
function(a,c,b){return c+"\x3c/pre\x3e"+b+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,b){c.push(b)});return c}function n(a,c,b){var g="",d="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,c,b){c&&(g=c);b&&(d=b);return""});return g+a.replace(c,b)+d}function w(a,c){var b;1<a.length&&(b=new CKEDITOR.dom.documentFragment(c.getDocument()));for(var g=0;g<a.length;g++){var d=a[g],d=d.replace(/(\r\n|\r)/g,"\n"),d=n(d,/^[ \t]*\n/,
""),d=n(d,/\n$/,""),d=n(d,/^[ \t]+|[ \t]+$/g,function(a,c){return 1==a.length?"\x26nbsp;":c?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),d=d.replace(/\n/g,"\x3cbr\x3e"),d=d.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(b){var e=c.clone();e.setHtml(d);b.append(e)}else c.setHtml(d)}return b||c}function v(a,c){var b=this._.definition,g=b.attributes,b=b.styles,d=D(this)[a.getName()],e=CKEDITOR.tools.isEmpty(g)&&
CKEDITOR.tools.isEmpty(b),f;for(f in g)if("class"!=f&&!this._.definition.fullMatch||a.getAttribute(f)==t(f,g[f]))c&&"data-"==f.slice(0,5)||(e=a.hasAttribute(f),a.removeAttribute(f));for(var h in b)this._.definition.fullMatch&&a.getStyle(h)!=t(h,b[h],!0)||(e=e||!!a.getStyle(h),a.removeStyle(h));r(a,d,z[a.getName()]);e&&(this._.definition.alwaysRemoveElement?q(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?q(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))}function p(a){for(var c=D(this),b=a.getElementsByTag(this.element),g,d=b.count();0<=--d;)g=b.getItem(d),g.isReadOnly()||v.call(this,g,!0);for(var e in c)if(e!=this.element)for(b=a.getElementsByTag(e),d=b.count()-1;0<=d;d--)g=b.getItem(d),g.isReadOnly()||r(g,c[e])}function r(a,c,b){if(c=c&&c.attributes)for(var g=0;g<c.length;g++){var d=c[g][0],e;if(e=a.getAttribute(d)){var f=c[g][1];(null===f||f.test&&f.test(e)||"string"==typeof f&&e==f)&&a.removeAttribute(d)}}b||q(a)}function q(a,c){if(!a.hasAttributes()||
c)if(CKEDITOR.dtd.$block[a.getName()]){var b=a.getPrevious(G),g=a.getNext(G);!b||b.type!=CKEDITOR.NODE_TEXT&&b.isBlockBoundary({br:1})||a.append("br",1);!g||g.type!=CKEDITOR.NODE_TEXT&&g.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else b=a.getFirst(),g=a.getLast(),a.remove(!0),b&&(b.type==CKEDITOR.NODE_ELEMENT&&b.mergeSiblings(),g&&!b.equals(g)&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings())}function u(a,c,b){var g;g=a.element;"*"==g&&(g="span");g=new CKEDITOR.dom.element(g,c);b&&b.copyAttributes(g);
g=x(g,a);c.getCustomData("doc_processing_style")&&g.hasAttribute("id")?g.removeAttribute("id"):c.setCustomData("doc_processing_style",1);return g}function x(a,c){var b=c._.definition,g=b.attributes,b=CKEDITOR.style.getStyleText(b);if(g)for(var d in g)a.setAttribute(d,g[d]);b&&a.setAttribute("style",b);return a}function A(a,c){for(var b in a)a[b]=a[b].replace(F,function(a,b){return c[b]})}function D(a){if(a._.overrides)return a._.overrides;var c=a._.overrides={},b=a._.definition.overrides;if(b){CKEDITOR.tools.isArray(b)||
(b=[b]);for(var g=0;g<b.length;g++){var d=b[g],e,f;"string"==typeof d?e=d.toLowerCase():(e=d.element?d.element.toLowerCase():a.element,f=d.attributes);d=c[e]||(c[e]={});if(f){var d=d.attributes=d.attributes||[],h;for(h in f)d.push([h.toLowerCase(),f[h]])}}}return c}function t(a,c,b){var g=new CKEDITOR.dom.element("span");g[b?"setStyle":"setAttribute"](a,c);return g[b?"getStyle":"getAttribute"](a)}function B(a,c){function b(a,c){return"font-family"==c.toLowerCase()?a.replace(/["']/g,""):a}"string"==
typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof c&&(c=CKEDITOR.tools.parseCssText(c,!0));for(var g in a)if(!(g in c)||b(c[g],g)!=b(a[g],g)&&"inherit"!=a[g]&&"inherit"!=c[g])return!1;return!0}function y(a,c,b){var g=a.document,d=a.getRanges();c=c?this.removeFromRange:this.applyToRange;var e,f;if(a.isFake&&a.isInTable())for(e=[],f=0;f<d.length;f++)e.push(d[f].clone());for(var h=d.createIterator();f=h.getNextRange();)c.call(this,f,b);a.selectRanges(e||d);g.removeCustomData("doc_processing_style")}
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},I={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*|$)/,F=/#\((.+?)\)/g,H=CKEDITOR.dom.walker.bookmark(0,1),G=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,c){if("string"==
typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var b=a.attributes;b&&b.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(b.style)),delete b.style);c&&(a=CKEDITOR.tools.clone(a),A(a.attributes,c),A(a.styles,c));b=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(z[b]?CKEDITOR.STYLE_BLOCK:I[b]?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 y.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);y.call(this,a.getSelection(),0,a);this._.enterMode=c}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return y.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);
y.call(this,a.getSelection(),1,a);this._.enterMode=c}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?b:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?k:this.type==CKEDITOR.STYLE_BLOCK?g:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.removeFromRange(a)},applyToObject:function(a){x(a,this)},checkActive:function(a,c){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||
a.blockLimit,!0,c);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var b=a.elements,g=0,d;g<b.length;g++)if(d=b[g],this.type!=CKEDITOR.STYLE_INLINE||d!=a.block&&d!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var e=d.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(d,!0,c))return!0}}return!1},checkApplicable:function(a,c,b){c&&c instanceof CKEDITOR.filter&&(b=c);if(b&&!b.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);
case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},checkElementMatch:function(a,c){var b=this._.definition;if(!a||!b.ignoreReadonly&&a.isReadOnly())return!1;var g=a.getName();if("string"==typeof this.element?g==this.element:g in this.element){if(!c&&!a.hasAttributes())return!0;if(g=b._AC)b=g;else{var g={},d=0,e=b.attributes;if(e)for(var f in e)d++,g[f]=e[f];if(f=CKEDITOR.style.getStyleText(b))g.style||d++,g.style=f;g._length=d;b=b._AC=g}if(b._length){for(var h in b)if("_length"!=
h)if(g=a.getAttribute(h)||"","style"==h?B(b[h],g):b[h]==g){if(!c)return!0}else if(c)return!1;if(c)return!0}else return!0}return!1},checkElementRemovable:function(a,c,b){if(this.checkElementMatch(a,c,b))return!0;if(c=D(this)[a.getName()]){var g;if(!(c=c.attributes))return!0;for(b=0;b<c.length;b++)if(g=c[b][0],g=a.getAttribute(g)){var d=c[b][1];if(null===d)return!0;if("string"==typeof d){if(g==d)return!0}else if(d.test(g))return!0}}return!1},buildPreview:function(a){var c=this._.definition,b=[],g=c.element;
"bdo"==g&&(g="span");var b=["\x3c",g],d=c.attributes;if(d)for(var e in d)b.push(" ",e,'\x3d"',d[e],'"');(d=CKEDITOR.style.getStyleText(c))&&b.push(' style\x3d"',d,'"');b.push("\x3e",a||c.name,"\x3c/",g,"\x3e");return b.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var c=a._ST;if(c)return c;var c=a.styles,b=a.attributes&&a.attributes.style||"",g="";b.length&&(b=b.replace(E,";"));for(var d in c){var e=c[d],f=(d+":"+e).replace(E,";");"inherit"==
e?g+=f:b+=f}b.length&&(b=CKEDITOR.tools.normalizeCssText(b,!0));return a._ST=b+g};CKEDITOR.style.customHandlers={};CKEDITOR.style.addCustomHandler=function(a){var c=function(a){this._={definition:a};this.setup&&this.setup(a)};c.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=c};var L=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,O=CKEDITOR.POSITION_FOLLOWING|
CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(f,h){this.requiredContent=this.allowedContent=this.style=f;CKEDITOR.tools.extend(this,h,!0)},CKEDITOR.styleCommand.prototype.exec=function(f){f.focus();this.state==CKEDITOR.TRISTATE_OFF?f.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&f.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),
CKEDITOR.loadStylesSet=function(f,h,e){CKEDITOR.stylesSet.addExternal(f,h,"");CKEDITOR.stylesSet.load(f,e)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(f,h){var e=this._.styleStateChangeCallbacks;e||(e=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(f){for(var d=0;d<e.length;d++){var h=e[d],m=h.style.checkActive(f.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;h.fn.call(this,m)}}));e.push({style:f,fn:h})},applyStyle:function(f){f.apply(this)},
removeStyle:function(f){f.remove(this)},getStylesSet:function(f){if(this._.stylesDefinitions)f(this._.stylesDefinitions);else{var h=this,e=h.config.stylesCombo_stylesSet||h.config.stylesSet;if(!1===e)f(null);else if(e instanceof Array)h._.stylesDefinitions=e,f(e);else{e||(e="default");var e=e.split(":"),k=e[0];CKEDITOR.stylesSet.addExternal(k,e[1]?e.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(k,function(d){h._.stylesDefinitions=d[k];f(h._.stylesDefinitions)})}}}}),
CKEDITOR.dom.comment=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createComment(f));CKEDITOR.dom.domObject.call(this,f)},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 f={},h={},e;for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(f[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||
e in CKEDITOR.dtd.$empty||(h[e]=1);CKEDITOR.dom.elementPath=function(e,d){var l=null,m=null,b=[],g=e,c;d=d||e.getDocument().getBody();g||(g=d);do if(g.type==CKEDITOR.NODE_ELEMENT){b.push(g);if(!this.lastElement&&(this.lastElement=g,g.is(CKEDITOR.dtd.$object)||"false"==g.getAttribute("contenteditable")))continue;if(g.equals(d))break;if(!m&&(c=g.getName(),"true"==g.getAttribute("contenteditable")?m=g:!l&&h[c]&&(l=g),f[c])){if(c=!l&&"div"==c){a:{c=g.getChildren();for(var a=0,n=c.count();a<n;a++){var w=
c.getItem(a);if(w.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[w.getName()]){c=!0;break a}}c=!1}c=!c}c?l=g:m=g}}while(g=g.getParent());m||(m=d);this.block=l;this.blockLimit=m;this.root=d;this.elements=b}}(),CKEDITOR.dom.elementPath.prototype={compare:function(f){var h=this.elements;f=f&&f.elements;if(!f||h.length!=f.length)return!1;for(var e=0;e<h.length;e++)if(!h[e].equals(f[e]))return!1;return!0},contains:function(f,h,e){var k=0,d;"string"==typeof f&&(d=function(b){return b.getName()==f});f instanceof
CKEDITOR.dom.element?d=function(b){return b.equals(f)}:CKEDITOR.tools.isArray(f)?d=function(b){return-1<CKEDITOR.tools.indexOf(f,b.getName())}:"function"==typeof f?d=f:"object"==typeof f&&(d=function(b){return b.getName()in f});var l=this.elements,m=l.length;h&&(e?k+=1:--m);e&&(l=Array.prototype.slice.call(l,0),l.reverse());for(;k<m;k++)if(d(l[k]))return l[k];return null},isContextFor:function(f){var h;return f in CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&
this.block||this.blockLimit,!!h.getDtd()[f]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createTextNode(f));this.$=f},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(f){this.$.nodeValue=f},split:function(f){var h=
this.$.parentNode,e=h.childNodes.length,k=this.getLength(),d=this.getDocument(),l=new CKEDITOR.dom.text(this.$.splitText(f),d);h.childNodes.length==e&&(f>=k?(l=d.createText(""),l.insertAfter(this)):(f=d.createText(""),f.insertAfter(l),f.remove()));return l},substring:function(f,h){return"number"!=typeof h?this.$.nodeValue.substr(f):this.$.nodeValue.substring(f,h)}}),function(){function f(e,f,d){var h=e.serializable,m=f[d?"endContainer":"startContainer"],b=d?"endOffset":"startOffset",g=h?f.document.getById(e.startNode):
e.startNode;e=h?f.document.getById(e.endNode):e.endNode;m.equals(g.getPrevious())?(f.startOffset=f.startOffset-m.getLength()-e.getPrevious().getLength(),m=e.getNext()):m.equals(e.getPrevious())&&(f.startOffset-=m.getLength(),m=e.getNext());m.equals(g.getParent())&&f[b]++;m.equals(e.getParent())&&f[b]++;f[d?"endContainer":"startContainer"]=m;return f}CKEDITOR.dom.rangeList=function(e){if(e instanceof CKEDITOR.dom.rangeList)return e;e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[];return CKEDITOR.tools.extend(e,
h)};var h={createIterator:function(){var e=this,f=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(m){h=void 0===h?0:h+1;var b=e[h];if(b&&1<e.length){if(!h)for(var g=e.length-1;0<=g;g--)d.unshift(e[g].createBookmark(!0));if(m)for(var c=0;e[h+c+1];){var a=b.document;m=0;g=a.getById(d[c].endNode);for(a=a.getById(d[c+1].startNode);;){g=g.getNextSourceNode(!1);if(a.equals(g))m=1;else if(f(g)||g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary())continue;break}if(!m)break;c++}for(b.moveToBookmark(d.shift());c--;)g=
e[++h],g.moveToBookmark(d.shift()),b.setEnd(g.endContainer,g.endOffset)}return b}}},createBookmarks:function(e){for(var h=[],d,l=0;l<this.length;l++){h.push(d=this[l].createBookmark(e,!0));for(var m=l+1;m<this.length;m++)this[m]=f(d,this[m]),this[m]=f(d,this[m],!0)}return h},createBookmarks2:function(e){for(var f=[],d=0;d<this.length;d++)f.push(this[d].createBookmark2(e));return f},moveToBookmarks:function(e){for(var f=0;f<this.length;f++)this[f].moveToBookmark(e[f])}}}(),function(){function f(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||
"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(c){var a=CKEDITOR.skin["ua_"+c],b=CKEDITOR.env;if(a)for(var a=a.split(",").sort(function(a,c){return a>c?-1:1}),g=0,d;g<a.length;g++)if(d=a[g],b.ie&&(d.replace(/^ie/,"")==b.version||b.quirks&&"iequirks"==d)&&(d="ie"),b[d]){c+="_"+a[g];break}return CKEDITOR.getUrl(f()+c+".css")}function e(c,a){l[c]||(CKEDITOR.document.appendStyleSheet(h(c)),l[c]=1);a&&a()}function k(c){var a=c.getById(m);a||(a=c.getHead().append("style"),a.setAttribute("id",
m),a.setAttribute("type","text/css"));return a}function d(c,a,b){var g,d,e;if(CKEDITOR.env.webkit)for(a=a.split("}").slice(0,-1),d=0;d<a.length;d++)a[d]=a[d].split("{");for(var f=0;f<c.length;f++)if(CKEDITOR.env.webkit)for(d=0;d<a.length;d++){e=a[d][1];for(g=0;g<b.length;g++)e=e.replace(b[g][0],b[g][1]);c[f].$.sheet.addRule(a[d][0],e)}else{e=a;for(g=0;g<b.length;g++)e=e.replace(b[g][0],b[g][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?c[f].$.styleSheet.cssText+=e:c[f].$.innerHTML+=e}}var l={};CKEDITOR.skin=
{path:f,loadPart:function(c,a){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f()+"skin.js"),function(){e(c,a)}):e(c,a)},getPath:function(c){return CKEDITOR.getUrl(h(c))},icons:{},addIcon:function(c,a,b,g){c=c.toLowerCase();this.icons[c]||(this.icons[c]={path:a,offset:b||0,bgsize:g||"16px"})},getIconStyle:function(c,a,b,g,d){var e;c&&(c=c.toLowerCase(),a&&(e=this.icons[c+"-rtl"]),e||(e=this.icons[c]));c=b||e&&e.path||"";g=g||e&&e.offset;d=d||e&&e.bgsize||
"16px";c&&(c=c.replace(/'/g,"\\'"));return c&&"background-image:url('"+CKEDITOR.getUrl(c)+"');background-position:0 "+g+"px;background-size:"+d+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(c){var a=k(CKEDITOR.document);return(this.setUiColor=function(c){this.uiColor=c;var e=CKEDITOR.skin.chameleon,f="",h="";"function"==typeof e&&(f=e(this,"editor"),h=e(this,"panel"));c=[[g,c]];d([a],f,c);d(b,h,c)}).call(this,c)}});var m="cke_ui_color",
b=[],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")){c=k(c);b.push(c);var e=a.getUiColor();e&&d([c],CKEDITOR.skin.chameleon(a,"panel"),[[g,e]])}};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 f=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);f.appendTo(CKEDITOR.document.getHead());try{var h=f.getComputedStyle("border-top-color"),e=f.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=e)}catch(k){CKEDITOR.env.hc=!1}f.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(f=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<f.length;h++)CKEDITOR.editor.prototype.constructor.apply(f[h][0],
f[h][1]),CKEDITOR.add(f[h][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 f=function(){return function(e,f){for(var d=e.match(/[^#]./g),h=0;3>h;h++){var m=h,b;b=parseInt(d[h],16);b=("0"+(0>f?0|b*(1+f):0|b+(255-b)*f).toString(16)).slice(-2);d[m]=b}return"#"+d.join("")}}(),h={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(e,k){var d=f(e.uiColor,.4),d={id:"."+e.id,defaultBorder:f(d,-.2),toolbarElementsBorder:f(d,-.25),defaultBackground:d,lightBackground:f(d,.8),darkBackground:f(d,-.15),ckeButtonOn:f(d,.4),ckeResizer:f(d,-.4),ckeColorauto:f(d,.8),dialogBody:f(d,.7),dialogTab:f(d,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:f(d,-.6),menubuttonHover:f(d,.1),menubuttonIcon:f(d,.5),menubuttonIconHover:f(d,.3)};return h[k].output(d).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
CKEDITOR.plugins.add("dialogui",{onLoad:function(){var f=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var c=[this._],a=1;a<arguments.length;a++)c.push(arguments[a]);c.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,c);return this._},h={build:function(b,c,a){return new CKEDITOR.ui.dialog.textInput(b,c,a)}},e={build:function(b,c,a){return new CKEDITOR.ui.dialog[c.type](b,c,a)}},k={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}},d=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,c){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",c)}},!0),l=/^on([A-Z]\w+)/,m=function(b){for(var c in b)(l.test(c)||"title"==c||"type"==c)&&delete b[c];return b},b=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,c,a,d){if(!(4>arguments.length)){var e=f.call(this,c);e.labelId=CKEDITOR.tools.getNextId()+
"_label";this._.children=[];var h={role:c.role||"presentation"};c.includeLabel&&(h["aria-labelledby"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,a,"div",null,h,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+e.labelId+'"',e.inputId?' for\x3d"'+e.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"',
c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',d.call(this,b,c),"\x3c/div\x3e"):(f={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" id\x3d"'+e.labelId+'" for\x3d"'+e.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(c.controlStyle?' style\x3d"'+c.controlStyle+
'"':"")+"\x3e"+d.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(g,c,a){if(!(3>arguments.length)){f.call(this,c);var d=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",e={"class":"cke_dialog_ui_input_"+c.type,id:d,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(e.maxlength=c.maxLength);c.size&&(e.size=c.size);c.inputStyle&&(e.style=c.inputStyle);var h=this,k=!1;g.on("load",function(){h.getInputElement().on("keydown",
function(a){13==a.data.getKeystroke()&&(k=!0)});h.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&k&&(g.getButton("ok")&&setTimeout(function(){g.getButton("ok").click()},0),k=!1);h.bidi&&b.call(h,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,g,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 ");e["aria-labelledby"]=this._.labelId;this._.required&&
(e["aria-required"]=this._.required);for(var b in e)a.push(b+'\x3d"'+e[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(g,c,a){if(!(3>arguments.length)){f.call(this,c);var d=this,e=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};c.validate&&(this.validate=c.validate);h.rows=c.rows||5;h.cols=c.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(h.style=c.inputStyle);c.dir&&(h.dir=c.dir);if(d.bidi)g.on("load",
function(){d.getInputElement().on("keyup",b)},d);CKEDITOR.ui.dialog.labeledElement.call(this,g,c,a,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',e,'" '],c;for(c in h)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(h[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(d._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,
c,a){if(!(3>arguments.length)){var d=f.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,a,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.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};m(a);c["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);
d.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,e,"input",null,h);e.push(' \x3clabel id\x3d"',f,'" for\x3d"',h.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,c,a){if(!(3>arguments.length)){f.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var d=[],e=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,a,function(){for(var a=[],f=[],h=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<c.items.length;k++){var l=c.items[k],x=void 0!==l[2]?l[2]:l[0],A=void 0!==l[1]?l[1]:l[0],D=CKEDITOR.tools.getNextId()+"_radio_input",t=D+"_label",D=CKEDITOR.tools.extend({},c,{id:D,title:null,type:null},!0),x=CKEDITOR.tools.extend({},D,{title:x},!0),B={type:"radio","class":"cke_dialog_ui_radio_input",name:h,value:A,"aria-labelledby":t},y=[];e._["default"]==A&&(B.checked="checked");m(D);m(x);"undefined"!=typeof D.inputStyle&&
(D.style=D.inputStyle);D.keyboardFocusable=!0;d.push(new CKEDITOR.ui.dialog.uiElement(b,D,y,"input",null,B));y.push(" ");new CKEDITOR.ui.dialog.uiElement(b,x,y,"label",null,{id:t,"for":B.id},l[0]);a.push(y.join(""))}new CKEDITOR.ui.dialog.hbox(b,d,a,f);return f.join("")});this._.children=d}},button:function(b,c,a){if(arguments.length){"function"==typeof c&&(c=c(b.getParentEditor()));f.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);var d=this;b.on("load",function(){var a=this.getElement();
(function(){a.on("click",function(a){d.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(d.click(),a.data.preventDefault())})})();a.unselectable()},this);var e=CKEDITOR.tools.extend({},c);delete e.style;var h=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,e,a,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":h},'\x3cspan id\x3d"'+h+'" class\x3d"cke_dialog_ui_button"\x3e'+
CKEDITOR.tools.htmlEncode(c.label)+"\x3c/span\x3e")}},select:function(b,c,a){if(!(3>arguments.length)){var d=f.call(this,c);c.validate&&(this.validate=c.validate);d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],f=[],h={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_',
c.type,'" role\x3d"presentation"');c.width&&e.push('style\x3d"width:'+c.width+'" ');e.push("\x3e");void 0!==c.size&&(h.size=c.size);void 0!==c.multiple&&(h.multiple=c.multiple);m(a);for(var k=0,l;k<c.items.length&&(l=c.items[k]);k++)f.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==l[1]?l[1]:l[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(l[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);d.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,c,a){if(!(3>arguments.length)){void 0===c["default"]&&(c["default"]="");var d=CKEDITOR.tools.extend(f.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",function(){CKEDITOR.document.getById(d.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){d.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"',
d.frameId,'" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,c,a){var d=this;if(!(3>arguments.length)){f.call(this,c);c.validate&&(this.validate=c.validate);var e=CKEDITOR.tools.extend({},c),h=e.onClick;e.className=(e.className?e.className+" ":"")+"cke_dialog_ui_button";e.onClick=function(a){var d=
c["for"];a=h?h.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(d)});CKEDITOR.ui.dialog.button.call(this,b,e,a)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,c=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,a=/\/$/;return function(d,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 m=this.focus;
this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,d,e,h,"span",null,null,"");h=h.join("").match(b);k=k.match(c)||["","",""];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,c,a,d,e){var f=e.label;this._={children:c};CKEDITOR.ui.dialog.uiElement.call(this,b,e,d,"fieldset",null,null,function(){var c=
[];f&&c.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;b<a.length;b++)c.push(a[b]);return c.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 c=CKEDITOR.document.getById(this._.labelId);1>c.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(c):c.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:d},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var 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,c){this.on("click",function(){c.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},
focus:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&c.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&(c.$.focus(),c.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var c=b&&b.charAt(0);(c="‪"==c?"ltr":"‫"==c?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(c)}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 c=this.getDirectionMarker();c&&(b=("ltr"==c?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var c=this.getInputElement();b?c.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&c.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},k,!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,c,a){var d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;d.$.text=b;d.$.value=void 0===c||null===c?b:c;void 0===a||null===a?CKEDITOR.env.ie?e.add(d.$):e.add(d.$,null):e.add(d.$,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},k,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,c){this.getInputElement().$.checked=b;!c&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b,
c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);b.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},k,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,c){for(var a=this._.children,d,e=0;e<a.length&&(d=a[e]);e++)d.getElement().$.checked=
d.getValue()==b;!c&&this.fire("change",{value:b})},getValue:function(){for(var b=this._.children,c=0;c<b.length;c++)if(b[c].getElement().$.checked)return b[c].getValue();return null},accessKeyUp:function(){var b=this._.children,c;for(c=0;c<b.length;c++)if(b[c].getElement().$.checked){b[c].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return d.onChange.apply(this,arguments);b.on("load",function(){for(var a=
this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",c);return null}}},k,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,k,{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 c=/^on([A-Z]\w+)/,a,d=function(a,b,c,g){a.on("formLoaded",function(){a.getInputElement().on(c,g,a)})},e;for(e in b)if(a=e.match(c))this.eventProcessors[e]?this.eventProcessors[e].call(this,this._.dialog,b[e]):d(this,this._.dialog,a[1].toLowerCase(),b[e]);return this},reset:function(){function b(){a.$.open();
var g="";d.size&&(g=d.size-(CKEDITOR.env.ie?7:0));var m=c.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(d.action),'"\x3e\x3clabel id\x3d"',c.labelId,'" for\x3d"',m,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(d.label),
'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',m,'" aria-labelledby\x3d"',c.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(d.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 c=this._,a=CKEDITOR.document.getById(c.frameId).getFrameDocument(),d=c.definition,e=c.buttons,f=this.formLoadedNumber,h=this.formUnloadNumber,k=c.dialog._.editor.lang.dir,l=c.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,c){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",c)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=
new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",h);CKEDITOR.dialog.addUIElement("password",h);CKEDITOR.dialog.addUIElement("textarea",e);CKEDITOR.dialog.addUIElement("checkbox",e);CKEDITOR.dialog.addUIElement("radio",e);CKEDITOR.dialog.addUIElement("button",e);CKEDITOR.dialog.addUIElement("select",e);CKEDITOR.dialog.addUIElement("file",e);CKEDITOR.dialog.addUIElement("fileButton",e);CKEDITOR.dialog.addUIElement("html",
e);CKEDITOR.dialog.addUIElement("fieldset",{build:function(b,c,a){for(var d=c.children,e,f=[],h=[],k=0;k<d.length&&(e=d[k]);k++){var l=[];f.push(l);h.push(CKEDITOR.dialog._.uiElementBuilders[e.type].build(b,e,l))}return new CKEDITOR.ui.dialog[c.type](b,h,f,a,c)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function f(){for(var a=this._.tabIdList.length,
b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function h(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function e(a,b){for(var c=a.$.getElementsByTagName("input"),g=0,d=c.length;g<d;g++){var e=new CKEDITOR.dom.element(c[g]);
"text"==e.getAttribute("type").toLowerCase()&&(b?(e.setAttribute("value",e.getCustomData("fake_value")||""),e.removeCustomData("fake_value")):(e.setCustomData("fake_value",e.getAttribute("value")),e.setAttribute("value","")))}}function k(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select():this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function d(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}
function l(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",r).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=b.getChild([0,0,0,0,0]),g=c.getChild(0),d=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!CKEDITOR.env.ie||CKEDITOR.env.quirks||
CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));g.unselectable();d.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:g,close:d,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function m(a,
b,c){this.element=b;this.focusIndex=c;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function b(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",
b)})}function g(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function c(a){function b(c){var k=a.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),l=c.data.$.screenX,m=c.data.$.screenY,q=l-g.x,t=m-g.y;g={x:l,y:m};d.x+=q;d.y+=t;a.move(d.x+h[3]<f?-h[3]:d.x-h[1]>n.width-k.width-f?n.width-k.width+("rtl"==e.lang.dir?0:h[1]):d.x,d.y+h[0]<f?-h[0]:d.y-h[2]>n.height-k.height-f?n.height-k.height+h[2]:d.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",
b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=y.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var g=null,d=null,e=a.getParentEditor(),f=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(e){g={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);d=a.getPosition();if(CKEDITOR.env.ie6Compat){var f=
y.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",c)}e.data.preventDefault()},a)}function a(a){function b(c){var m="rtl"==e.lang.dir,q=l.width,t=l.height,r=q+(c.data.$.screenX-n.x)*(m?-1:1)*(a._.moved?1:2),u=t+(c.data.$.screenY-n.y)*(a._.moved?1:2),w=a._.element.getFirst(),w=m&&w.getComputedStyle("right"),p=a.getPosition();p.y+u>k.height&&(u=k.height-p.y);(m?w:p.x)+r>k.width&&(r=k.width-(m?w:p.x));if(d==CKEDITOR.DIALOG_RESIZE_WIDTH||d==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(g.minWidth||
0,r-f);if(d==CKEDITOR.DIALOG_RESIZE_HEIGHT||d==CKEDITOR.DIALOG_RESIZE_BOTH)t=Math.max(g.minHeight||0,u-h);a.resize(q,t);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);m&&(m.remove(),m=null);if(CKEDITOR.env.ie6Compat){var a=y.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var g=a.definition,d=g.resizable;if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),
f,h,k,n,l,m,q=CKEDITOR.tools.addFunction(function(g){l=a.getSize();var d=a.parts.contents;d.$.getElementsByTagName("iframe").length&&(m=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),d.append(m));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);n={x:g.screenX,y:g.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();
CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(d=y.getChild(0).getFrameDocument(),d.on("mousemove",b),d.on("mouseup",c));g.preventDefault&&g.preventDefault()});a.on("load",function(){var b="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+
'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(q)})}}function n(a){a.data.preventDefault(1)}function w(a){var b=CKEDITOR.document.getWindow(),c=a.config,g=CKEDITOR.skinName||a.config.skin,d=c.dialog_backgroundCoverColor||("moono-lisa"==g?"black":"white"),g=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,g,e),f=B[c];f?f.show():
(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+
CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(e.join("")),f.setOpacity(void 0!==g?g:.5),f.on("keydown",n),f.on("keypress",n),f.on("keyup",n),f.appendTo(CKEDITOR.document.getBody()),B[c]=f);a.focusManager.add(f);y=f;a=function(){var a=b.getViewPaneSize();
f.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;f.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};t=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 v(a){y&&(a.focusManager.remove(y),a=CKEDITOR.document.getWindow(),y.hide(),a.removeListener("resize",t),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),t=null)}var p=CKEDITOR.tools.cssLength,r='\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(b,g){function e(){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,c=0;c<b;c++)a[c].focusIndex=c}function n(a){var b=z._.focusList;a=a||0;if(!(1>b.length)){var c=z._.currentFocusIndex;z._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(g){}var d=c,e=1<z._.pageCount;do{d+=a;if(e&&!z._.tabBarMode&&(d==b.length||-1==d)){z._.tabBarMode=!0;z._.tabs[z._.currentTabId][0].focus();
z._.currentFocusIndex=-1;return}d=(d+b.length)%b.length;if(d==c)break}while(a&&!b[d].isFocusable());b[d].focus();"text"==b[d].type&&b[d].select()}}function m(a){if(z==CKEDITOR.dialog._.currentTop){var c=a.data.getKeystroke(),g="rtl"==b.lang.dir,d=[37,38,39,40];A=v=0;if(9==c||c==CKEDITOR.SHIFT+9)n(c==CKEDITOR.SHIFT+9?-1:1),A=1;else if(c==CKEDITOR.ALT+121&&!z._.tabBarMode&&1<z.getPageCount())z._.tabBarMode=!0,z._.tabs[z._.currentTabId][0].focus(),z._.currentFocusIndex=-1,A=1;else if(-1!=CKEDITOR.tools.indexOf(d,
c)&&z._.tabBarMode)c=-1!=CKEDITOR.tools.indexOf([g?39:37,38],c)?f.call(z):h.call(z),z.selectPage(c),z._.tabs[c][0].focus(),A=1;else if(13!=c&&32!=c||!z._.tabBarMode)if(13==c)c=a.data.getTarget(),c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||((c=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(c.click,0,c),A=1),v=1;else if(27==c)(c=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(c.click,0,c):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),v=1;else return;else this.selectPage(this._.currentTabId),
this._.tabBarMode=!1,this._.currentFocusIndex=-1,n(1),A=1;t(a)}}function t(a){A?a.data.preventDefault(1):v&&a.data.stopPropagation()}var r=CKEDITOR.dialog._.dialogDefinitions[g],w=CKEDITOR.tools.clone(q),u=b.config.dialog_buttonsOrder||"OS",p=b.lang.dir,x={},A,v;("OS"==u&&CKEDITOR.env.mac||"rtl"==u&&"ltr"==p||"ltr"==u&&"rtl"==p)&&w.buttons.reverse();r=CKEDITOR.tools.extend(r(b),w);r=CKEDITOR.tools.clone(r);r=new D(this,r);w=l(b);this._={editor:b,element:w.element,name:g,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=w.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);w={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};w["rtl"==p?"right":"left"]=0;this.parts.dialog.setStyles(w);CKEDITOR.event.call(this);this.definition=r=CKEDITOR.fire("dialogDefinition",
{name:g,definition:r},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){w=b.config.removeDialogTabs.split(";");for(p=0;p<w.length;p++)if(u=w[p].split(":"),2==u.length){var B=u[0];x[B]||(x[B]=[]);x[B].push(u[1])}b._.removeDialogTabs=x}if(b._.removeDialogTabs&&(x=b._.removeDialogTabs[g]))for(p=0;p<x.length;p++)r.removeContents(x[p]);if(r.onLoad)this.on("load",r.onLoad);if(r.onShow)this.on("show",r.onShow);if(r.onHide)this.on("hide",r.onHide);if(r.onOk)this.on("ok",function(a){b.fire("saveSnapshot");
setTimeout(function(){b.fire("saveSnapshot")},0);!1===r.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(r.onCancel)this.on("cancel",function(a){!1===r.onCancel.call(this,a)&&(a.data.hide=!1)});var z=this,P=function(a){var b=z._.contents,c=!1,g;for(g in b)for(var d in b[g])if(c=a.call(this,b[g][d]))return};this.on("ok",function(a){P(function(b){if(b.validate){var c=b.validate(this),g="string"==typeof c||!1===c;g&&(a.data.hide=!1,a.stop());k.call(b,!g,"string"==typeof c?
c:void 0);return g}})},this,null,0);this.on("cancel",function(a){P(function(c){if(c.isChanged())return b.config.dialog_noConfirmCancel||confirm(b.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=n;var X=this._.element;b.focusManager.add(X,1);this.on("show",function(){X.on("keydown",m,this);if(CKEDITOR.env.gecko)X.on("keypress",t,this)});this.on("hide",
function(){X.removeListener("keydown",m);CKEDITOR.env.gecko&&X.removeListener("keypress",t);P(function(a){d.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",m,this,null,0)});this.on("show",function(){e();var a=1<z._.pageCount;b.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,r.onFocus?
(a=r.onFocus.call(this))&&a.focus():n(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);c(this);a(this);(new CKEDITOR.dom.text(r.title,CKEDITOR.document)).appendTo(this.parts.title);for(p=0;p<r.contents.length;p++)(x=r.contents[p])&&this.addPage(x);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,n(1)),a.data.preventDefault())},this);p=[];x=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:r.buttons},p).getChild();this.parts.footer.setHtml(p.join(""));for(p=0;p<x.length;p++)this._.buttons[x[p].id]=x[p]};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,c){var g=this._.element.getFirst(),d="rtl"==this._.editor.lang.dir,e="fixed"==g.getComputedStyle("position");CKEDITOR.env.ie&&g.setStyle("zoom","100%");e&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},e||(e=CKEDITOR.document.getWindow().getScrollPosition(),a+=e.x,b+=e.y),d&&(e=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-e.width-a),b={top:(0<b?b:0)+"px"},
b[d?"right":"left"]=(0<a?a:0)+"px",g.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,c=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||c.width||c.minWidth,this._.contentSize&&this._.contentSize.height||c.height||c.minHeight);this.reset();null===
this._.currentTabId&&this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=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,w(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",I);a.on("keyup",E);this._.hasFocus=!1;for(var g in c.contents)if(c.contents[g]){var a=c.contents[g],d=this._.tabs[a.id],e=a.requiredContent,f=0;if(d){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||e&&!this._.editor.activeFilter.check(e)?d[0].addClass("cke_dialog_tab_disabled"):
d[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();b(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a=this.parts.dialog,b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),g=
(c.width-b.width)/2,d=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<d?d:0)>c.height||b.width+(0<g?g:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:g,this._.moved?this._.position.y:d)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),
setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility",
"hidden");for(H(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 v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",I);a.removeListener("keyup",E);var c=this._.editor;
c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",g=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),d=this._.contents[a.id]={},e=g.getChild(),f=0;g=e.shift();)g.notAllowed||"hbox"==g.type||"vbox"==g.type||f++,d[g.id]=g,"function"==typeof g.getChild&&e.push.apply(e,g.getChild());f||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");g=CKEDITOR.env;d="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',
0<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',d,'"',g.gecko&&!g.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",d);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++;this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&
(F(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 c=this._.tabs[b][0],g=this._.tabs[b][1];b!=a&&(c.removeClass("cke_dialog_tab_selected"),g.hide());g.setAttribute("aria-hidden",b!=a)}var d=this._.tabs[a];d[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||
CKEDITOR.env.ie7Compat?(e(d[1]),d[1].show(),setTimeout(function(){e(d[1],1)},0)):d[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(f.call(this)),b.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=
this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},
enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new m(this,a,b));else{this._.focusList.splice(b,0,new m(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},
setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]="8px";this.parts.spinner=CKEDITOR.document.createElement("div",c);this.parts.spinner.setHtml("\x26#8987;");this.parts.spinner.appendTo(this.parts.title,1)}this.parts.spinner.show();this.getButton("ok").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,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+b+":"+c+"(?:$|;)",
"i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button",label:a.lang.common.cancel,
"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);
var q={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},u=function(a,b,c){for(var g=0,d;d=a[g];g++)if(d.id==b||c&&d[c]&&(d=u(d[c],b,c)))return d;return null},x=function(a,b,c,g,d){if(c){for(var e=0,f;f=a[e];e++){if(f.id==c)return a.splice(e,0,b),b;if(g&&f[g]&&(f=x(f[g],b,c,g,!0)))return f}if(d)return null}a.push(b);return b},A=function(a,b,c){for(var g=0,d;d=a[g];g++){if(d.id==b)return a.splice(g,1);if(c&&d[c]&&(d=A(d[c],
b,c)))return d}return null},D=function(a,b){this.dialog=a;for(var c=b.contents,d=0,e;e=c[d];d++)c[d]=e&&new g(a,e);CKEDITOR.tools.extend(this,b)};D.prototype={getContents:function(a){return u(this.contents,a)},getButton:function(a){return u(this.buttons,a)},addContents:function(a,b){return x(this.contents,a,b)},addButton:function(a,b){return x(this.buttons,a,b)},removeContents:function(a){A(this.contents,a)},removeButton:function(a){A(this.buttons,a)}};g.prototype={get:function(a){return u(this.elements,
a,"children")},add:function(a,b){return x(this.elements,a,b,"children")},remove:function(a){A(this.elements,a,"children")}};var t,B={},y,z={},I=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,g=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=z[(b?"CTRL+":"")+(c?"ALT+":"")+(g?"SHIFT+":"")+d])&&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,c=a.data.$.altKey,
g=a.data.$.shiftKey,d=String.fromCharCode(a.data.$.keyCode);(b=z[(b?"CTRL+":"")+(c?"ALT+":"")+(g?"SHIFT+":"")+d])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))},F=function(a,b,c,g,d){(z[c]||(z[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:d||a.accessKeyUp,keydown:g||a.accessKeyDown})},H=function(a){for(var b in z){for(var c=z[b],g=c.length-1;0<=g;g--)c[g].dialog!=a&&c[g].uiElement!=a||c.splice(g,1);0===c.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,c,g,d,e,f){if(!(4>arguments.length)){var h=(g.call?g(b):g)||"div",k=["\x3c",h," "],n=(d&&d.call?d(b):d)||{},l=(e&&e.call?e(b):e)||{},m=(f&&f.call?f.call(this,a,b):f)||"",q=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(n.display="none",this.notAllowed=!0);l.id=q;var r={};b.type&&(r["cke_dialog_ui_"+
b.type]=1);b.className&&(r[b.className]=1);b.disabled&&(r.cke_disabled=1);for(var t=l["class"]&&l["class"].split?l["class"].split(" "):[],q=0;q<t.length;q++)t[q]&&(r[t[q]]=1);t=[];for(q in r)t.push(q);l["class"]=t.join(" ");b.title&&(l.title=b.title);r=(b.style||"").split(";");b.align&&(t=b.align,n["margin-left"]="left"==t?0:"auto",n["margin-right"]="right"==t?0:"auto");for(q in n)r.push(q+":"+n[q]);b.hidden&&r.push("display:none");for(q=r.length-1;0<=q;q--)""===r[q]&&r.splice(q,1);0<r.length&&(l.style=
(l.style?l.style+"; ":"")+r.join("; "));for(q in l)k.push(q+'\x3d"'+CKEDITOR.tools.htmlEncode(l[q])+'" ');k.push("\x3e",m,"\x3c/",h,"\x3e");c.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}}));"function"==typeof b.getValue&&
(this.getValue=CKEDITOR.tools.override(this.getValue,function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&F(this,a,"CTRL+"+b.accessKey);var p=this;a.on("load",function(){var b=p.getInputElement();if(b){var c=p.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;p.fire("focus");
c&&this.addClass(c)});b.on("blur",function(){p.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=p.focusIndex}))}},hbox:function(a,b,c,g,d){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,f=d&&d.widths||null,h=d&&d.height||null,k,n={role:"presentation"};d&&d.align&&(n.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this,
a,d||{type:"hbox"},g,"table",{},n,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<c.length;k++){var b="cke_dialog_ui_hbox_child",g=[];0===k&&(b="cke_dialog_ui_hbox_first");k==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');f?f[k]&&g.push("width:"+p(f[k])):g.push("width:"+Math.floor(100/c.length)+"%");h&&g.push("height:"+p(h));d&&void 0!==d.padding&&g.push("padding:"+p(d.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&
e[k].align&&g.push("text-align:"+e[k].align);0<g.length&&a.push('style\x3d"'+g.join("; ")+'" ');a.push("\x3e",c[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,g,d){if(!(3>arguments.length)){this._||(this._={});var e=this._.children=b,f=d&&d.width||null,h=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},g,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];
b.push('style\x3d"');d&&d.expand&&b.push("height:100%;");b.push("width:"+p(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var g=0;g<c.length;g++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');f&&k.push("width:"+p(f||"100%"));h?k.push("height:"+p(h[g])):d&&d.expand&&k.push("height:"+Math.floor(100/c.length)+"%");
d&&void 0!==d.padding&&k.push("padding:"+p(d.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[g].align&&k.push("text-align:"+e[g].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[g],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},
setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();
return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,g=function(a,b,c,g){b.on("load",function(){a.getInputElement().on(c,g,a)})},d;for(d in a)if(c=d.match(b))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,a[d]):g(this,this._.dialog,c[1].toLowerCase(),a[d]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},
disable:function(){var a=this.getElement();this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var g=b.children,d,e=[],f=[],h=0;h<g.length&&(d=g[h]);h++){var k=[];e.push(k);f.push(CKEDITOR.dialog._.uiElementBuilders[d.type].build(a,d,k))}return new CKEDITOR.ui.dialog[b.type](a,
f,e,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,g=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
e=/^(\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],c,g=CKEDITOR.VALIDATE_AND,d=[],e;for(e=0;e<a.length;e++)if("function"==typeof a[e])d.push(a[e]);else break;e<a.length&&"string"==typeof a[e]&&(c=a[e],e++);e<a.length&&"number"==typeof a[e]&&(g=a[e]);var f=g==CKEDITOR.VALIDATE_AND?!0:!1;for(e=0;e<d.length;e++)f=g==CKEDITOR.VALIDATE_AND?f&&
d[e](b):f||d[e](b);return f?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return g.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},
a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in B)B[c].remove();B={}}a=a.editor._.storedDialogs;for(var g in a)a[g].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,g=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&w(this);if("function"==typeof g)c=this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,c),c.show();else{if("failed"==g)throw v(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof g&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(g),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,
b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(f){f.on("doubleclick",function(h){h.data.dialog&&f.openDialog(h.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(f){var h=this;f.addCommand("a11yHelp",{exec:function(){var e=f.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+e+".js"),function(){f.lang.a11yhelp=h.langEntries[e];f.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},
readOnly:1,canUndo:!1});f.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");f.on("ariaEditorHelpLabel",function(e){e.data.label=f.lang.common.editorHelp})}})}(),CKEDITOR.plugins.add("about",{requires:"dialog",init:function(f){var h=f.addCommand("about",new CKEDITOR.dialogCommand("about"));h.modes={wysiwyg:1,source:1};h.canUndo=!1;h.readOnly=1;f.ui.addButton&&f.ui.addButton("About",{label:f.lang.about.dlgTitle,command:"about",toolbar:"about"});
CKEDITOR.dialog.add("about",this.path+"dialogs/about.js")}}),"use strict",function(){function f(f){function e(){l=f.document;m=l[CKEDITOR.env.ie?"getBody":"getDocumentElement"]();b=CKEDITOR.env.quirks?l.getBody():l.getDocumentElement();var a=CKEDITOR.env.quirks?b:b.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 k(){w&&b.setStyle("overflow-y","hidden");var e=f.window.getViewPaneSize().height,k;m.append(g);k=g.getDocumentPosition(l).y+g.$.offsetHeight;g.remove();k+=c;k=Math.max(k,a);k=Math.min(k,n);k!=e&&d!=k&&(k=f.fire("autoGrow",{currentHeight:e,newHeight:k}).newHeight,f.resize(f.container.getStyle("width"),k,!0),d=k);w||(k<n&&b.$.scrollHeight>b.$.clientHeight?b.setStyle("overflow-y","hidden"):b.removeStyle("overflow-y"))}var d,l,m,b,g,c=f.config.autoGrow_bottomSpace||
0,a=void 0!==f.config.autoGrow_minHeight?f.config.autoGrow_minHeight:200,n=f.config.autoGrow_maxHeight||Infinity,w=!f.config.autoGrow_maxHeight;f.addCommand("autogrow",{exec:k,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var v={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},p;for(p in v)f.on(p,function(a){"wysiwyg"==a.editor.mode&&setTimeout(function(){var a=f.getCommand("maximize");!f.window||a&&a.state==CKEDITOR.TRISTATE_ON?d=null:(k(),w||k())},100)});f.on("afterCommandExec",
function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?b.removeStyle("overflow-y"):k())});f.on("contentDom",e);e();f.config.autoGrow_onStartup&&f.editable().isVisible()&&f.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(h){if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)h.on("instanceReady",function(){h.editable().isInline()?h.ui.space("contents").setStyle("height","auto"):f(h)})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(f){var h=
0,e=function(d,b,g,c){if(c){c=new CKEDITOR.style(c);var a=k[g];a.unshift(c);f.attachStyleStateChange(c,function(a){!f.readOnly&&f.getCommand(g).setState(a)});f.addCommand(g,new CKEDITOR.styleCommand(c,{contentForms:a}));f.ui.addButton&&f.ui.addButton(d,{label:b,command:g,toolbar:"basicstyles,"+(h+=10)})}},k={bold:["strong","b",["span",function(d){d=d.styles["font-weight"];return"bold"==d||700<=+d}]],italic:["em","i",["span",function(d){return"italic"==d.styles["font-style"]}]],underline:["u",["span",
function(d){return"underline"==d.styles["text-decoration"]}]],strike:["s","strike",["span",function(d){return"line-through"==d.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},d=f.config,l=f.lang.basicstyles;e("Bold",l.bold,"bold",d.coreStyles_bold);e("Italic",l.italic,"italic",d.coreStyles_italic);e("Underline",l.underline,"underline",d.coreStyles_underline);e("Strike",l.strike,"strike",d.coreStyles_strike);e("Subscript",l.subscript,"subscript",d.coreStyles_subscript);e("Superscript",
l.superscript,"superscript",d.coreStyles_superscript);f.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 f={exec:function(f){var e=f.getCommand("blockquote").state,k=f.getSelection(),d=k&&k.getRanges()[0];if(d){var l=k.createBookmarks();if(CKEDITOR.env.ie){var m=l[0].startNode,b=l[0].endNode,g;if(m&&"blockquote"==m.getParent().getName())for(g=m;g=g.getNext();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){m.move(g,!0);break}if(b&&"blockquote"==b.getParent().getName())for(g=b;g=g.getPrevious();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){b.move(g);break}}var c=d.createIterator();
c.enlargeBr=f.config.enterMode!=CKEDITOR.ENTER_BR;if(e==CKEDITOR.TRISTATE_OFF){for(m=[];e=c.getNextParagraph();)m.push(e);1>m.length&&(e=f.document.createElement(f.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=l.shift(),d.insertNode(e),e.append(new CKEDITOR.dom.text("﻿",f.document)),d.moveToBookmark(b),d.selectNodeContents(e),d.collapse(!0),b=d.createBookmark(),m.push(e),l.unshift(b));g=m[0].getParent();d=[];for(b=0;b<m.length;b++)e=m[b],g=g.getCommonAncestor(e.getParent());for(e={table:1,tbody:1,
tr:1,ol:1,ul:1};e[g.getName()];)g=g.getParent();for(b=null;0<m.length;){for(e=m.shift();!e.getParent().equals(g);)e=e.getParent();e.equals(b)||d.push(e);b=e}for(;0<d.length;)if(e=d.shift(),"blockquote"==e.getName()){for(b=new CKEDITOR.dom.documentFragment(f.document);e.getFirst();)b.append(e.getFirst().remove()),m.push(b.getLast());b.replace(e)}else m.push(e);d=f.document.createElement("blockquote");for(d.insertBefore(m[0]);0<m.length;)e=m.shift(),d.append(e)}else if(e==CKEDITOR.TRISTATE_ON){b=[];
for(g={};e=c.getNextParagraph();){for(m=d=null;e.getParent();){if("blockquote"==e.getParent().getName()){d=e.getParent();m=e;break}e=e.getParent()}d&&m&&!m.getCustomData("blockquote_moveout")&&(b.push(m),CKEDITOR.dom.element.setMarker(g,m,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(g);e=[];m=[];for(g={};0<b.length;)c=b.shift(),d=c.getParent(),c.getPrevious()?c.getNext()?(c.breakParent(c.getParent()),m.push(c.getNext())):c.remove().insertAfter(d):c.remove().insertBefore(d),d.getCustomData("blockquote_processed")||
(m.push(d),CKEDITOR.dom.element.setMarker(g,d,"blockquote_processed",!0)),e.push(c);CKEDITOR.dom.element.clearAllMarkers(g);for(b=m.length-1;0<=b;b--){d=m[b];a:{g=d;for(var c=0,a=g.getChildCount(),n=void 0;c<a&&(n=g.getChild(c));c++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){g=!1;break a}g=!0}g&&d.remove()}if(f.config.enterMode==CKEDITOR.ENTER_BR)for(d=!0;e.length;)if(c=e.shift(),"div"==c.getName()){b=new CKEDITOR.dom.documentFragment(f.document);!d||!c.getPrevious()||c.getPrevious().type==
CKEDITOR.NODE_ELEMENT&&c.getPrevious().isBlockBoundary()||b.append(f.document.createElement("br"));for(d=c.getNext()&&!(c.getNext().type==CKEDITOR.NODE_ELEMENT&&c.getNext().isBlockBoundary());c.getFirst();)c.getFirst().remove().appendTo(b);d&&b.append(f.document.createElement("br"));b.replace(c);d=!1}}k.selectBookmarks(l);f.focus()}},refresh:function(f,e){this.setState(f.elementPath(e.block||e.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",
requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(h){h.blockless||(h.addCommand("blockquote",f),h.ui.addButton&&h.ui.addButton("Blockquote",{label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),"use strict",function(){function f(e,f){CKEDITOR.tools.extend(this,f,{editor:e,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:e._.notificationArea});f.type||(this.type="info");this.element=this._createElement();e.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}
function h(e){var f=this;this.editor=e;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);e.on("destroy",function(){f._removeListeners();f.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(e){function f(d){var e=new CKEDITOR.dom.element("div");e.setStyles({position:"fixed","margin-left":"-9999px"});e.setAttributes({"aria-live":"assertive",
"aria-atomic":"true"});e.setText(d);CKEDITOR.document.getBody().append(e);setTimeout(function(){e.remove()},100)}e._.notificationArea=new h(e);e.showNotification=function(d,f,h){var b,g;"progress"==f?b=h:g=h;d=new CKEDITOR.plugins.notification(e,{message:d,type:f,progress:b,duration:g});d.show();return d};e.on("key",function(d){if(27==d.data.keyCode){var h=e._.notificationArea.notifications;h.length&&(f(e.lang.notification.closed),h[h.length-1].hide(),d.cancel())}})}});f.prototype={show:function(){!1!==
this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(e){var f=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:e})&&(f=!1);var d=this.element,h=d.findOne(".cke_notification_message"),m=d.findOne(".cke_notification_progress"),b=e.type;d.removeAttribute("role");e.progress&&"progress"!=this.type&&(b="progress");b&&(d.removeClass(this._getClass()),d.removeAttribute("aria-label"),this.type=b,d.addClass(this._getClass()),
d.setAttribute("aria-label",this.type),"progress"!=this.type||m?"progress"!=this.type&&m&&m.remove():(m=this._createProgressElement(),m.insertBefore(h)));void 0!==e.message&&(this.message=e.message,h.setHtml(this.message));void 0!==e.progress&&(this.progress=e.progress,m&&m.setStyle("width",this._getPercentageProgress()));f&&e.important&&(d.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=e.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",
{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var e=this,f,d,h=this.editor.lang.common.close;f=new CKEDITOR.dom.element("div");f.addClass("cke_notification");f.addClass(this._getClass());f.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&f.append(this._createProgressElement());d=new CKEDITOR.dom.element("p");d.addClass("cke_notification_message");d.setHtml(this.message);
f.append(d);d=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+h+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');f.append(d);d.on("click",function(){e.editor.focus();e.hide()});return f},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var e=new CKEDITOR.dom.element("span");e.addClass("cke_notification_progress");
e.setStyle("width",this._getPercentageProgress());return e},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var e=this,f;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)f=this.duration;else if("info"==this.type||"success"==this.type)f="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;f&&(e._hideTimeoutId=setTimeout(function(){e.hide()},f))}};h.prototype=
{add:function(e){this.notifications.push(e);this.element.append(e.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(e){var f=CKEDITOR.tools.indexOf(this.notifications,e);0>f||(this.notifications.splice(f,1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,f=e.config,d=new CKEDITOR.dom.element("div");d.addClass("cke_notifications_area");
d.setAttribute("id","cke_notifications_area_"+e.name);d.setStyle("z-index",f.baseFloatZIndex-2);return d},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),f=this.editor;e.on("scroll",this._uiBuffer.input);e.on("resize",this._uiBuffer.input);f.on("change",this._changeBuffer.input);f.on("floatingSpaceLayout",this._layout,this,null,20);f.on("blur",this._layout,this,null,20)},_removeListeners:function(){var e=CKEDITOR.document.getWindow(),f=this.editor;e.removeListener("scroll",this._uiBuffer.input);
e.removeListener("resize",this._uiBuffer.input);f.removeListener("change",this._changeBuffer.input);f.removeListener("floatingSpaceLayout",this._layout);f.removeListener("blur",this._layout)},_layout:function(){function e(){f.setStyle("left",u(x+h.width-n-w))}var f=this.element,d=this.editor,h=d.ui.contentsElement.getClientRect(),m=d.ui.contentsElement.getDocumentPosition(),b,g,c=f.getClientRect(),a,n=this._notificationWidth,w=this._notificationMargin;a=CKEDITOR.document.getWindow();var v=a.getScrollPosition(),
p=a.getViewPaneSize(),r=CKEDITOR.document.getBody(),q=r.getDocumentPosition(),u=CKEDITOR.tools.cssLength;n&&w||(a=this.element.getChild(0),n=this._notificationWidth=a.getClientRect().width,w=this._notificationMargin=parseInt(a.getComputedStyle("margin-left"),10)+parseInt(a.getComputedStyle("margin-right"),10));d.toolbar&&(b=d.ui.space("top"),g=b.getClientRect());b&&b.isVisible()&&g.bottom>h.top&&g.bottom<h.bottom-c.height?f.setStyles({position:"fixed",top:u(g.bottom)}):0<h.top?f.setStyles({position:"absolute",
top:u(m.y)}):m.y+h.height-c.height>v.y?f.setStyles({position:"fixed",top:0}):f.setStyles({position:"absolute",top:u(m.y+h.height-c.height)});var x="fixed"==f.getStyle("position")?h.left:"static"!=r.getComputedStyle("position")?m.x-q.x:m.x;h.width<n+w?m.x+n+w>v.x+p.width?e():f.setStyle("left",u(x)):m.x+n+w>v.x+p.width?f.setStyle("left",u(x)):m.x+h.width/2+n/2+w>v.x+p.width?f.setStyle("left",u(x-m.x+v.x+p.width-n-w)):0>h.left+h.width-n-w?e():0>h.left+h.width/2-n/2?f.setStyle("left",u(x-m.x+v.x)):f.setStyle("left",
u(x+h.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=f}(),function(){var f='\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&&(f+=
' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" 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 class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),f=f+'\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',
h=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),e=CKEDITOR.addTemplate("button",f);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(d){d.execCommand(e.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}};
CKEDITOR.ui.button.prototype={render:function(f,d){function l(){var a=f.mode;a&&(a=this.modes[a]?void 0!==m[a]?m[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=f.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var m=null,b=CKEDITOR.env,g=this._.id=CKEDITOR.tools.getNextId(),c="",a=this.command,n,w,v;this._.editor=f;var p={id:g,button:this,editor:f,focus:function(){CKEDITOR.document.getById(g).focus()},execute:function(){this.button.click(f)},
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())}),q=CKEDITOR.tools.addFunction(function(a){var b;p.onfocus&&(b=!1!==p.onfocus(p,new CKEDITOR.dom.event(a)));return b}),u=0;p.clickFn=n=CKEDITOR.tools.addFunction(function(){u&&(f.unlockSelection(1),u=0);p.execute();b.iOS&&f.focus()});this.modes?(m={},f.on("beforeModeUnload",function(){f.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[f.mode]=
this._.state)},this),f.on("activeFilterChange",l,this),f.on("mode",l,this),!this.readOnly&&f.on("readOnly",l,this)):a&&(a=f.getCommand(a))&&(a.on("state",function(){this.setState(a.state)},this),c+=a.state==CKEDITOR.TRISTATE_ON?"on":a.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var x;if(this.directional)f.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),c=b.getFirst();a=a.data;a!=f.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",
CKEDITOR.skin.getIconStyle(x,"rtl"==a,this.icon,this.iconOffset))},this);a?(w=f.getCommandKeystroke(a))&&(v=CKEDITOR.tools.keystrokeToString(f.lang.common.keyboard,w)):c+="off";w=this.name||this.command;var A=null,D=this.icon;x=w;this.icon&&!/\./.test(this.icon)?(x=this.icon,D=null):(this.icon&&(A=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(A=this.iconHiDpi));A?(CKEDITOR.skin.addIcon(A,A),D=null):A=x;c={id:g,name:w,iconName:x,label:this.label,cls:this.className||"",state:c,ariaDisabled:"disabled"==
c?"true":"false",title:this.title+(v?" ("+v.display+")":""),ariaShortcut:v?f.lang.common.keyboardShortcut+" "+v.aria:"",titleJs:b.gecko&&!b.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:r,focusFn:q,clickFn:n,style:CKEDITOR.skin.getIconStyle(A,"rtl"==f.lang.dir,D,this.iconOffset),arrowHtml:this.hasArrow?h.output():""};e.output(c,d);if(this.onRender)this.onRender();return p},setState:function(e){if(this._.state==e)return!1;this._.state=e;var d=CKEDITOR.document.getById(this._.id);
return d?(d.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?d.setAttribute("aria-pressed",!0):d.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature;
var d=this;this.allowedContent||this.requiredContent||!this.command||(d=e.getCommand(this.command)||d);return this._.feature=d}};CKEDITOR.ui.prototype.addButton=function(e,d){this.add(e,CKEDITOR.UI_BUTTON,d)}}(),function(){function f(d){function e(){for(var a=f(),c=CKEDITOR.tools.clone(d.config.toolbarGroups)||h(d),g=0;g<c.length;g++){var k=c[g];if("/"!=k){"string"==typeof k&&(k=c[g]={name:k});var l,q=k.groups;if(q)for(var u=0;u<q.length;u++)l=q[u],(l=a[l])&&b(k,l);(l=a[k.name])&&b(k,l)}}return c}
function f(){var a={},b,c,g;for(b in d.ui.items)c=d.ui.items[b],g=c.toolbar||"others",g=g.split(","),c=g[0],g=parseInt(g[1]||-1,10),a[c]||(a[c]=[]),a[c].push({name:b,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 b(a,b){if(b.length){a.items?a.items.push(d.ui.create("-")):a.items=[];for(var g;g=b.shift();)g="string"==typeof g?g:g.name,c&&-1!=CKEDITOR.tools.indexOf(c,g)||(g=d.ui.create(g))&&d.addFeature(g)&&
a.items.push(g)}}function g(a){var c=[],g,d,e;for(g=0;g<a.length;++g)d=a[g],e={},"/"==d?c.push(d):CKEDITOR.tools.isArray(d)?(b(e,CKEDITOR.tools.clone(d)),c.push(e)):d.items&&(b(e,CKEDITOR.tools.clone(d.items)),e.name=d.name,c.push(e));return c}var c=d.config.removeButtons,c=c&&c.split(","),a=d.config.toolbar;"string"==typeof a&&(a=d.config["toolbar_"+a]);return d.toolbar=a?g(a):e()}function h(d){return d._.toolbarGroups||(d._.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 e=function(){this.toolbars=[];this.focusCommandExecuted=!1};e.prototype.focus=function(){for(var d=0,e;e=this.toolbars[d++];)for(var f=
0,b;b=e.items[f++];)if(b.focus){b.focus();return}};var k={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(d){d.toolbox&&(d.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){d.toolbox.focus()},100):d.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(d){var h,m=function(b,g){var c,a="rtl"==d.lang.dir,e=d.config.toolbarGroupCycling,f=a?37:39,a=a?39:37,e=void 0===e||e;switch(g){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=
9==g?(c?c.next:b.toolbar.next)||d.toolbox.toolbars[0]:(c?c.previous:b.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1],c.items.length)for(b=c.items[h?c.items.length-1:0];b&&!b.focus;)(b=h?b.previous:b.next)||(c=0);b&&b.focus();return!1;case f:c=b;do c=c.next,!c&&e&&(c=b.toolbar.items[0]);while(c&&!c.focus);c?c.focus():m(b,9);return!1;case 40:return b.button&&b.button.hasArrow?b.execute():m(b,40==g?f:a),!1;case a:case 38:c=b;do c=c.previous,!c&&e&&(c=b.toolbar.items[b.toolbar.items.length-
1]);while(c&&!c.focus);c?c.focus():(h=1,m(b,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return d.focus(),!1;case 13:case 32:return b.execute(),!1}return!0};d.on("uiSpace",function(b){if(b.data.space==d.config.toolbarLocation){b.removeListener();d.toolbox=new e;var g=CKEDITOR.tools.getNextId(),c=['\x3cspan id\x3d"',g,'" class\x3d"cke_voice_label"\x3e',d.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+d.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',g,'" onmousedown\x3d"return false;"\x3e'],
g=!1!==d.config.toolbarStartupExpanded,a,h;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&c.push('\x3cspan class\x3d"cke_toolbox_main"'+(g?"\x3e":' style\x3d"display:none"\x3e'));for(var k=d.toolbox.toolbars,l=f(d),p=l.length,r=0;r<p;r++){var q,u=0,x,A=l[r],D="/"!==A&&("/"===l[r+1]||r==p-1),t;if(A)if(a&&(c.push("\x3c/span\x3e"),h=a=0),"/"===A)c.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{t=A.items||A;for(var B=0;B<t.length;B++){var y=t[B],z;if(y){var I=
function(a){a=a.render(d,c);E=u.items.push(a)-1;0<E&&(a.previous=u.items[E-1],a.previous.next=a);a.toolbar=u;a.onkey=m;a.onfocus=function(){d.toolbox.focusCommandExecuted||d.focus()}};if(y.type==CKEDITOR.UI_SEPARATOR)h=a&&y;else{z=!1!==y.canGroup;if(!u){q=CKEDITOR.tools.getNextId();u={id:q,items:[]};x=A.name&&(d.lang.toolbar.toolbarGroups[A.name]||A.name);c.push('\x3cspan id\x3d"',q,'" class\x3d"cke_toolbar'+(D?' cke_toolbar_last"':'"'),x?' aria-labelledby\x3d"'+q+'_label"':"",' role\x3d"toolbar"\x3e');
x&&c.push('\x3cspan id\x3d"',q,'_label" class\x3d"cke_voice_label"\x3e',x,"\x3c/span\x3e");c.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var E=k.push(u)-1;0<E&&(u.previous=k[E-1],u.previous.next=u)}z?a||(c.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),a=1):a&&(c.push("\x3c/span\x3e"),a=0);h&&(I(h),h=0);I(y)}}}a&&(c.push("\x3c/span\x3e"),h=a=0);u&&c.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}d.config.toolbarCanCollapse&&c.push("\x3c/span\x3e");
if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var F=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});d.on("destroy",function(){CKEDITOR.tools.removeFunction(F)});d.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),g=a.ui.space("contents"),d=c.getParent(),e=parseInt(g.$.style.height,10),f=d.$.offsetHeight,h=b.hasClass("cke_toolbox_collapser_min");h?(c.show(),b.removeClass("cke_toolbox_collapser_min"),
b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(h?"▲":"◀");g.setStyle("height",e-(d.$.offsetHeight-f)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:g.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});d.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");c.push('\x3ca title\x3d"'+
(g?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'" id\x3d"'+d.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');g||c.push(" cke_toolbox_collapser_min");c.push('" onclick\x3d"CKEDITOR.tools.callFunction('+F+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}c.push("\x3c/span\x3e");b.data.html+=c.join("")}});d.on("destroy",function(){if(this.toolbox){var b,g=0,c,a,d;for(b=this.toolbox.toolbars;g<b.length;g++)for(a=b[g].items,
c=0;c<a.length;c++)d=a[c],d.clickFn&&CKEDITOR.tools.removeFunction(d.clickFn),d.keyDownFn&&CKEDITOR.tools.removeFunction(d.keyDownFn)}});d.on("uiReady",function(){var b=d.ui.space("toolbox");b&&d.focusManager.add(b,1)});d.addCommand("toolbarFocus",k);d.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");d.ui.add("-",CKEDITOR.UI_SEPARATOR,{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(b,g){g.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');
return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(d,e,f){var b=h(this.editor),g=0===e,c={name:d};if(f){if(f=CKEDITOR.tools.search(b,function(a){return a.name==f})){!f.groups&&(f.groups=[]);if(e&&(e=CKEDITOR.tools.indexOf(f.groups,e),0<=e)){f.groups.splice(e+1,0,d);return}g?f.groups.splice(0,0,d):f.groups.push(d);return}e=null}e&&(e=CKEDITOR.tools.indexOf(b,function(a){return a.name==e}));g?b.splice(0,0,d):"number"==typeof e?b.splice(e+1,0,c):b.push(d)}}(),CKEDITOR.UI_SEPARATOR="separator",
CKEDITOR.config.toolbarLocation="top","use strict",function(){function f(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});return a.fire("paste",b)}function h(a){function b(){var c=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var g=function(b){a.getSelection().isCollapsed()||(a.readOnly&&
"cut"==b.name||z.initPasteDataTransfer(b,a),b.data.preventDefault())};c.on("copy",g);c.on("cut",g);c.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}c.on(z.mainPasteEvent,function(a){"beforepaste"==z.mainPasteEvent&&I||t(a)});"beforepaste"==z.mainPasteEvent&&(c.on("paste",function(a){E||(d(),a.data.preventDefault(),t(a),h("paste"))}),c.on("contextmenu",e,null,null,0),c.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||e()},null,null,0));c.on("beforecut",
function(){!I&&k(a)});var f;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){f=setTimeout(function(){B()},0)});a.on("destroy",function(){clearTimeout(f)});c.on("keyup",B)}function c(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&k();var b;var c=this.type;if(CKEDITOR.env.ie)b=h(c);else try{b=a.document.$.execCommand(c,!1,null)}catch(g){b=!1}b||a.showNotification(a.lang.clipboard[this.type+
"Error"]);return b}}}function g(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function c(b,e){e="undefined"!==typeof e?e:!0;b?(b.method="paste",b.dataTransfer||(b.dataTransfer=z.initPasteDataTransfer()),f(a,b,e)):d&&!a._.forcePasteDialog&&a.showNotification(k,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:g,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var g=this,d="undefined"!==typeof b.notification?
b.notification:!0,e=b.type,h=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),k="string"===typeof d?d: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;e&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=e:delete a._.nextPasteType;"string"===typeof h?c({dataValue:h}):a.getClipboardData(c)}}}function d(){E=1;setTimeout(function(){E=
0},100)}function e(){I=1;setTimeout(function(){I=0},10)}function h(b){var c=a.document,g=c.getBody(),d=!1,e=function(){d=!0};g.on(b,e);7<CKEDITOR.env.version?c.$.execCommand(b):c.$.selection.createRange().execCommand(b);g.removeListener(b,e);return d}function k(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,g,d;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())&&(g=b.getRanges()[0],d=a.document.createText(""),d.insertBefore(c),g.setStartBefore(d),g.setEndAfter(c),
b.selectRanges([g]),setTimeout(function(){c.getParent()&&(d.remove(),b.selectElement(c))},0))}}function l(b,c){var g=a.document,d=a.editable(),e=function(a){a.cancel()},f;if(!g.getById("cke_pastebin")){var h=a.getSelection(),k=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!d.is("body")||CKEDITOR.env.ie?"div":"body",g);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var m=0,g=g.getWindow();CKEDITOR.env.webkit?(d.append(n),
n.addClass("cke_editable"),d.is("body")||(m="static"!=d.getComputedStyle("position")?d:CKEDITOR.dom.element.get(d.$.offsetParent),m=m.getDocumentPosition().y)):d.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(n);n.setStyles({position:"absolute",top:g.getScrollPosition().y-m+10+"px",width:"1px",height:Math.max(1,g.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(m=n.getParent().isReadOnly())?
(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",e,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)f=d.once("blur",e,null,null,-100);m&&n.focus();m=new CKEDITOR.dom.range(n);m.selectNodeContents(n);var q=m.select();CKEDITOR.env.ie&&(f=d.once("blur",function(){a.lockSelection(q)}));var r=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=
r);f&&f.removeListener();CKEDITOR.env.ie&&d.focus();h.selectBookmarks(k);n.remove();var b;CKEDITOR.env.webkit&&(b=n.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&(n=b);a.removeListener("selectionChange",e);c(n.getHtml())},0)}}function m(){if("paste"==z.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();d();var b=a.focusManager;b.lock();if(a.editable().fire(z.mainPasteEvent)&&!h("paste"))return b.unlock(),!1;b.unlock();return!0}function D(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+
86:case CKEDITOR.SHIFT+45:b=a.editable();d();"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 t(b){var c={type:"auto",method:"paste",dataTransfer:z.initPasteDataTransfer(b)};c.dataTransfer.cacheData();var g=!1!==a.fire("beforePaste",c);g&&z.canClipboardApiBeTrusted(c.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){f(a,c)},0)):l(b,function(b){c.dataValue=
b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");g&&f(a,c)})}function B(){if("wysiwyg"==a.mode){var b=y("paste");a.getCommand("cut").setState(y("cut"));a.getCommand("copy").setState(y("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function y(b){if(F&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();var c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:
CKEDITOR.TRISTATE_OFF}var z=CKEDITOR.plugins.clipboard,I=0,E=0,F=0;(function(){a.on("key",D);a.on("contentDom",b);a.on("selectionChange",function(a){F=a.data.selection.getRanges()[0].checkReadOnly();B()});if(a.contextMenu){a.contextMenu.addListener(function(a,b){F=b.getRanges()[0].checkReadOnly();return{cut:y("cut"),copy:y("copy"),paste:y("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend",
function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))CKEDITOR.document.getById(b._.id).on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,g,d,e,f){var h=a.lang.clipboard[g];a.addCommand(g,d);a.ui.addButton&&a.ui.addButton(c,{label:h,command:g,toolbar:"clipboard,"+e});a.addMenuItems&&a.addMenuItem(g,{label:h,command:g,group:"clipboard",
order:f})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",g(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,c){function g(a){a.removeListener();a.cancel();c(a.data)}function d(a){a.removeListener();a.cancel();c({type:f,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var e=!1,f="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();e=!0;f=a.data.type},null,
null,1E3);a.on("paste",g,null,null,0);!1===m()&&(a.removeListener("paste",g),a._.forcePasteDialog&&e&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",d),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",d);a.data._.committed||c(null)})):c(null))}}function e(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 k(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),
b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return m(a,b)}function d(){function a(){var a=
{},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var b={};return{get:function(c){return"plain-text"==c?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=b.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),c=b.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function l(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var g=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,
a.activeEnterMode);b.writeHtml(g);return g.getHtml()}function m(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 b(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function g(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,g,d){g.select();f(a,{dataTransfer:d,
method:"drop"},1);d.sourceEditor.fire("saveSnapshot");d.sourceEditor.editable().extractHtmlFromRange(b);d.sourceEditor.getSelection().selectRanges([b]);d.sourceEditor.fire("saveSnapshot")}function g(c,d){c.select();f(a,{dataTransfer:d,method:"drop"},1);b.resetDragDataTransfer()}function d(b,c,g){var e={$:b.data.$,target:b.data.getTarget()};c&&(e.dragRange=c);g&&(e.dropRange=g);!1===a.fire(b.name,e)&&b.data.preventDefault()}function e(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
var h=a.editable(),k=CKEDITOR.plugins.clipboard.getDropTarget(a),l=a.ui.space("top"),m=a.ui.space("bottom");b.preventDefaultDropOnElement(l);b.preventDefaultDropOnElement(m);h.attachListener(k,"dragstart",d);h.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);h.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);h.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=
c?e(c.startContainer):null,b.dragEndContainerChildCount=c?e(c.endContainer):null)},null,null,100);h.attachListener(k,"dragend",d);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(c){if(!c.data.$.defaultPrevented){c.data.preventDefault();var g=c.data.getTarget();if(!g.isReadOnly()||g.type==CKEDITOR.NODE_ELEMENT&&g.is("html")){var g=b.getRangeAtDropPosition(c,a),e=b.dragRange;g&&d(c,e,g)}}},null,null,9999);h.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);h.attachListener(a,"drop",function(d){if(d=d.data){var e=d.dropRange,f=d.dragRange,h=d.dataTransfer;h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?
setTimeout(function(){b.internalDrop(f,e,h,a)},0):h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,e,h):g(e,h)}},null,null,9999)})}var c;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){var b,c=d();a.config.forcePasteAsPlainText?b="plain-text":a.config.pasteFilter?b=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(b="semantic-content");a.pasteFilter=c.get(b);h(a);g(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+
"dialogs/paste.js"));if(CKEDITOR.env.gecko){var f=["image/png","image/jpeg","image/gif"],m;a.on("paste",function(b){var c=b.data,g=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&g&&1==g.getFilesCount()&&m!=g.id&&(g=g.getFile(0),-1!=CKEDITOR.tools.indexOf(f,g.type))){var d=new FileReader;d.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+d.result+'" /\x3e';a.fire("paste",b.data)},!1);d.addEventListener("abort",function(){a.fire("paste",b.data)},!1);d.addEventListener("error",
function(){a.fire("paste",b.data)},!1);d.readAsDataURL(g);m=c.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 c=b.data.dataTransfer,g=c.getData("text/html");if(g)b.data.dataValue=g,b.data.type="html";else if(g=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(g),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,
c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space">&nbsp;<\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));
if(b.match(/^<[^<]+cke_(editable|contents)/i)){var g,d,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(g=e.getFirst())&&g.type==CKEDITOR.NODE_ELEMENT&&(g.hasClass("cke_editable")||g.hasClass("cke_contents"));)e=d=g;d&&(b=d.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,g){return g.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+g):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,g){return g in
c?(a.data.endsWithEOL=1,"\x3c/"+g+"\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 g=a._.nextPasteType||b.type,d=b.dataValue,f,h=a.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;f="html"==g||"html"==b.preSniffing?"html":e(d);delete a._.nextPasteType;"htmlifiedtext"==f&&(d=k(a.config,d));if("text"==g&&"html"==f)d=
l(a,d,c.get("plain-text"));else if(m&&a.pasteFilter&&!b.dontFilter||n)d=l(a,d,a.pasteFilter);b.startsWithEOL&&(d='\x3cbr data-cke-eol\x3d"1"\x3e'+d);b.endsWithEOL&&(d+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==g&&(g="html"==f||"html"==h?"html":"text");b.type=g;b.dataValue=d;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,c){a.ui.addButton&&(a.ui.addButton(b,c),a._.pasteButtons||
(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,
b,c,g){function d(a,c,g){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(c)&&g!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(g=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,g),b.collapse(!0)),!0}var e=b.startContainer;"number"==typeof g&&"number"==typeof c&&e.type==CKEDITOR.NODE_ELEMENT&&(d(a.startContainer,e,c)||d(a.endContainer,
e,g))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,g=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=g||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<g||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<g?!0:!1},internalDrop:function(a,b,c,g){var d=CKEDITOR.plugins.clipboard,e=g.editable(),h,k;g.fire("saveSnapshot");g.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,d.dragStartContainerChildCount,
d.dragEndContainerChildCount);(k=this.isDropRangeAffectedByDragRange(a,b))||(h=a.createBookmark(!1));d=b.clone().createBookmark(!1);k&&(h=a.createBookmark(!1));a=h.startNode;b=h.endNode;k=d.startNode;b&&a.getPosition(k)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(k)&CKEDITOR.POSITION_FOLLOWING&&k.insertBefore(a);a=g.createRange();a.moveToBookmark(h);e.extractHtmlFromRange(a,1);b=g.createRange();b.moveToBookmark(d);f(g,{dataTransfer:c,method:"drop",range:b},1);g.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,
b){var c=a.data.$,g=c.clientX,d=c.clientY,e=b.getSelection(!0).getRanges()[0],f=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(g,d))c=b.document.$.caretRangeFromPoint(g,d),f.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),f.collapse(!0);else if(c.rangeParent)f.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&e&&b.editable().hasFocus)return e;
if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var h=!1,k=0;20>k&&!h;k++){if(!h)try{c.moveToPoint(g,d-k),h=!0}catch(l){}if(!h)try{c.moveToPoint(g,d+k),h=!0}catch(m){}}if(h){var t="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+t+'"\x3e​\x3c/span\x3e');var B=b.document.getById(t);f.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START);B.remove()}else{var y=b.document.$.elementFromPoint(g,d),z=new CKEDITOR.dom.element(y),I;if(z.equals(b.editable())||
"html"==z.getName())return e&&e.startContainer&&!e.startContainer.equals(b.editable())?e:null;I=z.getClientRect();g<I.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 c=a.data.$?a.data.$.dataTransfer:null,g=new this.dataTransfer(c,b);"dragstart"===a.name&&g.storeId();c?this.dragData&&g.id==this.dragData.id?g=this.dragData:this.dragData=g:this.dragData?
g=this.dragData:this.dragData=g;a.data.dataTransfer=g},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var c=a.data.$.clipboardData,g=new this.dataTransfer(c,b);"copy"!==a.name&&"cut"!==a.name||g.storeId();this.copyCutData&&g.id==this.copyCutData.id?(g=this.copyCutData,g.$=c):this.copyCutData=g;return g}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",b)}};c=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(c);this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==c||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype=
{getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(g){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var d=c.indexOf("\x3c/html\x3e"),c=-1!==d?c.substring(0,d+7):c;return c},
setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==c&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(g){}},storeId:function(){"Text"!==c&&this.setData(c,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==
a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(a){a=b._.normalizeType(a);var c=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a,!0),c=b._stripHtml(c));c&&(b._.data[a]=c)}if(this.$){var b=this,c,g;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");g=this._getImageFromClipboard();if(this.$&&this.$.files||
g){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&g&&this._.files.push(g)}}},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 g=0;g<this.$.types.length;g++)a[this.$.types[g]]=1}else a.Text=1,a.URL=1;"Text"!=c&&(a[c]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},_getImageFromClipboard:function(){var a;if(this.$&&this.$.items&&this.$.items[0])try{if((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;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1;return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),
g=null,g=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==g?g:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var g=b,d=this._dataTransfer.$;try{d.setData(a,g),c&&(this._dataTransfer._.nativeHtmlCache=g)}catch(e){if(this._isUnsupportedMimeTypeError(e)){c=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);
var c=this._getFallbackTypeContent(),f=this._getFallbackTypeData();f[a]=g;try{g=this._applyDataComment(c,f),d.setData(this._customDataFallbackType,g),this._dataTransfer._.nativeHtmlCache=g}catch(h){g=""}}}return g},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(g){return null}},_getFallbackTypeContent:function(){var a=this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,
!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||
""};if(a&&16<a.length){var c;(c=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&c[1]&&(b.data=JSON.parse(decodeURIComponent(c[1])),b.content=a.replace(c[0],""))}return b},_applyDataComment:function(a,b){var c="";b&&CKEDITOR.tools.objectKeys(b).length&&(c="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return c+(a&&a.length?a:"")}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,function(){CKEDITOR.plugins.add("panel",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});
CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(e,d){d&&CKEDITOR.tools.extend(this,d);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=e;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(e){return new CKEDITOR.ui.panel(e)}};var f=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),
h=CKEDITOR.addTemplate("panel-frame",'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),e=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(k,
d){this.getHolderElement=function(){var b=this._.holder;if(!b){if(this.isFramed){var b=this.document.getById(this.id+"_frame"),g=b.getParent(),b=b.getFrameDocument();CKEDITOR.env.iOS&&g.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});g=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));b.write(e.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+
g+");"},l)));b.getWindow().$.CKEDITOR=CKEDITOR;b.on("keydown",function(b){var a=b.data.getKeystroke(),g=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(a)?b.data.preventDefault():(27==a||a==("rtl"==g?39:37))&&this.onEscape&&!1===this.onEscape(a)&&b.data.preventDefault()},this);b=b.getBody();b.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(g)}else b=this.document.getById(this.id);this._.holder=b}return b};var l={editorId:k.id,id:this.id,langCode:k.langCode,
dir:k.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":k.config.baseFloatZIndex+1};if(this.isFramed){var m=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";l.frame=h.output({id:this.id+"_frame",src:m})}m=f.output(l);d&&d.push(m);return m},addBlock:function(e,d){d=this._.blocks[e]=d instanceof CKEDITOR.ui.panel.block?d:new CKEDITOR.ui.panel.block(this.getHolderElement(),
d);this._.currentBlock||this.showBlock(e);return d},getBlock:function(e){return this._.blocks[e]},showBlock:function(e){e=this._.blocks[e];var d=this._.currentBlock,f=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");d&&d.hide();this._.currentBlock=e;CKEDITOR.fire("ariaWidget",f);e._.focusIndex=-1;this._.onKeyDown=e.onKeyDown&&CKEDITOR.tools.bind(e.onKeyDown,e);e.show();return e},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=
CKEDITOR.tools.createClass({$:function(e,d){this.element=e.append(e.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));d&&CKEDITOR.tools.extend(this,d);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(e){-1!=e&&(e=this.element.getElementsByTag("a").getItem(this._.focusIndex=
e),CKEDITOR.env.webkit&&e.getDocument().getWindow().focus(),e.focus(),this.onMark&&this.onMark(e))},markFirstDisplayed:function(e){for(var d=function(b){return b.type==CKEDITOR.NODE_ELEMENT&&"none"==b.getStyle("display")},f=this._.getItems(),h,b,g=f.count()-1;0<=g;g--)if(h=f.getItem(g),h.getAscendant(d)||(b=h,this._.focusIndex=g),"true"==h.getAttribute("aria-selected")){b=h;this._.focusIndex=g;break}b&&(e&&e(),CKEDITOR.env.webkit&&b.getDocument().getWindow().focus(),b.focus(),this.onMark&&this.onMark(b))},
getItems:function(){return this.element.getElementsByTag("a")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(e,d){var f=this.keys[e];switch(f){case "next":for(var h=this._.focusIndex,f=this.element.getElementsByTag("a"),b;b=f.getItem(++h);)if(b.getAttribute("_cke_focus")&&b.$.offsetWidth){this._.focusIndex=h;b.focus();break}return b||d?!1:(this._.focusIndex=-1,this.onKeyDown(e,
1));case "prev":h=this._.focusIndex;for(f=this.element.getElementsByTag("a");0<h&&(b=f.getItem(--h));){if(b.getAttribute("_cke_focus")&&b.$.offsetWidth){this._.focusIndex=h;b.focus();break}b=null}return b||d?!1:(this._.focusIndex=f.count(),this.onKeyDown(e,1));case "click":case "mouseup":return h=this._.focusIndex,(b=0<=h&&this.element.getElementsByTag("a").getItem(h))&&(b.$[f]?b.$[f]():b.$["on"+f]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function f(e,
f,d,l,m){m=CKEDITOR.tools.genKey(f.getUniqueId(),d.getUniqueId(),e.lang.dir,e.uiColor||"",l.css||"",m||"");var b=h[m];b||(b=h[m]=new CKEDITOR.ui.panel(f,l),b.element=d.append(CKEDITOR.dom.element.createFromHtml(b.render(e),f)),b.element.setStyles({display:"none",position:"absolute"}));return b}var h={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,h,d,l){function m(){a.hide()}d.forceIFrame=1;d.toolbarRelated&&e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h=CKEDITOR.document.getById("cke_"+
e.name));var b=h.getDocument();l=f(e,b,h,d,l||0);var g=l.element,c=g.getFirst(),a=this;g.disableContextMenu();this.element=g;this._={editor:e,panel:l,parentElement:h,definition:d,document:b,iframe:c,children:[],dir:e.lang.dir,showBlockParams:null};e.on("mode",m);e.on("resize",m);b.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(e,f){return this._.panel.addBlock(e,f)},addListBlock:function(e,f){return this._.panel.addListBlock(e,f)},getBlock:function(e){return this._.panel.getBlock(e)},
showBlock:function(e,f,d,h,m,b){var g=this._.panel,c=g.showBlock(e);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),w=n.getDocument(),v=this._.parentElement.getPositionedAncestor(),p=f.getDocumentPosition(w),w=v?v.getDocumentPosition(w):
{x:0,y:0},r="rtl"==this._.dir,q=p.x+(h||0)-w.x,u=p.y+(m||0)-w.y;!r||1!=d&&4!=d?r||2!=d&&3!=d||(q+=f.$.offsetWidth-1):q+=f.$.offsetWidth;if(3==d||4==d)u+=f.$.offsetHeight-1;this._.panel._.offsetParentId=f.getId();n.setStyles({top:u+"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(c.autoSize){var d=c.element.getDocument(),d=(CKEDITOR.env.webkit||CKEDITOR.env.edge?c.element:d.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",d+10+"px");d=c.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<d&&(d+=(a.$.offsetHeight||0)-(a.$.clientHeight||
0)+3);a.setStyle("height",d+"px");g._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");r&&(q-=n.$.offsetWidth);n.setStyle("left",q+"px");var d=g.element.getWindow(),a=n.$.getBoundingClientRect(),d=d.getViewPaneSize(),e=a.width||a.right-a.left,f=a.height||a.bottom-a.top,h=r?a.right:d.width-a.left,k=r?d.width-a.right:a.left;r?h<e&&(q=k>e?q+e:d.width>e?q-a.left:q-a.right+d.width):h<e&&(q=k>e?q-e:d.width>e?q-a.right+d.width:q-a.left);e=a.top;d.height-
a.top<f&&(u=e>f?u-f:d.height>f?u-a.bottom+d.height:u-a.top);CKEDITOR.env.ie&&(d=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==d.getName()&&(d=d.getDocument().getBody()),"rtl"==d.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*n.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:u+"px",left:q+"px"});n.setOpacity(1);
b&&b()},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();c.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed()},0):c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed();this._.editor.fire("panelShow",this)},
0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused=
e)},hide:function(e){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(e=e&&this._.returnFocus)CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(e){var f=this._.panel;
void 0!==e&&(f.allowBlur=e);return f.allowBlur},showAsChild:function(e,f,d,h,m,b){if(this._.activeChild!=e||e._.panel._.offsetParentId!=d.getId())this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(f,d,h,m,b),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(e){var f=
this._.activeChild;f&&(delete f.onHide,delete this._.activeChild,f.hide(),e&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var e=CKEDITOR.tools.isEmpty(CKEDITOR.instances),f;for(f in h){var d=h[f];e?d.destroy():d.element.hide()}e&&(h={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(f){for(var h=f.config.menu_groups.split(","),e=f._.menuGroups={},k=f._.menuItems={},d=0;d<h.length;d++)e[h[d]]=d+1;f.addMenuGroup=function(d,f){e[d]=f||100};f.addMenuItem=function(d,
f){e[f.group]&&(k[d]=new CKEDITOR.menuItem(this,d,f))};f.addMenuItems=function(d){for(var e in d)this.addMenuItem(e,d[e])};f.getMenuItem=function(d){return k[d]};f.removeMenuItem=function(d){delete k[d]}}}),function(){function f(d){d.sort(function(d,b){return d.group<b.group?-1:d.group>b.group?1:d.order<b.order?-1:d.order>b.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"';
CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var h=h+(' 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'),e=CKEDITOR.addTemplate("menuItem",
h+'\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'),k=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),
d=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(d,e){e=this._.definition=e||{};this.id=CKEDITOR.tools.getNextId();this.editor=d;this.items=[];this._.listeners=[];this._.level=e.level||1;var b=CKEDITOR.tools.extend({},e.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),g=b.block.attributes=b.attributes||{};!g.role&&(g.role="menu");this._.panelDefinition=
b},_:{onShow:function(){var d=this.editor.getSelection(),e=d&&d.getStartElement(),b=this.editor.elementPath(),g=this._.listeners;this.removeAll();for(var c=0;c<g.length;c++){var a=g[c](e,d,b);if(a)for(var f in a){var h=this.editor.getMenuItem(f);!h||h.command&&!this.editor.getCommand(h.command).state||(h.state=a[f],this.add(h))}}},onClick:function(d){this.hide();if(d.onClick)d.onClick();else d.command&&this.editor.execCommand(d.command)},onEscape:function(d){var e=this.parent;e?e._.panel.hideChild(1):
27==d&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(d){var e=this._.subMenu,b=this.items[d];if(b=b.getItems&&b.getItems()){e?e.removeAll():(e=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),e.parent=this,e._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var g in b){var c=this.editor.getMenuItem(g);c&&(c.state=b[g],e.add(c))}var a=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
String(d));setTimeout(function(){e.show(a,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(d){d.order||(d.order=this.items.length);this.items.push(d)},removeAll:function(){this.items=[]},show:function(d,e,b,g){if(!this.parent&&(this._.onShow(),!this.items.length))return;e=e||("rtl"==this.editor.lang.dir?2:1);var c=this.items,a=this.editor,h=this._.panel,k=this._.element;if(!h){h=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
h.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);h.onShow=function(){h._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};h.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);k=h.addBlock(this.id,this._.panelDefinition.block);k.autoSize=!0;var v=k.keys;v[40]="next";v[9]="next";v[38]="prev";v[CKEDITOR.SHIFT+9]="prev";v["rtl"==a.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";v[32]=CKEDITOR.env.ie?"mouseup":
"click";CKEDITOR.env.ie&&(v[13]="mouseup");k=this._.element=k.element;v=k.getDocument();v.getBody().setStyle("overflow","hidden");v.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)}f(c);for(var v=a.elementPath(),v=['\x3cdiv class\x3d"cke_menu'+(v&&v.direction()!=a.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],p=c.length,r=p&&c[0].group,q=0;q<p;q++){var u=c[q];r!=u.group&&(v.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),
r=u.group);u.render(this,q,v)}v.push("\x3c/div\x3e");k.setHtml(v.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,d,e,b,g):h.showBlock(this.id,d,e,b,g);a.fire("menuShow",[h])},addListener:function(d){this._.listeners.push(d)},hide:function(d){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(d)},findItemByCommandName:function(d){var e=CKEDITOR.tools.array.filter(this.items,function(b){return d===b.command});return e.length?(e=e[0],{item:e,
element:this._.element.findOne("."+e.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(d,e,b){CKEDITOR.tools.extend(this,b,{order:0,className:"cke_menubutton__"+e});this.group=d._.menuGroups[this.group];this.editor=d;this.name=e},proto:{render:function(f,h,b){var g=f.id+String(h),c="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,a="",n=this.editor,w,v,p=c==CKEDITOR.TRISTATE_ON?"on":c==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,
menuitemradio:1}&&(a=' aria-checked\x3d"'+(c==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var r=this.getItems,q="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",u=this.name;this.icon&&!/\./.test(this.icon)&&(u=this.icon);this.command&&(w=n.getCommand(this.command),(w=n.getCommandKeystroke(w))&&(v=CKEDITOR.tools.keystrokeToString(n.lang.common.keyboard,w)));f={id:g,name:this.name,iconName:u,label:this.label,cls:this.className||"",state:p,hasPopup:r?"true":"false",disabled:c==CKEDITOR.TRISTATE_DISABLED,
title:this.label+(v?" ("+v.display+")":""),ariaShortcut:v?n.lang.common.keyboardShortcut+" "+v.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:f._.itemOverFn,moveOutFn:f._.itemOutFn,clickFn:f._.itemClickFn,index:h,iconStyle:CKEDITOR.skin.getIconStyle(u,"rtl"==this.editor.lang.dir,u==this.icon?null:this.icon,this.iconOffset),shortcutHtml:v?d.output({shortcut:v.display}):"",arrowHtml:r?k.output({label:q}):"",role:this.role?this.role:"menuitem",ariaChecked:a};e.output(f,b)}}})}(),
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(f){this.base.call(this,f,{panel:{className:"cke_menu_panel",attributes:{"aria-label":f.lang.contextmenu.options}}})},proto:{addTarget:function(f,
h){f.on("contextmenu",function(d){d=d.data;var f=CKEDITOR.env.webkit?e:CKEDITOR.env.mac?d.$.metaKey:d.$.ctrlKey;if(!h||!f){d.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var f=this.editor,k=(new CKEDITOR.dom.elementPath(d.getTarget(),f.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);k&&"false"==k.getAttribute("contenteditable")&&f.getSelection().fake(k)}var k=d.getTarget().getDocument(),b=d.getTarget().getDocument().getDocumentElement(),f=!k.equals(CKEDITOR.document),
k=k.getWindow().getScrollPosition(),g=f?d.$.clientX:d.$.pageX||k.x+d.$.clientX,c=f?d.$.clientY:d.$.pageY||k.y+d.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(b,null,g,c)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var e,k=function(){e=0};f.on("keydown",function(d){e=CKEDITOR.env.mac?d.data.$.metaKey:d.data.$.ctrlKey});f.on("keyup",k);f.on("contextmenu",k)}},open:function(f,h,e,k){!1!==this.editor.config.enableContextMenu&&(this.editor.focus(),f=f||CKEDITOR.document.getDocumentElement(),
this.editor.selectionChange(1),this.show(f,h,e,k))}}})},beforeInit:function(f){var h=f.contextMenu=new CKEDITOR.plugins.contextMenu(f);f.on("contentDom",function(){h.addTarget(f.editable(),!1!==f.config.browserContextMenuOnCtrl)});f.addCommand("contextMenu",{exec:function(){f.contextMenu.open(f.document.getBody())}});f.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");f.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function f(d,e){function f(b){b=a.list[b];var c;b.equals(d.editable())||
"true"==b.getAttribute("contenteditable")?(c=d.createRange(),c.selectNodeContents(b),c=c.select()):(c=d.getSelection(),c.selectElement(b));CKEDITOR.env.ie&&d.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(b)});d.focus()}function b(){c&&c.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete a.list}var g=d.ui.spaceId("path"),c,a=d._.elementsPath,n=a.idBase;e.html+='\x3cspan id\x3d"'+g+'_label" class\x3d"cke_voice_label"\x3e'+d.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';d.on("uiReady",function(){var a=d.ui.space("path");a&&d.focusManager.add(a,1)});a.onClick=f;var w=CKEDITOR.tools.addFunction(f),v=CKEDITOR.tools.addFunction(function(b,c){var g=a.idBase,e;c=new CKEDITOR.dom.event(c);e="rtl"==d.lang.dir;switch(c.getKeystroke()){case e?39:37:case 9:return(e=CKEDITOR.document.getById(g+
(b+1)))||(e=CKEDITOR.document.getById(g+"0")),e.focus(),!1;case e?37:39:case CKEDITOR.SHIFT+9:return(e=CKEDITOR.document.getById(g+(b-1)))||(e=CKEDITOR.document.getById(g+(a.list.length-1))),e.focus(),!1;case 27:return d.focus(),!1;case 13:case 32:return f(b),!1}return!0});d.on("selectionChange",function(b){for(var e=[],f=a.list=[],h=[],l=a.filters,m=!0,D=b.data.path.elements,t=D.length;t--;){var B=D[t],y=0;b=B.data("cke-display-name")?B.data("cke-display-name"):B.data("cke-real-element-type")?B.data("cke-real-element-type"):
B.getName();(m=B.hasAttribute("contenteditable")?"true"==B.getAttribute("contenteditable"):m)||B.hasAttribute("contenteditable")||(y=1);for(var z=0;z<l.length;z++){var I=l[z](B,b);if(!1===I){y=1;break}b=I||b}y||(f.unshift(B),h.unshift(b))}f=f.length;for(l=0;l<f;l++)b=h[l],m=d.lang.elementspath.eleTitle.replace(/%1/,b),b=k.output({id:n+l,label:m,text:b,jsTitle:"javascript:void('"+b+"')",index:l,keyDownFn:v,clickFn:w}),e.unshift(b);c||(c=CKEDITOR.document.getById(g));h=c;h.setHtml(e.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');
d.fire("elementsPathUpdate",{space:h})});d.on("readOnly",b);d.on("contentDomUnload",b);d.addCommand("elementsPathFocus",h.toolbarFocus);d.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var h={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(d){(d=CKEDITOR.document.getById(d._.elementsPath.idBase+"0"))&&d.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},e="";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 k=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+e+' hidefocus\x3d"true"  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(d){d._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+
"_",filters:[]};d.on("uiSpace",function(e){"bottom"==e.data.space&&f(d,e.data)})}})}(),function(){function f(c,a,g){g=c.config.forceEnterMode||g;if("wysiwyg"==c.mode){a||(a=c.activeEnterMode);var d=c.elementPath();d&&!d.isContextFor("p")&&(a=CKEDITOR.ENTER_BR,g=1);c.fire("saveSnapshot");a==CKEDITOR.ENTER_BR?m(c,a,null,g):b(c,a,null,g);c.fire("saveSnapshot")}}function h(b){b=b.getSelection().getRanges(!0);for(var a=b.length-1;0<a;a--)b[a].deleteContents();return b[0]}function e(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){f(a)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){f(a,a.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var k=CKEDITOR.dom.walker.whitespaces(),d=
CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(b,a,f,l){if(f=f||h(b)){f=e(f);var v=f.document,p=f.checkStartOfBlock(),r=f.checkEndOfBlock(),q=b.elementPath(f.startContainer),u=q.block,x=a==CKEDITOR.ENTER_DIV?"div":"p",A;if(p&&r){if(u&&(u.is("li")||u.getParent().is("li"))){u.is("li")||(u=u.getParent());f=u.getParent();A=f.getParent();l=!u.hasPrevious();var D=!u.hasNext(),x=b.getSelection(),t=x.createBookmarks(),p=u.getDirection(1),r=u.getAttribute("class"),B=u.getAttribute("style"),
y=A.getDirection(1)!=p;b=b.enterMode!=CKEDITOR.ENTER_BR||y||B||r;if(A.is("li"))l||D?(l&&D&&f.remove(),u[D?"insertAfter":"insertBefore"](A)):u.breakParent(A);else{if(b)if(q.block.is("li")?(A=v.createElement(a==CKEDITOR.ENTER_P?"p":"div"),y&&A.setAttribute("dir",p),B&&A.setAttribute("style",B),r&&A.setAttribute("class",r),u.moveChildren(A)):A=q.block,l||D)A[l?"insertBefore":"insertAfter"](f);else u.breakParent(f),A.insertAfter(f);else if(u.appendBogus(!0),l||D)for(;v=u[l?"getFirst":"getLast"]();)v[l?
"insertBefore":"insertAfter"](f);else for(u.breakParent(f);v=u.getLast();)v.insertAfter(f);u.remove()}x.selectBookmarks(t);return}if(u&&u.getParent().is("blockquote")){u.breakParent(u.getParent());u.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||u.getPrevious().remove();u.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||u.getNext().remove();f.moveToElementEditStart(u);f.select();return}}else if(u&&u.is("pre")&&!r){m(b,a,f,l);return}if(p=f.splitBlock(x)){a=p.previousBlock;u=p.nextBlock;
q=p.wasStartOfBlock;b=p.wasEndOfBlock;u?(t=u.getParent(),t.is("li")&&(u.breakParent(t),u.move(u.getNext(),1))):a&&(t=a.getParent())&&t.is("li")&&(a.breakParent(t),t=a.getNext(),f.moveToElementEditStart(t),a.move(a.getPrevious()));if(q||b){if(a){if(a.is("li")||!g.test(a.getName())&&!a.is("pre"))A=a.clone()}else u&&(A=u.clone());A?l&&!A.is("li")&&A.renameNode(x):t&&t.is("li")?A=t:(A=v.createElement(x),a&&(D=a.getDirection())&&A.setAttribute("dir",D));if(v=p.elementPath)for(l=0,x=v.elements.length;l<
x;l++){t=v.elements[l];if(t.equals(v.block)||t.equals(v.blockLimit))break;CKEDITOR.dtd.$removeEmpty[t.getName()]&&(t=t.clone(),A.moveChildren(t),A.append(t))}A.appendBogus();A.getParent()||f.insertNode(A);A.is("li")&&A.removeAttribute("value");!CKEDITOR.env.ie||!q||b&&a.getChildCount()||(f.moveToElementEditStart(b?a:A),f.select());f.moveToElementEditStart(q&&!b?u:A)}else u.is("li")&&(A=f.clone(),A.selectNodeContents(u),A=new CKEDITOR.dom.walker(A),A.evaluator=function(a){return!(d(a)||k(a)||a.type==
CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(t=A.next())&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?v.createElement("br"):v.createText(" ")).insertBefore(t)),u&&f.moveToElementEditStart(u);f.select();f.scrollIntoView()}}},enterBr:function(c,a,d,e){if(d=d||h(c)){var f=d.document,k=d.checkEndOfBlock(),l=new CKEDITOR.dom.elementPath(c.getSelection().getStartElement()),m=l.block,u=m&&l.block.getName();e||"li"!=u?(!e&&
k&&g.test(u)?(k=m.getDirection())?(f=f.createElement("div"),f.setAttribute("dir",k),f.insertAfter(m),d.setStart(f,0)):(f.createElement("br").insertAfter(m),CKEDITOR.env.gecko&&f.createText("").insertAfter(m),d.setStartAt(m.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(c="pre"==u&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?f.createText("\r"):f.createElement("br"),d.deleteContents(),d.insertNode(c),CKEDITOR.env.needsBrFiller?(f.createText("﻿").insertAfter(c),
k&&(m||l.blockLimit).appendBogus(),c.getNext().$.nodeValue="",d.setStartAt(c.getNext(),CKEDITOR.POSITION_AFTER_START)):d.setStartAt(c,CKEDITOR.POSITION_AFTER_END)),d.collapse(!0),d.select(),d.scrollIntoView()):b(c,a,d,e)}}};var l=CKEDITOR.plugins.enterkey,m=l.enterBr,b=l.enterBlock,g=/^h[1-6]$/}(),function(){function f(f,e){var k={},d=[],l={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};f=f.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,a){var g=e?"\x26"+a+";":l[a];
k[g]=e?l[a]:"\x26"+a+";";d.push(g);return""});if(!e&&f){f=f.split(",");var m=document.createElement("div"),b;m.innerHTML="\x26"+f.join(";\x26")+";";b=m.innerHTML;m=null;for(m=0;m<b.length;m++){var g=b.charAt(m);k[g]="\x26"+f[m]+";";d.push(g)}}k.regex=d.join(e?"|":"");return k}CKEDITOR.plugins.add("entities",{afterInit:function(h){function e(a){return g[a]}function k(a){return"force"!=d.entities_processNumerical&&m[a]?m[a]:"\x26#"+a.charCodeAt(0)+";"}var d=h.config;if(h=(h=h.dataProcessor)&&h.htmlFilter){var l=
[];!1!==d.basicEntities&&l.push("nbsp,gt,lt,amp");d.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"),
d.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"),d.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"),
d.entities_additional&&l.push(d.entities_additional));var m=f(l.join(",")),b=m.regex?"["+m.regex+"]":"a^";delete m.regex;d.entities&&d.entities_processNumerical&&(b="[^ -~]|"+b);var b=new RegExp(b,"g"),g=f("nbsp,gt,lt,amp,shy",!0),c=new RegExp(g.regex,"g");h.addRules({text:function(a){return a.replace(c,e).replace(b,k)}},{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(f,h,e,k){h=h||"80%";e=e||"70%";"string"==typeof h&&1<h.length&&"%"==h.substr(h.length-1,1)&&(h=parseInt(window.screen.width*parseInt(h,10)/100,10));"string"==typeof e&&1<e.length&&"%"==e.substr(e.length-1,1)&&(e=parseInt(window.screen.height*parseInt(e,10)/100,10));640>h&&(h=640);420>e&&(e=420);var d=parseInt((window.screen.height-e)/2,10),l=parseInt((window.screen.width-
h)/2,10);k=(k||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+h+",height\x3d"+e+",top\x3d"+d+",left\x3d"+l;var m=window.open("",null,k,!0);if(!m)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(m.moveTo(l,d),m.resizeTo(h,e)),m.focus(),m.location.href=f}catch(b){window.open(f,null,k,!0)}return!0}}),"use strict",function(){function f(d){this.editor=d;this.loaders=
[]}function h(d,f,h){var b=d.config.fileTools_defaultFileName;this.editor=d;this.lang=d.lang;"string"===typeof f?(this.data=f,this.file=e(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=f,this.total=this.file.size,this.loaded=0);h?this.fileName=h:this.file.name?this.fileName=this.file.name:(d=this.file.type.split("/"),b&&(d[0]=b),this.fileName=d.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}}
function e(d){var e=d.match(k)[1];d=d.replace(k,"");d=atob(d);var f=[],b,g,c,a;for(b=0;b<d.length;b+=512){g=d.slice(b,b+512);c=Array(g.length);for(a=0;a<g.length;a++)c[a]=g.charCodeAt(a);g=new Uint8Array(c);f.push(g)}return new Blob(f,{type:e})}CKEDITOR.plugins.add("filetools",{beforeInit:function(d){d.uploadRepository=new f(d);d.on("fileUploadRequest",function(d){var e=d.data.fileLoader;e.xhr.open("POST",e.uploadUrl,!0);d.data.requestData.upload={file:e.file,name:e.fileName}},null,null,5);d.on("fileUploadRequest",
function(e){var f=e.data.fileLoader,b=new FormData;e=e.data.requestData;var g=d.config.fileTools_requestHeaders,c,a;for(a in e){var h=e[a];"object"===typeof h&&h.file?b.append(a,h.file,h.name):b.append(a,h)}b.append("ckCsrfToken",CKEDITOR.tools.getCsrfToken());if(g)for(c in g)f.xhr.setRequestHeader(c,g[c]);f.xhr.send(b)},null,null,999);d.on("fileUploadResponse",function(d){var e=d.data.fileLoader,b=e.xhr,g=d.data;try{var c=JSON.parse(b.responseText);c.error&&c.error.message&&(g.message=c.error.message);
if(c.uploaded)for(var a in c)g[a]=c[a];else d.cancel()}catch(f){g.message=e.lang.filetools.responseError,CKEDITOR.warn("filetools-response-error",{responseText:b.responseText}),d.cancel()}},null,null,999)}});f.prototype={create:function(d,e,f){f=f||h;var b=this.loaders.length;d=new f(this.editor,d,e);d.id=b;this.loaders[b]=d;this.fire("instanceCreated",d);return d},isFinished:function(){for(var d=0;d<this.loaders.length;++d)if(!this.loaders[d].isFinished())return!1;return!0}};h.prototype={loadAndUpload:function(d,
e){var f=this;this.once("loaded",function(b){b.cancel();f.once("update",function(b){b.cancel()},null,null,0);f.upload(d,e)},null,null,0);this.load()},load:function(){var d=this,e=this.reader=new FileReader;d.changeStatus("loading");this.abort=function(){d.reader.abort()};e.onabort=function(){d.changeStatus("abort")};e.onerror=function(){d.message=d.lang.filetools.loadError;d.changeStatus("error")};e.onprogress=function(e){d.loaded=e.loaded;d.update()};e.onload=function(){d.loaded=d.total;d.data=e.result;
d.changeStatus("loaded")};e.readAsDataURL(this.file)},upload:function(d,e){var f=e||{};d?(this.uploadUrl=d,this.xhr=new XMLHttpRequest,this.attachRequestListeners(),this.editor.fire("fileUploadRequest",{fileLoader:this,requestData:f})&&this.changeStatus("uploading")):(this.message=this.lang.filetools.noUrlError,this.changeStatus("error"))},attachRequestListeners:function(){function d(){"error"!=f.status&&(f.message=f.lang.filetools.networkError,f.changeStatus("error"))}function e(){"abort"!=f.status&&
f.changeStatus("abort")}var f=this,b=this.xhr;f.abort=function(){b.abort();e()};b.onerror=d;b.onabort=e;b.upload?(b.upload.onprogress=function(b){b.lengthComputable&&(f.uploadTotal||(f.uploadTotal=b.total),f.uploaded=b.loaded,f.update())},b.upload.onerror=d,b.upload.onabort=e):(f.uploadTotal=f.total,f.update());b.onload=function(){f.update();if("abort"!=f.status)if(f.uploaded=f.uploadTotal,200>b.status||299<b.status)f.message=f.lang.filetools["httpError"+b.status],f.message||(f.message=f.lang.filetools.httpError.replace("%1",
b.status)),f.changeStatus("error");else{for(var g={fileLoader:f},c=["message","fileName","url"],a=f.editor.fire("fileUploadResponse",g),d=0;d<c.length;d++){var e=c[d];"string"===typeof g[e]&&(f[e]=g[e])}f.responseData=g;delete f.responseData.fileLoader;!1===a?f.changeStatus("error"):f.changeStatus("uploaded")}}},changeStatus:function(d){this.status=d;if("error"==d||"abort"==d||"loaded"==d||"uploaded"==d)this.abort=function(){};this.fire(d);this.update()},update:function(){this.fire("update")},isFinished:function(){return!!this.status.match(/^(?:loaded|uploaded|error|abort)$/)}};
CKEDITOR.event.implementOn(f.prototype);CKEDITOR.event.implementOn(h.prototype);var k=/^data:(\S*?);base64,/;CKEDITOR.fileTools||(CKEDITOR.fileTools={});CKEDITOR.tools.extend(CKEDITOR.fileTools,{uploadRepository:f,fileLoader:h,getUploadUrl:function(d,e){var f=CKEDITOR.tools.capitalize;return e&&d[e+"UploadUrl"]?d[e+"UploadUrl"]:d.uploadUrl?d.uploadUrl:e&&d["filebrowser"+f(e,1)+"UploadUrl"]?d["filebrowser"+f(e,1)+"UploadUrl"]+"\x26responseType\x3djson":d.filebrowserUploadUrl?d.filebrowserUploadUrl+
"\x26responseType\x3djson":null},isTypeSupported:function(d,e){return!!d.type.match(e)},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 f(a,b){var c=[];if(b)for(var g in b)c.push(g+"\x3d"+encodeURIComponent(b[g]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function h(a){return!a.match(/command=QuickUpload/)||
a.match(/(\?|&)responseType=json/)?a:f(a,{responseType:"json"})}function e(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function k(){var a=this.getDialog(),b=a.getParentEditor();b._.filebrowserSe=this;var c=b.config["filebrowser"+e(a.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",a=b.config["filebrowser"+e(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=f(this.filebrowser.url,g);b.popup(g,c,a,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function d(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 m(a,b,c){var g=c.params||{};g.CKEditor=a.name;g.CKEditorFuncNum=a._.filebrowserFn;g.langCode||(g.langCode=a.langCode);b.action=f(c.url,g);b.filebrowser=c}function b(c,f,v,p){if(p&&p.length)for(var r,q=p.length;q--;)if(r=p[q],"hbox"!=r.type&&"vbox"!=r.type&&"fieldset"!=r.type||b(c,f,v,r.children),r.filebrowser)if("string"==typeof r.filebrowser&&(r.filebrowser={action:"fileButton"==
r.type?"QuickUpload":"Browse",target:r.filebrowser}),"Browse"==r.filebrowser.action){var u=r.filebrowser.url;void 0===u&&(u=c.config["filebrowser"+e(f)+"BrowseUrl"],void 0===u&&(u=c.config.filebrowserBrowseUrl));u&&(r.onClick=k,r.filebrowser.url=u,r.hidden=!1)}else if("QuickUpload"==r.filebrowser.action&&r["for"]&&(u=r.filebrowser.url,void 0===u&&(u=c.config["filebrowser"+e(f)+"UploadUrl"],void 0===u&&(u=c.config.filebrowserUploadUrl)),u)){var x=r.onClick;r.onClick=function(b){var e=b.sender,f=e.getDialog().getContentElement(this["for"][0],
this["for"][1]).getInputElement(),k=CKEDITOR.fileTools&&CKEDITOR.fileTools.isFileUploadSupported;if(x&&!1===x.call(e,b))return!1;if(l.call(e,b)){if("form"!==c.config.filebrowserUploadMethod&&k)return b=c.uploadRepository.create(f.$.files[0]),b.on("uploaded",function(b){var c=b.sender.responseData;a.call(b.sender.editor,c.url,c.message)}),b.on("error",g.bind(this)),b.on("abort",g.bind(this)),b.loadAndUpload(h(u)),"xhr";d(f);return!0}return!1};r.filebrowser.url=u;r.hidden=!1;m(c,v.getContents(r["for"][0]).get(r["for"][1]),
r.filebrowser)}}function g(a){var b={};try{b=JSON.parse(a.sender.xhr.response)||{}}catch(c){}this.enable();alert(b.error?b.error.message:a.sender.message)}function c(a,b,g){if(-1!==g.indexOf(";")){g=g.split(";");for(var d=0;d<g.length;d++)if(c(a,b,g[d]))return!0;return!1}return(a=a.getContents(b).get(g).filebrowser)&&a.url}function a(a,b){var c=this._.filebrowserSe.getDialog(),g=this._.filebrowserSe["for"],d=this._.filebrowserSe.filebrowser.onSelect;g&&c.getContentElement(g[0],g[1]).reset();if("function"!=
typeof b||!1!==b.call(this._.filebrowserSe))if(!d||!1!==d.call(this._.filebrowserSe,a,b))if("string"==typeof b&&b&&alert(b),a&&(g=this._.filebrowserSe,c=g.getDialog(),g=g.filebrowser.target||null))if(g=g.split(":"),d=c.getContentElement(g[0],g[1]))d.setValue(a),c.selectPage(g[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 g=a.data.definition,d,e=0;e<g.contents.length;++e)if(d=g.contents[e])b(a.editor,a.data.name,g,d.elements),d.hidden&&d.filebrowser&&(d.hidden=!c(g,d.id,d.filebrowser))})}(),function(){function f(f){var d=f.config,l=f.fire("uiSpace",{space:"top",html:""}).html,m=function(){function a(b,c,d){g.setStyle(c,e(d));g.setStyle("position",b)}function b(g){var d=l.getDocumentPosition();switch(g){case "top":a("absolute","top",d.y-x-t);break;case "pin":a("fixed",
"top",y);break;case "bottom":a("absolute","top",d.y+(q.height||q.bottom-q.top)+t)}c=g}var c,l,r,q,u,x,A,D=d.floatSpaceDockedOffsetX||0,t=d.floatSpaceDockedOffsetY||0,B=d.floatSpacePinnedOffsetX||0,y=d.floatSpacePinnedOffsetY||0;return function(a){if(l=f.editable()){var n=a&&"focus"==a.name;n&&g.show();f.fire("floatingSpaceLayout",{show:n});g.removeStyle("left");g.removeStyle("right");r=g.getClientRect();q=l.getClientRect();u=h.getViewPaneSize();x=r.height;A="pageXOffset"in h.$?h.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;
c?(x+t<=q.top?b("top"):x+t>u.height-q.bottom?b("pin"):b("bottom"),a=u.width/2,a=d.floatSpacePreferRight?"right":0<q.left&&q.right<u.width&&q.width>r.width?"rtl"==d.contentsLangDirection?"right":"left":a-q.left>q.right-a?"left":"right",r.width>u.width?(a="left",n=0):(n="left"==a?0<q.left?q.left:0:q.right<u.width?u.width-q.right:0,n+r.width>u.width&&(a="left"==a?"right":"left",n=0)),g.setStyle(a,e(("pin"==c?B:D)+n+("pin"==c?0:"left"==a?A:-A)))):(c="pin",b("pin"),m(a))}}}();if(l){var b=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}"'+(f.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(f.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(b.output({content:l,
id:f.id,langDir:f.lang.dir,langCode:f.langCode,name:f.name,style:"display:none;z-index:"+(d.baseFloatZIndex-1),topId:f.ui.spaceId("top"),voiceLabel:f.title}))),c=CKEDITOR.tools.eventsBuffer(500,m),a=CKEDITOR.tools.eventsBuffer(100,m);g.unselectable();g.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});f.on("focus",function(b){m(b);f.on("change",c.input);h.on("scroll",a.input);h.on("resize",a.input)});f.on("blur",function(){g.hide();f.removeListener("change",
c.input);h.removeListener("scroll",a.input);h.removeListener("resize",a.input)});f.on("destroy",function(){h.removeListener("scroll",a.input);h.removeListener("resize",a.input);g.clearCustomData();g.remove()});f.focusManager.hasFocus&&g.show();f.focusManager.add(g,1)}}var h=CKEDITOR.document.getWindow(),e=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){f(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var f=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" 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'),e=CKEDITOR.addTemplate("panel-list-group",
'\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),k=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(d,e){return this.addBlock(d,new CKEDITOR.ui.listBlock(this.getHolderElement(),e))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(d,e){e=e||{};var f=e.attributes||(e.attributes={});(this.multiSelect=!!e.multiSelect)&&(f["aria-multiselectable"]=!0);!f.role&&(f.role="listbox");this.base.apply(this,arguments);
this.element.setAttribute("role",f.role);f=this.keys;f[40]="next";f[9]="next";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(f[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var d=f.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(d);delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(d){var e=
this.toggle(d);if(this.onClick)this.onClick(d,e)},this));return this._.click}},proto:{add:function(d,e,f){var b=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[d]=b;var g;g=CKEDITOR.tools.htmlEncodeAttr(d).replace(k,"\\'");d={id:b,val:g,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(f||d),text:e||d};this._.pendingList.push(h.output(d))},startGroup:function(d){this._.close();
var f=CKEDITOR.tools.getNextId();this._.groups[d]=f;this._.pendingHtml.push(e.output({id:f,label:d}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(d){var e=this.isMarked(d);e?this.unmark(d):this.mark(d);return!e},hideGroup:function(d){var e=(d=this.element.getDocument().getById(this._.groups[d]))&&d.getNext();d&&(d.setStyle("display","none"),e&&"ul"==e.getName()&&e.setStyle("display","none"))},hideItem:function(d){this.element.getDocument().getById(this._.items[d]).setStyle("display",
"none")},showAll:function(){var d=this._.items,e=this._.groups,f=this.element.getDocument(),b;for(b in d)f.getById(d[b]).setStyle("display","");for(var g in e)d=f.getById(e[g]),b=d.getNext(),d.setStyle("display",""),b&&"ul"==b.getName()&&b.setStyle("display","")},mark:function(d){this.multiSelect||this.unmarkAll();d=this._.items[d];var e=this.element.getDocument().getById(d);e.addClass("cke_selected");this.element.getDocument().getById(d+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(e)},
markFirstDisplayed:function(){var d=this;this._.markFirstDisplayed(function(){d.multiSelect||d.unmarkAll()})},unmark:function(d){var e=this.element.getDocument();d=this._.items[d];var f=e.getById(d);f.removeClass("cke_selected");e.getById(d+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var d=this._.items,e=this.element.getDocument(),f;for(f in d){var b=d[f];e.getById(b).removeClass("cke_selected");e.getById(b+"_option").removeAttribute("aria-selected")}this.onUnmark&&
this.onUnmark()},isMarked:function(d){return this.element.getDocument().getById(this._.items[d]).hasClass("cke_selected")},focus:function(d){this._.focusIndex=-1;var e=this.element.getElementsByTag("a"),f,b=-1;if(d)for(f=this.element.getDocument().getById(this._.items[d]).getFirst();d=e.getItem(++b);){if(d.equals(f)){this._.focusIndex=b;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(f){f.ui.addHandler(CKEDITOR.UI_RICHCOMBO,
CKEDITOR.ui.richCombo.handler)}}),function(){var f='\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"true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&
(f+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' 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"),h=CKEDITOR.addTemplate("combo",f);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1});e=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document;e.className="cke_combopanel";
e.block={multiSelect:e.multiSelect,attributes:e.attributes};e.toolbarRelated=!0;this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var f=[];this.render(e,f);return f.join("")},render:function(e,f){function d(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=
CKEDITOR.env,m="cke_"+this.id,b=CKEDITOR.tools.addFunction(function(a){w&&(e.unlockSelection(1),w=0);c.execute(a)},this),g=this,c={id:m,combo:this,focus:function(){CKEDITOR.document.getById(m).getChild(1).focus()},execute:function(a){var b=g._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(g.createPanel(e),b.on)b.panel.hide();else{g.commit();var c=g.getValue();c?b.list.mark(c):b.list.unmarkAll();b.panel.showBlock(g.id,new CKEDITOR.dom.element(a),4)}},clickFn:b};e.on("activeFilterChange",d,this);e.on("mode",
d,this);e.on("selectionChange",d,this);!this.readOnly&&e.on("readOnly",d,this);var a=CKEDITOR.tools.addFunction(function(a,g){a=new CKEDITOR.dom.event(a);var d=a.getKeystroke();switch(d){case 13:case 32:case 40:CKEDITOR.tools.callFunction(b,g);break;default:c.onkey(c,d)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){c.onfocus&&c.onfocus()}),w=0;c.keyDownFn=a;l={id:m,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:b};h.output(l,f);if(this.onRender)this.onRender();return c},createPanel:function(e){if(!this._.panel){var f=this._.panelDefinition,d=this._.panelDefinition.block,h=f.parent||CKEDITOR.document.getBody(),m="cke_combopanel__"+this.name,b=new CKEDITOR.ui.floatPanel(e,h,f),f=b.addListBlock(this.id,d),g=this;b.onShow=function(){this.element.addClass(m);g.setState(CKEDITOR.TRISTATE_ON);g._.on=1;g.editorFocus&&!e.focusManager.hasFocus&&e.focus();if(g.onOpen)g.onOpen()};
b.onHide=function(b){this.element.removeClass(m);g.setState(g.modes&&g.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g._.on=0;if(!b&&g.onClose)g.onClose()};b.onEscape=function(){b.hide(1)};f.onClick=function(c,a){g.onClick&&g.onClick.call(g,c,a);b.hide()};this._.panel=b;this._.list=f;b.getBlock(this.id).onHide=function(){g._.on=0;g.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(e,f){this._.value=e;var d=this.document.getById("cke_"+this.id+"_text");d&&
(e||f?d.removeClass("cke_combo_inlinelabel"):(f=this.label,d.addClass("cke_combo_inlinelabel")),d.setText("undefined"!=typeof f?f:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,f,d){this._.items[e]=d||e;this._.list.add(e,f,d)},startGroup:function(e){this._.list.startGroup(e)},
commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(e){if(this._.state!=e){var f=this.document.getById("cke_"+this.id);f.setState(e,"cke_combo");e==CKEDITOR.TRISTATE_DISABLED?f.setAttribute("aria-disabled",!0):f.removeAttribute("aria-disabled");this._.state=e}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=
CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}});CKEDITOR.ui.prototype.addRichCombo=function(e,f){this.add(e,CKEDITOR.UI_RICHCOMBO,f)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(f){if(!f.blockless){for(var h=f.config,e=f.lang.format,k=h.format_tags.split(";"),d={},l=0,m=[],b=0;b<k.length;b++){var g=k[b],c=new CKEDITOR.style(h["format_"+g]);
if(!f.filter.customConfig||f.filter.check(c))l++,d[g]=c,d[g]._.enterMode=f.config.enterMode,m.push(c)}0!==l&&f.ui.addRichCombo("Format",{label:e.label,title:e.panelTitle,toolbar:"styles,20",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!1,attributes:{"aria-label":e.panelTitle}},init:function(){this.startGroup(e.panelTitle);for(var a in d){var b=e["tag_"+a];this.add(a,d[a].buildPreview(b),b)}},onClick:function(a){f.focus();f.fire("saveSnapshot");a=
d[a];var b=f.elementPath();a.checkActive(b,f)||f.applyStyle(a);setTimeout(function(){f.fire("saveSnapshot")},0)},onRender:function(){f.on("selectionChange",function(a){var b=this.getValue();a=a.data.path;this.refresh();for(var c in d)if(d[c].checkActive(a,f)){c!=b&&this.setValue(c,f.lang.format["tag_"+c]);return}this.setValue("")},this)},onOpen:function(){this.showAll();for(var a in d)f.activeFilter.check(d[a])||this.hideItem(a)},refresh:function(){var a=f.elementPath();if(a){if(a.isContextFor("p"))for(var b in d)if(f.activeFilter.check(d[b]))return;
this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6=
{element:"h6"},function(){var f={canUndo:!1,exec:function(f){var e=f.document.createElement("hr");f.insertElement(e)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||(h.addCommand("horizontalrule",f),h.ui.addButton&&h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(f){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=
f.config.forceSimpleAmpersand;h.indentationChars=f.config.dataIndentationChars||"\t";f.dataProcessor.writer=h}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var f=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},f.$nonBodyContent,f.$block,f.$listItem,f.$tableContent))this.setRules(h,
{indent:!f[h]["#"],breakBeforeOpen:1,breakBeforeClose:!f[h]["#"],breakAfterClose:1,needsSpace:h in f.$block&&!(h in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(f){var h=this._.rules[f];this._.afterCloser&&h&&h.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():h&&h.breakBeforeOpen&&
(this.lineBreak(),this.indentation());this._.output.push("\x3c",f);this._.afterCloser=0},openTagClose:function(f,h){var e=this._.rules[f];h?(this._.output.push(this.selfClosingEnd),e&&e.breakAfterClose&&(this._.needsSpace=e.needsSpace)):(this._.output.push("\x3e"),e&&e.indent&&(this._.indentation+=this.indentationChars));e&&e.breakAfterOpen&&this.lineBreak();"pre"==f&&(this._.inPre=1)},attribute:function(f,h){"string"==typeof h&&(this.forceSimpleAmpersand&&(h=h.replace(/&amp;/g,"\x26")),h=CKEDITOR.tools.htmlEncodeAttr(h));
this._.output.push(" ",f,'\x3d"',h,'"')},closeTag:function(f){var h=this._.rules[f];h&&h.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():h&&h.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",f,"\x3e");"pre"==f&&(this._.inPre=0);h&&h.breakAfterClose&&(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(f){this._.indent&&(this.indentation(),!this._.inPre&&(f=CKEDITOR.tools.ltrim(f)));
this._.output.push(f)},comment:function(f){this._.indent&&this.indentation();this._.output.push("\x3c!--",f,"--\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(f,h){var e=
this._.rules[f];e?CKEDITOR.tools.extend(e,h,!0):this._.rules[f]=h}}}),"use strict",function(){function f(b,c){CKEDITOR.tools.extend(this,{editor:b,editable:b.editable(),doc:b.document,win:b.window},c,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function h(b,c){CKEDITOR.tools.extend(this,c,{editor:b},!0)}function e(b,c){var a=b.editable();CKEDITOR.tools.extend(this,{editor:b,editable:a,inline:a.isInline(),doc:b.document,
win:b.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(b,"resize",e);a.attachListener(b,"mode",h);b.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({},d,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function k(g){var c;if(c=g&&g.type==CKEDITOR.NODE_ELEMENT)c=!(m[g.getComputedStyle("float")]||m[g.getAttribute("align")]);return c&&
!b[g.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;f.prototype={start:function(b){var c=this,a=this.editor,d=this.doc,e,f,h,k,l=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(c.relations={},(f=d.$.elementFromPoint(h,k))&&f.nodeType&&(e=new CKEDITOR.dom.element(f),c.traverseSearch(e),isNaN(h+k)||c.pixelSearch(e,h,k),b&&b(c.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(c){var a=this.editor.createRange();a.moveToPosition(this.relations[c.uid].element,
b[c.type]);return a}}(),store:function(){function b(c,a,d){var g=c.getUniqueId();g in d?d[g].type|=a:d[g]={element:c,type:a}}return function(c,a){var d;a&CKEDITOR.LINEUTILS_AFTER&&k(d=c.getNext())&&d.isVisible()&&(b(d,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_AFTER);a&CKEDITOR.LINEUTILS_INSIDE&&k(d=c.getFirst())&&d.isVisible()&&(b(d,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_INSIDE);b(c,a,this.relations)}}(),traverseSearch:function(b){var c,a,d;do if(d=b.$["data-cke-expando"],
!(d&&d in this.relations)){if(b.equals(this.editable))break;if(k(b))for(c in this.lookups)(a=this.lookups[c](b))&&this.store(b,a)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(a,d,g,e,f){for(var h=0,l;f(g);){g+=e;if(25==++h)break;if(l=this.doc.$.elementFromPoint(d,g))if(l==a)h=0;else if(c(a,l)&&(h=0,k(l=new CKEDITOR.dom.element(l))))return l}}var c=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:
function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(a,c,d){var e=this.win.getViewPaneSize().height,f=b.call(this,a.$,c,d,-1,function(a){return 0<a});c=b.call(this,a.$,c,d,1,function(a){return a<e});if(f)for(this.traverseSearch(f);!f.getParent().equals(a);)f=f.getParent();if(c)for(this.traverseSearch(c);!c.getParent().equals(a);)c=c.getParent();for(;f||c;){f&&(f=f.getNext(k));if(!f||f.equals(c))break;this.traverseSearch(f);c&&(c=c.getPrevious(k));if(!c||c.equals(f))break;this.traverseSearch(c)}}}(),
greedySearch:function(){this.relations={};for(var b=this.editable.getElementsByTag("*"),c=0,a,d,e;a=b.getItem(c++);)if(!a.equals(this.editable)&&a.type==CKEDITOR.NODE_ELEMENT&&(a.hasAttribute("contenteditable")||!a.isReadOnly())&&k(a)&&a.isVisible())for(e in this.lookups)(d=this.lookups[e](a))&&this.store(a,d);return this.relations}};h.prototype={locate:function(){function b(c,a){var d=c.element[a===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return d&&k(d)?(c.siblingRect=d.getClientRect(),
a==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):a==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(c){var a;this.locations={};for(var d in c)a=c[d],a.elementRect=a.element.getClientRect(),a.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(d,CKEDITOR.LINEUTILS_BEFORE,b(a,CKEDITOR.LINEUTILS_BEFORE)),a.type&CKEDITOR.LINEUTILS_AFTER&&this.store(d,CKEDITOR.LINEUTILS_AFTER,b(a,CKEDITOR.LINEUTILS_AFTER)),a.type&
CKEDITOR.LINEUTILS_INSIDE&&this.store(d,CKEDITOR.LINEUTILS_INSIDE,(a.elementRect.top+a.elementRect.bottom)/2);return this.locations}}(),sort:function(){var b,c,a,d;return function(e,f){b=this.locations;c=[];for(var h in b)for(var k in b[h])if(a=Math.abs(e-b[h][k]),c.length){for(d=0;d<c.length;d++)if(a<c[d].dist){c.splice(d,0,{uid:+h,type:k,dist:a});break}d==c.length&&c.push({uid:+h,type:k,dist:a})}else c.push({uid:+h,type:k,dist:a});return"undefined"!=typeof f?c.slice(0,f):c}}(),store:function(b,
c,a){this.locations[b]||(this.locations[b]={});this.locations[b][c]=a}};var d={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};e.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 c=b.getUniqueId();
b.hide();this.hidden[c]=b;delete this.visible[c]},showLine:function(b){var c=b.getUniqueId();b.show();this.visible[c]=b;delete this.hidden[c]},hideVisible:function(){for(var b in this.visible)this.hideLine(this.visible[b])},placeLine:function(b,c){var a,d,e;if(a=this.getStyle(b.uid,b.type)){for(e in this.visible)if(this.visible[e].getCustomData("hash")!==this.hash){d=this.visible[e];break}if(!d)for(e in this.hidden)if(this.hidden[e].getCustomData("hash")!==this.hash){this.showLine(d=this.hidden[e]);
break}d||this.showLine(d=this.addLine());d.setCustomData("hash",this.hash);this.visible[d.getUniqueId()]=d;d.setStyles(a);c&&c(d)}},getStyle:function(b,c){var a=this.relations[b],d=this.locations[b][c],e={};e.width=a.siblingRect?Math.max(a.siblingRect.width,a.elementRect.width):a.elementRect.width;e.top=this.inline?d+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+d;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,c){this.relations=b;this.locations=c;this.hash=Math.random()},
cleanup:function(){var b,c;for(c in this.visible)b=this.visible[c],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 c=this.container.getDocumentPosition(),a=this.container.getComputedStyle("position");b.relativeX=b.relativeY=
0;"static"!=a&&(b.relativeY=c.y,b.relativeX=c.x,b.top-=b.relativeY,b.bottom-=b.relativeY,b.left-=b.relativeX,b.right-=b.relativeX);return b}};var m={left:1,right:1,center:1},b={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:f,locator:h,liner:e}}(),function(){function f(f){return f.getName&&!f.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(f){if(CKEDITOR.env.webkit){var e=CKEDITOR.plugins.widgetselection;f.on("contentDom",function(f){f=f.editor;var d=f.document,
h=f.editable();h.attachListener(d,"keydown",function(d){d.data.getKeystroke()==CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){e.addFillers(h)||e.removeFillers(h)},0)},null,null,-1);f.on("selectionCheck",function(d){e.removeFillers(d.editor.editable())});f.on("paste",function(d){d.data.dataValue=e.cleanPasteData(d.data.dataValue)});"selectall"in f.plugins&&e.addSelectAllIntegration(f)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",
fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(h){var e=h.editor;if(!this.isWholeContentSelected(h)&&0<h.getChildCount()){var k=h.getFirst(f),d=h.getLast(f);k&&k.type==CKEDITOR.NODE_ELEMENT&&!k.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));d&&d.type==CKEDITOR.NODE_ELEMENT&&!d.isEditable()&&(this.endFiller=this.createFiller(!0),h.append(this.endFiller,0));if(this.hasFiller(h))return e=e.createRange(),e.selectNodeContents(h),e.select(),!0}return!1},
removeFillers:function(f){if(this.hasFiller(f)&&!this.isWholeContentSelected(f)){var e=f.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),k=f.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&e&&this.startFiller.equals(e)?this.removeFiller(this.startFiller,f):this.startFiller=e;this.endFiller&&k&&this.endFiller.equals(k)?this.removeFiller(this.endFiller,f):this.endFiller=k}},cleanPasteData:function(f){f&&f.length&&(f=f.replace(this.createFillerRegex(),
"").replace(this.createFillerRegex(!0),""));return f},isWholeContentSelected:function(f){var e=f.editor.getSelection().getRanges()[0];return!e||e&&e.collapsed?!1:(e=e.clone(),e.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(e&&f&&e.startContainer&&e.endContainer&&0===e.startOffset&&e.endOffset===f.getChildCount()&&e.startContainer.equals(f)&&e.endContainer.equals(f)))},hasFiller:function(f){return 0<f.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(f){var e=new CKEDITOR.dom.element(this.fillerTagName);
e.setHtml(this.fillerContent);e.setAttribute(this.fillerAttribute,f?"end":"start");e.setAttribute("data-cke-temp",1);e.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return e},removeFiller:function(f,e){if(f){var k=e.editor,d=e.editor.getSelection().getRanges()[0].startPath(),l=k.createRange(),m,b;d.contains(f)&&(m=f.getHtml(),b=!0);d="start"==f.getAttribute(this.fillerAttribute);f.remove();m&&0<m.length&&
m!=this.fillerContent?(e.insertHtmlIntoRange(m,k.getSelection().getRanges()[0]),l.setStartAt(e.getChild(e.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),k.getSelection().selectRanges([l])):b&&(d?l.setStartAt(e.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):l.setEndAt(e.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),e.editor.getSelection().selectRanges([l]))}},createFillerRegex:function(f){var e=this.createFiller(f).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,
"\x3e[^\x3c]*\x3c");return new RegExp((f?"":"^")+e+(f?"$":""))},addSelectAllIntegration:function(f){var e=this;f.editable().attachListener(f,"beforeCommandExec",function(k){var d=f.editable();"selectAll"==k.data.name&&d&&e.addFillers(d)},null,null,9999)}}}(),"use strict",function(){function f(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};I(this);z(this);this.on("checkWidgets",
m);this.editor.on("contentDomInvalidated",this.checkWidgets,this);y(this);D(this);t(this);A(this);B(this)}function h(a,b,c,d,g){var e=a.editor;CKEDITOR.tools.extend(this,d,{editor:e,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:h.prototype.edit,focusedEditable:null,definition:d,repository:a,draggable:!1!==d.draggable,_:{downcastFn:d.downcast&&"string"==typeof d.downcast?
d.downcasts[d.downcast]:d.downcast}},!0);a.fire("instanceCreated",this);aa(this,d);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));g&&this.setData(g);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;Q(this);this.fire("data",this.data);this.isInited()&&e.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function e(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;
this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=b?b.getAllowedEnterMode(a.enterMode):a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function k(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(h)}var g=a.widgets.focused;if(g&&g.name==b.name)g.edit();else if(b.insert)b.insert();else if(b.template){var g="function"==typeof b.defaults?
b.defaults():b.defaults,g=CKEDITOR.dom.element.createFromHtml(b.template.output(g)),e,f=a.widgets.wrapElement(g,b.name),h=new CKEDITOR.dom.documentFragment(f.getDocument());h.append(f);(e=a.widgets.initOn(g,b,c&&c.startupData))?(g=e.once("edit",function(b){if(b.data.dialog)e.once("dialog",function(b){b=b.data;var c,g;c=b.once("ok",d,null,null,20);g=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(e,!0)});b.once("hide",function(){c.removeListener();g.removeListener()})});else d()},
null,null,999),e.edit(),g.removeListener()):d()}},allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function d(a,b){function c(a,d){var g=b.upcast.split(","),e,f;for(f=0;f<g.length;f++)if(e=g[f],e===a.name)return b.upcasts[e].call(this,a,d);return!1}function d(b,c,g){var e=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>g});0>e&&(e=a._.upcasts.length);a._.upcasts.splice(e,0,[CKEDITOR.tools.bind(b,
c),c.name,g])}var g=b.upcast,e=b.upcastPriority||10;g&&("string"==typeof g?d(c,b,e):d(g,b,e))}function l(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function m(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,g,e,f;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),
c=[];d=0;for(g=k.count();d<g;d++){e=k.getItem(d);if(f=!this.getByElement(e,!0)){a:{f=r;for(var l=e;l=l.getParent();)if(f(l)){f=!0;break a}f=!1}f=!f}f&&b.contains(e)&&(e.addClass("cke_widget_new"),c.push(this.initOn(e.getFirst(h.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function b(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=g(a),d=c(a),e=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=1,b.value=b.value.replace(/^\s/g,
"\x26nbsp;"),e=!0);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;"),e=!0);e&&(a.attributes["data-cke-widget-white-space"]=1)}}function g(a){return a.find(function(a){return 3===a.type},!0).shift()}function c(a){return a.find(function(a){return 3===a.type},!0).pop()}function a(a,b,c){if(!c.allowedContent&&!c.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[b];a||(a=c.allowedContent?
new CKEDITOR.filter(c.allowedContent):this.editor.filter.clone(),d[b]=a,c.disallowedContent&&a.disallow(c.disallowedContent));return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var g,e,f,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(h.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(g=d.length;k<g;++k)if(!1===
d[k](a))return;for(k=0;k<l;++k)if(g=c[k],f={},e=g[0](a,f))return e instanceof CKEDITOR.htmlParser.element&&(a=e),a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(f)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,g[1]]),!1}}}}function w(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function v(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=
CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),g=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||d.remove();return v(g,b,c)}}a.add(c,b)}function p(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function r(a){return a.hasAttribute("data-cke-temp")}function q(a,b,c,d){var g=a.editor;g.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),
d.filter&&g.setActiveFilter(d.filter),g.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,g.setActiveFilter(null),g.setActiveEnterMode(null,null));g.fire("unlockSnapshot")}function u(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function x(a,b){return CKEDITOR.tools.trim(b)}function A(a){var b=a.editor,
c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;h.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id",d.id),b.focus(),d.focus())});b.on("drop",function(c){var d=c.data.dataTransfer,g=d.getData("cke/widget-id"),e=d.getTransferType(b),d=b.createRange();""!==g&&e===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c.cancel():""!==g&&e==CKEDITOR.DATA_TRANSFER_INTERNAL&&(g=a.instances[g])&&(d.setStartBefore(g.wrapper),d.setEndAfter(g.wrapper),c.data.dragRange=
d,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",b.editable().getHtmlFromRange(d).getHtml()),b.widgets.destroy(g,!0))});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!h.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=h.getNestedEditable(d,
b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function D(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),
d=c.isInline()?c:b.document,g,e;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();g=d instanceof CKEDITOR.dom.element?a.getByElement(d):null;e=0;g&&(g.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(e=1,a.focused!=g&&b.getSelection().removeAllRanges()):h.getNestedEditable(g.wrapper,d)?g=null:(c.data.preventDefault(),CKEDITOR.env.ie||g.focus()))});c.attachListener(d,"mouseup",function(){e&&g&&g.wrapper&&(e=0,g.focus())});CKEDITOR.env.ie&&c.attachListener(d,
"mouseup",function(){setTimeout(function(){g&&g.wrapper&&c.contains(g.wrapper)&&(g.focus(),g=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!h.getNestedEditable(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function t(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,g;c?g=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),
d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),g=!1):8==c||46==c?(g=d.editor.getSelection().getRanges(),d=g[0],g=!(1==g.length&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):g=void 0);return g},null,null,1)}function B(a){function b(c){a.focused&&G(a.focused,"cut"==c.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function y(a){var b=
a.editor;b.on("selectionCheck",function(){a.fire("checkSelection")});a.on("checkSelection",a.checkSelection,a);b.on("selectionChange",function(c){var d=(c=h.getNestedEditable(b.editable(),c.data.selection.getStartElement()))&&a.getByElement(c),g=a.widgetHoldingFocusedEditable;g?g===d&&g.focusedEditable.equals(c)||(q(a,g,null),d&&c&&q(a,d,c)):d&&c&&q(a,d,c)});b.on("dataReady",function(){E(a).commit()});b.on("blur",function(){var b;(b=a.focused)&&l(a,b);(b=a.widgetHoldingFocusedEditable)&&q(a,b,null)})}
function z(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=e;d[e]=f;b.data.dataValue.forEach(function(b){var d=b.attributes,e;if("data-cke-widget-white-space"in d){e=g(b);var k=c(b);e.parent.attributes["data-cke-white-space-first"]&&(e.value=e.value.replace(/^&nbsp;/g," "));k.parent.attributes["data-cke-white-space-last"]&&(k.value=k.value.replace(/&nbsp;$/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])e=
b.getFirst(h.isParserWidgetElement),f.push({wrapper:b,element:e,widget:d,editables:{}}),"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in d)return f[f.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,g,e,f,h;b=a.shift();){c=b.widget;g=b.element;e=c._.downcastFn&&c._.downcastFn.call(c,
g);for(h in b.editables)f=b.editables[h],delete f.attributes.contenteditable,f.setHtml(c.editables[h].getData());e||(e=g);b.wrapper.replaceWith(e)}}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function I(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=n(a),g;for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);g=d.toBeWrapped.pop();){var e=g[0],f=e.parent;f.type==CKEDITOR.NODE_ELEMENT&&f.attributes["data-cke-widget-wrapper"]&&f.replaceWith(e);a.wrapElement(g[0],
g[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),g,e,f=0,k=c.count();f<k;++f)g=c.getItem(f),e=g.getFirst(h.isDomWidgetElement),e.type==CKEDITOR.NODE_ELEMENT&&e.data("widget")?(e.replace(g),a.wrapElement(e)):g.remove();d=0;a.destroyAll(!0);
a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(V,x);a.range&&(a=h.getNestedEditable(b.editable(),a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}
function E(a){var b=a.selected,c=[],d=b.slice(0),g=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){g=a;return this},commit:function(){var e=a.focused!==g,f,h;a.editor.fire("lockSnapshot");for(e&&(f=a.focused)&&l(a,f);f=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,f),1),f.isInited()&&(h=f.editor.checkDirty(),f.setSelected(!1),!h&&f.editor.resetDirty());e&&g&&(h=a.editor.checkDirty(),a.focused=g,a.fire("widgetFocused",
{widget:g}),g.setFocused(!0),!h&&a.editor.resetDirty());for(;f=c.pop();)b.push(f),f.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function F(a,b,c){var d=0;b=L(b);var g=a.data.classes||{},e;if(b){for(g=CKEDITOR.tools.clone(g);e=b.pop();)c?g[e]||(d=g[e]=1):g[e]&&(delete g[e],d=1);d&&a.setData("classes",g)}}function H(a){a.cancel()}function G(a,b){var c=a.editor,d=c.document,g=CKEDITOR.env.edge&&16<=CKEDITOR.env.version;if(!d.getById("cke_copybin")){var e=!c.blockless&&!CKEDITOR.env.ie||g?"div":
"span",g=d.createElement(e),f=d.createElement(e),e=CKEDITOR.env.ie&&9>CKEDITOR.env.version;f.setAttributes({id:"cke_copybin","data-cke-temp":"1"});g.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});g.setStyle("ltr"==c.config.contentsLangDirection?"left":"right","-5000px");var h=c.createRange();h.setStartBefore(a.wrapper);h.setEndAfter(a.wrapper);g.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+c.editable().getHtmlFromRange(h).getHtml()+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');
c.fire("saveSnapshot");c.fire("lockSnapshot");f.append(g);c.editable().append(f);var k=c.on("selectionChange",H,null,null,0),l=a.repository.on("checkSelection",H,null,null,0);if(e)var m=d.getDocumentElement().$,q=m.scrollTop;h=c.createRange();h.selectNodeContents(g);h.select();e&&(m.scrollTop=q);setTimeout(function(){b||a.focus();f.remove();k.removeListener();l.removeListener();c.fire("unlockSnapshot");b&&!c.readOnly&&(a.repository.del(a),c.fire("saveSnapshot"))},100)}}function L(a){return(a=(a=a.getDefinition().attributes)&&
a["class"])?a.split(/\s+/):null}function O(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function 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,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);
b=a}})}function J(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 R(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",
style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png)"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",
a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",K,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function K(a){function b(){var c;for(n.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var g=this.repository.finder,e=this.repository.liner,f=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(e.visible)||(d=g.getRange(d[0]),
this.focus(),f.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");e.hideVisible();f.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=this.repository.finder,d=this.repository.locator,g=this.repository.liner,e=this.editor,f=e.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var q=c.greedySearch(),n=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(q);k=d.sort(m,1);k.length&&(g.prepare(q,l),g.placeLine(k[0]),
g.cleanup())});f.addClass("cke_widget_dragging");h.push(f.on("mousemove",function(a){m=a.data.$.clientY;n.input()}));e.fire("dragstart",{target:a.sender});h.push(e.document.once("mouseup",b,this));f.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}}function U(a){var b,c,d=a.editables;a.editables={};if(a.editables)for(b in d)c=d[b],a.initEditable(b,"string"==typeof c?{selector:c}:c)}function Y(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 Z(a){if(a.parts){var b={},c,d;for(d in a.parts)c=a.wrapper.findOne(a.parts[d]),b[d]=c;a.parts=b}}function aa(a,b){M(a);Z(a);U(a);Y(a);R(a);S(a);J(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");
a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){G(a,b==CKEDITOR.CTRL+88);return}if(b in T||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 Q(a){a.element.data("cke-widget-data",
encodeURIComponent(JSON.stringify(a.data)))}function N(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}var c={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget;if(this.group="string"==typeof a.group?[a.group]:a.group){a=this.widget;var b;c[a]||(c[a]={});for(var d=0,g=this.group.length;d<g;d++)b=this.group[d],c[a][b]||(c[a][b]=[]),c[a][b].push(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,g=!1;if(!(a instanceof CKEDITOR.editor))return!1;d=a.elementPath();if(this.checkApplicable(d,a))for(var e=0,f=this.group.length;e<f;e++){b=c[this.widget][this.group[e]];for(var h=0;h<
b.length;h++)b[h]!==this&&b[h].checkActive(d,a)&&(a.widgets.focused.removeStyle(b[h]),g=!0)}return g},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return h.isDomWidgetWrapper(a)?(a=a.getFirst(h.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},
toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];var b,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;c[a.styleableElements]={classes:b,propertiesOnly:!0};return c}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this):null},getClassesArray:function(){var a=this._.definition.attributes&&this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,
applyToObject:a})}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss(".cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display: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 f(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,c,d,g;for(d in b)c=b[d],(g=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:g,command:c.name,toolbar:"insert,10"});u(a)}}});f.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,b){b=CKEDITOR.tools.prototypedCopy(b);b.name=a;b._=b._||{};this.editor.fire("widgetDefinition",
b);b.template&&(b.template=new CKEDITOR.template(b.template));k(this.editor,b);d(this,b);return this.registered[a]=b},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)},checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=E(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=h.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));
c.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor,c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&q(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,
b){var c,d,g=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var g=d.count(),e=0;e<g;++e)(c=this.getByElement(d.getItem(e),!0))&&this.destroy(c)}else for(d in g)c=g[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&h.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;
var d=a(b);if(!c&&!d){var g=this.editor.editable();do b=b.getParent();while(b&&!b.equals(g)&&!(d=a(b)))}return this.instances[d]||null}}(),initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new h(this,this._.nextId++,a,b,c),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");
for(var b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(h.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?
c:null},wrapElement:function(a,c){var d=null,g,e;if(a instanceof CKEDITOR.dom.element){c=c||a.data("widget");g=this.registered[c];if(!g)return null;if((d=a.getParent())&&d.type==CKEDITOR.NODE_ELEMENT&&d.data("cke-widget-wrapper"))return d;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",c);(e=p(g,a.getName()))&&b(a);d=new CKEDITOR.dom.element(e?"span":"div");d.setAttributes(w(e,c));d.data("cke-display-name",g.pathName?g.pathName:a.getName());
a.getParent(!0)&&d.replace(a);a.appendTo(d)}else if(a instanceof CKEDITOR.htmlParser.element){c=c||a.attributes["data-widget"];g=this.registered[c];if(!g)return null;if((d=a.parent)&&d.type==CKEDITOR.NODE_ELEMENT&&d.attributes["data-cke-widget-wrapper"])return d;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);c&&(a.attributes["data-widget"]=c);(e=p(g,a.name))&&b(a);d=new CKEDITOR.htmlParser.element(e?"span":"div",w(e,c));d.attributes["data-cke-display-name"]=
g.pathName?g.pathName:a.name;g=a.parent;var f;g&&(f=a.getIndex(),a.remove());d.add(a);g&&v(g,f,d)}return d},_tests_createEditableFilter:a};CKEDITOR.event.implementOn(f.prototype);h.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(h.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){F(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 c=this.editables[a];c.removeListener("focus",C);c.removeListener("blur",O);this.editor.focusManager.remove(c);b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),
c.removeClass("cke_widget_editable_focused"),c.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var c,d;!1!==b.fire("dialog",a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);
d.removeListener();c&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){c.removeListener();d.removeListener()}))});return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(b,c){var d=this._findOneNotNested(c.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new e(this.editor,d,{filter:a.call(this.repository,this.name,b,c)}),this.editables[b]=
d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":b,"data-cke-enter-mode":d.enterMode}),d.filter&&d.data("cke-filter",d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),c.pathName&&d.data("cke-display-name",c.pathName),this.editor.focusManager.add(d),d.on("focus",C,this),CKEDITOR.env.ie&&d.on("blur",O,this),d._.initialSetData=!0,d.setData(d.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=
a.getItem(d),c=b.getAscendant(h.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper||!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(h.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){F(this,
a,0)},setData:function(a,b){var c=this.data,d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var g=a;for(a in g)c[a]!==g[a]&&(d=1,c[a]=g[a])}d&&this.dataReady&&(Q(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=
this.editor,b=this.element.$,c=this._.dragHandlerOffset,b={x:b.offsetLeft,y:b.offsetTop-15};c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px",display:"block"}),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(h.prototype);h.getNestedEditable=function(a,b){return!b||b.equals(a)?null:h.isDomNestedEditable(b)?b:h.getNestedEditable(a,b.getParent())};h.isDomDragHandler=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};h.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};h.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};h.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};h.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};
h.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};h.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};h.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};h.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";e.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 V=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,
T={37:1,38:1,39:1,40:1,8:1,46:1};CKEDITOR.plugins.widget=h;h.repository=f;h.nestedEditable=e}(),"use strict",function(){function f(b){function d(){this.deflated||(b.widgets.focused==this.widget&&(this.focused=!0),b.widgets.destroy(this.widget),this.deflated=!0)}function g(){var a=b.editable(),c=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=c.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 d=this.widget,a=f,c=d.wrapper,e=d.data.align,d=d.data.hasCaption;if(a){for(var h=3;h--;)c.removeClass(a[h]);"center"==e?d&&c.addClass(a[1]):"none"!=e&&c.addClass(a[v[e]])}else"center"==e?(d?c.setStyle("text-align","center"):c.removeStyle("text-align"),c.removeStyle("float")):("none"==e?c.removeStyle("float"):c.setStyle("float",
e),c.removeStyle("text-align"))}}var f=b.config.image2_alignClasses,k=b.config.image2_captionedClass;return{allowedContent:c(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:g});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 e in a)a[e]?c.setAttribute(e,a[e]):c.removeAttribute(e)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var a=CKEDITOR.plugins.image2,c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.getAttribute("width")||
"",height:c.getAttribute("height")||"",lock:this.ready?a.checkHasNaturalRatio(c):!0},g=c.getAscendant("a");g&&this.wrapper.contains(g)&&(this.parts.link=g);d.align||(c=d.hasCaption?this.element:c,f?(c.hasClass(f[0])?d.align="left":c.hasClass(f[2])&&(d.align="right"),d.align?c.removeClass(f[v[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float")));b.plugins.link&&this.parts.link&&(d.link=a.getLinkAttributesParser()(b,this.parts.link),(c=d.link.advanced)&&c.advCSSClasses&&
(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(d);b.filter.checkFeature(this.features.dimension)&&!0!==b.config.image2_disableResizer&&1!=b.readOnly&&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(k,f).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(b),downcast:e(b),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||
"")+" "+this.pathName)}}}function h(a){var b=k(a),c=a.config.image2_captionedClass;return function(a,g){var e={width:1,height:1},f=a.name,h;if(!a.attributes["data-cke-realelement"]&&(b(a)?("div"==f&&(h=a.getFirst("figure"))&&(a.replaceWith(h),a=h),g.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==f&&a.hasClass(c)?h=a.getFirst("img")||a.getFirst("a").getFirst("img"):d(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in e)(e=h.attributes[k])&&e.match(p)&&delete h.attributes[k];
return a}}}function e(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,g=this.data.align;if(!this.inline){var e=a.getFirst("span");e&&e.replaceWith(e.getFirst({img:1,a:1}))}g&&"none"!=g&&(e=CKEDITOR.tools.parseCssText(d.style||""),"center"==g&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):g in{left:1,right:1}&&(b?c.addClass(b[v[g]]):e["float"]=g),b||CKEDITOR.tools.isEmpty(e)||
(d.style=CKEDITOR.tools.writeCssText(e)));return a}}function k(a){var b=a.config.image2_captionedClass,c=a.config.image2_alignClasses,g={figure:1,a:1,img:1};return function(e){if(!(e.name in{div:1,p:1}))return!1;var f=e.children;if(1!==f.length)return!1;f=f[0];if(!(f.name in g))return!1;if("p"==e.name){if(!d(f))return!1}else if("figure"==f.name){if(!f.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!d(f))return!1;return(c?e.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(e.attributes.style||
"",!0)["text-align"])?!0:!1}}function d(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function l(a){var b=a.editor,c=b.editable(),d=b.document,g=a.resizer=d.createElement("span");g.addClass("cke_image_resizer");g.setAttribute("title",b.lang.image2.resizer);g.append(new CKEDITOR.dom.text("​",d));if(a.inline)a.wrapper.append(g);else{var e=a.parts.link||a.parts.image,f=e.getParent(),h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(e);h.append(g);
a.element.append(h,!0);f.is("span")&&f.remove()}g.on("mousedown",function(e){function f(a,b,c){var g=CKEDITOR.document,e=[];d.equals(g)||e.push(g.on(a,b));e.push(d.on(a,b));if(c)for(a=e.length;a--;)c.push(e.pop())}function h(){U=p+m*aa;Y=Math.round(U/D)}function k(){Y=B-M;U=Math.round(Y*D)}var l=a.parts.image,m="right"==a.data.align?-1:1,n=e.data.$.screenX,t=e.data.$.screenY,p=l.$.clientWidth,B=l.$.clientHeight,D=p/B,w=[],v="cke_image_s"+(~m?"e":"w"),K,U,Y,Z,aa,M,Q;b.fire("saveSnapshot");f("mousemove",
function(a){K=a.data.$;aa=K.screenX-n;M=t-K.screenY;Q=Math.abs(aa/M);1==m?0>=aa?0>=M?h():Q>=D?h():k():0>=M?Q>=D?k():h():k():0>=aa?0>=M?Q>=D?k():h():k():0>=M?h():Q>=D?h():k();15<=U&&15<=Y?(l.setAttributes({width:U,height:Y}),Z=!0):Z=!1},w);f("mouseup",function(){for(var d;d=w.pop();)d.removeListener();c.removeClass(v);g.removeClass("cke_image_resizing");Z&&(a.setData({width:U,height:Y}),b.fire("saveSnapshot"));Z=!1},w);c.addClass(v);g.addClass("cke_image_resizing")});a.on("data",function(){g["right"==
a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function m(a){var b=[],c;return function(d){var e=a.getCommand("justify"+d);if(e){b.push(function(){e.refresh(a,a.elementPath())});if(d in{right:1,left:1,center:1})e.on("exec",function(c){var e=g(a);if(e){e.setData("align",d);for(e=b.length;e--;)b[e]();c.cancel()}});e.on("refresh",function(b){var e=g(a),f={right:1,left:1,center:1};e&&(void 0===c&&(c=a.filter.checkFeature(a.widgets.registered.image.features.align)),c?this.setState(e.data.align==
d?CKEDITOR.TRISTATE_ON:d in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function b(a){a.plugins.link&&(CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var c=b.onShow,d=b.onOk;b.onShow=function(){var b=g(a),d=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),d.hide()):(d.show(),c.apply(this,
arguments))};b.onOk=function(){var b=g(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var c={};this.commitContent(c);b.setData("link",c)}else d.apply(this,arguments)}}}),a.getCommand("unlink").on("exec",function(b){var c=g(a);c&&c.parts.link&&(c.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())}),a.getCommand("unlink").on("refresh",function(b){var c=g(a);c&&(this.setState(c.data.link||c.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 c(a){var b=a.config.image2_alignClasses;a={div:{match:k(a)},p:{match:k(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 w=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),v={left:0,center:1,right:2},p=/^\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_widget_wrapper\x3ea{display:inline-block}")},
init:function(a){var b=a.config,c=a.lang.image2,d=f(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;d.pathName=c.pathName;d.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",d);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:c.menu,command:"image",group:"image"}));CKEDITOR.dialog.add("image2",
this.path+"dialogs/image2.js")},afterInit:function(a){var c={left:1,right:1,center:1,block:1},d=m(a),g;for(g in c)d(g);b(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,e){var f={};g?f.attributes={"class":g[1]}:f.styles={"text-align":"center"};f=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",f);c(f,e);e.move(f);return f}function c(b,d){if(d.getParent()){var g=a.createRange();g.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();f.insertElementIntoRange(b,
g)}else b.replace(d)}var d=a.document,g=a.config.image2_alignClasses,e=a.config.image2_captionedClass,f=a.editable(),h=["hasCaption","align","link"],k={align:function(c,d,e){var f=c.element;c.changed.align?c.newData.hasCaption||("center"==e&&(c.deflate(),c.element=b(a,f)),c.changed.hasCaption||"center"!=d||"center"==e||(c.deflate(),d=f.findOne("a,img"),d.replace(f),c.element=d)):"center"==e&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element=b(a,f));!g&&f.is("figure")&&("center"==
e?f.setStyle("display","inline-block"):f.removeStyle("display"))},hasCaption:function(b,g,f){b.changed.hasCaption&&(g=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),f?(f=CKEDITOR.dom.element.createFromHtml(w.output({captionedClass:e,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(f,b.element),g.replace(f.findOne("img")),b.element=f):(g.replace(b.element),b.element=g))},link:function(b,c,g){if(b.changed.link){var e=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")&&!g||b.element.is("img")&&g,k;h&&b.deflate();g?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(e),e.move(k)),g=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,g),CKEDITOR.tools.isEmpty(g.set)||(k||f).setAttributes(g.set),g.removed.length&&(k||f).removeAttributes(g.removed)):(g=f.findOne("img"),g.replace(f),k=g);h&&(b.element=k)}}};return function(a){var b,c;a.changed={};for(c=0;c<h.length;c++)b=
h[c],a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:!1;for(c=0;c<h.length;c++)b=h[c],k[b](a,a.oldData?a.oldData[b]:null,a.newData[b]);a.inflate()}},checkHasNaturalRatio:function(a){var b=a.$;a=this.getNatural(a);return Math.round(b.clientWidth/a.width*a.height)==b.clientHeight||Math.round(b.clientHeight/a.height*a.width)==b.clientWidth},getNatural:function(a){if(a.$.naturalWidth)a={width:a.$.naturalWidth,height:a.$.naturalHeight};else{var b=new Image;b.src=a.getAttribute("src");a={width:b.width,
height:b.height}}return a},getLinkAttributesGetter:function(){return CKEDITOR.plugins.link.getLinkAttributes},getLinkAttributesParser:function(){return CKEDITOR.plugins.link.parseLinkAttributes}}}(),CKEDITOR.config.image2_captionedClass="image",function(){function f(f,d){var l,m;d.on("refresh",function(b){var d=[h],c;for(c in b.data.states)d.push(b.data.states[c]);this.setState(CKEDITOR.tools.search(d,e)?e:h)},d,null,100);d.on("exec",function(b){l=f.getSelection();m=l.createBookmarks(1);b.data||(b.data=
{});b.data.done=!1},d,null,0);d.on("exec",function(){f.forceNextSelectionCheck();l.selectBookmarks(m)},d,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,e=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(e){var d=CKEDITOR.plugins.indent.genericDefinition;f(e,e.addCommand("indent",new d(!0)));f(e,e.addCommand("outdent",new d));e.ui.addButton&&(e.ui.addButton("Indent",{label:e.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),e.ui.addButton("Outdent",{label:e.lang.indent.outdent,
command:"outdent",directional:!0,toolbar:"indent,10"}));e.on("dirChanged",function(d){var f=e.createRange(),b=d.data.node;f.setStartBefore(b);f.setEndAfter(b);for(var g=new CKEDITOR.dom.walker(f),c;c=g.next();)if(c.type==CKEDITOR.NODE_ELEMENT)if(!c.equals(b)&&c.getDirection())f.setStartAfter(c),g=new CKEDITOR.dom.walker(f);else{var a=e.config.indentClasses;if(a)for(var h="ltr"==d.data.dir?["_rtl",""]:["","_rtl"],w=0;w<a.length;w++)c.hasClass(a[w]+h[0])&&(c.removeClass(a[w]+h[0]),c.addClass(a[w]+h[1]));
a=c.getStyle("margin-right");h=c.getStyle("margin-left");a?c.setStyle("margin-left",a):c.removeStyle("margin-left");h?c.setStyle("margin-right",h):c.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(e){this.isIndent=!!e;this.startDisabled=!this.isIndent},specificDefinition:function(e,d,f){this.name=d;this.editor=e;this.jobs={};this.enterBr=e.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!f;this.relatedGlobal=f?"indent":"outdent";this.indentKey=f?9:CKEDITOR.SHIFT+
9;this.database={}},registerCommands:function(e,d){e.on("pluginsLoaded",function(){for(var e in d)(function(d,b){var g=d.getCommand(b.relatedGlobal),c;for(c in b.jobs)g.on("exec",function(a){a.data.done||(d.fire("lockSnapshot"),b.execJob(d,c)&&(a.data.done=!0),d.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,c),g.on("refresh",function(a){a.data.states||(a.data.states={});a.data.states[b.name+"@"+c]=b.refreshJob(d,c,a.data.path)},this,null,c);d.addFeature(b)})(this,
d[e])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(e,d){var f=this.jobs[d];if(f.state!=h)return f.exec.call(this,e)},refreshJob:function(e,d,f){d=this.jobs[d];e.activeFilter.checkFeature(this)?d.state=d.refresh.call(this,e,f):d.state=h;return d.state},getContext:function(e){return e.contains(this.context)}}}(),function(){function f(b){function d(g){for(var h=k.startContainer,l=k.endContainer;h&&
!h.getParent().equals(g);)h=h.getParent();for(;l&&!l.getParent().equals(g);)l=l.getParent();if(!h||!l)return!1;for(var m=[],p=!1;!p;)h.equals(l)&&(p=!0),m.push(h),h=h.getNext();if(1>m.length)return!1;h=g.getParents(!0);for(l=0;l<h.length;l++)if(h[l].getName&&f[h[l].getName()]){g=h[l];break}for(var h=c.isIndent?1:-1,l=m[0],m=m[m.length-1],p=CKEDITOR.plugins.list.listToArray(g,a),t=p[m.getCustomData("listarray_index")].indent,l=l.getCustomData("listarray_index");l<=m.getCustomData("listarray_index");l++)if(p[l].indent+=
h,0<h){for(var r=p[l].parent,y=l-1;0<=y;y--)if(p[y].indent===h){r=p[y].parent;break}p[l].parent=new CKEDITOR.dom.element(r.getName(),r.getDocument())}for(l=m.getCustomData("listarray_index")+1;l<p.length&&p[l].indent>t;l++)p[l].indent+=h;h=CKEDITOR.plugins.list.arrayToList(p,a,null,b.config.enterMode,g.getDirection());if(!c.isIndent){var z;if((z=g.getParent())&&z.is("li"))for(var m=h.listNode.getChildren(),v=[],E,l=m.count()-1;0<=l;l--)(E=m.getItem(l))&&E.is&&E.is("li")&&v.push(E)}h&&h.listNode.replace(g);
if(v&&v.length)for(l=0;l<v.length;l++){for(E=g=v[l];(E=E.getNext())&&E.is&&E.getName()in f;)CKEDITOR.env.needsNbspFiller&&!g.getFirst(e)&&g.append(k.document.createText(" ")),g.append(E);g.insertAfter(z)}h&&b.fire("contentDomInvalidated");return!0}for(var c=this,a=this.database,f=this.context,k,l=b.getSelection(),l=(l&&l.getRanges()).createIterator();k=l.getNextRange();){for(var m=k.getCommonAncestor();m&&(m.type!=CKEDITOR.NODE_ELEMENT||!f[m.getName()]);){if(b.editable().equals(m)){m=!1;break}m=m.getParent()}m||
(m=k.startPath().contains(f))&&k.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);if(!m){var r=k.getEnclosedNode();r&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in f&&(k.setStartAt(r,CKEDITOR.POSITION_AFTER_START),k.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),m=r)}m&&k.startContainer.type==CKEDITOR.NODE_ELEMENT&&k.startContainer.getName()in f&&(r=new CKEDITOR.dom.walker(k),r.evaluator=h,k.startContainer=r.next());m&&k.endContainer.type==CKEDITOR.NODE_ELEMENT&&k.endContainer.getName()in f&&(r=new CKEDITOR.dom.walker(k),
r.evaluator=h,k.endContainer=r.previous());if(m)return d(m)}return 0}function h(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.is("li")}function e(b){return k(b)&&d(b)}var k=CKEDITOR.dom.walker.whitespaces(!0),d=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function d(a){c.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];a.on("key",function(b){var c=a.elementPath();
if("wysiwyg"==a.mode&&b.data.keyCode==this.indentKey&&c){var d=this.getContext(c);!d||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d)||(a.execCommand(this.relatedGlobal),b.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?m:l}:function(a,b){return!this.getContext(b)||this.isIndent?l:m},exec:CKEDITOR.tools.bind(f,this)}}
var c=CKEDITOR.plugins.indent;c.registerCommands(b,{indentlist:new d(b,"indentlist",!0),outdentlist:new d(b,"outdentlist")});CKEDITOR.tools.extend(d.prototype,c.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(b,d,c){var a=d.contains(h);c||(c=d.contains(b));return c&&a&&a.equals(c.getFirst(h))}}(),function(){function f(e,d){d=void 0===d||d;var f;if(d)f=e.getComputedStyle("text-align");else{for(;!e.hasAttribute||
!e.hasAttribute("align")&&!e.getStyle("text-align");){f=e.getParent();if(!f)break;e=f}f=e.getStyle("text-align")||e.getAttribute("align")||""}f&&(f=f.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!f&&d&&(f="rtl"==e.getComputedStyle("direction")?"right":"left");return f}function h(e,d,f){this.editor=e;this.name=d;this.value=f;this.context="p";d=e.config.justifyClasses;var h=e.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(d){switch(f){case "left":this.cssClassName=d[0];break;case "center":this.cssClassName=
d[1];break;case "right":this.cssClassName=d[2];break;case "justify":this.cssClassName=d[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+d.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent=h+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};e.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function e(e){var d=
e.editor,f=d.createRange();f.setStartBefore(e.data.node);f.setEndAfter(e.data.node);for(var h=new CKEDITOR.dom.walker(f),b;b=h.next();)if(b.type==CKEDITOR.NODE_ELEMENT)if(!b.equals(e.data.node)&&b.getDirection())f.setStartAfter(b),h=new CKEDITOR.dom.walker(f);else{var g=d.config.justifyClasses;g&&(b.hasClass(g[0])?(b.removeClass(g[0]),b.addClass(g[2])):b.hasClass(g[2])&&(b.removeClass(g[2]),b.addClass(g[0])));g=b.getStyle("text-align");"left"==g?b.setStyle("text-align","right"):"right"==g&&b.setStyle("text-align",
"left")}}h.prototype={exec:function(e){var d=e.getSelection(),h=e.config.enterMode;if(d){for(var m=d.createBookmarks(),b=d.getRanges(),g=this.cssClassName,c,a,n=e.config.useComputedState,n=void 0===n||n,w=b.length-1;0<=w;w--)for(c=b[w].createIterator(),c.enlargeBr=h!=CKEDITOR.ENTER_BR;a=c.getNextParagraph(h==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){var v=a.getName(),p;p=e.activeFilter.check(v+"{text-align}");if((v=e.activeFilter.check(v+"("+g+")"))||p){a.removeAttribute("align");a.removeStyle("text-align");
var r=g&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),q=this.state==CKEDITOR.TRISTATE_OFF&&(!n||f(a,!0)!=this.value);g&&v?q?a.addClass(g):r||a.removeAttribute("class"):q&&p&&a.setStyle("text-align",this.value)}}e.focus();e.forceNextSelectionCheck();d.selectBookmarks(m)}},refresh:function(e,d){var h=d.block||d.blockLimit,m=h.getName(),b=h.equals(e.editable()),m=this.cssClassName?e.activeFilter.check(m+"("+this.cssClassName+")"):e.activeFilter.check(m+"{text-align}");
b&&1===d.elements.length?this.setState(CKEDITOR.TRISTATE_OFF):!b&&m?this.setState(f(h,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(f){if(!f.blockless){var d=new h(f,"justifyleft","left"),l=new h(f,"justifycenter","center"),m=new h(f,"justifyright","right"),b=new h(f,"justifyblock","justify");f.addCommand("justifyleft",d);f.addCommand("justifycenter",l);f.addCommand("justifyright",
m);f.addCommand("justifyblock",b);f.ui.addButton&&(f.ui.addButton("JustifyLeft",{label:f.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),f.ui.addButton("JustifyCenter",{label:f.lang.common.center,command:"justifycenter",toolbar:"align,20"}),f.ui.addButton("JustifyRight",{label:f.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),f.ui.addButton("JustifyBlock",{label:f.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));f.on("dirChanged",e)}}})}(),CKEDITOR.plugins.add("menubutton",
{requires:"button,menu",onLoad:function(){var f=function(f){var e=this._,k=e.menu;e.state!==CKEDITOR.TRISTATE_DISABLED&&(e.on&&k?k.hide():(e.previousState=e.state,k||(k=e.menu=new CKEDITOR.menu(f,{panel:{className:"cke_menu_panel",attributes:{"aria-label":f.lang.common.options}}}),k.onHide=CKEDITOR.tools.bind(function(){var d=this.command?f.getCommand(this.command).modes:this.modes;this.setState(!d||d[f.mode]?e.previousState:CKEDITOR.TRISTATE_DISABLED);e.on=0},this),this.onMenu&&k.addListener(this.onMenu)),
this.setState(CKEDITOR.TRISTATE_ON),e.on=1,setTimeout(function(){k.show(CKEDITOR.document.getById(e.id),4)},0)))};CKEDITOR.ui.menuButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){delete h.panel;this.base(h);this.hasArrow=!0;this.click=f},statics:{handler:{create:function(f){return new CKEDITOR.ui.menuButton(f)}}}})},beforeInit:function(f){f.ui.addHandler(CKEDITOR.UI_MENUBUTTON,CKEDITOR.ui.menuButton.handler)}}),CKEDITOR.UI_MENUBUTTON="menubutton","use strict",function(){CKEDITOR.plugins.add("language",
{requires:"menubutton",init:function(f){var h=f.config.language_list||["ar:Arabic:rtl","fr:French","es:Spanish"],e=this,k=f.lang.language,d={},l,m,b,g;f.addCommand("language",{allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",contextSensitive:!0,exec:function(b,a){var g=d["language_"+a];if(g)b[g.style.checkActive(b.elementPath(),b)?"removeStyle":"applyStyle"](g.style)},refresh:function(b){this.setState(e.getCurrentLangElement(b)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}});for(g=
0;g<h.length;g++)l=h[g].split(":"),m=l[0],b="language_"+m,d[b]={label:l[1],langId:m,group:"language",order:g,ltr:"rtl"!=(""+l[2]).toLowerCase(),onClick:function(){f.execCommand("language",this.langId)},role:"menuitemcheckbox"},d[b].style=new CKEDITOR.style({element:"span",attributes:{lang:m,dir:d[b].ltr?"ltr":"rtl"}});d.language_remove={label:k.remove,group:"language_remove",state:CKEDITOR.TRISTATE_DISABLED,order:d.length,onClick:function(){var b=e.getCurrentLangElement(f);b&&f.execCommand("language",
b.getAttribute("lang"))}};f.addMenuGroup("language",1);f.addMenuGroup("language_remove");f.addMenuItems(d);f.ui.add("Language",CKEDITOR.UI_MENUBUTTON,{label:k.button,allowedContent:"span[!lang,!dir]",requiredContent:"span[lang,dir]",toolbar:"bidi,30",command:"language",onMenu:function(){var b={},a=e.getCurrentLangElement(f),g;for(g in d)b[g]=CKEDITOR.TRISTATE_OFF;b.language_remove=a?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a&&(b["language_"+a.getAttribute("lang")]=CKEDITOR.TRISTATE_ON);return b}});
f.addRemoveFormatFilter&&f.addRemoveFormatFilter(function(b){return!(b.is("span")&&b.getAttribute("dir")&&b.getAttribute("lang"))})},getCurrentLangElement:function(f){var h=f.elementPath();f=h&&h.elements;var e;if(h)for(var k=0;k<f.length;k++)h=f[k],!e&&"span"==h.getName()&&h.hasAttribute("dir")&&h.hasAttribute("lang")&&(e=h);return e}})}(),function(){function f(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||
m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var g=CKEDITOR.plugins.list.listToArray(b.root,c),e=[],f=0;f<b.contents.length;f++){var h=b.contents[f];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(f=0;f<e.length;f++)h=e[f].getCustomData("listarray_index"),g[h].indent=-1;for(f=h+1;f<g.length;f++)if(g[f].indent>g[f-1].indent+1){e=g[f-1].indent+
1-g[f].indent;for(h=g[f].indent;g[f]&&g[f].indent>=h;)g[f].indent+=e,f++;f--}var k=CKEDITOR.plugins.list.arrayToList(g,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();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 e(a,b,c,d){for(var g,e;g=a[d?"getLast":"getFirst"](v);)(e=g.getDirection(1))!==b.getDirection(1)&&g.setAttribute("dir",e),g.remove(),c?g[d?"insertBefore":
"insertAfter"](c):b.append(g,d)}function k(b){function c(d){var g=b[d?"getPrevious":"getNext"](a);g&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(b.getName())&&(e(b,g,null,!d),b.remove(),b=g)}c();c(1)}function d(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(b,c,d){b.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var g=d.extractContents();c.trim(!1,!0);var f=c.createBookmark(),
h=new CKEDITOR.dom.elementPath(c.startContainer),l=h.block,h=h.lastElement.getAscendant("li",1)||l,t=new CKEDITOR.dom.elementPath(d.startContainer),B=t.contains(CKEDITOR.dtd.$listItem),t=t.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():t&&(l=t.getPrevious(a))&&n(l)&&l.remove();(l=g.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=c.startContainer.getChild(c.startOffset))?g.insertBefore(l):c.startContainer.append(g);B&&(g=m(B))&&(h.contains(B)?(e(g,B.getParent(),B),
g.remove()):h.append(g));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){t=d.startPath();g=t.block;if(!g)break;g.is("li")&&(h=g.getParent(),g.equals(h.getLast(a))&&g.equals(h.getFirst(a))&&(g=h));d.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START);g.remove()}d=d.clone();g=b.editable();d.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(b){return a(b)&&!n(b)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&k(d);c.moveToBookmark(f);
c.select();b.fire("saveSnapshot")}function m(c){return(c=c.getLast(a))&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in b?c:null}var b={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),a=function(a){return!(g(a)||c(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,c,d,g,e){if(!b[a.getName()])return[];g||(g=0);d||(d=[]);for(var f=0,h=a.getChildCount();f<h;f++){var k=a.getChild(f);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&
CKEDITOR.plugins.list.listToArray(k,c,d,g+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:g,element:k,contents:[]};e?l.grandparent=e:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));c&&CKEDITOR.dom.element.setMarker(c,k,"listarray_index",d.length);d.push(l);for(var m=0,n=k.getChildCount(),w;m<n;m++)w=k.getChild(m),w.type==CKEDITOR.NODE_ELEMENT&&b[w.getName()]?CKEDITOR.plugins.list.listToArray(w,c,d,
g+1,l.grandparent):l.contents.push(w)}}return d},arrayToList:function(d,g,e,f,h){e||(e=0);if(!d||d.length<e+1)return null;for(var k,l=d[e].parent.getDocument(),m=new CKEDITOR.dom.documentFragment(l),n=null,y=e,z=Math.max(d[e].indent,0),w=null,v,F,H=f==CKEDITOR.ENTER_P?"p":"div";;){var G=d[y];k=G.grandparent;v=G.element.getDirection(1);if(G.indent==z){n&&d[y].parent.getName()==n.getName()||(n=d[y].parent.clone(!1,1),h&&n.setAttribute("dir",h),m.append(n));w=n.append(G.element.clone(0,1));v!=n.getDirection(1)&&
w.setAttribute("dir",v);for(k=0;k<G.contents.length;k++)w.append(G.contents[k].clone(1,1));y++}else if(G.indent==Math.max(z,0)+1)G=d[y-1].element.getDirection(1),y=CKEDITOR.plugins.list.arrayToList(d,null,y,f,G!=v?v:null),!w.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=l.$.documentMode&&w.append(l.createText(" ")),w.append(y.listNode),y=y.nextIndex;else if(-1==G.indent&&!e&&k){b[k.getName()]?(w=G.element.clone(!1,!0),v!=k.getDirection(1)&&w.setAttribute("dir",v)):w=new CKEDITOR.dom.documentFragment(l);
var n=k.getDirection(1)!=v,L=G.element,O=L.getAttribute("class"),C=L.getAttribute("style"),S=w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(f!=CKEDITOR.ENTER_BR||n||C||O),J,R=G.contents.length,K;for(k=0;k<R;k++)if(J=G.contents[k],c(J)&&1<R)S?K=J.clone(1,1):w.append(J.clone(1,1));else if(J.type==CKEDITOR.NODE_ELEMENT&&J.isBlockBoundary()){n&&!J.getDirection()&&J.setAttribute("dir",v);F=J;var U=L.getAttribute("style");U&&F.setAttribute("style",U.replace(/([^;])$/,"$1;")+(F.getAttribute("style")||""));O&&
J.addClass(O);F=null;K&&(w.append(K),K=null);w.append(J.clone(1,1))}else S?(F||(F=l.createElement(H),w.append(F),n&&F.setAttribute("dir",v)),C&&F.setAttribute("style",C),O&&F.setAttribute("class",O),K&&(F.append(K),K=null),F.append(J.clone(1,1))):w.append(J.clone(1,1));K&&((F||w).append(K),K=null);w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&y!=d.length-1&&(CKEDITOR.env.needsBrFiller&&(v=w.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("br")&&v.remove(),(v=w.getLast(a))&&v.type==CKEDITOR.NODE_ELEMENT&&
v.is(CKEDITOR.dtd.$block)||w.append(l.createElement("br")));v=w.$.nodeName.toLowerCase();"div"!=v&&"p"!=v||w.appendBogus();m.append(w);n=null;y++}else return null;F=null;if(d.length<=y||Math.max(d[y].indent,0)<z)break}if(g)for(d=m.getFirst();d;){if(d.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(g,d),d.getName()in CKEDITOR.dtd.$listItem&&(e=d,l=h=f=void 0,f=e.getDirection()))){for(h=e.getParent();h&&!(l=h.getDirection());)h=h.getParent();f==l&&e.removeAttribute("dir")}d=d.getNextSourceNode()}return{listNode:m,
nextIndex:y}}};var w=/^h[1-6]$/,v=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);h.prototype={exec:function(c){this.refresh(c,c.elementPath());var d=c.config,g=c.getSelection(),e=g&&g.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var h=c.editable();if(h.getFirst(a)){var l=1==e.length&&e[0];(d=l&&l.getEnclosedNode())&&d.is&&this.type==d.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else d.enterMode==CKEDITOR.ENTER_BR?h.appendBogus():e[0].fixBlock(1,d.enterMode==CKEDITOR.ENTER_P?"p":"div"),
g.selectRanges(e)}for(var d=g.createBookmarks(!0),h=[],m={},e=e.createIterator(),n=0;(l=e.getNextRange())&&++n;){var B=l.getBoundaryNodes(),y=B.startNode,z=B.endNode;y.type==CKEDITOR.NODE_ELEMENT&&"td"==y.getName()&&l.setStartAt(B.startNode,CKEDITOR.POSITION_AFTER_START);z.type==CKEDITOR.NODE_ELEMENT&&"td"==z.getName()&&l.setEndAt(B.endNode,CKEDITOR.POSITION_BEFORE_END);l=l.createIterator();for(l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;B=l.getNextParagraph();)if(!B.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(m,
B,"list_block",1);for(var v=c.elementPath(B),y=v.elements,z=0,v=v.blockLimit,E,F=y.length-1;0<=F&&(E=y[F]);F--)if(b[E.getName()]&&v.contains(E)){v.removeCustomData("list_group_object_"+n);(y=E.getCustomData("list_group_object"))?y.contents.push(B):(y={root:E,contents:[B]},h.push(y),CKEDITOR.dom.element.setMarker(m,E,"list_group_object",y));z=1;break}z||(z=v,z.getCustomData("list_group_object_"+n)?z.getCustomData("list_group_object_"+n).contents.push(B):(y={root:z,contents:[B]},CKEDITOR.dom.element.setMarker(m,
z,"list_group_object_"+n,y),h.push(y)))}}for(E=[];0<h.length;)if(y=h.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(b[y.root.getName()]){e=c;n=y;y=m;l=E;z=CKEDITOR.plugins.list.listToArray(n.root,y);v=[];for(B=0;B<n.contents.length;B++)F=n.contents[B],(F=F.getAscendant("li",!0))&&!F.getCustomData("list_item_processed")&&(v.push(F),CKEDITOR.dom.element.setMarker(y,F,"list_item_processed",!0));for(var F=n.root.getDocument(),H=void 0,G=void 0,B=0;B<v.length;B++){var L=v[B].getCustomData("listarray_index"),
H=z[L].parent;H.is(this.type)||(G=F.createElement(this.type),H.copyAttributes(G,{start:1,type:1}),G.removeStyle("list-style-type"),z[L].parent=G)}y=CKEDITOR.plugins.list.arrayToList(z,y,null,e.config.enterMode);z=void 0;v=y.listNode.getChildCount();for(B=0;B<v&&(z=y.listNode.getChild(B));B++)z.getName()==this.type&&l.push(z);y.listNode.replace(n.root);e.fire("contentDomInvalidated")}else{z=c;l=y;B=E;v=l.contents;e=l.root.getDocument();n=[];1==v.length&&v[0].equals(l.root)&&(y=e.createElement("div"),
v[0].moveChildren&&v[0].moveChildren(y),v[0].append(y),v[0]=y);l=l.contents[0].getParent();for(F=0;F<v.length;F++)l=l.getCommonAncestor(v[F].getParent());H=z.config.useComputedState;z=y=void 0;H=void 0===H||H;for(F=0;F<v.length;F++)for(G=v[F];L=G.getParent();){if(L.equals(l)){n.push(G);!z&&G.getDirection()&&(z=1);G=G.getDirection(H);null!==y&&(y=y&&y!=G?null:G);break}G=L}if(!(1>n.length)){v=n[n.length-1].getNext();F=e.createElement(this.type);B.push(F);for(H=B=void 0;n.length;)B=n.shift(),H=e.createElement("li"),
G=B,G.is("pre")||w.test(G.getName())||"false"==G.getAttribute("contenteditable")?B.appendTo(H):(B.copyAttributes(H),y&&B.getDirection()&&(H.removeStyle("direction"),H.removeAttribute("dir")),B.moveChildren(H),B.remove()),H.appendTo(F);y&&z&&F.setAttribute("dir",y);v?F.insertBefore(v):F.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&b[y.root.getName()]&&f.call(this,c,y,m);for(F=0;F<E.length;F++)k(E[F]);CKEDITOR.dom.element.clearAllMarkers(m);g.selectBookmarks(d);c.focus()},refresh:function(a,
c){var d=c.contains(b,1),g=c.blockLimit||c.root;d&&g.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(c){c.blockless||(c.addCommand("numberedlist",new h("numberedlist","ol")),c.addCommand("bulletedlist",new h("bulletedlist","ul")),c.ui.addButton&&(c.ui.addButton("NumberedList",{label:c.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),
c.ui.addButton("BulletedList",{label:c.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),c.on("key",function(g){var e=g.data.domEvent.getKey(),f;if("wysiwyg"==c.mode&&e in{8:1,46:1}){var h=c.getSelection().getRanges()[0],k=h&&h.startPath();if(h&&h.collapsed){var w=8==e,t=c.editable(),v=new CKEDITOR.dom.walker(h.clone());v.evaluator=function(b){return a(b)&&!n(b)};v.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};e=h.clone();if(w){var y;
(y=k.contains(b))&&h.checkBoundaryOfElement(y,CKEDITOR.START)&&(y=y.getParent())&&y.is("li")&&(y=m(y))?(f=y,y=y.getPrevious(a),e.moveToPosition(y&&n(y)?y:f,CKEDITOR.POSITION_BEFORE_START)):(v.range.setStartAt(t,CKEDITOR.POSITION_AFTER_START),v.range.setEnd(h.startContainer,h.startOffset),(y=v.previous())&&y.type==CKEDITOR.NODE_ELEMENT&&(y.getName()in b||y.is("li"))&&(y.is("li")||(v.range.selectNodeContents(y),v.reset(),v.evaluator=d,y=v.previous()),f=y,e.moveToElementEditEnd(f),e.moveToPosition(e.endPath().block,
CKEDITOR.POSITION_BEFORE_END)));if(f)l(c,e,h),g.cancel();else{var z=k.contains(b);z&&h.checkBoundaryOfElement(z,CKEDITOR.START)&&(f=z.getFirst(a),h.checkBoundaryOfElement(f,CKEDITOR.START)&&(y=z.getPrevious(a),m(f)?y&&(h.moveToElementEditEnd(y),h.select()):c.execCommand("outdent"),g.cancel()))}}else if(f=k.contains("li")){if(v.range.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),w=(t=f.getLast(a))&&d(t)?t:f,k=0,(y=v.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.getName()in b&&y.equals(t)?(k=1,y=v.next()):h.checkBoundaryOfElement(w,
CKEDITOR.END)&&(k=2),k&&y){h=h.clone();h.moveToElementEditStart(y);if(1==k&&(e.optimize(),!e.startContainer.equals(f))){for(f=e.startContainer;f.is(CKEDITOR.dtd.$inline);)z=f,f=f.getParent();z&&e.moveToPosition(z,CKEDITOR.POSITION_AFTER_END)}2==k&&(e.moveToPosition(e.endPath().block,CKEDITOR.POSITION_BEFORE_END),h.endPath().block&&h.moveToPosition(h.endPath().block,CKEDITOR.POSITION_AFTER_START));l(c,e,h);g.cancel()}}else v.range.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),(y=v.next())&&y.type==CKEDITOR.NODE_ELEMENT&&
y.is(b)&&(y=y.getFirst(a),k.block&&h.checkStartOfBlock()&&h.checkEndOfBlock()?(k.block.remove(),h.moveToElementEditStart(y),h.select()):m(y)?(h.moveToElementEditStart(y),h.select()):(h=h.clone(),h.moveToElementEditStart(y),l(c,e,h)),g.cancel());setTimeout(function(){c.selectionChange(1)})}}}))}})}(),"use strict",function(){function f(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(ca(a)||W(a)||w(a))}))}function h(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}
function e(a){var b=a.element;if(b&&n(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=m(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function k(a,b,c){D(a,b);D(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function d(b,c,d){return c=c[d?"getPrevious":"getNext"](function(c){return c&&c.type==CKEDITOR.NODE_TEXT&&!ca(c)||n(c)&&!w(c)&&!a(b,c)})}function l(a,b,c){return a>b&&a<c}function m(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 b(a){var b=a.doc,c=E('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+V+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),d=CKEDITOR.getUrl(this.path+"images/"+(F.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");z(c,{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:V+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+d+") center no-repeat "+a.boxColor+";cursor:pointer;"+(F.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(F.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(P,b),{base:T+
"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(P,b),{base:T+"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(){D(a,this);var b=a.holdDistance,c=this.size;return c&&l(a.mouse.y,
c.top-b,c.bottom+b)&&l(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,g=d.upper,e=d.lower,f=g||e,h=f.getParent(),k={};this.trigger=d;g&&D(a,g,!0);e&&D(a,e,!0);D(a,h,!0);a.inInlineMode&&t(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=f.size.left-f.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=f.size.outerWidth+f.size.margin.left+f.size.margin.right+b.scroll.x,k.right="");g&&e?
k.top=g.size.margin.bottom===e.size.margin.top?0|g.size.bottom+g.size.margin.bottom/2:g.size.margin.bottom<e.size.margin.top?g.size.bottom+g.size.margin.bottom:g.size.bottom+g.size.margin.bottom-e.size.margin.top:g?e||(k.top=g.size.bottom+g.size.margin.bottom):k.top=e.size.top-e.size.margin.top;d.is(R)||l(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(R)):d.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(U));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,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new I("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);
c.look(U);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();g(a,function(b){var c=a.line.trigger;b[c.is(O)?"insertBefore":"insertAfter"](c.is(O)?c.lower:c.upper)},!0);a.editor.focus();F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});c.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=c}function g(a,b,c){var d=new CKEDITOR.dom.range(a.doc),g=a.editor,e;F.ie&&a.enterMode==CKEDITOR.ENTER_BR?e=a.doc.createText(Y):
(e=(e=m(a.element,!0))&&e.data("cke-enter-mode")||a.enterMode,e=new I(L[e],a.doc),e.is("br")||a.doc.createText(Y).appendTo(e));c&&g.fire("saveSnapshot");b(e);d.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);g.getSelection().selectRanges([d]);a.hotNode=e;c&&g.fire("saveSnapshot")}function c(a,b){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function c(d){var e=F.ie&&9>F.version?" ":Y,f=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;g(a,function(c){f&&
a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](d);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(g){g=g.getSelection().getStartElement();var f;g=g.getAscendant(Q,1);if(!r(a,g)&&g&&!g.equals(a.editable)&&!g.contains(a.editable)){(f=m(g))&&"false"==f.getAttribute("contenteditable")&&(g=f);a.element=g;f=d(a,g,!b);var h;n(f)&&f.is(a.triggers)&&
f.is(M)&&(!d(a,f,!b)||(h=d(a,f,!b))&&n(h)&&h.is(a.triggers))?c(f):(h=e(a,g),n(h)&&(d(a,h,!b)?(g=d(a,h,!b))&&n(g)&&g.is(a.triggers)&&c(h):c(h)))}}}()}}function a(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!n(a))return!1;var b;(b=v(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1,
fixed:1}[a.getComputedStyle("position")]}function p(a,b){return n(b)?b.is(a.triggers):null}function r(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var g=a.tabuList.length;g--;)if(c[d].hasAttribute(a.tabuList[g]))return!0;return!1}function q(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(aa)});if(!b)return!1;D(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function u(b){var c=b.editable,d=b.mouse,g=b.view,e=b.triggerOffset;t(b);var f=d.y>
(b.inInlineMode?g.editable.top+g.editable.height/2:Math.min(g.editable.height,g.pane.height)/2),c=c[f?"getLast":"getFirst"](function(a){return!(ca(a)||W(a))});if(!c)return null;a(b,c)&&(c=b.line.wrap[f?"getPrevious":"getNext"](function(a){return!(ca(a)||W(a))}));if(!n(c)||w(c)||!p(b,c))return null;D(b,c);return!f&&0<=c.size.top&&l(d.y,0,c.size.top+e)?(b=b.inInlineMode||0===g.scroll.y?R:U,new h([null,c,O,J,b])):f&&c.size.bottom<=g.pane.height&&l(d.y,c.size.bottom-e,g.pane.height)?(b=b.inInlineMode||
l(c.size.bottom,g.pane.height-e,g.pane.height)?K:U,new h([c,null,C,J,b])):null}function x(a){var b=a.mouse,c=a.view,g=a.triggerOffset,f=e(a);if(!f)return null;D(a,f);var g=Math.min(g,0|f.size.outerHeight/2),k=[],m,u;if(l(b.y,f.size.top-1,f.size.top+g))u=!1;else if(l(b.y,f.size.bottom-g,f.size.bottom+1))u=!0;else return null;if(w(f)||q(a,f,u)||f.getParent().is(Z))return null;var x=d(a,f,!u);if(x){if(x&&x.type==CKEDITOR.NODE_TEXT)return null;if(n(x)){if(w(x)||!p(a,x)||x.getParent().is(Z))return null;
k=[x,f][u?"reverse":"concat"]().concat([S,J])}}else f.equals(a.editable[u?"getLast":"getFirst"](a.isRelevant))?(t(a),u&&l(b.y,f.size.bottom-g,c.pane.height)&&l(f.size.bottom,c.pane.height-g,c.pane.height)?m=K:l(b.y,0,f.size.top+g)&&(m=R)):m=U,k=[null,f][u?"reverse":"concat"]().concat([u?C:O,J,m,f.equals(a.editable[u?"getLast":"getFirst"](a.isRelevant))?u?K:R:U]);return 0 in k?new h(k):null}function A(a,b,c,d){for(var g=b.getDocumentPosition(),e={},f={},h={},k={},l=da.length;l--;)e[da[l]]=parseInt(b.getComputedStyle.call(b,
"border-"+da[l]+"-width"),10)||0,h[da[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+da[l]),10)||0,f[da[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+da[l]),10)||0;c&&!d||B(a,d);k.top=g.y-(c?0:a.view.scroll.y);k.left=g.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+e.top+e.bottom);k.width=k.outerWidth-(h.left+h.right+e.left+e.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,
left:b.$.scrollLeft});return z({border:e,padding:h,margin:f,ignoreScroll:c},k,!0)}function D(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-N)return null;return z(b.size,A(a,b,c),{date:+new Date},!0)}function t(a,b){a.view.editable=A(a,a.editable,b,!0)}function B(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-N)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();z(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-
d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function y(a,b,c,d){for(var g=d,e=d,f=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+f<m&&0<n.y-f;){k||(k=b(g,d));l||(l=b(e,d));!k&&0<n.y-f&&(g=c(a,{x:n.x,y:n.y-f}));!l&&n.y+f<m&&(e=c(a,{x:n.x,y:n.y+f}));if(k&&l)break;f+=2}return new h([g,e,null,null])}CKEDITOR.plugins.add("magicline",{init:function(f){var k=f.config,l=k.magicline_triggerOffset||30,m={editor:f,
enterMode:k.enterMode,triggerOffset:l,holdDistance:0|l*(k.magicline_holdDistance||.5),boxColor:k.magicline_color||"#ff0000",rtl:"rtl"==k.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(k.magicline_tabuList||[]),triggers:k.magicline_everywhere?Q:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},q,p,y;m.isRelevant=function(b){return n(b)&&!a(m,b)&&!w(b)};f.on("contentDom",function(){var l=f.editable(),n=f.document,w=f.window;z(m,{editable:l,inInlineMode:l.isInline(),doc:n,win:w,
hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();l.is(G.$inline)||(m.inInlineMode&&!v(l)&&l.setStyles({position:"relative",top:null,left:null}),b.call(this,m),B(m),l.attachListener(f,"beforeUndoImage",function(){m.line.detach()}),l.attachListener(f,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),f.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),l.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(a){if("wysiwyg"==
f.mode)if(m.inInlineMode){var b=a.data.$.clientX;a=a.data.$.clientY;B(m);t(m,!0);var c=m.view.editable,d=m.view.scroll;b>c.left-d.x&&b<c.right-d.x&&a>c.top-d.y&&a<c.bottom-d.y||(clearTimeout(y),y=null,m.line.detach())}else clearTimeout(y),y=null,m.line.detach()}),l.attachListener(l,"keyup",function(){m.hiddenMode=0}),l.attachListener(l,"keydown",function(a){if("wysiwyg"==f.mode)switch(a.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),l.attachListener(m.inInlineMode?l:n,
"mousemove",function(a){p=!0;if("wysiwyg"==f.mode&&!f.readOnly&&!y){var b={x:a.data.$.clientX,y:a.data.$.clientY};y=setTimeout(function(){m.mouse=b;y=m.trigger=null;B(m);p&&!m.hiddenMode&&f.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=X(m,!0))&&((m.trigger=u(m)||x(m)||ba(m))&&!r(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),p=!1)},30)}}),l.attachListener(w,"scroll",function(){"wysiwyg"==f.mode&&(m.line.detach(),F.webkit&&(m.hiddenMode=1,clearTimeout(q),
q=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),l.attachListener(H?n:w,"mousedown",function(){"wysiwyg"==f.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),l.attachListener(H?n:w,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),f.addCommand("accessPreviousSpace",c(m)),f.addCommand("accessNextSpace",c(m,!0)),f.setKeystroke([[k.magicline_keystrokePrevious,"accessPreviousSpace"],[k.magicline_keystrokeNext,"accessNextSpace"]]),f.on("loadSnapshot",function(){var a,b,c,d;for(d in{p:1,
br:1,div:1})for(a=f.document.getElementsByTag(d),c=a.count();c--;)if((b=a.getItem(c)).data("cke-magicline-hot")){m.hotNode=b;m.lastCmdDirection="true"===b.data("cke-magicline-dir")?!0:!1;return}}),this.backdoor={accessFocusSpace:g,boxTrigger:h,isLine:a,getAscendantTrigger:e,getNonEmptyNeighbour:d,getSize:A,that:m,triggerEdge:x,triggerEditable:u,triggerExpand:ba})},this)}});var z=CKEDITOR.tools.extend,I=CKEDITOR.dom.element,E=I.createFromHtml,F=CKEDITOR.env,H=CKEDITOR.env.ie&&9>CKEDITOR.env.version,
G=CKEDITOR.dtd,L={},O=128,C=64,S=32,J=16,R=4,K=2,U=1,Y=" ",Z=G.$listItem,aa=G.$tableContent,M=z({},G.$nonEditable,G.$empty),Q=G.$block,N=100,V="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",T=V+"border-color:transparent;display:block;border-style:solid;",P="\x3cspan\x3e"+Y+"\x3c/span\x3e";L[CKEDITOR.ENTER_BR]="br";L[CKEDITOR.ENTER_P]="p";L[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties=
a+b+(c||U);return this},is:function(a){return(this.properties&a)==a}};var X=function(){function b(a,c){var d=a.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(c,d,g){if(!c.mouse)return null;var e=c.doc,f=c.line.wrap;g=g||c.mouse;var h=b(e,g);d&&a(c,h)&&(f.hide(),h=b(e,g),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||F.ie&&9>F.version&&!c.boundary.equals(h)&&!c.boundary.contains(h)?null:h}}(),ca=CKEDITOR.dom.walker.whitespaces(),W=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),
ba=function(){function b(a){var d=a.element,g,e,h;if(!n(d)||d.contains(a.editable)||d.isReadOnly())return null;h=y(a,function(a,b){return!b.equals(a)},function(a,b){return X(a,!0,b)},d);g=h.upper;e=h.lower;if(f(a,g,e))return h.set(S,8);if(g&&d.contains(g))for(;!g.getParent().equals(d);)g=g.getParent();else g=d.getFirst(function(b){return c(a,b)});if(e&&d.contains(e))for(;!e.getParent().equals(d);)e=e.getParent();else e=d.getLast(function(b){return c(a,b)});if(!g||!e)return null;D(a,g);D(a,e);if(!l(a.mouse.y,
g.size.top,e.size.bottom))return null;for(var d=Number.MAX_VALUE,m,t,q,u;e&&!e.equals(g)&&(t=g.getNext(a.isRelevant));)m=Math.abs(k(a,g,t)-a.mouse.y),m<d&&(d=m,q=g,u=t),g=t,D(a,g);if(!q||!u||!l(a.mouse.y,q.size.top,u.size.bottom))return null;h.upper=q;h.lower=u;return h.set(S,8)}function c(b,d){return!(d&&d.type==CKEDITOR.NODE_TEXT||W(d)||w(d)||a(b,d)||d.type==CKEDITOR.NODE_ELEMENT&&d.$&&d.is("br"))}return function(a){var c=b(a),d;if(d=c){d=c.upper;var g=c.lower;d=!d||!g||w(g)||w(d)||g.equals(d)||
d.equals(g)||g.contains(d)||d.contains(g)?!1:p(a,d)&&p(a,g)&&f(a,d,g)?!0:!1}return d?c:null}}(),da=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){function f(d){if(!d||d.type!=CKEDITOR.NODE_ELEMENT||"form"!=d.getName())return[];for(var e=[],b=["style","className"],g=0;g<b.length;g++){var c=d.$.elements.namedItem(b[g]);c&&(c=new CKEDITOR.dom.element(c),e.push([c,
c.nextSibling]),c.remove())}return e}function h(d,e){if(d&&d.type==CKEDITOR.NODE_ELEMENT&&"form"==d.getName()&&0<e.length)for(var b=e.length-1;0<=b;b--){var g=e[b][0],c=e[b][1];c?g.insertBefore(c):g.appendTo(d)}}function e(d,e){var b=f(d),g={},c=d.$;e||(g["class"]=c.className||"",c.className="");g.inline=c.style.cssText||"";e||(c.style.cssText="position: static; overflow: visible");h(b);return g}function k(d,e){var b=f(d),g=d.$;"class"in e&&(g.className=e["class"]);"inline"in e&&(g.style.cssText=
e.inline);h(b)}function d(d){if(!d.editable().isInline()){var e=CKEDITOR.instances,b;for(b in e){var g=e[b];"wysiwyg"!=g.mode||g.readOnly||(g=g.document.getBody(),g.setAttribute("contentEditable",!1),g.setAttribute("contentEditable",!0))}d.editable().hasFocus&&(d.toolbox.focus(),d.focus())}}CKEDITOR.plugins.add("maximize",{init:function(f){function h(){var a=c.getViewPaneSize();f.resize(a.width,a.height,null,!0)}if(f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=f.lang,g=CKEDITOR.document,c=g.getWindow(),
a,n,w,v=CKEDITOR.TRISTATE_OFF;f.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},readOnly:1,editorFocus:!1,exec:function(){var p=f.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),r=f.ui.space("contents");if("wysiwyg"==f.mode){var q=f.getSelection();a=q&&q.getRanges();n=c.getScrollPosition()}else{var u=f.editable().$;a=!CKEDITOR.env.ie&&[u.selectionStart,u.selectionEnd];n=[u.scrollLeft,u.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){c.on("resize",
h);w=c.getScrollPosition();for(q=f.container;q=q.getParent();)q.setCustomData("maximize_saved_styles",e(q)),q.setStyle("z-index",f.config.baseFloatZIndex-5);r.setCustomData("maximize_saved_styles",e(r,!0));p.setCustomData("maximize_saved_styles",e(p,!0));r={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};g.getDocumentElement().setStyles(r);!CKEDITOR.env.gecko&&g.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||g.getBody().setStyles(r);CKEDITOR.env.ie?
setTimeout(function(){c.$.scrollTo(0,0)},0):c.$.scrollTo(0,0);p.setStyle("position",CKEDITOR.env.gecko&&CKEDITOR.env.quirks?"fixed":"absolute");p.$.offsetLeft;p.setStyles({"z-index":f.config.baseFloatZIndex-5,left:"0px",top:"0px"});p.addClass("cke_maximized");h();r=p.getDocumentPosition();p.setStyles({left:-1*r.x+"px",top:-1*r.y+"px"});CKEDITOR.env.gecko&&d(f)}else if(this.state==CKEDITOR.TRISTATE_ON){c.removeListener("resize",h);for(var q=[r,p],x=0;x<q.length;x++)k(q[x],q[x].getCustomData("maximize_saved_styles")),
q[x].removeCustomData("maximize_saved_styles");for(q=f.container;q=q.getParent();)k(q,q.getCustomData("maximize_saved_styles")),q.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){c.$.scrollTo(w.x,w.y)},0):c.$.scrollTo(w.x,w.y);p.removeClass("cke_maximized");CKEDITOR.env.webkit&&(p.setStyle("display","inline"),setTimeout(function(){p.setStyle("display","block")},0));f.fire("resize",{outerHeight:f.container.$.offsetHeight,contentsHeight:r.$.offsetHeight,outerWidth:f.container.$.offsetWidth})}this.toggleState();
if(q=this.uiItems[0])r=this.state==CKEDITOR.TRISTATE_OFF?b.maximize.maximize:b.maximize.minimize,q=CKEDITOR.document.getById(q._.id),q.getChild(1).setHtml(r),q.setAttribute("title",r),q.setAttribute("href",'javascript:void("'+r+'");');"wysiwyg"==f.mode?a?(CKEDITOR.env.gecko&&d(f),f.getSelection().selectRanges(a),(u=f.getSelection().getStartElement())&&u.scrollIntoView(!0)):c.$.scrollTo(n.x,n.y):(a&&(u.selectionStart=a[0],u.selectionEnd=a[1]),u.scrollLeft=n[0],u.scrollTop=n[1]);a=n=null;v=this.state;
f.fire("maximize",this.state)},canUndo:!1});f.ui.addButton&&f.ui.addButton("Maximize",{label:b.maximize.maximize,command:"maximize",toolbar:"tools,10"});f.on("mode",function(){var a=f.getCommand("maximize");a.setState(a.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:v)},null,null,100)}}})}(),function(){function f(f,e,k){var d=CKEDITOR.cleanWord;d?k():(f=CKEDITOR.getUrl(f.config.pasteFromWordCleanupFile||e+"filter/default.js"),CKEDITOR.scriptLoader.load(f,k,null,!0));return!d}CKEDITOR.plugins.add("pastefromword",
{requires:"clipboard",init:function(h){function e(d){var b=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,g,c=[];if(b&&d.editor.filter.check("img[src]")&&(g=b.extractTagsFromHtml(d.data.dataValue),0!==g.length&&(b=b.extractFromRtf(d.data.dataTransfer["text/rtf"]),0!==b.length&&(CKEDITOR.tools.array.forEach(b,function(a){c.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),g.length===c.length))))for(b=
0;b<g.length;b++)0===g[b].indexOf("file://")&&c[b]&&(d.data.dataValue=d.data.dataValue.replace(g[b],c[b]))}var k=0,d=this.path,l=void 0===h.config.pasteFromWord_inlineImages?!0:h.config.pasteFromWord_inlineImages;h.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(d,b){k=1;d.execCommand("paste",{type:"html",notification:b&&"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteFromWord",{label:h.lang.pastefromword.toolbar,command:"pastefromword",
toolbar:"clipboard,50"});h.on("paste",function(e){var b=e.data,g=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?b.dataTransfer.getData("text/html",!0):null,c=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?b.dataTransfer.getData("text/rtf"):null,g=g||b.dataValue,a={dataValue:g,dataTransfer:{"text/rtf":c}},c=/(class=\"?Mso|style=(?:\"|\')[^\"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,c=/<meta\s*name=(?:\"|\')?generator(?:\"|\')?\s*content=(?:\"|\')?microsoft/gi.test(g)||c.test(g);if(g&&
(k||c)&&(!1!==h.fire("pasteFromWord",a)||k)){b.dontFilter=!0;var l=f(h,d,function(){if(l)h.fire("paste",b);else if(!h.config.pasteFromWordPromptCleanup||k||confirm(h.lang.pastefromword.confirmCleanup))a.dataValue=CKEDITOR.cleanWord(a.dataValue,h),h.fire("afterPasteFromWord",a),b.dataValue=a.dataValue,!0===h.config.forcePasteAsPlainText?b.type="text":CKEDITOR.env.ie&&"allow-word"===h.config.forcePasteAsPlainText&&(b.type="html");k=0});l&&e.cancel()}},null,null,3);if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&
l)h.on("afterPasteFromWord",e)}})}(),function(){var f={canUndo:!1,async:!0,exec:function(f,e){var k=f.lang,d=CKEDITOR.tools.keystrokeToString(k.common.keyboard,f.getCommandKeystroke(CKEDITOR.env.ie?f.commands.paste:this)),l=e&&"undefined"!==typeof e.notification?e.notification:!e||!e.from||"keystrokeHandler"===e.from&&CKEDITOR.env.ie,k=l&&"string"===typeof l?l:k.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+d.aria+'"\x3e'+d.display+"\x3c/kbd\x3e");f.execCommand("paste",{type:"text",
notification:l?k:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var e=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",f);h.setKeystroke(e,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",function(e){"html"!=e.data.type&&(e.data.type="text")});h.on("pasteState",
function(e){h.getCommand("pastetext").setState(e.data)})}})}(),CKEDITOR.plugins.add("removeformat",{init:function(f){f.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);f.ui.addButton&&f.ui.addButton("RemoveFormat",{label:f.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(f){for(var h=f._.removeFormatRegex||(f._.removeFormatRegex=new RegExp("^(?:"+f.config.removeFormatTags.replace(/,/g,
"|")+")$","i")),e=f._.removeAttributes||(f._.removeAttributes=f.config.removeFormatAttributes.split(",")),k=CKEDITOR.plugins.removeformat.filter,d=f.getSelection().getRanges(),l=d.createIterator(),m=function(a){return a.type==CKEDITOR.NODE_ELEMENT},b;b=l.getNextRange();){b.collapsed||b.enlarge(CKEDITOR.ENLARGE_ELEMENT);var g=b.createBookmark(),c=g.startNode,a=g.endNode,n=function(a){for(var b=f.elementPath(a),c=b.elements,d=1,g;(g=c[d])&&!g.equals(b.block)&&!g.equals(b.blockLimit);d++)h.test(g.getName())&&
k(f,g)&&a.breakParent(g)};n(c);if(a)for(n(a),c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);c&&!c.equals(a);)if(c.isReadOnly()){if(c.getPosition(a)&CKEDITOR.POSITION_CONTAINS)break;c=c.getNext(m)}else n=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==c.getName()&&c.data("cke-realelement")||!k(f,c)||(h.test(c.getName())?c.remove(1):(c.removeAttributes(e),f.fire("removeFormatCleanup",c))),c=n;b.moveToBookmark(g)}f.forceNextSelectionCheck();f.getSelection().selectRanges(d)}}},filter:function(f,
h){for(var e=f._.removeFormatFilters||[],k=0;k<e.length;k++)if(!1===e[k](h))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(f){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(f)},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 f(e,f,d){var l,
m;if(d="string"==typeof d?CKEDITOR.document.getById(d):new CKEDITOR.dom.element(d))if(l=e.fire("uiSpace",{space:f,html:""}).html)e.on("uiSpace",function(b){b.data.space==f&&b.cancel()},null,null,1),m=d.append(CKEDITOR.dom.element.createFromHtml(h.output({id:e.id,name:e.name,langDir:e.lang.dir,langCode:e.langCode,space:f,spaceId:e.ui.spaceId(f),content:l}))),d.getCustomData("cke_hasshared")?m.hide():d.setCustomData("cke_hasshared",1),m.unselectable(),m.on("mousedown",function(b){b=b.data;b.getTarget().hasAscendant("a",
1)||b.preventDefault()}),e.focusManager.add(m,1),e.on("focus",function(){for(var b=0,g,c=d.getChildren();g=c.getItem(b);b++)g.type==CKEDITOR.NODE_ELEMENT&&!g.equals(m)&&g.hasClass("cke_shared")&&g.hide();m.show()}),e.on("destroy",function(){m.remove()})}var h=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(e){e.on("loaded",function(){var h=e.config.sharedSpaces;if(h)for(var d in h)f(e,d,h[d])},null,null,9)}})}(),function(){var f={readOnly:1,preserveState:!0,editorFocus:!1,exec:function(f){this.toggleState();this.refresh(f)},refresh:function(f){if(f.document){var e=
this.state!=CKEDITOR.TRISTATE_ON||f.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&!f.focusManager.hasFocus?"removeClass":"attachClass";f.editable()[e]("cke_show_blocks")}}};CKEDITOR.plugins.add("showblocks",{onLoad:function(){var f="p div pre address blockquote h1 h2 h3 h4 h5 h6".split(" "),e,k,d,l,m=CKEDITOR.getUrl(this.path),b=!(CKEDITOR.env.ie&&9>CKEDITOR.env.version),g=b?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",c,a;for(e=k=d=l="";c=f.pop();)a=f.length?",":"",e+=".cke_show_blocks "+
c+g+a,d+=".cke_show_blocks.cke_contents_ltr "+c+g+a,l+=".cke_show_blocks.cke_contents_rtl "+c+g+a,k+=".cke_show_blocks "+c+g+"{background-image:url("+CKEDITOR.getUrl(m+"images/block_"+c+".png")+")}";CKEDITOR.addCss((e+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(k,d+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));b||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(h){function e(){k.refresh(h)}if(!h.blockless){var k=h.addCommand("showblocks",f);k.canUndo=!1;h.config.startupOutlineBlocks&&k.setState(CKEDITOR.TRISTATE_ON);h.ui.addButton&&h.ui.addButton("ShowBlocks",{label:h.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});h.on("mode",function(){k.state!=CKEDITOR.TRISTATE_DISABLED&&k.refresh(h)});h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h.on("focus",e),h.on("blur",e));h.on("contentDom",function(){k.state!=CKEDITOR.TRISTATE_DISABLED&&
k.refresh(h)})}}})}(),function(){var f={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(f){this.toggleState();this.refresh(f)},refresh:function(f){if(f.document){var e=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";f.editable()[e]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var f;f=(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(f)},init:function(h){var e=h.addCommand("showborders",f);e.canUndo=!1;!1!==h.config.startupShowBorders&&e.setState(CKEDITOR.TRISTATE_ON);h.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)},null,null,100);h.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)});h.on("removeFormatCleanup",function(e){e=e.data;h.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")||
0>=parseInt(e.getAttribute("border"),10))&&e.addClass("cke_show_border")})},afterInit:function(f){var e=f.dataProcessor;f=e&&e.dataFilter;e=e&&e.htmlFilter;f&&f.addRules({elements:{table:function(e){e=e.attributes;var d=e["class"],f=parseInt(e.border,10);f&&!(0>=f)||d&&-1!=d.indexOf("cke_show_border")||(e["class"]=(d||"")+" cke_show_border")}}});e&&e.addRules({elements:{table:function(e){e=e.attributes;var d=e["class"];d&&(e["class"]=d.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
""))}}})}});CKEDITOR.on("dialogDefinition",function(f){var e=f.data.name;if("table"==e||"tableProperties"==e)if(f=f.data.definition,e=f.getContents("info").get("txtBorder"),e.commit=CKEDITOR.tools.override(e.commit,function(e){return function(d,f){e.apply(this,arguments);var h=parseInt(this.getValue(),10);f[!h||0>=h?"addClass":"removeClass"]("cke_show_border")}}),f=(f=f.getContents("advanced"))&&f.get("advCSSClasses"))f.setup=CKEDITOR.tools.override(f.setup,function(e){return function(){e.apply(this,
arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),f.commit=CKEDITOR.tools.override(f.commit,function(e){return function(d,f){e.apply(this,arguments);parseInt(f.getAttribute("border"),10)||f.addClass("cke_show_border")}})})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(h){function e(){var e=d&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+
"px");this.show();e&&this.focus()}if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var k=CKEDITOR.plugins.sourcearea;h.addMode("source",function(d){var k=h.ui.space("contents").getDocument().createElement("textarea");k.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",h.config.sourceAreaTabSize||4)));k.setAttribute("dir","ltr");k.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");
h.ui.space("contents").append(k);k=h.editable(new f(h,k));k.setData(h.getData(1));CKEDITOR.env.ie&&(k.attachListener(h,"resize",e,k),k.attachListener(CKEDITOR.document.getWindow(),"resize",e,k),CKEDITOR.tools.setTimeout(e,0,k));h.fire("ariaWidget",this);d()});h.addCommand("source",k.commands.source);h.ui.addButton&&h.ui.addButton("Source",{label:h.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});h.on("mode",function(){h.getCommand("source").setState("source"==h.mode?CKEDITOR.TRISTATE_ON:
CKEDITOR.TRISTATE_OFF)});var d=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var f=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(f){this.setValue(f);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(f){this[(f?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){f.baseProto.detach.call(this);this.clearCustomData();
this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(f){"wysiwyg"==f.mode&&f.fire("saveSnapshot");f.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);f.setMode("source"==f.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("sourcedialog",{requires:"dialog",init:function(f){f.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js");
f.ui.addButton&&f.ui.addButton("Sourcedialog",{label:f.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,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},
requires:"dialog",init:function(f){var h=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");f.addCommand("specialchar",{exec:function(){var e=f.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+e+".js"),function(){CKEDITOR.tools.extend(f.lang.specialchar,h.langEntries[e]);f.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});f.ui.addButton&&f.ui.addButton("SpecialChar",
{label:f.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(f){var h=f.config,e=f.lang.stylescombo,k={},d=[],l=[];f.on("stylesSet",function(e){if(e=e.data.styles){for(var b,g,c,a=0,n=e.length;a<n;a++)(b=e[a],f.blockless&&b.element in CKEDITOR.dtd.$block||"string"==typeof b.type&&!CKEDITOR.style.customHandlers[b.type]||(g=b.name,b=new CKEDITOR.style(b),f.filter.customConfig&&!f.filter.check(b)))||(b._name=g,b._.enterMode=h.enterMode,b._.type=c=b.assignedTo||b.type,b._.weight=
a+1E3*(c==CKEDITOR.STYLE_OBJECT?1:c==CKEDITOR.STYLE_BLOCK?2:3),k[g]=b,d.push(b),l.push(b));d.sort(function(a,b){return a._.weight-b._.weight})}});f.ui.addRichCombo("Styles",{label:e.label,title:e.panelTitle,toolbar:"styles,10",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!0,attributes:{"aria-label":e.panelTitle}},init:function(){var f,b,g,c,a,h;a=0;for(h=d.length;a<h;a++)f=d[a],b=f._name,c=f._.type,c!=g&&(this.startGroup(e["panelTitle"+String(c)]),
g=c),this.add(b,f.type==CKEDITOR.STYLE_OBJECT?b:f.buildPreview(),b);this.commit()},onClick:function(d){f.focus();f.fire("saveSnapshot");d=k[d];var b=f.elementPath();if(d.group&&d.removeStylesFromSameGroup(f))f.applyStyle(d);else f[d.checkActive(b,f)?"removeStyle":"applyStyle"](d);f.fire("saveSnapshot")},onRender:function(){f.on("selectionChange",function(d){var b=this.getValue();d=d.data.path.elements;for(var g=0,c=d.length,a;g<c;g++){a=d[g];for(var e in k)if(k[e].checkElementRemovable(a,!0,f)){e!=
b&&this.setValue(e);return}}this.setValue("")},this)},onOpen:function(){var d=f.getSelection(),d=d.getSelectedElement()||d.getStartElement()||f.editable(),d=f.elementPath(d),b=[0,0,0,0];this.showAll();this.unmarkAll();for(var g in k){var c=k[g],a=c._.type;c.checkApplicable(d,f,f.activeFilter)?b[a]++:this.hideItem(g);c.checkActive(d,f)&&this.mark(g)}b[CKEDITOR.STYLE_BLOCK]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);b[CKEDITOR.STYLE_INLINE]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);
b[CKEDITOR.STYLE_OBJECT]||this.hideGroup(e["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var d=f.elementPath();if(d){for(var b in k)if(k[b].checkApplicable(d,f,f.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){k={};d=[]}})}})}(),function(){function f(d){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(e){if(e.editable().hasFocus){var f=e.getSelection(),b;if(b=(new CKEDITOR.dom.elementPath(f.getCommonAncestor(),f.root)).contains({td:1,
th:1},1)){var f=e.createRange(),g=CKEDITOR.tools.tryThese(function(){var a=b.getParent().$.cells[b.$.cellIndex+(d?-1:1)];a.parentNode.parentNode;return a},function(){var a=b.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(d?-1:1)];return a.cells[d?a.cells.length-1:0]});if(g||d)if(g)g=new CKEDITOR.dom.element(g),f.moveToElementEditStart(g),f.checkStartOfBlock()&&f.checkEndOfBlock()||f.selectNodeContents(g);else return!0;else{for(var c=b.getAscendant("table").$,g=b.getParent().$.cells,c=
new CKEDITOR.dom.element(c.insertRow(-1),e.document),a=0,h=g.length;a<h;a++)c.append((new CKEDITOR.dom.element(g[a],e.document)).clone(!1,!1)).appendBogus();f.moveToElementEditStart(c)}f.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},e={exec:function(d){d.container.focusNext(!0,d.tabIndex)}},k={exec:function(d){d.container.focusPrevious(!0,d.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(d){for(var l=!1!==d.config.enableTabKeyTools,m=d.config.tabSpaces||0,
b="";m--;)b+=" ";if(b)d.on("key",function(g){9==g.data.keyCode&&(d.insertText(b),g.cancel())});if(l)d.on("key",function(b){(9==b.data.keyCode&&d.execCommand("selectNextCell")||b.data.keyCode==CKEDITOR.SHIFT+9&&d.execCommand("selectPreviousCell"))&&b.cancel()});d.addCommand("blur",CKEDITOR.tools.extend(e,h));d.addCommand("blurBack",CKEDITOR.tools.extend(k,h));d.addCommand("selectNextCell",f());d.addCommand("selectPreviousCell",f(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(f,h){var e=
void 0===h?this.getTabIndex():h,k,d,l,m,b,g;if(0>=e)for(b=this.getNextSourceNode(f,CKEDITOR.NODE_ELEMENT);b;){if(b.isVisible()&&0===b.getTabIndex()){l=b;break}b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(b=this.getDocument().getBody().getFirst();b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!k)if(!d&&b.equals(this)){if(d=!0,f){if(!(b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;k=1}}else d&&!this.contains(b)&&(k=1);if(b.isVisible()&&!(0>(g=b.getTabIndex()))){if(k&&g==e){l=
b;break}g>e&&(!l||!m||g<m)?(l=b,m=g):l||0!==g||(l=b,m=g)}}l&&l.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(f,h){for(var e=void 0===h?this.getTabIndex():h,k,d,l,m=0,b,g=this.getDocument().getBody().getLast();g=g.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!k)if(!d&&g.equals(this)){if(d=!0,f){if(!(g=g.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;k=1}}else d&&!this.contains(g)&&(k=1);if(g.isVisible()&&!(0>(b=g.getTabIndex())))if(0>=e){if(k&&0===b){l=g;break}b>m&&
(l=g,m=b)}else{if(k&&b==e){l=g;break}b<e&&(!l||b>m)&&(l=g,m=b)}}l&&l.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(f){function h(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(d,e){this.setState(e.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!f.blockless){var e=f.lang.table;f.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];"+
(f.plugins.dialogadvtab?"table"+f.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(e){if(e.styles){var d;if(e.styles.border)d=CKEDITOR.tools.style.parse.border(e.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var f=e.styles;f["border-left"]&&f["border-left"]===f["border-right"]&&f["border-right"]===f["border-top"]&&
f["border-top"]===f["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(f["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(e.attributes.border=1);"collapse"==e.styles["border-collapse"]&&(e.attributes.cellspacing=0)}}}]]}));f.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));f.addCommand("tableDelete",h({exec:function(e){var d=e.elementPath().contains("table",1);if(d){var f=d.getParent(),h=e.editable();1!=f.getChildCount()||f.is("td",
"th")||f.equals(h)||(d=f);e=e.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();e.select()}}}));f.ui.addButton&&f.ui.addButton("Table",{label:e.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");f.addMenuItems&&f.addMenuItems({table:{label:e.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:e.deleteTable,command:"tableDelete",group:"table",
order:1}});f.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")});f.contextMenu&&f.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function f(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){0<g.length||a.type!=CKEDITOR.NODE_ELEMENT||!p.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(e,a,"selected_cell",
!0),g.push(a))}var g=[],e={};if(!a)return g;for(var f=a.getRanges(),h=0;h<f.length;h++){var k=f[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&g.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard=d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(e,l,"selected_cell",!0),g.push(l))}}CKEDITOR.dom.element.clearAllMarkers(e);return g}
function h(a,b){for(var c=r(a)?a:f(a),d=c[0],g=d.getAscendant("table"),d=d.getDocument(),e=c[0].getParent(),h=e.$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=new CKEDITOR.dom.element(g.$.rows[k]),h=b?h:k,e=b?e:c,c=CKEDITOR.tools.buildTableMap(g),g=c[h],h=b?c[h-1]:c[h+1],c=c[0].length,d=d.createElement("tr"),k=0;g[k]&&k<c;k++){var l;1<g[k].rowSpan&&h&&g[k]==h[k]?(l=g[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(g[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),d.append(l),
l=l.$);k+=l.colSpan-1}b?d.insertBefore(e):d.insertAfter(e);return d}function e(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),c=f(a),d=c[0].getAscendant("table"),g=CKEDITOR.tools.buildTableMap(d),h=c[0].getParent().$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=[];a.reset();for(a=h;a<=k;a++){for(var l=g[a],m=new CKEDITOR.dom.element(d.$.rows[a]),n=0;n<l.length;n++){var p=new CKEDITOR.dom.element(l[n]),r=p.getParent().$.rowIndex;1==p.$.rowSpan?p.remove():(--p.$.rowSpan,
r==a&&(r=g[a+1],r[n-1]?p.insertAfter(new CKEDITOR.dom.element(r[n-1])):(new CKEDITOR.dom.element(d.$.rows[a+1])).append(p,1)));n+=p.$.colSpan-1}c.push(m)}g=d.$.rows;b[0].moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(g[k+1]||(0<h?g[h-1]:null)||d.$.parentNode);for(a=c.length;0<=a;a--)e(c[a]);return d.$.parentNode?h:(b[0].select(),null)}a instanceof CKEDITOR.dom.element&&(d=a.getAscendant("table"),1==d.$.rows.length?d.remove():a.remove());return null}function k(a){for(var b=
a.getParent().$.cells,c=0,d=0;d<b.length;d++){var g=b[d],c=c+g.colSpan;if(g==a.$)break}return c-1}function d(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var g=k(a[d]);if(b?g<c:g>c)c=g}return c}function l(a,b){for(var c=r(a)?a:f(a),g=c[0].getAscendant("table"),e=d(c,1),c=d(c),h=b?e:c,k=CKEDITOR.tools.buildTableMap(g),g=[],e=[],c=[],l=k.length,m=0;m<l;m++)g.push(k[m][h]),e.push(b?k[m][h-1]:k[m][h+1]);for(m=0;m<l;m++)g[m]&&(1<g[m].colSpan&&e[m]==g[m]?(k=g[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(g[m]),
k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[b?"insertBefore":"insertAfter"].call(k,h),c.push(k),k=k.$),m+=k.rowSpan-1);return c}function m(a){function b(a){var c,d,g;c=a.getRanges();if(1!==c.length)return a;c=c[0];if(c.collapsed||0!==c.endOffset)return a;d=c.endContainer;g=d.getName().toLowerCase();if("td"!==g&&"th"!==g)return a;for((g=d.getPrevious())||(g=d.getParent().getPrevious().getLast());g.type!==CKEDITOR.NODE_TEXT&&"br"!==g.getName().toLowerCase();)if(g=g.getLast(),!g)return a;
c.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);return c.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=b(a));var c=a.getRanges(),d=f(a),g=d[0],e=d[d.length-1],d=g.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(d),k,l,m=[];a.reset();var n=0;for(a=h.length;n<a;n++)for(var p=0,r=h[n].length;p<r;p++)void 0===k&&h[n][p]==g.$&&(k=p),h[n][p]==e.$&&(l=p);for(n=k;n<=l;n++)for(p=0;p<h.length;p++)e=h[p],g=new CKEDITOR.dom.element(d.$.rows[p]),e=new CKEDITOR.dom.element(e[n]),e.$&&(1==e.$.colSpan?e.remove():--e.$.colSpan,
p+=e.$.rowSpan-1,g.$.cells.length||m.push(g));k=h[0].length-1>l?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(d.$.parentNode);m.length==a&&(c[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),c[0].select(),d.remove());return k}function b(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function g(a){if(a instanceof CKEDITOR.dom.selection){var b=
a.getRanges(),d=f(a),e=d[0]&&d[0].getAscendant("table"),h;a:{var k=0;h=d.length-1;for(var l={},m,n;m=d[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=d[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=d[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=d[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a=
d.length-1;0<=a;a--)g(d[a]);h?c(h,!0):e&&(b[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),b[0].select(),e.remove())}else a instanceof CKEDITOR.dom.element&&(b=a.getParent(),1==b.getChildCount()?b.remove():a.remove())}function c(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function a(a,b,c){a=a[b];
if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function n(b,c,d){var g=f(b),e;if((c?1!=g.length:2>g.length)||(e=b.getCommonAncestor())&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))return!1;var h;b=g[0];e=b.getAscendant("table");var k=CKEDITOR.tools.buildTableMap(e),l=k.length,m=k[0].length,n=b.getParent().$.rowIndex,p=a(k,n,b);if(c){var r;try{var v=parseInt(b.getAttribute("rowspan"),10)||1;
h=parseInt(b.getAttribute("colspan"),10)||1;r=k["up"==c?n-v:"down"==c?n+v:n]["left"==c?p-h:"right"==c?p+h:p]}catch(w){return!1}if(!r||b.$==r)return!1;g["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(r))}c=b.getDocument();var L=n,v=r=0,O=!d&&new CKEDITOR.dom.documentFragment(c),C=0;for(c=0;c<g.length;c++){h=g[c];var S=h.getParent(),J=h.getFirst(),R=h.$.colSpan,K=h.$.rowSpan,S=S.$.rowIndex,U=a(k,S,h),C=C+R*K,v=Math.max(v,U-p+R);r=Math.max(r,S-n+K);d||(R=h,(K=R.getBogus())&&K.remove(),
R.trim(),h.getChildren().count()&&(S==L||!J||J.isBlockBoundary&&J.isBlockBoundary({br:1})||(L=O.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!L||L.is&&L.is("br")||O.append("br")),h.moveChildren(O)),c?h.remove():h.setHtml(""));L=S}if(d)return r*v==C;O.moveChildren(b);b.appendBogus();v>=m?b.removeAttribute("rowSpan"):b.$.rowSpan=r;r>=l?b.removeAttribute("colSpan"):b.$.colSpan=v;d=new CKEDITOR.dom.nodeList(e.$.rows);g=d.count();for(c=g-1;0<=c;c--)e=d.getItem(c),e.$.cells.length||(e.remove(),g++);return b}
function w(b,c){var d=f(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],g=d.getParent(),e=g.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(e),k=g.$.rowIndex,l=a(h,k,d),m=d.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/2),g=k+n,e=new CKEDITOR.dom.element(e.$.rows[g]),h=a(h,g),p,g=d.clone(),k=0;k<h.length;k++)if(p=h[k],p.parentNode==e.$&&k>l){g.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||e.append(g)}else for(m=n=1,e=g.clone(),e.insertAfter(g),e.append(g=d.clone()),
p=a(h,k),l=0;l<p.length;l++)p[l].rowSpan++;g.appendBogus();d.$.rowSpan=n;g.$.rowSpan=m;1==n&&d.removeAttribute("rowSpan");1==m&&g.removeAttribute("rowSpan");return g}function v(b,c){var d=f(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],g=d.getParent(),e=g.getAscendant("table"),e=CKEDITOR.tools.buildTableMap(e),h=a(e,g.$.rowIndex,d),k=d.$.colSpan;if(1<k)g=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=g=1,l=[],m=0;m<e.length;m++){var n=e[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(e=
0;e<l.length;e++)l[e].colSpan++}e=d.clone();e.insertAfter(d);e.appendBogus();d.$.colSpan=g;e.$.colSpan=k;1==g&&d.removeAttribute("colSpan");1==k&&e.removeAttribute("colSpan");return e}var p=/^(?:td|th)$/,r=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(a){function d(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function k(b,
c){var d=a.addCommand(b,c);a.addFeature(d)}var p=a.lang.table,r=CKEDITOR.tools.style.parse;k("cellProperties",new CKEDITOR.dialogCommand("cellProperties",d({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table",contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&r.background(a.styles.background).color},right:function(a){a.styles["background-color"]=r.background(a.styles.background).color}},
{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign},right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=
a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"];delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");k("rowDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=e(a))&&c(a)}}));k("rowInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);h(a,!0)}}));k("rowInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);
h(a)}}));k("columnDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();(a=m(a))&&c(a,!0)}}));k("columnInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);l(a,!0)}}));k("columnInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();a=f(a);l(a)}}));k("cellDelete",d({requiredContent:"table",exec:function(a){a=a.getSelection();g(a)}}));k("cellMerge",d({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,
b){b.cell=n(a.getSelection());c(b.cell,!0)}}));k("cellMergeRight",d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");c(b.cell,!0)}}));k("cellMergeDown",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");c(b.cell,!0)}}));k("cellVerticalSplit",d({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){c(v(a.getSelection()))}}));k("cellHorizontalSplit",
d({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){c(w(a.getSelection()))}}));k("cellInsertBefore",d({requiredContent:"table",exec:function(a){a=a.getSelection();b(a,!0)}}));k("cellInsertAfter",d({requiredContent:"table",exec:function(a){a=a.getSelection();b(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",order:1,getItems:function(){var b=a.getSelection(),c=f(b);return{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:v(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:w(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<c.length?CKEDITOR.TRISTATE_OFF:
CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:p.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",
order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,
tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,
tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});a.contextMenu&&a.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},
1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:k,insertRow:h,insertColumn:l,getSelectedCells:f};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(f,h,e,k,d){f=f.$.rows;e=e||0;k="number"===typeof k?k:f.length-1;d="number"===typeof d?d:-1;var l=-1,m=[];for(h=h||0;h<=k;h++){l++;!m[l]&&(m[l]=[]);for(var b=-1,g=e;g<=(-1===d?f[h].cells.length-1:d);g++){var c=
f[h].cells[g];if(!c)break;for(b++;m[l][b];)b++;for(var a=isNaN(c.colSpan)?1:c.colSpan,c=isNaN(c.rowSpan)?1:c.rowSpan,n=0;n<c&&!(h+n>k);n++){m[l+n]||(m[l+n]=[]);for(var w=0;w<a;w++)m[l+n][b+w]=f[h].cells[g]}b+=a-1;if(-1!==d&&b>=d)break}}return m},function(){function f(b){return CKEDITOR.env.ie?b.$.clientWidth:parseInt(b.getComputedStyle("width"),10)}function h(b,c){var a=b.getComputedStyle("border-"+c+"-width"),d={thin:"0px",medium:"1px",thick:"2px"};0>a.indexOf("px")&&(a=a in d&&"none"!=b.getComputedStyle("border-style")?
d[a]:0);return parseInt(a,10)}function e(b){var c=[],a={},d="rtl"==b.getComputedStyle("direction");CKEDITOR.tools.array.forEach(b.$.rows,function(e,f){var k=-1,l=0,m=null;e?(l=new CKEDITOR.dom.element(e),m={height:l.$.offsetHeight,position:l.getDocumentPosition()}):m=void 0;for(var l=m.height,m=m.position,u=0,x=e.cells.length;u<x;u++){var A=new CKEDITOR.dom.element(e.cells[u]),D=e.cells[u+1]&&new CKEDITOR.dom.element(e.cells[u+1]),k=k+(A.$.colSpan||1),t,B,y=A.getDocumentPosition().x;d?B=y+h(A,"left"):
t=y+A.$.offsetWidth-h(A,"right");D?(y=D.getDocumentPosition().x,d?t=y+D.$.offsetWidth-h(D,"right"):B=y+h(D,"left")):(y=b.getDocumentPosition().x,d?t=y:B=y+b.$.offsetWidth);A=Math.max(B-t,3);A={table:b,index:k,x:t,y:m.y,width:A,height:l,rtl:d};a[k]=a[k]||[];a[k].push(A);A.alignedPillars=a[k];c.push(A)}});return c}function k(b){(b.data||b).preventDefault()}function d(d){function c(){u=0;q.setOpacity(0);A&&a();var b=p.table;setTimeout(function(){b.removeCustomData("_cke_table_pillars")},0);r.removeListener("dragstart",
k)}function a(){for(var a=p.rtl,b=a?B.length:t.length,c=0,e=0;e<b;e++){var k=t[e],l=B[e],n=p.table;CKEDITOR.tools.setTimeout(function(e,f,h,k,l,p){e&&e.setStyle("width",m(Math.max(f+p,1)));h&&h.setStyle("width",m(Math.max(k-p,1)));l&&n.setStyle("width",m(l+p*(a?-1:1)));++c==b&&d.fire("saveSnapshot")},0,this,[k,k&&f(k),l,l&&f(l),(!k||!l)&&f(n)+h(n,"left")+h(n,"right"),A])}}function e(a){k(a);d.fire("saveSnapshot");a=p.index;for(var b=CKEDITOR.tools.buildTableMap(p.table),c=[],h=[],m=Number.MAX_VALUE,
n=m,D=p.rtl,C=0,S=b.length;C<S;C++){var J=b[C],R=J[a+(D?1:0)],J=J[a+(D?0:1)],R=R&&new CKEDITOR.dom.element(R),J=J&&new CKEDITOR.dom.element(J);R&&J&&R.equals(J)||(R&&(m=Math.min(m,f(R))),J&&(n=Math.min(n,f(J))),c.push(R),h.push(J))}t=c;B=h;y=p.x-m;z=p.x+n;q.setOpacity(.5);x=parseInt(q.getStyle("left"),10);A=0;u=1;q.on("mousemove",v);r.on("dragstart",k);r.on("mouseup",l,this)}function l(a){a.removeListener();c()}function v(a){D(a.data.getPageOffset().x)}var p,r,q,u,x,A,D,t,B,y,z;r=d.document;q=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',
r);d.on("destroy",function(){q.remove()});b||r.getDocumentElement().append(q);this.attachTo=function(a){var c,d,g;u||(b&&(r.getBody().append(q),A=0),p=a,c=p.alignedPillars[0],d=p.alignedPillars[p.alignedPillars.length-1],g=c.y,c=d.height+d.y-c.y,q.setStyles({width:m(a.width),height:m(c),left:m(a.x),top:m(g)}),b&&q.setOpacity(.25),q.on("mousedown",e,this),r.getBody().setStyle("cursor","col-resize"),q.show())};D=this.move=function(a,c){if(!p)return 0;if(!(u||a>=p.x&&a<=p.x+p.width&&c>=p.y&&c<=p.y+p.height))return p=
null,u=A=0,r.removeListener("mouseup",l),q.removeListener("mousedown",e),q.removeListener("mousemove",v),r.getBody().setStyle("cursor","auto"),b?q.remove():q.hide(),0;var d=a-Math.round(q.$.offsetWidth/2);if(u){if(d==y||d==z)return 1;d=Math.max(d,y);d=Math.min(d,z);A=d-x}q.setStyle("left",m(d));return 1}}function l(b){var c=b.data.getTarget();if("mouseout"==b.name){if(!c.is("table"))return;for(var a=new CKEDITOR.dom.element(b.data.$.relatedTarget||b.data.$.toElement);a&&a.$&&!a.equals(c)&&!a.is("body");)a=
a.getParent();if(!a||a.equals(c))return}c.getAscendant("table",1).removeCustomData("_cke_table_pillars");b.removeListener()}var m=CKEDITOR.tools.cssLength,b=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(b){b.on("contentDom",function(){var c,a=b.editable();a.attachListener(a.isInline()?a:b.document,"mousemove",function(a){a=a.data;var f=a.getTarget();if(f.type==CKEDITOR.NODE_ELEMENT){var h=a.getPageOffset().x,
m=a.getPageOffset().y;if(c&&c.move(h,m))k(a);else if(f.is("table")||f.getAscendant({thead:1,tbody:1,tfoot:1},1))if(a=f.getAscendant("table",1),b.editable().contains(a)){(f=a.getCustomData("_cke_table_pillars"))||(a.setCustomData("_cke_table_pillars",f=e(a)),a.on("mouseout",l),a.on("mousedown",l));a:{a=f;for(var f=0,r=a.length;f<r;f++){var q=a[f];if(h>=q.x&&h<=q.x+q.width&&m>=q.y&&m<=q.y+q.height){h=q;break a}}h=null}h&&(!c&&(c=new d(b)),c.attachTo(h))}}})})}})}(),"use strict",function(){var f=[CKEDITOR.CTRL+
90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],h={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function d(b){a.enabled&&!1!==b.data.command.canUndo&&a.save()}function c(){a.enabled=b.readOnly?!1:"wysiwyg"==b.mode;a.onChange()}var a=b.undoManager=new e(b),h=a.editingHandler=new l(a),k=b.addCommand("undo",{exec:function(){a.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=b.addCommand("redo",{exec:function(){a.redo()&&(b.selectionChange(),this.fire("afterRedo"))},
startDisabled:!0,canUndo:!1});b.setKeystroke([[f[0],"undo"],[f[1],"redo"],[f[2],"redo"]]);a.onChange=function(){k.setState(a.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(a.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",d);b.on("afterCommandExec",d);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",c);b.on("readOnly",c);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 e=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()};e.prototype={type:function(b,d){var c=e.getKeyGroup(b),a=this.strokesRecorded[c]+1;d=d||a>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(a=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]=a;this.previousKeyGroup=
c},keyGroupChanged:function(b){return e.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,d,c){var a=this.editor;if(this.locked||"ready"!=a.status||
"wysiwyg"!=a.mode)return!1;var e=a.editable();if(!e||"ready"!=e.status)return!1;e=this.snapshots;d||(d=new k(a));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(b||d.equalsSelection(this.currentImage))return!1}else!1!==c&&a.fire("change");e.splice(this.index+1,e.length-this.index-1);e.length==this.limit&&e.shift();this.index=e.push(d)-1;this.currentImage=d;!1!==c&&this.refreshState();return!0},restoreImage:function(b){var d=this.editor,c;b.bookmarks&&(d.focus(),
c=d.getSelection());this.locked={level:999};this.editor.loadSnapshot(b.contents);b.bookmarks?c.selectBookmarks(b.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=b.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();d.fire("change")},getNextImage:function(b){var d=this.snapshots,c=this.currentImage,a;if(c)if(b)for(a=this.index-1;0<=a;a--){if(b=d[a],!c.equalsContent(b))return b.index=
a,b}else for(a=this.index+1;a<d.length;a++)if(b=d[a],!c.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 k(this.editor));for(var d=this.index,c=this.snapshots;0<d&&this.currentImage.equalsContent(c[d-1]);)--d;c.splice(d,this.index-d+1,b);this.index=d;this.currentImage=b}},updateSelection:function(b){if(!this.snapshots.length)return!1;var d=this.snapshots,c=d[d.length-1];return c.equalsContent(b)&&!c.equalsSelection(b)?(this.currentImage=d[d.length-1]=b,!0):!1},lock:function(b,d){if(this.locked)this.locked.level++;else if(b)this.locked={level:1};else{var c=null;if(d)c=!0;else{var a=new k(this.editor,
!0);this.currentImage&&this.currentImage.equalsContent(a)&&(c=a)}this.locked={update:c,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 d=new k(this.editor,!0);b.equalsContent(d)||this.update()}}}};e.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};e.keyGroups={PRINTABLE:0,FUNCTIONAL:1};e.isNavigationKey=function(b){return!!e.navigationKeyCodes[b]};e.getKeyGroup=function(b){var d=e.keyGroups;
return h[b]?d.FUNCTIONAL:d.PRINTABLE};e.getOppositeKeyGroup=function(b){var d=e.keyGroups;return b==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};e.ieFunctionalKeysBug=function(b){return CKEDITOR.env.ie&&e.getKeyGroup(b)==e.keyGroups.FUNCTIONAL};var k=CKEDITOR.plugins.undo.Image=function(b,d){this.editor=b;b.fire("beforeUndoImage");var c=b.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=c;d||(this.bookmarks=(c=c&&b.getSelection())&&c.createBookmarks2(!0));b.fire("afterUndoImage")},
d=/\b(?:href|src|name)="[^"]*?"/gi;k.prototype={equalsContent:function(b){var e=this.contents;b=b.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(e=e.replace(d,""),b=b.replace(d,""));return e!=b?!1:!0},equalsSelection:function(b){var d=this.bookmarks;b=b.bookmarks;if(d||b){if(!d||!b||d.length!=b.length)return!1;for(var c=0;c<d.length;c++){var a=d[c],e=b[c];if(a.startOffset!=e.startOffset||a.endOffset!=e.endOffset||!CKEDITOR.tools.arrayCompare(a.start,e.start)||!CKEDITOR.tools.arrayCompare(a.end,
e.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=function(b){this.undoManager=b;this.ignoreInputEvent=!1;this.keyEventsStack=new m;this.lastKeydownImage=null};l.prototype={onKeydown:function(b){var d=b.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(f,b.data.getKeystroke()))b.data.preventDefault();else if(this.keyEventsStack.cleanUp(b),b=this.undoManager,this.keyEventsStack.getLast(d)||this.keyEventsStack.push(d),this.lastKeydownImage=new k(b.editor),e.isNavigationKey(d)||
this.undoManager.keyGroupChanged(d))if(b.strokesRecorded[0]||b.strokesRecorded[1])b.save(!1,this.lastKeydownImage,!1),b.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var 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 d=this.undoManager;
b=b.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(e.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new k(d.editor,!0))))if(0<c)d.type(b);else if(e.isNavigationKey(b))this.onNavigationKey(!0)},onNavigationKey:function(b){var d=this.undoManager;!b&&d.save(!0,null,!1)||d.updateSelection(new k(d.editor));d.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=
!1},attachListeners:function(){var b=this.undoManager.editor,d=b.editable(),c=this;d.attachListener(d,"keydown",function(a){c.onKeydown(a);if(e.ieFunctionalKeysBug(a.data.getKey()))c.onInput()},null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",c.onInput,c,null,999);d.attachListener(d,"keyup",c.onKeyup,c,null,999);d.attachListener(d,"paste",c.ignoreInputEventListener,c,null,999);d.attachListener(d,"drop",c.ignoreInputEventListener,c,null,999);b.on("afterPaste",c.activateInputEventListener,
c,null,999);d.attachListener(d.isInline()?d:b.document.getDocumentElement(),"click",function(){c.onNavigationKey()},null,null,999);d.attachListener(this.undoManager.editor,"blur",function(){c.keyEventsStack.remove(9)},null,null,999)}};var m=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};m.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 d=this.stack.length;d--;)if(this.stack[d].keyCode==
b)return d;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,d=0;b--;)d+=this.stack[b].inputs;return d},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 f(d){function e(c){var d=!1;a.attachListener(a,"keydown",function(){var a=b.getBody().getElementsByTag(c);if(!d){for(var e=0;e<a.count();e++)a.getItem(e).setCustomData("retain",!0);d=!0}},null,null,1);a.attachListener(a,"keyup",function(){var a=b.getElementsByTag(c);d&&(1==a.count()&&!a.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(a.getItem(0).getAttributes())&&a.getItem(0).remove(1),d=!1)})}var f=this.editor,
b=d.document,g=b.body,c=b.getElementById("cke_actscrpt");c&&c.parentNode.removeChild(c);(c=b.getElementById("cke_shimscrpt"))&&c.parentNode.removeChild(c);(c=b.getElementById("cke_basetagscrpt"))&&c.parentNode.removeChild(c);g.contentEditable=!0;CKEDITOR.env.ie&&(g.hideFocus=!0,g.disabled=!0,g.removeAttribute("disabled"));delete this._.isLoadingData;this.$=g;b=new CKEDITOR.dom.document(b);this.setup();this.fixInitialSelection();var a=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&b.getDocumentElement().addClass(b.$.compatMode);
CKEDITOR.env.ie&&!CKEDITOR.env.edge&&f.enterMode!=CKEDITOR.ENTER_P?e("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&f.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)b.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){f.editable().focus()})});h(f);try{f.document.$.execCommand("2D-position",!1,!0)}catch(k){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==f.document.$.compatMode)&&this.attachListener(this,
"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){f.getSelection().scrollIntoView()},0);else if(f.window.$.innerHeight>this.$.offsetHeight){var c=f.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(b,"blur",function(){try{b.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(b,"touchend",function(){d.focus()});g=f.document.getElementsByTag("title").getItem(0);
g.data("cke-title",g.getText());CKEDITOR.env.ie&&(f.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");f.fire("contentDom");this._.isPendingFocus&&(f.focus(),this._.isPendingFocus=!1);setTimeout(function(){f.fire("dataReady")},0)},0,this)}function h(d){function e(){var b;d.editable().attachListener(d,"selectionChange",function(){var a=d.getSelection().getSelectedElement();a&&(b&&(b.detachEvent("onresizestart",f),b=null),a.$.attachEvent("onresizestart",
f),b=a.$)})}function f(b){b.returnValue=!1}if(CKEDITOR.env.gecko)try{var b=d.document.$;b.execCommand("enableObjectResizing",!1,!d.config.disableObjectResizing);b.execCommand("enableInlineTableEditing",!1,!d.config.disableNativeTableHandles)}catch(g){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&d.config.disableObjectResizing&&e(d)}function e(){var d=[];if(8<=CKEDITOR.document.$.documentMode){d.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var e=[],f;for(f in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+
f+"[contenteditable\x3dfalse]");d.push(e.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(d.push("html{height:100% !important}"),d.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));d.push("html{cursor:text;*cursor:auto}");d.push("img,input,textarea{cursor:default}");return d.join("\n")}var k;CKEDITOR.plugins.add("wysiwygarea",{init:function(d){d.config.fullPage&&d.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",
requiredContent:"body"});d.addMode("wysiwyg",function(e){function f(a){a&&a.removeListener();d.editable(new k(d,g.$.contentWindow.document.body));d.setData(d.getData(1),e)}var b="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",b=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(b)+"}())":"",g=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+b+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');
g.setStyles({width:"100%",height:"100%"});g.addClass("cke_wysiwyg_frame").addClass("cke_reset");b=d.ui.space("contents");b.append(g);var c=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(c)g.on("load",f);var a=d.title,h=d.fire("ariaEditorHelpLabel",{}).label;a&&(CKEDITOR.env.ie&&h&&(a+=", "+h),g.setAttribute("title",a));if(h){var a=CKEDITOR.tools.getNextId(),w=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+a+'" class\x3d"cke_voice_label"\x3e'+h+"\x3c/span\x3e");b.append(w,1);g.setAttribute("aria-describedby",
a)}d.on("beforeModeUnload",function(a){a.removeListener();w&&w.remove()});g.setAttributes({tabIndex:d.tabIndex,allowTransparency:"true"});!c&&f();d.fire("ariaWidget",g)})}});CKEDITOR.editor.prototype.addContentsCss=function(d){var e=this.config,f=e.contentsCss;CKEDITOR.tools.isArray(f)||(e.contentsCss=f?[f]:[]);e.contentsCss.push(d)};k=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(d){CKEDITOR.tools.setTimeout(f,
0,this,d)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(d,f){var h=this.editor;if(f)this.setHtml(d),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var b=h.config,g=b.fullPage,c=b.docType,a=CKEDITOR.tools.buildStyleHtml(e()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');g||(a+=CKEDITOR.tools.buildStyleHtml(h.config.contentsCss));var k=b.baseHref?'\x3cbase href\x3d"'+
b.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";g&&(d=d.replace(/<!DOCTYPE[^>]*>/i,function(a){h.docType=c=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){h.xmlDeclaration=a;return""}));d=h.dataProcessor.toHtml(d);g?(/<body[\s|>]/.test(d)||(d="\x3cbody\x3e"+d),/<html[\s|>]/.test(d)||(d="\x3chtml\x3e"+d+"\x3c/html\x3e"),/<head[\s|>]/.test(d)?/<title[\s|>]/.test(d)||(d=d.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):d=d.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),
k&&(d=d.replace(/<head[^>]*?>/,"$\x26"+k)),d=d.replace(/<\/head\s*>/,a+"$\x26"),d=c+d):d=b.docType+'\x3chtml dir\x3d"'+b.contentsLangDirection+'" lang\x3d"'+(b.contentsLanguage||h.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+k+a+"\x3c/head\x3e\x3cbody"+(b.bodyId?' id\x3d"'+b.bodyId+'"':"")+(b.bodyClass?' class\x3d"'+b.bodyClass+'"':"")+"\x3e"+d+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(d=d.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&
(d=d.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));b='\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&&(b+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');
k&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');d=d.replace(/(?=\s*<\/(:?head)>)/,b);this.clearCustomData();this.clearListeners();h.fire("contentDomUnload");var w=this.getDocument();try{w.write(d)}catch(v){setTimeout(function(){w.write(d)},0)}}},getData:function(d){if(d)return this.getHtml();d=this.editor;var e=d.config,f=e.fullPage,b=f&&d.docType,g=f&&d.xmlDeclaration,
c=this.getDocument(),f=f?c.getDocumentElement().getOuterHtml():c.getBody().getHtml();CKEDITOR.env.gecko&&e.enterMode!=CKEDITOR.ENTER_BR&&(f=f.replace(/<br>(?=\s*(:?$|<\/body>))/,""));f=d.dataProcessor.toDataFormat(f);g&&(f=g+"\n"+f);b&&(f=b+"\n"+f);return f},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:k.baseProto.focus.call(this)},detach:function(){var d=this.editor,e=d.document,f;try{f=d.window.getFrame()}catch(b){}k.baseProto.detach.call(this);this.clearCustomData();e.getDocumentElement().clearCustomData();
CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);f&&f.getParent()?(f.clearCustomData(),(d=f.removeCustomData("onResize"))&&d.removeListener(),f.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 f=function(f,e){var k=CKEDITOR.getUrl("plugins/"+e);f=f.split(",");for(var d=0;d<f.length;d++)CKEDITOR.skin.icons[f[d]]={path:k,offset:-f[++d],bgsize:f[++d]}};CKEDITOR.env.hidpi?f("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"):f("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")}())})();