/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
(function(){function ja(a,d){CKEDITOR.tools.extend(this,d,{editor:a,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:a._.notificationArea});d.type||(this.type="info");this.element=this._createElement();a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function ka(a){var d=this;this.editor=a;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,
this);a.on("destroy",function(){d._removeListeners();d.element.remove()})}window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"I25E",version:"DEV",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var g=window.CKEDITOR_BASEPATH||"";if(!g)for(var b=document.getElementsByTagName("script"),d=0;d<b.length;d++){var k=b[d].src.match(a);if(k){g=
k[1];break}}-1==g.indexOf(":/")&&"//"!=g.slice(0,2)&&(g=0===g.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+g:location.href.match(/^[^\?]*\/(?:)/)[0]+g);if(!g)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return g}(),getUrl:function(a){-1==a.indexOf(":/")&&0!==a.indexOf("/")&&(a=this.basePath+a);this.timestamp&&"/"!=a.charAt(a.length-1)&&!/[&?]t=/.test(a)&&(a+=(0<=a.indexOf("?")?
"\x26":"?")+"t\x3d"+this.timestamp);return a},domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),g()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),g())}catch(k){}}function g(){for(var a;a=b.shift();)a()}var b=[];return function(g){function e(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(e,1);return}a()}b.push(g);"complete"===document.readyState&&setTimeout(a,
1);if(1==b.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);g=!1;try{g=!window.frameElement}catch(c){}document.documentElement.doScroll&&g&&e()}}}()},b=window.CKEDITOR_GETURL;if(b){var g=d.getUrl;d.getUrl=function(a){return b.call(d,a)||g.call(d,a)}}return d}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=
function(a){var d=CKEDITOR.event.prototype,b;for(b in d)null==a[b]&&(a[b]=d[b])},CKEDITOR.event.prototype=function(){function a(a){var h=d(this);return h[a]||(h[a]=new b(a))}var d=function(a){a=a.getPrivate&&a.getPrivate()||a._||(a._={});return a.events||(a.events={})},b=function(a){this.name=a;this.listeners=[]};b.prototype={getListenerIndex:function(a){for(var b=0,d=this.listeners;b<d.length;b++)if(d[b].fn==a)return b;return-1}};return{define:function(g,b){var d=a.call(this,g);CKEDITOR.tools.extend(d,
b,!0)},on:function(g,b,d,m,k){function e(f,n,a,e){f={name:g,sender:this,editor:f,data:n,listenerData:m,stop:a,cancel:e,removeListener:c};return!1===b.call(d,f)?!1:f.data}function c(){n.removeListener(g,b)}var f=a.call(this,g);if(0>f.getListenerIndex(b)){f=f.listeners;d||(d=this);isNaN(k)&&(k=10);var n=this;e.fn=b;e.priority=k;for(var v=f.length-1;0<=v;v--)if(f[v].priority<=k)return f.splice(v+1,0,e),{removeListener:c};f.unshift(e)}return{removeListener:c}},once:function(){var a=Array.prototype.slice.call(arguments),
b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},l=0,m=function(){l=1};return function(k,e,c){var f=d(this)[k];k=a;var n=l;a=l=0;if(f){var v=f.listeners;if(v.length)for(var v=v.slice(0),u,w=0;w<v.length;w++){if(f.errorProof)try{u=v[w].call(this,c,e,b,m)}catch(t){}else u=v[w].call(this,
c,e,b,m);!1===u?l=1:"undefined"!=typeof u&&(e=u);if(a||l)break}}e=l?!1:"undefined"==typeof e?!0:e;a=k;l=n;return e}}(),fireOnce:function(a,b,l){b=this.fire(a,b,l);delete d(this)[a];return b},removeListener:function(a,b){var l=d(this)[a];if(l){var m=l.getListenerIndex(b);0<=m&&l.listeners.splice(m,1)}},removeAllListeners:function(){var a=d(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=d(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,
arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,d,this)},CKEDITOR.editor.prototype.fireOnce=function(a,d){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,d,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),d=a.match(/edge[ \/](\d+.?\d*)/),
b=-1<a.indexOf("trident/"),b=!(!d&&!b),b={ie:b,edge:!!d,webkit:!b&&-1<a.indexOf(" applewebkit/"),air:-1<a.indexOf(" adobeair/"),mac:-1<a.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<a.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(a),isCustomDomain:function(){if(!this.ie)return!1;var a=document.domain,b=window.location.hostname;return a!=b&&a!="["+b+"]"},secure:"https:"==location.protocol};b.gecko="Gecko"==navigator.product&&
!b.webkit&&!b.ie;b.webkit&&(-1<a.indexOf("chrome")?b.chrome=!0:b.safari=!0);var g=0;b.ie&&(g=d?parseFloat(d[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,b.ie9Compat=9==g,b.ie8Compat=8==g,b.ie7Compat=7==g,b.ie6Compat=7>g||b.quirks);b.gecko&&(d=a.match(/rv:([\d\.]+)/))&&(d=d[1].split("."),g=1E4*d[0]+100*(d[1]||0)+1*(d[2]||0));b.air&&(g=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(g=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=
g;b.isCompatible=!(b.ie&&7>g)&&!(b.gecko&&4E4>g)&&!(b.webkit&&534>g);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10<g;b.needsNbspFiller=b.ie&&11>g;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air");b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");
return b}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=
CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*d))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:d})},CKEDITOR.error=
function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var d=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[d]("[CKEDITOR] Error code: "+b+".",a);else console[d]("[CKEDITOR] Error code: "+b+".");console[d]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+
b)}},null,null,999),CKEDITOR.dom={},function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,g=/>/g,h=/</g,l=/"/g,m=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,k={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},e=function(c,f){return"#"==f[0]?String.fromCharCode(parseInt(f.slice(1),10)):k[f]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(c,f){if(!c&&!f)return!0;if(!c||!f||c.length!=f.length)return!1;for(var a=
0;a<c.length;a++)if(c[a]!=f[a])return!1;return!0},getIndex:function(c,f){for(var a=0;a<c.length;++a)if(f(c[a]))return a;return-1},clone:function(c){var f;if(c&&c instanceof Array){f=[];for(var a=0;a<c.length;a++)f[a]=CKEDITOR.tools.clone(c[a]);return f}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;f=new c.constructor;for(a in c)f[a]=CKEDITOR.tools.clone(c[a]);return f},capitalize:function(c,
f){return c.charAt(0).toUpperCase()+(f?c.slice(1):c.slice(1).toLowerCase())},extend:function(c){var f=arguments.length,a,e;"boolean"==typeof(a=arguments[f-1])?f--:"boolean"==typeof(a=arguments[f-2])&&(e=arguments[f-1],f-=2);for(var b=1;b<f;b++){var k=arguments[b],g;for(g in k)if(!0===a||null==c[g])if(!e||g in e)c[g]=k[g]}return c},prototypedCopy:function(c){var f=function(){};f.prototype=c;return new f},copy:function(c){var f={},a;for(a in c)f[a]=c[a];return f},isArray:function(c){return"[object Array]"==
Object.prototype.toString.call(c)},isEmpty:function(c){for(var f in c)if(c.hasOwnProperty(f))return!1;return!0},cssVendorPrefix:function(c,f,a){if(a)return d+c+":"+f+";"+c+":"+f;a={};a[c]=f;a[d+c]=f;return a},cssStyleToDomStyle:function(){var c=document.createElement("div").style,f="undefined"!=typeof c.cssFloat?"cssFloat":"undefined"!=typeof c.styleFloat?"styleFloat":"float";return function(c){return"float"==c?f:c.replace(/-./g,function(f){return f.substr(1).toUpperCase()})}}(),buildStyleHtml:function(c){c=
[].concat(c);for(var f,a=[],e=0;e<c.length;e++)if(f=c[e])/@import|[{}]/.test(f)?a.push("\x3cstyle\x3e"+f+"\x3c/style\x3e"):a.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+f+'"\x3e');return a.join("")},htmlEncode:function(c){return void 0===c||null===c?"":String(c).replace(b,"\x26amp;").replace(g,"\x26gt;").replace(h,"\x26lt;")},htmlDecode:function(c){return c.replace(m,e)},htmlEncodeAttr:function(c){return CKEDITOR.tools.htmlEncode(c).replace(l,"\x26quot;")},htmlDecodeAttr:function(c){return CKEDITOR.tools.htmlDecode(c)},
transformPlainTextToHtml:function(c,f){var a=f==CKEDITOR.ENTER_BR,e=this.htmlEncode(c.replace(/\r\n/g,"\n")),e=e.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),b=f==CKEDITOR.ENTER_P?"p":"div";if(!a){var k=/\n{2}/g;if(k.test(e))var g="\x3c"+b+"\x3e",d="\x3c/"+b+"\x3e",e=g+e.replace(k,function(){return d+g})+d}e=e.replace(/\n/g,"\x3cbr\x3e");a||(e=e.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+b+"\x3e)"),function(f){return CKEDITOR.tools.repeat(f,2)}));e=e.replace(/^ | $/g,"\x26nbsp;");return e=e.replace(/(>|\s) /g,
function(f,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",f=0;8>f;f++)c+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return c},override:function(c,f){var a=f(c);a.prototype=c.prototype;return a},setTimeout:function(c,f,a,e,b){b||(b=window);a||(a=b);return b.setTimeout(function(){e?c.apply(a,[].concat(e)):c.apply(a)},
f||0)},trim:function(){var c=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(f){return f.replace(c,"")}}(),ltrim:function(){var c=/^[ \t\n\r]+/g;return function(f){return f.replace(c,"")}}(),rtrim:function(){var c=/[ \t\n\r]+$/g;return function(f){return f.replace(c,"")}}(),indexOf:function(c,f){if("function"==typeof f)for(var a=0,e=c.length;a<e;a++){if(f(c[a]))return a}else{if(c.indexOf)return c.indexOf(f);a=0;for(e=c.length;a<e;a++)if(c[a]===f)return a}return-1},search:function(c,f){var a=CKEDITOR.tools.indexOf(c,
f);return 0<=a?c[a]:null},bind:function(c,f){return function(){return c.apply(f,arguments)}},createClass:function(c){var f=c.$,a=c.base,e=c.privates||c._,b=c.proto;c=c.statics;!f&&(f=function(){a&&this.base.apply(this,arguments)});if(e)var k=f,f=function(){var f=this._||(this._={}),c;for(c in e){var a=e[c];f[c]="function"==typeof a?CKEDITOR.tools.bind(a,this):a}k.apply(this,arguments)};a&&(f.prototype=this.prototypedCopy(a.prototype),f.prototype.constructor=f,f.base=a,f.baseProto=a.prototype,f.prototype.base=
function(){this.base=a.prototype.base;a.apply(this,arguments);this.base=arguments.callee});b&&this.extend(f.prototype,b,!0);c&&this.extend(f,c,!0);return f},addFunction:function(c,f){return a.push(function(){return c.apply(f||this,arguments)})-1},removeFunction:function(c){a[c]=null},callFunction:function(c){var f=a[c];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var c=/^-?\d+\.?\d*px$/,f;return function(a){f=CKEDITOR.tools.trim(a+"")+"px";return c.test(f)?
f:a||""}}(),convertToPx:function(){var c;return function(f){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(f)?f:(c.setStyle("width",f),c.$.clientWidth)}}(),repeat:function(c,f){return Array(f+1).join(c)},tryThese:function(){for(var c,f=0,a=arguments.length;f<a;f++){var e=arguments[f];try{c=e();break}catch(b){}}return c},
genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(c){return function(){var f=arguments,a=this;window.setTimeout(function(){c.apply(a,f)},0)}},normalizeCssText:function(c,f){var a=[],e,b=CKEDITOR.tools.parseCssText(c,!0,f);for(e in b)a.push(e+":"+b[e]);a.sort();return a.length?a.join(";")+";":""},convertRgbToHex:function(c){return c.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(f,c,a,e){f=[c,a,e];for(c=0;3>c;c++)f[c]=("0"+parseInt(f[c],10).toString(16)).slice(-2);
return"#"+f.join("")})},normalizeHex:function(c){return c.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(f,c,a,e){f=c.toLowerCase();3==f.length&&(f=f.split(""),f=[f[0],f[0],f[1],f[1],f[2],f[2]].join(""));return"#"+f+e})},parseCssText:function(c,f,a){var e={};a&&(c=(new CKEDITOR.dom.element("span")).setAttribute("style",c).getAttribute("style")||"");c&&(c=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(c)));if(!c||";"==c)return e;c.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,
function(c,a,b){f&&(a=a.toLowerCase(),"font-family"==a&&(b=b.replace(/\s*,\s*/g,",")),b=CKEDITOR.tools.trim(b));e[a]=b});return e},writeCssText:function(c,f){var a,e=[];for(a in c)e.push(a+":"+c[a]);f&&e.sort();return e.join("; ")},objectCompare:function(c,f,a){var e;if(!c&&!f)return!0;if(!c||!f)return!1;for(e in c)if(c[e]!=f[e])return!1;if(!a)for(e in f)if(c[e]!=f[e])return!1;return!0},objectKeys:function(c){var f=[],a;for(a in c)f.push(a);return f},convertArrayToObject:function(c,f){var a={};1==
arguments.length&&(f=!0);for(var e=0,b=c.length;e<b;++e)a[c[e]]=f;return a},fixDomain:function(){for(var c;;)try{c=window.parent.document.domain;break}catch(f){c=c?c.replace(/.+?(?:\.|$)/,""):document.domain;if(!c)break;document.domain=c}return!!c},eventsBuffer:function(c,f,a){function e(){k=(new Date).getTime();b=!1;a?f.call(a):f()}var b,k=0;return{input:function(){if(!b){var f=(new Date).getTime()-k;f<c?b=setTimeout(e,c-f):e()}},reset:function(){b&&clearTimeout(b);b=k=0}}},enableHtml5Elements:function(c,
f){for(var a="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),e=a.length,b;e--;)b=c.createElement(a[e]),f&&c.appendChild(b)},checkIfAnyArrayItemMatches:function(c,f){for(var a=0,e=c.length;a<e;++a)if(c[a].match(f))return!0;return!1},checkIfAnyObjectPropertyMatches:function(c,f){for(var a in c)if(a.match(f))return!0;return!1},keystrokeToString:function(c,f){var a=f&16711680,e=
f&65535,b=CKEDITOR.env.mac,k=[],g=[];a&CKEDITOR.CTRL&&(k.push(b?"⌘":c[17]),g.push(b?c[224]:c[17]));a&CKEDITOR.ALT&&(k.push(b?"⌥":c[18]),g.push(c[18]));a&CKEDITOR.SHIFT&&(k.push(b?"⇧":c[16]),g.push(c[16]));e&&(c[e]?(k.push(c[e]),g.push(c[e])):(k.push(String.fromCharCode(e)),g.push(String.fromCharCode(e))));return{display:k.join("+"),aria:g.join("+")}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(c){c=c.toLowerCase();
for(var f=document.cookie.split(";"),a,e,b=0;b<f.length;b++)if(a=f[b].split("\x3d"),e=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),e===c)return decodeURIComponent(1<a.length?a[1]:"");return null},setCookie:function(c,f){document.cookie=encodeURIComponent(c)+"\x3d"+encodeURIComponent(f)+";path\x3d/"},getCsrfToken:function(){var c=CKEDITOR.tools.getCookie("ckCsrfToken");if(!c||40!=c.length){var c=[],f="";if(window.crypto&&window.crypto.getRandomValues)c=new Uint8Array(40),window.crypto.getRandomValues(c);
else for(var a=0;40>a;a++)c.push(Math.floor(256*Math.random()));for(a=0;a<c.length;a++)var e="abcdefghijklmnopqrstuvwxyz0123456789".charAt(c[a]%36),f=f+(.5<Math.random()?e.toUpperCase():e);c=f;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 f=(c=c.data)&&c.$;return c&&f?CKEDITOR.env.ie&&9>CKEDITOR.env.version?4===
f.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:1===f.button?CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:f.button:!1},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 f={},a=this._findColor(c);a.length&&(f.color=a[0],CKEDITOR.tools.array.forEach(a,function(f){c=c.replace(f,"")}));if(c=CKEDITOR.tools.trim(c))f.unprocessed=
c;return f},margin:function(c){function f(f){a.top=e[f[0]];a.right=e[f[1]];a.bottom=e[f[2]];a.left=e[f[3]]}var a={},e=c.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(e.length){case 1:f([0,0,0,0]);break;case 2:f([0,1,0,1]);break;case 3:f([0,1,2,1]);break;case 4:f([0,1,2,3])}return a},border:function(c){var f={};c=c.split(/\s+/);CKEDITOR.tools.array.forEach(c,function(c){if(!f.color){var a=CKEDITOR.tools.style.parse._findColor(c);if(a.length){f.color=a[0];return}}f.style||
-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,c)?!f.width&&CKEDITOR.tools.style.parse._widthRegExp.test(c)&&(f.width=c):f.style=c});return f},_findColor:function(c){var f=[],a=CKEDITOR.tools.array,f=f.concat(c.match(this._rgbaRegExp)||[]),f=f.concat(c.match(this._hslaRegExp)||[]);return f=f.concat(a.filter(c.split(/\s+/),function(f){return f.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:f.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(c,f,a){var e=
[];this.forEach(c,function(b,k){f.call(a,b,k,c)&&e.push(b)});return e},forEach:function(c,f,a){var e=c.length,b;for(b=0;b<e;b++)f.call(a,c[b],b,c)},map:function(c,f,a){for(var e=[],b=0;b<c.length;b++)e.push(f.call(a,c[b],b,c));return e},reduce:function(c,f,a,e){for(var b=0;b<c.length;b++)a=f.call(e,a,c[b],b,c);return a}},object:{findKey:function(c,f){if("object"!==typeof c)return null;for(var a in c)if(c[a]===f)return a;return null}}};CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=
CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=1;CKEDITOR.MOUSE_BUTTON_RIGHT=2}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,d=function(c,f){for(var a=CKEDITOR.tools.clone(c),e=1;e<arguments.length;e++){f=arguments[e];for(var b in f)delete a[b]}return a},b={},g={},h={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={},k={"#":1},e={center:1,dir:1,noframes:1};a(b,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},k,{acronym:1,applet:1,
basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(g,h,b,e);d={a:d(b,{a:1,button:1}),abbr:b,address:g,area:m,article:g,aside:g,audio:a({source:1,track:1},g),b:b,base:m,bdi:b,bdo:b,blockquote:g,body:g,br:m,button:d(b,{a:1,button:1}),canvas:b,caption:g,cite:b,code:b,col:m,colgroup:{col:1},command:m,datalist:a({option:1},b),dd:g,del:b,details:a({summary:1},g),dfn:b,div:g,dl:{dt:1,dd:1},dt:g,em:b,embed:m,fieldset:a({legend:1},g),figcaption:g,figure:a({figcaption:1},g),footer:g,form:g,h1:b,h2:b,
h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},l),header:g,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:m,html:a({head:1,body:1},g,l),i:b,iframe:k,img:m,input:m,ins:b,kbd:b,keygen:m,label:b,legend:b,li:g,link:m,main:g,map:g,mark:b,menu:a({li:1},g),meta:m,meter:d(b,{meter:1}),nav:g,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:k,output:b,p:b,param:m,pre:b,progress:d(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:k,section:g,select:{optgroup:1,
option:1},small:b,source:m,span:b,strong:b,style:k,sub:b,summary:a({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},b),sup:b,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:g,textarea:k,tfoot:{tr:1},th:g,thead:{tr:1},time:d(b,{time:1}),title:k,tr:{th:1,td:1},track:m,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},g),wbr:m,acronym:b,applet:a({param:1},g),basefont:m,big:b,center:g,dialog:m,dir:{li:1},font:b,isindex:m,noframes:g,strike:b,tt:b};a(d,{$block:a({audio:1,dd:1,dt:1,figcaption:1,
li:1,video:1},h,e),$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:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},d.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 d}(),CKEDITOR.dom.event=function(a){this.$=a},CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a+=CKEDITOR.CTRL;this.$.shiftKey&&(a+=CKEDITOR.SHIFT);this.$.altKey&&(a+=CKEDITOR.ALT);return a},preventDefault:function(a){var d=this.$;d.preventDefault?d.preventDefault():d.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=
this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},getTarget:function(){var a=this.$.target||this.$.srcElement;return a?new CKEDITOR.dom.node(a):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var a=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(a.documentElement.scrollLeft||a.body.scrollLeft),y:this.$.pageY||this.$.clientY+(a.documentElement.scrollTop||a.body.scrollTop)}}},CKEDITOR.CTRL=1114112,CKEDITOR.SHIFT=2228224,CKEDITOR.ALT=
4456448,CKEDITOR.EVENT_PHASE_CAPTURING=1,CKEDITOR.EVENT_PHASE_AT_TARGET=2,CKEDITOR.EVENT_PHASE_BUBBLING=3,CKEDITOR.dom.domObject=function(a){a&&(this.$=a)},CKEDITOR.dom.domObject.prototype=function(){var a=function(a,b){return function(g){"undefined"!=typeof CKEDITOR&&a.fire(b,new CKEDITOR.dom.event(g))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(d){var b=this.getCustomData("_cke_nativeListeners");b||(b={},this.setCustomData("_cke_nativeListeners",
b));b[d]||(b=b[d]=a(this,d),this.$.addEventListener?this.$.addEventListener(d,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+d,b));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(a){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(a)){var b=this.getCustomData("_cke_nativeListeners"),g=b&&b[a];g&&(this.$.removeEventListener?this.$.removeEventListener(a,g,!1):this.$.detachEvent&&this.$.detachEvent("on"+
a,g),delete b[a])}},removeAllListeners:function(){var a=this.getCustomData("_cke_nativeListeners"),b;for(b in a){var g=a[b];this.$.detachEvent?this.$.detachEvent("on"+b,g):this.$.removeEventListener&&this.$.removeEventListener(b,g,!1);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var d={};CKEDITOR.on("reset",function(){d={}});a.equals=function(a){try{return a&&a.$===this.$}catch(g){return!1}};a.setCustomData=function(a,g){var h=this.getUniqueId();(d[h]||(d[h]=
{}))[a]=g;return this};a.getCustomData=function(a){var g=this.$["data-cke-expando"];return(g=g&&d[g])&&a in g?g[a]:null};a.removeCustomData=function(a){var g=this.$["data-cke-expando"],g=g&&d[g],h,l;g&&(h=g[a],l=a in g,delete g[a]);return l?h:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.$["data-cke-expando"];a&&delete d[a]};a.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(a)}(CKEDITOR.dom.domObject.prototype),
CKEDITOR.dom.node=function(a){return a?new CKEDITOR.dom[a.nodeType==CKEDITOR.NODE_DOCUMENT?"document":a.nodeType==CKEDITOR.NODE_ELEMENT?"element":a.nodeType==CKEDITOR.NODE_TEXT?"text":a.nodeType==CKEDITOR.NODE_COMMENT?"comment":a.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](a):this},CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject,CKEDITOR.NODE_ELEMENT=1,CKEDITOR.NODE_DOCUMENT=9,CKEDITOR.NODE_TEXT=3,CKEDITOR.NODE_COMMENT=8,CKEDITOR.NODE_DOCUMENT_FRAGMENT=11,CKEDITOR.POSITION_IDENTICAL=
0,CKEDITOR.POSITION_DISCONNECTED=1,CKEDITOR.POSITION_FOLLOWING=2,CKEDITOR.POSITION_PRECEDING=4,CKEDITOR.POSITION_IS_CONTAINED=8,CKEDITOR.POSITION_CONTAINS=16,CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,d){a.append(this,d);return a},clone:function(a,d){function b(g){g["data-cke-expando"]&&(g["data-cke-expando"]=!1);if(g.nodeType==CKEDITOR.NODE_ELEMENT||g.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(d||g.nodeType!=CKEDITOR.NODE_ELEMENT||g.removeAttribute("id",!1),a){g=g.childNodes;
for(var h=0;h<g.length;h++)b(g[h])}}function g(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=b.getName();":"==d[0]&&b.renameNode(d.substring(1))}if(a)for(d=0;d<b.getChildCount();d++)g(b.getChild(d))}}var h=this.$.cloneNode(a);b(h);h=new CKEDITOR.dom.node(h);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&g(h);return h},hasPrevious:function(){return!!this.$.previousSibling},
hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,g=this.$;g&&g!=b;){var h=g.parentNode;h&&d.unshift(this.getIndex.call({$:g},a));g=h}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||
this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,g){var e=g?a.nextSibling:a.previousSibling;return e&&e.nodeType==CKEDITOR.NODE_TEXT?b(e)?d(e,g):e:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var g=this.$,h=-1,l;if(!this.$.parentNode||a&&g.nodeType==CKEDITOR.NODE_TEXT&&b(g)&&!d(g)&&!d(g,!0))return-1;do a&&g!=this.$&&g.nodeType==CKEDITOR.NODE_TEXT&&(l||b(g))||(h++,l=g.nodeType==CKEDITOR.NODE_TEXT);while(g=g.previousSibling);return h},
getNextSourceNode:function(a,d,b){if(b&&!b.call){var g=b;b=function(a){return!a.equals(g)}}a=!a&&this.getFirst&&this.getFirst();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(h=(h||this).getParent());){if(b&&!1===b(h,!0))return null;a=h.getNext()}return!a||b&&!1===b(a)?null:d&&d!=a.type?a.getNextSourceNode(!1,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call){var g=b;b=function(a){return!a.equals(g)}}a=!a&&this.getLast&&this.getLast();
var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(h=(h||this).getParent());){if(b&&!1===b(h,!0))return null;a=h.getPrevious()}return!a||b&&!1===b(a)?null:d&&a.type!=d?a.getPreviousSourceNode(!1,d,b):a},getPrevious:function(a){var d=this.$,b;do b=(d=d.previousSibling)&&10!=d.nodeType&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));
return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=
this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return 0>d.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:
CKEDITOR.POSITION_FOLLOWING}d=this.getAddress();a=a.getAddress();for(var b=Math.min(d.length,a.length),g=0;g<b;g++)if(d[g]!=a[g])return d[g]<a[g]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return d.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,d){var b=this.$,g,h;d||(b=b.parentNode);"function"==typeof a?(h=!0,g=a):(h=!1,g=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():
"";return"string"==typeof a?b==a:b in a});for(;b;){if(g(h?new CKEDITOR.dom.node(b):b))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(l){b=null}}return null},hasAscendant:function(a,d){var b=this.$;d||(b=b.parentNode);for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return!0;b=b.parentNode}return!1},move:function(a,d){a.append(this.remove(),d)},remove:function(a){var d=this.$,b=d.parentNode;if(b){if(a)for(;a=d.firstChild;)b.insertBefore(d.removeChild(a),d);b.removeChild(d)}return this},
replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(d)d.length<b&&(a.split(b-d.length),this.$.removeChild(this.$.firstChild));else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a=this.getLast());){if(a.type==CKEDITOR.NODE_TEXT){var d=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();
if(d)d.length<b&&(a.split(d.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{a.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(a=this.$.lastChild)&&1==a.type&&"br"==a.nodeName.toLowerCase()&&a.parentNode.removeChild(a)},isReadOnly:function(a){var d=this;this.type!=CKEDITOR.NODE_ELEMENT&&(d=this.getParent());CKEDITOR.env.edge&&d&&d.is("textarea","input")&&(a=!0);if(!a&&d&&"undefined"!=typeof d.$.isContentEditable)return!(d.$.isContentEditable||d.data("cke-editable"));for(;d;){if(d.data("cke-editable"))return!1;
if(d.hasAttribute("contenteditable"))return"false"==d.getAttribute("contenteditable");d=d.getParent()}return!0}}),CKEDITOR.dom.window=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var a=this.$.document,d="CSS1Compat"==a.compatMode;return{width:(d?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(d?a.documentElement.clientHeight:
a.body.clientHeight)||0}},getScrollPosition:function(){var a=this.$;if("pageXOffset"in a)return{x:a.pageXOffset||0,y:a.pageYOffset||0};a=a.document;return{x:a.documentElement.scrollLeft||a.body.scrollLeft||0,y:a.documentElement.scrollTop||a.body.scrollTop||0}},getFrame:function(){var a=this.$.frameElement;return a?new CKEDITOR.dom.element.get(a):null}}),CKEDITOR.dom.document=function(a){CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject,CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,
{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var d=new CKEDITOR.dom.element("link");d.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(d)}},appendStyleText:function(a){if(this.$.createStyleSheet){var d=this.$.createStyleSheet("");d.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return d||b.$.sheet},createElement:function(a,
d){var b=new CKEDITOR.dom.element(a,this);d&&(d.attributes&&b.setAttributes(d.attributes),d.styles&&b.setStyles(d.styles));return b},createText:function(a){return new CKEDITOR.dom.text(a,this)},focus:function(){this.getWindow().focus()},getActive:function(){var a;try{a=this.$.activeElement}catch(d){return null}return new CKEDITOR.dom.element(a)},getById:function(a){return(a=this.$.getElementById(a))?new CKEDITOR.dom.element(a):null},getByAddress:function(a,d){for(var b=this.$.documentElement,g=0;b&&
g<a.length;g++){var h=a[g];if(d)for(var l=-1,m=0;m<b.childNodes.length;m++){var k=b.childNodes[m];if(!0!==d||3!=k.nodeType||!k.previousSibling||3!=k.previousSibling.nodeType)if(l++,l==h){b=k;break}}else b=b.childNodes[h]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,d){CKEDITOR.env.ie&&8>=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0];return a=a?new CKEDITOR.dom.element(a):
this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+
")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},
getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}},CKEDITOR.dom.element=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},
CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,d,b,g){var h=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),l=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[h]=d;l[b]=1;
return d.setCustomData(b,g)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)},CKEDITOR.dom.element.clearMarkers=function(a,d,b){var g=d.getCustomData("list_marker_names"),h=d.getCustomData("list_marker_id"),l;for(l in g)d.removeCustomData(l);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[h])},function(){function a(a,e){return-1<(" "+a+" ").replace(l," ").indexOf(" "+e+" ")}function d(a){var e=!0;
a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),e=!1);return function(){e||a.removeAttribute("id")}}function b(a,e){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+e.split(/,\s*/).join(", #"+c+" ")}function g(a){for(var e=0,c=0,f=m[a].length;c<f;c++)e+=parseFloat(this.getComputedStyle(m[a][c])||0,10)||0;return e}var h=document.createElement("_").classList,h="undefined"!==typeof h&&null!==String(h.add).match(/\[Native code\]/gi),l=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,
{type:CKEDITOR.NODE_ELEMENT,addClass:h?function(a){this.$.classList.add(a);return this}:function(b){var e=this.$.className;e&&(a(e,b)||(e+=" "+b));this.$.className=e||b;return this},removeClass:h?function(a){var e=this.$;e.classList.remove(a);e.className||e.removeAttribute("class");return this}:function(b){var e=this.getAttribute("class");e&&a(e,b)&&((e=e.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",e):this.removeAttribute("class"));return this},
hasClass:function(b){return a(this.$.className,b)},append:function(a,e){"string"==typeof a&&(a=this.getDocument().createElement(a));e?this.$.insertBefore(a.$,this.$.firstChild):this.$.appendChild(a.$);return a},appendHtml:function(a){if(this.$.childNodes.length){var e=new CKEDITOR.dom.element("div",this.getDocument());e.setHtml(a);e.moveChildren(this)}else this.setHtml(a)},appendText:function(a){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},
appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,e){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a);var f=c.extractContents(!1,e||!1),b;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=
new CKEDITOR.dom.element("div");b=f.getFirst();)b.$.style.backgroundColor&&(b.$.style.backgroundColor=b.$.style.backgroundColor),c.append(b);c.insertAfter(this);c.remove(!0)}else f.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var e=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?e.contains(a.getParent().$):e!=a.$&&e.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(e){}}return function(e){e?
CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);
return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var e=this.$;if(this.getParent())return e.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(e);e.innerHTML=a;c.removeChild(e);return a}catch(f){this.$.innerHTML="";e=new CKEDITOR.dom.element("body",this.getDocument());e.$.innerHTML=a;for(e=e.getChildren();e.count();)this.append(e.getItem(0));return a}}:function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML=
"x";a=a.textContent;return function(e){this.$[a?"textContent":"innerText"]=e}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a,2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?
a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var e={},c=this.$.attributes,f;a=CKEDITOR.tools.isArray(a)?a:[];for(f=0;f<c.length;f++)-1===CKEDITOR.tools.indexOf(a,c[f].name)&&(e[c[f].name]=c[f].value);
return e},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(a){var e=this.getWindow().$.getComputedStyle(this.$,null);return e?e.getPropertyValue(a):""}:function(a){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)]},getDtd:function(){var a=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return a};return a},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,
getTabIndex:function(){var a=this.$.tabIndex;return 0!==a||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?a:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var a=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var e=this.$.scopeName;"HTML"!=
e&&(a=e.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var e=this.$.firstChild;(e=e&&new CKEDITOR.dom.node(e))&&a&&!a(e)&&(e=e.getNext(a));return e},getLast:function(a){var e=this.$.lastChild;(e=e&&new CKEDITOR.dom.node(e))&&a&&!a(e)&&(e=e.getPrevious(a));return e},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];
for(var e=0;e<arguments.length;e++)if(arguments[e]==a)return!0;return!1},isEditable:function(a){var e=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[e]||CKEDITOR.dtd.$empty[e]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[e]||CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var e=this.clone(0,1);a=a.clone(0,
1);e.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(e.$.isEqualNode)return e.$.style.cssText=CKEDITOR.tools.normalizeCssText(e.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),e.$.isEqualNode(a.$);e=e.getOuterHtml();a=a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var c=this.getParent();
c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(e),e=c.getHtml(),c.setHtml(a),a=c.getHtml())}return e==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),e,c;a&&CKEDITOR.env.webkit&&(e=this.getWindow(),!e.equals(CKEDITOR.document.getWindow())&&(c=e.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var a=this.getChildren(),
e=0,c=a.count();e<c;e++){var f=a.getItem(e);if(f.type!=CKEDITOR.NODE_ELEMENT||!f.data("cke-bookmark"))if(f.type==CKEDITOR.NODE_ELEMENT&&!f.isEmptyInlineRemoveable()||f.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(f.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var a=this.$.attributes,e=0;e<a.length;e++){var c=a[e];switch(c.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(c.specified)return!0}}return!1}:
function(){var a=this.$.attributes,e=a.length,c={"data-cke-expando":1,_moz_dirty:1};return 0<e&&(2<e||!c[a[0].nodeName]||2==e&&!c[a[1].nodeName])},hasAttribute:function(){function a(e){var c=this.$.attributes.getNamedItem(e);if("input"==this.getName())switch(e){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return e=this.getAttribute("type"),"checkbox"==e||"radio"==e?"on"!=this.$.value:!!this.$.value}return c?c.specified:!1}return CKEDITOR.env.ie?
8>CKEDITOR.env.version?function(e){return"name"==e?!!this.$.name:a.call(this,e)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,e){var c=this.$;a=a.$;if(c!=a){var f;if(e)for(;f=c.lastChild;)a.insertBefore(c.removeChild(f),a.firstChild);else for(;f=c.firstChild;)a.appendChild(c.removeChild(f))}},mergeSiblings:function(){function a(e,c,f){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var b=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(b.push(c),
c=f?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(e.isIdentical(c)){for(var g=f?e.getLast():e.getFirst();b.length;)b.shift().move(e,!f);c.moveChildren(e,!f);c.remove();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(e){if(!1===e||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var a=function(a,c){this.$.setAttribute(a,
c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(e,c){"class"==e?this.$.className=c:"style"==e?this.$.style.cssText=c:"tabindex"==e?this.$.tabIndex=c:"checked"==e?this.$.checked=c:"contenteditable"==e?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(e,c){if("src"==e&&c.match(/^http:\/\//))try{a.apply(this,arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var e in a)this.setAttribute(e,
a[e]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var e=0;e<a.length;e++)this.removeAttribute(a[e]);else for(e in a=a||this.getAttributes(),
a)a.hasOwnProperty(e)&&this.removeAttribute(e)},removeStyle:function(a){var e=this.$.style;if(e.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)e.removeProperty?e.removeProperty(a):e.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var c=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var e=[],b=0;b<c.length;b++)if(f)for(var g=0;g<f.length;g++)e.push([a,c[b],f[g]].join("-"));else e.push([a,c[b]].join("-"));
for(a=0;a<e.length;a++)this.removeStyle(e[a])}},setStyle:function(a,e){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=e;return this},setStyles:function(a){for(var e in a)this.setStyle(e,a[e]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));
if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,e=this.getElementsByTag("*"),c=0,f=e.count();c<f;c++)a=e.getItem(c),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var e=0,c=0,f=this.getDocument(),b=f.getBody(),g="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
8!==CKEDITOR.env.version:1)){var d=this.$.getBoundingClientRect(),h=f.$.documentElement,t=h.clientTop||b.$.clientTop||0,p=h.clientLeft||b.$.clientLeft||0,l=!0;CKEDITOR.env.ie&&(l=f.getDocumentElement().contains(this),f=f.getBody().contains(this),l=g&&f||!g&&l);l&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(e=b.$.scrollLeft||h.scrollLeft,c=b.$.scrollTop||h.scrollTop):(c=g?b.$:h,e=c.scrollLeft,c=c.scrollTop),e=d.left+e-p,c=d.top+c-t)}else for(t=this,p=null;t&&"body"!=t.getName()&&
"html"!=t.getName();){e+=t.$.offsetLeft-t.$.scrollLeft;c+=t.$.offsetTop-t.$.scrollTop;t.equals(this)||(e+=t.$.clientLeft||0,c+=t.$.clientTop||0);for(;p&&!p.equals(t);)e-=p.$.scrollLeft,c-=p.$.scrollTop,p=p.getParent();p=t;t=(d=t.$.offsetParent)?new CKEDITOR.dom.element(d):null}a&&(d=this.getWindow(),t=a.getWindow(),!d.equals(t)&&d.$.frameElement&&(a=(new CKEDITOR.dom.element(d.$.frameElement)).getDocumentPosition(a),e+=a.x,c+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
g||(e+=this.$.clientLeft?1:0,c+=this.$.clientTop?1:0);return{x:e,y:c}},scrollIntoView:function(a){var e=this.getParent();if(e){do if((e.$.clientWidth&&e.$.clientWidth<e.$.scrollWidth||e.$.clientHeight&&e.$.clientHeight<e.$.scrollHeight)&&!e.is("body")&&this.scrollIntoParent(e,a,1),e.is("html")){var c=e.getWindow();try{var f=c.$.frameElement;f&&(e=new CKEDITOR.dom.element(f))}catch(b){}}while(e=e.getParent())}},scrollIntoParent:function(a,e,c){var f,b,g,d;function h(f,c){/body|html/.test(a.getName())?
a.getWindow().$.scrollBy(f,c):(a.$.scrollLeft+=f,a.$.scrollTop+=c)}function t(a,f){var c={x:0,y:0};if(!a.is(l?"body":"html")){var b=a.$.getBoundingClientRect();c.x=b.left;c.y=b.top}b=a.getWindow();b.equals(f)||(b=t(CKEDITOR.dom.element.get(b.$.frameElement),f),c.x+=b.x,c.y+=b.y);return c}function p(a,f){return parseInt(a.getComputedStyle("margin-"+f)||0,10)||0}!a&&(a=this.getWindow());g=a.getDocument();var l="BackCompat"==g.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=l?g.getBody():g.getDocumentElement());
CKEDITOR.env.webkit&&(g=this.getEditor(!1))&&(g._.previousScrollTop=null);g=a.getWindow();b=t(this,g);var m=t(a,g),D=this.$.offsetHeight;f=this.$.offsetWidth;var r=a.$.clientHeight,x=a.$.clientWidth;g=b.x-p(this,"left")-m.x||0;d=b.y-p(this,"top")-m.y||0;f=b.x+f+p(this,"right")-(m.x+x)||0;b=b.y+D+p(this,"bottom")-(m.y+r)||0;(0>d||0<b)&&h(0,!0===e?d:!1===e?b:0>d?d:b);c&&(0>g||0<f)&&h(0>g?g:f,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},
getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var f=0;f<c.length;f++){var g=c[f],d=g.nodeName.toLowerCase(),h;if(!(d in b))if("checked"==d&&(h=this.getAttribute(d)))a.setAttribute(d,h);else if(!CKEDITOR.env.ie||this.hasAttribute(d))h=this.getAttribute(d),null===h&&(h=g.nodeValue),a.setAttribute(d,h)}""!==this.$.style.cssText&&
(a.$.style.cssText=this.$.style.cssText)},renameNode:function(a){if(this.getName()!=a){var b=this.getDocument();a=new CKEDITOR.dom.element(a,b);this.copyAttributes(a);this.moveChildren(a);this.getParent(!0)&&this.$.parentNode.replaceChild(a.$,this.$);a.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=a.$;delete this.getName}},getChild:function(){function a(b,c){var f=b.childNodes;if(0<=c&&c<f.length)return f[c]}return function(b){var c=this.$;if(b.slice)for(b=b.slice();0<b.length&&c;)c=a(c,
b.shift());else c=a(c,b);return c?new CKEDITOR.dom.node(c):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(b){b.data.getTarget().getAscendant(a,!0)||b.data.preventDefault()})},getDirection:function(a){return a?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||
"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(a,b){a="data-"+a;if(void 0===b)return this.getAttribute(a);!1===b?this.removeAttribute(a):this.setAttribute(a,b);return null},getEditor:function(a){var b=CKEDITOR.instances,c,f,g;a=a||void 0===a;for(c in b)if(f=b[c],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(g=f.editable())&&(g.equals(this)||g.contains(this)))return f;return null},find:function(a){var e=d(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this,
a)));e();return a},findOne:function(a){var e=d(this);a=this.$.querySelector(b(this,a));e();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var f=a(this);if(!1!==f){c=this.getChildren();for(var g=0;g<c.count();g++)f=c.getItem(g),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}}});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(a,b,c){"number"==typeof b&&(!c||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=g.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var c=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(c-=g.call(this,a));return c}}(),CKEDITOR.dom.documentFragment=function(a){a=a||CKEDITOR.document;this.$=a.type==CKEDITOR.NODE_DOCUMENT?a.$.createDocumentFragment():a},CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,
CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(a){a=a.$;a.parentNode.insertBefore(this.$,a.nextSibling)},getHtml:function(){var a=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(a);return a.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,
getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,f){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(),null;c.optimize()}var b,g=c.startContainer;b=c.endContainer;var e=c.startOffset,n=c.endOffset,d,h=this.guard,k=this.type,l=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var m=b.type==CKEDITOR.NODE_ELEMENT?b:b.getParent(),C=b.type==CKEDITOR.NODE_ELEMENT?b.getChild(n):b.getNext();this._.guardLTR=function(a,
f){return(!f||!m.equals(a))&&(!C||!a.equals(C))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(c.root))}}if(a&&!this._.guardRTL){var B=g.type==CKEDITOR.NODE_ELEMENT?g:g.getParent(),G=g.type==CKEDITOR.NODE_ELEMENT?e?g.getChild(e-1):null:g.getPrevious();this._.guardRTL=function(a,f){return(!f||!B.equals(a))&&(!G||!a.equals(G))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(c.root))}}var H=a?this._.guardRTL:this._.guardLTR;d=h?function(a,f){return!1===H(a,f)?!1:h(a,f)}:H;this.current?b=this.current[l](!1,
k,d):(a?b.type==CKEDITOR.NODE_ELEMENT&&(b=0<n?b.getChild(n-1):!1===d(b,!0)?null:b.getPreviousSourceNode(!0,k,d)):(b=g,b.type==CKEDITOR.NODE_ELEMENT&&((b=b.getChild(e))||(b=!1===d(g,!0)?null:g.getNextSourceNode(!0,k,d)))),b&&!1===d(b)&&(b=null));for(;b&&!this._.end;){this.current=b;if(!this.evaluator||!1!==this.evaluator(b)){if(!f)return b}else if(f&&this.evaluator)return!1;b=b[l](!1,k,d)}this.end();return this.current=null}function d(f){for(var c,b=null;c=a.call(this,f);)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 a.call(this)},previous:function(){return a.call(this,1)},checkForward:function(){return!1!==a.call(this,0,1)},checkBackward:function(){return!1!==a.call(this,1,1)},lastForward:function(){return d.call(this)},lastBackward:function(){return d.call(this,1)},reset:function(){delete this.current;this._={}}}});var b={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},g={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in g||!b[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(f){return!(f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=
function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,f){function c(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(b){var g,e;g=b&&b.type!=CKEDITOR.NODE_ELEMENT&&(e=b.getParent())&&c(e);g=a?g:g||c(b);return!!(f^g)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(f){var c;f&&f.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(f.getText())||CKEDITOR.env.webkit&&f.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var f=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(b){f(b)?b=1:(b.type==CKEDITOR.NODE_TEXT&&(b=b.getParent()),b=b.$.offsetWidth<=c);return!!(a^b)}};CKEDITOR.dom.walker.nodeType=function(a,f){return function(c){return!!(f^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function f(a){return!l(a)&&!m(a)}return function(c){var b=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&h.test(c.getText());b&&(b=c.getParent(),
c=c.getNext(f),b=b.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^b)}};CKEDITOR.dom.walker.temp=function(a){return function(f){f.type!=CKEDITOR.NODE_ELEMENT&&(f=f.getParent());f=f&&f.hasAttribute("data-cke-temp");return!!(a^f)}};var h=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,l=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),k=CKEDITOR.dom.walker.temp(),e=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(f){f=l(f)||m(f)||k(f);return!!(a^f)}};var c=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(f){for(var b=0,g=f.getChildCount();b<g;++b)if(!c(f.getChild(b)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var f={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(f[c]=1);return f}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
function(a){return function(b){b=c(b)?!1:b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&(b.is(CKEDITOR.dtd.$inline)||b.is("hr")||"false"==b.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&b.is(n)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(e(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&h.test(a.getText()))?a:!1}}(),CKEDITOR.dom.range=function(a){this.endOffset=this.endContainer=
this.startOffset=this.startContainer=null;this.collapsed=!0;var d=a instanceof CKEDITOR.dom.document;this.document=d?a:a.getDocument();this.root=d?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function d(a,c,b,g,e){function d(a,f,c,b){var g=c?a.getPrevious():a.getNext();if(b&&l)return g;r||b?f.append(a.clone(!0,e),c):(a.remove(),m&&f.append(a,c));return g}function h(){var a,f,c,b=Math.min(F.length,
A.length);for(a=0;a<b;a++)if(f=F[a],c=A[a],!f.equals(c))return a;return a-1}function k(){var c=R-1,b=H&&I&&!x.equals(E);c<Q-1||c<T-1||b?(b?a.moveToPosition(E,CKEDITOR.POSITION_BEFORE_START):T==c+1&&G?a.moveToPosition(A[c],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(A[c+1],CKEDITOR.POSITION_BEFORE_START),g&&(c=F[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 l=0===c,m=1==c,r=2==c;c=r||m;var x=a.startContainer,E=a.endContainer,z=a.startOffset,C=a.endOffset,B,G,H,I,J,O;if(r&&E.type==CKEDITOR.NODE_TEXT&&(x.equals(E)||x.type===CKEDITOR.NODE_ELEMENT&&x.getFirst().equals(E)))b.append(a.document.createText(E.substring(z,C)));else{E.type==CKEDITOR.NODE_TEXT?r?O=!0:E=E.split(C):0<E.getChildCount()?C>=E.getChildCount()?(E=E.getChild(C-1),G=!0):E=E.getChild(C):I=G=!0;x.type==
CKEDITOR.NODE_TEXT?r?J=!0:x.split(z):0<x.getChildCount()?0===z?(x=x.getChild(z),B=!0):x=x.getChild(z-1):H=B=!0;for(var F=x.getParents(),A=E.getParents(),R=h(),Q=F.length-1,T=A.length-1,P=b,Z,aa,X,ea=-1,N=R;N<=Q;N++){aa=F[N];X=aa.getNext();for(N!=Q||aa.equals(A[N])&&Q<T?c&&(Z=P.append(aa.clone(0,e))):B?d(aa,P,!1,H):J&&P.append(a.document.createText(aa.substring(z)));X;){if(X.equals(A[N])){ea=N;break}X=d(X,P)}P=Z}P=b;for(N=R;N<=T;N++)if(b=A[N],X=b.getPrevious(),b.equals(F[N]))c&&(P=P.getChild(0));else{N!=
T||b.equals(F[N])&&T<Q?c&&(Z=P.append(b.clone(0,e))):G?d(b,P,!1,I):O&&P.append(a.document.createText(b.substring(0,C)));if(N>ea)for(;X;)X=d(X,P,!0);P=Z}r||k()}}function b(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!0),g=CKEDITOR.dom.walker.bogus();return function(e){return b(e)||c(e)?!0:g(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(l)?!1:!0}}function g(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 h(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&c(a)&&(b=a);return e(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(),
k=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,e=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||d(this,2,c,!1,"undefined"==typeof a?!0:a);return c},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a,c){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,b,a,"undefined"==typeof c?!0:c);return b},createBookmark:function(a){var c,b,g,e,d=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+(d?"C":"S")));d||(b=c.clone(),b.setHtml("\x26nbsp;"),a&&b.setAttribute("id",g+"E"),e=this.clone(),e.collapse(),e.insertNode(b));e=this.clone();e.collapse(!0);e.insertNode(c);b?(this.setStartAfter(c),this.setEndBefore(b)):this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END);return{startNode:a?g+(d?"C":"S"):c,endNode:a?g+"E":b,serializable:a,collapsed:d}},createBookmark2:function(){function a(f){var c=
f.container,g=f.offset,e;e=c;var d=g;e=e.type!=CKEDITOR.NODE_ELEMENT||0===d||d==e.getChildCount()?0:e.getChild(d-1).type==CKEDITOR.NODE_TEXT&&e.getChild(d).type==CKEDITOR.NODE_TEXT;e&&(c=c.getChild(g-1),g=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0<g){a:{for(e=c;g--;)if(d=e.getChild(g).getIndex(!0),0<=d){g=d;break a}g=-1}g+=1}if(c.type==CKEDITOR.NODE_TEXT){e=c;for(d=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)d+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
e=d;c.getText()?g+=e:(d=c.getPrevious(b),e?(g=e,c=d?d.getNext():c.getParent().getFirst()):(c=c.getParent(),g=d?d.getIndex(!0)+1:0))}f.container=c;f.offset=g}function c(a,f){var b=f.getCustomData("cke-fillingChar");if(b){var g=a.container;b.equals(g)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=g.getIndex(),a.container=g.getParent()))}}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(b){var g=this.collapsed,e={container:this.startContainer,
offset:this.startOffset},d={container:this.endContainer,offset:this.endOffset};b&&(a(e),c(e,this.root),g||(a(d),c(d,this.root)));return{start:e.container.getAddress(b),end:g?null:d.container.getAddress(b),startOffset:e.offset,endOffset:d.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,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>b)a=a.getChild(b);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=
a.getNextSourceNode()||a}if(c.type==CKEDITOR.NODE_ELEMENT)if(e=c.getChildCount(),e>g)c=c.getChild(g).getPreviousSourceNode(!0);else if(1>e)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,e=this.collapsed;if((!a||e)&&b&&b.type==CKEDITOR.NODE_TEXT){if(g)if(g>=b.getLength())g=b.getIndex()+1,b=b.getParent();else{var d=b.split(g),g=b.getIndex()+1,b=b.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(d,this.endOffset-this.startOffset):b.equals(this.endContainer)&&(this.endOffset+=1)}else g=b.getIndex(),b=b.getParent();
this.setStart(b,g);if(e){this.collapse(!0);return}}b=this.endContainer;g=this.endOffset;c||e||!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 e=1;case CKEDITOR.ENLARGE_ELEMENT:var d=function(a,c){var f=new CKEDITOR.dom.range(k);
f.setStart(a,c);f.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var f=new CKEDITOR.dom.walker(f),b;for(f.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};b=f.next();){if(b.type!=CKEDITOR.NODE_TEXT)return!1;B=b!=a?b.getText():b.substring(c);if(g.test(B))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),k=this.root,l,m,r,x,E,z=!1,C,B;C=this.startContainer;var G=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(G&&(C=!CKEDITOR.tools.trim(C.substring(0,G)).length&&
C,z=!!C),C&&((x=C.getPrevious())||(r=C.getParent()))):(G&&(x=C.getChild(G-1)||C.getLast()),x||(r=C));for(r=b(r);r||x;){if(r&&!x){!E&&r.equals(h)&&(E=!0);if(e?r.isBlockBoundary():!k.contains(r))break;z&&"inline"==r.getComputedStyle("display")||(z=!1,E?l=r:this.setStartBefore(r));x=r.getPrevious()}for(;x;)if(C=!1,x.type==CKEDITOR.NODE_COMMENT)x=x.getPrevious();else{if(x.type==CKEDITOR.NODE_TEXT)B=x.getText(),g.test(B)&&(x=null),C=/[\s\ufeff]$/.test(B);else if((x.$.offsetWidth>(CKEDITOR.env.webkit?1:
0)||c&&x.is("br"))&&!x.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[x.getName()]){B=x.getText();if(g.test(B))x=null;else for(var G=x.$.getElementsByTagName("*"),H=0,I;I=G[H++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){x=null;break}x&&(C=!!B.length)}else x=null;C&&(z?E?l=r:r&&this.setStartBefore(r):z=!0);if(x){C=x.getPrevious();if(!r&&!C){r=x;x=null;break}x=C}else r=null}r&&(r=b(r.getParent()))}C=this.endContainer;G=this.endOffset;r=x=null;E=z=!1;C.type==CKEDITOR.NODE_TEXT?
CKEDITOR.tools.trim(C.substring(G)).length?z=!0:(z=!C.getLength(),G==C.getLength()?(x=C.getNext())||(r=C.getParent()):d(C,G)&&(r=C.getParent())):(x=C.getChild(G))||(r=C);for(;r||x;){if(r&&!x){!E&&r.equals(h)&&(E=!0);if(e?r.isBlockBoundary():!k.contains(r))break;z&&"inline"==r.getComputedStyle("display")||(z=!1,E?m=r:r&&this.setEndAfter(r));x=r.getNext()}for(;x;){C=!1;if(x.type==CKEDITOR.NODE_TEXT)B=x.getText(),d(x,0)||(x=null),C=/^[\s\ufeff]/.test(B);else if(x.type==CKEDITOR.NODE_ELEMENT){if((0<x.$.offsetWidth||
c&&x.is("br"))&&!x.data("cke-bookmark"))if(z&&CKEDITOR.dtd.$removeEmpty[x.getName()]){B=x.getText();if(g.test(B))x=null;else for(G=x.$.getElementsByTagName("*"),H=0;I=G[H++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){x=null;break}x&&(C=!!B.length)}else x=null}else C=1;C&&z&&(E?m=r:this.setEndAfter(r));if(x){C=x.getNext();if(!r&&!C){r=x;x=null;break}x=C}else r=null}r&&(r=b(r.getParent()))}l&&m&&(h=l.contains(m)?m:l,this.setStartBefore(h),this.setEndAfter(h));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:r=
new CKEDITOR.dom.range(this.root);k=this.root;r.setStartAt(k,CKEDITOR.POSITION_AFTER_START);r.setEnd(this.startContainer,this.startOffset);r=new CKEDITOR.dom.walker(r);var J,O,F=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),A=null,R=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(A){if(A.equals(a)){A=null;return}}else A=a;else if(A)return;var c=F(a);c||(J=a);return c},e=function(a){var c=R(a);!c&&a.is&&a.is("br")&&
(O=a);return c};r.guard=R;r=r.lastBackward();J=J||k;this.setStartAt(J,!J.is("br")&&(!r&&this.checkStartOfBlock()||r&&J.contains(r))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){r=this.clone();r=new CKEDITOR.dom.walker(r);var Q=CKEDITOR.dom.walker.whitespaces(),T=CKEDITOR.dom.walker.bookmark();r.evaluator=function(a){return!Q(a)&&!T(a)};if((r=r.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("br"))break}r=this.clone();r.collapse();r.setEndAt(k,
CKEDITOR.POSITION_BEFORE_END);r=new CKEDITOR.dom.walker(r);r.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:R;J=A=O=null;r=r.lastForward();J=J||k;this.setEndAt(J,!r&&this.checkEndOfBlock()||r&&J.contains(r)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);O&&this.setEndAfter(O)}},shrink:function(a,c,b){var g="boolean"===typeof b?b:b&&"boolean"===typeof b.shrinkOnBlockBoundary?b.shrinkOnBlockBoundary:!0,e=b&&b.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var d=this.clone(),h=
this.startContainer,k=this.endContainer,l=this.startOffset,m=this.endOffset,r=b=1;h&&h.type==CKEDITOR.NODE_TEXT&&(l?l>=h.getLength()?d.setStartAfter(h):(d.setStartBefore(h),b=0):d.setStartBefore(h));k&&k.type==CKEDITOR.NODE_TEXT&&(m?m>=k.getLength()?d.setEndAfter(k):(d.setEndAfter(k),r=0):d.setEndBefore(k));var d=new CKEDITOR.dom.walker(d),x=CKEDITOR.dom.walker.bookmark(),E=CKEDITOR.dom.walker.bogus();d.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};
var z;d.guard=function(c,b){if(e&&E(c)||x(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||b&&c.equals(z)||!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||(z=c);return!0};b&&(h=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(h,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);r&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?
"lastBackward":"previous"]())&&this.setEndAt(d,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!b&&!r)}},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(c,b){c.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[c.getName()]&&(b=c.getIndex(),c=c.getParent());this._setStartContainer(c);this.startOffset=b;this.endContainer||(this._setEndContainer(c),this.endOffset=b);a(this)},setEnd:function(c,b){c.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[c.getName()]&&(b=c.getIndex()+
1,c=c.getParent());this._setEndContainer(c);this.endOffset=b;this.startContainer||(this._setStartContainer(c),this.startOffset=b);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(c,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(c,0);
break;case CKEDITOR.POSITION_BEFORE_END:c.type==CKEDITOR.NODE_TEXT?this.setStart(c,c.getLength()):this.setStart(c,c.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(c);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(c)}a(this)},setEndAt:function(c,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(c,0);break;case CKEDITOR.POSITION_BEFORE_END:c.type==CKEDITOR.NODE_TEXT?this.setEnd(c,c.getLength()):this.setEnd(c,c.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(c);
break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(c)}a(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 e=g.getBogus();e&&e.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),
e=b.block,d=g.block,h=null;if(!b.blockLimit.equals(g.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),d=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),d||(d=this.fixBlock(!1,a)));b=e&&this.checkStartOfBlock();g=d&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(d)&&(g?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END),d=null):b?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,
CKEDITOR.POSITION_BEFORE_START),e=null):(d=this.splitElement(e,c||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:d,wasStartOfBlock:b,wasEndOfBlock:g,elementPath:h}},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(f){return function(a){return c(a)||
b(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||f.is("table")&&a.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"](),e=g.block||g.blockLimit,d;e&&!e.equals(g.root)&&!e.getFirst(a(e));)d=e.getParent(),this[c?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=d;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,e=this.clone();e.collapse(b);e[b?"setStartAt":"setEndAt"](a,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=g(b);return e[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)),k.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=b();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)),k.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=b();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(c,b){for(;c;){if(c.type==CKEDITOR.NODE_ELEMENT){if("false"==c.getAttribute("contentEditable")&&!c.data("cke-editable"))return 0;if(c.is("html")||"true"==c.getAttribute("contentEditable")&&(c.contains(b)||c.equals(b)))break}c=c.getParent()}return 1}return function(){var c=this.startContainer,b=this.endContainer;return!(a(c,b)&&a(b,c))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,
b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var g=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);g=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),g=1;else if(b&&a.is("br")&&this.endContainer&&
this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,d=g,h=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(h=e[b?"getLast":"getFirst"](c));d||h||(h=e[b?"getPrevious":"getNext"](c));a=h}return!!g},moveToClosestEditablePosition:function(a,c){var b,g=0,e,d,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(b=new CKEDITOR.dom.range(this.root),
b.moveToPosition(a,h[c?0:1])):b=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))g=1;else if(e=b[c?"getNextEditableNode":"getPreviousEditableNode"]())g=1,(d=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&d&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(b.setEnd(e,0),b.collapse()):b.moveToPosition(e,h[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:h(),getPreviousEditableNode:h(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),e=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&&e&&(g.equals(e)||g.contains(e)||e.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,e=this.clone();e.optimize();(g=e.startContainer.type==CKEDITOR.NODE_TEXT)?(b=e.startContainer.getText(),
c=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();g&&(e.startContainer.setText(b),c.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,c){var b=this.getCommonAncestor(),g=this.getBoundaryNodes(),e=[],d,h,k,l;if(b&&b.find)for(h=b.find(a),d=0;d<h.count();d++)if(b=h.getItem(d),c||!b.isReadOnly())k=b.getPosition(g.startNode)&CKEDITOR.POSITION_FOLLOWING||
g.startNode.equals(b),l=b.getPosition(g.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||g.endNode.equals(b),k&&l&&e.push(b);return e}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,c){var b=a[a.length-1],f=!1;c=c.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(b){var g=new CKEDITOR.dom.range(c.root),f=new CKEDITOR.dom.walker(g),e=CKEDITOR.dom.walker.whitespaces();g.setStart(b.endContainer,b.endOffset);g.setEnd(c.startContainer,c.startOffset);
for(g=f.next();e(g)||c.endContainer.equals(g);)g=f.next();f=!g}f?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 a(a){1>
arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,f,g,e){a:{null==e&&(e=d(g));for(var h;h=e.shift();)if(h.getDtd().p){e={element:h,remaining:e};break a}e=null}if(!e)return 0;if((h=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!h.check(f))return b(a,f,g,e.remaining);
f=new CKEDITOR.dom.range(e.element);f.selectNodeContents(e.element);f=f.createIterator();f.enlargeBr=a.enlargeBr;f.enforceRealBlocks=a.enforceRealBlocks;f.activeFilter=f.filter=h;a._.nestedEditable={element:e.element,container:g,remaining:e.remaining,iterator:f};return 1}function g(a,b,g){if(!b)return!1;a=a.clone();a.collapse(!g);return a.checkBoundaryOfElement(b,g?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return l(a)&&
m(a)},e={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var f,d,m,u,w;a=a||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,f;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null;
if(!this._.started){var t=this.range.clone();d=t.startPath();var p=t.endPath(),q=!t.collapsed&&g(t,d.block),y=!t.collapsed&&g(t,p.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);q&&t.setStartAt(d.block,CKEDITOR.POSITION_BEFORE_END);y&&t.setEndAt(p.block,CKEDITOR.POSITION_AFTER_START);d=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!d||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(d=new CKEDITOR.dom.walker(t.clone()),
p=CKEDITOR.dom.walker.bookmark(!0,!0),d.evaluator=p,this._.nextNode=d.next(),d=new CKEDITOR.dom.walker(t.clone()),d.evaluator=p,d=d.previous(),this._.lastNode=d.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(p=this.range.clone(),p.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),p.checkEndOfBlock()&&(p=new CKEDITOR.dom.elementPath(p.endContainer,
p.root),this._.lastNode=(p.block||p.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(d)),t=null);this._.started=1;d=t}p=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;p;){var q=0,y=p.hasAscendant("pre"),D=p.type!=CKEDITOR.NODE_ELEMENT,r=0;if(D)p.type==CKEDITOR.NODE_TEXT&&h.test(p.getText())&&(D=0);else{var x=p.getName();if(CKEDITOR.dtd.$block[x]&&"false"==p.getAttribute("contenteditable")){f=
p;b(this,a,f);break}else if(p.isBlockBoundary(this.forceBrBreak&&!y&&{br:1})){if("br"==x)D=1;else if(!d&&!p.getChildCount()&&"hr"!=x){f=p;m=p.equals(t);break}d&&(d.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),"br"!=x&&(this._.nextNode=p));q=1}else{if(p.getFirst()){d||(d=this.range.clone(),d.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));p=p.getFirst();continue}D=1}}D&&!d&&(d=this.range.clone(),d.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));m=(!q||D)&&p.equals(t);if(d&&!q)for(;!p.getNext(k)&&!m;){x=
p.getParent();if(x.isBlockBoundary(this.forceBrBreak&&!y&&{br:1})){q=1;D=0;m||x.equals(t);d.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);break}p=x;D=1;m=p.equals(t);r=1}D&&d.setEndAt(p,CKEDITOR.POSITION_AFTER_END);p=this._getNextSourceNode(p,r,t);if((m=!p)||q&&d)break}if(!f){if(!d)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;f=new CKEDITOR.dom.elementPath(d.startContainer,d.root);p=f.blockLimit;q={div:1,th:1,td:1};f=f.block;!f&&p&&!this.enforceRealBlocks&&q[p.getName()]&&
d.checkStartOfBlock()&&d.checkEndOfBlock()&&!p.equals(d.root)?f=p:!f||this.enforceRealBlocks&&f.is(e)?(f=this.range.document.createElement(a),d.extractContents().appendTo(f),f.trim(),d.insertNode(f),u=w=!0):"li"!=f.getName()?d.checkStartOfBlock()&&d.checkEndOfBlock()||(f=f.clone(!1),d.extractContents().appendTo(f),f.trim(),w=d.splitBlock(),u=!w.wasStartOfBlock,w=!w.wasEndOfBlock,d.insertNode(f)):m||(this._.nextNode=f.equals(t)?null:this._getNextSourceNode(d.getBoundaryNodes().endNode,1,t))}u&&(u=
f.getPrevious())&&u.type==CKEDITOR.NODE_ELEMENT&&("br"==u.getName()?u.remove():u.getLast()&&"br"==u.getLast().$.nodeName.toLowerCase()&&u.getLast().remove());w&&(u=f.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&"br"==u.getName()&&(!CKEDITOR.env.needsBrFiller||u.getPrevious(l)||u.getNext(l))&&u.remove();this._.nextNode||(this._.nextNode=m||f.equals(t)||!t?null:this._getNextSourceNode(f,1,t));return f},_getNextSourceNode:function(a,b,g){function e(a){return!(a.equals(g)||a.equals(d))}var d=this.range.root;
for(a=a.getNextSourceNode(b,null,e);!l(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==d.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||
!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:b})?!0:d.refresh&&!1!==d.refresh.apply(this,arguments)};var b;this.checkAllowed=function(g){return g||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype=
{enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):
this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),
extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,c,b,f,g){var e,d;a=[];for(e in c){d=c[e];d="boolean"==typeof d?{}:"function"==typeof d?{match:d}:H(d);"$"!=e.charAt(0)&&(d.elements=e);b&&(d.featureName=b.toLowerCase());var h=d;h.elements=m(h.elements,/\s+/)||null;h.propertiesOnly=h.propertiesOnly||!0===h.elements;var k=/\s*,\s*/,A=void 0;for(A in O){h[A]=m(h[A],
k)||null;var r=h,p=F[A],n=m(h[F[A]],k),l=h[A],Q=[],x=!0,B=void 0;n?x=!1:n={};for(B in l)"!"==B.charAt(0)&&(B=B.slice(1),Q.push(B),n[B]=!0,x=!1);for(;B=Q.pop();)l[B]=l["!"+B],delete l["!"+B];r[p]=(x?!1:n)||null}h.match=h.match||null;f.push(d);a.push(d)}c=g.elements;g=g.generic;var R;b=0;for(f=a.length;b<f;++b){e=H(a[b]);d=!0===e.classes||!0===e.styles||!0===e.attributes;h=e;A=p=k=void 0;for(k in O)h[k]=q(h[k]);r=!0;for(A in F){k=F[A];p=h[k];n=[];l=void 0;for(l in p)-1<l.indexOf("*")?n.push(new RegExp("^"+
l.replace(/\*/g,".*")+"$")):n.push(l);p=n;p.length&&(h[k]=p,r=!1)}h.nothingRequired=r;h.noProperties=!(h.attributes||h.classes||h.styles);if(!0===e.elements||null===e.elements)g[d?"unshift":"push"](e);else for(R in h=e.elements,delete e.elements,h)if(c[R])c[R][d?"unshift":"push"](e);else c[R]=[e]}}function d(a,c,f,e){if(!a.match||a.match(c))if(e||k(a,c))if(a.propertiesOnly||(f.valid=!0),f.allAttributes||(f.allAttributes=b(a.attributes,c.attributes,f.validAttributes)),f.allStyles||(f.allStyles=b(a.styles,
c.styles,f.validStyles)),!f.allClasses){a=a.classes;c=c.classes;e=f.validClasses;if(a)if(!0===a)a=!0;else{for(var g=0,d=c.length,h;g<d;++g)h=c[g],e[h]||(e[h]=a(h));a=!1}else a=!1;f.allClasses=a}}function b(a,c,b){if(!a)return!1;if(!0===a)return!0;for(var f in c)b[f]||(b[f]=a(f));return!1}function g(a,c,b){if(!a.match||a.match(c)){if(a.noProperties)return!1;b.hadInvalidAttribute=h(a.attributes,c.attributes)||b.hadInvalidAttribute;b.hadInvalidStyle=h(a.styles,c.styles)||b.hadInvalidStyle;a=a.classes;
c=c.classes;if(a){for(var f=!1,e=!0===a,g=c.length;g--;)if(e||a(c[g]))c.splice(g,1),f=!0;a=f}else a=!1;b.hadInvalidClass=a||b.hadInvalidClass}}function h(a,c){if(!a)return!1;var b=!1,f=!0===a,e;for(e in c)if(f||a(e))delete c[e],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=I(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(c));if(CKEDITOR.tools.isArray(a))return a.length?
CKEDITOR.tools.convertArrayToObject(a):!1;var b={},f=0,e;for(e in a)b[e]=a[e],f++;return f?b:!1}function k(a,c){if(a.nothingRequired)return!0;var b,f,g,d;if(g=a.requiredClasses)for(d=c.classes,b=0;b<g.length;++b)if(f=g[b],"string"==typeof f){if(-1==CKEDITOR.tools.indexOf(d,f))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(d,f))return!1;return e(c.styles,a.requiredStyles)&&e(c.attributes,a.requiredAttributes)}function e(a,c){if(!c)return!0;for(var b=0,f;b<c.length;++b)if(f=c[b],"string"==
typeof f){if(!(f in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,f))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 f(a){var c,b,f,e,g={},d=1;for(a=I(a);c=a.match(A);)(b=c[2])?(f=n(b,"styles"),e=n(b,"attrs"),b=n(b,"classes")):f=e=b=null,g["$"+d++]={elements:c[1],classes:b,styles:f,attributes:e},a=a.slice(c[0].length);return g}function n(a,c){var b=a.match(R[c]);return b?I(b[1]):null}
function v(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 u(a,c,b,f){var e=0,h;f.toHtml&&(c.name=c.name.replace(Q,"$1"));if(f.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var k=0,A=h.length,r;k<A;++k)if(r=h[k](c)){h=r;break a}h=void 0}if(h)return h}if(f.doTransform&&(h=a._.transformations[c.name])){v(c);for(k=0;k<h.length;++k)x(a,c,h[k]);t(c)}if(f.doFilter){a:{k=
c.name;A=a._;a=A.allowedRules.elements[k];h=A.allowedRules.generic;k=A.disallowedRules.elements[k];A=A.disallowedRules.generic;r=f.skipRequired;var F={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},n,l;if(a||h){v(c);if(k)for(n=0,l=k.length;n<l;++n)if(!1===g(k[n],c,F)){a=null;break a}if(A)for(n=0,l=A.length;n<l;++n)g(A[n],c,F);if(a)for(n=0,l=a.length;n<l;++n)d(a[n],c,F,r);if(h)for(n=
0,l=h.length;n<l;++n)d(h[n],c,F,r);a=F}else a=null}if(!a||!a.valid)return b.push(c),1;l=a.validAttributes;var m=a.validStyles;h=a.validClasses;var k=c.attributes,B=c.styles,A=c.classes;r=c.classBackup;var R=c.styleBackup,q,H,E=[],F=[],z=/^data-cke-/;n=!1;delete k.style;delete k["class"];delete c.classBackup;delete c.styleBackup;if(!a.allAttributes)for(q in k)l[q]||(z.test(q)?q==(H=q.replace(/^data-cke-saved-/,""))||l[H]||(delete k[q],n=!0):(delete k[q],n=!0));if(!a.allStyles||a.hadInvalidStyle){for(q in B)a.allStyles||
m[q]?E.push(q+":"+B[q]):n=!0;E.length&&(k.style=E.sort().join("; "))}else R&&(k.style=R);if(!a.allClasses||a.hadInvalidClass){for(q=0;q<A.length;++q)(a.allClasses||h[A[q]])&&F.push(A[q]);F.length&&(k["class"]=F.sort().join(" "));r&&F.length<r.split(/\s+/).length&&(n=!0)}else r&&(k["class"]=r);n&&(e=1);if(!f.skipFinalValidation&&!p(c))return b.push(c),1}f.toHtml&&(c.name=c.name.replace(T,"cke:$1"));return e}function w(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 t(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 p(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 q(a){if(!a)return!1;if(!0===a)return!0;var c=w(a);return function(b){return b in a||c&&b.match(c)}}function y(){return new CKEDITOR.htmlParser.element("br")}
function D(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||G.$block[a.name])}function r(a,c,b){var f=a.name;if(G.$empty[f]||!a.children.length)"hr"==f&&"br"==c?a.replaceWith(y()):(a.parent&&b.push({check:"it",el:a.parent}),a.remove());else if(G.$block[f]||"tr"==f)if("br"==c)a.previous&&!D(a.previous)&&(c=y(),c.insertBefore(a)),a.next&&!D(a.next)&&(c=y(),c.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,e;b:{e=G[c];for(var g=0,d=f.length,h;g<d;++g)if(h=f[g],h.type==CKEDITOR.NODE_ELEMENT&&
!e[h.name]){e=!1;break b}e=!0}if(e)a.name=c,a.attributes={},b.push({check:"parent-down",el:a});else{e=a.parent;for(var g=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,k,A,d=f.length;0<d;)h=f[--d],g&&(h.type==CKEDITOR.NODE_TEXT||h.type==CKEDITOR.NODE_ELEMENT&&G.$inline[h.name])?(k||(k=new CKEDITOR.htmlParser.element(c),k.insertAfter(a),b.push({check:"parent-down",el:k})),k.add(h,0)):(k=null,A=G[e.name]||G.span,h.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||h.type!=CKEDITOR.NODE_ELEMENT||
A[h.name]||b.push({check:"el-up",el:h}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&b.push({check:"it",el:a.parent}),a.replaceWithChildren())}function x(a,c,b){var f,e;for(f=0;f<b.length;++f)if(e=b[f],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(c))){e.right(c,P);break}}function E(a,c){var b=c.getDefinition(),f=b.attributes,e=b.styles,g,d,h,k;if(a.name!=b.element)return!1;for(g in f)if("class"==g)for(b=f[g].split(/\s+/),h=a.classes.join("|");k=b.pop();){if(-1==h.indexOf(k))return!1}else if(a.attributes[g]!=
f[g])return!1;for(d in e)if(a.styles[d]!=e[d])return!1;return!0}function z(a,c){var b,f;"string"==typeof a?b=a:a instanceof CKEDITOR.style?f=a:(b=a[0],f=a[1]);return[{element:b,left:f,right:function(a,b){b.transform(a,c)}}]}function C(a){return function(c){return E(c,a)}}function B(a){return function(c,b){b[a](c)}}var G=CKEDITOR.dtd,H=CKEDITOR.tools.copy,I=CKEDITOR.tools.trim,J=["","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(J[a.enterMode]+" "+J[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,e){if(!l(this,c,e))return!1;var g,d;if("string"==typeof c)c=f(c);else if(c instanceof CKEDITOR.style){if(c.toAllowedContentRules)return this.allow(c.toAllowedContentRules(this.editor),b,e);g=c.getDefinition();c={};e=g.attributes;c[g.element]=g={styles:g.styles,requiredStyles:g.styles&&
CKEDITOR.tools.objectKeys(g.styles)};e&&(e=H(e),g.classes=e["class"]?e["class"].split(/\s+/):null,g.requiredClasses=g.classes,delete e["class"],g.attributes=e,g.requiredAttributes=e&&CKEDITOR.tools.objectKeys(e))}else if(CKEDITOR.tools.isArray(c)){for(g=0;g<c.length;++g)d=this.allow(c[g],b,e);return d}a(this,c,b,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,c,b,f){if(this.disabled)return!1;var e=this,g=[],d=this.editor&&this.editor.config.protectedSource,h,k=!1,A={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(h=u(e,a,g,A),h&1)k=!0;else if(h&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var b;a:{var f=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));b=[];var r,n,F;if(d)for(n=0;n<d.length;++n)if((F=f.match(d[n]))&&
F[0].length==f.length){b=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(r=f.children[0]).type==CKEDITOR.NODE_ELEMENT&&u(e,r,b,A);b=!b.length}b||g.push(a)}},null,!0);g.length&&(k=!0);var n;a=[];f=J[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var F;b=g.pop();)b.type==CKEDITOR.NODE_ELEMENT?r(b,f,a):b.remove();for(;n=a.pop();)if(b=n.el,b.parent)switch(F=G[b.parent.name]||G.span,n.check){case "it":G.$removeEmpty[b.name]&&!b.children.length?r(b,f,a):p(b)||
r(b,f,a);break;case "el-up":b.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||F[b.name]||r(b,f,a);break;case "parent-down":b.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||F[b.name]||r(b.parent,f,a)}return k},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(c){if(!l(this,c,!0))return!1;"string"==typeof c&&(c=f(c));a(this,c,null,this.disallowedContent,
this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var c,b,f=[],e;for(c=0;c<a.length&&!e;++c)b=a[c],("string"==typeof b||b instanceof CKEDITOR.style)&&this.check(b)&&(e=b);if(e){for(c=0;c<a.length;++c)f.push(z(a[c],e));this.addTransformations(f)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,
a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var c,b;if(!this.disabled&&a){var f=this._.transformations,e;for(e=0;e<a.length;++e){c=a[e];var g=void 0,d=void 0,h=void 0,k=void 0,A=void 0,r=void 0;b=[];for(d=0;d<c.length;++d)h=c[d],"string"==typeof h?(h=h.split(/\s*:\s*/),k=h[0],A=null,r=h[1]):(k=h.check,A=h.left,
r=h.right),g||(g=h,g=g.element?g.element:k?k.match(/^([a-z0-9]+)/i)[0]:g.left.getDefinition().element),A instanceof CKEDITOR.style&&(A=C(A)),b.push({check:k==g?null:k,left:A,right:"string"==typeof r?B(r):r});c=g;f[c]||(f[c]=[]);f[c].push(b)}}},check:function(a,b,e){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var g=a.length;g--;)if(this.check(a[g],b,e))return!0;return!1}var d,h;if("string"==typeof a){h=a+"\x3c"+(!1===b?"0":"1")+(e?"1":"0")+"\x3e";if(h in this._.cachedChecks)return this._.cachedChecks[h];
g=f(a).$1;d=g.styles;var k=g.classes;g.name=g.elements;g.classes=k=k?k.split(/\s*,\s*/):[];g.styles=c(d);g.attributes=c(g.attributes);g.children=[];k.length&&(g.attributes["class"]=k.join(" "));d&&(g.attributes.style=CKEDITOR.tools.writeCssText(g.styles));d=g}else g=a.getDefinition(),d=g.styles,k=g.attributes||{},d&&!CKEDITOR.tools.isEmpty(d)?(d=H(d),k.style=CKEDITOR.tools.writeCssText(d,!0)):d={},d={name:g.element,attributes:k,classes:k["class"]?k["class"].split(/\s+/):[],styles:d,children:[]};var k=
CKEDITOR.tools.clone(d),A=[],r;if(!1!==b&&(r=this._.transformations[d.name])){for(g=0;g<r.length;++g)x(this,d,r[g]);t(d)}u(this,k,A,{doFilter:!0,doTransform:!1!==b,skipRequired:!e,skipFinalValidation:!e});b=0<A.length?!1:CKEDITOR.tools.objectCompare(d.attributes,k.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[h]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],c={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(b,f){var g=a.slice(),
e;if(this.check(J[b]))return b;for(f||(g=g.reverse());e=g.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 O={styles:1,attributes:1,classes:1},F={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},A=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,R={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},Q=/^cke:(object|embed|param)$/,T=/^(object|embed|param)$/,P;P=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,
"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,c,b){b=b||c;if(!(b in a.styles)){var f=a.attributes[c];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[b]=f)}delete a.attributes[c]},lengthToAttribute:function(a,c,b){b=b||c;if(!(b in a.attributes)){var f=a.styles[c],g=f&&f.match(/^(\d+)(?:\.\d*)?px$/);g?a.attributes[b]=g[1]:"cke-test"==f&&(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){function c(f){a.styles["border-top-width"]=b[f[0]];a.styles["border-right-width"]=b[f[1]];a.styles["border-bottom-width"]=b[f[2]];a.styles["border-left-width"]=b[f[3]]}if(a.styles.border){var b=a.styles.border.match(/([\.\d]+\w+)/g)||
["0px"];switch(b.length){case 1:a.styles["border-width"]=b[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])}a.styles["border-style"]=a.styles["border-style"]||(a.styles.border.match(/(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit)/)||[])[0];a.styles["border-style"]||delete a.styles["border-style"];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(f){a.styles["margin-top"]=b[f[0]];a.styles["margin-right"]=b[f[1]];a.styles["margin-bottom"]=b[f[2]];a.styles["margin-left"]=b[f[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:E,transform:function(a,c){if("string"==typeof c)a.name=c;else{var b=c.getDefinition(),f=b.styles,g=b.attributes,e,d,h,k;a.name=b.element;for(e in g)if("class"==e)for(b=a.classes.join("|"),h=g[e].split(/\s+/);k=h.pop();)-1==b.indexOf(k)&&a.classes.push(k);else a.attributes[e]=g[e];for(d in f)a.styles[d]=
f[d]}}}}(),function(){CKEDITOR.focusManager=function(a){if(a.focusManager)return a.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:a};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(a){this._.timer&&clearTimeout(this._.timer);a&&(this.currentActive=a);this.hasFocus||this._.locked||((a=CKEDITOR.currentInstance)&&a.focusManager.blur(1),this.hasFocus=!0,(a=this._.editor.container)&&a.addClass("cke_focus"),this._.editor.fire("focus"))},
lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(a){function d(){if(this.hasFocus){this.hasFocus=!1;var a=this._.editor.container;a&&a.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?d.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;d.call(this)},b,this)}},add:function(a,d){var b=a.getCustomData("focusmanager");if(!b||
b!=this){b&&b.remove(a);var b="focus",g="blur";d&&(CKEDITOR.env.ie?(b="focusin",g="focusout"):CKEDITOR.event.useCapture=1);var h={blur:function(){a.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(a)}};a.on(b,h.focus,this);a.on(g,h.blur,this);d&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",h)}},remove:function(a){a.removeCustomData("focusmanager");var d=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",
d.blur);a.removeListener("focus",d.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this},function(){var a,d=function(b){b=b.data;var d=b.getKeystroke(),l=this.keystrokes[d],m=this._.editor;a=!1===m.fire("key",{keyCode:d,domEvent:b});a||(l&&(a=!1!==m.execCommand(l,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[d]));a&&b.preventDefault(!0);return!a},b=function(b){a&&(a=
!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(a){a.on("keydown",d,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)a.on("keypress",b,this)}}}(),function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,
"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(a,d,b){a&&CKEDITOR.lang.languages[a]||(a=this.detect(d,a));var g=this;d=function(){g[a].dir=g.rtl[a]?"rtl":"ltr";b(a,g[a])};this[a]?d():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),d,this)},detect:function(a,d){var b=this.languages;d=d||navigator.userLanguage||navigator.language||a;var g=d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),
h=g[1],g=g[2];b[h+"-"+g]?h=h+"-"+g:b[h]||(h=null);CKEDITOR.lang.detect=h?function(){return h}:function(a){return a};return h||a}}}(),CKEDITOR.scriptLoader=function(){var a={},d={};return{load:function(b,g,h,l){var m="string"==typeof b;m&&(b=[b]);h||(h=CKEDITOR);var k=b.length,e=[],c=[],f=function(a){g&&(m?g.call(h,a):g.call(h,e,c))};if(0===k)f(!0);else{var n=function(a,b){(b?e:c).push(a);0>=--k&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),f(b))},v=function(c,b){a[c]=1;var f=d[c];
delete d[c];for(var e=0;e<f.length;e++)f[e](c,b)},u=function(c){if(a[c])n(c,!0);else{var b=d[c]||(d[c]=[]);b.push(n);if(!(1<b.length)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:c});g&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,v(c,!0)}:(f.$.onload=function(){setTimeout(function(){v(c,!0)},0)},f.$.onerror=function(){v(c,
!1)}));f.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var w=0;w<k;w++)u(b[w])}},queue:function(){function a(){var b;(b=g[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var g=[];return function(d,l){var m=this;g.push({scriptUrl:d,callback:function(){l&&l.apply(this,arguments);g.shift();a.call(m)}});1==g.length&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,d){this.basePath=a;this.fileName=d;this.registered={};this.loaded=
{};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(a,d){if(this.registered[a])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var b=this.registered[a]=d||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var d=this.externals[a];return CKEDITOR.getUrl(d&&d.dir||this.basePath+
a+"/")},getFilePath:function(a){var d=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(d?d.file:this.fileName+".js"))},addExternal:function(a,d,b){a=a.split(",");for(var g=0;g<a.length;g++){var h=a[g];b||(d=d.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[h]={dir:d,file:b||this.fileName+".js"}}},load:function(a,d,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var g=this.loaded,h=this.registered,l=[],m={},k={},e=0;e<a.length;e++){var c=a[e];if(c)if(g[c]||h[c])k[c]=this.get(c);
else{var f=this.getFilePath(c);l.push(f);f in m||(m[f]=[]);m[f].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 f=0;f<a.length;f++)for(var e=m[a[f]],h=0;h<e.length;h++){var p=e[h];k[p]=this.get(p);g[p]=1}d.call(b,k)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var d=
{};return function(b,g,h){var l={},m=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(l,a);var c=[],b;for(b in a){var k=a[b],v=k&&k.requires;if(!d[b]){if(k.icons)for(var u=k.icons.split(","),w=u.length;w--;)CKEDITOR.skin.addIcon(u[w],k.path+"icons/"+(CKEDITOR.env.hidpi&&k.hidpi?"hidpi/":"")+u[w]+".png");d[b]=1}if(v)for(v.split&&(v=v.split(",")),k=0;k<v.length;k++)l[v[k]]||c.push(v[k])}if(c.length)m.call(this,c);else{for(b in l)k=l[b],k.onLoad&&!k.onLoad._called&&(!1===k.onLoad()&&delete l[b],
k.onLoad._called=1);g&&g.call(h||window,l)}},this)};m.call(this,b)}}),CKEDITOR.plugins.setLang=function(a,d,b){var g=this.get(a);a=g.langEntries||(g.langEntries={});g=g.lang||(g.lang=[]);g.split&&(g=g.split(","));-1==CKEDITOR.tools.indexOf(g,d)&&g.push(d);a[d]=b},CKEDITOR.ui=function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,d,b){b.name=a.toLowerCase();var g=this.items[a]={type:d,command:b.command||
null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(g,b)},get:function(a){return this.instances[a]},create:function(a){var d=this.items[a],b=d&&this._.handlers[d.type],g=d&&d.command&&this.editor.getCommand(d.command),b=b&&b.create.apply(this,d.args);this.instances[a]=b;g&&g.uiItems.push(b);b&&!b.type&&(b.type=d.type);return b},addHandler:function(a,d){this._.handlers[a]=d},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+
"_"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,c,f){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(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!b(c,f))throw Error('The specified element mode is not supported on element: "'+
c.getName()+'".');this.element=c;this.elementMode=f;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||d();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",g);this.on("selectionChange",function(a){l(this,a.data.path)});this.on("activeFilterChange",function(){l(this,this.elementPath(),!0)});this.on("mode",g);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?k(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function d(){do var a="editor"+ ++w;while(CKEDITOR.instances[a]);return a}
function b(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 g(){var a=this.commands,c;for(c in a)h(this,a[c])}function h(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 f,e,g=a.commands;for(e in g)f=g[e],(b||f.contextSensitive)&&f.refresh(a,c)}}function m(a){var c=a.config.customConfig;if(!c)return!1;
var c=CKEDITOR.getUrl(c),b=t[c]||(t[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 k(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);e(a)});c&&null!=c.customConfig&&(a.config.customConfig=c.customConfig);m(a)||a.fireOnce("customConfigLoaded")}function e(a){CKEDITOR.skin.loadPart("editor",function(){c(a)})}function c(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(c,
b){var e=a.config.title;a.langCode=c;a.lang=CKEDITOR.tools.prototypedCopy(b);a.title="string"==typeof e||!1===e?e:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");f(a)})}function f(a){a.getStylesSet(function(c){a.once("loaded",function(){a.fire("stylesSet",{styles:c})},null,null,1);n(a)})}function n(a){var c=a.config,b=c.plugins,f=c.extraPlugins,e=
c.removePlugins;if(f)var g=new RegExp("(?:^|,)(?:"+f.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),b=b.replace(g,""),b=b+(","+f);if(e)var d=new RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),b=b.replace(d,"");CKEDITOR.env.air&&(b+=",adobeair");CKEDITOR.plugins.load(b.split(","),function(b){var f=[],e=[],g=[];a.plugins=b;for(var h in b){var k=b[h],r=k.lang,n=null,F=k.requires,A;CKEDITOR.tools.isArray(F)&&(F=F.join(","));if(F&&(A=F.match(d)))for(;F=A.pop();)CKEDITOR.error("editor-plugin-required",
{plugin:F.replace(",",""),requiredBy:h});r&&!a.lang[h]&&(r.split&&(r=r.split(",")),0<=CKEDITOR.tools.indexOf(r,a.langCode)?n=a.langCode:(n=a.langCode.replace(/-.*/,""),n=n!=a.langCode&&0<=CKEDITOR.tools.indexOf(r,n)?n:0<=CKEDITOR.tools.indexOf(r,"en")?"en":r[0]),k.langEntries&&k.langEntries[n]?(a.lang[h]=k.langEntries[n],n=null):g.push(CKEDITOR.getUrl(k.path+"lang/"+n+".js")));e.push(n);f.push(k)}CKEDITOR.scriptLoader.load(g,function(){for(var b=["beforeInit","init","afterInit"],g=0;g<b.length;g++)for(var d=
0;d<f.length;d++){var h=f[d];0===g&&e[d]&&h.lang&&h.langEntries&&(a.lang[h.name]=h.langEntries[e[d]]);if(h[b[g]])h[b[g]](a)}a.fireOnce("pluginsLoaded");c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(d=0;d<a.config.blockedKeystrokes.length;d++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[d]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function v(){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 u(a,c){function b(a){var c=a.startContainer,f=a.endContainer;return c.is&&(c.is("tr")||c.is("td")&&c.equals(f)&&a.endOffset===c.getChildCount())?!0:!1}function f(a){var c=a.startContainer;return c.is("tr")?a.cloneContents():c.clone(!0)}for(var e=new CKEDITOR.dom.documentFragment,g,d,h,k=0;k<a.length;k++){var n=a[k],l=n.startContainer.getAscendant("tr",!0);b(n)?(g||
(g=l.getAscendant("table").clone(),g.append(l.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),e.append(g),g=g.findOne("thead, tbody, tfoot")),d&&d.equals(l)||(d=l,h=l.clone(),g.append(h)),h.append(f(n))):e.append(n.cloneContents())}return g?e:c.getHtmlFromRange(a[0])}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var w=0,t={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,c){c.name=a.toLowerCase();var b=new CKEDITOR.command(this,c);this.mode&&h(this,b);return this.commands[a]=
b},_attachToForm:function(){function a(c){b.updateElement();b._.required&&!f.getValue()&&!1===b.fire("required")&&c.data.preventDefault()}function c(a){return!!(a&&a.call&&a.apply)}var b=this,f=b.element,e=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&e&&(e.on("submit",a),c(e.$.submit)&&(e.$.submit=CKEDITOR.tools.override(e.$.submit,function(c){return function(){a();c.apply?c.apply(this):c()}})),b.on("destroy",function(){e.removeListener("submit",a)}))},destroy:function(a){this.fire("beforeDestroy");
!a&&v.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),f={name:a,commandData:c||{},command:b};return b&&b.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",f)&&(f.returnValue=b.exec(f.commandData),!b.async&&!1!==this.fire("afterCommandExec",f))?f.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 f=!0,e=c;c&&"object"==typeof c&&(b=c.internal,e=c.callback,f=!c.noSnapshot);!b&&f&&this.fire("saveSnapshot");if(e||!b)this.once("dataReady",function(a){!b&&
f&&this.fire("saveSnapshot");e&&e.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=u(b,c);return a?c.getHtml():c},extractSelectedHtml:function(a,c){var b=this.editable(),f=this.getSelection().getRanges(),e=new CKEDITOR.dom.documentFragment,g;if(!b||0===f.length)return null;for(g=0;g<f.length;g++)e.append(b.extractHtmlFromRange(f[g],c));c||this.getSelection().selectRanges([f[0]]);return a?e.getHtml():e},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==
this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return v.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,c=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],b,f,e=c.length;e--;)b=c[e],f=0,CKEDITOR.tools.isArray(b)&&(f=b[1],b=b[0]),f?a[b]=f: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,f;if(a.fakeKeystroke)return a.fakeKeystroke;for(f in b)if(b.hasOwnProperty(f)&&b[f]==c)return f}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 a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={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(b){for(var g,h,l=0,m;g=this._.htmlPartsRegex.exec(b);){h=g.index;if(h>l)if(l=b.substring(l,h),m)m.push(l);else this.onText(l);
l=this._.htmlPartsRegex.lastIndex;if(h=g[1])if(h=h.toLowerCase(),m&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(m.join("")),m=null),!m){this.onTagClose(h);continue}if(m)m.push(g[0]);else if(h=g[3]){if(h=h.toLowerCase(),!/="/.test(h)){var k={},e,c=g[4];g=!!g[5];if(c)for(;e=a.exec(c);){var f=e[1].toLowerCase();e=e[2]||e[3]||e[4]||"";k[f]=!e&&d[f]?f:CKEDITOR.tools.htmlDecodeAttr(e)}this.onTagOpen(h,k,g);!m&&CKEDITOR.dtd.$cdata[h]&&(m=[])}}else if(h=g[2])this.onComment(h)}if(b.length>l)this.onText(b.substring(l,
b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,d){d?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,d){"string"==typeof d&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",
a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,d=CKEDITOR.tools.indexOf(a,this),b=this.previous,g=this.next;b&&(b.next=g);g&&(g.previous=b);a.splice(d,1);this.parent=null},replaceWith:function(a){var d=this.parent.children,
b=CKEDITOR.tools.indexOf(d,this),g=a.previous=this.previous,h=a.next=this.next;g&&(g.next=a);h&&(h.previous=a);d[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a),g=a.next;d.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;g&&(g.previous=this);this.parent=a.parent},insertBefore:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a);d.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=
this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var d="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=
function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,d){var b=this.value;if(!(b=a.onComment(d,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,d){d&&this.filter(d);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=
CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this)))return this.remove(),!1},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict",
CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},g=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),h={ul:"li",
ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(l,m,k){function e(a){var b;if(0<p.length)for(var f=0;f<p.length;f++){var e=p[f],g=e.name,d=CKEDITOR.dtd[g],h=y.name&&CKEDITOR.dtd[y.name];h&&!h[g]||a&&d&&!d[a]&&CKEDITOR.dtd[a]?g==y.name&&(n(y,y.parent,1),f--):(b||(c(),b=1),e=e.clone(),e.parent=y,y=e,p.splice(f,1),f--)}}function c(){for(;q.length;)n(q.shift(),y)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var c=
a.children.length,b=a.children[c-1],f;b&&b.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(b.value))?b.value=f:a.children.length=c-1)}}function n(c,b,e){b=b||y||t;var g=y;void 0===c.previous&&(v(b,c)&&(y=b,w.onTagOpen(k,{}),c.returnPoint=b=y),f(c),a(c)&&!c.children.length||b.add(c),"pre"==c.name&&(r=!1),"textarea"==c.name&&(D=!1));c.returnPoint?(y=c.returnPoint,delete c.returnPoint):y=e?b:g}function v(a,c){if((a==t||"body"==a.name)&&k&&(!a.name||CKEDITOR.dtd[a.name][k])){var b,f;return(b=c.attributes&&
(f=c.attributes["data-cke-real-element-type"])?f:c.name)&&b in CKEDITOR.dtd.$inline&&!(b in CKEDITOR.dtd.head)&&!c.isOrphan||c.type==CKEDITOR.NODE_TEXT}}function u(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 w=new CKEDITOR.htmlParser,t=m instanceof CKEDITOR.htmlParser.element?m:"string"==typeof m?new CKEDITOR.htmlParser.element(m):new CKEDITOR.htmlParser.fragment,p=[],q=[],y=t,D="textarea"==t.name,r="pre"==t.name;w.onTagOpen=
function(f,h,k,l){h=new CKEDITOR.htmlParser.element(f,h);h.isUnknown&&k&&(h.isEmpty=!0);h.isOptionalClose=l;if(a(h))p.push(h);else{if("pre"==f)r=!0;else{if("br"==f&&r){y.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==f&&(D=!0)}if("br"==f)q.push(h);else{for(;!(l=(k=y.name)?CKEDITOR.dtd[k]||(y._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):g,h.isUnknown||y.isUnknown||l[f]);)if(y.isOptionalClose)w.onTagClose(k);else if(f in b&&k in b)k=y.children,(k=k[k.length-1])&&"li"==k.name||n(k=new CKEDITOR.htmlParser.element("li"),
y),!h.returnPoint&&(h.returnPoint=y),y=k;else if(f in CKEDITOR.dtd.$listItem&&!u(f,k))w.onTagOpen("li"==f?"ul":"dl",{},0,1);else if(k in d&&!u(f,k))!h.returnPoint&&(h.returnPoint=y),y=y.parent;else if(k in CKEDITOR.dtd.$inline&&p.unshift(y),y.parent)n(y,y.parent,1);else{h.isOrphan=1;break}e(f);c();h.parent=y;h.isEmpty?n(h):y=h}}};w.onTagClose=function(a){for(var b=p.length-1;0<=b;b--)if(a==p[b].name){p.splice(b,1);return}for(var f=[],e=[],g=y;g!=t&&g.name!=a;)g._.isBlockLike||e.unshift(g),f.push(g),
g=g.returnPoint||g.parent;if(g!=t){for(b=0;b<f.length;b++){var d=f[b];n(d,d.parent)}y=g;g._.isBlockLike&&c();n(g,g.parent);g==y&&(y=y.parent);p=p.concat(e)}"body"==a&&(k=!1)};w.onText=function(a){if(!(y._.hasInlineStarted&&!q.length||r||D)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=y.name,f=b?CKEDITOR.dtd[b]||(y._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):g;if(!D&&!f["#"]&&b in d)w.onTagOpen(h[b]||""),w.onText(a);else{c();e();r||D||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=
new CKEDITOR.htmlParser.text(a);if(v(y,a))this.onTagOpen(k,{},0,1);y.add(a)}};w.onCDATA=function(a){y.add(new CKEDITOR.htmlParser.cdata(a))};w.onComment=function(a){c();e();y.add(new CKEDITOR.htmlParser.comment(a))};w.parse(l);for(c();y!=t;)n(y,y.parent,1);f(t);return t};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(a,b){isNaN(b)&&(b=this.children.length);var g=0<b?this.children[b-1]:null;if(g){if(a._.isBlockLike&&g.type==CKEDITOR.NODE_TEXT&&(g.value=CKEDITOR.tools.rtrim(g.value),
0===g.value.length)){this.children.pop();this.add(a);return}g.next=a}a.previous=g;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,g){if(this.childrenFilteredBy!=a.id){g=this.getFilterContext(g);if(b&&!this.parent)a.onRoot(g,this);this.childrenFilteredBy=a.id;
for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,g)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,g){var e=this.getFilterContext();if(g&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,!1,e);b=0;g=this.children;for(e=g.length;b<e;b++)g[b].writeHtml(a)},forEach:function(a,b,g){if(!(g||b&&this.type!=b))var e=a(this);if(!1!==e){g=this.children;for(var c=0;c<g.length;c++)e=g[c],e.type==CKEDITOR.NODE_ELEMENT?e.forEach(a,
b):b&&e.type!=b||a(e)}},getFilterContext:function(a){return a||{}}}}(),"use strict",function(){function a(){this.rules=[]}function d(b,g,d,l){var m,k;for(m in g)(k=b[m])||(k=b[m]=new a),k.add(g[m],d,l)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(b){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new a;this.attributeNameRules=new a;this.elementsRules={};this.attributesRules={};this.textRules=new a;this.commentRules=new a;this.rootRules=new a;b&&this.addRules(b,10)},
proto:{addRules:function(a,g){var h;"number"==typeof g?h=g:g&&"priority"in g&&(h=g.priority);"number"!=typeof h&&(h=10);"object"!=typeof g&&(g={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,h,g);a.attributeNames&&this.attributeNameRules.addMany(a.attributeNames,h,g);a.elements&&d(this.elementsRules,a.elements,h,g);a.attributes&&d(this.attributesRules,a.attributes,h,g);a.text&&this.textRules.add(a.text,h,g);a.comment&&this.commentRules.add(a.comment,h,g);a.root&&this.rootRules.add(a.root,
h,g)},applyTo:function(a){a.filter(this)},onElementName:function(a,g){return this.elementNameRules.execOnName(a,g)},onAttributeName:function(a,g){return this.attributeNameRules.execOnName(a,g)},onText:function(a,g,d){return this.textRules.exec(a,g,d)},onComment:function(a,g,d){return this.commentRules.exec(a,g,d)},onRoot:function(a,g){return this.rootRules.exec(a,g)},onElement:function(a,g){for(var d=[this.elementsRules["^"],this.elementsRules[g.name],this.elementsRules.$],l,m=0;3>m;m++)if(l=d[m]){l=
l.exec(a,g,this);if(!1===l)return null;if(l&&l!=g)return this.onNode(a,l);if(g.parent&&!g.name)break}return g},onNode:function(a,g){var d=g.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,g):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,g.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,g.value)):null},onAttribute:function(a,g,d,l){return(d=this.attributesRules[d])?d.exec(a,l,g,this):l}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype=
{add:function(a,g,d){this.rules.splice(this.findIndex(g),0,{value:a,priority:g,options:d})},addMany:function(a,g,d){for(var l=[this.findIndex(g),0],m=0,k=a.length;m<k;m++)l.push({value:a[m],priority:g,options:d});this.rules.splice.apply(this.rules,l)},findIndex:function(a){for(var g=this.rules,d=g.length-1;0<=d&&a<g[d].priority;)d--;return d+1},exec:function(a,g){var d=g instanceof CKEDITOR.htmlParser.node||g instanceof CKEDITOR.htmlParser.fragment,l=Array.prototype.slice.call(arguments,1),m=this.rules,
k=m.length,e,c,f,n;for(n=0;n<k;n++)if(d&&(e=g.type,c=g.name),f=m[n],!(a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,l);if(!1===f||d&&f&&(f.name!=c||f.type!=e))return f;null!=f&&(l[0]=g=f)}return g},execOnName:function(a,g){for(var d=0,l=this.rules,m=l.length,k;g&&d<m;d++)k=l[d],a.nonEditable&&!k.options.applyToAll||a.nestedEditable&&k.options.excludeNestedEditable||(g=g.replace(k.value[0],k.value[1]));return g}}}(),function(){function a(a,
c){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function e(a,c){return function(e){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=[],k=b(e),r,n;if(k)for(d(k,1)&&h.push(k);k;)l(k)&&(r=g(k))&&d(r)&&((n=g(r))&&!l(n)?h.push(r):(f(A).insertAfter(r),r.remove())),k=k.previous;for(k=0;k<h.length;k++)h[k].remove();if(h=!a||!1!==("function"==typeof c?c(e):c))A||CKEDITOR.env.needsBrFiller||e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?
A||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||e.name in CKEDITOR.dtd.tr||e.name in CKEDITOR.dtd.$listItem)?(h=b(e),h=!h||"form"==e.name&&"input"==h.name):h=!1:h=!1;h&&e.add(f(a))}}}function d(a,c){if((!A||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(p))&&(b.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,b.index))).insertBefore(a),a.value=b[0]),!CKEDITOR.env.needsBrFiller&&
A&&(!c||a.parent.name in n)||!A&&((b=a.previous)&&"br"==b.name||!b||l(b)))?!0:!1}var k={elements:{}},A="html"==c,n=CKEDITOR.tools.extend({},r),F;for(F in n)"#"in y[F]||delete n[F];for(F in n)k.elements[F]=e(A,a.config.fillEmptyBlocks);k.root=e(A,!1);k.elements.br=function(a){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var b=c.attributes;if("data-cke-bogus"in b||"data-cke-eol"in b)delete b["data-cke-bogus"];else{for(b=c.next;b&&h(b);)b=b.next;var e=g(c);!b&&l(c.parent)?m(c.parent,
f(a)):l(b)&&e&&!l(e)&&f(a).insertBefore(b)}}}}(A);return k}function d(a,c){return a!=CKEDITOR.ENTER_BR&&!1!==c?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function b(a){for(a=a.children[a.children.length-1];a&&h(a);)a=a.previous;return a}function g(a){for(a=a.previous;a&&h(a);)a=a.previous;return a}function h(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
r||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 k(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function e(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(B,function(a,c,b){return"\x3c"+c+b.replace(G,
function(a,c){return H.test(c)&&-1==b.indexOf("data-cke-saved-"+c)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,c){return a.replace(c,function(a,c,b){0===a.indexOf("\x3ctextarea")&&(a=c+u(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(O,function(a,c){return decodeURIComponent(c)})}function v(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,
function(a){return"\x3c!--"+q+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function u(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function w(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 t(a,c){var b=[],f=c.config.protectedSource,e=c._.dataStore||(c._.dataStore=
{id:1}),g=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,f=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(f);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(b.push(a)-1)+"--\x3e"});for(var d=0;d<f.length;d++)a=a.replace(f[d],function(a){a=a.replace(g,function(a,c,f){return b[f]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(b.push(a)-1)+"--\x3e"});a=a.replace(g,function(a,c,f){return"\x3c!--"+q+(c?"{C}":
"")+encodeURIComponent(b[f]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,c){e[e.id]=decodeURIComponent(c);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,b,f,e){return"\x3c"+b+f+"\x3e"+w(u(e),c)+"\x3c/"+b+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var e,
g,h=this;this.editor=b;this.dataFilter=e=new CKEDITOR.htmlParser.filter;this.htmlFilter=g=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;e.addRules(x);e.addRules(E,{applyToAll:!0});e.addRules(a(b,"data"),{applyToAll:!0});g.addRules(z);g.addRules(C,{applyToAll:!0});g.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var e=a.dataValue,g,e=t(e,b),e=f(e,J),e=c(e),e=f(e,I),e=e.replace(F,"$1cke:$2"),e=e.replace(R,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),
e=e.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),e=e.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");g=a.context||b.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==g&&(g="div",e="\x3cpre\x3e"+e+"\x3c/pre\x3e",h=1);g=b.document.createElement(g);g.setHtml("a"+e);e=g.getHtml().substr(1);e=e.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(e=e.replace(/^<pre>|<\/pre>$/gi,""));e=e.replace(A,"$1$2");e=n(e);e=u(e);g=!1===a.fixForBody?!1:
d(a.enterMode,b.config.autoParagraph);e=CKEDITOR.htmlParser.fragment.fromHtml(e,a.context,g);g&&(h=e,!h.children.length&&CKEDITOR.dtd[h.name][g]&&(g=new CKEDITOR.htmlParser.element(g),h.add(g)));a.dataValue=e},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(h.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=v(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,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.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,f=h.writer;f.reset();c.writeChildrenHtml(f);c=f.getHtml(!0);c=u(c);c=w(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,b,f){var e=this.editor,g,d,h,k;c&&"object"==typeof c?(g=c.context,b=c.fixForBody,f=c.dontFilter,d=c.filter,h=c.enterMode,k=c.protectedWhitespaces):g=c;g||null===g||(g=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:g,fixForBody:b,dontFilter:f,
filter:d||e.filter,enterMode:h||e.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,c){var b,f,e;c&&(b=c.context,f=c.filter,e=c.enterMode);b||null===b||(b=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:f||this.editor.filter,context:b,enterMode:e||this.editor.enterMode}).dataValue}};var p=/(?:&nbsp;|\xa0)$/,q="{cke_protected}",y=CKEDITOR.dtd,D="caption colgroup col thead tfoot tbody".split(" "),r=CKEDITOR.tools.extend({},y.$blockLimit,
y.$block),x={elements:{input:k,textarea:k}},E={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}}}},z={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}}},C={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"],f,e=0;e<b.length;e++)f="data-cke-saved-"+b[e],f in c&&delete c[b[e]]}return a},
table:function(a){a.children.slice(0).sort(function(a,c){var b,f;a.type==CKEDITOR.NODE_ELEMENT&&c.type==a.type&&(b=CKEDITOR.tools.indexOf(D,a.name),f=CKEDITOR.tools.indexOf(D,c.name));-1<b&&-1<f&&b!=f||(b=a.parent?a.getIndex():-1,f=c.parent?c.getIndex():-1);return b>f?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;
delete a.attributes.contenteditable},style:function(a){var 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:e,textarea:e},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(C.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,
function(a){return a.toLowerCase()})});var B=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,H=/^(href|src|name)$/i,I=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,J=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,O=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,A=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,R=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),
"use strict",CKEDITOR.htmlParser.element=function(a,d){this.name=a;this.attributes=d||{};this.children=[];var b=a||"",g=b.match(/^cke:(.*)/);g&&(b=g[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}},CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof
CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,g,h){"font-family"==g&&(h=h.replace(/["']/g,""));d[g.toLowerCase()]=h});return{rules:d,populate:function(a){var g=this.toString();g&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",g):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=g:a.style=g)},toString:function(){var a=[],g;for(g in d)d[g]&&a.push(g,":",d[g],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==
CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return a<b?-1:a>b?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,m,k;b=d.getFilterContext(b);if(b.off)return!0;if(!d.parent)a.onRoot(b,d);for(;;){m=d.name;if(!(k=
a.onElementName(b,m)))return this.remove(),!1;d.name=k;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==m)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}m=d.attributes;var e,c;for(e in m){for(k=m[e];;)if(c=a.onAttributeName(b,e))if(c!=e)delete m[e],e=c;else break;else{delete m[e];break}c&&(!1===(k=a.onAttribute(b,d,c,k))?delete m[c]:m[c]=k)}d.isEmpty||this.filterChildren(a,!1,
b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var l=this.name,m=[],k=this.attributes,e,c;a.openTag(l,k);for(e in k)m.push([e,k[e]]);a.sortAttributes&&m.sort(d);e=0;for(c=m.length;e<c;e++)k=m[e],a.attribute(k[0],k[1]);a.openTagClose(l,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(l)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,
getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&(b=a(b));for(var d=0,l=this.children.length;d<l;++d)if(b(this.children[d]))return this.children[d];return null},getHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(a);return a.getHtml()},setHtml:function(a){a=this.children=CKEDITOR.htmlParser.fragment.fromHtml(a).children;for(var b=0,d=a.length;b<d;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;
this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),d=this.clone(),m=0;m<b.length;++m)b[m].parent=d;d.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(d,this.getIndex()+1);return d},find:function(a,b){void 0===b&&(b=!1);var d=[],m;for(m=0;m<this.children.length;m++){var k=this.children[m];"function"==typeof a&&a(k)?d.push(k):"string"==typeof a&&k.name===a&&d.push(k);b&&k.find&&(d=d.concat(k.find(a,
b)))}return d},addClass:function(a){if(!this.hasClass(a)){var b=this.attributes["class"]||"";this.attributes["class"]=b+(b?" ":"")+a}},removeClass:function(a){var b=this.attributes["class"];b&&((b=CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)"+a+"(?:\\s+|$)")," ")))?this.attributes["class"]=b:delete this.attributes["class"])},hasClass:function(a){var b=this.attributes["class"];return b?(new RegExp("(?:^|\\s)"+a+"(?\x3d\\s|$)")).test(b):!1},getFilterContext:function(a){var b=[];a||(a={off:!1,
nonEditable:!1,nestedEditable:!1});a.off||"off"!=this.attributes["data-cke-processor"]||b.push("off",!0);a.nonEditable||"false"!=this.attributes.contenteditable?a.nonEditable&&!a.nestedEditable&&"true"==this.attributes.contenteditable&&b.push("nestedEditable",!0):b.push("nonEditable",!0);if(b.length){a=CKEDITOR.tools.copy(a);for(var d=0;d<b.length;d+=2)a[b[d]]=b[d+1]}return a}},!0)}(),function(){var a=/{([^}]+)}/g;CKEDITOR.template=function(a){this.source=String(a)};CKEDITOR.template.prototype.output=
function(d,b){var g=this.source.replace(a,function(a,b){return void 0!==d[b]?d[b]:a});return b?b.push(g):g}}(),delete CKEDITOR.loadFullCore,CKEDITOR.instances={},CKEDITOR.document=new CKEDITOR.dom.document(document),CKEDITOR.add=function(a){CKEDITOR.instances[a.name]=a;a.on("focus",function(){CKEDITOR.currentInstance!=a&&(CKEDITOR.currentInstance=a,CKEDITOR.fire("currentInstance"))});a.on("blur",function(){CKEDITOR.currentInstance==a&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))});
CKEDITOR.fire("instance",null,a)},CKEDITOR.remove=function(a){delete CKEDITOR.instances[a.name]},function(){var a={};CKEDITOR.addTemplate=function(d,b){var g=a[d];if(g)return g;g={name:d,source:b};CKEDITOR.fire("template",g);return a[d]=new CKEDITOR.template(g.source)};CKEDITOR.getTemplate=function(d){return a[d]}}(),function(){var a=[];CKEDITOR.addCss=function(d){a.push(d)};CKEDITOR.getCss=function(){return a.join("\n")}}(),CKEDITOR.on("instanceDestroyed",function(){CKEDITOR.tools.isEmpty(this.instances)&&
CKEDITOR.fire("reset")}),CKEDITOR.TRISTATE_ON=1,CKEDITOR.TRISTATE_OFF=2,CKEDITOR.TRISTATE_DISABLED=0,function(){CKEDITOR.inline=function(a,d){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var b=new CKEDITOR.editor(d,a,CKEDITOR.ELEMENT_MODE_INLINE),g=a.is("textarea")?a:null;g?(b.setData(g.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+
!!b.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+g.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(g),g.hide(),g.$.form&&b._attachToForm()):b.setData(a.getHtml(),null,!0);b.on("loaded",function(){b.fire("uiReady");b.editable(a);b.container=a;b.ui.contentsElement=a;b.setData(b.getData(1));b.resetDirty();b.fire("contentDom");b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){g&&(b.container.clearCustomData(),
b.container.remove(),g.show());b.element.clearCustomData();delete b.element});return b};CKEDITOR.inlineAll=function(){var a,d,b;for(b in CKEDITOR.dtd.$editable)for(var g=CKEDITOR.document.getElementsByTag(b),h=0,l=g.count();h<l;h++)a=g.getItem(h),"true"==a.getAttribute("contenteditable")&&(d={element:a,config:{}},!1!==CKEDITOR.fire("inline",d)&&CKEDITOR.inline(a,d.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function a(a,
h,l,m){if(!CKEDITOR.env.isCompatible)return null;a=CKEDITOR.dom.element.get(a);if(a.getEditor())throw'The editor instance "'+a.getEditor().name+'" is already attached to the provided element.';var k=new CKEDITOR.editor(h,a,m);m==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),k._.required=a.hasAttribute("required"),a.removeAttribute("required"));l&&k.setData(l,null,!0);k.on("loaded",function(){b(k);m==CKEDITOR.ELEMENT_MODE_REPLACE&&k.config.autoUpdateElement&&a.$.form&&k._attachToForm();
k.setMode(k.config.startupMode,function(){k.resetDirty();k.status="ready";k.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,k)})});k.on("destroy",d);return k}function d(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,d=a.element,m=a.elementMode,k=a.fire("uiSpace",{space:"top",
html:""}).html,e=a.fire("uiSpace",{space:"bottom",html:""}).html,c=new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} '+CKEDITOR.env.cssClass+'"  dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':"")+'\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'),
b=CKEDITOR.dom.element.createFromHtml(c.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:k?'\x3cspan id\x3d"'+a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+k+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:e?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+e+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));m==CKEDITOR.ELEMENT_MODE_REPLACE?
(d.hide(),b.insertAfter(d)):d.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");k&&a.ui.space("top").unselectable();e&&a.ui.space("bottom").unselectable();d=a.config.width;m=a.config.height;d&&b.setStyle("width",CKEDITOR.tools.cssLength(d));m&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(m));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,d){return a(b,d,null,CKEDITOR.ELEMENT_MODE_REPLACE)};
CKEDITOR.appendTo=function(b,d,l){return a(b,d,l,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var d=null,m=a[b];if(m.name||m.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(m.className))continue}else if("function"==typeof arguments[0]&&(d={},!1===arguments[0](m,d)))continue;this.replace(m,d)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes=
{}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var d=this,m=this._.modes;if(a!=d.mode&&m&&m[a]){d.fire("beforeSetMode",a);if(d.mode){var k=d.checkDirty(),m=d._.previousModeData,e,c=0;d.fire("beforeModeUnload");d.editable(0);d._.previousMode=d.mode;d._.previousModeData=e=d.getData(1);"source"==d.mode&&m==e&&(d.fire("lockSnapshot",{forceUpdate:!0}),c=1);d.ui.space("contents").setHtml("");d.mode=""}else d._.previousModeData=d.getData(1);this._.modes[a](function(){d.mode=a;void 0!==k&&!k&&
d.resetDirty();c?d.fire("unlockSnapshot"):"wysiwyg"==a&&d.fire("saveSnapshot");setTimeout(function(){d.fire("mode");b&&b.call(d)},0)})}};CKEDITOR.editor.prototype.resize=function(a,b,d,m){var k=this.container,e=this.ui.space("contents"),c=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;m=m?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):k;m.setSize("width",a,!0);c&&(c.style.width="1%");var f=(m.$.offsetHeight||0)-(e.$.clientHeight||
0),k=Math.max(b-(d?0:f),0);b=d?b+f:b;e.setStyle("height",k+"px");c&&(c.style.width="100%");this.fire("resize",{outerHeight:b,contentsHeight:k,outerWidth:a||m.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(a){return a?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})}(),CKEDITOR.config.startupMode="wysiwyg",function(){function a(a){var c=a.editor,b=a.data.path,f=b.blockLimit,e=a.data.selection,
h=e.getRanges()[0],k;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(e=d(e,b))e.appendBogus(),k=CKEDITOR.env.ie;m(c,b.block,f)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(b=h.clone(),b.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(b),f.guard=function(a){return!g(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||b.checkStartOfBlock()&&b.checkEndOfBlock())&&(c=h.fixBlock(!0,c.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||
(c=c.getFirst(g))&&c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?:&nbsp;|\xa0)$/)&&c.remove(),k=1,a.cancel());k&&h.select()}function d(a,c){if(a.isFake)return 0;var b=c.block||c.blockLimit,f=b&&b.getLast(g);if(!(!b||!b.isBlockBoundary()||f&&f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()||b.is("pre")||b.getBogus()))return b}function b(a){var c=a.data.getTarget();c.is("input")&&(c=c.getAttribute("type"),"submit"!=c&&"reset"!=c||a.data.preventDefault())}function g(a){return f(a)&&
n(a)}function h(a,c){return function(b){var f=b.data.$.toElement||b.data.$.fromElement||b.data.$.relatedTarget;(f=f&&f.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(f):null)&&(c.equals(f)||c.contains(f))||a.call(this,b)}}function l(a){function c(a){return function(c,f){f&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(e)&&(b=c);if(!(f||!g(c)||a&&u(c)))return!1}}var b,f=a.getRanges()[0];a=a.root;var e={table:1,ul:1,ol:1,dl:1};if(f.startPath().contains(e)){var d=f.clone();d.collapse(1);d.setStartAt(a,
CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(d);a.guard=c();a.checkBackward();if(b)return d=f.clone(),d.collapse(),d.setEndAt(b,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(d),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 k(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?
a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function e(a){var c=a.editor;c.getSelection().scrollIntoView();setTimeout(function(){c.fire("saveSnapshot")},0)}function c(a,c,b){var f=a.getCommonAncestor(c);for(c=a=b?c:a;(a=a.getParent())&&!f.equals(a)&&1==a.getChildCount();)c=a;c.remove()}var f,n,v,u,w,t,p,q,y,D;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=h(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 f=this.editor;f.focus();f.fire("saveSnapshot");
b||(b=f.getSelection().getRanges()[0]);t(this,c||"html",a,b);b.select();e(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,c,b){t(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 f=b.activeEnterMode,b=b.getSelection(),d=a.getName(),d=CKEDITOR.dtd.$block[d];c||(c=b.getRanges()[0]);this.insertElementIntoRange(a,c)&&(c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),d&&((d=
a.getNext(function(a){return g(a)&&!u(a)}))&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$block)?d.getDtd()["#"]?c.moveToElementEditStart(d):c.moveToElementEditEnd(a):d||f==CKEDITOR.ENTER_BR||(d=c.fixBlock(!0,f==CKEDITOR.ENTER_DIV?"div":"p"),c.moveToElementEditStart(d))));b.selectRanges([c]);e(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,c){var b=this.editor,f=b.config.enterMode,e=a.getName(),g=CKEDITOR.dtd.$block[e];if(c.checkReadOnly())return!1;
c.deleteContents(1);c.startContainer.type==CKEDITOR.NODE_ELEMENT&&(c.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?p(c):c.startContainer.is(CKEDITOR.dtd.$list)&&q(c));var d,h;if(g)for(;(d=c.getCommonAncestor(0,1))&&(h=CKEDITOR.dtd[d.getName()])&&(!h||!h[e]);)d.getName()in CKEDITOR.dtd.span?c.splitElement(d):c.checkStartOfBlock()&&c.checkEndOfBlock()?(c.setStartBefore(d),c.collapse(!0),d.remove()):c.splitBlock(f==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().$,f=c.getSelection(),e;a:if(f.anchorNode&&f.anchorNode==b.$)e=!0;else{if(CKEDITOR.env.webkit&&(e=b.getDocument().getActive())&&e.equals(b)&&!f.anchorNode){e=!0;break a}e=void 0}e&&(e=new CKEDITOR.dom.range(b),e.moveToElementEditStart(b),c=c.createRange(),c.setStart(e.startContainer.$,e.startOffset),c.collapse(!0),f.removeAllRanges(),f.addRange(c))}function c(){var a=b.getDocument().$,f=a.selection,e=b.getDocument().getActive();"None"==
f.type&&e.equals(b)&&(f=new CKEDITOR.dom.range(b),a=a.body.createTextRange(),f.moveToElementEditStart(b),f=f.startContainer,f.type!=CKEDITOR.NODE_ELEMENT&&(f=f.getParent()),a.moveToElementText(f.$),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()};y.eol.detect(a,this);y.bogus.exclude(a);y.cell.shrink(a);a.fragment=a.range.cloneContents();y.tree.rebuild(a,this);y.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var b=D,f={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.table.detectPurge(f);f.bookmark=a.createBookmark();delete f.range;var g=this.editor.createRange();
g.moveToPosition(f.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);f.targetBookmark=g.createBookmark();b.list.detectMerge(f,this);b.table.detectRanges(f,this);b.block.detectMerge(f,this);f.tableContentsRanges?(b.table.deleteRanges(f),a.moveToBookmark(f.bookmark),f.range=a):(a.moveToBookmark(f.bookmark),f.range=a,a.extractContents(b.detectExtractMerge(f)));a.moveToBookmark(f.targetBookmark);a.optimize();b.fixUneditableRangePosition(a);b.list.merge(f,this);b.table.purge(f,this);b.block.merge(f,this);
if(c){b=a.startPath();if(f=a.checkStartOfBlock()&&a.checkEndOfBlock()&&b.block&&!a.root.equals(b.block)){a:{var f=b.block.getElementsByTag("span"),g=0,d;if(f)for(;d=f.getItem(g++);)if(!n(d)){f=!0;break a}f=!1}f=!f}f&&(a.moveToPosition(b.block,CKEDITOR.POSITION_BEFORE_START),b.block.remove())}else b.autoParagraph(this.editor,a),v(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var c=
this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(c=c.replace(w,function(a,c){return c}));a.setData(c,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var c=a.getSelection();(c=c&&c.getNative())&&"Control"==c.type||this.focus()},
this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||
this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var e=function(){var c=a.editable();
null!=a._.previousScrollTop&&c.getDocument().equals(CKEDITOR.document)&&(c.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",e))};this.on("scroll",e)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",
!a.config.disableNativeSpellChecker);var h=a.config.contentsLangDirection;this.getDirection(1)!=h&&this.changeAttr("dir",h);var k=CKEDITOR.getCss();if(k){var h=d.getHead(),n=h.getCustomData("stylesheet");n?k!=n.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?n.$.styleSheet.cssText=k:n.setText(k)):(k=d.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),h.setCustomData("stylesheet",k),k.data("cke-temp",1))}h=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",
h+1);this.setCustomData("cke_includeReadonly",!a.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(a,"key",function(c){if(a.readOnly)return!0;var b=c.data.domEvent.getKey(),e;c=a.getSelection();if(0!==c.getRanges().length){if(b in m){var g,d=c.getRanges()[0],h=d.startPath(),k,n,B,b=8==b;CKEDITOR.env.ie&&
11>CKEDITOR.env.version&&(g=c.getSelectedElement())||(g=l(c))?(a.fire("saveSnapshot"),d.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g.remove(),d.select(),a.fire("saveSnapshot"),e=1):d.collapsed&&((k=h.block)&&(B=k[b?"getPrevious":"getNext"](f))&&B.type==CKEDITOR.NODE_ELEMENT&&B.is("table")&&d[b?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),d[b?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),d["moveToElementEdit"+(b?"End":"Start")](B),d.select(),a.fire("saveSnapshot"),
e=1):h.blockLimit&&h.blockLimit.is("td")&&(n=h.blockLimit.getAscendant("table"))&&d.checkBoundaryOfElement(n,b?CKEDITOR.START:CKEDITOR.END)&&(B=n[b?"getPrevious":"getNext"](f))?(a.fire("saveSnapshot"),d["moveToElementEdit"+(b?"End":"Start")](B),d.checkStartOfBlock()&&d.checkEndOfBlock()?B.remove():d.select(),a.fire("saveSnapshot"),e=1):(n=h.contains(["td","th","caption"]))&&d.checkBoundaryOfElement(n,b?CKEDITOR.START:CKEDITOR.END)&&(e=1))}return!e}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&
this.attachListener(this,"keyup",function(c){c.data.getKeystroke()in m&&!this.getFirst(g)&&(this.appendBogus(),c=a.createRange(),c.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),c.select())});this.attachListener(this,"dblclick",function(c){if(a.readOnly)return!1;c={element:c.data.getTarget()};a.fire("doubleclick",c)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(c){var b=c.data.getTarget();b.is("img","hr",
"input","textarea","select")&&!b.isReadOnly()&&(a.getSelection().selectElement(b),b.is("input","textarea","select")&&c.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(c){(c=c.data.getTarget())&&c.is("img")&&a.getSelection().selectElement(c)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(c){if(2==c.data.$.button&&(c=c.data.getTarget(),!c.getOuterHtml().replace(w,""))){var b=a.createRange();b.moveToElementEditStart(c);b.select(!0)}});CKEDITOR.env.webkit&&
(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var f=b.data.domEvent.getKey();if(f in m&&(b=a.getSelection(),0!==b.getRanges().length)){var f=8==f,e=b.getRanges()[0];b=e.startPath();if(e.collapsed)a:{var g=b.block;if(g&&e[f?"checkStartOfBlock":
"checkEndOfBlock"]()&&e.moveToClosestEditablePosition(g,!f)&&e.collapsed){if(e.startContainer.type==CKEDITOR.NODE_ELEMENT){var d=e.startContainer.getChild(e.startOffset-(f?1:0));if(d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is("hr")){a.fire("saveSnapshot");d.remove();b=!0;break a}}e=e.startPath().block;if(!e||e&&e.contains(g))b=void 0;else{a.fire("saveSnapshot");var h;(h=(f?e:g).getBogus())&&h.remove();h=a.getSelection();d=h.createBookmarks();(f?g:e).moveChildren(f?e:g,!1);b.lastElement.mergeSiblings();
c(g,e,!f);h.selectBookmarks(d);b=!0}}else b=!1}else f=e,h=b.block,e=f.endPath().block,h&&e&&!h.equals(e)?(a.fire("saveSnapshot"),(g=h.getBogus())&&g.remove(),f.enlarge(CKEDITOR.ENLARGE_INLINE),f.deleteContents(),e.getParent()&&(e.moveChildren(h,!1),b.lastElement.mergeSiblings(),c(h,e,!0)),f=a.getSelection().getRanges()[0],f.collapse(1),f.optimize(),""===f.startContainer.getHtml()&&f.startContainer.appendBogus(),f.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.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(c){var b=c.editor;b.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?
"true":"1"),a.setAttribute("contentEditable",!1))});b.on("selectionChange",function(c){if(!b.readOnly){var f=b.getSelection();f&&!f.isLocked&&(f=b.checkDirty(),b.fire("lockSnapshot"),a(c),b.fire("unlockSnapshot"),!f&&b.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-label",b);b&&a.changeAttr("title",b);var f=c.fire("ariaEditorHelpLabel",{}).label;
if(f&&(b=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),f=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+f+"\x3c/span\x3e");b.append(f);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");f=CKEDITOR.dom.walker.whitespaces(!0);n=CKEDITOR.dom.walker.bookmark(!1,!0);v=CKEDITOR.dom.walker.empty();
u=CKEDITOR.dom.walker.bogus();w=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;t=function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT}function c(b,f){var e,g,d,h,k=[],m=f.range.startContainer;e=f.range.startPath();for(var m=n[m.getName()],l=0,B=b.getChildren(),v=B.count(),K=-1,M=-1,t=0,w=e.contains(n.$list);l<v;++l)e=B.getItem(l),a(e)?(d=e.getName(),w&&d in CKEDITOR.dtd.$list?k=k.concat(c(e,f)):(h=!!m[d],
"br"!=d||!e.data("cke-eol")||l&&l!=v-1||(t=(g=l?k[l-1].node:B.getItem(l+1))&&(!a(g)||!g.is("br")),g=g&&a(g)&&n.$block[g.getName()]),-1!=K||h||(K=l),h||(M=l),k.push({isElement:1,isLineBreak:t,isBlock:e.isBlockBoundary(),hasBlockSibling:g,node:e,name:d,allowed:h}),g=t=0)):k.push({isElement:0,node:e,allowed:1});-1<K&&(k[K].firstNotAllowed=1);-1<M&&(k[M].lastNotAllowed=1);return k}function b(c,f){var e=[],g=c.getChildren(),d=g.count(),h,k=0,l=n[f],m=!c.is(n.$inline)||c.is("br");for(m&&e.push(" ");k<d;k++)h=
g.getItem(k),a(h)&&!h.is(l)?e=e.concat(b(h,f)):e.push(h);m&&e.push(" ");return e}function f(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 d(c,b,f,e){var g=c.clone(),h,k;g.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(g)).next())&&a(h)&&l[h.getName()]&&(k=h.getPrevious())&&a(k)&&!k.getParent().equals(c.startContainer)&&f.contains(k)&&e.contains(h)&&h.isIdentical(k)&&
(h.moveChildren(k),h.remove(),d(c,b,f,e))}function h(c,b){function f(c,b){if(b.isBlock&&b.isElement&&!b.node.is("br")&&a(c)&&c.is("br"))return c.remove(),1}var e=b.endContainer.getChild(b.endOffset),g=b.endContainer.getChild(b.endOffset-1);e&&f(e,c[c.length-1]);g&&f(g,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},v={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},t=CKEDITOR.tools.extend({},
n.$inline);delete t.br;return function(F,A,l,w){var p=F.editor,u=!1;"unfiltered_html"==A&&(A="html",u=!0);if(!w.checkReadOnly()){var q=(new CKEDITOR.dom.elementPath(w.startContainer,w.root)).blockLimit||w.root;F={type:A,dontFilter:u,editable:F,editor:p,range:w,blockLimit:q,mergeCandidates:[],zombies:[]};A=F.range;w=F.mergeCandidates;var I,y;"text"==F.type&&A.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(I=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",A.document),A.insertNode(I),
A.setStartAfter(I));u=new CKEDITOR.dom.elementPath(A.startContainer);F.endPath=q=new CKEDITOR.dom.elementPath(A.endContainer);if(!A.collapsed){var p=q.block||q.blockLimit,D=A.getCommonAncestor();p&&!p.equals(D)&&!p.contains(D)&&A.checkEndOfBlock()&&F.zombies.push(p);A.deleteContents()}for(;(y=f(A))&&a(y)&&y.isBlockBoundary()&&u.contains(y);)A.moveToPosition(y,CKEDITOR.POSITION_BEFORE_END);d(A,F.blockLimit,u,q);I&&(A.setEndBefore(I),A.collapse(),I.remove());I=A.startPath();if(p=I.contains(e,!1,1))A.splitElement(p),
F.inlineStylesRoot=p,F.inlineStylesPeak=I.lastElement;I=A.createBookmark();(p=I.startNode.getPrevious(g))&&a(p)&&e(p)&&w.push(p);(p=I.startNode.getNext(g))&&a(p)&&e(p)&&w.push(p);for(p=I.startNode;(p=p.getParent())&&e(p);)w.push(p);A.moveToBookmark(I);if(I=l){I=F.range;if("text"==F.type&&F.inlineStylesRoot){y=F.inlineStylesPeak;A=y.getDocument().createText("{cke-peak}");for(w=F.inlineStylesRoot.getParent();!y.equals(w);)A=A.appendTo(y.clone()),y=y.getParent();l=A.getOuterHtml().split("{cke-peak}").join(l)}y=
F.blockLimit.getName();if(/^\s+|\s+$/.test(l)&&"span"in CKEDITOR.dtd[y]){var N='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';l=N+l+N}l=F.editor.dataProcessor.toHtml(l,{context:null,fixForBody:!1,protectedWhitespaces:!!N,dontFilter:F.dontFilter,filter:F.editor.activeFilter,enterMode:F.editor.activeEnterMode});y=I.document.createElement("body");y.setHtml(l);N&&(y.getFirst().remove(),y.getLast().remove());if((N=I.startPath().block)&&(1!=N.getChildCount()||!N.getBogus()))a:{var K;if(1==
y.getChildCount()&&a(K=y.getFirst())&&K.is(v)&&!K.hasAttribute("contenteditable")){N=K.getElementsByTag("*");I=0;for(w=N.count();I<w;I++)if(A=N.getItem(I),!A.is(t))break a;K.moveChildren(K.getParent(1));K.remove()}}F.dataWrapper=y;I=l}if(I){K=F.range;I=K.document;var M;y=F.blockLimit;w=0;var S,N=[],L,V;l=p=0;var W,ba;A=K.startContainer;var u=F.endPath.elements[0],ca,q=u.getPosition(A),D=!!u.getCommonAncestor(A)&&q!=CKEDITOR.POSITION_IDENTICAL&&!(q&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);
A=c(F.dataWrapper,F);for(h(A,K);w<A.length;w++){q=A[w];if(M=q.isLineBreak){M=K;W=y;var Y=void 0,da=void 0;q.hasBlockSibling?M=1:(Y=M.startContainer.getAscendant(n.$block,1))&&Y.is({div:1,p:1})?(da=Y.getPosition(W),da==CKEDITOR.POSITION_IDENTICAL||da==CKEDITOR.POSITION_CONTAINS?M=0:(W=M.splitElement(Y),M.moveToPosition(W,CKEDITOR.POSITION_AFTER_START),M=1)):M=0}if(M)l=0<w;else{M=K.startPath();!q.isBlock&&m(F.editor,M.block,M.blockLimit)&&(V=k(F.editor))&&(V=I.createElement(V),V.appendBogus(),K.insertNode(V),
CKEDITOR.env.needsBrFiller&&(S=V.getBogus())&&S.remove(),K.moveToPosition(V,CKEDITOR.POSITION_BEFORE_END));if((M=K.startPath().block)&&!M.equals(L)){if(S=M.getBogus())S.remove(),N.push(M);L=M}q.firstNotAllowed&&(p=1);if(p&&q.isElement){M=K.startContainer;for(W=null;M&&!n[M.getName()][q.name];){if(M.equals(y)){M=null;break}W=M;M=M.getParent()}if(M)W&&(ba=K.splitElement(W),F.zombies.push(ba),F.zombies.push(W));else{W=y.getName();ca=!w;M=w==A.length-1;W=b(q.node,W);for(var Y=[],da=W.length,fa=0,ha=void 0,
ia=0,la=-1;fa<da;fa++)ha=W[fa]," "==ha?(ia||ca&&!fa||(Y.push(new CKEDITOR.dom.text(" ")),la=Y.length),ia=1):(Y.push(ha),ia=0);M&&la==Y.length&&Y.pop();ca=Y}}if(ca){for(;M=ca.pop();)K.insertNode(M);ca=0}else K.insertNode(q.node);q.lastNotAllowed&&w<A.length-1&&((ba=D?u:ba)&&K.setEndAt(ba,CKEDITOR.POSITION_AFTER_START),p=0);K.collapse()}}1!=A.length?S=!1:(S=A[0],S=S.isElement&&"false"==S.node.getAttribute("contenteditable"));S&&(l=!0,M=A[0].node,K.setStartAt(M,CKEDITOR.POSITION_BEFORE_START),K.setEndAt(M,
CKEDITOR.POSITION_AFTER_END));F.dontMoveCaret=l;F.bogusNeededBlocks=N}S=F.range;var U;ba=F.bogusNeededBlocks;for(ca=S.createBookmark();L=F.zombies.pop();)L.getParent()&&(V=S.clone(),V.moveToElementEditStart(L),V.removeEmptyBlocksAtEnd());if(ba)for(;L=ba.pop();)CKEDITOR.env.needsBrFiller?L.appendBogus():L.append(S.document.createText(" "));for(;L=F.mergeCandidates.pop();)L.mergeSiblings();S.moveToBookmark(ca);if(!F.dontMoveCaret){for(L=f(S);L&&a(L)&&!L.is(n.$empty);){if(L.isBlockBoundary())S.moveToPosition(L,
CKEDITOR.POSITION_BEFORE_END);else{if(e(L)&&L.getHtml().match(/(\s|&nbsp;)$/g)){U=null;break}U=S.clone();U.moveToPosition(L,CKEDITOR.POSITION_BEFORE_END)}L=L.getLast(g)}U&&S.moveToRange(U)}}}}();p=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return c}function c(a,b,f){b=a.getDocument().createElement(b);a.append(b,f);return b}
function b(a){var c=a.count(),f;for(c;0<c--;)f=a.getItem(c),CKEDITOR.tools.trim(f.getHtml())||(f.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&f.getChildCount()&&f.getFirst().remove())}return function(f){var e=f.startContainer,g=e.getAscendant("table",1),d=!1;b(g.getElementsByTag("td"));b(g.getElementsByTag("th"));g=f.clone();g.setStart(e,0);g=a(g).lastBackward();g||(g=f.clone(),g.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),d=!0);g||(g=e);g.is("table")?(f.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),
f.collapse(!0),g.remove()):(g.is({tbody:1,thead:1,tfoot:1})&&(g=c(g,"tr",d)),g.is("tr")&&(g=c(g,g.getParent().is("thead")?"th":"td",d)),(e=g.getBogus())&&e.remove(),f.moveToPosition(g,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();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.$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,f=!1,e;e=c.clone();e.setStart(b,0);e=a(e).lastBackward();e||(e=c.clone(),e.setEndAt(b,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),f=!0);e||(e=b);e.is(CKEDITOR.dtd.$list)?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),e.remove()):((b=e.getBogus())&&b.remove(),c.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),c.select())}}();y={eol:{detect:function(a,c){var b=a.range,
f=b.clone(),e=b.clone(),g=new CKEDITOR.dom.elementPath(b.startContainer,c),d=new CKEDITOR.dom.elementPath(b.endContainer,c);f.collapse(1);e.collapse();g.block&&f.checkBoundaryOfElement(g.block,CKEDITOR.END)&&(b.setStartAfter(g.block),a.prependEolBr=1);d.block&&e.checkBoundaryOfElement(d.block,CKEDITOR.START)&&(b.setEndBefore(d.block),a.appendEolBr=1)},fix:function(a,c){var b=c.getDocument(),f;a.appendEolBr&&(f=this.createEolBr(b),a.fragment.append(f));!a.prependEolBr||f&&!f.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||!u(c)||b&&b.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var b=a.range,f=b.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(f,c),g=new CKEDITOR.dom.elementPath(b.startContainer,c),b=new CKEDITOR.dom.elementPath(b.endContainer,c),d;f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent());if(e.blockLimit.is({tr:1,
table:1})){var h=e.contains("table").getParent();d=function(a){return!a.equals(h)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(g=g.contains(CKEDITOR.dtd.$list),b=b.contains(CKEDITOR.dtd.$list),!g.equals(b))){var k=e.contains(CKEDITOR.dtd.$list).getParent();d=function(a){return!a.equals(k)}}d||(d=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,c,f,d)},rebuildFragment:function(a,c,b,f){for(var e;b&&!b.equals(c)&&f(b);)e=b.clone(0,1),a.fragment.appendTo(e),
a.fragment=e,b=b.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,b=a.endContainer,f=a.startOffset,e=a.endOffset;c.type==CKEDITOR.NODE_ELEMENT&&c.equals(b)&&c.is("tr")&&++f==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};D=function(){function a(c,b){var f=c.getParent();if(f.is(CKEDITOR.dtd.$inline))c[b?"insertBefore":"insertAfter"](f)}function c(b,f,e){a(f);a(e,1);for(var g;g=e.getNext();)g.insertAfter(f),f=g;v(b)&&b.remove()}function b(a,c){var f=new CKEDITOR.dom.range(a);f.setStartAfter(c.startNode);
f.setEndBefore(c.endNode);return f}return{list:{detectMerge:function(a,c){var f=b(c,a.bookmark),e=f.startPath(),g=f.endPath(),d=e.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);a.mergeList=d&&h&&d.getParent().equals(h.getParent())&&!d.equals(h);a.mergeListItems=e.block&&g.block&&e.block.is(CKEDITOR.dtd.$listItem)&&g.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)f=f.clone(),f.setStartBefore(a.bookmark.startNode),f.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=
f.createBookmark()},merge:function(a,b){if(a.mergeListBookmark){var f=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,g=new CKEDITOR.dom.elementPath(f,b),d=new CKEDITOR.dom.elementPath(e,b);if(a.mergeList){var h=g.contains(CKEDITOR.dtd.$list),k=d.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(g=g.contains(CKEDITOR.dtd.$listItem),d=d.contains(CKEDITOR.dtd.$listItem),g.equals(d)||c(d,f,e));f.remove();e.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 f=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,g=new CKEDITOR.dom.elementPath(f,b),d=new CKEDITOR.dom.elementPath(e,b),g=g.block,d=d.block;g&&d&&!g.equals(d)&&c(d,f,e);f.remove();e.remove()}}},table:function(){function a(b){var e=
[],g,d=new CKEDITOR.dom.walker(b),h=b.startPath().contains(f),k=b.endPath().contains(f),n={};d.guard=function(a,d){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(d?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(n,a,l,1)}if(d&&h&&a.equals(h))g=b.clone(),g.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(g);else if(!d&&k&&a.equals(k))g=b.clone(),g.setStartAt(k,CKEDITOR.POSITION_AFTER_START),e.push(g);else{if(l=!d)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(f)&&(!h||c(a,h))&&(!k||
c(a,k));l&&(g=b.clone(),g.selectNodeContents(a),e.push(g))}};d.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return e}function c(a,b){var f=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(b);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&f)}var f={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,b=c.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);var b=new CKEDITOR.dom.walker(b),e=0;b.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(f)&&++e};
b.checkForward();if(1<e){var b=c.startPath().contains("table"),g=c.endPath().contains("table");b&&g&&c.checkBoundaryOfElement(b,CKEDITOR.START)&&c.checkBoundaryOfElement(g,CKEDITOR.END)&&(c=a.range.clone(),c.setStartBefore(b),c.setEndAfter(g),a.purgeTableBookmark=c.createBookmark())}},detectRanges:function(e,g){var d=b(g,e.bookmark),h=d.clone(),k,n,A=d.getCommonAncestor();A.is(CKEDITOR.dtd.$tableContent)&&!A.is(f)&&(A=A.getAscendant("table",!0));n=A;A=new CKEDITOR.dom.elementPath(d.startContainer,
n);n=new CKEDITOR.dom.elementPath(d.endContainer,n);A=A.contains("table");n=n.contains("table");if(A||n)A&&n&&c(A,n)?(e.tableSurroundingRange=h,h.setStartAt(A,CKEDITOR.POSITION_AFTER_END),h.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),h=d.clone(),h.setEndAt(A,CKEDITOR.POSITION_AFTER_END),k=d.clone(),k.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),k=a(h).concat(a(k))):A?n||(e.tableSurroundingRange=h,h.setStartAt(A,CKEDITOR.POSITION_AFTER_END),d.setEndAt(A,CKEDITOR.POSITION_AFTER_END)):(e.tableSurroundingRange=
h,h.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),d.setStartAt(n,CKEDITOR.POSITION_AFTER_START)),e.tableContentsRanges=k?k:a(d)},deleteRanges:function(a){for(var c;c=a.tableContentsRanges.pop();)c.extractContents(),v(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 b=c.startPath(),f;m(a,b.block,b.blockLimit)&&(f=k(a))&&(f=c.document.createElement(f),f.appendBogus(),c.insertNode(f),c.moveToPosition(f,
CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function a(a,c){if(0===a.length)return!1;var b,f;if((b=!c&&1===a.length)&&!(b=a[0].collapsed)){var e=a[0];b=e.startContainer.getAscendant({td:1,th:1},!0);var g=e.endContainer.getAscendant({td:1,th:1},!0);f=CKEDITOR.tools.trim;b&&b.equals(g)&&!b.findOne("td, th, tr, tbody, table")?(e=e.cloneContents(),b=e.getFirst()?f(e.getFirst().getText())!==f(b.getText()):!0):b=!1}if(b)return!1;for(f=0;f<a.length;f++)if(b=a[f]._getTableElement(),!b)return!1;return!0}
function d(a){function c(a){a=a.find("td, th");var b=[],f;for(f=0;f<a.count();f++)b.push(a.getItem(f));return b}var b=[],f,e;for(e=0;e<a.length;e++)f=a[e]._getTableElement(),f.is&&f.is({td:1,th:1})?b.push(f):b=b.concat(c(f));return b}function b(a){a=d(a);var c="",b=[],f,e;for(e=0;e<a.length;e++)f&&!f.equals(a[e].getAscendant("tr"))?(c+=b.join("\t")+"\n",f=a[e].getAscendant("tr"),b=[]):0===e&&(f=a[e].getAscendant("tr")),b.push(a[e].getText());return c+=b.join("\t")}function g(a){var c=this.root.editor,
f=c.getSelection(1);this.reset();D=!0;f.root.once("selectionchange",function(a){a.cancel()},null,null,0);f.selectRanges([a[0]]);f=this._.cache;f.ranges=new CKEDITOR.dom.rangeList(a);f.type=CKEDITOR.SELECTION_TEXT;f.selectedElement=a[0]._getTableElement();f.selectedText=b(a);f.nativeSel=null;this.isFake=1;this.rev=p++;c._.fakeSelection=this;D=!1;this.root.fire("selectionchange")}function h(){var c=this._.fakeSelection,b;if(c){b=this.getSelection(1);var f;if(!(f=!b)&&(f=!b.isHidden())){f=c;var e=b.getRanges(),
g=f.getRanges(),d=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),h=g.length&&g[0]._getTableElement()&&g[0]._getTableElement().getAscendant("table",!0),k=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table"),n=1===g.length&&g[0]._getTableElement()&&g[0]._getTableElement().is("table"),l=1===e.length&&e[0].collapsed,g=a(e,!!CKEDITOR.env.webkit)&&a(g);d=d&&h?d.equals(h)||h.contains(d):!1;d&&(l||g)?(k&&!n&&f.selectRanges(e),f=!0):f=!1;f=!f}f&&(c.reset(),
c=0)}if(!c&&(c=b||this.getSelection(1),!c||c.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",c);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(f=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit),CKEDITOR.env.webkit&&!f&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:c,path:b}))}function l(){x=!0;r||(m.call(this),r=CKEDITOR.tools.setTimeout(m,200,this))}
function m(){r=null;x&&(CKEDITOR.tools.setTimeout(h,0,this),x=!1)}function k(a){return E(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function e(a){function c(b,f){return b&&b.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(f?"End":"Start")](b):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var b=a.startContainer,f=a.getPreviousNode(k,null,b),e=a.getNextNode(k,null,b);return c(f)||c(e,1)||!(f||e||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()&&b.getBogus())?
!0:!1}function c(a){f(a,!1);var c=a.getDocument().createText(q);a.setCustomData("cke-fillingChar",c);return c}function f(a,c){var b=a&&a.removeCustomData("cke-fillingChar");if(b){if(!1!==c){var f=a.getDocument().getSelection().getNative(),e=f&&"None"!=f.type&&f.getRangeAt(0),g=q.length;if(b.getLength()>g&&e&&e.intersectsNode(b.$)){var d=[{node:f.anchorNode,offset:f.anchorOffset},{node:f.focusNode,offset:f.focusOffset}];f.anchorNode==b.$&&f.anchorOffset>g&&(d[0].offset-=g);f.focusNode==b.$&&f.focusOffset>
g&&(d[1].offset-=g)}}b.setText(n(b.getText(),1));d&&(b=a.getDocument().$,f=b.getSelection(),b=b.createRange(),b.setStart(d[0].node,d[0].offset),b.collapse(!0),f.removeAllRanges(),f.addRange(b),f.extend(d[1].node,d[1].offset))}}function n(a,c){return c?a.replace(y,function(a,c){return c?" ":""}):a.replace(q,"")}function v(a,c){var 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'+(c||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(b);var f=a.getSelection(1),e=a.createRange(),g=f.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(b,CKEDITOR.POSITION_AFTER_START);e.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);f.selectRanges([e]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function u(a){var c={37:1,39:1,8:1,46:1};return function(b){var f=b.data.getKeystroke();if(c[f]){var e=a.getSelection().getRanges(),
g=e[0];1==e.length&&g.collapsed&&(f=g[38>f?"getPreviousEditableNode":"getNextEditableNode"]())&&f.type==CKEDITOR.NODE_ELEMENT&&"false"==f.getAttribute("contenteditable")&&(a.getSelection().fake(f),b.data.preventDefault(),b.cancel())}}}function w(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 f=b.startContainer,e;f&&!((e=f.type==CKEDITOR.NODE_ELEMENT)&&f.is("body")||!f.isReadOnly());)e&&"false"==
f.getAttribute("contentEditable")&&b.setStartAfter(f),f=f.getParent();f=b.startContainer;e=b.endContainer;var g=b.startOffset,d=b.endOffset,h=b.clone();f&&f.type==CKEDITOR.NODE_TEXT&&(g>=f.getLength()?h.setStartAfter(f):h.setStartBefore(f));e&&e.type==CKEDITOR.NODE_TEXT&&(d?h.setEndAfter(e):h.setEndBefore(e));f=new CKEDITOR.dom.walker(h);f.evaluator=function(f){if(f.type==CKEDITOR.NODE_ELEMENT&&f.isReadOnly()){var e=b.clone();b.setEndBefore(f);b.collapsed&&a.splice(c--,1);f.getPosition(h.endContainer)&
CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(f),e.collapsed||a.splice(c+1,0,e));return!0}return!1};f.next()}}return a}var t="function"!=typeof window.getSelection,p=1,q=CKEDITOR.tools.repeat("​",7),y=new RegExp(q+"( )?","g"),D,r,x,E=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,f=b.createRange(),
e;(e=f.moveToClosestEditablePosition(c.selected,a))||(e=f.moveToClosestEditablePosition(c.selected,!a));e&&b.getSelection().selectRanges([f]);b.fire("saveSnapshot");c.selected.remove();e||(f.moveToElementEditablePosition(b.editable()),b.getSelection().selectRanges([f]));b.fire("saveSnapshot");return!1}}var b=a(),f=a(1);return{37:b,38:b,39:f,40:f,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(){p=
new CKEDITOR.dom.selection(b.getSelection());p.lock()}function c(){d.removeListener("mouseup",c);m.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement()&&b.parentElement().ownerDocument==g.$&&b.select()}function e(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 g=b.document,d=CKEDITOR.document,k=b.editable(),n=g.getBody(),m=g.getDocumentElement(),v=k.isInline(),w,p;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==w&&(a=b.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=b.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){w&&CKEDITOR.env.webkit&&(w=b._.previousActive&&
b._.previousActive.equals(g.getActive()))&&null!=b._.previousScrollTop&&b._.previousScrollTop!=k.$.scrollTop&&(k.$.scrollTop=b._.previousScrollTop);b.unlockSelection(w);w=0},null,null,-1);k.attachListener(k,"mousedown",function(){w=0});if(CKEDITOR.env.ie||v)t?k.attachListener(k,"beforedeactivate",a,null,null,-1):k.attachListener(b,"selectionCheck",a,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){b.lockSelection(p);w=1},null,null,-1),k.attachListener(k,"mousedown",
function(){w=0});if(CKEDITOR.env.ie&&!v){var q;k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=b.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(q=b.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&q&&(b.document.$.documentElement.scrollLeft=q.x,b.document.$.documentElement.scrollTop=q.y);q=null});if("BackCompat"!=g.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var r,y;m.on("mousedown",function(a){function c(a){a=
a.data.$;if(r){var b=n.$.createTextRange();try{b.moveToPoint(a.clientX,a.clientY)}catch(f){}r.setEndPoint(0>y.compareEndPoints("StartToStart",b)?"EndToEnd":"StartToStart",b);r.select()}}function b(){m.removeListener("mousemove",c);d.removeListener("mouseup",b);m.removeListener("mouseup",b);r.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<m.$.clientHeight&&a.$.x<m.$.clientWidth){r=n.$.createTextRange();try{r.moveToPoint(a.$.clientX,a.$.clientY)}catch(f){}y=r.duplicate();m.on("mousemove",c);d.on("mouseup",
b);m.on("mouseup",b)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)m.on("mousedown",function(a){a.data.getTarget().is("html")&&(d.on("mouseup",c),m.on("mouseup",c))})}}k.attachListener(k,"selectionchange",h,b);k.attachListener(k,"keyup",l,b);k.attachListener(k,"keydown",function(a){var c=this.getSelection(1);e(c)&&(c.selectElement(e(c)),a.data.preventDefault())},b);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){b.forceNextSelectionCheck();b.selectionChange(1)});if(v&&
(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var K;k.attachListener(k,"mousedown",function(){K=1});k.attachListener(g.getDocumentElement(),"mouseup",function(){K&&l.call(b);K=0})}else k.attachListener(CKEDITOR.env.ie?k:g.getDocumentElement(),"mouseup",l,b);CKEDITOR.env.webkit&&k.attachListener(g,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:k.hasFocus&&f(k)}},null,null,-1);k.attachListener(k,"keydown",u(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 f=z[a.data.keyCode];if(f)return f({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")?(f(a),a.editor.fire("selectionCheck")):
b.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",function(){f(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=n(a.data))},c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=n(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?h:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):
null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.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:p++;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 f,e;if(a)if(a.getRangeAt)f=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(g){}f=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.parentElement())}if(!f||f.type!=CKEDITOR.NODE_ELEMENT&&f.type!=
CKEDITOR.NODE_TEXT||!this.root.equals(f)&&!this.root.contains(f))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var C={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:n,_createFillingCharSequenceNode:c,
FILLING_CHAR_SEQUENCE:q});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=t?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:t?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE;try{var b=this.getNative(),f=b.type;"Text"==f&&(c=CKEDITOR.SELECTION_TEXT);"Control"==f&&(c=CKEDITOR.SELECTION_ELEMENT);b.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=
c}:function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_TEXT,b=this.getNative();if(!b||!b.rangeCount)c=CKEDITOR.SELECTION_NONE;else if(1==b.rangeCount){var b=b.getRangeAt(0),f=b.startContainer;f==b.endContainer&&1==f.nodeType&&1==b.endOffset-b.startOffset&&C[f.childNodes[b.startOffset].nodeName.toLowerCase()]&&(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=t?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,
b){c=c.duplicate();c.collapse(b);var f=c.parentElement();if(!f.hasChildNodes())return{container:f,offset:0};for(var e=f.children,g,d,h=c.duplicate(),k=0,n=e.length-1,l=-1,m,v;k<=n;)if(l=Math.floor((k+n)/2),g=e[l],h.moveToElementText(g),m=h.compareEndPoints("StartToStart",c),0<m)n=l-1;else if(0>m)k=l+1;else return{container:f,offset:a(g)};if(-1==l||l==e.length-1&&0>m){h.moveToElementText(f);h.setEndPoint("StartToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=f.childNodes;if(!h)return g=e[e.length-
1],g.nodeType!=CKEDITOR.NODE_TEXT?{container:f,offset:e.length}:{container:g,offset:g.nodeValue.length};for(f=e.length;0<h&&0<f;)d=e[--f],d.nodeType==CKEDITOR.NODE_TEXT&&(v=d,h-=d.nodeValue.length);return{container:v,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:f,offset:a(g)+(0<m?0:1)};for(;0<h;)try{d=g[0<m?"previousSibling":"nextSibling"],d.nodeType==CKEDITOR.NODE_TEXT&&(h-=d.nodeValue.length,v=
d),g=d}catch(w){return{container:f,offset:a(g)}}return{container:v,offset:0<m?-h:v.nodeValue.length+h}};return function(){var a=this.getNative(),b=a&&a.createRange(),f=this.getType();if(!a)return[];if(f==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),f=c(b,!0),a.setStart(new CKEDITOR.dom.node(f.container),f.offset),f=c(b),a.setEnd(new CKEDITOR.dom.node(f.container),f.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&
a.collapse(),[a];if(f==CKEDITOR.SELECTION_ELEMENT){for(var f=[],e=0;e<b.length;e++){for(var g=b.item(e),d=g.parentNode,h=0,a=new CKEDITOR.dom.range(this.root);h<d.childNodes.length&&d.childNodes[h]!=g;h++);a.setStart(new CKEDITOR.dom.node(d),h);a.setEnd(new CKEDITOR.dom.node(d),h+1);f.push(a)}return f}return[]}}():function(){var a=[],c,b=this.getNative();if(!b)return a;for(var f=0;f<b.rangeCount;f++){var e=b.getRangeAt(f);c=new CKEDITOR.dom.range(this.root);c.setStart(new CKEDITOR.dom.node(e.startContainer),
e.startOffset);c.setEnd(new CKEDITOR.dom.node(e.endContainer),e.endOffset);a.push(c)}return a};return function(c){var b=this._.cache,f=b.ranges;f||(b.ranges=f=new CKEDITOR.dom.rangeList(a.call(this)));return c?w(new CKEDITOR.dom.rangeList(f.slice())):f}}(),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,f,e=2;e&&!((b=a.getEnclosedNode())&&b.type==CKEDITOR.NODE_ELEMENT&&C[b.getName()]&&(f=b));e--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return f&&f.$});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=t?"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(c){if(this.isLocked){if(c)var b=this.getSelectedElement(),f=this.getRanges(),e=this.isFake;this.isLocked=0;this.reset();c&&(c=b||f[0]&&f[0].getCommonAncestor())&&c.getAscendant("body",
1)&&(a(f)?g.call(this,f):e?this.fake(b):b?this.selectElement(b):this.selectRanges(f))}},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=p++},selectElement:function(a){var c=
new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(b){var d=this.root.editor,h=d&&d._.hiddenSelectionContainer;this.reset();if(h)for(var h=this.root,k,n=0;n<b.length;++n)k=b[n],k.endContainer.equals(h)&&(k.endOffset=Math.min(k.endOffset,h.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 A,v;if(1==b.length&&
!(v=b[0]).collapsed&&(m=v.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(v=v.clone(),v.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(A=v.getEnclosedNode())&&A.type==CKEDITOR.NODE_ELEMENT&&(m=A),"false"==m.getAttribute("contenteditable")))break a;m=void 0}if(m)this.fake(m);else if(d&&d.plugins.tableselection&&CKEDITOR.plugins.tableselection.isSupportedEnvironment&&a(b)&&!D)g.call(this,b);else{if(t){A=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;v={table:1,tbody:1,tr:1};1<b.length&&(d=b[b.length-
1],b[0].setEnd(d.endContainer,d.endOffset));d=b[0];b=d.collapsed;var w,p,q;if((h=d.getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in C&&(!h.is("a")||!h.getText()))try{q=h.$.createControlRange();q.addElement(h.$);q.select();return}catch(r){}if(d.startContainer.type==CKEDITOR.NODE_ELEMENT&&d.startContainer.getName()in v||d.endContainer.type==CKEDITOR.NODE_ELEMENT&&d.endContainer.getName()in v)d.shrink(CKEDITOR.NODE_ELEMENT,!0),b=d.collapsed;q=d.createBookmark();v=q.startNode;b||(l=q.endNode);
q=d.document.$.body.createTextRange();q.moveToElementText(v.$);q.moveStart("character",1);l?(m=d.document.$.body.createTextRange(),m.moveToElementText(l.$),q.setEndPoint("EndToEnd",m),q.moveEnd("character",-1)):(w=v.getNext(A),p=v.hasAscendant("pre"),w=!(w&&w.getText&&w.getText().match(m))&&(p||!v.hasPrevious()||v.getPrevious().is&&v.getPrevious().is("br")),p=d.document.createElement("span"),p.setHtml("\x26#65279;"),p.insertBefore(v),w&&d.document.createText("﻿").insertBefore(v));d.setStartBefore(v);
v.remove();b?(w?(q.moveStart("character",-1),q.select(),d.document.$.selection.clear()):q.select(),d.moveToPosition(p,CKEDITOR.POSITION_BEFORE_START),p.remove()):(d.setEndBefore(l),l.remove(),q.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(q=0;q<b.length;q++){if(q<b.length-1&&(w=b[q],p=b[q+1],m=w.clone(),m.setStart(w.endContainer,w.endOffset),m.setEnd(p.startContainer,p.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),d=m.getCommonAncestor(),m=m.getEnclosedNode(),
d.isReadOnly()||m&&m.isReadOnly()))){p.setStart(w.startContainer,w.startOffset);b.splice(q--,1);continue}d=b[q];p=this.document.$.createRange();d.collapsed&&CKEDITOR.env.webkit&&e(d)&&(m=c(this.root),d.insertNode(m),(w=m.getNext())&&!m.getPrevious()&&w.type==CKEDITOR.NODE_ELEMENT&&"br"==w.getName()?(f(this.root),d.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START)):d.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));p.setStart(d.startContainer.$,d.startOffset);try{p.setEnd(d.endContainer.$,d.endOffset)}catch(u){if(0<=
u.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))d.collapse(1),p.setEnd(d.endContainer.$,d.endOffset);else throw u;}l.addRange(p)}}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 f=this._.cache,e=new CKEDITOR.dom.range(this.root);e.setStartBefore(a);e.setEndAfter(a);f.ranges=new CKEDITOR.dom.rangeList(e);f.selectedElement=f.startElement=a;f.type=CKEDITOR.SELECTION_ELEMENT;
f.selectedText=f.nativeSel=null;this.isFake=1;this.rev=p++;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(c){return a(this.getRanges(),c)},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(c){for(var b=[],f,e=0;e<c.length;e++){var g=new CKEDITOR.dom.range(this.root);g.moveToBookmark(c[e]);b.push(g)}c.isFake&&(f=a(b)?b[0]._getTableElement():b[0].getEnclosedNode(),f&&f.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),c.isFake=0));c.isFake&&!a(b)?this.fake(f):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-
1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[t?"empty":"removeAllRanges"]()}catch(c){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,c){for(var b,f;(a=a.getParent())&&!a.equals(c);)if(a.getAttribute("data-nostyle"))b=a;else if(!f){var e=a.getAttribute("contentEditable");
"false"==e?b=a:"true"==e&&(f=1)}return b}function d(a,c,b,f){return(a.getPosition(c)|f)==f&&(!b.childRule||b.childRule(a))}function b(c){var f=c.document;if(c.collapsed)f=q(this,f),c.insertNode(f),c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_END);else{var e=this.element,g=this._.definition,k,n=g.ignoreReadonly,m=n||g.includeReadonly;null==m&&(m=c.root.getCustomData("cke_includeReadonly"));var l=CKEDITOR.dtd[e];l||(k=!0,l=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var v=c.createBookmark(),
p=v.startNode,K=v.endNode,t=p,r;if(!n){var u=c.getCommonAncestor(),n=a(p,u),u=a(K,u);n&&(t=n.getNextSourceNode(!0));u&&(K=u)}for(t.getPosition(K)==CKEDITOR.POSITION_FOLLOWING&&(t=0);t;){n=!1;if(t.equals(K))t=null,n=!0;else{var y=t.type==CKEDITOR.NODE_ELEMENT?t.getName():null,u=y&&"false"==t.getAttribute("contentEditable"),D=y&&t.getAttribute("data-nostyle");if(y&&t.data("cke-bookmark")){t=t.getNextSourceNode(!0);continue}if(u&&m&&CKEDITOR.dtd.$block[y])for(var x=t,z=h(x),E=void 0,C=z.length,B=0,x=
C&&new CKEDITOR.dom.range(x.getDocument());B<C;++B){var E=z[B],J=CKEDITOR.filter.instances[E.data("cke-filter")];if(J?J.check(this):1)x.selectNodeContents(E),b.call(this,x)}z=y?!l[y]||D?0:u&&!m?0:d(t,K,g,O):1;if(z)if(E=t.getParent(),z=g,C=e,B=k,!E||!(E.getDtd()||CKEDITOR.dtd.span)[C]&&!B||z.parentRule&&!z.parentRule(E))n=!0;else{if(r||y&&CKEDITOR.dtd.$removeEmpty[y]&&(t.getPosition(K)|O)!=O||(r=c.clone(),r.setStartBefore(t)),y=t.type,y==CKEDITOR.NODE_TEXT||u||y==CKEDITOR.NODE_ELEMENT&&!t.getChildCount()){for(var y=
t,G;(n=!y.getNext(I))&&(G=y.getParent(),l[G.getName()])&&d(G,p,g,F);)y=G;r.setEndAfter(y)}}else n=!0;t=t.getNextSourceNode(D||u)}if(n&&r&&!r.collapsed){for(var n=q(this,f),u=n.hasAttributes(),D=r.getCommonAncestor(),y={},z={},E={},C={},H,U,ga;n&&D;){if(D.getName()==e){for(H in g.attributes)!C[H]&&(ga=D.getAttribute(U))&&(n.getAttribute(H)==ga?z[H]=1:C[H]=1);for(U in g.styles)!E[U]&&(ga=D.getStyle(U))&&(n.getStyle(U)==ga?y[U]=1:E[U]=1)}D=D.getParent()}for(H in z)n.removeAttribute(H);for(U in y)n.removeStyle(U);
u&&!n.hasAttributes()&&(n=null);n?(r.extractContents().appendTo(n),r.insertNode(n),w.call(this,n),n.mergeSiblings(),CKEDITOR.env.ie||n.$.normalize()):(n=new CKEDITOR.dom.element("span"),r.extractContents().appendTo(n),r.insertNode(n),w.call(this,n),n.remove(!0));r=null}}c.moveToBookmark(v);c.shrink(CKEDITOR.SHRINK_TEXT);c.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function g(a){function c(){for(var a=new CKEDITOR.dom.elementPath(f.getParent()),b=new CKEDITOR.dom.elementPath(m.getParent()),e=null,g=null,d=
0;d<a.elements.length;d++){var h=a.elements[d];if(h==a.block||h==a.blockLimit)break;l.checkElementRemovable(h,!0)&&(e=h)}for(d=0;d<b.elements.length;d++){h=b.elements[d];if(h==b.block||h==b.blockLimit)break;l.checkElementRemovable(h,!0)&&(g=h)}g&&m.breakParent(g);e&&f.breakParent(e)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var b=a.createBookmark(),f=b.startNode,e=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var g=new CKEDITOR.dom.elementPath(f.getParent(),a.root),d,h=0,k;h<g.elements.length&&
(k=g.elements[h])&&k!=g.block&&k!=g.blockLimit;h++)if(this.checkElementRemovable(k)){var n;!e&&a.collapsed&&(a.checkBoundaryOfElement(k,CKEDITOR.END)||(n=a.checkBoundaryOfElement(k,CKEDITOR.START)))?(d=k,d.match=n?"start":"end"):(k.mergeSiblings(),k.is(this.element)?u.call(this,k):t(k,r(this)[k.getName()]))}if(d){e=f;for(h=0;;h++){k=g.elements[h];if(k.equals(d))break;else if(k.match)continue;else k=k.clone();k.append(e);e=k}e["start"==d.match?"insertBefore":"insertAfter"](d)}}else{var m=b.endNode,
l=this;c();for(g=f;!g.equals(m);)d=g.getNextSourceNode(),g.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(g)&&(g.getName()==this.element?u.call(this,g):t(g,r(this)[g.getName()]),d.type==CKEDITOR.NODE_ELEMENT&&d.contains(f)&&(c(),d=f.getNext())),g=d}a.moveToBookmark(b);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function h(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function l(a){var c=a.getEnclosedNode()||a.getCommonAncestor(!1,
!0);(a=(new CKEDITOR.dom.elementPath(c,a.root)).contains(this.element,1))&&!a.isReadOnly()&&y(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 f in b)a.removeAttribute(f,b[f]);if(c.styles)for(var e in c.styles)c.styles.hasOwnProperty(e)&&a.removeStyle(e)}}function k(a){var b=a.createBookmark(!0),f=a.createIterator();f.enforceRealBlocks=!0;this._.enterMode&&(f.enlargeBr=
this._.enterMode!=CKEDITOR.ENTER_BR);for(var e,g=a.document,d;e=f.getNextParagraph();)!e.isReadOnly()&&(f.activeFilter?f.activeFilter.check(this):1)&&(d=q(this,g,e),c(e,d));a.moveToBookmark(b)}function e(a){var b=a.createBookmark(1),f=a.createIterator();f.enforceRealBlocks=!0;f.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var e,g;e=f.getNextParagraph();)this.checkElementRemovable(e)&&(e.is("pre")?((g=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))&&e.copyAttributes(g),c(e,g)):u.call(this,e));a.moveToBookmark(b)}function c(a,c){var b=!c;b&&(c=a.getDocument().createElement("div"),a.copyAttributes(c));var e=c&&c.is("pre"),g=a.is("pre"),d=!e&&g;if(e&&!g){g=c;(d=a.getBogus())&&d.remove();d=a.getHtml();d=n(d,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");d=d.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");d=d.replace(/([ \t\n\r]+|&nbsp;)/g," ");d=d.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");
h.append(g);g.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e";g.copyAttributes(h.getFirst());g=h.getFirst().remove()}else g.setHtml(d);c=g}else d?c=v(b?[a.getHtml()]:f(a),c):a.moveChildren(c);c.replace(a);if(e){var b=c,k;(k=b.getPrevious(J))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(e=n(k.getHtml(),/\n$/,"")+"\n\n"+n(b.getHtml(),/^\n/,""),CKEDITOR.env.ie?b.$.outerHTML="\x3cpre\x3e"+e+"\x3c/pre\x3e":b.setHtml(e),k.remove())}else b&&p(c)}function f(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 f="",e="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,c,b){c&&(f=c);b&&(e=b);return""});return f+a.replace(c,b)+e}function v(a,c){var b;1<a.length&&(b=new CKEDITOR.dom.documentFragment(c.getDocument()));for(var f=0;f<a.length;f++){var e=a[f],e=e.replace(/(\r\n|\r)/g,"\n"),e=n(e,/^[ \t]*\n/,
""),e=n(e,/\n$/,""),e=n(e,/^[ \t]+|[ \t]+$/g,function(a,c){return 1==a.length?"\x26nbsp;":c?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),e=e.replace(/\n/g,"\x3cbr\x3e"),e=e.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(b){var g=c.clone();g.setHtml(e);b.append(g)}else c.setHtml(e)}return b||c}function u(a,c){var b=this._.definition,f=b.attributes,b=b.styles,e=r(this)[a.getName()],g=CKEDITOR.tools.isEmpty(f)&&
CKEDITOR.tools.isEmpty(b),d;for(d in f)if("class"!=d&&!this._.definition.fullMatch||a.getAttribute(d)==x(d,f[d]))c&&"data-"==d.slice(0,5)||(g=a.hasAttribute(d),a.removeAttribute(d));for(var h in b)this._.definition.fullMatch&&a.getStyle(h)!=x(h,b[h],!0)||(g=g||!!a.getStyle(h),a.removeStyle(h));t(a,e,C[a.getName()]);g&&(this._.definition.alwaysRemoveElement?p(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?p(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?
"p":"div"))}function w(a){for(var c=r(this),b=a.getElementsByTag(this.element),f,e=b.count();0<=--e;)f=b.getItem(e),f.isReadOnly()||u.call(this,f,!0);for(var g in c)if(g!=this.element)for(b=a.getElementsByTag(g),e=b.count()-1;0<=e;e--)f=b.getItem(e),f.isReadOnly()||t(f,c[g])}function t(a,c,b){if(c=c&&c.attributes)for(var f=0;f<c.length;f++){var e=c[f][0],g;if(g=a.getAttribute(e)){var d=c[f][1];(null===d||d.test&&d.test(g)||"string"==typeof d&&g==d)&&a.removeAttribute(e)}}b||p(a)}function p(a,c){if(!a.hasAttributes()||
c)if(CKEDITOR.dtd.$block[a.getName()]){var b=a.getPrevious(J),f=a.getNext(J);!b||b.type!=CKEDITOR.NODE_TEXT&&b.isBlockBoundary({br:1})||a.append("br",1);!f||f.type!=CKEDITOR.NODE_TEXT&&f.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else b=a.getFirst(),f=a.getLast(),a.remove(!0),b&&(b.type==CKEDITOR.NODE_ELEMENT&&b.mergeSiblings(),f&&!b.equals(f)&&f.type==CKEDITOR.NODE_ELEMENT&&f.mergeSiblings())}function q(a,c,b){var f;f=a.element;"*"==f&&(f="span");f=new CKEDITOR.dom.element(f,c);b&&b.copyAttributes(f);
f=y(f,a);c.getCustomData("doc_processing_style")&&f.hasAttribute("id")?f.removeAttribute("id"):c.setCustomData("doc_processing_style",1);return f}function y(a,c){var b=c._.definition,f=b.attributes,b=CKEDITOR.style.getStyleText(b);if(f)for(var e in f)a.setAttribute(e,f[e]);b&&a.setAttribute("style",b);return a}function D(a,c){for(var b in a)a[b]=a[b].replace(H,function(a,b){return c[b]})}function r(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 f=0;f<b.length;f++){var e=b[f],g,d;"string"==typeof e?g=e.toLowerCase():(g=e.element?e.element.toLowerCase():a.element,d=e.attributes);e=c[g]||(c[g]={});if(d){var e=e.attributes=e.attributes||[],h;for(h in d)e.push([h.toLowerCase(),d[h]])}}}return c}function x(a,c,b){var f=new CKEDITOR.dom.element("span");f[b?"setStyle":"setAttribute"](a,c);return f[b?"getStyle":"getAttribute"](a)}function E(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 f in a)if(!(f in c)||b(c[f],f)!=b(a[f],f)&&"inherit"!=a[f]&&"inherit"!=c[f])return!1;return!0}function z(a,c,b){var f=a.document,e=a.getRanges();c=c?this.removeFromRange:this.applyToRange;var g,d;if(a.isFake&&a.isInTable())for(g=[],d=0;d<e.length;d++)g.push(e[d].clone());for(var h=e.createIterator();d=h.getNextRange();)c.call(this,d,b);a.selectRanges(g||e);f.removeCustomData("doc_processing_style")}
var C={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},B={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},G=/\s*(?:;\s*|$)/,H=/#\((.+?)\)/g,I=CKEDITOR.dom.walker.bookmark(0,1),J=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),D(a.attributes,c),D(a.styles,c));b=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(C[b]?CKEDITOR.STYLE_BLOCK:B[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 z.call(this,a.getSelection());if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);z.call(this,a.getSelection(),0,a);this._.enterMode=c}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return z.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var c=this._.enterMode;c||(this._.enterMode=a.activeEnterMode);
z.call(this,a.getSelection(),1,a);this._.enterMode=c}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?k:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?g:this.type==CKEDITOR.STYLE_BLOCK?e:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.removeFromRange(a)},applyToObject:function(a){y(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,f=0,e;f<b.length;f++)if(e=b[f],this.type!=CKEDITOR.STYLE_INLINE||e!=a.block&&e!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var g=e.getName();if(!("string"==typeof this.element?g==this.element:g in this.element))continue}if(this.checkElementRemovable(e,!0,c))return!0}}return!1},checkApplicable:function(a,c,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 f=a.getName();if("string"==typeof this.element?f==this.element:f in this.element){if(!c&&!a.hasAttributes())return!0;if(f=b._AC)b=f;else{var f={},e=0,g=b.attributes;if(g)for(var d in g)e++,f[d]=g[d];if(d=CKEDITOR.style.getStyleText(b))f.style||e++,f.style=d;f._length=e;b=b._AC=f}if(b._length){for(var h in b)if("_length"!=
h)if(f=a.getAttribute(h)||"","style"==h?E(b[h],f):b[h]==f){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=r(this)[a.getName()]){var f;if(!(c=c.attributes))return!0;for(b=0;b<c.length;b++)if(f=c[b][0],f=a.getAttribute(f)){var e=c[b][1];if(null===e)return!0;if("string"==typeof e){if(f==e)return!0}else if(e.test(f))return!0}}return!1},buildPreview:function(a){var c=this._.definition,b=[],f=c.element;
"bdo"==f&&(f="span");var b=["\x3c",f],e=c.attributes;if(e)for(var g in e)b.push(" ",g,'\x3d"',e[g],'"');(e=CKEDITOR.style.getStyleText(c))&&b.push(' style\x3d"',e,'"');b.push("\x3e",a||c.name,"\x3c/",f,"\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||"",f="";b.length&&(b=b.replace(G,";"));for(var e in c){var g=c[e],d=(e+":"+g).replace(G,";");"inherit"==
g?f+=d:b+=d}b.length&&(b=CKEDITOR.tools.normalizeCssText(b,!0));return a._ST=b+f};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 O=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,F=CKEDITOR.POSITION_FOLLOWING|
CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,d){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,d,!0)},CKEDITOR.styleCommand.prototype.exec=function(a){a.focus();this.state==CKEDITOR.TRISTATE_OFF?a.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&a.removeStyle(this.style)},CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet"),CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet),
CKEDITOR.loadStylesSet=function(a,d,b){CKEDITOR.stylesSet.addExternal(a,d,"");CKEDITOR.stylesSet.load(a,b)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,d){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var d=0;d<b.length;d++){var l=b[d],m=l.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;l.fn.call(this,m)}}));b.push({style:a,fn:d})},applyStyle:function(a){a.apply(this)},
removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);else{var d=this,b=d.config.stylesCombo_stylesSet||d.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)d._.stylesDefinitions=b,a(b);else{b||(b="default");var b=b.split(":"),g=b[0];CKEDITOR.stylesSet.addExternal(g,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(g,function(b){d._.stylesDefinitions=b[g];a(d._.stylesDefinitions)})}}}}),
CKEDITOR.dom.comment=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),"use strict",function(){var a={},d={},b;for(b in CKEDITOR.dtd.$blockLimit)b in CKEDITOR.dtd.$list||(a[b]=1);for(b in CKEDITOR.dtd.$block)b in CKEDITOR.dtd.$blockLimit||
b in CKEDITOR.dtd.$empty||(d[b]=1);CKEDITOR.dom.elementPath=function(b,h){var l=null,m=null,k=[],e=b,c;h=h||b.getDocument().getBody();e||(e=h);do if(e.type==CKEDITOR.NODE_ELEMENT){k.push(e);if(!this.lastElement&&(this.lastElement=e,e.is(CKEDITOR.dtd.$object)||"false"==e.getAttribute("contenteditable")))continue;if(e.equals(h))break;if(!m&&(c=e.getName(),"true"==e.getAttribute("contenteditable")?m=e:!l&&d[c]&&(l=e),a[c])){if(c=!l&&"div"==c){a:{c=e.getChildren();for(var f=0,n=c.count();f<n;f++){var v=
c.getItem(f);if(v.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[v.getName()]){c=!0;break a}}c=!1}c=!c}c?l=e:m=e}}while(e=e.getParent());m||(m=h);this.block=l;this.blockLimit=m;this.root=h;this.elements=k}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var d=this.elements;a=a&&a.elements;if(!a||d.length!=a.length)return!1;for(var b=0;b<d.length;b++)if(!d[b].equals(a[b]))return!1;return!0},contains:function(a,d,b){var g=0,h;"string"==typeof a&&(h=function(b){return b.getName()==a});a instanceof
CKEDITOR.dom.element?h=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?h=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:"function"==typeof a?h=a:"object"==typeof a&&(h=function(b){return b.getName()in a});var l=this.elements,m=l.length;d&&(b?g+=1:--m);b&&(l=Array.prototype.slice.call(l,0),l.reverse());for(;g<m;g++)if(h(l[g]))return l[g];return null},isContextFor:function(a){var d;return a in CKEDITOR.dtd.$block?(d=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&
this.block||this.blockLimit,!!d.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createTextNode(a));this.$=a},CKEDITOR.dom.text.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype,{type:CKEDITOR.NODE_TEXT,getLength:function(){return this.$.nodeValue.length},getText:function(){return this.$.nodeValue},setText:function(a){this.$.nodeValue=a},split:function(a){var d=
this.$.parentNode,b=d.childNodes.length,g=this.getLength(),h=this.getDocument(),l=new CKEDITOR.dom.text(this.$.splitText(a),h);d.childNodes.length==b&&(a>=g?(l=h.createText(""),l.insertAfter(this)):(a=h.createText(""),a.insertAfter(l),a.remove()));return l},substring:function(a,d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}}),function(){function a(a,g,d){var l=a.serializable,m=g[d?"endContainer":"startContainer"],k=d?"endOffset":"startOffset",e=l?g.document.getById(a.startNode):
a.startNode;a=l?g.document.getById(a.endNode):a.endNode;m.equals(e.getPrevious())?(g.startOffset=g.startOffset-m.getLength()-a.getPrevious().getLength(),m=a.getNext()):m.equals(a.getPrevious())&&(g.startOffset-=m.getLength(),m=a.getNext());m.equals(e.getParent())&&g[k]++;m.equals(a.getParent())&&g[k]++;g[d?"endContainer":"startContainer"]=m;return g}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,
d)};var d={createIterator:function(){var a=this,g=CKEDITOR.dom.walker.bookmark(),d=[],l;return{getNextRange:function(m){l=void 0===l?0:l+1;var k=a[l];if(k&&1<a.length){if(!l)for(var e=a.length-1;0<=e;e--)d.unshift(a[e].createBookmark(!0));if(m)for(var c=0;a[l+c+1];){var f=k.document;m=0;e=f.getById(d[c].endNode);for(f=f.getById(d[c+1].startNode);;){e=e.getNextSourceNode(!1);if(f.equals(e))m=1;else if(g(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary())continue;break}if(!m)break;c++}for(k.moveToBookmark(d.shift());c--;)e=
a[++l],e.moveToBookmark(d.shift()),k.setEnd(e.endContainer,e.endOffset)}return k}}},createBookmarks:function(b){for(var g=[],d,l=0;l<this.length;l++){g.push(d=this[l].createBookmark(b,!0));for(var m=l+1;m<this.length;m++)this[m]=a(d,this[m]),this[m]=a(d,this[m],!0)}return g},createBookmarks2:function(a){for(var g=[],d=0;d<this.length;d++)g.push(this[d].createBookmark2(a));return g},moveToBookmarks:function(a){for(var g=0;g<this.length;g++)this[g].moveToBookmark(a[g])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||
"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function d(c){var b=CKEDITOR.skin["ua_"+c],e=CKEDITOR.env;if(b)for(var b=b.split(",").sort(function(a,c){return a>c?-1:1}),g=0,d;g<b.length;g++)if(d=b[g],e.ie&&(d.replace(/^ie/,"")==e.version||e.quirks&&"iequirks"==d)&&(d="ie"),e[d]){c+="_"+b[g];break}return CKEDITOR.getUrl(a()+c+".css")}function b(a,b){l[a]||(CKEDITOR.document.appendStyleSheet(d(a)),l[a]=1);b&&b()}function g(a){var b=a.getById(m);b||(b=a.getHead().append("style"),b.setAttribute("id",
m),b.setAttribute("type","text/css"));return b}function h(a,b,e){var g,d,h;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),d=0;d<b.length;d++)b[d]=b[d].split("{");for(var k=0;k<a.length;k++)if(CKEDITOR.env.webkit)for(d=0;d<b.length;d++){h=b[d][1];for(g=0;g<e.length;g++)h=h.replace(e[g][0],e[g][1]);a[k].$.sheet.addRule(b[d][0],h)}else{h=b;for(g=0;g<e.length;g++)h=h.replace(e[g][0],e[g][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var l={};CKEDITOR.skin=
{path:a,loadPart:function(c,f){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,f)}):b(c,f)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,e,g){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:e||0,bgsize:g||"16px"})},getIconStyle:function(a,b,e,g,d){var h;a&&(a=a.toLowerCase(),b&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=e||h&&h.path||"";g=g||h&&h.offset;d=d||h&&h.bgsize||
"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+g+"px;background-size:"+d+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=g(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,g="",d="";"function"==typeof c&&(g=c(this,"editor"),d=c(this,"panel"));a=[[e,a]];h([b],g,a);h(k,d,a)}).call(this,a)}});var m="cke_ui_color",
k=[],e=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=g(a);k.push(a);var c=b.getUiColor();c&&h([a],CKEDITOR.skin.chameleon(b,"panel"),[[e,c]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',
CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var d=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!d||d!=b)}catch(g){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;d<a.length;d++)CKEDITOR.editor.prototype.constructor.apply(a[d][0],
a[d][1]),CKEDITOR.add(a[d][0])}(),CKEDITOR.skin.name="moono",CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,b){for(var d=a.match(/[^#]./g),m=0;3>m;m++){var k=m,e;e=parseInt(d[m],16);e=("0"+(0>b?0|e*(1+b):0|e+(255-e)*b).toString(16)).slice(-2);d[k]=e}return"#"+d.join("")}}(),d=function(){var a=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");
return function(b,d){return a.output({from:b,to:d})}}(),b={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {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} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {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:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "),
panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
return function(g,h){var l=g.uiColor,l={id:"."+g.id,defaultBorder:a(l,-.1),defaultGradient:d(a(l,.9),l),lightGradient:d(a(l,1),a(l,.7)),mediumGradient:d(a(l,.8),a(l,.5)),ckeButtonOn:d(a(l,.6),a(l,.7)),ckeResizer:a(l,-.4),ckeToolbarSeparator:a(l,.5),ckeColorauto:a(l,.8),dialogBody:a(l,.7),dialogTabSelected:d("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(l,-.6),elementsPathBg:l,menubuttonIcon:a(l,.5),menubuttonIconHover:a(l,.3)};return b[h].output(l).replace(/\[/g,"{").replace(/\]/g,
"}")}}(),CKEDITOR.plugins.add("basicstyles",{init:function(a){var d=0,b=function(b,h,e,c){if(c){c=new CKEDITOR.style(c);var f=g[e];f.unshift(c);a.attachStyleStateChange(c,function(b){!a.readOnly&&a.getCommand(e).setState(b)});a.addCommand(e,new CKEDITOR.styleCommand(c,{contentForms:f}));a.ui.addButton&&a.ui.addButton(b,{label:h,command:e,toolbar:"basicstyles,"+(d+=10)})}},g={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==
a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},h=a.config,l=a.lang.basicstyles;b("Bold",l.bold,"bold",h.coreStyles_bold);b("Italic",l.italic,"italic",h.coreStyles_italic);b("Underline",l.underline,"underline",h.coreStyles_underline);b("Strike",l.strike,"strike",h.coreStyles_strike);b("Subscript",l.subscript,
"subscript",h.coreStyles_subscript);b("Superscript",l.superscript,"superscript",h.coreStyles_superscript);a.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},
CKEDITOR.config.coreStyles_superscript={element:"sup"},"use strict",CKEDITOR.plugins.add("notification",{init:function(a){function d(a){var g=new CKEDITOR.dom.element("div");g.setStyles({position:"fixed","margin-left":"-9999px"});g.setAttributes({"aria-live":"assertive","aria-atomic":"true"});g.setText(a);CKEDITOR.document.getBody().append(g);setTimeout(function(){g.remove()},100)}a._.notificationArea=new ka(a);a.showNotification=function(b,g,d){var l,m;"progress"==g?l=d:m=d;b=new CKEDITOR.plugins.notification(a,
{message:b,type:g,progress:l,duration:m});b.show();return b};a.on("key",function(b){if(27==b.data.keyCode){var g=a._.notificationArea.notifications;g.length&&(d(a.lang.notification.closed),g[g.length-1].hide(),b.cancel())}})}}),ja.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(a){var d=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:a})&&(d=!1);var b=this.element,g=b.findOne(".cke_notification_message"),
h=b.findOne(".cke_notification_progress"),l=a.type;b.removeAttribute("role");a.progress&&"progress"!=this.type&&(l="progress");l&&(b.removeClass(this._getClass()),b.removeAttribute("aria-label"),this.type=l,b.addClass(this._getClass()),b.setAttribute("aria-label",this.type),"progress"!=this.type||h?"progress"!=this.type&&h&&h.remove():(h=this._createProgressElement(),h.insertBefore(g)));void 0!==a.message&&(this.message=a.message,g.setHtml(this.message));void 0!==a.progress&&(this.progress=a.progress,
h&&h.setStyle("width",this._getPercentageProgress()));d&&a.important&&(b.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=a.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var a=this,d,b,g=this.editor.lang.common.close;d=new CKEDITOR.dom.element("div");d.addClass("cke_notification");
d.addClass(this._getClass());d.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&d.append(this._createProgressElement());b=new CKEDITOR.dom.element("p");b.addClass("cke_notification_message");b.setHtml(this.message);d.append(b);b=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+g+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');d.append(b);b.on("click",
function(){a.editor.focus();a.hide()});return d},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var a=new CKEDITOR.dom.element("span");a.addClass("cke_notification_progress");a.setStyle("width",this._getPercentageProgress());return a},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var a=this,d;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);
if("number"==typeof this.duration)d=this.duration;else if("info"==this.type||"success"==this.type)d="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;d&&(a._hideTimeoutId=setTimeout(function(){a.hide()},d))}},ka.prototype={add:function(a){this.notifications.push(a);this.element.append(a.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(a){var d=CKEDITOR.tools.indexOf(this.notifications,
a);0>d||(this.notifications.splice(d,1),a.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var a=this.editor,d=a.config,b=new CKEDITOR.dom.element("div");b.addClass("cke_notifications_area");b.setAttribute("id","cke_notifications_area_"+a.name);b.setStyle("z-index",d.baseFloatZIndex-2);return b},_attachListeners:function(){var a=CKEDITOR.document.getWindow(),d=this.editor;a.on("scroll",this._uiBuffer.input);a.on("resize",this._uiBuffer.input);
d.on("change",this._changeBuffer.input);d.on("floatingSpaceLayout",this._layout,this,null,20);d.on("blur",this._layout,this,null,20)},_removeListeners:function(){var a=CKEDITOR.document.getWindow(),d=this.editor;a.removeListener("scroll",this._uiBuffer.input);a.removeListener("resize",this._uiBuffer.input);d.removeListener("change",this._changeBuffer.input);d.removeListener("floatingSpaceLayout",this._layout);d.removeListener("blur",this._layout)},_layout:function(){function a(){d.setStyle("left",
t(p+g.width-c-f))}var d=this.element,b=this.editor,g=b.ui.contentsElement.getClientRect(),h=b.ui.contentsElement.getDocumentPosition(),l,m,k=d.getClientRect(),e,c=this._notificationWidth,f=this._notificationMargin;e=CKEDITOR.document.getWindow();var n=e.getScrollPosition(),v=e.getViewPaneSize(),u=CKEDITOR.document.getBody(),w=u.getDocumentPosition(),t=CKEDITOR.tools.cssLength;c&&f||(e=this.element.getChild(0),c=this._notificationWidth=e.getClientRect().width,f=this._notificationMargin=parseInt(e.getComputedStyle("margin-left"),
10)+parseInt(e.getComputedStyle("margin-right"),10));b.toolbar&&(l=b.ui.space("top"),m=l.getClientRect());l&&l.isVisible()&&m.bottom>g.top&&m.bottom<g.bottom-k.height?d.setStyles({position:"fixed",top:t(m.bottom)}):0<g.top?d.setStyles({position:"absolute",top:t(h.y)}):h.y+g.height-k.height>n.y?d.setStyles({position:"fixed",top:0}):d.setStyles({position:"absolute",top:t(h.y+g.height-k.height)});var p="fixed"==d.getStyle("position")?g.left:"static"!=u.getComputedStyle("position")?h.x-w.x:h.x;g.width<
c+f?h.x+c+f>n.x+v.width?a():d.setStyle("left",t(p)):h.x+c+f>n.x+v.width?d.setStyle("left",t(p)):h.x+g.width/2+c/2+f>n.x+v.width?d.setStyle("left",t(p-h.x+n.x+v.width-c-f)):0>g.left+g.width-c-f?a():0>g.left+g.width/2-c/2?d.setStyle("left",t(p-h.x+n.x)):d.setStyle("left",t(p+g.width/2-c/2-f/2))}},CKEDITOR.plugins.notification=ja,function(){var a='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+
' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=a+(' 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}"'),a=a+'\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',
d=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),b=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};
CKEDITOR.ui.button.prototype={render:function(a,h){function l(){var b=a.mode;b&&(b=this.modes[b]?void 0!==q[b]?q[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var m=CKEDITOR.env,k=this._.id=CKEDITOR.tools.getNextId(),e="",c=this.command,f,n,v;this._.editor=a;var u={id:k,button:this,editor:a,focus:function(){CKEDITOR.document.getById(k).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},
w=CKEDITOR.tools.addFunction(function(a){if(u.onkey)return a=new CKEDITOR.dom.event(a),!1!==u.onkey(u,a.getKeystroke())}),t=CKEDITOR.tools.addFunction(function(a){var b;u.onfocus&&(b=!1!==u.onfocus(u,new CKEDITOR.dom.event(a)));return b}),p=0;u.clickFn=f=CKEDITOR.tools.addFunction(function(){p&&(a.unlockSelection(1),p=0);u.execute();m.iOS&&a.focus()});if(this.modes){var q={};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(q[a.mode]=this._.state)},this);a.on("activeFilterChange",
l,this);a.on("mode",l,this);!this.readOnly&&a.on("readOnly",l,this)}else c&&(c=a.getCommand(c))&&(c.on("state",function(){this.setState(c.state)},this),e+=c.state==CKEDITOR.TRISTATE_ON?"on":c.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),f=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");f.setAttribute("style",CKEDITOR.skin.getIconStyle(y,
"rtl"==b,this.icon,this.iconOffset))},this);c?(n=a.getCommandKeystroke(c))&&(v=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,n)):e+="off";var y=n=this.name||this.command;this.icon&&!/\./.test(this.icon)&&(y=this.icon,this.icon=null);e={id:k,name:n,iconName:y,label:this.label,cls:this.className||"",state:e,ariaDisabled:"disabled"==e?"true":"false",title:this.title+(v?" ("+v.display+")":""),ariaShortcut:v?a.lang.common.keyboardShortcut+" "+v.aria:"",titleJs:m.gecko&&!m.hc?"":(this.title||
"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:w,focusFn:t,clickFn:f,style:CKEDITOR.skin.getIconStyle(y,"rtl"==a.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow?d.output():""};b.output(e,h);if(this.onRender)this.onRender();return u},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"),a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled"),
this.hasArrow?(a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(a)):a==CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=
b}};CKEDITOR.ui.prototype.addButton=function(a,b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function a(a){function b(){for(var c=g(),f=CKEDITOR.tools.clone(a.config.toolbarGroups)||d(a),e=0;e<f.length;e++){var l=f[e];if("/"!=l){"string"==typeof l&&(l=f[e]={name:l});var t,p=l.groups;if(p)for(var q=0;q<p.length;q++)t=p[q],(t=c[t])&&k(l,t);(t=c[l.name])&&k(l,t)}}return f}function g(){var b={},c,f,e;for(c in a.ui.items)f=a.ui.items[c],e=f.toolbar||"others",e=e.split(","),f=e[0],e=parseInt(e[1]||
-1,10),b[f]||(b[f]=[]),b[f].push({name:c,order:e});for(f in b)b[f]=b[f].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?1:a.order<b.order?-1:1});return b}function k(b,f){if(f.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var e;e=f.shift();)e="string"==typeof e?e:e.name,c&&-1!=CKEDITOR.tools.indexOf(c,e)||(e=a.ui.create(e))&&a.addFeature(e)&&b.items.push(e)}}function e(a){var b=[],c,f,e;for(c=0;c<a.length;++c)f=a[c],e={},"/"==f?b.push(f):CKEDITOR.tools.isArray(f)?
(k(e,CKEDITOR.tools.clone(f)),b.push(e)):f.items&&(k(e,CKEDITOR.tools.clone(f.items)),e.name=f.name,b.push(e));return b}var c=a.config.removeButtons,c=c&&c.split(","),f=a.config.toolbar;"string"==typeof f&&(f=a.config["toolbar_"+f]);return a.toolbar=f?e(f):b()}function d(a){return a._.toolbarGroups||(a._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",
{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"},"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var b=function(){this.toolbars=[];this.focusCommandExecuted=!1};b.prototype.focus=function(){for(var a=0,b;b=this.toolbars[a++];)for(var d=0,g;g=b.items[d++];)if(g.focus){g.focus();return}};var g={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(a){a.toolbox&&(a.toolbox.focusCommandExecuted=
!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){a.toolbox.focus()},100):a.toolbox.focus())}};CKEDITOR.plugins.add("toolbar",{requires:"button",init:function(d){var l,m=function(a,b){var c,f="rtl"==d.lang.dir,g=d.config.toolbarGroupCycling,v=f?37:39,f=f?39:37,g=void 0===g||g;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!c||!c.items.length;)if(c=9==b?(c?c.next:a.toolbar.next)||d.toolbox.toolbars[0]:(c?c.previous:a.toolbar.previous)||d.toolbox.toolbars[d.toolbox.toolbars.length-1],c.items.length)for(a=
c.items[l?c.items.length-1:0];a&&!a.focus;)(a=l?a.previous:a.next)||(c=0);a&&a.focus();return!1;case v:c=a;do c=c.next,!c&&g&&(c=a.toolbar.items[0]);while(c&&!c.focus);c?c.focus():m(a,9);return!1;case 40:return a.button&&a.button.hasArrow?a.execute():m(a,40==b?v:f),!1;case f:case 38:c=a;do c=c.previous,!c&&g&&(c=a.toolbar.items[a.toolbar.items.length-1]);while(c&&!c.focus);c?c.focus():(l=1,m(a,CKEDITOR.SHIFT+9),l=0);return!1;case 27:return d.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};
d.on("uiSpace",function(g){if(g.data.space==d.config.toolbarLocation){g.removeListener();d.toolbox=new b;var e=CKEDITOR.tools.getNextId(),c=['\x3cspan id\x3d"',e,'" 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"',e,'" onmousedown\x3d"return false;"\x3e'],e=!1!==d.config.toolbarStartupExpanded,f,n;d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&
c.push('\x3cspan class\x3d"cke_toolbox_main"'+(e?"\x3e":' style\x3d"display:none"\x3e'));for(var l=d.toolbox.toolbars,u=a(d),w=u.length,t=0;t<w;t++){var p,q=0,y,D=u[t],r="/"!==D&&("/"===u[t+1]||t==w-1),x;if(D)if(f&&(c.push("\x3c/span\x3e"),n=f=0),"/"===D)c.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{x=D.items||D;for(var E=0;E<x.length;E++){var z=x[E],C;if(z){var B=function(a){a=a.render(d,c);G=q.items.push(a)-1;0<G&&(a.previous=q.items[G-1],a.previous.next=a);a.toolbar=q;a.onkey=
m;a.onfocus=function(){d.toolbox.focusCommandExecuted||d.focus()}};if(z.type==CKEDITOR.UI_SEPARATOR)n=f&&z;else{C=!1!==z.canGroup;if(!q){p=CKEDITOR.tools.getNextId();q={id:p,items:[]};y=D.name&&(d.lang.toolbar.toolbarGroups[D.name]||D.name);c.push('\x3cspan id\x3d"',p,'" class\x3d"cke_toolbar'+(r?' cke_toolbar_last"':'"'),y?' aria-labelledby\x3d"'+p+'_label"':"",' role\x3d"toolbar"\x3e');y&&c.push('\x3cspan id\x3d"',p,'_label" class\x3d"cke_voice_label"\x3e',y,"\x3c/span\x3e");c.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');
var G=l.push(q)-1;0<G&&(q.previous=l[G-1],q.previous.next=q)}C?f||(c.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),f=1):f&&(c.push("\x3c/span\x3e"),f=0);n&&(B(n),n=0);B(z)}}}f&&(c.push("\x3c/span\x3e"),n=f=0);q&&c.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}d.config.toolbarCanCollapse&&c.push("\x3c/span\x3e");if(d.config.toolbarCanCollapse&&d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var H=CKEDITOR.tools.addFunction(function(){d.execCommand("toolbarCollapse")});
d.on("destroy",function(){CKEDITOR.tools.removeFunction(H)});d.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),f=a.ui.space("contents"),e=c.getParent(),d=parseInt(f.$.style.height,10),g=e.$.offsetHeight,k=b.hasClass("cke_toolbox_collapser_min");k?(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(k?"▲":"◀");f.setStyle("height",d-(e.$.offsetHeight-g)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:f.$.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"'+(e?d.lang.toolbar.toolbarCollapse:d.lang.toolbar.toolbarExpand)+'" id\x3d"'+d.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
e||c.push(" cke_toolbox_collapser_min");c.push('" onclick\x3d"CKEDITOR.tools.callFunction('+H+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}c.push("\x3c/span\x3e");g.data.html+=c.join("")}});d.on("destroy",function(){if(this.toolbox){var a,b=0,c,f,d;for(a=this.toolbox.toolbars;b<a.length;b++)for(f=a[b].items,c=0;c<f.length;c++)d=f[c],d.clickFn&&CKEDITOR.tools.removeFunction(d.clickFn),d.keyDownFn&&CKEDITOR.tools.removeFunction(d.keyDownFn)}});d.on("uiReady",function(){var a=
d.ui.space("toolbox");a&&d.focusManager.add(a,1)});d.addCommand("toolbarFocus",g);d.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");d.ui.add("-",CKEDITOR.UI_SEPARATOR,{});d.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(a,b){b.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(a,b,g){var k=d(this.editor),e=0===b,c={name:a};if(g){if(g=CKEDITOR.tools.search(k,function(a){return a.name==
g})){!g.groups&&(g.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(g.groups,b),0<=b)){g.groups.splice(b+1,0,a);return}e?g.groups.splice(0,0,a):g.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(k,function(a){return a.name==b}));e?k.splice(0,0,a):"number"==typeof b?k.splice(b+1,0,c):k.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top","use strict",function(){function a(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 d(b){function c(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var e=function(a){b.readOnly&&"cut"==a.name||C.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on("copy",e);a.on("cut",e);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(C.mainPasteEvent,function(a){"beforepaste"==
C.mainPasteEvent&&B||x(a)});"beforepaste"==C.mainPasteEvent&&(a.on("paste",function(a){G||(g(),a.data.preventDefault(),x(a),h("paste"))}),a.on("contextmenu",k,null,null,0),a.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||k()},null,null,0));a.on("beforecut",function(){!B&&l(b)});var d;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),"mouseup",function(){d=setTimeout(function(){E()},0)});b.on("destroy",function(){clearTimeout(d)});a.on("keyup",E)}function e(a){return{type:a,
canUndo:"cut"==a,startDisabled:!0,fakeKeystroke:"cut"==a?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&l();var a;var c=this.type;if(CKEDITOR.env.ie)a=h(c);else try{a=b.document.$.execCommand(c,!1,null)}catch(e){a=!1}a||b.showNotification(b.lang.clipboard[this.type+"Error"]);return a}}}function d(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,c){function f(c,g){g="undefined"!==typeof g?g:!0;c?(c.method="paste",c.dataTransfer||(c.dataTransfer=C.initPasteDataTransfer()),
a(b,c,g)):d&&b.showNotification(h,"info",b.config.clipboard_notificationDuration);b.fire("afterCommandExec",{name:"paste",command:e,returnValue:!!c})}c="undefined"!==typeof c&&null!==c?c:{};var e=this,d="undefined"!==typeof c.notification?c.notification:!0,g=c.type,k=CKEDITOR.tools.keystrokeToString(b.lang.common.keyboard,b.getCommandKeystroke(this)),h="string"===typeof d?d:b.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+k.aria+'"\x3e'+k.display+"\x3c/kbd\x3e"),k="string"===
typeof c?c:c.dataValue;g?b._.nextPasteType=g:delete b._.nextPasteType;"string"===typeof k?f({dataValue:k}):b.getClipboardData(f)}}}function g(){G=1;setTimeout(function(){G=0},100)}function k(){B=1;setTimeout(function(){B=0},10)}function h(a){var c=b.document,e=c.getBody(),d=!1,g=function(){d=!0};e.on(a,g);7<CKEDITOR.env.version?c.$.execCommand(a):c.$.selection.createRange().execCommand(a);e.removeListener(a,g);return d}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),
c,e,d;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(e=a.getRanges()[0],d=b.document.createText(""),d.insertBefore(c),e.setStartBefore(d),e.setEndAfter(c),a.selectRanges([e]),setTimeout(function(){c.getParent()&&(d.remove(),a.selectElement(c))},0))}}function m(a,c){var e=b.document,d=b.editable(),g=function(a){a.cancel()},k;if(!e.getById("cke_pastebin")){var h=b.getSelection(),n=h.createBookmarks();CKEDITOR.env.ie&&h.root.fire("selectionchange");var l=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&
!d.is("body")||CKEDITOR.env.ie?"div":"body",e);l.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var p=0,e=e.getWindow();CKEDITOR.env.webkit?(d.append(l),l.addClass("cke_editable"),d.is("body")||(p="static"!=d.getComputedStyle("position")?d:CKEDITOR.dom.element.get(d.$.offsetParent),p=p.getDocumentPosition().y)):d.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(l);l.setStyles({position:"absolute",top:e.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,e.getViewPaneSize().height-
20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&l.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(p=l.getParent().isReadOnly())?(l.setOpacity(0),l.setAttribute("contenteditable",!0)):l.setStyle("ltr"==b.config.contentsLangDirection?"left":"right","-10000px");b.on("selectionChange",g,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)k=d.once("blur",g,null,null,-100);p&&l.focus();p=new CKEDITOR.dom.range(l);p.selectNodeContents(l);var v=p.select();CKEDITOR.env.ie&&
(k=d.once("blur",function(){b.lockSelection(v)}));var t=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=t);k&&k.removeListener();CKEDITOR.env.ie&&d.focus();h.selectBookmarks(n);l.remove();var a;CKEDITOR.env.webkit&&(a=l.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&(l=a);b.removeListener("selectionChange",g);c(l.getHtml())},0)}}function D(){if("paste"==C.mainPasteEvent)return b.fire("beforePaste",{type:"auto",
method:"paste"}),!1;b.focus();g();var a=b.focusManager;a.lock();if(b.editable().fire(C.mainPasteEvent)&&!h("paste"))return a.unlock(),!1;a.unlock();return!0}function r(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=b.editable();g();"paste"==C.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function x(c){var e={type:"auto",method:"paste",
dataTransfer:C.initPasteDataTransfer(c)};e.dataTransfer.cacheData();var d=!1!==b.fire("beforePaste",e);d&&C.canClipboardApiBeTrusted(e.dataTransfer,b)?(c.data.preventDefault(),setTimeout(function(){a(b,e)},0)):m(c,function(c){e.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&a(b,e)})}function E(){if("wysiwyg"==b.mode){var a=z("paste");b.getCommand("cut").setState(z("cut"));b.getCommand("copy").setState(z("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function z(a){if(H&&
a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var c=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,B=0,G=0,H=0;(function(){b.on("key",r);b.on("contentDom",c);b.on("selectionChange",function(a){H=a.data.selection.getRanges()[0].checkReadOnly();E()});b.contextMenu&&b.contextMenu.addListener(function(a,b){H=b.getRanges()[0].checkReadOnly();
return{cut:z("cut"),copy:z("copy"),paste:z("paste")}})})();(function(){function a(c,e,d,g,k){var h=b.lang.clipboard[e];b.addCommand(e,d);b.ui.addButton&&b.ui.addButton(c,{label:h,command:e,toolbar:"clipboard,"+g});b.addMenuItems&&b.addMenuItem(e,{label:h,command:e,group:"clipboard",order:k})}a("Cut","cut",e("cut"),10,1);a("Copy","copy",e("copy"),20,4);a("Paste","paste",d(),30,8)})();b.getClipboardData=function(a,c){function e(a){a.removeListener();a.cancel();c(a.data)}c||(c=a,a=null);b.on("paste",
e,null,null,0);!1===D()&&(b.removeListener("paste",e),c(null))}}function b(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 g(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",
~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/\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 h(){function a(){var b={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=c&&(b[c]=1);return b}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 e=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(e);return e.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 k(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function e(b){var c=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function e(c,d,g){d.select();a(b,{dataTransfer:g,method:"drop"},1);g.sourceEditor.fire("saveSnapshot");g.sourceEditor.editable().extractHtmlFromRange(c);g.sourceEditor.getSelection().selectRanges([c]);g.sourceEditor.fire("saveSnapshot")}
function d(e,g){e.select();a(b,{dataTransfer:g,method:"drop"},1);c.resetDragDataTransfer()}function g(a,c,e){var d={$:a.data.$,target:a.data.getTarget()};c&&(d.dragRange=c);e&&(d.dropRange=e);!1===b.fire(a.name,d)&&a.data.preventDefault()}function k(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var h=b.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(b),m=b.ui.space("top"),D=b.ui.space("bottom");c.preventDefaultDropOnElement(m);c.preventDefaultDropOnElement(D);
h.attachListener(l,"dragstart",g);h.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);h.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);h.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=a?k(a.startContainer):null,c.dragEndContainerChildCount=a?k(a.endContainer):null)},null,null,100);h.attachListener(l,"dragend",g);h.attachListener(b,"dragend",
c.initDragDataTransfer,c,null,1);h.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);h.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});h.attachListener(l,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var e=a.data.getTarget();
if(!e.isReadOnly()||e.type==CKEDITOR.NODE_ELEMENT&&e.is("html")){var e=c.getRangeAtDropPosition(a,b),d=c.dragRange;e&&g(a,d,e)}}},null,null,9999);h.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);h.attachListener(b,"drop",function(a){if(a=a.data){var g=a.dropRange,h=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(h,g,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?e(h,g,k):d(g,k)}},null,null,9999)})}
CKEDITOR.plugins.add("clipboard",{requires:"notification,toolbar",init:function(a){var c,k=h();a.config.forcePasteAsPlainText?c="plain-text":a.config.pasteFilter?c=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(c="semantic-content");a.pasteFilter=k.get(c);d(a);e(a);if(CKEDITOR.env.gecko){var m=["image/png","image/jpeg","image/gif"],w;a.on("paste",function(b){var c=b.data,e=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&e&&1==e.getFilesCount()&&w!=e.id&&(e=e.getFile(0),-1!=
CKEDITOR.tools.indexOf(m,e.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(e);w=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,e=c.getData("text/html");if(e)b.data.dataValue=e,b.data.type="html";else if(e=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(e),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 e,f,d=new CKEDITOR.dom.element("div");for(d.setHtml(b);1==d.getChildCount()&&(e=d.getFirst())&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasClass("cke_editable")||e.hasClass("cke_contents"));)d=f=e;
f&&(b=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,e){return e.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+e):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,e){return e in c?(a.data.endsWithEOL=1,"\x3c/"+e+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(c){c=c.data;var e=a._.nextPasteType||c.type,d=c.dataValue,h,n=a.config.clipboard_defaultContentType||
"html",m=c.dataTransfer.getTransferType(a);h="html"==e||"html"==c.preSniffing?"html":b(d);delete a._.nextPasteType;"htmlifiedtext"==h&&(d=g(a.config,d));"text"==e&&"html"==h?d=l(a,d,k.get("plain-text")):m==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!c.dontFilter&&(d=l(a,d,a.pasteFilter));c.startsWithEOL&&(d='\x3cbr data-cke-eol\x3d"1"\x3e'+d);c.endsWithEOL&&(d+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==h||"html"==n?"html":"text");c.type=e;c.dataValue=d;delete c.preSniffing;delete c.startsWithEOL;
delete c.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)}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",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?!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,e){function d(a,c,e){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&e!=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&&(e=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,e),b.collapse(!0)),!0}var g=b.startContainer;"number"==typeof e&&"number"==typeof c&&g.type==CKEDITOR.NODE_ELEMENT&&(d(a.startContainer,g,c)||d(a.endContainer,g,e))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,e=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=e||a.startContainer.getParent().equals(c)&&
a.startContainer.getIndex()<e||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<e?!0:!1},internalDrop:function(b,c,e,d){var g=CKEDITOR.plugins.clipboard,h=d.editable(),k,l;d.fire("saveSnapshot");d.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,g.dragStartContainerChildCount,g.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(b,c))||(k=b.createBookmark(!1));g=c.clone().createBookmark(!1);l&&(k=b.createBookmark(!1));
b=k.startNode;c=k.endNode;l=g.startNode;c&&b.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(b);b=d.createRange();b.moveToBookmark(k);h.extractHtmlFromRange(b,1);c=d.createRange();c.moveToBookmark(g);a(d,{dataTransfer:e,method:"drop",range:c},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,e=c.clientX,d=c.clientY,g=b.getSelection(!0).getRanges()[0],k=b.createRange();if(a.data.testRange)return a.data.testRange;
if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(e,d))c=b.document.$.caretRangeFromPoint(e,d),k.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),k.collapse(!0);else if(c.rangeParent)k.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),k.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&g&&b.editable().hasFocus)return g;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var h=!1,l=0;20>l&&!h;l++){if(!h)try{c.moveToPoint(e,
d-l),h=!0}catch(m){}if(!h)try{c.moveToPoint(e,d+l),h=!0}catch(r){}}if(h){var x="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+x+'"\x3e​\x3c/span\x3e');var E=b.document.getById(x);k.moveToPosition(E,CKEDITOR.POSITION_BEFORE_START);E.remove()}else{var z=b.document.$.elementFromPoint(e,d),C=new CKEDITOR.dom.element(z),B;if(C.equals(b.editable())||"html"==C.getName())return g&&g.startContainer&&!g.startContainer.equals(b.editable())?g:null;B=C.getClientRect();e<B.left?k.setStartAt(C,
CKEDITOR.POSITION_AFTER_START):k.setStartAt(C,CKEDITOR.POSITION_BEFORE_END);k.collapse(!0)}}catch(G){return null}}else return null}return k},initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,e=new this.dataTransfer(c,b);c?this.dragData&&e.id==this.dragData.id?e=this.dragData:this.dragData=e:this.dragData?e=this.dragData:this.dragData=e;a.data.dataTransfer=e},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&
a.data&&a.data.$){var c=new this.dataTransfer(a.data.$.clipboardData,b);this.copyCutData&&c.id==this.copyCutData.id?(c=this.copyCutData,c.$=a.data.$.clipboardData):this.copyCutData=c;return c}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",k)}};var 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:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(c);this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=c)try{this.$.setData(c,this.id)}catch(e){}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=this._.data[a],e;if(void 0===c||null===c||""===c)try{c=this.$.getData(a)}catch(d){}if(void 0===c||null===c||""===c)c="";"text/html"!=a||b?"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==
c.substring(0,7)&&(c=""):(c=c.replace(this._.metaRegExp,""),(e=this._.bodyRegExp.exec(c))&&e.length&&(c=e[1],c=c.replace(this._.fragmentRegExp,"")));"string"===typeof c&&(e=c.indexOf("\x3c/html\x3e"),c=-1!==e?c.substring(0,e+7):c);return c},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==c&&"Text"==a&&(this.id=b);try{this.$.setData(a,b)}catch(e){}}},getTransferType:function(a){return this.sourceEditor?
this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var e=b.getData(c,!0);e&&(b._.data[c]=e)}if(this.$){var b=this,c,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");e=this._getImageFromClipboard();if(this.$&&this.$.files||e){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&&e&&this._.files.push(e)}}},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;
for(b in this._.data)a[b]=1;if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var e=0;e<this.$.types.length;e++)a[this.$.types[e]]=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){}}}}(),CKEDITOR.config.clipboard_notificationDuration=1E4,CKEDITOR.plugins.add("panelbutton",
{requires:"button",onLoad:function(){function a(a){var b=this._;b.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(a),b.on?b.panel.hide():b.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(d){var b=d.panel||{};delete d.panel;this.base(d);this.document=b.parent&&b.parent.getDocument()||CKEDITOR.document;b.block={attributes:b.attributes};this.hasArrow=b.toolbarRelated=!0;this.click=a;this._={panelDefinition:b}},
statics:{handler:{create:function(a){return new CKEDITOR.ui.panelButton(a)}}},proto:{createPanel:function(a){var b=this._;if(!b.panel){var g=this._.panelDefinition,h=this._.panelDefinition.block,l=g.parent||CKEDITOR.document.getBody(),m=this._.panel=new CKEDITOR.ui.floatPanel(a,l,g),g=m.addBlock(b.id,h),k=this;m.onShow=function(){k.className&&this.element.addClass(k.className+"_panel");k.setState(CKEDITOR.TRISTATE_ON);b.on=1;k.editorFocus&&a.focus();if(k.onOpen)k.onOpen()};m.onHide=function(e){k.className&&
this.element.getFirst().removeClass(k.className+"_panel");k.setState(k.modes&&k.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b.on=0;if(!e&&k.onClose)k.onClose()};m.onEscape=function(){m.hide(1);k.document.getById(b.id).focus()};if(this.onBlock)this.onBlock(m,g);g.onHide=function(){b.on=0;k.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",function(){CKEDITOR.plugins.add("panel",
{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(a,b){b&&CKEDITOR.tools.extend(this,b);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=a;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(a){return new CKEDITOR.ui.panel(a)}};var a=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'),
d=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'),b=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(g,
h){this.getHolderElement=function(){var a=this._.holder;if(!a){if(this.isFramed){var a=this.document.getById(this.id+"_frame"),e=a.getParent(),a=a.getFrameDocument();CKEDITOR.env.iOS&&e.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});e=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()},this));a.write(b.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+
e+");"},l)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),e=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(b)?a.data.preventDefault():(27==b||b==("rtl"==e?39:37))&&this.onEscape&&!1===this.onEscape(b)&&a.data.preventDefault()},this);a=a.getBody();a.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(e)}else a=this.document.getById(this.id);this._.holder=a}return a};var l={editorId:g.id,id:this.id,langCode:g.langCode,
dir:g.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":g.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=d.output({id:this.id+"_frame",src:m})}m=a.output(l);h&&h.push(m);return m},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),
b);this._.currentBlock||this.showBlock(a);return b},getBlock:function(a){return this._.blocks[a]},showBlock:function(a){a=this._.blocks[a];var b=this._.currentBlock,d=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",d);a._.focusIndex=-1;this._.onKeyDown=a.onKeyDown&&CKEDITOR.tools.bind(a.onKeyDown,a);a.show();return a},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=
CKEDITOR.tools.createClass({$:function(a,b){this.element=a.append(a.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));b&&CKEDITOR.tools.extend(this,b);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title||this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(a){-1!=a&&(a=this.element.getElementsByTag("a").getItem(this._.focusIndex=
a),CKEDITOR.env.webkit&&a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(a))},markFirstDisplayed:function(a){for(var b=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"none"==a.getStyle("display")},d=this._.getItems(),m,k,e=d.count()-1;0<=e;e--)if(m=d.getItem(e),m.getAscendant(b)||(k=m,this._.focusIndex=e),"true"==m.getAttribute("aria-selected")){k=m;this._.focusIndex=e;break}k&&(a&&a(),CKEDITOR.env.webkit&&k.getDocument().getWindow().focus(),k.focus(),this.onMark&&this.onMark(k))},
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(a,b){var d=this.keys[a];switch(d){case "next":for(var m=this._.focusIndex,d=this.element.getElementsByTag("a"),k;k=d.getItem(++m);)if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=m;k.focus();break}return k||b?!1:(this._.focusIndex=-1,this.onKeyDown(a,
1));case "prev":m=this._.focusIndex;for(d=this.element.getElementsByTag("a");0<m&&(k=d.getItem(--m));){if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=m;k.focus();break}k=null}return k||b?!1:(this._.focusIndex=d.count(),this.onKeyDown(a,1));case "click":case "mouseup":return m=this._.focusIndex,(k=0<=m&&this.element.getElementsByTag("a").getItem(m))&&(k.$[d]?k.$[d]():k.$["on"+d]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",{requires:"panel"}),function(){function a(a,
g,h,l,m){m=CKEDITOR.tools.genKey(g.getUniqueId(),h.getUniqueId(),a.lang.dir,a.uiColor||"",l.css||"",m||"");var k=d[m];k||(k=d[m]=new CKEDITOR.ui.panel(g,l),k.element=h.append(CKEDITOR.dom.element.createFromHtml(k.render(a),g)),k.element.setStyles({display:"none",position:"absolute"}));return k}var d={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(b,d,h,l){function m(){f.hide()}h.forceIFrame=1;h.toolbarRelated&&b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(d=CKEDITOR.document.getById("cke_"+
b.name));var k=d.getDocument();l=a(b,k,d,h,l||0);var e=l.element,c=e.getFirst(),f=this;e.disableContextMenu();this.element=e;this._={editor:b,panel:l,parentElement:d,definition:h,document:k,iframe:c,children:[],dir:b.lang.dir,showBlockParams:null};b.on("mode",m);b.on("resize",m);k.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,d){return this._.panel.addBlock(a,d)},addListBlock:function(a,d){return this._.panel.addListBlock(a,d)},getBlock:function(a){return this._.panel.getBlock(a)},
showBlock:function(a,d,h,l,m,k){var e=this._.panel,c=e.showBlock(a);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var f=this._.editor.editable();this._.returnFocus=f.hasFocus?f:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);this._.hideTimeout=0;var n=this.element,f=this._.iframe,f=CKEDITOR.env.ie&&!CKEDITOR.env.edge?f:new CKEDITOR.dom.window(f.$.contentWindow),v=n.getDocument(),u=this._.parentElement.getPositionedAncestor(),w=d.getDocumentPosition(v),v=u?u.getDocumentPosition(v):
{x:0,y:0},t="rtl"==this._.dir,p=w.x+(l||0)-v.x,q=w.y+(m||0)-v.y;!t||1!=h&&4!=h?t||2!=h&&3!=h||(p+=d.$.offsetWidth-1):p+=d.$.offsetWidth;if(3==h||4==h)q+=d.$.offsetHeight-1;this._.panel._.offsetParentId=d.getId();n.setStyles({top:q+"px",left:0,display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(f);this._.blurSet||(CKEDITOR.event.useCapture=!0,f.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&
this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),f.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(f.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),f.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);e.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 b=c.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?c.element:b.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetWidth||0)-(a.$.clientWidth||0)+3);a.setStyle("width",b+10+"px");b=c.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||
0)+3);a.setStyle("height",b+"px");e._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");t&&(p-=n.$.offsetWidth);n.setStyle("left",p+"px");var b=e.element.getWindow(),a=n.$.getBoundingClientRect(),b=b.getViewPaneSize(),f=a.width||a.right-a.left,d=a.height||a.bottom-a.top,g=t?a.right:b.width-a.left,h=t?b.width-a.right:a.left;t?g<f&&(p=h>f?p+f:b.width>f?p-a.left:p-a.right+b.width):g<f&&(p=h>f?p-f:b.width>f?p-a.right+b.width:p-a.left);f=a.top;b.height-
a.top<d&&(q=f>d?q-d:b.height>d?q-a.bottom+b.height:q-a.top);CKEDITOR.env.ie&&(b=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==b.getName()&&(b=b.getDocument().getBody()),"rtl"==b.getComputedStyle("direction")&&(p=CKEDITOR.env.ie8Compat?p-2*n.getDocument().getDocumentElement().$.scrollLeft:p-(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:q+"px",left:p+"px"});n.setOpacity(1);
k&&k()},this);e.isLoaded?a():e.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 a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=
a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var d=this._.panel;
void 0!==a&&(d.allowBlur=a);return d.allowBlur},showAsChild:function(a,d,h,l,m,k){if(this._.activeChild!=a||a._.panel._.offsetParentId!=h.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(d,h,l,m,k),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var d=
this._.activeChild;d&&(delete d.onHide,delete this._.activeChild,d.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),g;for(g in d){var h=d[g];a?h.destroy():h.element.hide()}a&&(d={})})}(),CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function d(c,e,d,g,k){var w=new CKEDITOR.style(l["colorButton_"+e+"Style"]),t=CKEDITOR.tools.getNextId()+"_colorBox",p;k=k||{};a.ui.add(c,CKEDITOR.UI_PANELBUTTON,
{label:d,title:d,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+g,allowedContent:w,requiredContent:w,contentTransformations:k.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":m.panelTitle}},onBlock:function(c,d){p=d;d.autoSize=!0;d.element.addClass("cke_colorblock");d.element.setHtml(b(c,e,t));d.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var g=d.keys,k="rtl"==a.lang.dir;g[k?37:39]="next";
g[40]="next";g[9]="next";g[k?39:37]="prev";g[38]="prev";g[CKEDITOR.SHIFT+9]="prev";g[32]="click"},refresh:function(){a.activeFilter.check(w)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var b=a.getSelection(),c=b&&b.getStartElement(),d=a.elementPath(c);if(d){c=d.block||d.blockLimit||a.document.getBody();do d=c&&c.getComputedStyle("back"==e?"background-color":"color")||"transparent";while("back"==e&&"transparent"==d&&c&&(c=c.getParent()));d&&"transparent"!=d||(d="#ffffff");!1!==l.colorButton_enableAutomatic&&
this._.panel._.iframe.getFrameDocument().getById(t).setStyle("background-color",d);if(c=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(c),g=c.collapsed?c.startContainer:b.next(),c="";g;){g.type===CKEDITOR.NODE_TEXT&&(g=g.getParent());g=h(g.getComputedStyle("back"==e?"background-color":"color"));c=c||g;if(c!==g){c="";break}g=b.next()}b=c;c=p._.getItems();for(g=0;g<c.count();g++){var k=c.getItem(g);k.removeAttribute("aria-selected");b&&b==h(k.getAttribute("data-value"))&&k.setAttribute("aria-selected",
!0)}}return d}}})}function b(b,e,d){b=[];var k=l.colorButton_colors.split(","),h=l.colorButton_colorsPerRow||6,w=a.plugins.colordialog&&!1!==l.colorButton_enableMore,t=k.length+(w?2:1),p=CKEDITOR.tools.addFunction(function(b,c){function e(b){a.removeStyle(new CKEDITOR.style(l["colorButton_"+c+"Style"],{color:"inherit"}));var f=l["colorButton_"+c+"Style"];f.childRule="back"==c?function(a){return g(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||g(a)};a.focus();a.applyStyle(new CKEDITOR.style(f,
{color:b}));a.fire("saveSnapshot")}a.focus();a.fire("saveSnapshot");if("?"==b)a.getColorFromDialog(function(a){if(a)return e(a)});else return e(b)});!1!==l.colorButton_enableAutomatic&&b.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',m.auto,'" onclick\x3d"CKEDITOR.tools.callFunction(',p,",null,'",e,"');return false;\" href\x3d\"javascript:void('",m.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',t,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+
h+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',d,'"\x3e\x3c/span\x3e',m.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");b.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(d=0;d<k.length;d++){0===d%h&&b.push("\x3c/tr\x3e\x3ctr\x3e");var q=k[d].split("/"),y=q[0],D=q[1]||y;q[1]||(y="#"+y.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));q=a.lang.colorbutton.colors[D]||D;b.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',
q,'" onclick\x3d"CKEDITOR.tools.callFunction(',p,",'",y,"','",e,"'); return false;\" href\x3d\"javascript:void('",q,'\')" data-value\x3d"'+D+'" role\x3d"option" aria-posinset\x3d"',d+2,'" aria-setsize\x3d"',t,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',D,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}w&&b.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+h+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',m.more,'" onclick\x3d"CKEDITOR.tools.callFunction(',
p,",'?','",e,"');return false;\" href\x3d\"javascript:void('",m.more,"')\"",' role\x3d"option" aria-posinset\x3d"',t,'" aria-setsize\x3d"',t,'"\x3e',m.more,"\x3c/a\x3e\x3c/td\x3e");b.push("\x3c/tr\x3e\x3c/table\x3e");return b.join("")}function g(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function h(a){return CKEDITOR.tools.convertRgbToHex(a||"").replace(/#/,"").toLowerCase()}var l=a.config,m=a.lang.colorbutton;if(!CKEDITOR.env.hc){d("TextColor","fore",m.textColorTitle,
10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(a){return!!a.attributes.color},right:function(a){a.name="span";a.attributes.color&&(a.styles.color=a.attributes.color);delete a.attributes.color}}]]});var k={},e=a.config.colorButton_normalizeBackground;if(void 0===e||e)k.contentTransformations=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&
1===b.objectKeys(a).length},right:function(b){var e=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=e.element;b.styles=e.styles;b.attributes=e.attributes||{};return b}}]];d("BGColor","back",m.bgColorTitle,20,k)}}}),CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",CKEDITOR.config.colorButton_foreStyle=
{element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],f=1;f<arguments.length;f++)b.push(arguments[f]);b.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},
d={build:function(a,b,f){return new CKEDITOR.ui.dialog.textInput(a,b,f)}},b={build:function(a,b,f){return new CKEDITOR.ui.dialog[b.type](a,b,f)}},g={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(a){this.setValue(this.getInitValue(),a)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},h=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,
{onChange:function(a,b){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},!0),l=/^on([A-Z]\w+)/,m=function(a){for(var b in a)(l.test(b)||"title"==b||"type"==b)&&delete a[b];return a},k=function(a){a=a.data.getKeystroke();a==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):a==CKEDITOR.SHIFT+CKEDITOR.ALT+
35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,c,f,d){if(!(4>arguments.length)){var g=a.call(this,c);g.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var k={role:c.role||"presentation"};c.includeLabel&&(k["aria-labelledby"]=g.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"div",null,k,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+
f+'" ',' id\x3d"'+g.labelId+'"',g.inputId?' for\x3d"'+g.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"'+g.labelId+'" for\x3d"'+g.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(b,c,f){if(!(3>arguments.length)){a.call(this,c);var d=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",g={"class":"cke_dialog_ui_input_"+c.type,
id:d,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(g.maxlength=c.maxLength);c.size&&(g.size=c.size);c.inputStyle&&(g.style=c.inputStyle);var h=this,l=!1;b.on("load",function(){h.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(l=!0)});h.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);h.bidi&&k.call(h,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,f,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");g["aria-labelledby"]=this._.labelId;this._.required&&(g["aria-required"]=this._.required);for(var b in g)a.push(b+'\x3d"'+g[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,c,f){if(!(3>arguments.length)){a.call(this,c);var d=this,g=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)b.on("load",function(){d.getInputElement().on("keyup",k)},d);CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,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"',
g,'" '],b;for(b in h)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(d._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,c,f){if(!(3>arguments.length)){var d=a.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),
f=[],g=CKEDITOR.tools.getNextId()+"_label",k={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};m(a);c["default"]&&(k.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);d.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,f,"input",null,k);f.push(' \x3clabel id\x3d"',g,'" for\x3d"',k.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return f.join("")})}},radio:function(b,c,f){if(!(3>arguments.length)){a.call(this,
c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var d=[],g=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){for(var a=[],f=[],k=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",h=0;h<c.items.length;h++){var l=c.items[h],y=void 0!==l[2]?l[2]:l[0],D=void 0!==l[1]?l[1]:l[0],r=CKEDITOR.tools.getNextId()+"_radio_input",x=r+"_label",r=CKEDITOR.tools.extend({},c,{id:r,title:null,type:null},
!0),y=CKEDITOR.tools.extend({},r,{title:y},!0),E={type:"radio","class":"cke_dialog_ui_radio_input",name:k,value:D,"aria-labelledby":x},z=[];g._["default"]==D&&(E.checked="checked");m(r);m(y);"undefined"!=typeof r.inputStyle&&(r.style=r.inputStyle);r.keyboardFocusable=!0;d.push(new CKEDITOR.ui.dialog.uiElement(b,r,z,"input",null,E));z.push(" ");new CKEDITOR.ui.dialog.uiElement(b,y,z,"label",null,{id:x,"for":E.id},l[0]);a.push(z.join(""))}new CKEDITOR.ui.dialog.hbox(b,d,a,f);return f.join("")});this._.children=
d}},button:function(b,c,f){if(arguments.length){"function"==typeof c&&(c=c(b.getParentEditor()));a.call(this,c,{disabled:c.disabled||!1});CKEDITOR.event.implementOn(this);var 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 g=CKEDITOR.tools.extend({},c);delete g.style;var k=CKEDITOR.tools.getNextId()+
"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,g,f,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":k},'\x3cspan id\x3d"'+k+'" class\x3d"cke_dialog_ui_button"\x3e'+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/span\x3e")}},select:function(b,c,f){if(!(3>arguments.length)){var d=a.call(this,c);c.validate&&(this.validate=c.validate);d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,
b,c,f,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),f=[],g=[],k={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};f.push('\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"');c.width&&f.push('style\x3d"width:'+c.width+'" ');f.push("\x3e");void 0!==c.size&&(k.size=c.size);void 0!==c.multiple&&(k.multiple=c.multiple);m(a);for(var h=0,l;h<c.items.length&&(l=c.items[h]);h++)g.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,f,"select",null,k,g.join(""));f.push("\x3c/div\x3e");return f.join("")})}},file:function(b,c,f){if(!(3>arguments.length)){void 0===c["default"]&&(c["default"]="");var d=CKEDITOR.tools.extend(a.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,f,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,f){var d=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var g=CKEDITOR.tools.extend({},c),k=g.onClick;g.className=(g.className?g.className+" ":"")+"cke_dialog_ui_button";g.onClick=function(a){var f=c["for"];k&&!1===k.call(this,a)||(b.getContentElement(f[0],f[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,g,f)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,f=/\/$/;return function(d,g,k){if(!(3>arguments.length)){var h=[],l=g.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var m=g.focus;if(m){var q=this.focus;this.focus=function(){("function"==typeof m?m:q).call(this);this.fire("focus")};g.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,
d,g,h,"span",null,null,"");h=h.join("").match(a);l=l.match(b)||["","",""];f.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);k.push([l[1]," ",h[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,f,d,g){var k=g.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,g,d,"fieldset",null,null,function(){var a=[];k&&a.push("\x3clegend"+(g.labelStyle?' style\x3d"'+g.labelStyle+'"':"")+"\x3e"+k+"\x3c/legend\x3e");for(var b=0;b<f.length;b++)a.push(f[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=
new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setLabel:function(a){var b=CKEDITOR.document.getById(this._.labelId);1>b.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:h},!0);CKEDITOR.ui.dialog.button.prototype=
CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,
{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)},focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();
setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)},getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+
a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},g,!0);CKEDITOR.ui.dialog.textarea.prototype=new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},
add:function(a,b,f){var d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),g=this.getInputElement().$;d.$.text=a;d.$.value=void 0===b||null===b?a:b;void 0===f||null===f?CKEDITOR.env.ie?g.add(d.$):g.add(d.$,null):g.add(d.$,f);return this},remove:function(a){this.getInputElement().$.remove(a);return this},clear:function(){for(var a=this.getInputElement().$;0<a.length;)a.remove(0);return this},keyboardFocusable:!0},g,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(a,b){this.getInputElement().$.checked=a;!b&&this.fire("change",{value:a})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return h.onChange.apply(this,arguments);a.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;
"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:!0},g,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var f=this._.children,d,g=0;g<f.length&&(d=f[g]);g++)d.getElement().$.checked=d.getValue()==a;!b&&this.fire("change",{value:a})},getValue:function(){for(var a=this._.children,b=0;b<a.length;b++)if(a[b].getElement().$.checked)return a[b].getValue();
return null},accessKeyUp:function(){var a=this._.children,b;for(b=0;b<a.length;b++)if(a[b].getElement().$.checked){a[b].getElement().focus();return}a[0].getElement().focus()},eventProcessors:{onChange:function(a,b){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return h.onChange.apply(this,arguments);a.on("load",function(){for(var a=this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},
this);this.on("change",b);return null}}},g,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,g,{getInputElement:function(){var a=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<a.$.forms.length?new CKEDITOR.dom.element(a.$.forms[0].elements[0]):this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(a){var b=
/^on([A-Z]\w+)/,f,d=function(a,b,c,e){a.on("formLoaded",function(){a.getInputElement().on(c,e,a)})},g;for(g in a)if(f=g.match(b))this.eventProcessors[g]?this.eventProcessors[g].call(this,this._.dialog,a[g]):d(this,this._.dialog,f[1].toLowerCase(),a[g]);return this},reset:function(){function a(){f.$.open();var e="";d.size&&(e=d.size-(CKEDITOR.env.ie?7:0));var y=b.frameId+"_input";f.$.write(['\x3chtml dir\x3d"'+l+'" lang\x3d"'+m+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e',
'\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+l+'" lang\x3d"'+m+'" action\x3d"',CKEDITOR.tools.htmlEncode(d.action),'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',y,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(d.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',y,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(d.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<e?e:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',
CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+k+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+h+")}","\x3c/script\x3e"].join(""));f.$.close();for(e=0;e<g.length;e++)g[e].enable()}var b=this._,f=CKEDITOR.document.getById(b.frameId).getFrameDocument(),d=b.definition,g=b.buttons,k=this.formLoadedNumber,h=this.formUnloadNumber,l=b.dialog._.editor.lang.dir,m=b.dialog._.editor.langCode;k||(k=this.formLoadedNumber=
CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),h=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(k);CKEDITOR.tools.removeFunction(h)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||
(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype=new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",d);CKEDITOR.dialog.addUIElement("password",d);CKEDITOR.dialog.addUIElement("textarea",
b);CKEDITOR.dialog.addUIElement("checkbox",b);CKEDITOR.dialog.addUIElement("radio",b);CKEDITOR.dialog.addUIElement("button",b);CKEDITOR.dialog.addUIElement("select",b);CKEDITOR.dialog.addUIElement("file",b);CKEDITOR.dialog.addUIElement("fileButton",b);CKEDITOR.dialog.addUIElement("html",b);CKEDITOR.dialog.addUIElement("fieldset",{build:function(a,b,f){for(var d=b.children,g,k=[],h=[],l=0;l<d.length&&(g=d[l]);l++){var m=[];k.push(m);h.push(CKEDITOR.dialog._.uiElementBuilders[g.type].build(a,g,m))}return new CKEDITOR.ui.dialog[b.type](a,
h,k,f,b)}})}}),CKEDITOR.DIALOG_RESIZE_NONE=0,CKEDITOR.DIALOG_RESIZE_WIDTH=1,CKEDITOR.DIALOG_RESIZE_HEIGHT=2,CKEDITOR.DIALOG_RESIZE_BOTH=3,CKEDITOR.DIALOG_STATE_IDLE=1,CKEDITOR.DIALOG_STATE_BUSY=2,function(){function a(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,c=b-1;c>b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function d(){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 b(a,b){for(var c=a.$.getElementsByTagName("input"),e=0,f=c.length;e<f;e++){var d=new CKEDITOR.dom.element(c[e]);"text"==d.getAttribute("type").toLowerCase()&&(b?(d.setAttribute("value",d.getCustomData("fake_value")||""),d.removeCustomData("fake_value")):(d.setCustomData("fake_value",d.getAttribute("value")),d.setAttribute("value","")))}}function g(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 h(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function l(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",t).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]),e=c.getChild(0),f=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()));e.unselectable();f.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:e,close:f,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 k(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function e(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function c(a){function b(c){var h=a.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),m=c.data.$.screenX,n=c.data.$.screenY,A=m-e.x,p=n-e.y;e={x:m,y:n};
f.x+=A;f.y+=p;a.move(f.x+k[3]<g?-k[3]:f.x-k[1]>l.width-h.width-g?l.width-h.width+("rtl"==d.lang.dir?0:k[1]):f.x,f.y+k[0]<g?-k[0]:f.y-k[2]>l.height-h.height-g?l.height-h.height+k[2]:f.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=z.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var e=null,f=null,d=a.getParentEditor(),g=d.config.dialog_magnetDistance,
k=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(d){e={x:d.data.$.screenX,y:d.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);f=a.getPosition();if(CKEDITOR.env.ie6Compat){var g=z.getChild(0).getFrameDocument();g.on("mousemove",b);g.on("mouseup",c)}d.data.preventDefault()},a)}function f(a){function b(c){var K="rtl"==d.lang.dir,n=m.width,p=m.height,A=n+(c.data.$.screenX-l.x)*(K?-1:1)*(a._.moved?1:2),M=p+(c.data.$.screenY-
l.y)*(a._.moved?1:2),w=a._.element.getFirst(),w=K&&w.getComputedStyle("right"),q=a.getPosition();q.y+M>h.height&&(M=h.height-q.y);(K?w:q.x)+A>h.width&&(A=h.width-(K?w:q.x));if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)n=Math.max(e.minWidth||0,A-g);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT||f==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(e.minHeight||0,M-k);a.resize(n,p);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",
b);K&&(K.remove(),K=null);if(CKEDITOR.env.ie6Compat){var a=z.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var e=a.definition,f=e.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var d=a.getParentEditor(),g,k,h,l,m,K,n=CKEDITOR.tools.addFunction(function(e){m=a.getSize();var f=a.parts.contents;f.$.getElementsByTagName("iframe").length&&(K=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),
f.append(K));k=m.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=m.width-a.parts.contents.getSize("width",1);l={x:e.screenX,y:e.screenY};h=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(f=z.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));e.preventDefault&&e.preventDefault()});a.on("load",function(){var b="";f==CKEDITOR.DIALOG_RESIZE_WIDTH?
b=" cke_resizer_horizontal":f==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+d.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(d.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event )"\x3e'+("ltr"==d.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});d.on("destroy",function(){CKEDITOR.tools.removeFunction(n)})}}function n(a){a.data.preventDefault(1)}function v(a){var b=
CKEDITOR.document.getWindow(),c=a.config,e=CKEDITOR.skinName||a.config.skin,f=c.dialog_backgroundCoverColor||("moono-lisa"==e?"black":"white"),e=c.dialog_backgroundCoverOpacity,d=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(f,e,d),g=E[c];g?g.show():(d=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",d,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+f,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&
(f="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+f+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",d.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),d.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+f+"' );document.close();")+"})())"),d.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),
d.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(d.join("")),g.setOpacity(void 0!==e?e:.5),g.on("keydown",n),g.on("keypress",n),g.on("keyup",n),g.appendTo(CKEDITOR.document.getBody()),E[c]=g);a.focusManager.add(g);z=g;a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+"px",height:a.height+"px"})};var k=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.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)
}};x=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var h=function(){k();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){h.prevScrollHandler=window.onscroll||function(){};window.onscroll=h},0);k()}}function u(a){z&&(a.focusManager.remove(z),a=CKEDITOR.document.getWindow(),z.hide(),a.removeListener("resize",x),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||
null},0),x=null)}var w=CKEDITOR.tools.cssLength,t='\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,e){function k(){var a=L._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function m(a){var b=L._.focusList;a=a||0;if(!(1>b.length)){var c=L._.currentFocusIndex;L._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(e){}var f=c,d=1<L._.pageCount;do{f+=a;if(d&&!L._.tabBarMode&&(f==b.length||-1==f)){L._.tabBarMode=!0;L._.tabs[L._.currentTabId][0].focus();
L._.currentFocusIndex=-1;return}f=(f+b.length)%b.length;if(f==c)break}while(a&&!b[f].isFocusable());b[f].focus();"text"==b[f].type&&b[f].select()}}function n(c){if(L==CKEDITOR.dialog._.currentTop){var e=c.data.getKeystroke(),f="rtl"==b.lang.dir,g=[37,38,39,40];K=M=0;if(9==e||e==CKEDITOR.SHIFT+9)m(e==CKEDITOR.SHIFT+9?-1:1),K=1;else if(e==CKEDITOR.ALT+121&&!L._.tabBarMode&&1<L.getPageCount())L._.tabBarMode=!0,L._.tabs[L._.currentTabId][0].focus(),L._.currentFocusIndex=-1,K=1;else if(-1!=CKEDITOR.tools.indexOf(g,
e)&&L._.tabBarMode)e=-1!=CKEDITOR.tools.indexOf([f?39:37,38],e)?a.call(L):d.call(L),L.selectPage(e),L._.tabs[e][0].focus(),K=1;else if(13!=e&&32!=e||!L._.tabBarMode)if(13==e)e=c.data.getTarget(),e.is("a","button","select","textarea")||e.is("input")&&"button"==e.$.type||((e=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(e.click,0,e),K=1),M=1;else if(27==e)(e=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(e.click,0,e):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),M=1;else return;else this.selectPage(this._.currentTabId),
this._.tabBarMode=!1,this._.currentFocusIndex=-1,m(1),K=1;w(c)}}function w(a){K?a.data.preventDefault(1):M&&a.data.stopPropagation()}var q=CKEDITOR.dialog._.dialogDefinitions[e],y=CKEDITOR.tools.clone(p),t=b.config.dialog_buttonsOrder||"OS",v=b.lang.dir,x={},K,M;("OS"==t&&CKEDITOR.env.mac||"rtl"==t&&"ltr"==v||"ltr"==t&&"rtl"==v)&&y.buttons.reverse();q=CKEDITOR.tools.extend(q(b),y);q=CKEDITOR.tools.clone(q);q=new r(this,q);y=l(b);this._={editor:b,element:y.element,name:e,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=y.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);y={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};y["rtl"==v?"right":"left"]=0;this.parts.dialog.setStyles(y);CKEDITOR.event.call(this);this.definition=q=CKEDITOR.fire("dialogDefinition",
{name:e,definition:q},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){y=b.config.removeDialogTabs.split(";");for(v=0;v<y.length;v++)if(t=y[v].split(":"),2==t.length){var S=t[0];x[S]||(x[S]=[]);x[S].push(t[1])}b._.removeDialogTabs=x}if(b._.removeDialogTabs&&(x=b._.removeDialogTabs[e]))for(v=0;v<x.length;v++)q.removeContents(x[v]);if(q.onLoad)this.on("load",q.onLoad);if(q.onShow)this.on("show",q.onShow);if(q.onHide)this.on("hide",q.onHide);if(q.onOk)this.on("ok",function(a){b.fire("saveSnapshot");
setTimeout(function(){b.fire("saveSnapshot")},0);!1===q.onOk.call(this,a)&&(a.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(q.onCancel)this.on("cancel",function(a){!1===q.onCancel.call(this,a)&&(a.data.hide=!1)});var L=this,V=function(a){var b=L._.contents,c=!1,e;for(e in b)for(var f in b[e])if(c=a.call(this,b[e][f]))return};this.on("ok",function(a){V(function(b){if(b.validate){var c=b.validate(this),e="string"==typeof c||!1===c;e&&(a.data.hide=!1,a.stop());g.call(b,!e,"string"==typeof c?
c:void 0);return e}})},this,null,0);this.on("cancel",function(a){V(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=m;var D=this._.element;b.focusManager.add(D,1);this.on("show",function(){D.on("keydown",n,this);if(CKEDITOR.env.gecko)D.on("keypress",w,this)});this.on("hide",
function(){D.removeListener("keydown",n);CKEDITOR.env.gecko&&D.removeListener("keypress",w);V(function(a){h.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",n,this,null,0)});this.on("show",function(){k();var a=1<L._.pageCount;b.config.dialog_startupFocusTab&&a?(L._.tabBarMode=!0,L._.tabs[L._.currentTabId][0].focus(),L._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-1,q.onFocus?
(a=q.onFocus.call(this))&&a.focus():m(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);c(this);f(this);(new CKEDITOR.dom.text(q.title,CKEDITOR.document)).appendTo(this.parts.title);for(v=0;v<q.contents.length;v++)(x=q.contents[v])&&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,m(1)),a.data.preventDefault())},this);v=[];x=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:q.buttons},v).getChild();this.parts.footer.setHtml(v.join(""));for(v=0;v<x.length;v++)this._.buttons[x[v].id]=x[v]};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 e=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir,d="fixed"==e.getComputedStyle("position");CKEDITOR.env.ie&&e.setStyle("zoom","100%");d&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},d||(d=CKEDITOR.document.getWindow().getScrollPosition(),a+=d.x,b+=d.y),f&&(d=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-d.width-a),b={top:(0<b?b:0)+"px"},
b[f?"right":"left"]=(0<a?a:0)+"px",e.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition;a.getParent()&&a.getParent().equals(CKEDITOR.document.getBody())?a.setStyle("display","block"):a.appendTo(CKEDITOR.document.getBody());this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();null===
this._.currentTabId&&this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,v(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/
2),CKEDITOR.dialog._.currentTop=this);a.on("keydown",B);a.on("keyup",G);this._.hasFocus=!1;for(var c in b.contents)if(b.contents[c]){var a=b.contents[c],e=this._.tabs[a.id],f=a.requiredContent,d=0;if(e){for(var g in this._.contents[a.id]){var h=this._.contents[a.id][g];"hbox"!=h.type&&"vbox"!=h.type&&h.getInputElement()&&(h.requiredContent&&!this._.editor.activeFilter.check(h.requiredContent)?h.disable():(h.enable(),d++))}!d||f&&!this._.editor.activeFilter.check(f)?e[0].addClass("cke_dialog_tab_disabled"):
e[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();k(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(),e=
(c.width-b.width)/2,f=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<f?f:0)>c.height||b.width+(0<e?e:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:e,this._.moved?this._.position.y:f)},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(I(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else u(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",B);a.removeListener("keyup",G);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)+'"':"",e=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),f=this._.contents[a.id]={},d=e.getChild(),g=0;e=d.shift();)e.notAllowed||"hbox"==e.type||"vbox"==e.type||g++,f[e.id]=e,"function"==typeof e.getChild&&d.push.apply(d,e.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");e=CKEDITOR.env;f="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"',f,'"',e.gecko&&!e.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",f);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&&
(H(this,this,"CTRL+"+a.accessKey,O,J),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 c in this._.tabs){var e=this._.tabs[c][0],f=this._.tabs[c][1];c!=a&&(e.removeClass("cke_dialog_tab_selected"),f.hide());f.setAttribute("aria-hidden",c!=a)}var d=this._.tabs[a];d[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||
CKEDITOR.env.ie7Compat?(b(d[1]),d[1].show(),setTimeout(function(){b(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(b){var c=this._.tabs[b]&&this._.tabs[b][0];c&&1!=this._.pageCount&&c.isVisible()&&(b==this._.currentTabId&&this.selectPage(a.call(this)),c.hide(),this._.pageCount--,this.updateStyle())},showPage:function(a){if(a=
this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,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 p={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},q=function(a,b,c){for(var e=0,f;f=a[e];e++)if(f.id==b||c&&f[c]&&(f=q(f[c],b,c)))return f;return null},y=function(a,b,c,e,f){if(c){for(var d=0,g;g=a[d];d++){if(g.id==c)return a.splice(d,0,b),b;if(e&&g[e]&&(g=y(g[e],b,c,e,!0)))return g}if(f)return null}a.push(b);return b},D=function(a,b,c){for(var e=0,f;f=a[e];e++){if(f.id==b)return a.splice(e,1);if(c&&f[c]&&(f=D(f[c],
b,c)))return f}return null},r=function(a,b){this.dialog=a;for(var c=b.contents,f=0,d;d=c[f];f++)c[f]=d&&new e(a,d);CKEDITOR.tools.extend(this,b)};r.prototype={getContents:function(a){return q(this.contents,a)},getButton:function(a){return q(this.buttons,a)},addContents:function(a,b){return y(this.contents,a,b)},addButton:function(a,b){return y(this.buttons,a,b)},removeContents:function(a){D(this.contents,a)},removeButton:function(a){D(this.buttons,a)}};e.prototype={get:function(a){return q(this.elements,
a,"children")},add:function(a,b){return y(this.elements,a,b,"children")},remove:function(a){D(this.elements,a,"children")}};var x,E={},z,C={},B=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=C[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},G=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,
e=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=C[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))},H=function(a,b,c,e,f){(C[c]||(C[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:f||a.accessKeyUp,keydown:e||a.accessKeyDown})},I=function(a){for(var b in C){for(var c=C[b],e=c.length-1;0<=e;e--)c[e].dialog!=a&&c[e].uiElement!=a||c.splice(e,1);0===c.length&&delete C[b]}},J=function(a,
b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},O=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,e,f,d,g){if(!(4>arguments.length)){var k=(e.call?e(b):e)||"div",h=["\x3c",k," "],l=(f&&f.call?f(b):f)||{},m=(d&&d.call?d(b):d)||{},K=(g&&g.call?g.call(this,a,b):g)||"",n=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed=!0);m.id=n;var p={};b.type&&(p["cke_dialog_ui_"+
b.type]=1);b.className&&(p[b.className]=1);b.disabled&&(p.cke_disabled=1);for(var q=m["class"]&&m["class"].split?m["class"].split(" "):[],n=0;n<q.length;n++)q[n]&&(p[q[n]]=1);q=[];for(n in p)q.push(n);m["class"]=q.join(" ");b.title&&(m.title=b.title);p=(b.style||"").split(";");b.align&&(q=b.align,l["margin-left"]="left"==q?0:"auto",l["margin-right"]="right"==q?0:"auto");for(n in l)p.push(n+":"+l[n]);b.hidden&&p.push("display:none");for(n=p.length-1;0<=n;n--)""===p[n]&&p.splice(n,1);0<p.length&&(m.style=
(m.style?m.style+"; ":"")+p.join("; "));for(n in m)h.push(n+'\x3d"'+CKEDITOR.tools.htmlEncode(m[n])+'" ');h.push("\x3e",K,"\x3c/",k,"\x3e");c.push(h.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&&H(this,a,"CTRL+"+b.accessKey);var w=this;a.on("load",function(){var b=w.getInputElement();if(b){var c=w.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;w.fire("focus");
c&&this.addClass(c)});b.on("blur",function(){w.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=w.focusIndex}))}},hbox:function(a,b,c,e,f){if(!(4>arguments.length)){this._||(this._={});var d=this._.children=b,g=f&&f.widths||null,k=f&&f.height||null,h,l={role:"presentation"};f&&f.align&&(l.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,
a,f||{type:"hbox"},e,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(h=0;h<c.length;h++){var b="cke_dialog_ui_hbox_child",e=[];0===h&&(b="cke_dialog_ui_hbox_first");h==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');g?g[h]&&e.push("width:"+w(g[h])):e.push("width:"+Math.floor(100/c.length)+"%");k&&e.push("height:"+w(k));f&&void 0!==f.padding&&e.push("padding:"+w(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&
d[h].align&&e.push("text-align:"+d[h].align);0<e.length&&a.push('style\x3d"'+e.join("; ")+'" ');a.push("\x3e",c[h],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,e,f){if(!(3>arguments.length)){this._||(this._={});var d=this._.children=b,g=f&&f.width||null,k=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];
b.push('style\x3d"');f&&f.expand&&b.push("height:100%;");b.push("width:"+w(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(f&&f.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;e<c.length;e++){var h=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');g&&h.push("width:"+w(g||"100%"));k?h.push("height:"+w(k[e])):f&&f.expand&&h.push("height:"+Math.floor(100/c.length)+"%");
f&&void 0!==f.padding&&h.push("padding:"+w(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&d[e].align&&h.push("text-align:"+d[e].align);0<h.length&&b.push('style\x3d"',h.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[e],"\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,e=function(a,b,c,e){b.on("load",function(){a.getInputElement().on(c,e,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):e(this,this._.dialog,c[1].toLowerCase(),a[f]);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 e=b.children,f,d=[],g=[],h=0;h<e.length&&(f=e[h]);h++){var k=[];d.push(k);g.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,k))}return new CKEDITOR.ui.dialog[b.type](a,
g,d,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+)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,
d=/^(\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,e=CKEDITOR.VALIDATE_AND,f=[],d;for(d=0;d<a.length;d++)if("function"==typeof a[d])f.push(a[d]);else break;d<a.length&&"string"==typeof a[d]&&(c=a[d],d++);d<a.length&&"number"==typeof a[d]&&(e=a[d]);var g=e==CKEDITOR.VALIDATE_AND?!0:!1;for(d=0;d<f.length;d++)g=e==CKEDITOR.VALIDATE_AND?g&&
f[d](b):g||f[d](b);return g?!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 f.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return d.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 E)E[c].remove();E={}}a=a.editor._.storedDialogs;for(var e in a)a[e].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,e=CKEDITOR.dialog._.dialogDefinitions[a];
null===CKEDITOR.dialog._.currentTop&&v(this);if("function"==typeof e)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"==e)throw u(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof e&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(e),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed");this.openDialog(a,
b)},this,0,1)}CKEDITOR.skin.loadPart("dialog");return c}})}(),CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(a){a.on("doubleclick",function(d){d.data.dialog&&a.openDialog(d.data.dialog)},null,null,999)}}),CKEDITOR.plugins.colordialog={requires:"dialog",init:function(a){var d=new CKEDITOR.dialogCommand("colordialog");d.editorFocus=!1;a.addCommand("colordialog",d);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(b,d){var h=function(a){this.removeListener("ok",
h);this.removeListener("cancel",h);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;b.call(d,a)},l=function(a){a.on("ok",h);a.on("cancel",h)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)l(a._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(a){if("colordialog"==a.data.name){var b=a.data.definition;a.removeListener();b.onLoad=CKEDITOR.tools.override(b.onLoad,function(a){return function(){l(this);b.onLoad=a;"function"==typeof a&&
a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),CKEDITOR.plugins.add("divarea",{afterInit:function(a){a.addMode("wysiwyg",function(d){var b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_wysiwyg_div cke_reset cke_enable_context_menu" hidefocus\x3d"true"\x3e\x3c/div\x3e');a.ui.space("contents").append(b);b=a.editable(b);b.detach=CKEDITOR.tools.override(b.detach,function(a){return function(){a.apply(this,arguments);this.remove()}});a.setData(a.getData(1),
d);a.fire("contentDom")})}}),function(){function a(a,b){function m(b){b=f.list[b];var c;b.equals(a.editable())||"true"==b.getAttribute("contenteditable")?(c=a.createRange(),c.selectNodeContents(b),c=c.select()):(c=a.getSelection(),c.selectElement(b));CKEDITOR.env.ie&&a.fire("selectionChange",{selection:c,path:new CKEDITOR.dom.elementPath(b)});a.focus()}function k(){c&&c.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete f.list}var e=a.ui.spaceId("path"),c,f=a._.elementsPath,
n=f.idBase;b.html+='\x3cspan id\x3d"'+e+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+e+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+e+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';a.on("uiReady",function(){var b=a.ui.space("path");b&&a.focusManager.add(b,1)});f.onClick=m;var v=CKEDITOR.tools.addFunction(m),u=CKEDITOR.tools.addFunction(function(b,c){var e=f.idBase,d;c=new CKEDITOR.dom.event(c);
d="rtl"==a.lang.dir;switch(c.getKeystroke()){case d?39:37:case 9:return(d=CKEDITOR.document.getById(e+(b+1)))||(d=CKEDITOR.document.getById(e+"0")),d.focus(),!1;case d?37:39:case CKEDITOR.SHIFT+9:return(d=CKEDITOR.document.getById(e+(b-1)))||(d=CKEDITOR.document.getById(e+(f.list.length-1))),d.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return m(b),!1}return!0});a.on("selectionChange",function(){for(var b=[],d=f.list=[],k=[],l=f.filters,m=!0,D=a.elementPath().elements,r,x=D.length;x--;){var E=
D[x],z=0;r=E.data("cke-display-name")?E.data("cke-display-name"):E.data("cke-real-element-type")?E.data("cke-real-element-type"):E.getName();(m=E.hasAttribute("contenteditable")?"true"==E.getAttribute("contenteditable"):m)||E.hasAttribute("contenteditable")||(z=1);for(var C=0;C<l.length;C++){var B=l[C](E,r);if(!1===B){z=1;break}r=B||r}z||(d.unshift(E),k.unshift(r))}d=d.length;for(l=0;l<d;l++)r=k[l],m=a.lang.elementspath.eleTitle.replace(/%1/,r),r=g.output({id:n+l,label:m,text:r,jsTitle:"javascript:void('"+
r+"')",index:l,keyDownFn:u,clickFn:v}),b.unshift(r);c||(c=CKEDITOR.document.getById(e));k=c;k.setHtml(b.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:k})});a.on("readOnly",k);a.on("contentDomUnload",k);a.addCommand("elementsPathFocus",d.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var d={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||
CKEDITOR.env.air)}}},b="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var g=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+b+' 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(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};b.on("uiSpace",function(d){"bottom"==d.data.space&&a(b,d.data)})}})}(),function(){function a(a,b,e){e=a.config.forceEnterMode||e;if("wysiwyg"==a.mode){b||(b=a.activeEnterMode);var d=a.elementPath();d&&!d.isContextFor("p")&&(b=CKEDITOR.ENTER_BR,e=1);a.fire("saveSnapshot");b==CKEDITOR.ENTER_BR?m(a,b,null,e):k(a,b,null,e);a.fire("saveSnapshot")}}function d(a){a=
a.getSelection().getRanges(!0);for(var b=a.length-1;0<b;b--)a[b].deleteContents();return a[0]}function b(a){var b=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(a.root.equals(b))return a;b=new CKEDITOR.dom.range(b);b.moveToRange(a);return b}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,
exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var g=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(a,f,k,l){if(k=k||d(a)){k=b(k);var u=k.document,w=k.checkStartOfBlock(),t=k.checkEndOfBlock(),p=a.elementPath(k.startContainer),q=p.block,y=f==CKEDITOR.ENTER_DIV?"div":"p",D;if(w&&t){if(q&&(q.is("li")||q.getParent().is("li"))){q.is("li")||(q=q.getParent());k=q.getParent();
D=k.getParent();l=!q.hasPrevious();var r=!q.hasNext(),y=a.getSelection(),x=y.createBookmarks(),w=q.getDirection(1),t=q.getAttribute("class"),E=q.getAttribute("style"),z=D.getDirection(1)!=w;a=a.enterMode!=CKEDITOR.ENTER_BR||z||E||t;if(D.is("li"))l||r?(l&&r&&k.remove(),q[r?"insertAfter":"insertBefore"](D)):q.breakParent(D);else{if(a)if(p.block.is("li")?(D=u.createElement(f==CKEDITOR.ENTER_P?"p":"div"),z&&D.setAttribute("dir",w),E&&D.setAttribute("style",E),t&&D.setAttribute("class",t),q.moveChildren(D)):
D=p.block,l||r)D[l?"insertBefore":"insertAfter"](k);else q.breakParent(k),D.insertAfter(k);else if(q.appendBogus(!0),l||r)for(;u=q[l?"getFirst":"getLast"]();)u[l?"insertBefore":"insertAfter"](k);else for(q.breakParent(k);u=q.getLast();)u.insertAfter(k);q.remove()}y.selectBookmarks(x);return}if(q&&q.getParent().is("blockquote")){q.breakParent(q.getParent());q.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||q.getPrevious().remove();q.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||q.getNext().remove();
k.moveToElementEditStart(q);k.select();return}}else if(q&&q.is("pre")&&!t){m(a,f,k,l);return}if(w=k.splitBlock(y)){f=w.previousBlock;q=w.nextBlock;p=w.wasStartOfBlock;a=w.wasEndOfBlock;q?(x=q.getParent(),x.is("li")&&(q.breakParent(x),q.move(q.getNext(),1))):f&&(x=f.getParent())&&x.is("li")&&(f.breakParent(x),x=f.getNext(),k.moveToElementEditStart(x),f.move(f.getPrevious()));if(p||a){if(f){if(f.is("li")||!e.test(f.getName())&&!f.is("pre"))D=f.clone()}else q&&(D=q.clone());D?l&&!D.is("li")&&D.renameNode(y):
x&&x.is("li")?D=x:(D=u.createElement(y),f&&(r=f.getDirection())&&D.setAttribute("dir",r));if(u=w.elementPath)for(l=0,y=u.elements.length;l<y;l++){x=u.elements[l];if(x.equals(u.block)||x.equals(u.blockLimit))break;CKEDITOR.dtd.$removeEmpty[x.getName()]&&(x=x.clone(),D.moveChildren(x),D.append(x))}D.appendBogus();D.getParent()||k.insertNode(D);D.is("li")&&D.removeAttribute("value");!CKEDITOR.env.ie||!p||a&&f.getChildCount()||(k.moveToElementEditStart(a?f:D),k.select());k.moveToElementEditStart(p&&!a?
q:D)}else q.is("li")&&(D=k.clone(),D.selectNodeContents(q),D=new CKEDITOR.dom.walker(D),D.evaluator=function(a){return!(h(a)||g(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(x=D.next())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?u.createElement("br"):u.createText(" ")).insertBefore(x)),q&&k.moveToElementEditStart(q);k.select();k.scrollIntoView()}}},enterBr:function(a,b,g,h){if(g=g||d(a)){var l=g.document,
m=g.checkEndOfBlock(),t=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),p=t.block,q=p&&t.block.getName();h||"li"!=q?(!h&&m&&e.test(q)?(m=p.getDirection())?(l=l.createElement("div"),l.setAttribute("dir",m),l.insertAfter(p),g.setStart(l,0)):(l.createElement("br").insertAfter(p),CKEDITOR.env.gecko&&l.createText("").insertAfter(p),g.setStartAt(p.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==q&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?
l.createText("\r"):l.createElement("br"),g.deleteContents(),g.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("﻿").insertAfter(a),m&&(p||t.blockLimit).appendBogus(),a.getNext().$.nodeValue="",g.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):g.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),g.collapse(!0),g.select(),g.scrollIntoView()):k(a,b,g,h)}}};var l=CKEDITOR.plugins.enterkey,m=l.enterBr,k=l.enterBlock,e=/^h[1-6]$/}(),function(){function a(a,b){var g={},h=[],l={nbsp:" ",shy:"­",gt:"\x3e",
lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,e){var d=b?"\x26"+e+";":l[e];g[d]=b?l[e]:"\x26"+e+";";h.push(d);return""});if(!b&&a){a=a.split(",");var m=document.createElement("div"),k;m.innerHTML="\x26"+a.join(";\x26")+";";k=m.innerHTML;m=null;for(m=0;m<k.length;m++){var e=k.charAt(m);g[e]="\x26"+a[m]+";";h.push(e)}}g.regex=h.join(b?"|":"");return g}CKEDITOR.plugins.add("entities",{afterInit:function(d){function b(a){return e[a]}function g(a){return"force"!=
h.entities_processNumerical&&m[a]?m[a]:"\x26#"+a.charCodeAt(0)+";"}var h=d.config;if(d=(d=d.dataProcessor)&&d.htmlFilter){var l=[];!1!==h.basicEntities&&l.push("nbsp,gt,lt,amp");h.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"),
h.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"),h.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"),
h.entities_additional&&l.push(h.entities_additional));var m=a(l.join(",")),k=m.regex?"["+m.regex+"]":"a^";delete m.regex;h.entities&&h.entities_processNumerical&&(k="[^ -~]|"+k);var k=new RegExp(k,"g"),e=a("nbsp,gt,lt,amp,shy",!0),c=new RegExp(e.regex,"g");d.addRules({text:function(a){return a.replace(c,b).replace(k,g)}},{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",function(){function a(a){var h=a.config,l=a.fire("uiSpace",{space:"top",html:""}).html,m=function(){function c(a,f,d){e.setStyle(f,b(d));e.setStyle("position",a)}function f(a){var b=l.getDocumentPosition();switch(a){case "top":c("absolute","top",b.y-y-x);break;case "pin":c("fixed","top",z);break;case "bottom":c("absolute","top",b.y+(p.height||p.bottom-p.top)+x)}k=a}var k,l,t,p,q,y,D,r=h.floatSpaceDockedOffsetX||0,x=h.floatSpaceDockedOffsetY||0,E=h.floatSpacePinnedOffsetX||
0,z=h.floatSpacePinnedOffsetY||0;return function(c){if(l=a.editable()){var n=c&&"focus"==c.name;n&&e.show();a.fire("floatingSpaceLayout",{show:n});e.removeStyle("left");e.removeStyle("right");t=e.getClientRect();p=l.getClientRect();q=d.getViewPaneSize();y=t.height;D="pageXOffset"in d.$?d.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;k?(y+x<=p.top?f("top"):y+x>q.height-p.bottom?f("pin"):f("bottom"),c=q.width/2,c=h.floatSpacePreferRight?"right":0<p.left&&p.right<q.width&&p.width>t.width?
"rtl"==h.contentsLangDirection?"right":"left":c-p.left>p.right-c?"left":"right",t.width>q.width?(c="left",n=0):(n="left"==c?0<p.left?p.left:0:p.right<q.width?q.width-p.right:0,n+t.width>q.width&&(c="left"==c?"right":"left",n=0)),e.setStyle(c,b(("pin"==k?E:r)+n+("pin"==k?0:"left"==c?D:-D)))):(k="pin",f("pin"),m(c))}}}();if(l){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+
(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),e=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:l,
id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(h.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),c=CKEDITOR.tools.eventsBuffer(500,m),f=CKEDITOR.tools.eventsBuffer(100,m);e.unselectable();e.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){m(b);a.on("change",c.input);d.on("scroll",f.input);d.on("resize",f.input)});a.on("blur",function(){e.hide();a.removeListener("change",
c.input);d.removeListener("scroll",f.input);d.removeListener("resize",f.input)});a.on("destroy",function(){d.removeListener("scroll",f.input);d.removeListener("resize",f.input);e.clearCustomData();e.remove()});a.focusManager.hasFocus&&e.show();a.focusManager.add(e,1)}}var d=CKEDITOR.document.getWindow(),b=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=
CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),d=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'),b=CKEDITOR.addTemplate("panel-list-group",
'\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),g=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var d=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(d["aria-multiselectable"]=!0);!d.role&&(d.role="listbox");this.base.apply(this,arguments);
this.element.setAttribute("role",d.role);d=this.keys;d[40]="next";d[9]="next";d[38]="prev";d[CKEDITOR.SHIFT+9]="prev";d[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(d[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=
this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,m){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=k;var e;e=CKEDITOR.tools.htmlEncodeAttr(a).replace(g,"\\'");a={id:k,val:e,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(m||a),text:b||a};this._.pendingList.push(d.output(a))},startGroup:function(a){this._.close();
var d=CKEDITOR.tools.getNextId();this._.groups[a]=d;this._.pendingHtml.push(b.output({id:d,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display",
"none")},showAll:function(){var a=this._.items,b=this._.groups,d=this.element.getDocument(),g;for(g in a)d.getById(a[g]).setStyle("display","");for(var e in b)a=d.getById(b[e]),g=a.getNext(),a.setStyle("display",""),g&&"ul"==g.getName()&&g.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},
markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var d=b.getById(a);d.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(d)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),d;for(d in a){var g=a[d];b.getById(g).removeClass("cke_selected");b.getById(g+"_option").removeAttribute("aria-selected")}this.onUnmark&&
this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),d,g=-1;if(a)for(d=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++g);){if(a.equals(d)){this._.focusIndex=g;break}}else this.element.focus();d&&setTimeout(function(){d.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,
CKEDITOR.ui.richCombo.handler)}}),function(){var a='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&
(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=a+(' 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"),d=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel";
a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var d=[];this.render(a,d);return d.join("")},render:function(a,g){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var c=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(c=CKEDITOR.TRISTATE_DISABLED);this.setState(c);this.setValue("");c!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l=
CKEDITOR.env,m="cke_"+this.id,k=CKEDITOR.tools.addFunction(function(e){v&&(a.unlockSelection(1),v=0);c.execute(e)},this),e=this,c={id:m,combo:this,focus:function(){CKEDITOR.document.getById(m).getChild(1).focus()},execute:function(c){var f=e._;if(f.state!=CKEDITOR.TRISTATE_DISABLED)if(e.createPanel(a),f.on)f.panel.hide();else{e.commit();var d=e.getValue();d?f.list.mark(d):f.list.unmarkAll();f.panel.showBlock(e.id,new CKEDITOR.dom.element(c),4)}},clickFn:k};a.on("activeFilterChange",h,this);a.on("mode",
h,this);a.on("selectionChange",h,this);!this.readOnly&&a.on("readOnly",h,this);var f=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var e=a.getKeystroke();switch(e){case 13:case 32:case 40:CKEDITOR.tools.callFunction(k,b);break;default:c.onkey(c,e)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){c.onfocus&&c.onfocus()}),v=0;c.keyDownFn=f;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:f,focusFn:n,clickFn:k};d.output(l,g);if(this.onRender)this.onRender();return c},createPanel:function(a){if(!this._.panel){var d=this._.panelDefinition,h=this._.panelDefinition.block,l=d.parent||CKEDITOR.document.getBody(),m="cke_combopanel__"+this.name,k=new CKEDITOR.ui.floatPanel(a,l,d),d=k.addListBlock(this.id,h),e=this;k.onShow=function(){this.element.addClass(m);e.setState(CKEDITOR.TRISTATE_ON);e._.on=1;e.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(e.onOpen)e.onOpen()};
k.onHide=function(c){this.element.removeClass(m);e.setState(e.modes&&e.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e._.on=0;if(!c&&e.onClose)e.onClose()};k.onEscape=function(){k.hide(1)};d.onClick=function(a,b){e.onClick&&e.onClick.call(e,a,b);k.hide()};this._.panel=k;this._.list=d;k.getBlock(this.id).onHide=function(){e._.on=0;e.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,d){this._.value=a;var h=this.document.getById("cke_"+this.id+"_text");h&&
(a||d?h.removeClass("cke_combo_inlinelabel"):(d=this.label,h.addClass("cke_combo_inlinelabel")),h.setText("undefined"!=typeof d?d:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,d,h){this._.items[a]=h||a;this._.list.add(a,d,h)},startGroup:function(a){this._.list.startGroup(a)},
commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var d=this.document.getById("cke_"+this.id);d.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled");this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=
CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,d){this.add(a,CKEDITOR.UI_RICHCOMBO,d)}}(),function(){function a(a,g,h,l,m,k,e,c){var f=a.config,n=new CKEDITOR.style(e),v=m.split(";");m=[];for(var u={},w=0;w<v.length;w++){var t=v[w];if(t){var t=t.split("/"),p={},q=v[w]=t[0];p[h]=m[w]=t[1]||q;u[q]=new CKEDITOR.style(e,p);
u[q]._.definition.name=q}else v.splice(w--,1)}a.ui.addRichCombo(g,{label:l.label,title:l.panelTitle,toolbar:"styles,"+c,allowedContent:n,requiredContent:n,contentTransformations:[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&
(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]],panel:{css:[CKEDITOR.skin.getPath("editor")].concat(f.contentsCss),multiSelect:!1,attributes:{"aria-label":l.panelTitle}},init:function(){this.startGroup(l.panelTitle);for(var a=0;a<v.length;a++){var b=v[a];this.add(b,u[b].buildPreview(),b)}},onClick:function(c){a.focus();a.fire("saveSnapshot");var e=this.getValue(),f=u[c];if(e&&c!=e){var g=
u[e],k=a.getSelection().getRanges()[0];if(k.collapsed){var h=a.elementPath(),l=h.contains(function(a){return g.checkElementRemovable(a)});if(l){var m=k.checkBoundaryOfElement(l,CKEDITOR.START),n=k.checkBoundaryOfElement(l,CKEDITOR.END);if(m&&n){for(m=k.createBookmark();h=l.getFirst();)h.insertBefore(l);l.remove();k.moveToBookmark(m)}else m||n?k.moveToPosition(l,m?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(k.splitElement(l),k.moveToPosition(l,CKEDITOR.POSITION_AFTER_END)),d(k,h.elements.slice(),
l);a.getSelection().selectRanges([k])}}else a.removeStyle(g)}a[e==c?"removeStyle":"applyStyle"](f);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(c){var e=this.getValue();c=c.data.path.elements;for(var f=0,d;f<c.length;f++){d=c[f];for(var g in u)if(u[g].checkElementMatch(d,!0,a)){g!=e&&this.setValue(g);return}}this.setValue("",k)},this)},refresh:function(){a.activeFilter.check(n)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function d(a,g,h){var l=g.pop();if(l){if(h)return d(a,
g,l.equals(h)?null:h);h=l.clone();a.insertNode(h);a.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);d(a,g)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(b){var d=b.config;a(b,"Font","family",b.lang.font,d.font_names,d.font_defaultLabel,d.font_style,30);a(b,"FontSize","size",b.lang.font.fontSize,d.fontSize_sizes,d.fontSize_defaultLabel,d.fontSize_style,40)}})}(),CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif",
CKEDITOR.config.font_defaultLabel="",CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]},CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px",CKEDITOR.config.fontSize_defaultLabel="",CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]},CKEDITOR.plugins.add("htmlwriter",
{init:function(a){var d=new CKEDITOR.htmlWriter;d.forceSimpleAmpersand=a.config.forceSimpleAmpersand;d.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=d}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var a=CKEDITOR.dtd,d;for(d in CKEDITOR.tools.extend({},
a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(d,{indent:!a[d]["#"],breakBeforeOpen:1,breakBeforeClose:!a[d]["#"],breakAfterClose:1,needsSpace:d in a.$block&&!(d in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var d=this._.rules[a];this._.afterCloser&&d&&d.needsSpace&&this._.needsSpace&&
this._.output.push("\n");this._.indent?this.indentation():d&&d.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",a);this._.afterCloser=0},openTagClose:function(a,d){var b=this._.rules[a];d?(this._.output.push(this.selfClosingEnd),b&&b.breakAfterClose&&(this._.needsSpace=b.needsSpace)):(this._.output.push("\x3e"),b&&b.indent&&(this._.indentation+=this.indentationChars));b&&b.breakAfterOpen&&this.lineBreak();"pre"==a&&(this._.inPre=1)},attribute:function(a,d){"string"==
typeof d&&(this.forceSimpleAmpersand&&(d=d.replace(/&amp;/g,"\x26")),d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){var d=this._.rules[a];d&&d.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():d&&d.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",a,"\x3e");"pre"==a&&(this._.inPre=0);d&&d.breakAfterClose&&(this.lineBreak(),this._.needsSpace=d.needsSpace);
this._.afterCloser=1},text:function(a){this._.indent&&(this.indentation(),!this._.inPre&&(a=CKEDITOR.tools.ltrim(a)));this._.output.push(a)},comment:function(a){this._.indent&&this.indentation();this._.output.push("\x3c!--",a,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[];
this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(a,d){var b=this._.rules[a];b?CKEDITOR.tools.extend(b,d,!0):this._.rules[a]=d}}}),function(){function a(a,h){var l,m;h.on("refresh",function(a){var e=[d],c;for(c in a.data.states)e.push(a.data.states[c]);this.setState(CKEDITOR.tools.search(e,b)?b:d)},h,null,100);h.on("exec",function(b){l=a.getSelection();m=l.createBookmarks(1);b.data||(b.data={});b.data.done=!1},h,null,0);h.on("exec",function(){a.forceNextSelectionCheck();
l.selectBookmarks(m)},h,null,100)}var d=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var d=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new d(!0)));a(b,b.addCommand("outdent",new d));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",
function(a){var d=b.createRange(),k=a.data.node;d.setStartBefore(k);d.setEndAfter(k);for(var e=new CKEDITOR.dom.walker(d),c;c=e.next();)if(c.type==CKEDITOR.NODE_ELEMENT)if(!c.equals(k)&&c.getDirection())d.setStartAfter(c),e=new CKEDITOR.dom.walker(d);else{var f=b.config.indentClasses;if(f)for(var h="ltr"==a.data.dir?["_rtl",""]:["","_rtl"],v=0;v<f.length;v++)c.hasClass(f[v]+h[0])&&(c.removeClass(f[v]+h[0]),c.addClass(f[v]+h[1]));f=c.getStyle("margin-right");h=c.getStyle("margin-left");f?c.setStyle("margin-left",
f):c.removeStyle("margin-left");h?c.setStyle("margin-right",h):c.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,d){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!d;this.relatedGlobal=d?"indent":"outdent";this.indentKey=d?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,
b){var e=a.getCommand(b.relatedGlobal),c;for(c in b.jobs)e.on("exec",function(e){e.data.done||(a.fire("lockSnapshot"),b.execJob(a,c)&&(e.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,c),e.on("refresh",function(e){e.data.states||(e.data.states={});e.data.states[b.name+"@"+c]=b.refreshJob(a,c,e.data.path)},this,null,c);a.addFeature(b)})(this,b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype=
{execJob:function(a,b){var l=this.jobs[b];if(l.state!=d)return l.exec.call(this,a)},refreshJob:function(a,b,l){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,l):b.state=d;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function a(a,b,e){if(!a.getCustomData("indent_processed")){var c=this.editor,f=this.isIndent;if(b){c=a.$.className.match(this.classNameRegex);e=0;c&&(c=c[1],e=CKEDITOR.tools.indexOf(b,c)+1);if(0>(e+=f?1:-1))return;
e=Math.min(e,b.length);e=Math.max(e,0);a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.classNameRegex,""));0<e&&a.addClass(b[e-1])}else{b=d(a,e);e=parseInt(a.getStyle(b),10);var g=c.config.indentOffset||40;isNaN(e)&&(e=0);e+=(f?1:-1)*g;if(0>e)return;e=Math.max(e,0);e=Math.ceil(e/g)*g;a.setStyle(b,e?e+(c.config.indentUnit||"px"):"");""===a.getAttribute("style")&&a.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,a,"indent_processed",1)}}function d(a,b){return"ltr"==
(b||a.getComputedStyle("direction"))?"margin-left":"margin-right"}var b=CKEDITOR.dtd.$listItem,g=CKEDITOR.dtd.$list,h=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(m){function k(){e.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:c?null:"margin-left,margin-right",classes:c||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],
["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(c?"("+c.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,e){var g=e.block||e.blockLimit;if(!g.is(b))var k=g.getAscendant(b),g=k&&e.contains(k)||
g;g.is(b)&&(g=g.getParent());if(this.enterBr||this.getContext(e)){if(c){var k=c,g=g.$.className.match(this.classNameRegex),m=this.isIndent,k=g?m?g[1]!=k.slice(-1):!0:m;return k?l:h}return this.isIndent?l:g?CKEDITOR[0>=(parseInt(g.getStyle(d(g)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:h}return h},exec:function(b){var e=b.getSelection(),e=e&&e.getRanges()[0],d;if(d=b.elementPath().contains(g))a.call(this,d,c);else for(e=e.createIterator(),b=b.config.enterMode,e.enforceRealBlocks=!0,e.enlargeBr=
b!=CKEDITOR.ENTER_BR;d=e.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)d.isReadOnly()||a.call(this,d,c);return!0}}}}var e=CKEDITOR.plugins.indent,c=m.config.indentClasses;e.registerCommands(m,{indentblock:new k(m,"indentblock",!0),outdentblock:new k(m,"outdentblock")});CKEDITOR.tools.extend(k.prototype,e.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:c?new RegExp("(?:^|\\s+)("+c.join("|")+")(?\x3d$|\\s)"):null})}})}(),
function(){function a(a){function e(e){for(var d=h.startContainer,l=h.endContainer;d&&!d.getParent().equals(e);)d=d.getParent();for(;l&&!l.getParent().equals(e);)l=l.getParent();if(!d||!l)return!1;for(var m=d,d=[],w=!1;!w;)m.equals(l)&&(w=!0),d.push(m),m=m.getNext();if(1>d.length)return!1;m=e.getParents(!0);for(l=0;l<m.length;l++)if(m[l].getName&&g[m[l].getName()]){e=m[l];break}for(var m=c.isIndent?1:-1,l=d[0],d=d[d.length-1],w=CKEDITOR.plugins.list.listToArray(e,f),t=w[d.getCustomData("listarray_index")].indent,
l=l.getCustomData("listarray_index");l<=d.getCustomData("listarray_index");l++)if(w[l].indent+=m,0<m){var E=w[l].parent;w[l].parent=new CKEDITOR.dom.element(E.getName(),E.getDocument())}for(l=d.getCustomData("listarray_index")+1;l<w.length&&w[l].indent>t;l++)w[l].indent+=m;d=CKEDITOR.plugins.list.arrayToList(w,f,null,a.config.enterMode,e.getDirection());if(!c.isIndent){var z;if((z=e.getParent())&&z.is("li"))for(var m=d.listNode.getChildren(),u=[],B,l=m.count()-1;0<=l;l--)(B=m.getItem(l))&&B.is&&B.is("li")&&
u.push(B)}d&&d.listNode.replace(e);if(u&&u.length)for(l=0;l<u.length;l++){for(B=e=u[l];(B=B.getNext())&&B.is&&B.getName()in g;)CKEDITOR.env.needsNbspFiller&&!e.getFirst(b)&&e.append(h.document.createText(" ")),e.append(B);e.insertAfter(z)}d&&a.fire("contentDomInvalidated");return!0}for(var c=this,f=this.database,g=this.context,h,l=a.getSelection(),l=(l&&l.getRanges()).createIterator();h=l.getNextRange();){for(var m=h.getCommonAncestor();m&&(m.type!=CKEDITOR.NODE_ELEMENT||!g[m.getName()]);){if(a.editable().equals(m)){m=
!1;break}m=m.getParent()}m||(m=h.startPath().contains(g))&&h.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);if(!m){var t=h.getEnclosedNode();t&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in g&&(h.setStartAt(t,CKEDITOR.POSITION_AFTER_START),h.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),m=t)}m&&h.startContainer.type==CKEDITOR.NODE_ELEMENT&&h.startContainer.getName()in g&&(t=new CKEDITOR.dom.walker(h),t.evaluator=d,h.startContainer=t.next());m&&h.endContainer.type==CKEDITOR.NODE_ELEMENT&&h.endContainer.getName()in
g&&(t=new CKEDITOR.dom.walker(h),t.evaluator=d,h.endContainer=t.previous());if(m)return e(m)}return 0}function d(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function b(a){return g(a)&&h(a)}var g=CKEDITOR.dom.walker.whitespaces(!0),h=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function e(b){c.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];b.on("key",
function(a){var c=b.elementPath();if("wysiwyg"==b.mode&&a.data.keyCode==this.indentKey&&c){var e=this.getContext(c);!e||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,e)||(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),e=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!e?m:l}:function(a,b){return!this.getContext(b)||this.isIndent?l:m},
exec:CKEDITOR.tools.bind(a,this)}}var c=CKEDITOR.plugins.indent;c.registerCommands(b,{indentlist:new e(b,"indentlist",!0),outdentlist:new e(b,"outdentlist")});CKEDITOR.tools.extend(e.prototype,c.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,c){var f=b.contains(d);c||(c=b.contains(a));return c&&f&&f.equals(c.getFirst(d))}}(),function(){function a(a,b){b=void 0===b||b;var d;if(b)d=a.getComputedStyle("text-align");
else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){d=a.getParent();if(!d)break;a=d}d=a.getStyle("text-align")||a.getAttribute("align")||""}d&&(d=d.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!d&&b&&(d="rtl"==a.getComputedStyle("direction")?"right":"left");return d}function d(a,b,d){this.editor=a;this.name=b;this.value=d;this.context="p";b=a.config.justifyClasses;var m=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(d){case "left":this.cssClassName=
b[0];break;case "center":this.cssClassName=b[1];break;case "right":this.cssClassName=b[2];break;case "justify":this.cssClassName=b[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+b.join("|")+")(?\x3d$|\\s)");this.requiredContent=m+"("+this.cssClassName+")"}else this.requiredContent=m+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};a.config.enterMode==CKEDITOR.ENTER_BR&&
(this.allowedContent.div=!0)}function b(a){var b=a.editor,d=b.createRange();d.setStartBefore(a.data.node);d.setEndAfter(a.data.node);for(var m=new CKEDITOR.dom.walker(d),k;k=m.next();)if(k.type==CKEDITOR.NODE_ELEMENT)if(!k.equals(a.data.node)&&k.getDirection())d.setStartAfter(k),m=new CKEDITOR.dom.walker(d);else{var e=b.config.justifyClasses;e&&(k.hasClass(e[0])?(k.removeClass(e[0]),k.addClass(e[2])):k.hasClass(e[2])&&(k.removeClass(e[2]),k.addClass(e[0])));e=k.getStyle("text-align");"left"==e?k.setStyle("text-align",
"right"):"right"==e&&k.setStyle("text-align","left")}}d.prototype={exec:function(b){var d=b.getSelection(),l=b.config.enterMode;if(d){for(var m=d.createBookmarks(),k=d.getRanges(),e=this.cssClassName,c,f,n=b.config.useComputedState,n=void 0===n||n,v=k.length-1;0<=v;v--)for(c=k[v].createIterator(),c.enlargeBr=l!=CKEDITOR.ENTER_BR;f=c.getNextParagraph(l==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){var u=f.getName(),w;w=b.activeFilter.check(u+"{text-align}");if((u=b.activeFilter.check(u+"("+e+")"))||
w){f.removeAttribute("align");f.removeStyle("text-align");var t=e&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),p=this.state==CKEDITOR.TRISTATE_OFF&&(!n||a(f,!0)!=this.value);e&&u?p?f.addClass(e):t||f.removeAttribute("class"):p&&w&&f.setStyle("text-align",this.value)}}b.focus();b.forceNextSelectionCheck();d.selectBookmarks(m)}},refresh:function(b,d){var l=d.block||d.blockLimit,m=l.getName(),k=l.equals(b.editable()),m=this.cssClassName?b.activeFilter.check(m+"("+
this.cssClassName+")"):b.activeFilter.check(m+"{text-align}");k&&1===d.elements.length?this.setState(CKEDITOR.TRISTATE_OFF):!k&&m?this.setState(a(l,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var h=new d(a,"justifyleft","left"),l=new d(a,"justifycenter","center"),m=new d(a,"justifyright","right"),k=new d(a,"justifyblock","justify");a.addCommand("justifyleft",
h);a.addCommand("justifycenter",l);a.addCommand("justifyright",m);a.addCommand("justifyblock",k);a.ui.addButton&&(a.ui.addButton("JustifyLeft",{label:a.lang.justify.left,command:"justifyleft",toolbar:"align,10"}),a.ui.addButton("JustifyCenter",{label:a.lang.justify.center,command:"justifycenter",toolbar:"align,20"}),a.ui.addButton("JustifyRight",{label:a.lang.justify.right,command:"justifyright",toolbar:"align,30"}),a.ui.addButton("JustifyBlock",{label:a.lang.justify.block,command:"justifyblock",
toolbar:"align,40"}));a.on("dirChanged",b)}}})}(),function(){function a(a,b,c){function e(c){if(!(!(l=h[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 d=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var k=b.contents[g];(k=k.getAscendant("li",!0))&&!k.getCustomData("list_item_processed")&&
(f.push(k),CKEDITOR.dom.element.setMarker(c,k,"list_item_processed",!0))}k=null;for(g=0;g<f.length;g++)k=f[g].getCustomData("listarray_index"),d[k].indent=-1;for(g=k+1;g<d.length;g++)if(d[g].indent>d[g-1].indent+1){f=d[g-1].indent+1-d[g].indent;for(k=d[g].indent;d[g]&&d[g].indent>=k;)d[g].indent+=f,g++;g--}var h=CKEDITOR.plugins.list.arrayToList(d,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;e(!0);e();h.replace(b.root);a.fire("contentDomInvalidated")}function d(a,b){this.name=
a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function b(a,b,c,e){for(var d,f;d=a[e?"getLast":"getFirst"](u);)(f=d.getDirection(1))!==b.getDirection(1)&&d.setAttribute("dir",f),d.remove(),c?d[e?"insertBefore":"insertAfter"](c):b.append(d,e)}function g(a){function c(e){var d=a[e?"getPrevious":"getNext"](f);d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())&&(b(a,d,null,!e),a.remove(),a=d)}c();c(1)}function h(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||
a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(a,c,e){a.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var d=e.extractContents();c.trim(!1,!0);var k=c.createBookmark(),h=new CKEDITOR.dom.elementPath(c.startContainer),l=h.block,h=h.lastElement.getAscendant("li",1)||l,x=new CKEDITOR.dom.elementPath(e.startContainer),v=x.contains(CKEDITOR.dtd.$listItem),x=x.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():x&&(l=x.getPrevious(f))&&n(l)&&
l.remove();(l=d.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=c.startContainer.getChild(c.startOffset))?d.insertBefore(l):c.startContainer.append(d);v&&(d=m(v))&&(h.contains(v)?(b(d,v.getParent(),v),d.remove()):h.append(d));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){x=e.startPath();d=x.block;if(!d)break;d.is("li")&&(h=d.getParent(),d.equals(h.getLast(f))&&d.equals(h.getFirst(f))&&(d=h));e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove()}e=e.clone();d=a.editable();
e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return f(a)&&!n(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&g(e);c.moveToBookmark(k);c.select();a.fire("saveSnapshot")}function m(a){return(a=a.getLast(f))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in k?a:null}var k={ol:1,ul:1},e=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),f=function(a){return!(e(a)||c(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list=
{listToArray:function(a,b,c,e,d){if(!k[a.getName()])return[];e||(e=0);c||(c=[]);for(var f=0,g=a.getChildCount();f<g;f++){var h=a.getChild(f);h.type==CKEDITOR.NODE_ELEMENT&&h.getName()in CKEDITOR.dtd.$list&&CKEDITOR.plugins.list.listToArray(h,b,c,e+1);if("li"==h.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:h,contents:[]};d?l.grandparent=d:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,
h,"listarray_index",c.length);c.push(l);for(var m=0,n=h.getChildCount(),v;m<n;m++)v=h.getChild(m),v.type==CKEDITOR.NODE_ELEMENT&&k[v.getName()]?CKEDITOR.plugins.list.listToArray(v,b,c,e+1,l.grandparent):l.contents.push(v)}}return c},arrayToList:function(a,b,e,d,g){e||(e=0);if(!a||a.length<e+1)return null;for(var h,l=a[e].parent.getDocument(),m=new CKEDITOR.dom.documentFragment(l),n=null,v=e,u=Math.max(a[e].indent,0),B=null,G,H,I=d==CKEDITOR.ENTER_P?"p":"div";;){var J=a[v];h=J.grandparent;G=J.element.getDirection(1);
if(J.indent==u){n&&a[v].parent.getName()==n.getName()||(n=a[v].parent.clone(!1,1),g&&n.setAttribute("dir",g),m.append(n));B=n.append(J.element.clone(0,1));G!=n.getDirection(1)&&B.setAttribute("dir",G);for(h=0;h<J.contents.length;h++)B.append(J.contents[h].clone(1,1));v++}else if(J.indent==Math.max(u,0)+1)J=a[v-1].element.getDirection(1),v=CKEDITOR.plugins.list.arrayToList(a,null,v,d,J!=G?G:null),!B.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=l.$.documentMode&&B.append(l.createText(" ")),B.append(v.listNode),
v=v.nextIndex;else if(-1==J.indent&&!e&&h){k[h.getName()]?(B=J.element.clone(!1,!0),G!=h.getDirection(1)&&B.setAttribute("dir",G)):B=new CKEDITOR.dom.documentFragment(l);var n=h.getDirection(1)!=G,O=J.element,F=O.getAttribute("class"),A=O.getAttribute("style"),R=B.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||n||A||F),Q,T=J.contents.length,P;for(h=0;h<T;h++)if(Q=J.contents[h],c(Q)&&1<T)R?P=Q.clone(1,1):B.append(Q.clone(1,1));else if(Q.type==CKEDITOR.NODE_ELEMENT&&Q.isBlockBoundary()){n&&
!Q.getDirection()&&Q.setAttribute("dir",G);H=Q;var Z=O.getAttribute("style");Z&&H.setAttribute("style",Z.replace(/([^;])$/,"$1;")+(H.getAttribute("style")||""));F&&Q.addClass(F);H=null;P&&(B.append(P),P=null);B.append(Q.clone(1,1))}else R?(H||(H=l.createElement(I),B.append(H),n&&H.setAttribute("dir",G)),A&&H.setAttribute("style",A),F&&H.setAttribute("class",F),P&&(H.append(P),P=null),H.append(Q.clone(1,1))):B.append(Q.clone(1,1));P&&((H||B).append(P),P=null);B.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&
v!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(G=B.getLast())&&G.type==CKEDITOR.NODE_ELEMENT&&G.is("br")&&G.remove(),(G=B.getLast(f))&&G.type==CKEDITOR.NODE_ELEMENT&&G.is(CKEDITOR.dtd.$block)||B.append(l.createElement("br")));G=B.$.nodeName.toLowerCase();"div"!=G&&"p"!=G||B.appendBogus();m.append(B);n=null;v++}else return null;H=null;if(a.length<=v||Math.max(a[v].indent,0)<u)break}if(b)for(a=m.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&
(e=a,l=g=d=void 0,d=e.getDirection()))){for(g=e.getParent();g&&!(l=g.getDirection());)g=g.getParent();d==l&&e.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:m,nextIndex:v}}};var v=/^h[1-6]$/,u=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);d.prototype={exec:function(b){this.refresh(b,b.elementPath());var c=b.config,e=b.getSelection(),d=e&&e.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var h=b.editable();if(h.getFirst(f)){var l=1==d.length&&d[0];(c=l&&l.getEnclosedNode())&&
c.is&&this.type==c.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else c.enterMode==CKEDITOR.ENTER_BR?h.appendBogus():d[0].fixBlock(1,c.enterMode==CKEDITOR.ENTER_P?"p":"div"),e.selectRanges(d)}for(var c=e.createBookmarks(!0),h=[],m={},d=d.createIterator(),n=0;(l=d.getNextRange())&&++n;){var u=l.getBoundaryNodes(),z=u.startNode,C=u.endNode;z.type==CKEDITOR.NODE_ELEMENT&&"td"==z.getName()&&l.setStartAt(u.startNode,CKEDITOR.POSITION_AFTER_START);C.type==CKEDITOR.NODE_ELEMENT&&"td"==C.getName()&&l.setEndAt(u.endNode,
CKEDITOR.POSITION_BEFORE_END);l=l.createIterator();for(l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;u=l.getNextParagraph();)if(!u.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(m,u,"list_block",1);for(var B=b.elementPath(u),z=B.elements,C=0,B=B.blockLimit,G,H=z.length-1;0<=H&&(G=z[H]);H--)if(k[G.getName()]&&B.contains(G)){B.removeCustomData("list_group_object_"+n);(z=G.getCustomData("list_group_object"))?z.contents.push(u):(z={root:G,contents:[u]},h.push(z),CKEDITOR.dom.element.setMarker(m,
G,"list_group_object",z));C=1;break}C||(C=B,C.getCustomData("list_group_object_"+n)?C.getCustomData("list_group_object_"+n).contents.push(u):(z={root:C,contents:[u]},CKEDITOR.dom.element.setMarker(m,C,"list_group_object_"+n,z),h.push(z)))}}for(G=[];0<h.length;)if(z=h.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(k[z.root.getName()]){d=b;n=z;z=m;l=G;C=CKEDITOR.plugins.list.listToArray(n.root,z);B=[];for(u=0;u<n.contents.length;u++)H=n.contents[u],(H=H.getAscendant("li",!0))&&!H.getCustomData("list_item_processed")&&
(B.push(H),CKEDITOR.dom.element.setMarker(z,H,"list_item_processed",!0));for(var H=n.root.getDocument(),I=void 0,J=void 0,u=0;u<B.length;u++){var O=B[u].getCustomData("listarray_index"),I=C[O].parent;I.is(this.type)||(J=H.createElement(this.type),I.copyAttributes(J,{start:1,type:1}),J.removeStyle("list-style-type"),C[O].parent=J)}z=CKEDITOR.plugins.list.arrayToList(C,z,null,d.config.enterMode);C=void 0;B=z.listNode.getChildCount();for(u=0;u<B&&(C=z.listNode.getChild(u));u++)C.getName()==this.type&&
l.push(C);z.listNode.replace(n.root);d.fire("contentDomInvalidated")}else{C=b;l=z;u=G;B=l.contents;d=l.root.getDocument();n=[];1==B.length&&B[0].equals(l.root)&&(z=d.createElement("div"),B[0].moveChildren&&B[0].moveChildren(z),B[0].append(z),B[0]=z);l=l.contents[0].getParent();for(H=0;H<B.length;H++)l=l.getCommonAncestor(B[H].getParent());I=C.config.useComputedState;C=z=void 0;I=void 0===I||I;for(H=0;H<B.length;H++)for(J=B[H];O=J.getParent();){if(O.equals(l)){n.push(J);!C&&J.getDirection()&&(C=1);
J=J.getDirection(I);null!==z&&(z=z&&z!=J?null:J);break}J=O}if(!(1>n.length)){B=n[n.length-1].getNext();H=d.createElement(this.type);u.push(H);for(I=u=void 0;n.length;)u=n.shift(),I=d.createElement("li"),J=u,J.is("pre")||v.test(J.getName())||"false"==J.getAttribute("contenteditable")?u.appendTo(I):(u.copyAttributes(I),z&&u.getDirection()&&(I.removeStyle("direction"),I.removeAttribute("dir")),u.moveChildren(I),u.remove()),I.appendTo(H);z&&C&&H.setAttribute("dir",z);B?H.insertBefore(B):H.appendTo(l)}}else this.state==
CKEDITOR.TRISTATE_ON&&k[z.root.getName()]&&a.call(this,b,z,m);for(H=0;H<G.length;H++)g(G[H]);CKEDITOR.dom.element.clearAllMarkers(m);e.selectBookmarks(c);b.focus()},refresh:function(a,b){var c=b.contains(k,1),e=b.blockLimit||b.root;c&&e.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||(a.addCommand("numberedlist",new d("numberedlist","ol")),a.addCommand("bulletedlist",
new d("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var c=b.data.domEvent.getKey(),e;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var d=a.getSelection().getRanges()[0],g=d&&d.startPath();if(d&&d.collapsed){var v=8==c,u=a.editable(),E=new CKEDITOR.dom.walker(d.clone());
E.evaluator=function(a){return f(a)&&!n(a)};E.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=d.clone();if(v){var z;(z=g.contains(k))&&d.checkBoundaryOfElement(z,CKEDITOR.START)&&(z=z.getParent())&&z.is("li")&&(z=m(z))?(e=z,z=z.getPrevious(f),c.moveToPosition(z&&n(z)?z:e,CKEDITOR.POSITION_BEFORE_START)):(E.range.setStartAt(u,CKEDITOR.POSITION_AFTER_START),E.range.setEnd(d.startContainer,d.startOffset),(z=E.previous())&&z.type==CKEDITOR.NODE_ELEMENT&&(z.getName()in k||
z.is("li"))&&(z.is("li")||(E.range.selectNodeContents(z),E.reset(),E.evaluator=h,z=E.previous()),e=z,c.moveToElementEditEnd(e),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(e)l(a,c,d),b.cancel();else{var C=g.contains(k);C&&d.checkBoundaryOfElement(C,CKEDITOR.START)&&(e=C.getFirst(f),d.checkBoundaryOfElement(e,CKEDITOR.START)&&(z=C.getPrevious(f),m(e)?z&&(d.moveToElementEditEnd(z),d.select()):a.execCommand("outdent"),b.cancel()))}}else if(e=g.contains("li")){if(E.range.setEndAt(u,
CKEDITOR.POSITION_BEFORE_END),v=(u=e.getLast(f))&&h(u)?u:e,g=0,(z=E.next())&&z.type==CKEDITOR.NODE_ELEMENT&&z.getName()in k&&z.equals(u)?(g=1,z=E.next()):d.checkBoundaryOfElement(v,CKEDITOR.END)&&(g=2),g&&z){d=d.clone();d.moveToElementEditStart(z);if(1==g&&(c.optimize(),!c.startContainer.equals(e))){for(e=c.startContainer;e.is(CKEDITOR.dtd.$inline);)C=e,e=e.getParent();C&&c.moveToPosition(C,CKEDITOR.POSITION_AFTER_END)}2==g&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),d.endPath().block&&
d.moveToPosition(d.endPath().block,CKEDITOR.POSITION_AFTER_START));l(a,c,d);b.cancel()}}else E.range.setEndAt(u,CKEDITOR.POSITION_BEFORE_END),(z=E.next())&&z.type==CKEDITOR.NODE_ELEMENT&&z.is(k)&&(z=z.getFirst(f),g.block&&d.checkStartOfBlock()&&d.checkEndOfBlock()?(g.block.remove(),d.moveToElementEditStart(z),d.select()):m(z)?(d.moveToElementEditStart(z),d.select()):(d=d.clone(),d.moveToElementEditStart(z),l(a,c,d)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),function(){CKEDITOR.plugins.add("sourcearea",
{init:function(d){function b(){var a=h&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(d.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var g=CKEDITOR.plugins.sourcearea;d.addMode("source",function(g){var h=d.ui.space("contents").getDocument().createElement("textarea");h.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",
height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",d.config.sourceAreaTabSize||4)));h.setAttribute("dir","ltr");h.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");d.ui.space("contents").append(h);h=d.editable(new a(d,h));h.setData(d.getData(1));CKEDITOR.env.ie&&(h.attachListener(d,"resize",b,h),h.attachListener(CKEDITOR.document.getWindow(),"resize",b,h),CKEDITOR.tools.setTimeout(b,0,h));d.fire("ariaWidget",this);
g()});d.addCommand("source",g.commands.source);d.ui.addButton&&d.ui.addButton("Source",{label:d.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});d.on("mode",function(){d.getCommand("source").setState("source"==d.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var h=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var a=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},
insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){a.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(a){"wysiwyg"==a.mode&&a.fire("saveSnapshot");a.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);a.setMode("source"==a.mode?"wysiwyg":
"source")},canUndo:!1}}},"use strict",function(){var a=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],d={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(d){function e(a){f.enabled&&!1!==a.data.command.canUndo&&f.save()}function c(){f.enabled=d.readOnly?!1:"wysiwyg"==d.mode;f.onChange()}var f=d.undoManager=new b(d),g=f.editingHandler=new l(f),h=d.addCommand("undo",{exec:function(){f.undo()&&(d.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=d.addCommand("redo",
{exec:function(){f.redo()&&(d.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});d.setKeystroke([[a[0],"undo"],[a[1],"redo"],[a[2],"redo"]]);f.onChange=function(){h.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};d.on("beforeCommandExec",e);d.on("afterCommandExec",e);d.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});d.on("contentDom",g.attachListeners,g);d.on("instanceReady",
function(){d.fire("saveSnapshot")});d.on("beforeModeUnload",function(){"wysiwyg"==d.mode&&f.save(!0)});d.on("mode",c);d.on("readOnly",c);d.ui.addButton&&(d.ui.addButton("Undo",{label:d.lang.undo.undo,command:"undo",toolbar:"undo,10"}),d.ui.addButton("Redo",{label:d.lang.undo.redo,command:"redo",toolbar:"undo,20"}));d.resetUndo=function(){f.reset();d.fire("saveSnapshot")};d.on("updateSnapshot",function(){f.currentImage&&f.update()});d.on("lockSnapshot",function(a){a=a.data;f.lock(a&&a.dontUpdate,a&&
a.forceUpdate)});d.on("unlockSnapshot",f.unlock,f)}});CKEDITOR.plugins.undo={};var b=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this.editor=a;this.reset()};b.prototype={type:function(a,e){var c=b.getKeyGroup(a),d=this.strokesRecorded[c]+1;e=e||d>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());e?(d=0,this.editor.fire("saveSnapshot")):
this.editor.fire("change");this.strokesRecorded[c]=d;this.previousKeyGroup=c},keyGroupChanged:function(a){return b.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},
save:function(a,b,c){var d=this.editor;if(this.locked||"ready"!=d.status||"wysiwyg"!=d.mode)return!1;var h=d.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;b||(b=new g(d));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==c&&d.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();
return!0},restoreImage:function(a){var b=this.editor,c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;
if(c)if(a)for(d=this.index-1;0<=d;d--){if(a=b[d],!c.equalsContent(a))return a.index=d,a}else for(d=this.index+1;d<b.length;d++)if(a=b[d],!c.equalsContent(a))return a.index=d,a;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var a=this.getNextImage(!0);if(a)return this.restoreImage(a),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var a=this.getNextImage(!1);
if(a)return this.restoreImage(a),!0}return!1},update:function(a){if(!this.locked){a||(a=new g(this.editor));for(var b=this.index,c=this.snapshots;0<b&&this.currentImage.equalsContent(c[b-1]);)--b;c.splice(b,this.index-b+1,a);this.index=b;this.currentImage=a}},updateSelection:function(a){if(!this.snapshots.length)return!1;var b=this.snapshots,c=b[b.length-1];return c.equalsContent(a)&&!c.equalsSelection(a)?(this.currentImage=b[b.length-1]=a,!0):!1},lock:function(a,b){if(this.locked)this.locked.level++;
else if(a)this.locked={level:1};else{var c=null;if(b)c=!0;else{var d=new g(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(d)&&(c=d)}this.locked={update:c,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var a=this.locked.update;this.locked=null;if(!0===a)this.update();else if(a){var b=new g(this.editor,!0);a.equalsContent(b)||this.update()}}}};b.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};b.keyGroups={PRINTABLE:0,FUNCTIONAL:1};b.isNavigationKey=
function(a){return!!b.navigationKeyCodes[a]};b.getKeyGroup=function(a){var e=b.keyGroups;return d[a]?e.FUNCTIONAL:e.PRINTABLE};b.getOppositeKeyGroup=function(a){var d=b.keyGroups;return a==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};b.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&b.getKeyGroup(a)==b.keyGroups.FUNCTIONAL};var g=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");var c=a.getSnapshot();CKEDITOR.env.ie&&c&&(c=c.replace(/\s+data-cke-expando=".*?"/g,""));
this.contents=c;b||(this.bookmarks=(c=c&&a.getSelection())&&c.createBookmarks2(!0));a.fire("afterUndoImage")},h=/\b(?:href|src|name)="[^"]*?"/gi;g.prototype={equalsContent:function(a){var b=this.contents;a=a.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(b=b.replace(h,""),a=a.replace(h,""));return b!=a?!1:!0},equalsSelection:function(a){var b=this.bookmarks;a=a.bookmarks;if(b||a){if(!b||!a||b.length!=a.length)return!1;for(var c=0;c<b.length;c++){var d=b[c],g=a[c];if(d.startOffset!=
g.startOffset||d.endOffset!=g.endOffset||!CKEDITOR.tools.arrayCompare(d.start,g.start)||!CKEDITOR.tools.arrayCompare(d.end,g.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new m;this.lastKeydownImage=null};l.prototype={onKeydown:function(d){var e=d.data.getKey();if(229!==e)if(-1<CKEDITOR.tools.indexOf(a,d.data.getKeystroke()))d.data.preventDefault();else if(this.keyEventsStack.cleanUp(d),d=this.undoManager,
this.keyEventsStack.getLast(e)||this.keyEventsStack.push(e),this.lastKeydownImage=new g(d.editor),b.isNavigationKey(e)||this.undoManager.keyGroupChanged(e))if(d.strokesRecorded[0]||d.strokesRecorded[1])d.save(!1,this.lastKeydownImage,!1),d.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&
(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var d=this.undoManager;a=a.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new g(d.editor,!0))))if(0<c)d.type(a);else if(b.isNavigationKey(a))this.onNavigationKey(!0)},onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new g(b.editor));
b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var a=this.undoManager.editor,d=a.editable(),c=this;d.attachListener(d,"keydown",function(a){c.onKeydown(a);if(b.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);a.on("afterPaste",c.activateInputEventListener,c,null,999);d.attachListener(d.isInline()?d:a.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(a){a=this.stack.push({keyCode:a,inputs:0});return this.stack[a-
1]},getLastIndex:function(a){if("number"!=typeof a)return this.stack.length-1;for(var b=this.stack.length;b--;)if(this.stack[b].keyCode==a)return b;return-1},getLast:function(a){a=this.getLastIndex(a);return-1!=a?this.stack[a]:null},increment:function(a){this.getLast(a).inputs++},remove:function(a){a=this.getLastIndex(a);-1!=a&&this.stack.splice(a,1)},resetInputs:function(a){if("number"==typeof a)this.getLast(a).inputs=0;else for(a=this.stack.length;a--;)this.stack[a].inputs=0},getTotalInputs:function(){for(var a=
this.stack.length,b=0;a--;)b+=this.stack[a].inputs;return b},cleanUp:function(a){a=a.data.$;a.ctrlKey||a.metaKey||this.remove(17);a.shiftKey||this.remove(16);a.altKey||this.remove(18)}}}(),"use strict",function(){function a(a,b){CKEDITOR.tools.extend(this,{editor:a,editable:a.editable(),doc:a.document,win:a.window},b,!0);this.inline=this.editable.isInline();this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function d(a,b){CKEDITOR.tools.extend(this,b,{editor:a},
!0)}function b(a,b){var d=a.editable();CKEDITOR.tools.extend(this,{editor:a,editable:d,inline:d.isInline(),doc:a.document,win:a.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},b,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var g=CKEDITOR.tools.bind(this.queryViewport,this),k=CKEDITOR.tools.bind(this.hideVisible,this),m=CKEDITOR.tools.bind(this.removeAll,this);d.attachListener(this.winTop,"resize",g);d.attachListener(this.winTop,
"scroll",g);d.attachListener(this.winTop,"resize",k);d.attachListener(this.win,"scroll",k);d.attachListener(this.inline?d: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);d.attachListener(a,"resize",g);d.attachListener(a,"mode",m);a.on("destroy",m);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({},h,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,
!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},h,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function g(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(m[a.getComputedStyle("float")]||m[a.getAttribute("align")]);return b&&!k[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;a.prototype={start:function(a){var b=
this,d=this.editor,g=this.doc,h,k,l,m,p=CKEDITOR.tools.eventsBuffer(50,function(){d.readOnly||"wysiwyg"!=d.mode||(b.relations={},(k=g.$.elementFromPoint(l,m))&&k.nodeType&&(h=new CKEDITOR.dom.element(k),b.traverseSearch(h),isNaN(l+m)||b.pixelSearch(h,l,m),a&&a(b.relations,l,m)))});this.listener=this.editable.attachListener(this.target,"mousemove",function(a){l=a.data.$.clientX;m=a.data.$.clientY;p.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){p.reset()})},
stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var d=this.editor.createRange();d.moveToPosition(this.relations[b.uid].element,a[b.type]);return d}}(),store:function(){function a(b,d,e){var g=b.getUniqueId();g in e?e[g].type|=d:e[g]={element:b,type:d}}return function(b,
d){var h;d&CKEDITOR.LINEUTILS_AFTER&&g(h=b.getNext())&&h.isVisible()&&(a(h,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_AFTER);d&CKEDITOR.LINEUTILS_INSIDE&&g(h=b.getFirst())&&h.isVisible()&&(a(h,CKEDITOR.LINEUTILS_BEFORE,this.relations),d^=CKEDITOR.LINEUTILS_INSIDE);a(b,d,this.relations)}}(),traverseSearch:function(a){var b,d,h;do if(h=a.$["data-cke-expando"],!(h&&h in this.relations)){if(a.equals(this.editable))break;if(g(a))for(b in this.lookups)(d=this.lookups[b](a))&&this.store(a,
d)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(d,e,h,k,l){for(var m=0,p;l(h);){h+=k;if(25==++m)break;if(p=this.doc.$.elementFromPoint(e,h))if(p==d)m=0;else if(b(d,p)&&(m=0,g(p=new CKEDITOR.dom.element(p))))return p}}var b=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(b,c,d){var h=this.win.getViewPaneSize().height,
k=a.call(this,b.$,c,d,-1,function(a){return 0<a});c=a.call(this,b.$,c,d,1,function(a){return a<h});if(k)for(this.traverseSearch(k);!k.getParent().equals(b);)k=k.getParent();if(c)for(this.traverseSearch(c);!c.getParent().equals(b);)c=c.getParent();for(;k||c;){k&&(k=k.getNext(g));if(!k||k.equals(c))break;this.traverseSearch(k);c&&(c=c.getPrevious(g));if(!c||c.equals(k))break;this.traverseSearch(c)}}}(),greedySearch:function(){this.relations={};for(var a=this.editable.getElementsByTag("*"),b=0,d,h,k;d=
a.getItem(b++);)if(!d.equals(this.editable)&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasAttribute("contenteditable")||!d.isReadOnly())&&g(d)&&d.isVisible())for(k in this.lookups)(h=this.lookups[k](d))&&this.store(d,h);return this.relations}};d.prototype={locate:function(){function a(b,d){var e=b.element[d===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&g(e)?(b.siblingRect=e.getClientRect(),d==CKEDITOR.LINEUTILS_BEFORE?(b.siblingRect.bottom+b.elementRect.top)/2:(b.elementRect.bottom+b.siblingRect.top)/
2):d==CKEDITOR.LINEUTILS_BEFORE?b.elementRect.top:b.elementRect.bottom}return function(b){var d;this.locations={};for(var g in b)d=b[g],d.elementRect=d.element.getClientRect(),d.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(g,CKEDITOR.LINEUTILS_BEFORE,a(d,CKEDITOR.LINEUTILS_BEFORE)),d.type&CKEDITOR.LINEUTILS_AFTER&&this.store(g,CKEDITOR.LINEUTILS_AFTER,a(d,CKEDITOR.LINEUTILS_AFTER)),d.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(g,CKEDITOR.LINEUTILS_INSIDE,(d.elementRect.top+d.elementRect.bottom)/2);return this.locations}}(),
sort:function(){var a,b,d,g;return function(h,k){a=this.locations;b=[];for(var l in a)for(var m in a[l])if(d=Math.abs(h-a[l][m]),b.length){for(g=0;g<b.length;g++)if(d<b[g].dist){b.splice(g,0,{uid:+l,type:m,dist:d});break}g==b.length&&b.push({uid:+l,type:m,dist:d})}else b.push({uid:+l,type:m,dist:d});return"undefined"!=typeof k?b.slice(0,k):b}}(),store:function(a,b,d){this.locations[a]||(this.locations[a]={});this.locations[a][b]=d}};var h={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};b.prototype={removeAll:function(){for(var a in this.hidden)this.hidden[a].remove(),delete this.hidden[a];for(a in this.visible)this.visible[a].remove(),delete this.visible[a]},hideLine:function(a){var b=a.getUniqueId();a.hide();this.hidden[b]=a;delete this.visible[b]},showLine:function(a){var b=a.getUniqueId();a.show();this.visible[b]=a;delete this.hidden[b]},hideVisible:function(){for(var a in this.visible)this.hideLine(this.visible[a])},
placeLine:function(a,b){var d,g,h;if(d=this.getStyle(a.uid,a.type)){for(h in this.visible)if(this.visible[h].getCustomData("hash")!==this.hash){g=this.visible[h];break}if(!g)for(h in this.hidden)if(this.hidden[h].getCustomData("hash")!==this.hash){this.showLine(g=this.hidden[h]);break}g||this.showLine(g=this.addLine());g.setCustomData("hash",this.hash);this.visible[g.getUniqueId()]=g;g.setStyles(d);b&&b(g)}},getStyle:function(a,b){var d=this.relations[a],g=this.locations[a][b],h={};h.width=d.siblingRect?
Math.max(d.siblingRect.width,d.elementRect.width):d.elementRect.width;h.top=this.inline?g+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+g;if(h.top-this.winTopScroll.y<this.rect.top||h.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?h.left=d.elementRect.left-this.rect.relativeX:(0<d.elementRect.left?h.left=this.rect.left+d.elementRect.left:(h.width+=d.elementRect.left,h.left=this.rect.left),0<(d=h.left+h.width-(this.rect.left+this.winPane.width))&&(h.width-=
d));h.left+=this.winTopScroll.x;for(var k in h)h[k]=CKEDITOR.tools.cssLength(h[k]);return h},addLine:function(){var a=CKEDITOR.dom.element.createFromHtml(this.lineTpl);a.appendTo(this.container);return a},prepare:function(a,b){this.relations=a;this.locations=b;this.hash=Math.random()},cleanup:function(){var a,b;for(b in this.visible)a=this.visible[b],a.getCustomData("hash")!==this.hash&&this.hideLine(a)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();
this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(a){a=a.getClientRect();var b=this.container.getDocumentPosition(),d=this.container.getComputedStyle("position");a.relativeX=a.relativeY=0;"static"!=d&&(a.relativeY=b.y,a.relativeX=b.x,a.top-=a.relativeY,a.bottom-=a.relativeY,a.left-=a.relativeX,a.right-=a.relativeX);return a}};var m={left:1,right:1,center:1},k={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:a,
locator:d,liner:b}}(),function(){function a(a){return a.getName&&!a.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(a){if(CKEDITOR.env.webkit){var b=CKEDITOR.plugins.widgetselection;a.on("contentDom",function(a){a=a.editor;var d=a.document,l=a.editable();l.attachListener(d,"keydown",function(a){var d=a.data.$;65==a.data.getKey()&&(CKEDITOR.env.mac&&d.metaKey||!CKEDITOR.env.mac&&d.ctrlKey&&!d.altKey)&&CKEDITOR.tools.setTimeout(function(){b.addFillers(l)||b.removeFillers(l)},
0)},null,null,-1);a.on("selectionCheck",function(a){b.removeFillers(a.editor.editable())});a.on("paste",function(a){a.data.dataValue=b.cleanPasteData(a.data.dataValue)});"selectall"in a.plugins&&b.addSelectAllIntegration(a)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(d){var b=d.editor;if(!this.isWholeContentSelected(d)&&0<d.getChildCount()){var g=d.getFirst(a),h=d.getLast(a);
g&&g.type==CKEDITOR.NODE_ELEMENT&&!g.isEditable()&&(this.startFiller=this.createFiller(),d.append(this.startFiller,1));h&&h.type==CKEDITOR.NODE_ELEMENT&&!h.isEditable()&&(this.endFiller=this.createFiller(!0),d.append(this.endFiller,0));if(this.hasFiller(d))return b=b.createRange(),b.selectNodeContents(d),b.select(),!0}return!1},removeFillers:function(a){if(this.hasFiller(a)&&!this.isWholeContentSelected(a)){var b=a.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),g=a.findOne(this.fillerTagName+
"["+this.fillerAttribute+"\x3dend]");this.startFiller&&b&&this.startFiller.equals(b)?this.removeFiller(this.startFiller,a):this.startFiller=b;this.endFiller&&g&&this.endFiller.equals(g)?this.removeFiller(this.endFiller,a):this.endFiller=g}},cleanPasteData:function(a){a&&a.length&&(a=a.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));return a},isWholeContentSelected:function(a){var b=a.editor.getSelection().getRanges()[0];return!b||b&&b.collapsed?!1:(b=b.clone(),b.enlarge(CKEDITOR.ENLARGE_ELEMENT),
!!(b&&a&&b.startContainer&&b.endContainer&&0===b.startOffset&&b.endOffset===a.getChildCount()&&b.startContainer.equals(a)&&b.endContainer.equals(a)))},hasFiller:function(a){return 0<a.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(a){var b=new CKEDITOR.dom.element(this.fillerTagName);b.setHtml(this.fillerContent);b.setAttribute(this.fillerAttribute,a?"end":"start");b.setAttribute("data-cke-temp",1);b.setStyles({display:"block",width:0,height:0,padding:0,border:0,
margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return b},removeFiller:function(a,b){if(a){var g=b.editor,h=b.editor.getSelection().getRanges()[0].startPath(),l=g.createRange(),m,k;h.contains(a)&&(m=a.getHtml(),k=!0);h="start"==a.getAttribute(this.fillerAttribute);a.remove();m&&0<m.length&&m!=this.fillerContent?(b.insertHtmlIntoRange(m,g.getSelection().getRanges()[0]),l.setStartAt(b.getChild(b.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),g.getSelection().selectRanges([l])):
k&&(h?l.setStartAt(b.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):l.setEndAt(b.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),b.editor.getSelection().selectRanges([l]))}},createFillerRegex:function(a){var b=this.createFiller(a).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((a?"":"^")+b+(a?"$":""))},addSelectAllIntegration:function(a){var b=this;a.editable().attachListener(a,"beforeCommandExec",function(g){var h=
a.editable();"selectAll"==g.data.name&&h&&b.addFillers(h)},null,null,9999)}}}(),"use strict",function(){function a(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};E(this);x(this);this.on("checkWidgets",m);this.editor.on("contentDomInvalidated",this.checkWidgets,this);r(this);q(this);y(this);p(this);D(this)}function d(a,b,c,e,f){var g=a.editor;CKEDITOR.tools.extend(this,
e,{editor:g,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof e.defaults?e.defaults():e.defaults),dataReady:!1,inited:!1,ready:!1,edit:d.prototype.edit,focusedEditable:null,definition:e,repository:a,draggable:!1!==e.draggable,_:{downcastFn:e.downcast&&"string"==typeof e.downcast?e.downcasts[e.downcast]:e.downcast}},!0);a.fire("instanceCreated",this);Z(this,e);this.init&&this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));
f&&this.setData(f);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;X(this);this.fire("data",this.data);this.isInited()&&g.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function b(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 g(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(h)}var e=a.widgets.focused;if(e&&e.name==b.name)e.edit();else if(b.insert)b.insert();else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.dom.element.createFromHtml(b.template.output(e)),f,g=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(e,b,c&&
c.startupData))?(e=f.once("edit",function(b){if(b.data.dialog)f.once("dialog",function(b){b=b.data;var c,e;c=b.once("ok",d,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(f,!0)});b.once("hide",function(){c.removeListener();e.removeListener()})});else d()},null,null,999),f.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent,requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function h(a,
b){function c(b,d,e){var f=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[b,d,e])}var d=b.upcast,e=b.upcastPriority||10;if(d)if("string"==typeof d)for(d=d.split(",");d.length;)c(b.upcasts[d.pop()],b.name,e);else c(d,b.name,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,e,f,g,h;if(b){for(e in c)c[e].isReady()&&!b.contains(c[e].wrapper)&&this.destroy(c[e],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];e=0;for(f=k.count();e<f;e++){g=k.getItem(e);if(h=!this.getByElement(g,!0)){a:{h=v;for(var l=g;l=l.getParent();)if(h(l)){h=!0;break a}h=!1}h=!h}h&&b.contains(g)&&(g.addClass("cke_widget_new"),c.push(this.initOn(g.getFirst(d.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}
function k(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 e(a){var b=[],c=a._.upcasts,e=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var f,g,h,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(d.isParserWidgetElement))&&b.push([a]),
!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(f=e.length;k<f;++k)if(!1===e[k](a))return;for(k=0;k<l;++k)if(f=c[k],h={},g=f[0](a,h))return g instanceof CKEDITOR.htmlParser.element&&(a=g),a.attributes["data-cke-widget-data"]=encodeURIComponent(JSON.stringify(h)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,f[1]]),!1}}}}function c(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 f(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length||d.remove();return f(e,b,c)}}a.add(c,b)}function n(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function v(a){return a.hasAttribute("data-cke-temp")}function u(a,
b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"),b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function w(a){a.contextMenu&&
a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function t(a,b){return CKEDITOR.tools.trim(b)}function p(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var e=c.data.target;d.isDomDragHandler(e)&&(e=a.getByElement(e),c.data.dataTransfer.setData("cke/widget-id",e.id),b.focus(),e.focus())});b.on("drop",function(c){var d=c.data.dataTransfer,e=d.getData("cke/widget-id"),f=d.getTransferType(b),d=b.createRange();""!==
e&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c.cancel():""!==e&&f==CKEDITOR.DATA_TRANSFER_INTERNAL&&(e=a.instances[e])&&(d.setStartBefore(e.wrapper),d.setEndAfter(e.wrapper),c.data.dragRange=d,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html",b.editable().getHtmlFromRange(d).getHtml()),b.widgets.destroy(e,!0))});b.on("contentDom",function(){var e=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)&&!d.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=d.getNestedEditable(e,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},
tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function q(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),e=c.isInline()?c:b.document,f,g;c.attachListener(e,"mousedown",function(c){var e=c.data.getTarget();f=e instanceof CKEDITOR.dom.element?a.getByElement(e):null;g=0;f&&(f.inline&&e.type==CKEDITOR.NODE_ELEMENT&&e.hasAttribute("data-cke-widget-drag-handler")?(g=1,a.focused!=f&&b.getSelection().removeAllRanges()):d.getNestedEditable(f.wrapper,
e)?f=null:(c.data.preventDefault(),CKEDITOR.env.ie||f.focus()))});c.attachListener(e,"mouseup",function(){g&&f&&f.wrapper&&(g=0,f.focus())});CKEDITOR.env.ie&&c.attachListener(e,"mouseup",function(){setTimeout(function(){f&&f.wrapper&&c.contains(f.wrapper)&&(f.focus(),f=null)})})});b.on("doubleclick",function(b){var c=a.getByElement(b.data.element);if(c&&!d.getNestedEditable(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function y(a){a.editor.on("key",
function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function D(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 r(a){var b=a.editor;b.on("selectionCheck",function(){a.fire("checkSelection")});a.on("checkSelection",a.checkSelection,a);b.on("selectionChange",function(c){var e=(c=d.getNestedEditable(b.editable(),c.data.selection.getStartElement()))&&a.getByElement(c),f=a.widgetHoldingFocusedEditable;f?f===e&&f.focusedEditable.equals(c)||(u(a,f,null),e&&c&&
u(a,e,c)):e&&c&&u(a,e,c)});b.on("dataReady",function(){z(a).commit()});b.on("blur",function(){var b;(b=a.focused)&&l(a,b);(b=a.widgetHoldingFocusedEditable)&&u(a,b,null)})}function x(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(),f=[];b.data.downcastingSessionId=e;c[e]=f;b.data.dataValue.forEach(function(b){var c=b.attributes,e;if("data-cke-widget-id"in c){if(c=a.instances[c["data-cke-widget-id"]])e=b.getFirst(d.isParserWidgetElement),f.push({wrapper:b,
element:e,widget:c,editables:{}}),"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in c)return f[f.length-1].editables[c["data-cke-widget-editable"]]=b,!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId){a=c[a.data.downcastingSessionId];for(var b,d,e,f,g,h;b=a.shift();){d=b.widget;e=b.element;f=d._.downcastFn&&d._.downcastFn.call(d,e);for(h in b.editables)g=b.editables[h],delete g.attributes.contenteditable,
g.setHtml(d.editables[h].getData());f||(f=e);b.wrapper.replaceWith(f)}}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function E(a){var b=a.editor,c,f;b.on("toHtml",function(b){var f=e(a),g;for(b.data.dataValue.forEach(f.iterator,CKEDITOR.NODE_ELEMENT,!0);g=f.toBeWrapped.pop();){var h=g[0],k=h.parent;k.type==CKEDITOR.NODE_ELEMENT&&k.attributes["data-cke-widget-wrapper"]&&k.replaceWith(h);a.wrapElement(g[0],g[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&
d.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&d.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(f)for(var c=b.editable().find(".cke_widget_wrapper"),e,g,h=0,k=c.count();h<k;++h)e=c.getItem(h),g=e.getFirst(d.isDomWidgetElement),g.type==CKEDITOR.NODE_ELEMENT&&g.data("widget")?(g.replace(e),a.wrapElement(g)):e.remove();f=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&
(f=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(ea,t);a.range&&(a=d.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 z(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>
CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&l(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=
c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function C(a,b,c){var d=0;b=H(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function B(a){a.cancel()}function G(a,b){var c=a.editor,d=c.document;if(!d.getById("cke_copybin")){var e=c.blockless||CKEDITOR.env.ie?"span":"div",f=d.createElement(e),g=d.createElement(e),e=CKEDITOR.env.ie&&9>CKEDITOR.env.version;g.setAttributes({id:"cke_copybin",
"data-cke-temp":"1"});f.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});f.setStyle("ltr"==c.config.contentsLangDirection?"left":"right","-5000px");var h=c.createRange();h.setStartBefore(a.wrapper);h.setEndAfter(a.wrapper);f.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");g.append(f);c.editable().append(g);
var k=c.on("selectionChange",B,null,null,0),l=a.repository.on("checkSelection",B,null,null,0);if(e)var m=d.getDocumentElement().$,n=m.scrollTop;h=c.createRange();h.selectNodeContents(f);h.select();e&&(m.scrollTop=n);setTimeout(function(){b||a.focus();g.remove();k.removeListener();l.removeListener();c.fire("unlockSnapshot");b&&(a.repository.del(a),c.fire("saveSnapshot"))},100)}}function H(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function I(){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 J(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function O(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 F(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 A(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(d.isDomDragHandlerContainer),e;c?e=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)"}),
e=new CKEDITOR.dom.element("img",b.document),e.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&&e.setAttribute("draggable","true"),c.append(e),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&&(e.on("mousedown",R,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))e.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function R(a){function b(){var c;for(p.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");
f.hideVisible();g.fire("dragend",{target:c})}var c=this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),p=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;p.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",
b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}function Q(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 T(a){if(a.mask){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}}function P(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 Z(a,b){aa(a);P(a);Q(a);T(a);A(a);O(a);F(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();d.getNestedEditable(a,c)||a.inline&&d.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 N||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 aa(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function X(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){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 yellow;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid yellow}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #ace}.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}")},
beforeInit:function(b){b.widgets=new a(b)},afterInit:function(a){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});w(a)}});a.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));g(this.editor,b);h(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=z(this),e;if(b&&(e=this.getByElement(b,!0)))return c.focus(e).select(e).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=d.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===
a){var b=a.editor,c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&u(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f<e;++f)(c=this.getByElement(d.getItem(f),
!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&d.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(),
initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var e=this.wrapElement(a,b.name);return e?e.hasClass("cke_widget_new")?(a=new d(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,e=a.count();e--;)(c=this.initOn(a.getItem(e).getFirst(d.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=
Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var d=null,e,g;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");e=this.registered[b];if(!e)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",b);g=n(e,a.getName());d=new CKEDITOR.dom.element(g?"span":"div");d.setAttributes(c(g,b));d.data("cke-display-name",e.pathName?e.pathName:a.getName());a.getParent(!0)&&d.replace(a);a.appendTo(d)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"];e=this.registered[b];
if(!e)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);b&&(a.attributes["data-widget"]=b);g=n(e,a.name);d=new CKEDITOR.htmlParser.element(g?"span":"div",c(g,b));d.attributes["data-cke-display-name"]=e.pathName?e.pathName:a.name;e=a.parent;var h;e&&(h=a.getIndex(),a.remove());d.add(a);e&&f(e,h,d)}return d},_tests_createEditableFilter:k};
CKEDITOR.event.implementOn(a.prototype);d.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(d.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){C(this,a,1)},checkStyleActive:function(a){a=H(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&&this.element.removeAttribute("data-widget"),
this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(a,b){var c=this.editables[a];c.removeListener("focus",J);c.removeListener("blur",I);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(a,c){var d=this._findOneNotNested(c.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new b(this.editor,d,{filter:k.call(this.repository,this.name,a,c)}),this.editables[a]=d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":a,"data-cke-enter-mode":d.enterMode}),d.filter&&
d.data("cke-filter",d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),c.pathName&&d.data("cke-display-name",c.pathName),this.editor.focusManager.add(d),d.on("focus",J,this),CKEDITOR.env.ie&&d.on("blur",I,this),d._.initialSetData=!0,d.setData(d.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,e=0;e<a.count();e++)if(b=a.getItem(e),c=b.getAscendant(d.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(d.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){C(this,a,0)},setData:function(a,b){var c=this.data,d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=
e[a])}d&&this.dataReady&&(X(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(d.prototype);d.getNestedEditable=function(a,b){return!b||b.equals(a)?null:d.isDomNestedEditable(b)?b:d.getNestedEditable(a,b.getParent())};d.isDomDragHandler=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};d.isDomDragHandlerContainer=function(a){return a.type==
CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};d.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};d.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};d.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};d.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};
d.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};d.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";b.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 ea=/^(?:<(?: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,N={37:1,38:1,39:1,40:1,8:1,46:1};(function(){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,e=this.group.length;d<e;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,e=!1;if(!(a instanceof CKEDITOR.editor))return!1;d=a.elementPath();if(this.checkApplicable(d,a))for(var f=0,g=this.group.length;f<g;f++){b=c[this.widget][this.group[f]];for(var h=0;h<b.length;h++)b[h]!==this&&b[h].checkActive(d,a)&&(a.widgets.focused.removeStyle(b[h]),
e=!0)}return e},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b,checkElement:function(a){return d.isDomWidgetWrapper(a)?(a=a.getFirst(d.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.widget=d;d.repository=a;d.nestedEditable=b}(),
CKEDITOR.config.plugins="basicstyles,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,dialogui,dialog,colordialog,divarea,elementspath,enterkey,entities,floatingspace,listblock,richcombo,font,htmlwriter,indent,indentblock,indentlist,justify,list,sourcearea,undo,lineutils,widgetselection,widget",CKEDITOR.config.skin="moono",function(){var a=function(a,b){var g=CKEDITOR.getUrl("plugins/"+b);a=a.split(",");for(var h=0;h<a.length;h++)CKEDITOR.skin.icons[a[h]]={path:g,offset:-a[++h],
bgsize:a[++h]}};CKEDITOR.env.hidpi?a("bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,copy-rtl,144,,copy,168,,cut-rtl,192,,cut,216,,paste-rtl,240,,paste,264,,bgcolor,288,,textcolor,312,,indent-rtl,336,,indent,360,,outdent-rtl,384,,outdent,408,,ipscode,432,,ipsemoticon,456,,ipsimage,480,,ipslink,504,,unlink,528,,ipspage,1104,auto,pastetext,576,,ipspreview-rtl,600,,ipspreview,624,,ipsquote,648,,ipsspoiler,672,,justifyblock,696,,justifycenter,720,,justifyleft,744,,justifyright,768,,bulletedlist-rtl,792,,bulletedlist,816,,numberedlist-rtl,840,,numberedlist,864,,removeformat,888,,source-rtl,912,,source,936,,redo-rtl,960,,redo,984,,undo-rtl,1008,,undo,1032,,simplebox,2112,auto",
"icons_hidpi.png"):a("bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,copy-rtl,144,auto,copy,168,auto,cut-rtl,192,auto,cut,216,auto,paste-rtl,240,auto,paste,264,auto,bgcolor,288,auto,textcolor,312,auto,indent-rtl,336,auto,indent,360,auto,outdent-rtl,384,auto,outdent,408,auto,ipscode,432,auto,ipsemoticon,456,auto,ipsimage,480,auto,ipslink,504,auto,unlink,528,auto,ipspage,552,auto,pastetext,576,auto,ipspreview-rtl,600,auto,ipspreview,624,auto,ipsquote,648,auto,ipsspoiler,672,auto,justifyblock,696,auto,justifycenter,720,auto,justifyleft,744,auto,justifyright,768,auto,bulletedlist-rtl,792,auto,bulletedlist,816,auto,numberedlist-rtl,840,auto,numberedlist,864,auto,removeformat,888,auto,source-rtl,912,auto,source,936,auto,redo-rtl,960,auto,redo,984,auto,undo-rtl,1008,auto,undo,1032,auto,simplebox,1056,auto",
"icons.png")}(),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: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,fo:1,fr:1,"fr-ca":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: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})})();