PageSourceSearch

https://indico.itp.ac.cn/static/assets/core/js/ckeditor_9caecdc3.min.js

js itp.ac.cn collected 2026-10-02 04:20:26 UTC 516,428 bytes, 994 lines download raw bytes

vendor: 10,709 bytes, lines 1-25
1/*
2Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,g={timestamp:"I839",version:"4.6.2",revision:"20af9170a",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var b=document.getElementsByTagName("script"),l=0;l<b.length;l++){var c=b[l].src.match(a);if(c){e=c[1];break}}-1==e.indexOf(":/")&&"//"!=e.slice(0,
62)&&(e=0===e.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+e:location.href.match(/^[^\?]*\/(?:)/)[0]+e);if(!e)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return e}(),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},
7domReady:function(){function a(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",a,!1),e()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",a),e())}catch(c){}}function e(){for(var c;c=b.shift();)c()}var b=[];return function(c){function e(){try{document.documentElement.doScroll("left")}catch(f){setTimeout(e,1);return}a()}b.push(c);"complete"===document.readyState&&setTimeout(a,1);if(1==b.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",
8a,!1),window.addEventListener("load",a,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",a);window.attachEvent("onload",a);c=!1;try{c=!window.frameElement}catch(d){}document.documentElement.doScroll&&c&&e()}}}()},b=window.CKEDITOR_GETURL;if(b){var e=g.getUrl;g.getUrl=function(a){return b.call(g,a)||e.call(g,a)}}return g}()),CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(a){var g=CKEDITOR.event.prototype,b;for(b in g)null==a[b]&&(a[b]=g[b])},
9CKEDITOR.event.prototype=function(){function a(a){var h=g(this);return h[a]||(h[a]=new b(a))}var g=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,m=this.listeners;b<m.length;b++)if(m[b].fn==a)return b;return-1}};return{define:function(b,h){var m=a.call(this,b);CKEDITOR.tools.extend(m,h,!0)},on:function(b,h,m,g,c){function k(f,c,a,k){f={name:b,sender:this,editor:f,
10data:c,listenerData:g,stop:a,cancel:k,removeListener:d};return!1===h.call(m,f)?!1:f.data}function d(){q.removeListener(b,h)}var f=a.call(this,b);if(0>f.getListenerIndex(h)){f=f.listeners;m||(m=this);isNaN(c)&&(c=10);var q=this;k.fn=h;k.priority=c;for(var u=f.length-1;0<=u;u--)if(f[u].priority<=c)return f.splice(u+1,0,k),{removeListener:d};f.unshift(k)}return{removeListener:d}},once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,
11arguments)};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},m=0,l=function(){m=1};return function(c,k,d){var f=g(this)[c];c=a;var q=m;a=m=0;if(f){var u=f.listeners;if(u.length)for(var u=u.slice(0),v,x=0;x<u.length;x++){if(f.errorProof)try{v=u[x].call(this,d,k,b,l)}catch(t){}else v=u[x].call(this,d,k,b,l);!1===v?m=1:"undefined"!=typeof v&&(k=v);if(a||m)break}}k=
12m?!1:"undefined"==typeof k?!0:k;a=c;m=q;return k}}(),fireOnce:function(a,b,m){b=this.fire(a,b,m);delete g(this)[a];return b},removeListener:function(a,b){var m=g(this)[a];if(m){var l=m.getListenerIndex(b);0<=l&&m.listeners.splice(l,1)}},removeAllListeners:function(){var a=g(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=g(this)[a])&&0<a.listeners.length}}}()),CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=
13function(a,g){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fire.call(this,a,g,this)},CKEDITOR.editor.prototype.fireOnce=function(a,g){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,a,g,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)),CKEDITOR.env||(CKEDITOR.env=function(){var a=navigator.userAgent.toLowerCase(),g=a.match(/edge[ \/](\d+.?\d*)/),b=-1<a.indexOf("trident/"),b=!(!g&&!b),b={ie:b,edge:!!g,webkit:!b&&
14-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=
15!0:b.safari=!0);var e=0;b.ie&&(e=g?parseFloat(g[1]):b.quirks||!document.documentMode?parseFloat(a.match(/msie (\d+)/)[1]):document.documentMode,b.ie9Compat=9==e,b.ie8Compat=8==e,b.ie7Compat=7==e,b.ie6Compat=7>e||b.quirks);b.gecko&&(g=a.match(/rv:([\d\.]+)/))&&(g=g[1].split("."),e=1E4*g[0]+100*(g[1]||0)+1*(g[2]||0));b.air&&(e=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));b.webkit&&(e=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=e;b.isCompatible=!(b.ie&&7>e)&&!(b.gecko&&4E4>e)&&!(b.webkit&&
16534>e);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10<e;b.needsNbspFiller=b.ie&&11>e;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);
17CKEDITOR.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,g=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status=
18"basic_ready",a&&a._load?a():g&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*g))})})();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,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:g})},CKEDITOR.error=function(a,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",
19{type:"error",errorCode:a,additionalData:g})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var g=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[g]("[CKEDITOR] Error code: "+b+".",a);else console[g]("[CKEDITOR] Error code: "+b+".");console[g]("[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=[],g=CKEDITOR.env.gecko?"-moz-":
20CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,e=/>/g,h=/</g,m=/"/g,l=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,c={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"­"},k=function(d,f){return"#"==f[0]?String.fromCharCode(parseInt(f.slice(1),10)):c[f]};CKEDITOR.on("reset",function(){a=[]});CKEDITOR.tools={arrayCompare:function(d,f){if(!d&&!f)return!0;if(!d||!f||d.length!=f.length)return!1;for(var c=0;c<d.length;c++)if(d[c]!=f[c])return!1;return!0},getIndex:function(d,f){for(var c=
210;c<d.length;++c)if(f(d[c]))return c;return-1},clone:function(d){var f;if(d&&d instanceof Array){f=[];for(var c=0;c<d.length;c++)f[c]=CKEDITOR.tools.clone(d[c]);return f}if(null===d||"object"!=typeof d||d instanceof String||d instanceof Number||d instanceof Boolean||d instanceof Date||d instanceof RegExp||d.nodeType||d.window===d)return d;f=new d.constructor;for(c in d)f[c]=CKEDITOR.tools.clone(d[c]);return f},capitalize:function(d,f){return d.charAt(0).toUpperCase()+(f?d.slice(1):d.slice(1).toLowerCase())},
22extend:function(d){var f=arguments.length,c,a;"boolean"==typeof(c=arguments[f-1])?f--:"boolean"==typeof(c=arguments[f-2])&&(a=arguments[f-1],f-=2);for(var b=1;b<f;b++){var k=arguments[b],e;for(e in k)if(!0===c||null==d[e])if(!a||e in a)d[e]=k[e]}return d},prototypedCopy:function(d){var f=function(){};f.prototype=d;return new f},copy:function(d){var f={},c;for(c in d)f[c]=d[c];return f},isArray:function(d){return"[object Array]"==Object.prototype.toString.call(d)},isEmpty:function(d){for(var f in d)if(d.hasOwnProperty(f))return!1;
23return!0},cssVendorPrefix:function(d,f,c){if(c)return g+d+":"+f+";"+d+":"+f;c={};c[d]=f;c[g+d]=f;return c},cssStyleToDomStyle:function(){var d=document.createElement("div").style,f="undefined"!=typeof d.cssFloat?"cssFloat":"undefined"!=typeof d.styleFloat?"styleFloat":"float";return function(d){return"float"==d?f:d.replace(/-./g,function(f){return f.substr(1).toUpperCase()})}}(),buildStyleHtml:function(d){d=[].concat(d);for(var f,c=[],a=0;a<d.length;a++)if(f=d[a])/@import|[{}]/.test(f)?c.push("\x3cstyle\x3e"+
24f+"\x3c/style\x3e"):c.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+f+'"\x3e');return c.join("")},htmlEncode:function(d){return void 0===d||null===d?"":String(d).replace(b,"\x26amp;").replace(e,"\x26gt;").replace(h,"\x26lt;")},htmlDecode:function(d){return d.replace(l,k)},htmlEncodeAttr:function(d){return CKEDITOR.tools.htmlEncode(d).replace(m,"\x26quot;")},htmlDecodeAttr:function(d){return CKEDITOR.tools.htmlDecode(d)},transformPlainTextToHtml:function(d,f){var c=f==CKEDITOR.ENTER_BR,
25a=this.htmlEncode(d.replace(/\r\n/g,"\n")),a=a.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),b=f==CKEDITOR.ENTER_P?"p":"div";if(!c){var k=/\n{2}/g;if(k.test(a))var e="\x3c"+b+"\x3e",h="\x3c/"+b+"\x3e",a=e+a.replace(k,function(){return h+e})+h}a=a.replace(/\n/g,"\x3cbr\x3e");
vendor: 14,197 bytes, lines 25-53
25c||(a=a.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+b+"\x3e)"),function(f){return CKEDITOR.tools.repeat(f,2)}));a=a.replace(/^ | $/g,"\x26nbsp;");return a=a.replace(/(>|\s) /g,function(f,d){return d+"\x26nbsp;"}).replace(/ (?=<)/g,
26"\x26nbsp;")},getNextNumber:function(){var d=0;return function(){return++d}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var d="e",f=0;8>f;f++)d+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return d},override:function(d,f){var c=f(d);c.prototype=d.prototype;return c},setTimeout:function(d,f,c,a,b){b||(b=window);c||(c=b);return b.setTimeout(function(){a?d.apply(c,[].concat(a)):d.apply(c)},f||0)},trim:function(){var d=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;
27return function(f){return f.replace(d,"")}}(),ltrim:function(){var d=/^[ \t\n\r]+/g;return function(f){return f.replace(d,"")}}(),rtrim:function(){var d=/[ \t\n\r]+$/g;return function(f){return f.replace(d,"")}}(),indexOf:function(d,f){if("function"==typeof f)for(var c=0,a=d.length;c<a;c++){if(f(d[c]))return c}else{if(d.indexOf)return d.indexOf(f);c=0;for(a=d.length;c<a;c++)if(d[c]===f)return c}return-1},search:function(d,f){var c=CKEDITOR.tools.indexOf(d,f);return 0<=c?d[c]:null},bind:function(d,
28f){return function(){return d.apply(f,arguments)}},createClass:function(d){var f=d.$,c=d.base,a=d.privates||d._,b=d.proto;d=d.statics;!f&&(f=function(){c&&this.base.apply(this,arguments)});if(a)var k=f,f=function(){var f=this._||(this._={}),d;for(d in a){var c=a[d];f[d]="function"==typeof c?CKEDITOR.tools.bind(c,this):c}k.apply(this,arguments)};c&&(f.prototype=this.prototypedCopy(c.prototype),f.prototype.constructor=f,f.base=c,f.baseProto=c.prototype,f.prototype.base=function(){this.base=c.prototype.base;
29c.apply(this,arguments);this.base=arguments.callee});b&&this.extend(f.prototype,b,!0);d&&this.extend(f,d,!0);return f},addFunction:function(d,f){return a.push(function(){return d.apply(f||this,arguments)})-1},removeFunction:function(d){a[d]=null},callFunction:function(d){var f=a[d];return f&&f.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var d=/^-?\d+\.?\d*px$/,f;return function(c){f=CKEDITOR.tools.trim(c+"")+"px";return d.test(f)?f:c||""}}(),convertToPx:function(){var d;
30return function(f){d||(d=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(d));return/%$/.test(f)?f:(d.setStyle("width",f),d.$.clientWidth)}}(),repeat:function(d,f){return Array(f+1).join(d)},tryThese:function(){for(var d,f=0,c=arguments.length;f<c;f++){var a=arguments[f];try{d=a();break}catch(b){}}return d},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},
31defer:function(c){return function(){var f=arguments,a=this;window.setTimeout(function(){c.apply(a,f)},0)}},normalizeCssText:function(c,f){var a=[],b,k=CKEDITOR.tools.parseCssText(c,!0,f);for(b in k)a.push(b+":"+k[b]);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,d,a){f=[c,d,a];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,
32function(f,c,d,a){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+a})},parseCssText:function(c,f,a){var b={};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 b;c.replace(/&quot;/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,d,a){f&&(d=d.toLowerCase(),"font-family"==d&&(a=a.replace(/\s*,\s*/g,
33",")),a=CKEDITOR.tools.trim(a));b[d]=a});return b},writeCssText:function(c,f){var a,b=[];for(a in c)b.push(a+":"+c[a]);f&&b.sort();return b.join("; ")},objectCompare:function(c,f,a){var b;if(!c&&!f)return!0;if(!c||!f)return!1;for(b in c)if(c[b]!=f[b])return!1;if(!a)for(b in f)if(c[b]!=f[b])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 b=0,k=c.length;b<k;++b)a[c[b]]=f;return a},fixDomain:function(){for(var c;;)try{c=
34window.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 b(){e=(new Date).getTime();k=!1;a?f.call(a):f()}var k,e=0;return{input:function(){if(!k){var f=(new Date).getTime()-e;f<c?k=setTimeout(b,c-f):b()}},reset:function(){k&&clearTimeout(k);k=e=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(" "),
35b=a.length,k;b--;)k=c.createElement(a[b]),f&&c.appendChild(k)},checkIfAnyArrayItemMatches:function(c,f){for(var a=0,b=c.length;a<b;++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,b=f&65535,k=CKEDITOR.env.mac,e=[],h=[];a&CKEDITOR.CTRL&&(e.push(k?"⌘":c[17]),h.push(k?c[224]:c[17]));a&CKEDITOR.ALT&&(e.push(k?"⌥":c[18]),h.push(c[18]));a&CKEDITOR.SHIFT&&(e.push(k?"⇧":c[16]),
36h.push(c[16]));b&&(c[b]?(e.push(c[b]),h.push(c[b])):(e.push(String.fromCharCode(b)),h.push(String.fromCharCode(b))));return{display:e.join("+"),aria:h.join("+")}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(c){c=c.toLowerCase();for(var f=document.cookie.split(";"),a,b,k=0;k<f.length;k++)if(a=f[k].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(a[0]).toLowerCase()),b===c)return decodeURIComponent(1<a.length?
37a[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 b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(c[a]%36),f=f+(.5<Math.random()?
38b.toUpperCase():b);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):""},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",
39chartreuse:"#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",
40darkviolet:"#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",
41lemonchiffon:"#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",
42mediumpurple:"#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",
43peru:"#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",
44violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_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=[],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=
45b[f[0]];a.right=b[f[1]];a.bottom=b[f[2]];a.left=b[f[3]]}var a={},b=c.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(b.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},_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)?
46!0:f.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(c,f,a){var b=[];this.forEach(c,function(k,e){f.call(a,k,e,c)&&b.push(k)});return b},forEach:function(c,f,a){var b=c.length,k;for(k=0;k<b;k++)f.call(a,c[k],k,c)},map:function(c,f,a){for(var b=[],k=0;k<c.length;k++)b.push(f.call(a,c[k],k,c));return b},reduce:function(c,f,a,b){for(var k=0;k<c.length;k++)a=f.call(b,a,c[k],k,c);return a}}};CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=
47CKEDITOR.tools.isArray}(),CKEDITOR.dtd=function(){var a=CKEDITOR.tools.extend,g=function(c,f){for(var a=CKEDITOR.tools.clone(c),b=1;b<arguments.length;b++){f=arguments[b];for(var k in f)delete a[k]}return a},b={},e={},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},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={},c={"#":1},
48k={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},c,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});a(e,h,b,k);g={a:g(b,{a:1,
49button:1}),abbr:b,address:e,area:l,article:e,aside:e,audio:a({source:1,track:1},e),b:b,base:l,bdi:b,bdo:b,blockquote:e,body:e,br:l,button:g(b,{a:1,button:1}),canvas:b,caption:e,cite:b,code:b,col:l,colgroup:{col:1},command:l,datalist:a({option:1},b),dd:e,del:b,details:a({summary:1},e),dfn:b,div:e,dl:{dt:1,dd:1},dt:e,em:b,embed:l,fieldset:a({legend:1},e),figcaption:e,figure:a({figcaption:1},e),footer:e,form:e,h1:b,h2:b,h3:b,h4:b,h5:b,h6:b,head:a({title:1,base:1},m),header:e,hgroup:{h1:1,h2:1,h3:1,h4:1,
50h5:1,h6:1},hr:l,html:a({head:1,body:1},e,m),i:b,iframe:c,img:l,input:l,ins:b,kbd:b,keygen:l,label:b,legend:b,li:e,link:l,main:e,map:e,mark:b,menu:a({li:1},e),meta:l,meter:g(b,{meter:1}),nav:e,noscript:a({link:1,meta:1,style:1},b),object:a({param:1},b),ol:{li:1},optgroup:{option:1},option:c,output:b,p:b,param:l,pre:b,progress:g(b,{progress:1}),q:b,rp:b,rt:b,ruby:a({rp:1,rt:1},b),s:b,samp:b,script:c,section:e,select:{optgroup:1,option:1},small:b,source:l,span:b,strong:b,style:c,sub:b,summary:a({h1:1,
51h2: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:e,textarea:c,tfoot:{tr:1},th:e,thead:{tr:1},time:g(b,{time:1}),title:c,tr:{th:1,td:1},track:l,u:b,ul:{li:1},"var":b,video:a({source:1,track:1},e),wbr:l,acronym:b,applet:a({param:1},e),basefont:l,big:b,center:e,dialog:l,dir:{li:1},font:b,isindex:l,noframes:e,strike:b,tt:b};a(g,{$block:a({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},h,k),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,
52details: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,
53meta:1,param:1,source:1,track:1,wbr:1}
vendor: 15,540 bytes, lines 53-83
53,$inline:b,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:a({body:1,head:1,html:1},g.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,
54output: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 g}(),
55CKEDITOR.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 g=this.$;g.preventDefault?g.preventDefault():g.returnValue=!1;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=
56!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=
572,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(e){"undefined"!=typeof CKEDITOR&&a.fire(b,new CKEDITOR.dom.event(e))}};return{getPrivate:function(){var a;(a=this.getCustomData("_"))||this.setCustomData("_",a={});return a},on:function(g){var b=this.getCustomData("_cke_nativeListeners");b||(b={},this.setCustomData("_cke_nativeListeners",b));b[g]||(b=b[g]=a(this,g),this.$.addEventListener?
58this.$.addEventListener(g,b,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+g,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"),e=b&&b[a];e&&(this.$.removeEventListener?this.$.removeEventListener(a,e,!1):this.$.detachEvent&&this.$.detachEvent("on"+a,e),delete b[a])}},removeAllListeners:function(){var a=
59this.getCustomData("_cke_nativeListeners"),b;for(b in a){var e=a[b];this.$.detachEvent?this.$.detachEvent("on"+b,e):this.$.removeEventListener&&this.$.removeEventListener(b,e,!1);delete a[b]}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}(),function(a){var g={};CKEDITOR.on("reset",function(){g={}});a.equals=function(a){try{return a&&a.$===this.$}catch(e){return!1}};a.setCustomData=function(a,e){var h=this.getUniqueId();(g[h]||(g[h]={}))[a]=e;return this};a.getCustomData=function(a){var e=
60this.$["data-cke-expando"];return(e=e&&g[e])&&a in e?e[a]:null};a.removeCustomData=function(a){var e=this.$["data-cke-expando"],e=e&&g[e],h,m;e&&(h=e[a],m=a in e,delete e[a]);return m?h:null};a.clearCustomData=function(){this.removeAllListeners();var a=this.$["data-cke-expando"];a&&delete g[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?
61new 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=
621,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,g){a.append(this,g);return a},clone:function(a,g){function b(e){e["data-cke-expando"]&&(e["data-cke-expando"]=!1);if(e.nodeType==CKEDITOR.NODE_ELEMENT||e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(g||e.nodeType!=CKEDITOR.NODE_ELEMENT||e.removeAttribute("id",!1),a){e=e.childNodes;for(var h=0;h<e.length;h++)b(e[h])}}
63function e(b){if(b.type==CKEDITOR.NODE_ELEMENT||b.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(b.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=b.getName();":"==h[0]&&b.renameNode(h.substring(1))}if(a)for(h=0;h<b.getChildCount();h++)e(b.getChild(h))}}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)&&e(h);return h},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},
64insertAfter: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 g=[],b=this.getDocument().$.documentElement,e=this.$;e&&e!=b;){var h=e.parentNode;h&&g.unshift(this.getIndex.call({$:e},a));e=h}return g},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},
65getIndex:function(a){function g(a,c){var k=c?a.nextSibling:a.previousSibling;return k&&k.nodeType==CKEDITOR.NODE_TEXT?b(k)?g(k,c):k:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var e=this.$,h=-1,m;if(!this.$.parentNode||a&&e.nodeType==CKEDITOR.NODE_TEXT&&b(e)&&!g(e)&&!g(e,!0))return-1;do a&&e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(m||b(e))||(h++,m=e.nodeType==CKEDITOR.NODE_TEXT);while(e=e.previousSibling);return h},getNextSourceNode:function(a,
66g,b){if(b&&!b.call){var e=b;b=function(a){return!a.equals(e)}}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:g&&g!=a.type?a.getNextSourceNode(!1,g,b):a},getPreviousSourceNode:function(a,g,b){if(b&&!b.call){var e=b;b=function(a){return!a.equals(e)}}a=!a&&this.getLast&&this.getLast();var h;if(!a){if(this.type==
67CKEDITOR.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:g&&a.type!=g?a.getPreviousSourceNode(!1,g,b):a},getPrevious:function(a){var g=this.$,b;do b=(g=g.previousSibling)&&10!=g.nodeType&&new CKEDITOR.dom.node(g);while(b&&a&&!a(b));return b},getNext:function(a){var g=this.$,b;do b=(g=g.nextSibling)&&new CKEDITOR.dom.node(g);while(b&&a&&!a(b));return b},getParent:function(a){var g=
68this.$.parentNode;return g&&(g.nodeType==CKEDITOR.NODE_ELEMENT||a&&g.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(g):null},getParents:function(a){var g=this,b=[];do b[a?"push":"unshift"](g);while(g=g.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var g=this.contains?this:this.getParent();do if(g.contains(a))return g;while(g=g.getParent());return null},getPosition:function(a){var g=this.$,b=a.$;if(g.compareDocumentPosition)return g.compareDocumentPosition(b);
69if(g==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(g.contains){if(g.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(g))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in g)return 0>g.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:g.sourceIndex<b.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}g=this.getAddress();a=a.getAddress();
70for(var b=Math.min(g.length,a.length),e=0;e<b;e++)if(g[e]!=a[e])return g[e]<a[e]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return g.length<a.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,g){var b=this.$,e,h;g||(b=b.parentNode);"function"==typeof a?(h=!0,e=a):(h=!1,e=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof a?b==a:b in a});for(;b;){if(e(h?
71new CKEDITOR.dom.node(b):b))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(m){b=null}}return null},hasAscendant:function(a,g){var b=this.$;g||(b=b.parentNode);for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return!0;b=b.parentNode}return!1},move:function(a,g){a.append(this.remove(),g)},remove:function(a){var g=this.$,b=g.parentNode;if(b){if(a)for(;a=g.firstChild;)b.insertBefore(g.removeChild(a),g);b.removeChild(g)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();
72this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var g=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(g)g.length<b&&(a.split(b-g.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 g=CKEDITOR.tools.rtrim(a.getText()),b=a.getLength();if(g)g.length<b&&(a.split(g.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));
73else{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 g=this;this.type!=CKEDITOR.NODE_ELEMENT&&(g=this.getParent());CKEDITOR.env.edge&&g&&g.is("textarea","input")&&(a=!0);if(!a&&g&&"undefined"!=typeof g.$.isContentEditable)return!(g.$.isContentEditable||g.data("cke-editable"));for(;g;){if(g.data("cke-editable"))return!1;if(g.hasAttribute("contenteditable"))return"false"==
74g.getAttribute("contenteditable");g=g.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,g="CSS1Compat"==a.compatMode;return{width:(g?a.documentElement.clientWidth:a.body.clientWidth)||0,height:(g?a.documentElement.clientHeight:a.body.clientHeight)||0}},getScrollPosition:function(){var a=
75this.$;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,
76appendStyleSheet:function(a){if(this.$.createStyleSheet)this.$.createStyleSheet(a);else{var g=new CKEDITOR.dom.element("link");g.setAttributes({rel:"stylesheet",type:"text/css",href:a});this.getHead().append(g)}},appendStyleText:function(a){if(this.$.createStyleSheet){var g=this.$.createStyleSheet("");g.cssText=a}else{var b=new CKEDITOR.dom.element("style",this);b.append(new CKEDITOR.dom.text(a,this));this.getHead().append(b)}return g||b.$.sheet},createElement:function(a,g){var b=new CKEDITOR.dom.element(a,
77this);g&&(g.attributes&&b.setAttributes(g.attributes),g.styles&&b.setStyles(g.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(g){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,g){for(var b=this.$.documentElement,e=0;b&&e<a.length;e++){var h=a[e];if(g)for(var m=
78-1,l=0;l<b.childNodes.length;l++){var c=b.childNodes[l];if(!0!==g||3!=c.nodeType||!c.previousSibling||3!=c.previousSibling.nodeType)if(m++,m==h){b=c;break}}else b=b.childNodes[h]}return b?new CKEDITOR.dom.node(b):null},getElementsByTag:function(a,g){CKEDITOR.env.ie&&8>=document.documentMode||!g||(a=g+":"+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"),
79!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))},
80findOne: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}},
81CKEDITOR.dom.element=function(a,g){"string"==typeof a&&(a=(g?g.$: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,g){var b=new CKEDITOR.dom.element("div",g);b.setHtml(a);return b.getFirst().remove()},CKEDITOR.dom.element.setMarker=
82function(a,g,b,e){var h=g.getCustomData("list_marker_id")||g.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=g.getCustomData("list_marker_names")||g.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[h]=g;m[b]=1;return g.setCustomData(b,e)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var g in a)CKEDITOR.dom.element.clearMarkers(a,a[g],1)},CKEDITOR.dom.element.clearMarkers=function(a,g,b){var e=g.getCustomData("list_marker_names"),
83h=g.getCustomData("list_marker_id"),m;
vendor: 12,582 bytes, lines 83-106
83for(m in e)g.removeCustomData(m);g.removeCustomData("list_marker_names");b&&(g.removeCustomData("list_marker_id"),delete a[h])},function(){function a(c,a){return-1<(" "+c+" ").replace(m," ").indexOf(" "+a+" ")}function g(c){var a=!0;c.$.id||(c.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),a=!1);return function(){a||c.removeAttribute("id")}}function b(c,a){var b=CKEDITOR.tools.escapeCss(c.$.id);return"#"+b+" "+a.split(/,\s*/).join(", #"+b+" ")}function e(c){for(var a=
840,b=0,f=l[c].length;b<f;b++)a+=parseFloat(this.getComputedStyle(l[c][b])||0,10)||0;return a}var h=document.createElement("_").classList,h="undefined"!==typeof h&&null!==String(h.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:h?function(c){this.$.classList.add(c);return this}:function(c){var b=this.$.className;b&&(a(b,c)||(b+=" "+c));this.$.className=b||c;return this},removeClass:h?function(c){var a=this.$;a.classList.remove(c);
85a.className||a.removeAttribute("class");return this}:function(c){var b=this.getAttribute("class");b&&a(b,c)&&((b=b.replace(new RegExp("(?:^|\\s+)"+c+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",b):this.removeAttribute("class"));return this},hasClass:function(c){return a(this.$.className,c)},append:function(c,a){"string"==typeof c&&(c=this.getDocument().createElement(c));a?this.$.insertBefore(c.$,this.$.firstChild):this.$.appendChild(c.$);return c},appendHtml:function(c){if(this.$.childNodes.length){var a=
86new CKEDITOR.dom.element("div",this.getDocument());a.setHtml(c);a.moveChildren(this)}else this.setHtml(c)},appendText:function(c){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=c:this.append(new CKEDITOR.dom.text(c))},appendBogus:function(c){if(c||CKEDITOR.env.needsBrFiller){for(c=this.getLast();c&&c.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(c.getText());)c=c.getPrevious();c&&c.is&&c.is("br")||(c=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&c.setAttribute("type",
87"_moz"),this.append(c))}},breakParent:function(c,a){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(c);var f=b.extractContents(!1,a||!1),e;b.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(b=new CKEDITOR.dom.element("div");e=f.getFirst();)e.$.style.backgroundColor&&(e.$.style.backgroundColor=e.$.style.backgroundColor),b.append(e);b.insertAfter(this);b.remove(!0)}else f.insertAfterNode(this)},contains:document.compareDocumentPosition?function(c){return!!(this.$.compareDocumentPosition(c.$)&
8816)}:function(c){var a=this.$;return c.type!=CKEDITOR.NODE_ELEMENT?a.contains(c.getParent().$):a!=c.$&&a.contains(c.$)},focus:function(){function c(){try{this.$.focus()}catch(c){}}return function(a){a?CKEDITOR.tools.setTimeout(c,100,this):c.call(this)}}(),getHtml:function(){var c=this.$.innerHTML;return CKEDITOR.env.ie?c.replace(/<\?[^>]*>/g,""):c},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var c=this.$.ownerDocument.createElement("div");c.appendChild(this.$.cloneNode(!0));
89return c.innerHTML},getClientRect:function(){var c=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&&(c.height=c.bottom-c.top);return c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(c){try{var a=this.$;if(this.getParent())return a.innerHTML=c;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(a);a.innerHTML=c;b.removeChild(a);return c}catch(f){this.$.innerHTML="";a=new CKEDITOR.dom.element("body",this.getDocument());a.$.innerHTML=
90c;for(a=a.getChildren();a.count();)this.append(a.getItem(0));return c}}:function(c){return this.$.innerHTML=c},setText:function(){var c=document.createElement("p");c.innerHTML="x";c=c.textContent;return function(a){this.$[c?"textContent":"innerText"]=a}}(),getAttribute:function(){var c=function(c){return this.$.getAttribute(c,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c){switch(c){case "class":c="className";break;case "http-equiv":c="httpEquiv";break;case "name":return this.$.name;
91case "tabindex":return c=this.$.getAttribute(c,2),0!==c&&0===this.$.tabIndex&&(c=null),c;case "checked":return c=this.$.attributes.getNamedItem(c),(c.specified?c.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[c];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(c,2)}:c}(),getAttributes:function(c){var a=
92{},b=this.$.attributes,f;c=CKEDITOR.tools.isArray(c)?c:[];for(f=0;f<b.length;f++)-1===CKEDITOR.tools.indexOf(c,b[f].name)&&(a[b[f].name]=b[f].value);return a},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(c){var a=this.getWindow().$.getComputedStyle(this.$,null);return a?a.getPropertyValue(c):""}:function(c){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(c)]},getDtd:function(){var c=
93CKEDITOR.dtd[this.getName()];this.getDtd=function(){return c};return c},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var c=this.$.tabIndex;return 0!==c||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?c:-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||
94null},getName:function(){var c=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var a=this.$.scopeName;"HTML"!=a&&(c=a.toLowerCase()+":"+c)}this.getName=function(){return c};return this.getName()},getValue:function(){return this.$.value},getFirst:function(c){var a=this.$.firstChild;(a=a&&new CKEDITOR.dom.node(a))&&c&&!c(a)&&(a=a.getNext(c));return a},getLast:function(c){var a=this.$.lastChild;(a=a&&new CKEDITOR.dom.node(a))&&c&&!c(a)&&(a=a.getPrevious(c));return a},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]},
95is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;b<arguments.length;b++)if(arguments[b]==a)return!0;return!1},isEditable:function(a){var b=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[b]||CKEDITOR.dtd.$empty[b]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==a?(a=CKEDITOR.dtd[b]||
96CKEDITOR.dtd.span,!(!a||!a["#"])):!0},isIdentical:function(a){var b=this.clone(0,1);a=a.clone(0,1);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);a.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(b.$.isEqualNode)return b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),a.$.style.cssText=CKEDITOR.tools.normalizeCssText(a.$.style.cssText),b.$.isEqualNode(a.$);b=b.getOuterHtml();a=
97a.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var d=this.getParent();d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(b),b=d.getHtml(),d.setHtml(a),a=d.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,d;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(d=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(d)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;
98for(var a=this.getChildren(),b=0,d=a.count();b<d;b++){var f=a.getItem(b);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,b=0;b<a.length;b++){var d=a[b];switch(d.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;
99default:if(d.specified)return!0}}return!1}:function(){var a=this.$.attributes,b=a.length,d={"data-cke-expando":1,_moz_dirty:1};return 0<b&&(2<b||!d[a[0].nodeName]||2==b&&!d[a[1].nodeName])},hasAttribute:function(){function a(c){var b=this.$.attributes.getNamedItem(c);if("input"==this.getName())switch(c){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return c=this.getAttribute("type"),"checkbox"==c||"radio"==c?"on"!=this.$.value:!!this.$.value}return b?
100b.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var d=this.$;a=a.$;if(d!=a){var f;if(b)for(;f=d.lastChild;)a.insertBefore(d.removeChild(f),a.firstChild);else for(;f=d.firstChild;)a.appendChild(d.removeChild(f))}},mergeSiblings:function(){function a(c,b,f){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var e=
101[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(e.push(b),b=f?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(b)){for(var h=f?c.getLast():c.getFirst();e.length;)e.shift().move(c,!f);b.moveChildren(c,!f);b.remove();h&&h.type==CKEDITOR.NODE_ELEMENT&&h.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",
102visibility:""})},setAttribute:function(){var a=function(a,c){this.$.setAttribute(a,c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,d){"class"==b?this.$.className=d:"style"==b?this.$.style.cssText=d:"tabindex"==b?this.$.tabIndex=d:"checked"==b?this.$.checked=d:"contenteditable"==b?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,d){if("src"==b&&d.match(/^http:\/\//))try{a.apply(this,
103arguments)}catch(f){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b=
1040;b<a.length;b++)this.removeAttribute(a[b]);else for(b in a=a||this.getAttributes(),a)a.hasOwnProperty(b)&&this.removeAttribute(b)},removeStyle:function(a){var b=this.$.style;if(b.removeProperty||"border"!=a&&"margin"!=a&&"padding"!=a)b.removeProperty?b.removeProperty(a):b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)),this.$.style.cssText||this.removeAttribute("style");else{var d=["top","left","right","bottom"],f;"border"==a&&(f=["color","style","width"]);for(var b=[],e=0;e<d.length;e++)if(f)for(var h=
1050;h<f.length;h++)b.push([a,d[e],f[h]].join("-"));else b.push([a,d[e]].join("-"));for(a=0;a<b.length;a++)this.removeStyle(b[a])}},setStyle:function(a,b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select",
106"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),d=0,f=b.count();d<f;d++)a=b.getItem(d),a.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var a=this;"html"!=a.getName();){if("static"!=a.getComputedStyle("position"))return a;a=a.getParent()}return null},getDocumentPosition:function(a){var b=0,d=0,f=this.getDocument(),e=f.getBody(),h="BackCompat"==f.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?
vendor: 13,427 bytes, lines 107-133
1078!==CKEDITOR.env.version:1)){var m=this.$.getBoundingClientRect(),g=f.$.documentElement,t=g.clientTop||e.$.clientTop||0,r=g.clientLeft||e.$.clientLeft||0,n=!0;CKEDITOR.env.ie&&(n=f.getDocumentElement().contains(this),f=f.getBody().contains(this),n=h&&f||!h&&n);n&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(b=e.$.scrollLeft||g.scrollLeft,d=e.$.scrollTop||g.scrollTop):(d=h?e.$:g,b=d.scrollLeft,d=d.scrollTop),b=m.left+b-r,d=m.top+d-t)}else for(t=this,r=null;t&&"body"!=t.getName()&&
108"html"!=t.getName();){b+=t.$.offsetLeft-t.$.scrollLeft;d+=t.$.offsetTop-t.$.scrollTop;t.equals(this)||(b+=t.$.clientLeft||0,d+=t.$.clientTop||0);for(;r&&!r.equals(t);)b-=r.$.scrollLeft,d-=r.$.scrollTop,r=r.getParent();r=t;t=(m=t.$.offsetParent)?new CKEDITOR.dom.element(m):null}a&&(m=this.getWindow(),t=a.getWindow(),!m.equals(t)&&m.$.frameElement&&(a=(new CKEDITOR.dom.element(m.$.frameElement)).getDocumentPosition(a),b+=a.x,d+=a.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||
109h||(b+=this.$.clientLeft?1:0,d+=this.$.clientTop?1:0);return{x:b,y:d}},scrollIntoView:function(a){var b=this.getParent();if(b){do if((b.$.clientWidth&&b.$.clientWidth<b.$.scrollWidth||b.$.clientHeight&&b.$.clientHeight<b.$.scrollHeight)&&!b.is("body")&&this.scrollIntoParent(b,a,1),b.is("html")){var d=b.getWindow();try{var f=d.$.frameElement;f&&(b=new CKEDITOR.dom.element(f))}catch(e){}}while(b=b.getParent())}},scrollIntoParent:function(a,b,d){var f,e,h,m;function g(f,b){/body|html/.test(a.getName())?
110a.getWindow().$.scrollBy(f,b):(a.$.scrollLeft+=f,a.$.scrollTop+=b)}function t(a,f){var b={x:0,y:0};if(!a.is(n?"body":"html")){var c=a.$.getBoundingClientRect();b.x=c.left;b.y=c.top}c=a.getWindow();c.equals(f)||(c=t(CKEDITOR.dom.element.get(c.$.frameElement),f),b.x+=c.x,b.y+=c.y);return b}function r(a,f){return parseInt(a.getComputedStyle("margin-"+f)||0,10)||0}!a&&(a=this.getWindow());h=a.getDocument();var n="BackCompat"==h.$.compatMode;a instanceof CKEDITOR.dom.window&&(a=n?h.getBody():h.getDocumentElement());
111CKEDITOR.env.webkit&&(h=this.getEditor(!1))&&(h._.previousScrollTop=null);h=a.getWindow();e=t(this,h);var l=t(a,h),A=this.$.offsetHeight;f=this.$.offsetWidth;var p=a.$.clientHeight,z=a.$.clientWidth;h=e.x-r(this,"left")-l.x||0;m=e.y-r(this,"top")-l.y||0;f=e.x+f+r(this,"right")-(l.x+z)||0;e=e.y+A+r(this,"bottom")-(l.y+p)||0;(0>m||0<e)&&g(0,!0===b?m:!1===b?e:0>m?m:e);d&&(0>h||0<f)&&g(0>h?h:f,0)},setState:function(a,b,d){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+
112"_off");this.removeClass(b+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}},
113getFrameDocument: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 d=this.$.attributes;b=b||{};for(var f=0;f<d.length;f++){var e=d[f],h=e.nodeName.toLowerCase(),m;if(!(h in b))if("checked"==h&&(m=this.getAttribute(h)))a.setAttribute(h,m);else if(!CKEDITOR.env.ie||this.hasAttribute(h))m=this.getAttribute(h),null===m&&(m=e.nodeValue),a.setAttribute(h,m)}""!==this.$.style.cssText&&
114(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 d=this.$;if(b.slice)for(b=b.slice();0<b.length&&d;)d=a(d,
115b.shift());else d=a(d,b);return d?new CKEDITOR.dom.node(d):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||
116"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,d,f,e;a=a||void 0===a;for(d in b)if(f=b[d],f.element.equals(this)&&f.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!a&&(e=f.editable())&&(e.equals(this)||e.contains(this)))return f;return null},find:function(a){var e=g(this);a=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this,
117a)));e();return a},findOne:function(a){var e=g(this);a=this.$.querySelector(b(this,a));e();return a?new CKEDITOR.dom.element(a):null},forEach:function(a,b,d){if(!(d||b&&this.type!=b))var f=a(this);if(!1!==f){d=this.getChildren();for(var e=0;e<d.count();e++)f=d.getItem(e),f.type==CKEDITOR.NODE_ELEMENT?f.forEach(a,b):b&&f.type!=b||a(f)}}});var l={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};
118CKEDITOR.dom.element.prototype.setSize=function(a,b,d){"number"==typeof b&&(!d||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(b-=e.call(this,a)),this.setStyle(a,b+"px"))};CKEDITOR.dom.element.prototype.getSize=function(a,b){var d=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(a)],this.$["client"+CKEDITOR.tools.capitalize(a)])||0;b&&(d-=e.call(this,a));return d}}(),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,
119CKEDITOR.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,
120getChildCount:1,getChild:1,getChildren:1}),function(){function a(a,f){var b=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(b.collapsed)return this.end(),null;b.optimize()}var c,d=b.startContainer;c=b.endContainer;var e=b.startOffset,h=b.endOffset,q,p=this.guard,k=this.type,m=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var g=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),l=c.type==CKEDITOR.NODE_ELEMENT?c.getChild(h):c.getNext();this._.guardLTR=function(a,
121f){return(!f||!g.equals(a))&&(!l||!a.equals(l))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(b.root))}}if(a&&!this._.guardRTL){var C=d.type==CKEDITOR.NODE_ELEMENT?d:d.getParent(),E=d.type==CKEDITOR.NODE_ELEMENT?e?d.getChild(e-1):null:d.getPrevious();this._.guardRTL=function(a,f){return(!f||!C.equals(a))&&(!E||!a.equals(E))&&(a.type!=CKEDITOR.NODE_ELEMENT||!f||!a.equals(b.root))}}var F=a?this._.guardRTL:this._.guardLTR;q=p?function(a,f){return!1===F(a,f)?!1:p(a,f)}:F;this.current?c=this.current[m](!1,
122k,q):(a?c.type==CKEDITOR.NODE_ELEMENT&&(c=0<h?c.getChild(h-1):!1===q(c,!0)?null:c.getPreviousSourceNode(!0,k,q)):(c=d,c.type==CKEDITOR.NODE_ELEMENT&&((c=c.getChild(e))||(c=!1===q(d,!0)?null:d.getNextSourceNode(!0,k,q)))),c&&!1===q(c)&&(c=null));for(;c&&!this._.end;){this.current=c;if(!this.evaluator||!1!==this.evaluator(c)){if(!f)return c}else if(f&&this.evaluator)return!1;c=c[m](!1,k,q)}this.end();return this.current=null}function g(f){for(var b,c=null;b=a.call(this,f);)c=b;return c}CKEDITOR.dom.walker=
123CKEDITOR.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 g.call(this)},lastBackward:function(){return g.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,
124"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},e={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in e||!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=
125function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,f){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(c){var d,e;d=c&&c.type!=CKEDITOR.NODE_ELEMENT&&(e=c.getParent())&&b(e);d=a?d:d||b(c);return!!(f^d)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(f){var b;f&&f.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(f.getText())||CKEDITOR.env.webkit&&f.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);
126return!!(a^b)}};CKEDITOR.dom.walker.invisible=function(a){var f=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(c){f(c)?c=1:(c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent()),c=c.$.offsetWidth<=b);return!!(a^c)}};CKEDITOR.dom.walker.nodeType=function(a,f){return function(b){return!!(f^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function f(a){return!m(a)&&!l(a)}return function(b){var c=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&h.test(b.getText());c&&(c=b.getParent(),
127b=b.getNext(f),c=c.isBlockBoundary()&&(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^c)}};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)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),c=CKEDITOR.dom.walker.temp(),k=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};
128CKEDITOR.dom.walker.ignored=function(a){return function(f){f=m(f)||l(f)||c(f);return!!(a^f)}};var d=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(f){for(var b=0,c=f.getChildCount();b<c;++b)if(!d(f.getChild(b)))return!!a;return!a}};var f=CKEDITOR.dom.walker.empty(),q=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var f={},b;for(b in a)CKEDITOR.dtd[b]["#"]&&(f[b]=1);return f}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=
129function(a){return function(b){b=d(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(q)&&f(b))?!0:!1;return!!(a^b)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(k(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=
130this.startOffset=this.startContainer=null;this.collapsed=!0;var g=a instanceof CKEDITOR.dom.document;this.document=g?a:a.getDocument();this.root=g?a.getBody():a},function(){function a(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function g(a,b,c,d,e){function h(a,b,f,c){var d=f?a.getPrevious():a.getNext();if(c&&g)return d;p||c?b.append(a.clone(!0,e),f):(a.remove(),l&&b.append(a));return d}function k(){var a,b,f,c=Math.min(L.length,
131G.length);for(a=0;a<c;a++)if(b=L[a],f=G[a],!b.equals(f))return a;return a-1}function m(){var b=S-1,c=F&&I&&!z.equals(D);b<O-1||b<T-1||c?(c?a.moveToPosition(D,CKEDITOR.POSITION_BEFORE_START):T==b+1&&E?a.moveToPosition(G[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(G[b+1],CKEDITOR.POSITION_BEFORE_START),d&&(b=L[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(c=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),c.insertAfter(b),
132b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var g=0===b,l=1==b,p=2==b;b=p||l;var z=a.startContainer,D=a.endContainer,y=a.startOffset,B=a.endOffset,C,E,F,I,H,J;if(p&&D.type==CKEDITOR.NODE_TEXT&&z.equals(D))z=a.document.createText(z.substring(y,B)),c.append(z);else{D.type==CKEDITOR.NODE_TEXT?p?J=!0:D=D.split(B):0<D.getChildCount()?B>=D.getChildCount()?(D=D.getChild(B-1),E=!0):D=D.getChild(B):I=E=!0;z.type==CKEDITOR.NODE_TEXT?p?H=!0:z.split(y):0<z.getChildCount()?
1330===y?(z=z.getChild(y),C=!0):z=z.getChild(y-1):F=C=!0;
vendor: 19,211 bytes, lines 133-170
133for(var L=z.getParents(),G=D.getParents(),S=k(),O=L.length-1,T=G.length-1,M=c,V,da,ca,ga=-1,N=S;N<=O;N++){da=L[N];ca=da.getNext();for(N!=O||da.equals(G[N])&&O<T?b&&(V=M.append(da.clone(0,e))):C?h(da,M,!1,F):H&&M.append(a.document.createText(da.substring(y)));ca;){if(ca.equals(G[N])){ga=N;break}ca=h(ca,M)}M=V}M=c;for(N=S;N<=T;N++)if(c=G[N],ca=c.getPrevious(),c.equals(L[N]))b&&(M=M.getChild(0));else{N!=T||c.equals(L[N])&&T<O?b&&(V=M.append(c.clone(0,
134e))):E?h(c,M,!1,I):J&&M.append(a.document.createText(c.substring(0,B)));if(N>ga)for(;ca;)ca=h(ca,M,!0);M=V}p||m()}}function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(e){return c(e)||b(e)?!0:d(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(m)?!1:!0}}function e(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);
135return function(d){return c(d)||b(d)?!0:!a&&l(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function h(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&d(a)&&(b=a);return k(a)&&!(l(a)&&a.equals(b))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),c=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,
136k=CKEDITOR.dom.walker.editable(),d=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);
137this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||g(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,e,h=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display",
138"none");b.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",d+(h?"C":"S")));h||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",d+"E"),e=this.clone(),e.collapse(),e.insertNode(c));e=this.clone();e.collapse(!0);e.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(h?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:h}},createBookmark2:function(){function a(b){var f=
139b.container,d=b.offset,e;e=f;var h=d;e=e.type!=CKEDITOR.NODE_ELEMENT||0===h||h==e.getChildCount()?0:e.getChild(h-1).type==CKEDITOR.NODE_TEXT&&e.getChild(h).type==CKEDITOR.NODE_TEXT;e&&(f=f.getChild(d-1),d=f.getLength());if(f.type==CKEDITOR.NODE_ELEMENT&&0<d){a:{for(e=f;d--;)if(h=e.getChild(d).getIndex(!0),0<=h){d=h;break a}d=-1}d+=1}if(f.type==CKEDITOR.NODE_TEXT){e=f;for(h=0;(e=e.getPrevious())&&e.type==CKEDITOR.NODE_TEXT;)h+=e.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;
140e=h;f.getText()?d+=e:(h=f.getPrevious(c),e?(d=e,f=h?h.getNext():f.getParent().getFirst()):(f=f.getParent(),d=h?h.getIndex(!0)+1:0))}b.container=f;b.offset=d}function b(a,f){var c=f.getCustomData("cke-fillingChar");if(c){var d=a.container;c.equals(d)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,e={container:this.startContainer,
141offset:this.startOffset},h={container:this.endContainer,offset:this.endOffset};c&&(a(e),b(e,this.root),d||(a(h),b(h,this.root)));return{start:e.container.getAddress(c),end:d?null:h.container.getAddress(c),startOffset:e.offset,endOffset:h.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=
142(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>c)a=a.getChild(c);else if(1>e)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=
143a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(e=b.getChildCount(),e>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>e)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):
144c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);
145b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var c=this.startContainer,d=this.startOffset,e=this.collapsed;if((!a||e)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var h=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();
146this.setStart(c,d);if(e){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset;b||e||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var c=new CKEDITOR.dom.range(m);
147c.setStart(a,b);c.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),f;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f=c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;C=f!=a?f.getText():f.substring(b);if(d.test(C))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),m=this.root,g,l,p,z,D,y=!1,B,C;B=this.startContainer;var E=this.startOffset;B.type==CKEDITOR.NODE_TEXT?(E&&(B=!CKEDITOR.tools.trim(B.substring(0,E)).length&&
148B,y=!!B),B&&((z=B.getPrevious())||(p=B.getParent()))):(E&&(z=B.getChild(E-1)||B.getLast()),z||(p=B));for(p=c(p);p||z;){if(p&&!z){!D&&p.equals(k)&&(D=!0);if(e?p.isBlockBoundary():!m.contains(p))break;y&&"inline"==p.getComputedStyle("display")||(y=!1,D?g=p:this.setStartBefore(p));z=p.getPrevious()}for(;z;)if(B=!1,z.type==CKEDITOR.NODE_COMMENT)z=z.getPrevious();else{if(z.type==CKEDITOR.NODE_TEXT)C=z.getText(),d.test(C)&&(z=null),B=/[\s\ufeff]$/.test(C);else if((z.$.offsetWidth>(CKEDITOR.env.webkit?1:
1490)||b&&z.is("br"))&&!z.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[z.getName()]){C=z.getText();if(d.test(C))z=null;else for(var E=z.$.getElementsByTagName("*"),F=0,I;I=E[F++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break}z&&(B=!!C.length)}else z=null;B&&(y?D?g=p:p&&this.setStartBefore(p):y=!0);if(z){B=z.getPrevious();if(!p&&!B){p=z;z=null;break}z=B}else p=null}p&&(p=c(p.getParent()))}B=this.endContainer;E=this.endOffset;p=z=null;D=y=!1;B.type==CKEDITOR.NODE_TEXT?
150CKEDITOR.tools.trim(B.substring(E)).length?y=!0:(y=!B.getLength(),E==B.getLength()?(z=B.getNext())||(p=B.getParent()):h(B,E)&&(p=B.getParent())):(z=B.getChild(E))||(p=B);for(;p||z;){if(p&&!z){!D&&p.equals(k)&&(D=!0);if(e?p.isBlockBoundary():!m.contains(p))break;y&&"inline"==p.getComputedStyle("display")||(y=!1,D?l=p:p&&this.setEndAfter(p));z=p.getNext()}for(;z;){B=!1;if(z.type==CKEDITOR.NODE_TEXT)C=z.getText(),h(z,0)||(z=null),B=/^[\s\ufeff]/.test(C);else if(z.type==CKEDITOR.NODE_ELEMENT){if((0<z.$.offsetWidth||
151b&&z.is("br"))&&!z.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[z.getName()]){C=z.getText();if(d.test(C))z=null;else for(E=z.$.getElementsByTagName("*"),F=0;I=E[F++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){z=null;break}z&&(B=!!C.length)}else z=null}else B=1;B&&y&&(D?l=p:this.setEndAfter(p));if(z){B=z.getNext();if(!p&&!B){p=z;z=null;break}z=B}else p=null}p&&(p=c(p.getParent()))}g&&l&&(k=g.contains(l)?l:g,this.setStartBefore(k),this.setEndAfter(k));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:p=
152new CKEDITOR.dom.range(this.root);m=this.root;p.setStartAt(m,CKEDITOR.POSITION_AFTER_START);p.setEnd(this.startContainer,this.startOffset);p=new CKEDITOR.dom.walker(p);var H,J,L=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),G=null,S=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(G){if(G.equals(a)){G=null;return}}else G=a;else if(G)return;var b=L(a);b||(H=a);return b},e=function(a){var b=S(a);!b&&a.is&&a.is("br")&&
153(J=a);return b};p.guard=S;p=p.lastBackward();H=H||m;this.setStartAt(H,!H.is("br")&&(!p&&this.checkStartOfBlock()||p&&H.contains(p))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){p=this.clone();p=new CKEDITOR.dom.walker(p);var O=CKEDITOR.dom.walker.whitespaces(),T=CKEDITOR.dom.walker.bookmark();p.evaluator=function(a){return!O(a)&&!T(a)};if((p=p.previous())&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("br"))break}p=this.clone();p.collapse();p.setEndAt(m,
154CKEDITOR.POSITION_BEFORE_END);p=new CKEDITOR.dom.walker(p);p.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?e:S;H=G=J=null;p=p.lastForward();H=H||m;this.setEndAt(H,!p&&this.checkEndOfBlock()||p&&H.contains(p)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);J&&this.setEndAfter(J)}},shrink:function(a,b,c){if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var d=this.clone(),e=this.startContainer,h=this.endContainer,k=this.startOffset,m=this.endOffset,g=1,l=1;e&&e.type==CKEDITOR.NODE_TEXT&&(k?
155k>=e.getLength()?d.setStartAfter(e):(d.setStartBefore(e),g=0):d.setStartBefore(e));h&&h.type==CKEDITOR.NODE_TEXT&&(m?m>=h.getLength()?d.setEndAfter(h):(d.setEndAfter(h),l=0):d.setEndBefore(h));var d=new CKEDITOR.dom.walker(d),p=CKEDITOR.dom.walker.bookmark();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var z;d.guard=function(b,d){if(p(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(z)||!1===c&&b.type==
156CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||(z=b);return!0};g&&(e=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!g&&!l)}},insertNode:function(a){this.optimizeBookmark();
157this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},
158setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer||(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),
159a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b,b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);
160break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)},fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);
161this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var e=d.getBogus();e&&e.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=c.block,h=d.block,k=null;if(!c.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer,
162this.root)).block),h||(h=this.fixBlock(!1,a)));c=e&&this.checkStartOfBlock();d=h&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(h)&&(d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):c?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(h=this.splitElement(e,b||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:h,wasStartOfBlock:c,
163wasEndOfBlock:d,elementPath:k}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(f){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||f.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),
164c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),e=d.block||d.blockLimit,h;e&&!e.equals(d.root)&&!e.getFirst(a(e));)h=e.getParent(),this[b?"setEndAt":"setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=h;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,
165b){var c=b==CKEDITOR.START,d=this.clone();d.collapse(c);d[c?"setStartAt":"setEndAt"](a,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=e(c);return d[c?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,d=this.startOffset;CKEDITOR.env.ie&&d&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,d)),c.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);
166d=this.clone();d.collapse(!0);d.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(d);a.evaluator=b();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,d=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(d)),c.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);d=this.clone();d.collapse(!1);d.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);
167a=new CKEDITOR.dom.walker(d);a.evaluator=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type==
168CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),
169!0;for(var e=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&c.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);e=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),e=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);
170else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var h=a,k=e,m=void 0;h.type==CKEDITOR.NODE_ELEMENT&&h.isEditable(!1)&&(m=h[b?"getLast":"getFirst"](d));k||m||(m=h[b?"getPrevious":"getNext"](d));a=m}return!!e}
vendor: 12,453 bytes, lines 170-194
170,moveToClosestEditablePosition:function(a,b){var c,d=0,e,h,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,k[b?0:1])):c=this.clone();if(a&&
171!a.is(CKEDITOR.dtd.$block))d=1;else if(e=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(h=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(e,0),c.collapse()):c.moveToPosition(e,k[b?1:0]);d&&this.moveToRange(c);return!!d},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},
172moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!=CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(a)};var d=a.next();a.reset();return d&&d.equals(a.previous())?d:null},getTouchedStartNode:function(){var a=this.startContainer;
173return 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),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,e=this.clone();e.optimize();(d=e.startContainer.type==CKEDITOR.NODE_TEXT)?(c=e.startContainer.getText(),
174b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();d&&(e.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),e=[],h,k,m,g;if(c&&c.find)for(k=c.find(a),h=0;h<k.count();h++)if(c=k.getItem(h),b||!c.isReadOnly())m=c.getPosition(d.startNode)&CKEDITOR.POSITION_FOLLOWING||
175d.startNode.equals(c),g=c.getPosition(d.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED,m&&g&&e.push(c);return e}}}(),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>
176arguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function g(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,e,h){a:{null==h&&(h=g(e));for(var k;k=h.shift();)if(k.getDtd().p){h={element:k,remaining:h};break a}h=null}if(!h)return 0;if((k=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!k.check(c))return b(a,c,e,h.remaining);
177c=new CKEDITOR.dom.range(h.element);c.selectNodeContents(h.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=k;a._.nestedEditable={element:h.element,container:e,remaining:h.remaining,iterator:c};return 1}function e(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),c=function(a){return m(a)&&
178l(a)},k={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var f,g,l,v,x;a=a||"p";if(this._.nestedEditable){if(f=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,f;this.activeFilter=this.filter;if(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;
179if(!this._.started){var t=this.range.clone();g=t.startPath();var r=t.endPath(),n=!t.collapsed&&e(t,g.block),w=!t.collapsed&&e(t,r.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);n&&t.setStartAt(g.block,CKEDITOR.POSITION_BEFORE_END);w&&t.setEndAt(r.block,CKEDITOR.POSITION_AFTER_START);g=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!g||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(g=new CKEDITOR.dom.walker(t.clone()),
180r=CKEDITOR.dom.walker.bookmark(!0,!0),g.evaluator=r,this._.nextNode=g.next(),g=new CKEDITOR.dom.walker(t.clone()),g.evaluator=r,g=g.previous(),this._.lastNode=g.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(r=this.range.clone(),r.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),r.checkEndOfBlock()&&(r=new CKEDITOR.dom.elementPath(r.endContainer,
181r.root),this._.lastNode=(r.block||r.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(g)),t=null);this._.started=1;g=t}r=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;r;){var n=0,w=r.hasAscendant("pre"),A=r.type!=CKEDITOR.NODE_ELEMENT,p=0;if(A)r.type==CKEDITOR.NODE_TEXT&&h.test(r.getText())&&(A=0);else{var z=r.getName();if(CKEDITOR.dtd.$block[z]&&"false"==r.getAttribute("contenteditable")){f=
182r;b(this,a,f);break}else if(r.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){if("br"==z)A=1;else if(!g&&!r.getChildCount()&&"hr"!=z){f=r;l=r.equals(t);break}g&&(g.setEndAt(r,CKEDITOR.POSITION_BEFORE_START),"br"!=z&&(this._.nextNode=r));n=1}else{if(r.getFirst()){g||(g=this.range.clone(),g.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));r=r.getFirst();continue}A=1}}A&&!g&&(g=this.range.clone(),g.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));l=(!n||A)&&r.equals(t);if(g&&!n)for(;!r.getNext(c)&&!l;){z=
183r.getParent();if(z.isBlockBoundary(this.forceBrBreak&&!w&&{br:1})){n=1;A=0;l||z.equals(t);g.setEndAt(z,CKEDITOR.POSITION_BEFORE_END);break}r=z;A=1;l=r.equals(t);p=1}A&&g.setEndAt(r,CKEDITOR.POSITION_AFTER_END);r=this._getNextSourceNode(r,p,t);if((l=!r)||n&&g)break}if(!f){if(!g)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;f=new CKEDITOR.dom.elementPath(g.startContainer,g.root);r=f.blockLimit;n={div:1,th:1,td:1};f=f.block;!f&&r&&!this.enforceRealBlocks&&n[r.getName()]&&
184g.checkStartOfBlock()&&g.checkEndOfBlock()&&!r.equals(g.root)?f=r:!f||this.enforceRealBlocks&&f.is(k)?(f=this.range.document.createElement(a),g.extractContents().appendTo(f),f.trim(),g.insertNode(f),v=x=!0):"li"!=f.getName()?g.checkStartOfBlock()&&g.checkEndOfBlock()||(f=f.clone(!1),g.extractContents().appendTo(f),f.trim(),x=g.splitBlock(),v=!x.wasStartOfBlock,x=!x.wasEndOfBlock,g.insertNode(f)):l||(this._.nextNode=f.equals(t)?null:this._getNextSourceNode(g.getBoundaryNodes().endNode,1,t))}v&&(v=
185f.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());x&&(v=f.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(m)||v.getNext(m))&&v.remove();this._.nextNode||(this._.nextNode=l||f.equals(t)||!t?null:this._getNextSourceNode(f,1,t));return f},_getNextSourceNode:function(a,b,c){function e(a){return!(a.equals(c)||a.equals(h))}var h=this.range.root;
186for(a=a.getNextSourceNode(b,null,e);!m(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,g){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!==g.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||
187!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:g.refresh&&!1!==g.refresh.apply(this,arguments)};var b;this.checkAllowed=function(e){return e||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,g,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!g.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype=
188{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):
189this.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"),
190extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,b,c,d,e){var f,h;a=[];for(f in b){h=b[f];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:F(h);"$"!=f.charAt(0)&&(h.elements=f);c&&(h.featureName=c.toLowerCase());var p=h;p.elements=l(p.elements,/\s+/)||null;p.propertiesOnly=p.propertiesOnly||!0===p.elements;var k=/\s*,\s*/,m=void 0;for(m in J){p[m]=l(p[m],
191k)||null;var g=p,t=L[m],z=l(p[L[m]],k),r=p[m],D=[],G=!0,q=void 0;z?G=!1:z={};for(q in r)"!"==q.charAt(0)&&(q=q.slice(1),D.push(q),z[q]=!0,G=!1);for(;q=D.pop();)r[q]=r["!"+q],delete r["!"+q];g[t]=(G?!1:z)||null}p.match=p.match||null;d.push(h);a.push(h)}b=e.elements;e=e.generic;var y;c=0;for(d=a.length;c<d;++c){f=F(a[c]);h=!0===f.classes||!0===f.styles||!0===f.attributes;p=f;m=t=k=void 0;for(k in J)p[k]=n(p[k]);g=!0;for(m in L){k=L[m];t=p[k];z=[];r=void 0;for(r in t)-1<r.indexOf("*")?z.push(new RegExp("^"+
192r.replace(/\*/g,".*")+"$")):z.push(r);t=z;t.length&&(p[k]=t,g=!1)}p.nothingRequired=g;p.noProperties=!(p.attributes||p.classes||p.styles);if(!0===f.elements||null===f.elements)e[h?"unshift":"push"](f);else for(y in p=f.elements,delete f.elements,p)if(b[y])b[y][h?"unshift":"push"](f);else b[y]=[f]}}function g(a,d,e,f){if(!a.match||a.match(d))if(f||c(a,d))if(a.propertiesOnly||(e.valid=!0),e.allAttributes||(e.allAttributes=b(a.attributes,d.attributes,e.validAttributes)),e.allStyles||(e.allStyles=b(a.styles,
193d.styles,e.validStyles)),!e.allClasses){a=a.classes;d=d.classes;f=e.validClasses;if(a)if(!0===a)a=!0;else{for(var h=0,p=d.length,k;h<p;++h)k=d[h],f[k]||(f[k]=a(k));a=!1}else a=!1;e.allClasses=a}}function b(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var d in b)c[d]||(c[d]=a(d));return!1}function e(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=h(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle=h(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;
194b=b.classes;if(a){for(var d=!1,e=!0===a,f=b.length;f--;)if(e||a(b[f]))b.splice(f,1),d=!0;a=d}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function h(a,b){if(!a)return!1;var c=!1,d=!0===a,e;for(e in b)if(d||a(e))delete b[e],c=!0;return c}function m(a,b,c){if(a.disabled||a.customConfig&&!c||!b)return!1;a._.cachedChecks={};return!0}function l(a,b){if(!a)return!1;if(!0===a)return a;
vendor: 19,529 bytes, lines 194-232
194if("string"==typeof a)return a=I(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?
195CKEDITOR.tools.convertArrayToObject(a):!1;var c={},d=0,e;for(e in a)c[e]=a[e],d++;return d?c:!1}function c(a,b){if(a.nothingRequired)return!0;var c,d,e,f;if(e=a.requiredClasses)for(f=b.classes,c=0;c<e.length;++c)if(d=e[c],"string"==typeof d){if(-1==CKEDITOR.tools.indexOf(f,d))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(f,d))return!1;return k(b.styles,a.requiredStyles)&&k(b.attributes,a.requiredAttributes)}function k(a,b){if(!b)return!0;for(var c=0,d;c<b.length;++c)if(d=b[c],"string"==
196typeof d){if(!(d in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,d))return!1;return!0}function d(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function f(a){var b,c,d,e,f={},h=1;for(a=I(a);b=a.match(G);)(c=b[2])?(d=q(c,"styles"),e=q(c,"attrs"),c=q(c,"classes")):d=e=c=null,f["$"+h++]={elements:b[1],classes:c,styles:d,attributes:e},a=a.slice(b[0].length);return f}function q(a,b){var c=a.match(S[b]);return c?I(c[1]):null}
197function u(a){var b=a.styleBackup=a.attributes.style,c=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=c?c.split(/\s+/):[])}function v(a,b,c,d){var f=0,h;d.toHtml&&(b.name=b.name.replace(O,"$1"));if(d.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var p=0,k=h.length,m;p<k;++p)if(m=h[p](b)){h=m;break a}h=void 0}if(h)return h}if(d.doTransform&&(h=a._.transformations[b.name])){u(b);for(p=0;p<h.length;++p)z(a,b,h[p]);t(b)}if(d.doFilter){a:{p=
198b.name;k=a._;a=k.allowedRules.elements[p];h=k.allowedRules.generic;p=k.disallowedRules.elements[p];k=k.disallowedRules.generic;m=d.skipRequired;var l={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},n,D;if(a||h){u(b);if(p)for(n=0,D=p.length;n<D;++n)if(!1===e(p[n],b,l)){a=null;break a}if(k)for(n=0,D=k.length;n<D;++n)e(k[n],b,l);if(a)for(n=0,D=a.length;n<D;++n)g(a[n],b,l,m);if(h)for(n=
1990,D=h.length;n<D;++n)g(h[n],b,l,m);a=l}else a=null}if(!a||!a.valid)return c.push(b),1;D=a.validAttributes;var G=a.validStyles;h=a.validClasses;var p=b.attributes,q=b.styles,k=b.classes;m=b.classBackup;var y=b.styleBackup,w,L,x=[],l=[],v=/^data-cke-/;n=!1;delete p.style;delete p["class"];delete b.classBackup;delete b.styleBackup;if(!a.allAttributes)for(w in p)D[w]||(v.test(w)?w==(L=w.replace(/^data-cke-saved-/,""))||D[L]||(delete p[w],n=!0):(delete p[w],n=!0));if(!a.allStyles||a.hadInvalidStyle){for(w in q)a.allStyles||
200G[w]?x.push(w+":"+q[w]):n=!0;x.length&&(p.style=x.sort().join("; "))}else y&&(p.style=y);if(!a.allClasses||a.hadInvalidClass){for(w=0;w<k.length;++w)(a.allClasses||h[k[w]])&&l.push(k[w]);l.length&&(p["class"]=l.sort().join(" "));m&&l.length<m.split(/\s+/).length&&(n=!0)}else m&&(p["class"]=m);n&&(f=1);if(!d.skipFinalValidation&&!r(b))return c.push(b),1}d.toHtml&&(b.name=b.name.replace(T,"cke:$1"));return f}function x(a){var b=[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?
201new RegExp("^(?:"+b.join("|")+")$"):null}function t(a){var b=a.attributes,c;delete b.style;delete b["class"];if(c=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=c;a.classes.length&&(b["class"]=a.classes.sort().join(" "))}function r(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function n(a){if(!a)return!1;if(!0===a)return!0;var b=x(a);return function(c){return c in a||b&&c.match(b)}}function w(){return new CKEDITOR.htmlParser.element("br")}
202function A(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||E.$block[a.name])}function p(a,b,c){var d=a.name;if(E.$empty[d]||!a.children.length)"hr"==d&&"br"==b?a.replaceWith(w()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(E.$block[d]||"tr"==d)if("br"==b)a.previous&&!A(a.previous)&&(b=w(),b.insertBefore(a)),a.next&&!A(a.next)&&(b=w(),b.insertAfter(a)),a.replaceWithChildren();else{var d=a.children,e;b:{e=E[b];for(var f=0,h=d.length,p;f<h;++f)if(p=d[f],p.type==CKEDITOR.NODE_ELEMENT&&
203!e[p.name]){e=!1;break b}e=!0}if(e)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{e=a.parent;for(var f=e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==e.name,k,m,h=d.length;0<h;)p=d[--h],f&&(p.type==CKEDITOR.NODE_TEXT||p.type==CKEDITOR.NODE_ELEMENT&&E.$inline[p.name])?(k||(k=new CKEDITOR.htmlParser.element(b),k.insertAfter(a),c.push({check:"parent-down",el:k})),k.add(p,0)):(k=null,m=E[e.name]||E.span,p.insertAfter(a),e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||p.type!=CKEDITOR.NODE_ELEMENT||
204m[p.name]||c.push({check:"el-up",el:p}));a.remove()}}else d in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function z(a,b,c){var d,e;for(d=0;d<c.length;++d)if(e=c[d],!(e.check&&!a.check(e.check,!1)||e.left&&!e.left(b))){e.right(b,M);break}}function D(a,b){var c=b.getDefinition(),d=c.attributes,e=c.styles,f,h,p,k;if(a.name!=c.element)return!1;for(f in d)if("class"==f)for(c=d[f].split(/\s+/),p=a.classes.join("|");k=c.pop();){if(-1==p.indexOf(k))return!1}else if(a.attributes[f]!=
205d[f])return!1;for(h in e)if(a.styles[h]!=e[h])return!1;return!0}function y(a,b){var c,d;"string"==typeof a?c=a:a instanceof CKEDITOR.style?d=a:(c=a[0],d=a[1]);return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function B(a){return function(b){return D(b,a)}}function C(a){return function(b,c){c[a](b)}}var E=CKEDITOR.dtd,F=CKEDITOR.tools.copy,I=CKEDITOR.tools.trim,H=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a){this.allowedContent=[];this.disallowedContent=
206[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{}};CKEDITOR.filter.instances[this.id]=this;if(a instanceof CKEDITOR.editor){a=this.editor=a;this.customConfig=!0;var b=a.config.allowedContent;!0===b?this.disabled=!0:(b||(this.customConfig=!1),this.allow(b,"config",1),this.allow(a.config.extraAllowedContent,"extra",1),this.allow(H[a.enterMode]+
207" "+H[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(b,c,d){if(!m(this,b,d))return!1;var e,h;if("string"==typeof b)b=f(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,d);e=b.getDefinition();b={};d=e.attributes;b[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.objectKeys(e.styles)};
208d&&(d=F(d),e.classes=d["class"]?d["class"].split(/\s+/):null,e.requiredClasses=e.classes,delete d["class"],e.attributes=d,e.requiredAttributes=d&&CKEDITOR.tools.objectKeys(d))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)h=this.allow(b[e],c,d);return h}a(this,b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,d){if(this.disabled)return!1;var e=this,f=[],h=this.editor&&this.editor.config.protectedSource,k,m=!1,g={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};
209a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-"))if(k=v(e,a,f,g),k&1)m=!0;else if(k&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var d=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var p,l,t;if(h)for(l=0;l<h.length;++l)if((t=d.match(h[l]))&&t[0].length==d.length){c=!0;
210break a}d=CKEDITOR.htmlParser.fragment.fromHtml(d);1==d.children.length&&(p=d.children[0]).type==CKEDITOR.NODE_ELEMENT&&v(e,p,c,g);c=!c.length}c||f.push(a)}},null,!0);f.length&&(m=!0);var l;a=[];d=H[d||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var t;c=f.pop();)c.type==CKEDITOR.NODE_ELEMENT?p(c,d,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(t=E[c.parent.name]||E.span,l.check){case "it":E.$removeEmpty[c.name]&&!c.children.length?p(c,d,a):r(c)||p(c,d,a);break;case "el-up":c.parent.type==
211CKEDITOR.NODE_DOCUMENT_FRAGMENT||t[c.name]||p(c,d,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||t[c.name]||p(c.parent,d,a)}return m},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!m(this,b,!0))return!1;"string"==typeof b&&(b=f(b));a(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},
212addContentForms:function(a){if(!this.disabled&&a){var b,c,d=[],e;for(b=0;b<a.length&&!e;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(e=c);if(e){for(b=0;b<a.length;++b)d.push(y(a[b],e));this.addTransformations(d)}}},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);
213this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var d=this._.transformations,e;for(e=0;e<a.length;++e){b=a[e];var f=void 0,h=void 0,p=void 0,k=void 0,m=void 0,g=void 0;c=[];for(h=0;h<b.length;++h)p=b[h],"string"==typeof p?(p=p.split(/\s*:\s*/),k=p[0],m=null,g=p[1]):(k=p.check,m=p.left,g=p.right),f||(f=p,f=f.element?f.element:k?k.match(/^([a-z0-9]+)/i)[0]:
214f.left.getDefinition().element),m instanceof CKEDITOR.style&&(m=B(m)),c.push({check:k==f?null:k,left:m,right:"string"==typeof g?C(g):g});b=f;d[b]||(d[b]=[]);d[b].push(c)}}},check:function(a,b,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(a)){for(var e=a.length;e--;)if(this.check(a[e],b,c))return!0;return!1}var h,p;if("string"==typeof a){p=a+"\x3c"+(!1===b?"0":"1")+(c?"1":"0")+"\x3e";if(p in this._.cachedChecks)return this._.cachedChecks[p];e=f(a).$1;h=e.styles;var k=e.classes;e.name=e.elements;
215e.classes=k=k?k.split(/\s*,\s*/):[];e.styles=d(h);e.attributes=d(e.attributes);e.children=[];k.length&&(e.attributes["class"]=k.join(" "));h&&(e.attributes.style=CKEDITOR.tools.writeCssText(e.styles));h=e}else e=a.getDefinition(),h=e.styles,k=e.attributes||{},h&&!CKEDITOR.tools.isEmpty(h)?(h=F(h),k.style=CKEDITOR.tools.writeCssText(h,!0)):h={},h={name:e.element,attributes:k,classes:k["class"]?k["class"].split(/\s+/):[],styles:h,children:[]};var k=CKEDITOR.tools.clone(h),m=[],g;if(!1!==b&&(g=this._.transformations[h.name])){for(e=
2160;e<g.length;++e)z(this,h,g[e]);t(h)}v(this,k,m,{doFilter:!0,doTransform:!1!==b,skipRequired:!c,skipFinalValidation:!c});b=0<m.length?!1:CKEDITOR.tools.objectCompare(h.attributes,k.attributes,!0)?!0:!1;"string"==typeof a&&(this._.cachedChecks[p]=b);return b},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,d){var e=a.slice(),f;if(this.check(H[c]))return c;for(d||(e=e.reverse());f=e.pop();)if(this.check(f))return b[f];
217return CKEDITOR.ENTER_BR}}(),destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var J={styles:1,attributes:1,classes:1},L={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},G=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,S={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},O=/^cke:(object|embed|param)$/,
218T=/^(object|embed|param)$/,M;M=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a,"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,c){c=c||b;if(!(c in a.styles)){var d=a.attributes[b];d&&(/^\d+$/.test(d)&&(d+="px"),a.styles[c]=d)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var d=a.styles[b],e=d&&d.match(/^(\d+)(?:\.\d*)?px$/);
219e?a.attributes[c]=e[1]:"cke-test"==d&&(a.attributes[c]="cke-test")}delete a.styles[b]},alignmentToStyle:function(a){if(!("float"in a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){function b(d){a.styles["border-top-width"]=c[d[0]];a.styles["border-right-width"]=
220c[d[1]];a.styles["border-bottom-width"]=c[d[2]];a.styles["border-left-width"]=c[d[3]]}if(a.styles.border){var c=a.styles.border.match(/([\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles["border-width"]=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}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"];
221delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(d){a.styles["margin-top"]=
222c[d[0]];a.styles["margin-right"]=c[d[1]];a.styles["margin-bottom"]=c[d[2]];a.styles["margin-left"]=c[d[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(c.length){case 1:a.styles.margin=c[0];break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:D,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),d=c.styles,e=c.attributes,f,h,p,k;a.name=c.element;for(f in e)if("class"==
223f)for(c=a.classes.join("|"),p=e[f].split(/\s+/);k=p.pop();)-1==c.indexOf(k)&&a.classes.push(k);else a.attributes[f]=e[f];for(h in d)a.styles[h]=d[h]}}}}(),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=
224CKEDITOR.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 g(){var a=this._.editor;this.hasFocus&&(this.hasFocus=!1,CKEDITOR.env.chrome&&a.editable().isInline()&&a.window.$.getSelection().removeAllRanges(),(a=this._.editor.container)&&a.removeClass("cke_focus"),this._.editor.fire("blur"))}if(!this._.locked){this._.timer&&
225clearTimeout(this._.timer);var b=CKEDITOR.focusManager._.blurDelay;a||!b?g.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;g.call(this)},b,this)}},add:function(a,g){var b=a.getCustomData("focusmanager");if(!b||b!=this){b&&b.remove(a);var b="focus",e="blur";g&&(CKEDITOR.env.ie?(b="focusin",e="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(e,h.blur,this);
226g&&(CKEDITOR.event.useCapture=0);a.setCustomData("focusmanager",this);a.setCustomData("focusmanager_handlers",h)}},remove:function(a){a.removeCustomData("focusmanager");var g=a.removeCustomData("focusmanager_handlers");a.removeListener("blur",g.blur);a.removeListener("focus",g.focus)}}}(),CKEDITOR.keystrokeHandler=function(a){if(a.keystrokeHandler)return a.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:a};return this},function(){var a,g=function(b){b=b.data;var h=b.getKeystroke(),
227m=this.keystrokes[h],g=this._.editor;a=!1===g.fire("key",{keyCode:h,domEvent:b});a||(m&&(a=!1!==g.execCommand(m,{from:"keystrokeHandler"})),a||(a=!!this.blockedKeystrokes[h]));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",g,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,
228"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es: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,g,b){a&&CKEDITOR.lang.languages[a]||(a=this.detect(g,a));var e=this;g=function(){e[a].dir=e.rtl[a]?"rtl":"ltr";b(a,e[a])};
229this[a]?g():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+a+".js"),g,this)},detect:function(a,g){var b=this.languages;g=g||navigator.userLanguage||navigator.language||a;var e=g.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),h=e[1],e=e[2];b[h+"-"+e]?h=h+"-"+e:b[h]||(h=null);CKEDITOR.lang.detect=h?function(){return h}:function(a){return a};return h||a}}}(),CKEDITOR.scriptLoader=function(){var a={},g={};return{load:function(b,e,h,m){var l="string"==typeof b;l&&(b=[b]);h||(h=CKEDITOR);var c=b.length,
230k=[],d=[],f=function(a){e&&(l?e.call(h,a):e.call(h,k,d))};if(0===c)f(!0);else{var q=function(a,b){(b?k:d).push(a);0>=--c&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),f(b))},u=function(b,c){a[b]=1;var d=g[b];delete g[b];for(var e=0;e<d.length;e++)d[e](b,c)},v=function(b){if(a[b])q(b,!0);else{var c=g[b]||(g[b]=[]);c.push(q);if(!(1<c.length)){var d=new CKEDITOR.dom.element("script");d.setAttributes({type:"text/javascript",src:b});e&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?
231d.$.onreadystatechange=function(){if("loaded"==d.$.readyState||"complete"==d.$.readyState)d.$.onreadystatechange=null,u(b,!0)}:(d.$.onload=function(){setTimeout(function(){u(b,!0)},0)},d.$.onerror=function(){u(b,!1)}));d.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var x=0;x<c;x++)v(b[x])}},queue:function(){function a(){var b;(b=e[0])&&this.load(b.scriptUrl,b.callback,CKEDITOR,0)}var e=[];return function(h,m){var g=this;e.push({scriptUrl:h,
232callback:function(){m&&m.apply(this,arguments);e.shift();a.call(g)}});1==e.length&&a.call(this)}}()}}(),CKEDITOR.resourceManager=function(a,g){this.basePath=a;this.fileName=g;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}},CKEDITOR.resourceManager.prototype={add:function(a,g){if(this.registered[a]
vendor: 4,228 bytes, lines 232-240
232)throw Error('[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.');var b=this.registered[a]=g||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+
233CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var g=this.externals[a];return CKEDITOR.getUrl(g&&g.dir||this.basePath+a+"/")},getFilePath:function(a){var g=this.externals[a];return CKEDITOR.getUrl(this.getPath(a)+(g?g.file:this.fileName+".js"))},addExternal:function(a,g,b){a=a.split(",");for(var e=0;e<a.length;e++){var h=a[e];b||(g=g.replace(/[^\/]+$/,function(a){b=a;return""}));this.externals[h]={dir:g,
234file:b||this.fileName+".js"}}},load:function(a,g,b){CKEDITOR.tools.isArray(a)||(a=a?[a]:[]);for(var e=this.loaded,h=this.registered,m=[],l={},c={},k=0;k<a.length;k++){var d=a[k];if(d)if(e[d]||h[d])c[d]=this.get(d);else{var f=this.getFilePath(d);m.push(f);f in l||(l[f]=[]);l[f].push(d)}}CKEDITOR.scriptLoader.load(m,function(a,d){if(d.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+l[d[0]].join(",")+'" was not found at "'+d[0]+'".');for(var f=0;f<a.length;f++)for(var h=l[a[f]],
235k=0;k<h.length;k++){var m=h[k];c[m]=this.get(m);e[m]=1}g.call(b,c)},this)}},CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin"),CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(a){var g={};return function(b,e,h){var m={},l=function(b){a.call(this,b,function(a){CKEDITOR.tools.extend(m,a);var b=[],c;for(c in a){var q=a[c],u=q&&q.requires;if(!g[c]){if(q.icons)for(var v=q.icons.split(","),x=v.length;x--;)CKEDITOR.skin.addIcon(v[x],q.path+"icons/"+(CKEDITOR.env.hidpi&&
236q.hidpi?"hidpi/":"")+v[x]+".png");g[c]=1}if(u)for(u.split&&(u=u.split(",")),q=0;q<u.length;q++)m[u[q]]||b.push(u[q])}if(b.length)l.call(this,b);else{for(c in m)q=m[c],q.onLoad&&!q.onLoad._called&&(!1===q.onLoad()&&delete m[c],q.onLoad._called=1);e&&e.call(h||window,m)}},this)};l.call(this,b)}}),CKEDITOR.plugins.setLang=function(a,g,b){var e=this.get(a);a=e.langEntries||(e.langEntries={});e=e.lang||(e.lang=[]);e.split&&(e=e.split(","));-1==CKEDITOR.tools.indexOf(e,g)&&e.push(g);a[g]=b},CKEDITOR.ui=
237function(a){if(a.ui)return a.ui;this.items={};this.instances={};this.editor=a;this._={handlers:{}};return this},CKEDITOR.ui.prototype={add:function(a,g,b){b.name=a.toLowerCase();var e=this.items[a]={type:g,command:b.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(e,b)},get:function(a){return this.instances[a]},create:function(a){var g=this.items[a],b=g&&this._.handlers[g.type],e=g&&g.command&&this.editor.getCommand(g.command),b=b&&b.create.apply(this,g.args);this.instances[a]=
238b;e&&e.uiItems.push(b);b&&!b.type&&(b.type=g.type);return b},addHandler:function(a,g){this._.handlers[a]=g},space:function(a){return CKEDITOR.document.getById(this.spaceId(a))},spaceId:function(a){return this.editor.id+"_"+a}},CKEDITOR.event.implementOn(CKEDITOR.ui),function(){function a(a,d,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==d){if(!(d instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");
239if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");if(!b(d,f))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');this.element=d;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||g();this.id=CKEDITOR.tools.getNextId();
240this.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",e);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",function(){m(this,this.elementPath(),!0)});this.on("mode",e);this.on("instanceReady",function(){this.config.startupFocus&&this.focus()});
vendor: 7,957 bytes, lines 240-256
240CKEDITOR.fire("instanceCreated",null,
241this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){"destroyed"!==this.status?c(this,a):CKEDITOR.warn("editor-incorrect-destroy")},0,this)}function g(){do var a="editor"+ ++v;while(CKEDITOR.instances[a]);return a}function b(a,b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function e(){var a=this.commands,b;for(b in a)h(this,a[b])}function h(a,b){b[b.startDisabled?"disable":a.readOnly&&
242!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function m(a,b,c){if(b){var d,e,f=a.commands;for(e in f)d=f[e],(c||d.contextSensitive)&&d.refresh(a,b)}}function l(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=x[b]||(x[b]={});c.fn?(c.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&l(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){c.fn=CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};l(a)});return!0}function c(a,
243b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var c in b.on)a.on(c,b.on[c]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}c=a.config;a.readOnly=c.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?
244!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=c.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:c.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:c.shiftEnterMode;c.skin&&(CKEDITOR.skinName=c.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);k(a)});b&&null!=b.customConfig&&(a.config.customConfig=
245b.customConfig);l(a)||a.fireOnce("customConfigLoaded")}function k(a){CKEDITOR.skin.loadPart("editor",function(){d(a)})}function d(a){CKEDITOR.lang.load(a.config.language,a.config.defaultLanguage,function(b,c){var d=a.config.title;a.langCode=b;a.lang=CKEDITOR.tools.prototypedCopy(c);a.title="string"==typeof d||!1===d?d:[a.lang.editor,a.name].join(", ");a.config.contentsLangDirection||(a.config.contentsLangDirection=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.getDirection(1):a.lang.dir);a.fire("langLoaded");
246f(a)})}function f(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);q(a)})}function q(a){var b=a.config,c=b.plugins,d=b.extraPlugins,e=b.removePlugins;if(d)var f=new RegExp("(?:^|,)(?:"+d.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(f,""),c=c+(","+d);if(e)var h=new RegExp("(?:^|,)(?:"+e.replace(/\s*,\s*/g,"|")+")(?\x3d,|$)","g"),c=c.replace(h,"");CKEDITOR.env.air&&(c+=",adobeair");CKEDITOR.plugins.load(c.split(","),function(c){var d=[],
247e=[],f=[];a.plugins=c;for(var p in c){var k=c[p],m=k.lang,g=null,l=k.requires,n;CKEDITOR.tools.isArray(l)&&(l=l.join(","));if(l&&(n=l.match(h)))for(;l=n.pop();)CKEDITOR.error("editor-plugin-required",{plugin:l.replace(",",""),requiredBy:p});m&&!a.lang[p]&&(m.split&&(m=m.split(",")),0<=CKEDITOR.tools.indexOf(m,a.langCode)?g=a.langCode:(g=a.langCode.replace(/-.*/,""),g=g!=a.langCode&&0<=CKEDITOR.tools.indexOf(m,g)?g:0<=CKEDITOR.tools.indexOf(m,"en")?"en":m[0]),k.langEntries&&k.langEntries[g]?(a.lang[p]=
248k.langEntries[g],g=null):f.push(CKEDITOR.getUrl(k.path+"lang/"+g+".js")));e.push(g);d.push(k)}CKEDITOR.scriptLoader.load(f,function(){for(var c=["beforeInit","init","afterInit"],f=0;f<c.length;f++)for(var h=0;h<d.length;h++){var p=d[h];0===f&&e[h]&&p.lang&&p.langEntries&&(a.lang[p.name]=p.langEntries[e[h]]);if(p[c[f]])p[c[f]](a)}a.fireOnce("pluginsLoaded");b.keystrokes&&a.setKeystroke(a.config.keystrokes);for(h=0;h<a.config.blockedKeystrokes.length;h++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[h]]=
2491;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)})})}function u(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}a.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=a;var v=0,x={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{addCommand:function(a,b){b.name=a.toLowerCase();var c=new CKEDITOR.command(this,
250b);this.mode&&h(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!d.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,d=c.element,e=new CKEDITOR.dom.element(d.$.form);d.is("textarea")&&e&&(e.on("submit",a),b(e.$.submit)&&(e.$.submit=CKEDITOR.tools.override(e.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){e.removeListener("submit",
251a)}))},destroy:function(a){this.fire("beforeDestroy");!a&&u.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();
252return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),d={name:a,commandData:b,command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",d)&&(d.returnValue=c.exec(d.commandData),!c.async&&!1!==this.fire("afterCommandExec",d))?d.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?
253b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,c){var d=!0,e=b;b&&"object"==typeof b&&(c=b.internal,e=b.callback,d=!b.noSnapshot);!c&&d&&this.fire("saveSnapshot");if(e||
254!c)this.once("dataReady",function(a){!c&&d&&this.fire("saveSnapshot");e&&e.call(a.editor)});a={dataValue:a};!c&&this.fire("setData",a);this._.data=a.dataValue;!c&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly=a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,c){this.fire("insertHtml",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",
255a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;for(var d=new CKEDITOR.dom.documentFragment,e,f,h,k=0;k<c.length;k++){var m=c[k],g=m.startContainer;g.getName&&"tr"==g.getName()?(e||(e=g.getAscendant("table").clone(),e.append(g.getAscendant("tbody").clone()),d.append(e),e=e.findOne("tbody")),f&&f.equals(g)||(f=g,h=g.clone(),e.append(h)),h.append(m.cloneContents())):d.append(m.cloneContents())}b=e?d:b.getHtmlFromRange(c[0]);
256return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),d=this.getSelection().getRanges();if(!c||0===d.length)return null;d=d[0];c=c.extractHtmlFromRange(d,b);
vendor: 25,523 bytes, lines 256-305
256b||this.getSelection().selectRanges([d]);return a?c.getHtml():c},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return u.call(this)},setKeystroke:function(){for(var a=
257this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,d,e=b.length;e--;)c=b[e],d=0,CKEDITOR.tools.isArray(c)&&(d=c[1],c=c[0]),d?a[c]=d:delete a[c]},getCommandKeystroke:function(a){var b=a.name,c=this.keystrokeHandler.keystrokes,d;if(a.fakeKeystroke)return a.fakeKeystroke;for(d in c)if(c.hasOwnProperty(d)&&c[d]==b)return d;return null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);
258this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},
259showNotification: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,g={checked:1,compact:1,declare:1,
260defer: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 e,h,m=0,l;e=this._.htmlPartsRegex.exec(b);){h=e.index;if(h>m)if(m=b.substring(m,h),l)l.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(h=e[1])if(h=h.toLowerCase(),l&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(l.join("")),
261l=null),!l){this.onTagClose(h);continue}if(l)l.push(e[0]);else if(h=e[3]){if(h=h.toLowerCase(),!/="/.test(h)){var c={},k,d=e[4];e=!!e[5];if(d)for(;k=a.exec(d);){var f=k[1].toLowerCase();k=k[2]||k[3]||k[4]||"";c[f]=!k&&g[f]?f:CKEDITOR.tools.htmlDecodeAttr(k)}this.onTagOpen(h,c,e);!l&&CKEDITOR.dtd.$cdata[h]&&(l=[])}}else if(h=e[2])this.onComment(h)}if(b.length>m)this.onText(b.substring(m,b.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",
262a)},openTagClose:function(a,g){g?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,g){"string"==typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g));this._.output.push(" ",a,'\x3d"',g,'"')},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 g=this._.output.join("");
263a&&this.reset();return g}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,g=CKEDITOR.tools.indexOf(a,this),b=this.previous,e=this.next;b&&(b.next=e);e&&(e.previous=b);a.splice(g,1);this.parent=null},replaceWith:function(a){var g=this.parent.children,b=CKEDITOR.tools.indexOf(g,this),e=a.previous=this.previous,h=a.next=this.next;e&&(e.next=a);h&&(h.previous=a);g[b]=a;a.parent=this.parent;this.parent=null},
264insertAfter:function(a){var g=a.parent.children,b=CKEDITOR.tools.indexOf(g,a),e=a.next;g.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;e&&(e.previous=this);this.parent=a.parent},insertBefore:function(a){var g=a.parent.children,b=CKEDITOR.tools.indexOf(g,a);g.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 g="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in
265a},b=this.parent;for(;b&&b.type==CKEDITOR.NODE_ELEMENT;){if(g(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,
266g){var b=this.value;if(!(b=a.onComment(g,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,g){g&&this.filter(g);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,g){if(!(this.value=a.onText(g,this.value,this)))return this.remove(),
267!1},writeHtml:function(a,g){g&&this.filter(g);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"]?
268!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var g=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},e=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(m,l,c){function k(a){var b;if(0<r.length)for(var c=0;c<r.length;c++){var e=
269r[c],f=e.name,h=CKEDITOR.dtd[f],p=w.name&&CKEDITOR.dtd[w.name];p&&!p[f]||a&&h&&!h[a]&&CKEDITOR.dtd[a]?f==w.name&&(q(w,w.parent,1),c--):(b||(d(),b=1),e=e.clone(),e.parent=w,w=e,r.splice(c,1),c--)}}function d(){for(;n.length;)q(n.shift(),w)}function f(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],d;c&&c.type==CKEDITOR.NODE_TEXT&&((d=CKEDITOR.tools.rtrim(c.value))?c.value=d:a.children.length=b-1)}}function q(b,d,e){d=d||w||t;var h=w;void 0===b.previous&&
270(u(d,b)&&(w=d,x.onTagOpen(c,{}),b.returnPoint=d=w),f(b),a(b)&&!b.children.length||d.add(b),"pre"==b.name&&(p=!1),"textarea"==b.name&&(A=!1));b.returnPoint?(w=b.returnPoint,delete b.returnPoint):w=e?d:h}function u(a,b){if((a==t||"body"==a.name)&&c&&(!a.name||CKEDITOR.dtd[a.name][c])){var d,e;return(d=b.attributes&&(e=b.attributes["data-cke-real-element-type"])?e:b.name)&&d in CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function v(a,b){return a in CKEDITOR.dtd.$listItem||
271a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var x=new CKEDITOR.htmlParser,t=l instanceof CKEDITOR.htmlParser.element?l:"string"==typeof l?new CKEDITOR.htmlParser.element(l):new CKEDITOR.htmlParser.fragment,r=[],n=[],w=t,A="textarea"==t.name,p="pre"==t.name;x.onTagOpen=function(c,f,h,m){f=new CKEDITOR.htmlParser.element(c,f);f.isUnknown&&h&&(f.isEmpty=!0);f.isOptionalClose=m;if(a(f))r.push(f);else{if("pre"==c)p=!0;else{if("br"==c&&p){w.add(new CKEDITOR.htmlParser.text("\n"));
272return}"textarea"==c&&(A=!0)}if("br"==c)n.push(f);else{for(;!(m=(h=w.name)?CKEDITOR.dtd[h]||(w._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e,f.isUnknown||w.isUnknown||m[c]);)if(w.isOptionalClose)x.onTagClose(h);else if(c in b&&h in b)h=w.children,(h=h[h.length-1])&&"li"==h.name||q(h=new CKEDITOR.htmlParser.element("li"),w),!f.returnPoint&&(f.returnPoint=w),w=h;else if(c in CKEDITOR.dtd.$listItem&&!v(c,h))x.onTagOpen("li"==c?"ul":"dl",{},0,1);else if(h in g&&!v(c,h))!f.returnPoint&&(f.returnPoint=
273w),w=w.parent;else if(h in CKEDITOR.dtd.$inline&&r.unshift(w),w.parent)q(w,w.parent,1);else{f.isOrphan=1;break}k(c);d();f.parent=w;f.isEmpty?q(f):w=f}}};x.onTagClose=function(a){for(var b=r.length-1;0<=b;b--)if(a==r[b].name){r.splice(b,1);return}for(var e=[],f=[],h=w;h!=t&&h.name!=a;)h._.isBlockLike||f.unshift(h),e.push(h),h=h.returnPoint||h.parent;if(h!=t){for(b=0;b<e.length;b++){var p=e[b];q(p,p.parent)}w=h;h._.isBlockLike&&d();q(h,h.parent);h==w&&(w=w.parent);r=r.concat(f)}"body"==a&&(c=!1)};x.onText=
274function(a){if(!(w._.hasInlineStarted&&!n.length||p||A)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var b=w.name,f=b?CKEDITOR.dtd[b]||(w._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):e;if(!A&&!f["#"]&&b in g)x.onTagOpen(h[b]||""),x.onText(a);else{d();k();p||A||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(u(w,a))this.onTagOpen(c,{},0,1);w.add(a)}};x.onCDATA=function(a){w.add(new CKEDITOR.htmlParser.cdata(a))};x.onComment=function(a){d();k();w.add(new CKEDITOR.htmlParser.comment(a))};
275x.parse(m);for(d();w!=t;)q(w,w.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 c=0<b?this.children[b-1]:null;if(c){if(a._.isBlockLike&&c.type==CKEDITOR.NODE_TEXT&&(c.value=CKEDITOR.tools.rtrim(c.value),0===c.value.length)){this.children.pop();this.add(a);return}c.next=a}a.previous=c;a.parent=this;this.children.splice(b,0,a);this._.hasInlineStarted||(this._.hasInlineStarted=a.type==CKEDITOR.NODE_TEXT||
276a.type==CKEDITOR.NODE_ELEMENT&&!a._.isBlockLike)},filter:function(a,b){b=this.getFilterContext(b);a.onRoot(b,this);this.filterChildren(a,!1,b)},filterChildren:function(a,b,c){if(this.childrenFilteredBy!=a.id){c=this.getFilterContext(c);if(b&&!this.parent)a.onRoot(c,this);this.childrenFilteredBy=a.id;for(b=0;b<this.children.length;b++)!1===this.children[b].filter(a,c)&&b--}},writeHtml:function(a,b){b&&this.filter(b);this.writeChildrenHtml(a)},writeChildrenHtml:function(a,b,c){var e=this.getFilterContext();
277if(c&&!this.parent&&b)b.onRoot(e,this);b&&this.filterChildren(b,!1,e);b=0;c=this.children;for(e=c.length;b<e;b++)c[b].writeHtml(a)},forEach:function(a,b,c){if(!(c||b&&this.type!=b))var e=a(this);if(!1!==e){c=this.children;for(var d=0;d<c.length;d++)e=c[d],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 g(b,e,h,g){var l,c;for(l in e)(c=b[l])||(c=b[l]=new a),c.add(e[l],h,g)}CKEDITOR.htmlParser.filter=
278CKEDITOR.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,e){var h;"number"==typeof e?h=e:e&&"priority"in e&&(h=e.priority);"number"!=typeof h&&(h=10);"object"!=typeof e&&(e={});a.elementNames&&this.elementNameRules.addMany(a.elementNames,h,e);a.attributeNames&&
279this.attributeNameRules.addMany(a.attributeNames,h,e);a.elements&&g(this.elementsRules,a.elements,h,e);a.attributes&&g(this.attributesRules,a.attributes,h,e);a.text&&this.textRules.add(a.text,h,e);a.comment&&this.commentRules.add(a.comment,h,e);a.root&&this.rootRules.add(a.root,h,e)},applyTo:function(a){a.filter(this)},onElementName:function(a,e){return this.elementNameRules.execOnName(a,e)},onAttributeName:function(a,e){return this.attributeNameRules.execOnName(a,e)},onText:function(a,e,h){return this.textRules.exec(a,
280e,h)},onComment:function(a,e,h){return this.commentRules.exec(a,e,h)},onRoot:function(a,e){return this.rootRules.exec(a,e)},onElement:function(a,e){for(var h=[this.elementsRules["^"],this.elementsRules[e.name],this.elementsRules.$],g,l=0;3>l;l++)if(g=h[l]){g=g.exec(a,e,this);if(!1===g)return null;if(g&&g!=e)return this.onNode(a,g);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var h=e.type;return h==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):h==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,
281e.value)):h==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value)):null},onAttribute:function(a,e,h,g){return(h=this.attributesRules[h])?h.exec(a,g,e,this):g}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,e,h){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,options:h})},addMany:function(a,e,h){for(var g=[this.findIndex(e),0],l=0,c=a.length;l<c;l++)g.push({value:a[l],priority:e,options:h});this.rules.splice.apply(this.rules,g)},findIndex:function(a){for(var e=
282this.rules,h=e.length-1;0<=h&&a<e[h].priority;)h--;return h+1},exec:function(a,e){var h=e instanceof CKEDITOR.htmlParser.node||e instanceof CKEDITOR.htmlParser.fragment,g=Array.prototype.slice.call(arguments,1),l=this.rules,c=l.length,k,d,f,q;for(q=0;q<c;q++)if(h&&(k=e.type,d=e.name),f=l[q],!(a.nonEditable&&!f.options.applyToAll||a.nestedEditable&&f.options.excludeNestedEditable)){f=f.value.apply(null,g);if(!1===f||h&&f&&(f.name!=d||f.type!=k))return f;null!=f&&(g[0]=e=f)}return e},execOnName:function(a,
283e){for(var h=0,g=this.rules,l=g.length,c;e&&h<l;h++)c=g[h],a.nonEditable&&!c.options.applyToAll||a.nestedEditable&&c.options.excludeNestedEditable||(e=e.replace(c.value[0],c.value[1]));return e}}}(),function(){function a(a,c){function d(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text(" "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function f(a,c){return function(f){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=[],p=b(f),g,l;if(p)for(k(p,1)&&h.push(p);p;)m(p)&&
284(g=e(p))&&k(g)&&((l=e(g))&&!m(l)?h.push(g):(d(z).insertAfter(g),g.remove())),p=p.previous;for(p=0;p<h.length;p++)h[p].remove();if(h=!a||!1!==("function"==typeof c?c(f):c))z||CKEDITOR.env.needsBrFiller||f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?z||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||f.name in CKEDITOR.dtd.tr||f.name in CKEDITOR.dtd.$listItem)?(h=b(f),h=!h||"form"==f.name&&"input"==h.name):h=!1:h=!1;h&&f.add(d(a))}}}function k(a,b){if((!z||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&
285"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(r))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&z&&(!b||a.parent.name in n)||!z&&((c=a.previous)&&"br"==c.name||!c||m(c)))?!0:!1}var g={elements:{}},z="html"==c,n=CKEDITOR.tools.extend({},p),D;for(D in n)"#"in w[D]||delete n[D];for(D in n)g.elements[D]=f(z,a.config.fillEmptyBlocks);g.root=f(z,!1);g.elements.br=
286function(a){return function(b){if(b.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=b.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=b.next;c&&h(c);)c=c.next;var f=e(b);!c&&m(b.parent)?l(b.parent,d(a)):m(c)&&f&&!m(f)&&d(a).insertBefore(c)}}}}(z);return g}function g(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?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 e(a){for(a=a.previous;a&&
287h(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 m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in p||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function l(a,b){var c=a.children[a.children.length-1];a.children.push(b);b.parent=a;c&&(c.next=b,b.previous=c)}function c(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1);
288a.contenteditable="false"}function k(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function d(a){return a.replace(C,function(a,b,c){return"\x3c"+b+c.replace(E,function(a,b){return F.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function f(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+v(c).replace(/</g,"\x26lt;").replace(/>/g,
289"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function q(a){return a.replace(J,function(a,b){return decodeURIComponent(b)})}function u(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+n+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function x(a,b){var c=b._.dataStore;
290return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function t(a,b){var c=[],d=b.config.protectedSource,e=b._.dataStore||(b._.dataStore={id:1}),f=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(c.push(a)-
2911)+"--\x3e"});for(var h=0;h<d.length;h++)a=a.replace(d[h],function(a){a=a.replace(f,function(a,b,d){return c[d]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(f,function(a,b,d){return"\x3c!--"+n+(b?"{C}":"")+encodeURIComponent(c[d]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){e[e.id]=
292decodeURIComponent(b);return"{cke_protected_"+e.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,e){return"\x3c"+c+d+"\x3e"+x(v(e),b)+"\x3c/"+c+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c,e,h=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(z);c.addRules(D,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});
293e.addRules(y);e.addRules(B,{applyToAll:!0});e.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,e,c=t(c,b),c=f(c,H),c=d(c),c=f(c,I),c=c.replace(L,"$1cke:$2"),c=c.replace(S,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||b.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",
294h=1);e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(G,"$1$2");c=q(c);c=v(c);e=!1===a.fixForBody?!1:g(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,e);e&&(h=c,!h.children.length&&CKEDITOR.dtd[h.name][e]&&(e=new CKEDITOR.htmlParser.element(e),h.add(e)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,
295!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 b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=u(b)},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,
296a.data.context,g(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,d=h.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=v(c);c=x(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var e=this.editor,
297f,h,p,k;b&&"object"==typeof b?(f=b.context,c=b.fixForBody,d=b.dontFilter,h=b.filter,p=b.enterMode,k=b.protectedWhitespaces):f=b;f||null===f||(f=e.editable().getName());return e.fire("toHtml",{dataValue:a,context:f,fixForBody:c,dontFilter:d,filter:h||e.filter,enterMode:p||e.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var c,d,e;b&&(c=b.context,d=b.filter,e=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,
298filter:d||this.editor.filter,context:c,enterMode:e||this.editor.enterMode}).dataValue}};var r=/(?:&nbsp;|\xa0)$/,n="{cke_protected}",w=CKEDITOR.dtd,A="caption colgroup col thead tfoot tbody".split(" "),p=CKEDITOR.tools.extend({},w.$blockLimit,w.$block),z={elements:{input:c,textarea:c}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},y={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height;c&&(a.attributes.width=c);
299b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},B={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,e=0;e<c.length;e++)d="data-cke-saved-"+c[e],d in b&&delete b[c[e]]}return a},table:function(a){a.children.slice(0).sort(function(a,
300b){var c,d;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(A,a.name),d=CKEDITOR.tools.indexOf(A,b.name));-1<c&&-1<d&&c!=d||(c=a.parent?a.getIndex():-1,d=b.parent?b.getIndex():-1);return c>d?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},
301style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:k,textarea:k},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(B.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});
302var C=/<(a|area|img|input|source)\b([^>]*)>/gi,E=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,F=/^(href|src|name)$/i,I=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,H=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,J=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,L=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,S=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=
303function(a,g){this.name=a;this.attributes=g||{};this.children=[];var b=a||"",e=b.match(/^cke:(.*)/);e&&(b=e[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 g={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:
304a)||"").replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,h){"font-family"==e&&(h=h.replace(/["']/g,""));g[e.toLowerCase()]=h});return{rules:g,populate:function(a){var e=this.toString();e&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",e):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=e:a.style=e)},toString:function(){var a=[],e;for(e in g)g[e]&&a.push(e,":",g[e],";");return a.join("")}}},function(){function a(a){return function(b){return b.type==
305CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var g=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 g=this,l,c;b=g.getFilterContext(b);if(b.off)return!0;
vendor: 6,427 bytes, lines 305-318
305if(!g.parent)a.onRoot(b,g);for(;;){l=g.name;if(!(c=
306a.onElementName(b,l)))return this.remove(),!1;g.name=c;if(!(g=a.onElement(b,g)))return this.remove(),!1;if(g!==this)return this.replaceWith(g),!1;if(g.name==l)break;if(g.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(g),!1;if(!g.name)return this.replaceWithChildren(),!1}l=g.attributes;var k,d;for(k in l){for(c=l[k];;)if(d=a.onAttributeName(b,k))if(d!=k)delete l[k],k=d;else break;else{delete l[k];break}d&&(!1===(c=a.onAttribute(b,g,d,c))?delete l[d]:l[d]=c)}g.isEmpty||this.filterChildren(a,!1,
307b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var m=this.name,l=[],c=this.attributes,k,d;a.openTag(m,c);for(k in c)l.push([k,c[k]]);a.sortAttributes&&l.sort(g);k=0;for(d=l.length;k<d;k++)c=l[k],a.attribute(c[0],c[1]);a.openTagClose(m,this.isEmpty);this.writeChildrenHtml(a);this.isEmpty||a.closeTag(m)},writeChildrenHtml:b.writeChildrenHtml,replaceWithChildren:function(){for(var a=this.children,b=a.length;b;)a[--b].insertAfter(this);this.remove()},forEach:b.forEach,
308getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&(b=a(b));for(var h=0,g=this.children.length;h<g;++h)if(b(this.children[h]))return this.children[h];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,g=a.length;b<g;++b)a[b].parent=this},getOuterHtml:function(){var a=new CKEDITOR.htmlParser.basicWriter;
309this.writeHtml(a);return a.getHtml()},split:function(a){for(var b=this.children.splice(a,this.children.length-a),g=this.clone(),l=0;l<b.length;++l)b[l].parent=g;g.children=b;b[0]&&(b[0].previous=null);0<a&&(this.children[a-1].next=null);this.parent.add(g,this.getIndex()+1);return g},find:function(a,b){void 0===b&&(b=!1);var g=[],l;for(l=0;l<this.children.length;l++){var c=this.children[l];"function"==typeof a&&a(c)?g.push(c):"string"==typeof a&&c.name===a&&g.push(c);b&&c.find&&(g=g.concat(c.find(a,
310b)))}return g},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,
311nonEditable:!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 g=0;g<b.length;g+=2)a[b[g]]=b[g+1]}return a}},!0)}(),function(){var a={},g=/{([^}]+)}/g,b=/([\\'])/g,e=/\n/g,h=/\r/g;CKEDITOR.template=function(m){if(a[m])this.output=
312a[m];else{var l=m.replace(b,"\\$1").replace(e,"\\n").replace(h,"\\r").replace(g,function(a,b){return"',data['"+b+"']\x3d\x3dundefined?'{"+b+"}':data['"+b+"'],'"});this.output=a[m]=Function("data","buffer","return buffer?buffer.push('"+l+"'):['"+l+"'].join('');")}}}(),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=
313a,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(g,b){var e=a[g];if(e)return e;e={name:g,source:b};CKEDITOR.fire("template",e);return a[g]=new CKEDITOR.template(e.source)};CKEDITOR.getTemplate=function(g){return a[g]}}(),function(){var a=[];CKEDITOR.addCss=
314function(g){a.push(g)};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,g){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(g,
315a,CKEDITOR.ELEMENT_MODE_INLINE),e=a.is("textarea")?a:null;e?(b.setData(e.getValue(),null,!0),a=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!b.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+e.getValue()+"\x3c/div\x3e",CKEDITOR.document),a.insertAfter(e),e.hide(),e.$.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");
316b.mode="wysiwyg";b.fire("mode");b.status="ready";b.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,b)},null,null,1E4);b.on("destroy",function(){e&&(b.container.clearCustomData(),b.container.remove(),e.show());b.element.clearCustomData();delete b.element});return b};CKEDITOR.inlineAll=function(){var a,g,b;for(b in CKEDITOR.dtd.$editable)for(var e=CKEDITOR.document.getElementsByTag(b),h=0,m=e.count();h<m;h++)a=e.getItem(h),"true"==a.getAttribute("contenteditable")&&(g={element:a,config:{}},
317!1!==CKEDITOR.fire("inline",g)&&CKEDITOR.inline(a,g.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})}(),CKEDITOR.replaceClass="ckeditor",function(){function a(a,h,m,l){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 c=new CKEDITOR.editor(h,a,l);l==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.setStyle("visibility","hidden"),c._.required=
318a.hasAttribute("required"),a.removeAttribute("required"));m&&c.setData(m,null,!0);c.on("loaded",function(){b(c);l==CKEDITOR.ELEMENT_MODE_REPLACE&&c.config.autoUpdateElement&&a.$.form&&c._attachToForm();c.setMode(c.config.startupMode,function(){c.resetDirty();c.status="ready";
vendor: 7,207 bytes, lines 318-332
318c.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,c)})});c.on("destroy",g);return c}function g(){var a=this.container,b=this.element;a&&(a.clearCustomData(),a.remove());b&&(b.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&
319(b.show(),this._.required&&b.setAttribute("required","required")),delete this.element)}function b(a){var b=a.name,g=a.element,l=a.elementMode,c=a.fire("uiSpace",{space:"top",html:""}).html,k=a.fire("uiSpace",{space:"bottom",html:""}).html,d=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"':
320"")+"\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(d.output({id:a.id,name:b,langDir:a.lang.dir,langCode:a.langCode,voiceLabel:a.title,topHtml:c?'\x3cspan id\x3d"'+
321a.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+c+"\x3c/span\x3e":"",contentId:a.ui.spaceId("contents"),bottomHtml:k?'\x3cspan id\x3d"'+a.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+k+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));l==CKEDITOR.ELEMENT_MODE_REPLACE?(g.hide(),b.insertAfter(g)):g.append(b);a.container=b;a.ui.contentsElement=a.ui.space("contents");c&&a.ui.space("top").unselectable();
322k&&a.ui.space("bottom").unselectable();g=a.config.width;l=a.config.height;g&&b.setStyle("width",CKEDITOR.tools.cssLength(g));l&&a.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(l));b.disableContextMenu();CKEDITOR.env.webkit&&b.on("focus",function(){a.focus()});a.fireOnce("uiReady")}CKEDITOR.replace=function(b,h){return a(b,h,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,h,g){return a(b,h,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var a=
323document.getElementsByTagName("textarea"),b=0;b<a.length;b++){var g=null,l=a[b];if(l.name||l.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(l.className))continue}else if("function"==typeof arguments[0]&&(g={},!1===arguments[0](l,g)))continue;this.replace(l,g)}}};CKEDITOR.editor.prototype.addMode=function(a,b){(this._.modes||(this._.modes={}))[a]=b};CKEDITOR.editor.prototype.setMode=function(a,b){var g=this,l=this._.modes;if(a!=g.mode&&l&&l[a]){g.fire("beforeSetMode",
324a);if(g.mode){var c=g.checkDirty(),l=g._.previousModeData,k,d=0;g.fire("beforeModeUnload");g.editable(0);g._.previousMode=g.mode;g._.previousModeData=k=g.getData(1);"source"==g.mode&&l==k&&(g.fire("lockSnapshot",{forceUpdate:!0}),d=1);g.ui.space("contents").setHtml("");g.mode=""}else g._.previousModeData=g.getData(1);this._.modes[a](function(){g.mode=a;void 0!==c&&!c&&g.resetDirty();d?g.fire("unlockSnapshot"):"wysiwyg"==a&&g.fire("saveSnapshot");setTimeout(function(){g.fire("mode");b&&b.call(g)},
3250)})}};CKEDITOR.editor.prototype.resize=function(a,b,g,l){var c=this.container,k=this.ui.space("contents"),d=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;l=l?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):c;l.setSize("width",a,!0);d&&(d.style.width="1%");var f=(l.$.offsetHeight||0)-(k.$.clientHeight||0),c=Math.max(b-(g?0:f),0);b=g?b+f:b;k.setStyle("height",c+"px");d&&(d.style.width="100%");this.fire("resize",{outerHeight:b,
326contentsHeight:c,outerWidth:a||l.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 b=a.editor,c=a.data.path,d=c.blockLimit,f=a.data.selection,h=f.getRanges()[0],k;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(f=g(f,c))f.appendBogus(),k=CKEDITOR.env.ie;
327l(b,c.block,d)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(c=h.clone(),c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),d=new CKEDITOR.dom.walker(c),d.guard=function(a){return!e(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!d.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock())&&(b=h.fixBlock(!0,b.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(b=b.getFirst(e))&&b.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(b.getText()).match(/^(?:&nbsp;|\xa0)$/)&&b.remove(),
328k=1,a.cancel());k&&h.select()}function g(a,b){if(a.isFake)return 0;var c=b.block||b.blockLimit,d=c&&c.getLast(e);if(!(!c||!c.isBlockBoundary()||d&&d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()||c.is("pre")||c.getBogus()))return c}function b(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function e(a){return f(a)&&q(a)}function h(a,b){return function(c){var d=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;
329(d=d&&d.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(d):null)&&(b.equals(d)||b.contains(d))||a.call(this,c)}}function m(a){function b(a){return function(b,d){d&&b.type==CKEDITOR.NODE_ELEMENT&&b.is(f)&&(c=b);if(!(d||!e(b)||a&&v(b)))return!1}}var c,d=a.getRanges()[0];a=a.root;var f={table:1,ul:1,ol:1,dl:1};if(d.startPath().contains(f)){var h=d.clone();h.collapse(1);h.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(h);a.guard=b();a.checkBackward();if(c)return h=d.clone(),
330h.collapse(),h.setEndAt(c,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(h),a.guard=b(!0),c=!1,a.checkForward(),c}return null}function l(a,b,c){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function c(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function k(a){var b=a.editor;b.getSelection().scrollIntoView();
331setTimeout(function(){b.fire("saveSnapshot")},0)}function d(a,b,c){var d=a.getCommonAncestor(b);for(b=a=c?b:a;(a=a.getParent())&&!d.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var f,q,u,v,x,t,r,n,w,A;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),
332this.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{!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document)?this.$.focu
vendor: 26,241 bytes, lines 332-383
332s():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())},
333on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=h(b,this),c[0]=a,c[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,c)},attachListener:function(a){!this._.listeners&&(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=
334this._.attrChanges,b,c;for(c in a)a.hasOwnProperty(c)&&(b=a[c],null!==b?this.setAttribute(c,b):this.removeAttribute(c))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes",b),this.addClass(a))},changeAttr:function(a,b){var c=this.getAttribute(a);b!==c&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=c),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),
335"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a,b)},insertHtml:function(a,b,c){var d=this.editor;d.focus();d.fire("saveSnapshot");c||(c=d.getSelection().getRanges()[0]);t(this,b||"html",a,c);c.select();k(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){t(this,c||"html",a,b);this.editor.fire("afterInsertHtml",
336{intoRange:b})},insertElement:function(a,b){var c=this.editor;c.focus();c.fire("saveSnapshot");var d=c.activeEnterMode,c=c.getSelection(),f=a.getName(),f=CKEDITOR.dtd.$block[f];b||(b=c.getRanges()[0]);this.insertElementIntoRange(a,b)&&(b.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),f&&((f=a.getNext(function(a){return e(a)&&!v(a)}))&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$block)?f.getDtd()["#"]?b.moveToElementEditStart(f):b.moveToElementEditEnd(a):f||d==CKEDITOR.ENTER_BR||(f=b.fixBlock(!0,
337d==CKEDITOR.ENTER_DIV?"div":"p"),b.moveToElementEditStart(f))));c.selectRanges([b]);k(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,d=c.config.enterMode,f=a.getName(),e=CKEDITOR.dtd.$block[f];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?r(b):b.startContainer.is(CKEDITOR.dtd.$list)&&n(b));var h,g;if(e)for(;(h=b.getCommonAncestor(0,
3381))&&(g=CKEDITOR.dtd[h.getName()])&&(!g||!g[f]);)h.getName()in CKEDITOR.dtd.span?b.splitElement(h):b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(h),b.collapse(!0),h.remove()):b.splitBlock(d==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();
339a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.removeClass("cke_editable");this.status="detached";var a=this.editor;this._.detach();delete a.document;delete a.window},isInline:function(){return this.getDocument().equals(CKEDITOR.document)},fixInitialSelection:function(){function a(){var b=c.getDocument().$,d=b.getSelection(),f;a:if(d.anchorNode&&d.anchorNode==c.$)f=!0;else{if(CKEDITOR.env.webkit&&(f=
340c.getDocument().getActive())&&f.equals(c)&&!d.anchorNode){f=!0;break a}f=void 0}f&&(f=new CKEDITOR.dom.range(c),f.moveToElementEditStart(c),b=b.createRange(),b.setStart(f.startContainer.$,f.startOffset),b.collapse(!0),d.removeAllRanges(),d.addRange(b))}function b(){var a=c.getDocument().$,d=a.selection,f=c.getDocument().getActive();"None"==d.type&&f.equals(c)&&(d=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),d.moveToElementEditStart(c),d=d.startContainer,d.type!=CKEDITOR.NODE_ELEMENT&&(d=d.getParent()),
341a.moveToElementText(d.$),a.collapse(!0),a.select())}var c=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};w.eol.detect(a,this);w.bogus.exclude(a);w.cell.shrink(a);a.fragment=a.range.cloneContents();w.tree.rebuild(a,
342this);w.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=A,d={range:a,doc:a.document},f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var e=this.editor.createRange();e.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=e.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,
343this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),e=0,
344h;if(d)for(;h=d.getItem(e++);)if(!q(h)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),u(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return f},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(x,function(a,b){return b}));a.setData(b,null,1)},this);
345this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,
346"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]=
347+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 c=function(){var b=a.editable();null!=a._.previousScrollTop&&b.getDocument().equals(CKEDITOR.document)&&(b.$.scrollTop=a._.previousScrollTop,a._.previousScrollTop=null,this.removeListener("scroll",
348c))};this.on("scroll",c)}a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom",function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var h=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var g=a.config.contentsLangDirection;this.getDirection(1)!=g&&this.changeAttr("dir",g);var k=CKEDITOR.getCss();
349if(k){var g=h.getHead(),l=g.getCustomData("stylesheet");l?k!=l.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?l.$.styleSheet.cssText=k:l.setText(k)):(k=h.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),g.setCustomData("stylesheet",k),k.data("cke-temp",1))}g=h.getCustomData("stylesheet_ref")||0;h.setCustomData("stylesheet_ref",g+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=
350(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;if(c in n){b=a.getSelection();var e,h=b.getRanges()[0],g=h.startPath(),k,l,q,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=m(b))?(a.fire("saveSnapshot"),h.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),h.select(),a.fire("saveSnapshot"),
351d=1):h.collapsed&&((k=g.block)&&(q=k[c?"getPrevious":"getNext"](f))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&h[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),h[c?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),h["moveToElementEdit"+(c?"End":"Start")](q),h.select(),a.fire("saveSnapshot"),d=1):g.blockLimit&&g.blockLimit.is("td")&&(l=g.blockLimit.getAscendant("table"))&&h.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(q=l[c?"getPrevious":"getNext"](f))?(a.fire("saveSnapshot"),
352h["moveToElementEdit"+(c?"End":"Start")](q),h.checkStartOfBlock()&&h.checkEndOfBlock()?q.remove():h.select(),a.fire("saveSnapshot"),d=1):(l=g.contains(["td","th","caption"]))&&h.checkBoundaryOfElement(l,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in n&&!this.getFirst(e)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});
353this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var c=b.data.getTarget();c.is("img","hr","input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",
354function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(x,""))){var c=a.createRange();c.moveToElementEditStart(b);c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input",
355"textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in n){var c=8==b,f=a.getSelection().getRanges()[0];b=f.startPath();if(f.collapsed)a:{var e=b.block;if(e&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()&&f.moveToClosestEditablePosition(e,!c)&&f.collapsed){if(f.startContainer.type==CKEDITOR.NODE_ELEMENT){var h=f.startContainer.getChild(f.startOffset-(c?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){a.fire("saveSnapshot");
356h.remove();b=!0;break a}}f=f.startPath().block;if(!f||f&&f.contains(e))b=void 0;else{a.fire("saveSnapshot");var g;(g=(c?f:e).getBogus())&&g.remove();g=a.getSelection();h=g.createBookmarks();(c?e:f).moveChildren(c?f:e,!1);b.lastElement.mergeSiblings();d(e,f,!c);g.selectBookmarks(h);b=!0}}else b=!1}else c=f,g=b.block,f=c.endPath().block,g&&f&&!g.equals(f)?(a.fire("saveSnapshot"),(e=g.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),f.getParent()&&(f.moveChildren(g,!1),b.lastElement.mergeSiblings(),
357d(g,f,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.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 b=
358a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",
359function(b){var c=b.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",
360function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label;if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var f=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",
361f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");f=CKEDITOR.dom.walker.whitespaces(!0);q=CKEDITOR.dom.walker.bookmark(!1,!0);u=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();x=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;t=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var f,e,h,g,k=[],l=d.range.startContainer;
362f=d.range.startPath();for(var l=m[l.getName()],n=0,q=c.getChildren(),r=q.count(),t=-1,w=-1,D=0,x=f.contains(m.$list);n<r;++n)f=q.getItem(n),a(f)?(h=f.getName(),x&&h in CKEDITOR.dtd.$list?k=k.concat(b(f,d)):(g=!!l[h],"br"!=h||!f.data("cke-eol")||n&&n!=r-1||(D=(e=n?k[n-1].node:q.getItem(n+1))&&(!a(e)||!e.is("br")),e=e&&a(e)&&m.$block[e.getName()]),-1!=t||g||(t=n),g||(w=n),k.push({isElement:1,isLineBreak:D,isBlock:f.isBlockBoundary(),hasBlockSibling:e,node:f,name:h,allowed:g}),e=D=0)):k.push({isElement:0,
363node:f,allowed:1});-1<t&&(k[t].firstNotAllowed=1);-1<w&&(k[w].lastNotAllowed=1);return k}function d(b,c){var f=[],e=b.getChildren(),h=e.count(),g,k=0,l=m[c],n=!b.is(m.$inline)||b.is("br");for(n&&f.push(" ");k<h;k++)g=e.getItem(k),a(g)&&!g.is(l)?f=f.concat(d(g,c)):f.push(g);n&&f.push(" ");return f}function f(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function h(b){return b&&a(b)&&(b.is(m.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function g(b,c,d,f){var e=b.clone(),
364h,k;e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(e)).next())&&a(h)&&n[h.getName()]&&(k=h.getPrevious())&&a(k)&&!k.getParent().equals(b.startContainer)&&d.contains(k)&&f.contains(h)&&h.isIdentical(k)&&(h.moveChildren(k),h.remove(),g(b,c,d,f))}function k(b,c){function d(b,c){if(c.isBlock&&c.isElement&&!c.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var f=c.endContainer.getChild(c.endOffset),e=c.endContainer.getChild(c.endOffset-1);f&&d(f,b[b.length-1]);e&&d(e,b[0])&&
365(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var m=CKEDITOR.dtd,n={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},r=CKEDITOR.tools.extend({},m.$inline);delete r.br;return function(n,G,t,w){var x=n.editor,v=!1;"unfiltered_html"==G&&(G="html",v=!0);if(!w.checkReadOnly()){var u=(new CKEDITOR.dom.elementPath(w.startContainer,w.root)).blockLimit||w.root;n={type:G,dontFilter:v,editable:n,editor:x,range:w,blockLimit:u,
366mergeCandidates:[],zombies:[]};G=n.range;w=n.mergeCandidates;var A,I;"text"==n.type&&G.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(A=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",G.document),G.insertNode(A),G.setStartAfter(A));v=new CKEDITOR.dom.elementPath(G.startContainer);n.endPath=u=new CKEDITOR.dom.elementPath(G.endContainer);if(!G.collapsed){var x=u.block||u.blockLimit,ga=G.getCommonAncestor();x&&!x.equals(ga)&&!x.contains(ga)&&G.checkEndOfBlock()&&n.zombies.push(x);G.deleteContents()}for(;(I=
367f(G))&&a(I)&&I.isBlockBoundary()&&v.contains(I);)G.moveToPosition(I,CKEDITOR.POSITION_BEFORE_END);g(G,n.blockLimit,v,u);A&&(G.setEndBefore(A),G.collapse(),A.remove());A=G.startPath();if(x=A.contains(h,!1,1))G.splitElement(x),n.inlineStylesRoot=x,n.inlineStylesPeak=A.lastElement;A=G.createBookmark();(x=A.startNode.getPrevious(e))&&a(x)&&h(x)&&w.push(x);(x=A.startNode.getNext(e))&&a(x)&&h(x)&&w.push(x);for(x=A.startNode;(x=x.getParent())&&h(x);)w.push(x);G.moveToBookmark(A);if(A=t){A=n.range;if("text"==
368n.type&&n.inlineStylesRoot){I=n.inlineStylesPeak;G=I.getDocument().createText("{cke-peak}");for(w=n.inlineStylesRoot.getParent();!I.equals(w);)G=G.appendTo(I.clone()),I=I.getParent();t=G.getOuterHtml().split("{cke-peak}").join(t)}I=n.blockLimit.getName();if(/^\s+|\s+$/.test(t)&&"span"in CKEDITOR.dtd[I]){var N='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';t=N+t+N}t=n.editor.dataProcessor.toHtml(t,{context:null,fixForBody:!1,protectedWhitespaces:!!N,dontFilter:n.dontFilter,filter:n.editor.activeFilter,
369enterMode:n.editor.activeEnterMode});I=A.document.createElement("body");I.setHtml(t);N&&(I.getFirst().remove(),I.getLast().remove());if((N=A.startPath().block)&&(1!=N.getChildCount()||!N.getBogus()))a:{var P;if(1==I.getChildCount()&&a(P=I.getFirst())&&P.is(q)&&!P.hasAttribute("contenteditable")){N=P.getElementsByTag("*");A=0;for(w=N.count();A<w;A++)if(G=N.getItem(A),!G.is(r))break a;P.moveChildren(P.getParent(1));P.remove()}}n.dataWrapper=I;A=t}if(A){P=n.range;A=P.document;var K;I=n.blockLimit;w=
3700;var R,N=[],Q,Y;t=x=0;var U,Z;G=P.startContainer;var v=n.endPath.elements[0],aa,u=v.getPosition(G),ga=!!v.getCommonAncestor(G)&&u!=CKEDITOR.POSITION_IDENTICAL&&!(u&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED);G=b(n.dataWrapper,n);for(k(G,P);w<G.length;w++){u=G[w];if(K=u.isLineBreak){K=P;U=I;var X=void 0,ba=void 0;u.hasBlockSibling?K=1:(X=K.startContainer.getAscendant(m.$block,1))&&X.is({div:1,p:1})?(ba=X.getPosition(U),ba==CKEDITOR.POSITION_IDENTICAL||ba==CKEDITOR.POSITION_CONTAINS?
371K=0:(U=K.splitElement(X),K.moveToPosition(U,CKEDITOR.POSITION_AFTER_START),K=1)):K=0}if(K)t=0<w;else{K=P.startPath();!u.isBlock&&l(n.editor,K.block,K.blockLimit)&&(Y=c(n.editor))&&(Y=A.createElement(Y),Y.appendBogus(),P.insertNode(Y),CKEDITOR.env.needsBrFiller&&(R=Y.getBogus())&&R.remove(),P.moveToPosition(Y,CKEDITOR.POSITION_BEFORE_END));if((K=P.startPath().block)&&!K.equals(Q)){if(R=K.getBogus())R.remove(),N.push(K);Q=K}u.firstNotAllowed&&(x=1);if(x&&u.isElement){K=P.startContainer;for(U=null;K&&
372!m[K.getName()][u.name];){if(K.equals(I)){K=null;break}U=K;K=K.getParent()}if(K)U&&(Z=P.splitElement(U),n.zombies.push(Z),n.zombies.push(U));else{U=I.getName();aa=!w;K=w==G.length-1;U=d(u.node,U);for(var X=[],ba=U.length,ea=0,ha=void 0,ia=0,fa=-1;ea<ba;ea++)ha=U[ea]," "==ha?(ia||aa&&!ea||(X.push(new CKEDITOR.dom.text(" ")),fa=X.length),ia=1):(X.push(ha),ia=0);K&&fa==X.length&&X.pop();aa=X}}if(aa){for(;K=aa.pop();)P.insertNode(K);aa=0}else P.insertNode(u.node);u.lastNotAllowed&&w<G.length-1&&((Z=ga?
373v:Z)&&P.setEndAt(Z,CKEDITOR.POSITION_AFTER_START),x=0);P.collapse()}}1!=G.length?R=!1:(R=G[0],R=R.isElement&&"false"==R.node.getAttribute("contenteditable"));R&&(t=!0,K=G[0].node,P.setStartAt(K,CKEDITOR.POSITION_BEFORE_START),P.setEndAt(K,CKEDITOR.POSITION_AFTER_END));n.dontMoveCaret=t;n.bogusNeededBlocks=N}R=n.range;var W;Z=n.bogusNeededBlocks;for(aa=R.createBookmark();Q=n.zombies.pop();)Q.getParent()&&(Y=R.clone(),Y.moveToElementEditStart(Q),Y.removeEmptyBlocksAtEnd());if(Z)for(;Q=Z.pop();)CKEDITOR.env.needsBrFiller?
374Q.appendBogus():Q.append(R.document.createText(" "));for(;Q=n.mergeCandidates.pop();)Q.mergeSiblings();R.moveToBookmark(aa);if(!n.dontMoveCaret){for(Q=f(R);Q&&a(Q)&&!Q.is(m.$empty);){if(Q.isBlockBoundary())R.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END);else{if(h(Q)&&Q.getHtml().match(/(\s|&nbsp;)$/g)){W=null;break}W=R.clone();W.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END)}Q=Q.getLast(e)}W&&R.moveToRange(W)}}}}();r=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;
375if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,d){c=a.getDocument().createElement(c);a.append(c,d);return c}function c(a){var b=a.count(),d;for(b;0<b--;)d=a.getItem(b),CKEDITOR.tools.trim(d.getHtml())||(d.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var f=d.startContainer,e=f.getAscendant("table",1),h=!1;c(e.getElementsByTag("td"));
376c(e.getElementsByTag("th"));e=d.clone();e.setStart(f,0);e=a(e).lastBackward();e||(e=d.clone(),e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),h=!0);e||(e=f);e.is("table")?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",h)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",h)),(f=e.getBogus())&&f.remove(),d.moveToPosition(e,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();n=function(){function a(b){b=
377new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,d=!1,f;f=b.clone();f.setStart(c,0);f=a(f).lastBackward();f||(f=b.clone(),f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),d=!0);f||(f=c);f.is(CKEDITOR.dtd.$list)?(b.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),
378b.collapse(!0),f.remove()):((c=f.getBogus())&&c.remove(),b.moveToPosition(f,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();w={eol:{detect:function(a,b){var c=a.range,d=c.clone(),f=c.clone(),e=new CKEDITOR.dom.elementPath(c.startContainer,b),h=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);f.collapse();e.block&&d.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(c.setStartAfter(e.block),a.prependEolBr=1);h.block&&f.checkBoundaryOfElement(h.block,CKEDITOR.START)&&
379(c.setEndBefore(h.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!v(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),
380f=new CKEDITOR.dom.elementPath(d,b),e=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),h;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(f.blockLimit.is({tr:1,table:1})){var g=f.contains("table").getParent();h=function(a){return!a.equals(g)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!e.equals(c))){var k=f.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(k)}}h||
381(h=function(a){return!a.equals(f.block)&&!a.equals(f.blockLimit)});this.rebuildFragment(a,b,d,h)},rebuildFragment:function(a,b,c,d){for(var f;c&&!c.equals(b)&&d(c);)f=c.clone(0,1),a.fragment.appendTo(f),a.fragment=f,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,f=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==f&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};A=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?
382"insertBefore":"insertAfter"](d)}function b(c,d,f){a(d);a(f,1);for(var e;e=f.getNext();)e.insertAfter(d),d=e;u(c)&&c.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b,a.bookmark),f=c.startPath(),e=c.endPath(),h=f.contains(CKEDITOR.dtd.$list),g=e.contains(CKEDITOR.dtd.$list);a.mergeList=h&&g&&h.getParent().equals(g.getParent())&&!h.equals(g);a.mergeListItems=f.block&&e.block&&f.block.is(CKEDITOR.dtd.$listItem)&&
383e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)c=c.clone(),c.setStartBefore(a.bookmark.startNode),c.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=c.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,c
vendor: 5,557 bytes, lines 383-394
383),h=new CKEDITOR.dom.elementPath(f,c);if(a.mergeList){var g=e.contains(CKEDITOR.dtd.$list),k=h.contains(CKEDITOR.dtd.$list);g.equals(k)||(k.moveChildren(g),k.remove())}a.mergeListItems&&
384(e=e.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$listItem),e.equals(h)||b(h,d,f));d.remove();f.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,
385c),h=new CKEDITOR.dom.elementPath(f,c),e=e.block,h=h.block;e&&h&&!e.equals(h)&&b(h,d,f);d.remove();f.remove()}}},table:function(){function a(d){var f=[],e,h=new CKEDITOR.dom.walker(d),g=d.startPath().contains(c),k=d.endPath().contains(c),l={};h.guard=function(a,h){if(a.type==CKEDITOR.NODE_ELEMENT){var m="visited_"+(h?"out":"in");if(a.getCustomData(m))return;CKEDITOR.dom.element.setMarker(l,a,m,1)}if(h&&g&&a.equals(g))e=d.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),f.push(e);else if(!h&&k&&
386a.equals(k))e=d.clone(),e.setStartAt(k,CKEDITOR.POSITION_AFTER_START),f.push(e);else{if(m=!h)m=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!g||b(a,g))&&(!k||b(a,k));m&&(e=d.clone(),e.selectNodeContents(a),f.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(l);return f}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,f=a.getPosition(c);return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&d)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,
387d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),f=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++f};d.checkForward();if(1<f){var d=b.startPath().contains("table"),e=b.endPath().contains("table");d&&e&&b.checkBoundaryOfElement(d,CKEDITOR.START)&&b.checkBoundaryOfElement(e,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(d),b.setEndAfter(e),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(f,e){var h=d(e,f.bookmark),g=h.clone(),
388k,l,m=h.getCommonAncestor();m.is(CKEDITOR.dtd.$tableContent)&&!m.is(c)&&(m=m.getAscendant("table",!0));l=m;m=new CKEDITOR.dom.elementPath(h.startContainer,l);l=new CKEDITOR.dom.elementPath(h.endContainer,l);m=m.contains("table");l=l.contains("table");if(m||l)m&&l&&b(m,l)?(f.tableSurroundingRange=g,g.setStartAt(m,CKEDITOR.POSITION_AFTER_END),g.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),g=h.clone(),g.setEndAt(m,CKEDITOR.POSITION_AFTER_END),k=h.clone(),k.setStartAt(l,CKEDITOR.POSITION_BEFORE_START),
389k=a(g).concat(a(k))):m?l||(f.tableSurroundingRange=g,g.setStartAt(m,CKEDITOR.POSITION_AFTER_END),h.setEndAt(m,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange=g,g.setEndAt(l,CKEDITOR.POSITION_BEFORE_START),h.setStartAt(l,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=k?k:a(h)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),u(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=
390a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark);c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var d=
391b.startPath(),f;l(a,d.block,d.blockLimit)&&(f=c(a))&&(f=b.document.createElement(f),f.appendBogus(),b.insertNode(f),b.moveToPosition(f,CKEDITOR.POSITION_AFTER_START))}}}()}(),function(){function a(){var a=this._.fakeSelection,b;a&&(b=this.getSelection(1),b&&b.isHidden()||(a.reset(),a=0));if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();if(!b.compare(this._.selectionPreviousPath)){var c=this._.selectionPreviousPath&&
392this._.selectionPreviousPath.blockLimit.equals(b.blockLimit);CKEDITOR.env.webkit&&!c&&(this._.previousActive=this.document.getActive());this._.selectionPreviousPath=b;this.fire("selectionChange",{selection:a,path:b})}}function g(){r=!0;t||(b.call(this),t=CKEDITOR.tools.setTimeout(b,200,this))}function b(){t=null;r&&(CKEDITOR.tools.setTimeout(a,0,this),r=!1)}function e(a){return n(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function h(a){function b(c,d){return c&&c.type!=CKEDITOR.NODE_TEXT?
393a.clone()["moveToElementEdit"+(d?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var c=a.startContainer,d=a.getPreviousNode(e,null,c),f=a.getNextNode(e,null,c);return b(d)||b(f,1)||!(d||f||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?!0:!1}function m(a){l(a,!1);var b=a.getDocument().createText(v);a.setCustomData("cke-fillingChar",b);return b}function l(a,b){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==b){var f=a.getDocument().getSelection().getNative(),
394e=f&&"None"!=f.type&&f.getRangeAt(0),h=v.length;if(d.getLength()>h&&e&&e.intersectsNode(d.$)){var g=[{node:f.anchorNode,offset:f.anchorOffset},{node:f.focusNode,offset:f.focusOffset}];f.anchorNode==d.$&&f.anchorOffset>h&&(g[0].offset-=h);
vendor: 14,480 bytes, lines 394-422
394f.focusNode==d.$&&f.focusOffset>h&&(g[1].offset-=h)}}d.setText(c(d.getText(),1));g&&(d=a.getDocument().$,f=d.getSelection(),d=d.createRange(),d.setStart(g[0].node,g[0].offset),d.collapse(!0),f.removeAllRanges(),f.addRange(d),f.extend(g[1].node,g[1].offset))}}function c(a,
395b){return b?a.replace(x,function(a,b){return b?" ":""}):a.replace(v,"")}function k(a,b){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e'+(b||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),f=a.createRange(),e=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);f.setStartAt(c,
396CKEDITOR.POSITION_AFTER_START);f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([f]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function d(a){var b={37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var f=a.getSelection().getRanges(),e=f[0];1==f.length&&e.collapsed&&(d=e[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),c.data.preventDefault(),
397c.cancel())}}}function f(a){for(var b=0;b<a.length;b++){var c=a[b];c.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!c.collapsed){if(c.startContainer.isReadOnly())for(var d=c.startContainer,f;d&&!((f=d.type==CKEDITOR.NODE_ELEMENT)&&d.is("body")||!d.isReadOnly());)f&&"false"==d.getAttribute("contentEditable")&&c.setStartAfter(d),d=d.getParent();d=c.startContainer;f=c.endContainer;var e=c.startOffset,h=c.endOffset,g=c.clone();d&&d.type==CKEDITOR.NODE_TEXT&&(e>=d.getLength()?g.setStartAfter(d):g.setStartBefore(d));
398f&&f.type==CKEDITOR.NODE_TEXT&&(h?g.setEndAfter(f):g.setEndBefore(f));d=new CKEDITOR.dom.walker(g);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var f=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(g.endContainer)&CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(d),f.collapsed||a.splice(b+1,0,f));return!0}return!1};d.next()}}return a}var q="function"!=typeof window.getSelection,u=1,v=CKEDITOR.tools.repeat("​",7),x=new RegExp(v+"( )?","g"),t,r,n=CKEDITOR.dom.walker.invisible(1),
399w=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]);return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),f;(f=d.moveToClosestEditablePosition(b.selected,a))||(f=d.moveToClosestEditablePosition(b.selected,!a));f&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();f||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d]));
400c.fire("saveSnapshot");return!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(b){function c(){var a=f.getSelection();a&&a.removeAllRanges()}var f=b.editor;f.on("contentDom",function(){function b(){t=new CKEDITOR.dom.selection(f.getSelection());t.lock()}function c(){h.removeListener("mouseup",c);n.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument==e.$&&b.select()}
401var e=f.document,h=CKEDITOR.document,k=f.editable(),m=e.getBody(),n=e.getDocumentElement(),p=k.isInline(),r,t;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==r&&(a=f.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=f.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){r&&CKEDITOR.env.webkit&&(r=f._.previousActive&&f._.previousActive.equals(e.getActive()))&&null!=
402f._.previousScrollTop&&f._.previousScrollTop!=k.$.scrollTop&&(k.$.scrollTop=f._.previousScrollTop);f.unlockSelection(r);r=0},null,null,-1);k.attachListener(k,"mousedown",function(){r=0});if(CKEDITOR.env.ie||p)q?k.attachListener(k,"beforedeactivate",b,null,null,-1):k.attachListener(f,"selectionCheck",b,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){f.lockSelection(t);r=1},null,null,-1),k.attachListener(k,"mousedown",function(){r=0});if(CKEDITOR.env.ie&&!p){var w;
403k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=f.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(w=f.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&w&&(f.document.$.documentElement.scrollLeft=w.x,f.document.$.documentElement.scrollTop=w.y);w=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var x,v;n.on("mousedown",function(a){function b(a){a=a.data.$;if(x){var c=m.$.createTextRange();
404try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}x.setEndPoint(0>v.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);x.select()}}function c(){n.removeListener("mousemove",b);h.removeListener("mouseup",c);n.removeListener("mouseup",c);x.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<n.$.clientHeight&&a.$.x<n.$.clientWidth){x=m.$.createTextRange();try{x.moveToPoint(a.$.clientX,a.$.clientY)}catch(d){}v=x.duplicate();n.on("mousemove",b);h.on("mouseup",c);n.on("mouseup",c)}})}if(7<
405CKEDITOR.env.version&&11>CKEDITOR.env.version)n.on("mousedown",function(a){a.data.getTarget().is("html")&&(h.on("mouseup",c),n.on("mouseup",c))})}}k.attachListener(k,"selectionchange",a,f);k.attachListener(k,"keyup",g,f);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){f.forceNextSelectionCheck();f.selectionChange(1)});if(p&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var z;k.attachListener(k,"mousedown",function(){z=1});k.attachListener(e.getDocumentElement(),"mouseup",function(){z&&
406g.call(f);z=0})}else k.attachListener(CKEDITOR.env.ie?k:e.getDocumentElement(),"mouseup",g,f);CKEDITOR.env.webkit&&k.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:l(k)}},null,null,-1);k.attachListener(k,"keydown",d(f),null,null,-1)});f.on("setData",function(){f.unlockSelection();CKEDITOR.env.webkit&&c()});f.on("contentDomUnload",function(){f.unlockSelection()});if(CKEDITOR.env.ie9Compat)f.on("beforeDestroy",
407c,null,null,9);f.on("dataReady",function(){delete f._.fakeSelection;delete f._.hiddenSelectionContainer;f.selectionChange(1)});f.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=f.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=f.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);f.on("key",function(a){if("wysiwyg"==f.mode){var b=f.getSelection();if(b.isFake){var c=
408w[a.data.keyCode];if(c)return c({editor:f,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar");c&&(c.getCustomData("ready")?l(a):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){l(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=c(a.data))},b,null,20);b.on("toDataFormat",
409function(a){a.data.dataValue=c(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:g).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&&
410a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():
411new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:u++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),
412this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,f;if(a)if(a.getRangeAt)d=(f=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=a.createRange()}catch(e){}d=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=
413null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var A={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:c,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:v});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=
414q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(f){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;
415else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&A[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=q?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var f=d.children,e,h,g=b.duplicate(),k=0,
416l=f.length-1,m=-1,n,p;k<=l;)if(m=Math.floor((k+l)/2),e=f[m],g.moveToElementText(e),n=g.compareEndPoints("StartToStart",b),0<n)l=m-1;else if(0>n)k=m+1;else return{container:d,offset:a(e)};if(-1==m||m==f.length-1&&0>n){g.moveToElementText(d);g.setEndPoint("StartToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;f=d.childNodes;if(!g)return e=f[f.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:f.length}:{container:e,offset:e.nodeValue.length};for(d=f.length;0<g&&0<d;)h=f[--d],h.nodeType==
417CKEDITOR.NODE_TEXT&&(p=h,g-=h.nodeValue.length);return{container:p,offset:-g}}g.collapse(0<n?!0:!1);g.setEndPoint(0<n?"StartToStart":"EndToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:d,offset:a(e)+(0<n?0:1)};for(;0<g;)try{h=e[0<n?"previousSibling":"nextSibling"],h.nodeType==CKEDITOR.NODE_TEXT&&(g-=h.nodeValue.length,p=h),e=h}catch(q){return{container:d,offset:a(e)}}return{container:p,offset:0<n?-g:p.nodeValue.length+g}};return function(){var a=this.getNative(),c=a&&
418a.createRange(),d=this.getType();if(!a)return[];if(d==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),d=b(c,!0),a.setStart(new CKEDITOR.dom.node(d.container),d.offset),d=b(c),a.setEnd(new CKEDITOR.dom.node(d.container),d.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(d==CKEDITOR.SELECTION_ELEMENT){for(var d=[],f=0;f<c.length;f++){for(var e=c.item(f),h=e.parentNode,g=0,a=new CKEDITOR.dom.range(this.root);g<
419h.childNodes.length&&h.childNodes[g]!=e;g++);a.setStart(new CKEDITOR.dom.node(h),g);a.setEnd(new CKEDITOR.dom.node(h),g+1);d.push(a)}return d}return[]}}():function(){var a=[],b,c=this.getNative();if(!c)return a;for(var d=0;d<c.rangeCount;d++){var f=c.getRangeAt(d);b=new CKEDITOR.dom.range(this.root);b.setStart(new CKEDITOR.dom.node(f.startContainer),f.startOffset);b.setEnd(new CKEDITOR.dom.node(f.endContainer),f.endOffset);a.push(b)}return a};return function(b){var c=this._.cache,d=c.ranges;d||(c.ranges=
420d=new CKEDITOR.dom.rangeList(a.call(this)));return b?f(new CKEDITOR.dom.rangeList(d.slice())):d}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var c=this.getRanges()[0];if(c){if(c.collapsed)b=c.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(c.optimize();b=c.startContainer,c.startOffset==(b.getChildCount?
421b.getChildCount():b.getLength())&&!b.isBlockBoundary();)c.setStartAfter(b);b=c.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent();if((b=b.getChild(c.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(c=b.getFirst();c&&c.type==CKEDITOR.NODE_ELEMENT;)b=c,c=c.getFirst();else b=c.startContainer}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,c=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},
422function(){for(var a=b.getRanges()[0].clone(),c,d,f=2;f&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&A[c.getName()]&&(d=c));f--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return d&&d.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;
vendor: 7,039 bytes, lines 422-436
422var b=this.getNative(),b=q?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();
423this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),c=!b&&this.getRanges(),d=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&(d?this.fake(b):b?this.selectElement(b):this.selectRanges(c))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection;
424var b=a._.hiddenSelectionContainer;if(b){var c=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!c&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=u++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(a){var b=this.root.editor,b=b&&b._.hiddenSelectionContainer;this.reset();if(b)for(var b=this.root,c,d=0;d<a.length;++d)c=
425a[d],c.endContainer.equals(b)&&(c.endOffset=Math.min(c.endOffset,b.getChildCount()));if(a.length)if(this.isLocked){var f=CKEDITOR.document.getActive();this.unlock();this.selectRanges(a);this.lock();f&&!f.equals(this.root)&&f.focus()}else{var e;a:{var g,k;if(1==a.length&&!(k=a[0]).collapsed&&(e=k.getEnclosedNode())&&e.type==CKEDITOR.NODE_ELEMENT&&(k=k.clone(),k.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(g=k.getEnclosedNode())&&g.type==CKEDITOR.NODE_ELEMENT&&(e=g),"false"==e.getAttribute("contenteditable")))break a;
426e=void 0}if(e)this.fake(e);else{if(q){k=CKEDITOR.dom.walker.whitespaces(!0);g=/\ufeff|\u00a0/;b={table:1,tbody:1,tr:1};1<a.length&&(e=a[a.length-1],a[0].setEnd(e.endContainer,e.endOffset));e=a[0];a=e.collapsed;var n,r,t;if((c=e.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in A&&(!c.is("a")||!c.getText()))try{t=c.$.createControlRange();t.addElement(c.$);t.select();return}catch(w){}if(e.startContainer.type==CKEDITOR.NODE_ELEMENT&&e.startContainer.getName()in b||e.endContainer.type==
427CKEDITOR.NODE_ELEMENT&&e.endContainer.getName()in b)e.shrink(CKEDITOR.NODE_ELEMENT,!0),a=e.collapsed;t=e.createBookmark();b=t.startNode;a||(f=t.endNode);t=e.document.$.body.createTextRange();t.moveToElementText(b.$);t.moveStart("character",1);f?(g=e.document.$.body.createTextRange(),g.moveToElementText(f.$),t.setEndPoint("EndToEnd",g),t.moveEnd("character",-1)):(n=b.getNext(k),r=b.hasAscendant("pre"),n=!(n&&n.getText&&n.getText().match(g))&&(r||!b.hasPrevious()||b.getPrevious().is&&b.getPrevious().is("br")),
428r=e.document.createElement("span"),r.setHtml("\x26#65279;"),r.insertBefore(b),n&&e.document.createText("").insertBefore(b));e.setStartBefore(b);b.remove();a?(n?(t.moveStart("character",-1),t.select(),e.document.$.selection.clear()):t.select(),e.moveToPosition(r,CKEDITOR.POSITION_BEFORE_START),r.remove()):(e.setEndBefore(f),f.remove(),t.select())}else{f=this.getNative();if(!f)return;this.removeAllRanges();for(t=0;t<a.length;t++){if(t<a.length-1&&(n=a[t],r=a[t+1],g=n.clone(),g.setStart(n.endContainer,
429n.endOffset),g.setEnd(r.startContainer,r.startOffset),!g.collapsed&&(g.shrink(CKEDITOR.NODE_ELEMENT,!0),e=g.getCommonAncestor(),g=g.getEnclosedNode(),e.isReadOnly()||g&&g.isReadOnly()))){r.setStart(n.startContainer,n.startOffset);a.splice(t--,1);continue}e=a[t];r=this.document.$.createRange();e.collapsed&&CKEDITOR.env.webkit&&h(e)&&(g=m(this.root),e.insertNode(g),(n=g.getNext())&&!g.getPrevious()&&n.type==CKEDITOR.NODE_ELEMENT&&"br"==n.getName()?(l(this.root),e.moveToPosition(n,CKEDITOR.POSITION_BEFORE_START)):
430e.moveToPosition(g,CKEDITOR.POSITION_AFTER_END));r.setStart(e.startContainer.$,e.startOffset);try{r.setEnd(e.endContainer.$,e.endOffset)}catch(G){if(0<=G.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))e.collapse(1),r.setEnd(e.endContainer.$,e.endOffset);else throw G;}f.addRange(r)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();k(c,b);var d=this._.cache,f=new CKEDITOR.dom.range(this.root);
431f.setStartBefore(a);f.setEndAfter(a);d.ranges=new CKEDITOR.dom.rangeList(f);d.selectedElement=d.startElement=a;d.type=CKEDITOR.SELECTION_ELEMENT;d.selectedText=d.nativeSel=null;this.isFake=1;this.rev=u++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},
432createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,d=0;d<a.length;d++){var f=new CKEDITOR.dom.range(this.root);f.moveToBookmark(a[d]);b.push(f)}a.isFake&&(c=b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-
4331].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[q?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}}(),"use strict",CKEDITOR.STYLE_BLOCK=1,CKEDITOR.STYLE_INLINE=2,CKEDITOR.STYLE_OBJECT=3,function(){function a(a,b){for(var c,d;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!d){var f=a.getAttribute("contentEditable");
434"false"==f?c=a:"true"==f&&(d=1)}return c}function g(a,b,c,d){return(a.getPosition(b)|d)==d&&(!c.childRule||c.childRule(a))}function b(c){var d=c.document;if(c.collapsed)d=n(this,d),c.insertNode(d),c.moveToPosition(d,CKEDITOR.POSITION_BEFORE_END);else{var f=this.element,e=this._.definition,k,l=e.ignoreReadonly,m=l||e.includeReadonly;null==m&&(m=c.root.getCustomData("cke_includeReadonly"));var q=CKEDITOR.dtd[f];q||(k=!0,q=CKEDITOR.dtd.span);c.enlarge(CKEDITOR.ENLARGE_INLINE,1);c.trim();var r=c.createBookmark(),
435t=r.startNode,p=r.endNode,w=t,v;if(!l){var A=c.getCommonAncestor(),l=a(t,A),A=a(p,A);l&&(w=l.getNextSourceNode(!0));A&&(p=A)}for(w.getPosition(p)==CKEDITOR.POSITION_FOLLOWING&&(w=0);w;){l=!1;if(w.equals(p))w=null,l=!0;else{var u=w.type==CKEDITOR.NODE_ELEMENT?w.getName():null,A=u&&"false"==w.getAttribute("contentEditable"),z=u&&w.getAttribute("data-nostyle");if(u&&w.data("cke-bookmark")){w=w.getNextSourceNode(!0);continue}if(A&&m&&CKEDITOR.dtd.$block[u])for(var D=w,y=h(D),B=void 0,C=y.length,ea=0,
436D=C&&new CKEDITOR.dom.range(D.getDocument());ea<C;++ea){var B=y[ea],ha=CKEDITOR.filter.instances[B.data("cke-filter")];if(ha?ha.check(this):1)D.selectNodeContents(B),b.call(this,D)}
vendor: 7,902 bytes, lines 436-451
436y=u?!q[u]||z?0:A&&!m?0:g(w,p,e,J):1;if(y)if(B=w.getParent(),y=e,C=f,ea=k,!B||!(B.getDtd()||CKEDITOR.dtd.span)[C]&&!ea||y.parentRule&&!y.parentRule(B))l=!0;else{if(v||u&&CKEDITOR.dtd.$removeEmpty[u]&&(w.getPosition(p)|J)!=J||(v=c.clone(),v.setStartBefore(w)),u=w.type,u==CKEDITOR.NODE_TEXT||A||u==CKEDITOR.NODE_ELEMENT&&!w.getChildCount()){for(var u=
437w,H;(l=!u.getNext(I))&&(H=u.getParent(),q[H.getName()])&&g(H,t,e,L);)u=H;v.setEndAfter(u)}}else l=!0;w=w.getNextSourceNode(z||A)}if(l&&v&&!v.collapsed){for(var l=n(this,d),A=l.hasAttributes(),z=v.getCommonAncestor(),u={},y={},B={},C={},fa,W,E;l&&z;){if(z.getName()==f){for(fa in e.attributes)!C[fa]&&(E=z.getAttribute(W))&&(l.getAttribute(fa)==E?y[fa]=1:C[fa]=1);for(W in e.styles)!B[W]&&(E=z.getStyle(W))&&(l.getStyle(W)==E?u[W]=1:B[W]=1)}z=z.getParent()}for(fa in y)l.removeAttribute(fa);for(W in u)l.removeStyle(W);
438A&&!l.hasAttributes()&&(l=null);l?(v.extractContents().appendTo(l),v.insertNode(l),x.call(this,l),l.mergeSiblings(),CKEDITOR.env.ie||l.$.normalize()):(l=new CKEDITOR.dom.element("span"),v.extractContents().appendTo(l),v.insertNode(l),x.call(this,l),l.remove(!0));v=null}}c.moveToBookmark(r);c.shrink(CKEDITOR.SHRINK_TEXT);c.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function e(a){function b(){for(var a=new CKEDITOR.dom.elementPath(d.getParent()),c=new CKEDITOR.dom.elementPath(l.getParent()),f=null,e=null,h=
4390;h<a.elements.length;h++){var g=a.elements[h];if(g==a.block||g==a.blockLimit)break;m.checkElementRemovable(g,!0)&&(f=g)}for(h=0;h<c.elements.length;h++){g=c.elements[h];if(g==c.block||g==c.blockLimit)break;m.checkElementRemovable(g,!0)&&(e=g)}e&&l.breakParent(e);f&&d.breakParent(f)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),d=c.startNode;if(a.collapsed){for(var f=new CKEDITOR.dom.elementPath(d.getParent(),a.root),e,h=0,g;h<f.elements.length&&(g=f.elements[h])&&g!=f.block&&g!=f.blockLimit;h++)if(this.checkElementRemovable(g)){var k;
440a.collapsed&&(a.checkBoundaryOfElement(g,CKEDITOR.END)||(k=a.checkBoundaryOfElement(g,CKEDITOR.START)))?(e=g,e.match=k?"start":"end"):(g.mergeSiblings(),g.is(this.element)?v.call(this,g):t(g,p(this)[g.getName()]))}if(e){g=d;for(h=0;;h++){k=f.elements[h];if(k.equals(e))break;else if(k.match)continue;else k=k.clone();k.append(g);g=k}g["start"==e.match?"insertBefore":"insertAfter"](e)}}else{var l=c.endNode,m=this;b();for(f=d;!f.equals(l);)e=f.getNextSourceNode(),f.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(f)&&
441(f.getName()==this.element?v.call(this,f):t(f,p(this)[f.getName()]),e.type==CKEDITOR.NODE_ELEMENT&&e.contains(d)&&(b(),e=d.getNext())),f=e}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function h(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function m(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1))&&!a.isReadOnly()&&w(a,this)}
442function l(a){var b=a.getCommonAncestor(!0,!0);if(a=(new CKEDITOR.dom.elementPath(b,a.root)).contains(this.element,1)){var b=this._.definition,c=b.attributes;if(c)for(var d in c)a.removeAttribute(d,c[d]);if(b.styles)for(var f in b.styles)b.styles.hasOwnProperty(f)&&a.removeStyle(f)}}function c(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var f,e=a.document,h;f=c.getNextParagraph();)!f.isReadOnly()&&
443(c.activeFilter?c.activeFilter.check(this):1)&&(h=n(this,e,f),d(f,h));a.moveToBookmark(b)}function k(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var f,e;f=c.getNextParagraph();)this.checkElementRemovable(f)&&(f.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&f.copyAttributes(e),d(f,e)):v.call(this,f));a.moveToBookmark(b)}function d(a,b){var c=
444!b;c&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var d=b&&b.is("pre"),e=a.is("pre"),h=!d&&e;if(d&&!e){e=b;(h=a.getBogus())&&h.remove();h=a.getHtml();h=q(h,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");h=h.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+|&nbsp;)/g," ");h=h.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=a.getDocument().createElement("div");g.append(e);e.$.outerHTML="\x3cpre\x3e"+h+"\x3c/pre\x3e";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(h);
445b=e}else h?b=u(c?[a.getHtml()]:f(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(H))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=q(k.getHtml(),/\n$/,"")+"\n\n"+q(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e":c.setHtml(d),k.remove())}else c&&r(b)}function f(a){var b=[];q(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,
446function(a,c){b.push(c)});return b}function q(a,b,c){var d="",f="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(f=c);return""});return d+a.replace(b,c)+f}function u(a,b){var c;1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var d=0;d<a.length;d++){var f=a[d],f=f.replace(/(\r\n|\r)/g,"\n"),f=q(f,/^[ \t]*\n/,""),f=q(f,/\n$/,""),f=q(f,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":
447b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),f=f.replace(/\n/g,"\x3cbr\x3e"),f=f.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(c){var e=b.clone();e.setHtml(f);c.append(e)}else b.setHtml(f)}return c||b}function v(a,b){var c=this._.definition,d=c.attributes,c=c.styles,f=p(this)[a.getName()],e=CKEDITOR.tools.isEmpty(d)&&CKEDITOR.tools.isEmpty(c),h;for(h in d)if("class"!=h&&!this._.definition.fullMatch||
448a.getAttribute(h)==z(h,d[h]))b&&"data-"==h.slice(0,5)||(e=a.hasAttribute(h),a.removeAttribute(h));for(var g in c)this._.definition.fullMatch&&a.getStyle(g)!=z(g,c[g],!0)||(e=e||!!a.getStyle(g),a.removeStyle(g));t(a,f,B[a.getName()]);e&&(this._.definition.alwaysRemoveElement?r(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?r(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function x(a){for(var b=p(this),c=a.getElementsByTag(this.element),
449d,f=c.count();0<=--f;)d=c.getItem(f),d.isReadOnly()||v.call(this,d,!0);for(var e in b)if(e!=this.element)for(c=a.getElementsByTag(e),f=c.count()-1;0<=f;f--)d=c.getItem(f),d.isReadOnly()||t(d,b[e])}function t(a,b,c){if(b=b&&b.attributes)for(var d=0;d<b.length;d++){var f=b[d][0],e;if(e=a.getAttribute(f)){var h=b[d][1];(null===h||h.test&&h.test(e)||"string"==typeof h&&e==h)&&a.removeAttribute(f)}}c||r(a)}function r(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(H),
450d=a.getNext(H);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),d=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),d&&!c.equals(d)&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings())}function n(a,b,c){var d;d=a.element;"*"==d&&(d="span");d=new CKEDITOR.dom.element(d,b);c&&c.copyAttributes(d);d=w(d,a);b.getCustomData("doc_processing_style")&&
451d.hasAttribute("id")?d.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return d}function w(a,b){var c=b._.definition,d=c.attributes,c=CKEDITOR.style.getStyleText(c);if(d)for(var f in d)a.setAttribute(f,d[f]);c&&a.setAttribute("style",c);return a}function A(a,b){for(var c in a)a[c]=a[c].replace(F,function(a,c){return b[c]})}
vendor: 4,459 bytes, lines 451-460
451function p(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)||(c=[c]);for(var d=0;d<c.length;d++){var f=
452c[d],e,h;"string"==typeof f?e=f.toLowerCase():(e=f.element?f.element.toLowerCase():a.element,h=f.attributes);f=b[e]||(b[e]={});if(h){var f=f.attributes=f.attributes||[],g;for(g in h)f.push([g.toLowerCase(),h[g]])}}}return b}function z(a,b,c){var d=new CKEDITOR.dom.element("span");d[c?"setStyle":"setAttribute"](a,b);return d[c?"getStyle":"getAttribute"](a)}function D(a,b){function c(a,b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));
453"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var d in a)if(!(d in b)||c(b[d],d)!=c(a[d],d)&&"inherit"!=a[d]&&"inherit"!=b[d])return!1;return!0}function y(a,b,c){var d=a.document,f=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var e,h=f.createIterator();e=h.getNextRange();)b.call(this,e,c);a.selectRanges(f);d.removeCustomData("doc_processing_style")}var B={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,
454dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},C={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},E=/\s*(?:;\s*|$)/,F=/#\((.+?)\)/g,I=CKEDITOR.dom.walker.bookmark(0,1),H=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({},
455a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),A(a.attributes,b),A(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(B[c]?CKEDITOR.STYLE_BLOCK:C[c]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof CKEDITOR.dom.document)return y.call(this,a.getSelection());
456if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);y.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return y.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);y.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==
457CKEDITOR.STYLE_BLOCK?c:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.STYLE_BLOCK?k:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.removeFromRange(a)},applyToObject:function(a){w(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var c=
458a.elements,d=0,f;d<c.length;d++)if(f=c[d],this.type!=CKEDITOR.STYLE_INLINE||f!=a.block&&f!=a.blockLimit){if(this.type==CKEDITOR.STYLE_OBJECT){var e=f.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(f,!0,b))return!0}}return!1},checkApplicable:function(a,b,c){b&&b instanceof CKEDITOR.filter&&(c=b);if(c&&!c.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0},
459checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var d=a.getName();if("string"==typeof this.element?d==this.element:d in this.element){if(!b&&!a.hasAttributes())return!0;if(d=c._AC)c=d;else{var d={},f=0,e=c.attributes;if(e)for(var h in e)f++,d[h]=e[h];if(h=CKEDITOR.style.getStyleText(c))d.style||f++,d.style=h;d._length=f;c=c._AC=d}if(c._length){for(var g in c)if("_length"!=g)if(d=a.getAttribute(g)||"","style"==g?D(c[g],d):c[g]==d){if(!b)return!0}else if(b)return!1;
460if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;
vendor: 9,582 bytes, lines 460-478
460if(b=p(this)[a.getName()]){var d;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(d=b[c][0],d=a.getAttribute(d)){var f=b[c][1];if(null===f)return!0;if("string"==typeof f){if(d==f)return!0}else if(f.test(d))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],d=b.element;"bdo"==d&&(d="span");var c=["\x3c",d],f=b.attributes;if(f)for(var e in f)c.push(" ",
461e,'\x3d"',f[e],'"');(f=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',f,'"');c.push("\x3e",a||b.name,"\x3c/",d,"\x3e");return c.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,c=a.attributes&&a.attributes.style||"",d="";c.length&&(c=c.replace(E,";"));for(var f in b){var e=b[f],h=(f+":"+e).replace(E,";");"inherit"==e?d+=h:c+=h}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+d};CKEDITOR.style.customHandlers=
462{};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var J=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,L=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED}(),CKEDITOR.styleCommand=function(a,
463g){this.requiredContent=this.allowedContent=this.style=a;CKEDITOR.tools.extend(this,g,!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,g,b){CKEDITOR.stylesSet.addExternal(a,g,"");CKEDITOR.stylesSet.load(a,
464b)},CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(a,g){var b=this._.styleStateChangeCallbacks;b||(b=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(a){for(var h=0;h<b.length;h++){var g=b[h],l=g.style.checkActive(a.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,l)}}));b.push({style:a,fn:g})},applyStyle:function(a){a.apply(this)},removeStyle:function(a){a.remove(this)},getStylesSet:function(a){if(this._.stylesDefinitions)a(this._.stylesDefinitions);
465else{var g=this,b=g.config.stylesCombo_stylesSet||g.config.stylesSet;if(!1===b)a(null);else if(b instanceof Array)g._.stylesDefinitions=b,a(b);else{b||(b="default");var b=b.split(":"),e=b[0];CKEDITOR.stylesSet.addExternal(e,b[1]?b.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(e,function(b){g._.stylesDefinitions=b[e];a(g._.stylesDefinitions)})}}}}),CKEDITOR.dom.comment=function(a,g){"string"==typeof a&&(a=(g?g.$:document).createComment(a));CKEDITOR.dom.domObject.call(this,
466a)},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={},g={},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||(g[b]=1);CKEDITOR.dom.elementPath=function(b,h){var m=null,l=null,c=[],k=b,d;h=h||b.getDocument().getBody();
467do if(k.type==CKEDITOR.NODE_ELEMENT){c.push(k);if(!this.lastElement&&(this.lastElement=k,k.is(CKEDITOR.dtd.$object)||"false"==k.getAttribute("contenteditable")))continue;if(k.equals(h))break;if(!l&&(d=k.getName(),"true"==k.getAttribute("contenteditable")?l=k:!m&&g[d]&&(m=k),a[d])){if(d=!m&&"div"==d){a:{d=k.getChildren();for(var f=0,q=d.count();f<q;f++){var u=d.getItem(f);if(u.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[u.getName()]){d=!0;break a}}d=!1}d=!d}d?m=k:l=k}}while(k=k.getParent());l||
468(l=h);this.block=m;this.blockLimit=l;this.root=h;this.elements=c}}(),CKEDITOR.dom.elementPath.prototype={compare:function(a){var g=this.elements;a=a&&a.elements;if(!a||g.length!=a.length)return!1;for(var b=0;b<g.length;b++)if(!g[b].equals(a[b]))return!1;return!0},contains:function(a,g,b){var e;"string"==typeof a&&(e=function(b){return b.getName()==a});a instanceof CKEDITOR.dom.element?e=function(b){return b.equals(a)}:CKEDITOR.tools.isArray(a)?e=function(b){return-1<CKEDITOR.tools.indexOf(a,b.getName())}:
469"function"==typeof a?e=a:"object"==typeof a&&(e=function(b){return b.getName()in a});var h=this.elements,m=h.length;g&&m--;b&&(h=Array.prototype.slice.call(h,0),h.reverse());for(g=0;g<m;g++)if(e(h[g]))return h[g];return null},isContextFor:function(a){var g;return a in CKEDITOR.dtd.$block?(g=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!g.getDtd()[a]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}},CKEDITOR.dom.text=
470function(a,g){"string"==typeof a&&(a=(g?g.$: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 g=this.$.parentNode,b=g.childNodes.length,e=this.getLength(),h=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(a),h);g.childNodes.length==
471b&&(a>=e?(m=h.createText(""),m.insertAfter(this)):(a=h.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,g){return"number"!=typeof g?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,g)}}),function(){function a(a,e,h){var g=a.serializable,l=e[h?"endContainer":"startContainer"],c=h?"endOffset":"startOffset",k=g?e.document.getById(a.startNode):a.startNode;a=g?e.document.getById(a.endNode):a.endNode;l.equals(k.getPrevious())?(e.startOffset=e.startOffset-l.getLength()-
472a.getPrevious().getLength(),l=a.getNext()):l.equals(a.getPrevious())&&(e.startOffset-=l.getLength(),l=a.getNext());l.equals(k.getParent())&&e[c]++;l.equals(a.getParent())&&e[c]++;e[h?"endContainer":"startContainer"]=l;return e}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,g)};var g={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),h=[],g;return{getNextRange:function(l){g=
473void 0===g?0:g+1;var c=a[g];if(c&&1<a.length){if(!g)for(var k=a.length-1;0<=k;k--)h.unshift(a[k].createBookmark(!0));if(l)for(var d=0;a[g+d+1];){var f=c.document;l=0;k=f.getById(h[d].endNode);for(f=f.getById(h[d+1].startNode);;){k=k.getNextSourceNode(!1);if(f.equals(k))l=1;else if(e(k)||k.type==CKEDITOR.NODE_ELEMENT&&k.isBlockBoundary())continue;break}if(!l)break;d++}for(c.moveToBookmark(h.shift());d--;)k=a[++g],k.moveToBookmark(h.shift()),c.setEnd(k.endContainer,k.endOffset)}return c}}},createBookmarks:function(b){for(var e=
474[],h,g=0;g<this.length;g++){e.push(h=this[g].createBookmark(b,!0));for(var l=g+1;l<this.length;l++)this[l]=a(h,this[l]),this[l]=a(h,this[l],!0)}return e},createBookmarks2:function(a){for(var e=[],h=0;h<this.length;h++)e.push(this[h].createBookmark2(a));return e},moveToBookmarks:function(a){for(var e=0;e<this.length;e++)this[e].moveToBookmark(a[e])}}}(),function(){function a(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]||"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function g(b){var c=
475CKEDITOR.skin["ua_"+b],e=CKEDITOR.env;if(c)for(var c=c.split(",").sort(function(a,b){return a>b?-1:1}),h=0,g;h<c.length;h++)if(g=c[h],e.ie&&(g.replace(/^ie/,"")==e.version||e.quirks&&"iequirks"==g)&&(g="ie"),e[g]){b+="_"+c[h];break}return CKEDITOR.getUrl(a()+b+".css")}function b(a,b){m[a]||(CKEDITOR.document.appendStyleSheet(g(a)),m[a]=1);b&&b()}function e(a){var b=a.getById(l);b||(b=a.getHead().append("style"),b.setAttribute("id",l),b.setAttribute("type","text/css"));return b}function h(a,b,c){var e,
476h,g;if(CKEDITOR.env.webkit)for(b=b.split("}").slice(0,-1),h=0;h<b.length;h++)b[h]=b[h].split("{");for(var k=0;k<a.length;k++)if(CKEDITOR.env.webkit)for(h=0;h<b.length;h++){g=b[h][1];for(e=0;e<c.length;e++)g=g.replace(c[e][0],c[e][1]);a[k].$.sheet.addRule(b[h][0],g)}else{g=b;for(e=0;e<c.length;e++)g=g.replace(c[e][0],c[e][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?a[k].$.styleSheet.cssText+=g:a[k].$.innerHTML+=g}}var m={};CKEDITOR.skin={path:a,loadPart:function(c,f){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?
477CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,f)}):b(c,f)},getPath:function(a){return CKEDITOR.getUrl(g(a))},icons:{},addIcon:function(a,b,c,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,b,c,e,h){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]),g||(g=this.icons[a]));a=c||g&&g.path||"";e=e||g&&g.offset;h=h||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+
478"');background-position:0 "+e+"px;background-size:"+h+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var d=CKEDITOR.skin.chameleon,e="",g="";"function"==typeof d&&(e=d(this,"editor"),g=d(this,"panel"));a=[[k,a]];h([b],e,a);h(c,g,a)}).call(this,a)}});var l="cke_ui_color",c=[],k=/\$color/g;
vendor: 1,030 bytes, lines 478-480
478CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||
479!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=e(a);c.push(a);var d=b.getUiColor();d&&h([a],CKEDITOR.skin.chameleon(b,"panel"),[[k,d]])}};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',
480CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var g=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!g||g!=b)}catch(e){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");
vendor: 520 bytes, lines 480-481
480if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,g=0;g<a.length;g++)CKEDITOR.editor.prototype.constructor.apply(a[g][0],
481a[g][1]),CKEDITOR.add(a[g][0])}(),CKEDITOR.skin.name="moono-lisa",CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko",CKEDITOR.skin.ua_dialog="ie,iequirks,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,e){for(var h=a.match(/[^#]./g),g=0;3>g;g++){var l=g,c;c=parseInt(h[g],16);c=("0"+(0>e?0|c*(1+e):0|c+(255-c)*e).toString(16)).slice(-2);h[l]=c}return"#"+h.join("")}}(),g
vendor: 2,839 bytes, lines 481-483
481={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "),
482panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")};
483return function(
vendor: 4,030 bytes, lines 483-490
483b,e){var h=a(b.uiColor,.4),h={id:"."+b.id,defaultBorder:a(h,-.2),toolbarElementsBorder:a(h,-.25),defaultBackground:h,lightBackground:a(h,.8),darkBackground:a(h,-.15),ckeButtonOn:a(h,.4),ckeResizer:a(h,-.4),ckeColorauto:a(h,.8),dialogBody:a(h,.7),dialogTab:a(h,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:a(h,-.6),menubuttonHover:a(h,.1),menubuttonIcon:a(h,.5),menubuttonIconHover:a(h,.3)};return g[e].output(h).replace(/\[/g,"{").replace(/\]/g,"}")}}(),
484"use strict",function(){function a(a,b,c){return q(b)&&q(c)&&c.equals(b.getNext(function(a){return!(Z(a)||aa(a)||u(a))}))}function g(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))}function b(a){var b=a.element;if(b&&q(b)&&(b=b.getAscendant(a.triggers,!0))&&a.editable.contains(b)){var c=l(b);if("true"==c.getAttribute("contenteditable"))return b;if(c.is(a.triggers))return c}return null}function e(a,b,c){p(a,b);p(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function h(a,
485b,c){return b=b[c?"getPrevious":"getNext"](function(b){return b&&b.type==CKEDITOR.NODE_TEXT&&!Z(b)||q(b)&&!u(b)&&!f(a,b)})}function m(a,b,c){return a>b&&a<c}function l(a,b){if(a.data("cke-editable"))return null;for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function c(a){var b=a.doc,c=E('\x3cspan contenteditable\x3d"false" style\x3d"'+R+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),d=CKEDITOR.getUrl(this.path+
486"images/"+(F.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");B(c,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this},lineChildren:[B(E('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:R+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+d+") center no-repeat "+a.boxColor+";cursor:pointer;"+(F.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":
487"")+(F.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}),B(E(Y,b),{base:Q+"left:0px;border-left-color:"+a.boxColor+";",looks:["border-width:8px 0 8px 8px;top:-8px","border-width:8px 0 0 8px;top:-8px","border-width:0 0 8px 8px;top:0px"]}),B(E(Y,b),{base:Q+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px",
488"border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){p(a,this);var b=a.holdDistance,c=this.size;return c&&m(a.mouse.y,c.top-b,c.bottom+b)&&m(a.mouse.x,c.left-b,c.right+b)?!0:!1},place:function(){var b=a.view,c=a.editable,d=a.trigger,f=d.upper,e=d.lower,h=f||e,g=h.getParent(),k={};this.trigger=d;f&&p(a,f,!0);e&&p(a,e,!0);p(a,g,!0);a.inInlineMode&&z(a,!0);g.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=
489h.size.left-h.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=h.size.outerWidth+h.size.margin.left+h.size.margin.right+b.scroll.x,k.right="");f&&e?k.top=f.size.margin.bottom===e.size.margin.top?0|f.size.bottom+f.size.margin.bottom/2:f.size.margin.bottom<e.size.margin.top?f.size.bottom+f.size.margin.bottom:f.size.bottom+f.size.margin.bottom-e.size.margin.top:f?e||(k.top=f.size.bottom+f.size.margin.bottom):k.top=e.size.top-e.size.margin.top;d.is(T)||m(k.top,
490b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(T)):d.is(M)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+b.editable.padding.bottom:b.pane.bottom-1,this.look(M)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(V));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)}
vendor: 6,751 bytes, lines 490-504
490,look:function(a){if(this.oldLook!=
491a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new C("span",a.doc)});for(b=c.lineChildren.length;b--;)c.lineChildren[b].appendTo(c);c.look(V);c.appendTo(c.wrap);c.unselectable();c.lineChildren[0].on("mouseup",function(b){c.detach();k(a,function(b){var c=a.line.trigger;b[c.is(L)?"insertBefore":"insertAfter"](c.is(L)?c.lower:c.upper)},!0);a.editor.focus();F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();
492b.data.preventDefault(!0)});c.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=c}function k(a,b,c){var d=new CKEDITOR.dom.range(a.doc),f=a.editor,e;F.ie&&a.enterMode==CKEDITOR.ENTER_BR?e=a.doc.createText(da):(e=(e=l(a.element,!0))&&e.data("cke-enter-mode")||a.enterMode,e=new C(J[e],a.doc),e.is("br")||a.doc.createText(da).appendTo(e));c&&f.fire("saveSnapshot");b(e);d.moveToPosition(e,CKEDITOR.POSITION_AFTER_START);f.getSelection().selectRanges([d]);a.hotNode=e;c&&f.fire("saveSnapshot")}
493function d(a,c){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function d(b){var f=F.ie&&9>F.version?" ":da,e=a.hotNode&&a.hotNode.getText()==f&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;k(a,function(d){e&&a.hotNode&&a.hotNode.remove();d[c?"insertAfter":"insertBefore"](b);d.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});F.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(f){f=f.getSelection().getStartElement();
494var e;f=f.getAscendant(P,1);if(!t(a,f)&&f&&!f.equals(a.editable)&&!f.contains(a.editable)){(e=l(f))&&"false"==e.getAttribute("contenteditable")&&(f=e);a.element=f;e=h(a,f,!c);var g;q(e)&&e.is(a.triggers)&&e.is(N)&&(!h(a,e,!c)||(g=h(a,e,!c))&&q(g)&&g.is(a.triggers))?d(e):(g=b(a,f),q(g)&&(h(a,g,!c)?(f=h(a,g,!c))&&q(f)&&f.is(a.triggers)&&d(g):d(g)))}}}()}}function f(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function q(a){return a&&
495a.type==CKEDITOR.NODE_ELEMENT&&a.$}function u(a){if(!q(a))return!1;var b;(b=v(a))||(q(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function x(a,b){return q(b)?b.is(a.triggers):null}function t(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var f=a.tabuList.length;f--;)if(c[d].hasAttribute(a.tabuList[f]))return!0;return!1}function r(a,b,c){b=
496b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ga)});if(!b)return!1;p(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function n(a){var b=a.editable,c=a.mouse,d=a.view,e=a.triggerOffset;z(a);var h=c.y>(a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[h?"getLast":"getFirst"](function(a){return!(Z(a)||aa(a))});if(!b)return null;f(a,b)&&(b=a.line.wrap[h?"getPrevious":"getNext"](function(a){return!(Z(a)||aa(a))}));if(!q(b)||
497u(b)||!x(a,b))return null;p(a,b);return!h&&0<=b.size.top&&m(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?T:V,new g([null,b,L,O,a])):h&&b.size.bottom<=d.pane.height&&m(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode||m(b.size.bottom,d.pane.height-e,d.pane.height)?M:V,new g([b,null,G,O,a])):null}function w(a){var c=a.mouse,d=a.view,f=a.triggerOffset,e=b(a);if(!e)return null;p(a,e);var f=Math.min(f,0|e.size.outerHeight/2),k=[],l,n;if(m(c.y,e.size.top-1,e.size.top+f))n=!1;else if(m(c.y,
498e.size.bottom-f,e.size.bottom+1))n=!0;else return null;if(u(e)||r(a,e,n)||e.getParent().is(ca))return null;var t=h(a,e,!n);if(t){if(t&&t.type==CKEDITOR.NODE_TEXT)return null;if(q(t)){if(u(t)||!x(a,t)||t.getParent().is(ca))return null;k=[t,e][n?"reverse":"concat"]().concat([S,O])}}else e.equals(a.editable[n?"getLast":"getFirst"](a.isRelevant))?(z(a),n&&m(c.y,e.size.bottom-f,d.pane.height)&&m(e.size.bottom,d.pane.height-f,d.pane.height)?l=M:m(c.y,0,e.size.top+f)&&(l=T)):l=V,k=[null,e][n?"reverse":"concat"]().concat([n?
499G:L,O,l,e.equals(a.editable[n?"getLast":"getFirst"](a.isRelevant))?n?M:T:V]);return 0 in k?new g(k):null}function A(a,b,c,d){for(var f=b.getDocumentPosition(),e={},h={},g={},k={},l=ba.length;l--;)e[ba[l]]=parseInt(b.getComputedStyle.call(b,"border-"+ba[l]+"-width"),10)||0,g[ba[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+ba[l]),10)||0,h[ba[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+ba[l]),10)||0;c&&!d||D(a,d);k.top=f.y-(c?0:a.view.scroll.y);k.left=f.x-(c?0:a.view.scroll.x);k.outerWidth=
500b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(g.top+g.bottom+e.top+e.bottom);k.width=k.outerWidth-(g.left+g.right+e.left+e.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop,left:b.$.scrollLeft});return B({border:e,padding:g,margin:h,ignoreScroll:c},k,!0)}function p(a,b,c){if(!q(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-K)return null;return B(b.size,A(a,b,c),{date:+new Date},
501!0)}function z(a,b){a.view.editable=A(a,a.editable,b,!0)}function D(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-K)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();B(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth-d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function y(a,b,c,d){for(var f=d,e=d,h=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+h<m&&0<n.y-
502h;){k||(k=b(f,d));l||(l=b(e,d));!k&&0<n.y-h&&(f=c(a,{x:n.x,y:n.y-h}));!l&&n.y+h<m&&(e=c(a,{x:n.x,y:n.y+h}));if(k&&l)break;h+=2}return new g([f,e,null,null])}CKEDITOR.plugins.add("magicline",{init:function(a){var e=a.config,l=e.magicline_triggerOffset||30,m={editor:a,enterMode:e.enterMode,triggerOffset:l,holdDistance:0|l*(e.magicline_holdDistance||.5),boxColor:e.magicline_color||"#ff0000",rtl:"rtl"==e.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(e.magicline_tabuList||[]),triggers:e.magicline_everywhere?
503P:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},r,p,x;m.isRelevant=function(a){return q(a)&&!f(m,a)&&!u(a)};a.on("contentDom",function(){var l=a.editable(),q=a.document,u=a.window;B(m,{editable:l,inInlineMode:l.isInline(),doc:q,win:u,hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();l.is(H.$inline)||(m.inInlineMode&&!v(l)&&l.setStyles({position:"relative",top:null,left:null}),c.call(this,m),D(m),l.attachListener(a,"beforeUndoImage",function(){m.line.detach()}),
504l.attachListener(a,"beforeGetData",function(){m.line.wrap.getParent()&&
vendor: 9,173 bytes, lines 504-521
504(m.line.detach(),a.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),l.attachListener(m.inInlineMode?q:q.getWindow().getFrame(),"mouseout",function(b){if("wysiwyg"==a.mode)if(m.inInlineMode){var c=b.data.$.clientX;b=b.data.$.clientY;D(m);z(m,!0);var d=m.view.editable,f=m.view.scroll;c>d.left-f.x&&c<d.right-f.x&&b>d.top-f.y&&b<d.bottom-f.y||(clearTimeout(x),x=null,m.line.detach())}else clearTimeout(x),x=null,
505m.line.detach()}),l.attachListener(l,"keyup",function(){m.hiddenMode=0}),l.attachListener(l,"keydown",function(b){if("wysiwyg"==a.mode)switch(b.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),l.attachListener(m.inInlineMode?l:q,"mousemove",function(b){p=!0;if("wysiwyg"==a.mode&&!a.readOnly&&!x){var c={x:b.data.$.clientX,y:b.data.$.clientY};x=setTimeout(function(){m.mouse=c;x=m.trigger=null;D(m);p&&!m.hiddenMode&&a.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=
506U(m,!0))&&((m.trigger=n(m)||w(m)||X(m))&&!t(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),p=!1)},30)}}),l.attachListener(u,"scroll",function(){"wysiwyg"==a.mode&&(m.line.detach(),F.webkit&&(m.hiddenMode=1,clearTimeout(r),r=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),l.attachListener(I?q:u,"mousedown",function(){"wysiwyg"==a.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),l.attachListener(I?q:u,"mouseup",function(){m.hiddenMode=
5070;m.mouseDown=0}),a.addCommand("accessPreviousSpace",d(m)),a.addCommand("accessNextSpace",d(m,!0)),a.setKeystroke([[e.magicline_keystrokePrevious,"accessPreviousSpace"],[e.magicline_keystrokeNext,"accessNextSpace"]]),a.on("loadSnapshot",function(){var b,c,d,f;for(f in{p:1,br:1,div:1})for(b=a.document.getElementsByTag(f),d=b.count();d--;)if((c=b.getItem(d)).data("cke-magicline-hot")){m.hotNode=c;m.lastCmdDirection="true"===c.data("cke-magicline-dir")?!0:!1;return}}),this.backdoor={accessFocusSpace:k,
508boxTrigger:g,isLine:f,getAscendantTrigger:b,getNonEmptyNeighbour:h,getSize:A,that:m,triggerEdge:w,triggerEditable:n,triggerExpand:X})},this)}});var B=CKEDITOR.tools.extend,C=CKEDITOR.dom.element,E=C.createFromHtml,F=CKEDITOR.env,I=CKEDITOR.env.ie&&9>CKEDITOR.env.version,H=CKEDITOR.dtd,J={},L=128,G=64,S=32,O=16,T=4,M=2,V=1,da=" ",ca=H.$listItem,ga=H.$tableContent,N=B({},H.$nonEditable,H.$empty),P=H.$block,K=100,R="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",
509Q=R+"border-color:transparent;display:block;border-style:solid;",Y="\x3cspan\x3e"+da+"\x3c/span\x3e";J[CKEDITOR.ENTER_BR]="br";J[CKEDITOR.ENTER_P]="p";J[CKEDITOR.ENTER_DIV]="div";g.prototype={set:function(a,b,c){this.properties=a+b+(c||V);return this},is:function(a){return(this.properties&a)==a}};var U=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,h=b.line.wrap;d=d||b.mouse;
510var g=a(e,d);c&&f(b,g)&&(h.hide(),g=a(e,d),h.show());return!g||g.type!=CKEDITOR.NODE_ELEMENT||!g.$||F.ie&&9>F.version&&!b.boundary.equals(g)&&!b.boundary.contains(g)?null:g}}(),Z=CKEDITOR.dom.walker.whitespaces(),aa=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),X=function(){function b(d){var f=d.element,h,g,k;if(!q(f)||f.contains(d.editable)||f.isReadOnly())return null;k=y(d,function(a,b){return!b.equals(a)},function(a,b){return U(a,!0,b)},f);h=k.upper;g=k.lower;if(a(d,h,g))return k.set(S,8);
511if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getFirst(function(a){return c(d,a)});if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getLast(function(a){return c(d,a)});if(!h||!g)return null;p(d,h);p(d,g);if(!m(d.mouse.y,h.size.top,g.size.bottom))return null;for(var f=Number.MAX_VALUE,l,n,r,t;g&&!g.equals(h)&&(n=h.getNext(d.isRelevant));)l=Math.abs(e(d,h,n)-d.mouse.y),l<f&&(f=l,r=h,t=n),h=n,p(d,h);if(!r||!t||!m(d.mouse.y,r.size.top,t.size.bottom))return null;
512k.upper=r;k.lower=t;return k.set(S,8)}function c(a,b){return!(b&&b.type==CKEDITOR.NODE_TEXT||aa(b)||u(b)||f(a,b)||b.type==CKEDITOR.NODE_ELEMENT&&b.$&&b.is("br"))}return function(c){var d=b(c),f;if(f=d){f=d.upper;var e=d.lower;f=!f||!e||u(e)||u(f)||e.equals(f)||f.equals(e)||e.contains(f)||f.contains(e)?!1:x(c,f)&&x(c,e)&&a(c,f,e)?!0:!1}return f?d:null}}(),ba=["top","left","right","bottom"]}(),CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51,CKEDITOR.config.magicline_keystrokeNext=
513CKEDITOR.CTRL+CKEDITOR.SHIFT+52,function(){var a={exec:function(a){var b=a.getCommand("blockquote").state,e=a.getSelection(),h=e&&e.getRanges()[0];if(h){var m=e.createBookmarks();if(CKEDITOR.env.ie){var l=m[0].startNode,c=m[0].endNode,k;if(l&&"blockquote"==l.getParent().getName())for(k=l;k=k.getNext();)if(k.type==CKEDITOR.NODE_ELEMENT&&k.isBlockBoundary()){l.move(k,!0);break}if(c&&"blockquote"==c.getParent().getName())for(k=c;k=k.getPrevious();)if(k.type==CKEDITOR.NODE_ELEMENT&&k.isBlockBoundary()){c.move(k);
514break}}var d=h.createIterator();d.enlargeBr=a.config.enterMode!=CKEDITOR.ENTER_BR;if(b==CKEDITOR.TRISTATE_OFF){for(l=[];b=d.getNextParagraph();)l.push(b);1>l.length&&(b=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),c=m.shift(),h.insertNode(b),b.append(new CKEDITOR.dom.text("",a.document)),h.moveToBookmark(c),h.selectNodeContents(b),h.collapse(!0),c=h.createBookmark(),l.push(b),m.unshift(c));k=l[0].getParent();h=[];for(c=0;c<l.length;c++)b=l[c],k=k.getCommonAncestor(b.getParent());
515for(b={table:1,tbody:1,tr:1,ol:1,ul:1};b[k.getName()];)k=k.getParent();for(c=null;0<l.length;){for(b=l.shift();!b.getParent().equals(k);)b=b.getParent();b.equals(c)||h.push(b);c=b}for(;0<h.length;)if(b=h.shift(),"blockquote"==b.getName()){for(c=new CKEDITOR.dom.documentFragment(a.document);b.getFirst();)c.append(b.getFirst().remove()),l.push(c.getLast());c.replace(b)}else l.push(b);h=a.document.createElement("blockquote");for(h.insertBefore(l[0]);0<l.length;)b=l.shift(),h.append(b)}else if(b==CKEDITOR.TRISTATE_ON){c=
516[];for(k={};b=d.getNextParagraph();){for(l=h=null;b.getParent();){if("blockquote"==b.getParent().getName()){h=b.getParent();l=b;break}b=b.getParent()}h&&l&&!l.getCustomData("blockquote_moveout")&&(c.push(l),CKEDITOR.dom.element.setMarker(k,l,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(k);b=[];l=[];for(k={};0<c.length;)d=c.shift(),h=d.getParent(),d.getPrevious()?d.getNext()?(d.breakParent(d.getParent()),l.push(d.getNext())):d.remove().insertAfter(h):d.remove().insertBefore(h),h.getCustomData("blockquote_processed")||
517(l.push(h),CKEDITOR.dom.element.setMarker(k,h,"blockquote_processed",!0)),b.push(d);CKEDITOR.dom.element.clearAllMarkers(k);for(c=l.length-1;0<=c;c--){h=l[c];a:{k=h;for(var d=0,f=k.getChildCount(),q=void 0;d<f&&(q=k.getChild(d));d++)if(q.type==CKEDITOR.NODE_ELEMENT&&q.isBlockBoundary()){k=!1;break a}k=!0}k&&h.remove()}if(a.config.enterMode==CKEDITOR.ENTER_BR)for(h=!0;b.length;)if(d=b.shift(),"div"==d.getName()){c=new CKEDITOR.dom.documentFragment(a.document);!h||!d.getPrevious()||d.getPrevious().type==
518CKEDITOR.NODE_ELEMENT&&d.getPrevious().isBlockBoundary()||c.append(a.document.createElement("br"));for(h=d.getNext()&&!(d.getNext().type==CKEDITOR.NODE_ELEMENT&&d.getNext().isBlockBoundary());d.getFirst();)d.getFirst().remove().appendTo(c);h&&c.append(a.document.createElement("br"));c.replace(d);h=!1}}e.selectBookmarks(m);a.focus()}},refresh:function(a,b){this.setState(a.elementPath(b.block||b.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote",
519requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(g){g.blockless||(g.addCommand("blockquote",a),g.ui.addButton&&g.ui.addButton("Blockquote",{label:g.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})}(),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._],c=1;c<arguments.length;c++)b.push(arguments[c]);b.push(!0);
520CKEDITOR.tools.extend.apply(CKEDITOR.tools,b);return this._},g={build:function(a,b,c){return new CKEDITOR.ui.dialog.textInput(a,b,c)}},b={build:function(a,b,c){return new CKEDITOR.ui.dialog[b.type](a,b,c)}},e={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}},
521h=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(a,b){this._.domOnChangeRegistered||(a.on("load",function(){this.getInputElement().on("change",function(){a.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}},!0),m=/^on([A-Z]\w+)/,l=function(a){for(var b in a)(m.test(b)||"title"==b||"type"==b)&&delete a[b];return a},c=function(a){a=a.data.getKeystroke();
vendor: 16,881 bytes, lines 521-554
521a==CKEDITOR.SHIFT+
522CKEDITOR.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,e){if(!(4>arguments.length)){var h=a.call(this,c);h.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var g={role:c.role||"presentation"};c.includeLabel&&(g["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"div",null,g,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=
523c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.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',e.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'+
524f+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(c.controlStyle?' style\x3d"'+c.controlStyle+'"':"")+"\x3e"+e.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(b,d,f){if(!(3>arguments.length)){a.call(this,d);var e=this._.inputId=CKEDITOR.tools.getNextId()+
525"_textInput",h={"class":"cke_dialog_ui_input_"+d.type,id:e,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(h.maxlength=d.maxLength);d.size&&(h.size=d.size);d.inputStyle&&(h.style=d.inputStyle);var g=this,l=!1;b.on("load",function(){g.getInputElement().on("keydown",function(a){13==a.data.getKeystroke()&&(l=!0)});g.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);g.bidi&&c.call(g,a)},
526null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,f,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"'];d.width&&a.push('style\x3d"width:'+d.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,d,f){if(!(3>arguments.length)){a.call(this,d);var e=this,h=this._.inputId=
527CKEDITOR.tools.getNextId()+"_textarea",g={};d.validate&&(this.validate=d.validate);g.rows=d.rows||5;g.cols=d.cols||20;g["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(g.style=d.inputStyle);d.dir&&(g.dir=d.dir);if(e.bidi)b.on("load",function(){e.getInputElement().on("keyup",c)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,d,f,function(){g["aria-labelledby"]=this._.labelId;this._.required&&(g["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',
528h,'" '],b;for(b in g)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(g[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b,c,f){if(!(3>arguments.length)){var e=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),
529f=[],h=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};l(a);c["default"]&&(g.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,f,"input",null,g);f.push(' \x3clabel id\x3d"',h,'" for\x3d"',g.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,
530c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var e=[],h=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){for(var a=[],f=[],g=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",m=0;m<c.items.length;m++){var n=c.items[m],w=void 0!==n[2]?n[2]:n[0],A=void 0!==n[1]?n[1]:n[0],p=CKEDITOR.tools.getNextId()+"_radio_input",z=p+"_label",p=CKEDITOR.tools.extend({},c,{id:p,title:null,type:null},
531!0),w=CKEDITOR.tools.extend({},p,{title:w},!0),D={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:A,"aria-labelledby":z},y=[];h._["default"]==A&&(D.checked="checked");l(p);l(w);"undefined"!=typeof p.inputStyle&&(p.style=p.inputStyle);p.keyboardFocusable=!0;e.push(new CKEDITOR.ui.dialog.uiElement(b,p,y,"input",null,D));y.push(" ");new CKEDITOR.ui.dialog.uiElement(b,w,y,"label",null,{id:z,"for":D.id},n[0]);a.push(y.join(""))}new CKEDITOR.ui.dialog.hbox(b,e,a,f);return f.join("")});this._.children=
532e}},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 e=this;b.on("load",function(){var a=this.getElement();(function(){a.on("click",function(a){e.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(e.click(),a.data.preventDefault())})})();a.unselectable()},this);var h=CKEDITOR.tools.extend({},c);delete h.style;var g=CKEDITOR.tools.getNextId()+
533"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,h,f,"a",null,{style:c.style,href:"javascript:void(0)",title:c.label,hidefocus:"true","class":c["class"],role:"button","aria-labelledby":g},'\x3cspan id\x3d"'+g+'" 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 e=a.call(this,c);c.validate&&(this.validate=c.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,
534b,c,f,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),f=[],h=[],g={id:e.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&&(g.size=c.size);void 0!==c.multiple&&(g.multiple=c.multiple);l(a);for(var m=0,n;m<c.items.length&&(n=c.items[m]);m++)h.push('\x3coption value\x3d"',
535CKEDITOR.tools.htmlEncode(void 0!==n[1]?n[1]:n[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(n[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);e.select=new CKEDITOR.ui.dialog.uiElement(b,a,f,"select",null,g,h.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 e=CKEDITOR.tools.extend(a.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",
536function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,f,function(){e.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"',e.frameId,'" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+
537")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,c,f){var e=this;if(!(3>arguments.length)){a.call(this,c);c.validate&&(this.validate=c.validate);var h=CKEDITOR.tools.extend({},c),g=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(a){var f=c["for"];g&&!1===g.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(e)});
538CKEDITOR.ui.dialog.button.call(this,b,h,f)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,h,g){if(!(3>arguments.length)){var l=[],m=h.html;"\x3c"!=m.charAt(0)&&(m="\x3cspan\x3e"+m+"\x3c/span\x3e");var r=h.focus;if(r){var n=this.focus;this.focus=function(){("function"==typeof r?r:n).call(this);this.fire("focus")};h.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,
539e,h,l,"span",null,null,"");l=l.join("").match(a);m=m.match(b)||["","",""];c.test(m[1])&&(m[1]=m[1].slice(0,-1),m[2]="/"+m[2]);g.push([m[1]," ",l[1]||"",m[2]].join(""))}}}(),fieldset:function(a,b,c,e,h){var g=h.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,h,e,"fieldset",null,null,function(){var a=[];g&&a.push("\x3clegend"+(h.labelStyle?' style\x3d"'+h.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var b=0;b<c.length;b++)a.push(c[b]);return a.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=
540new 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=
541CKEDITOR.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,
542{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();
543setTimeout(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?"‪":"‫")+
544a)}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},e,!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()},
545add:function(a,b,c){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),h=this.getInputElement().$;e.$.text=a;e.$.value=void 0===b||null===b?a:b;void 0===c||null===c?CKEDITOR.env.ie?h.add(e.$):h.add(e.$,null):h.add(e.$,c);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},e,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,
546{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.$;
547"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",b);return null}},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(a,b){for(var c=this._.children,e,h=0;h<c.length&&(e=c[h]);h++)e.getElement().$.checked=e.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();
548return 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")})})},
549this);this.on("change",b);return null}}},e,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,e,{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=
550/^on([A-Z]\w+)/,c,e=function(a,b,c,d){a.on("formLoaded",function(){a.getInputElement().on(c,d,a)})},h;for(h in a)if(c=h.match(b))this.eventProcessors[h]?this.eventProcessors[h].call(this,this._.dialog,a[h]):e(this,this._.dialog,c[1].toLowerCase(),a[h]);return this},reset:function(){function a(){c.$.open();var k="";e.size&&(k=e.size-(CKEDITOR.env.ie?7:0));var w=b.frameId+"_input";c.$.write(['\x3chtml dir\x3d"'+m+'" lang\x3d"'+r+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e',
551'\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+m+'" lang\x3d"'+r+'" action\x3d"',CKEDITOR.tools.htmlEncode(e.action),'"\x3e\x3clabel id\x3d"',b.labelId,'" for\x3d"',w,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(e.label),'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',w,'" aria-labelledby\x3d"',b.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<k?k:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',
552CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+g+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+l+")}","\x3c/script\x3e"].join(""));c.$.close();for(k=0;k<h.length;k++)h[k].enable()}var b=this._,c=CKEDITOR.document.getById(b.frameId).getFrameDocument(),e=b.definition,h=b.buttons,g=this.formLoadedNumber,l=this.formUnloadNumber,m=b.dialog._.editor.lang.dir,r=b.dialog._.editor.langCode;g||(g=this.formLoadedNumber=
553CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),l=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(g);CKEDITOR.tools.removeFunction(l)}));CKEDITOR.env.gecko?setTimeout(a,500):a()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(a,b){this._.domOnChangeRegistered||
554(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",b)}}
vendor: 7,086 bytes, lines 554-567
554,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",g);CKEDITOR.dialog.addUIElement("password",g);CKEDITOR.dialog.addUIElement("textarea",
555b);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,c){for(var e=b.children,h,g=[],l=[],m=0;m<e.length&&(h=e[m]);m++){var r=[];g.push(r);l.push(CKEDITOR.dialog._.uiElementBuilders[h.type].build(a,h,r))}return new CKEDITOR.ui.dialog[b.type](a,
556l,g,c,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 g(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,
557this._.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"),d=0,f=c.length;d<f;d++){var e=new CKEDITOR.dom.element(c[d]);"text"==e.getAttribute("type").toLowerCase()&&(b?(e.setAttribute("value",e.getCustomData("fake_value")||""),e.removeCustomData("fake_value")):(e.setCustomData("fake_value",e.getAttribute("value")),e.setAttribute("value","")))}}function e(a,b){var c=
558this.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 m(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,
559"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=b.getChild([0,0,0,0,0]),d=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"'+
560a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));d.unselectable();f.unselectable();return{element:b,parts:{dialog:b.getChild(0),title:d,close:f,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function l(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
561{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})}function c(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function k(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function d(a){function b(c){var k=a.getSize(),l=CKEDITOR.document.getWindow().getViewPaneSize(),m=c.data.$.screenX,n=c.data.$.screenY,r=m-d.x,w=n-d.y;d={x:m,y:n};
562f.x+=r;f.y+=w;a.move(f.x+g[3]<h?-g[3]:f.x-g[1]>l.width-k.width-h?l.width-k.width+("rtl"==e.lang.dir?0:g[1]):f.x,f.y+g[0]<h?-g[0]:f.y-g[2]>l.height-k.height-h?l.height-k.height+g[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=y.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,f=null,e=a.getParentEditor(),h=e.config.dialog_magnetDistance,
563g=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(e){d={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);f=a.getPosition();if(CKEDITOR.env.ie6Compat){var h=y.getChild(0).getFrameDocument();h.on("mousemove",b);h.on("mouseup",c)}e.data.preventDefault()},a)}function f(a){function b(c){var n="rtl"==e.lang.dir,r=m.width,w=m.height,p=r+(c.data.$.screenX-l.x)*(n?-1:1)*(a._.moved?1:2),q=w+(c.data.$.screenY-
564l.y)*(a._.moved?1:2),t=a._.element.getFirst(),t=n&&t.getComputedStyle("right"),x=a.getPosition();x.y+q>k.height&&(q=k.height-x.y);(n?t:x.x)+p>k.width&&(p=k.width-(n?t:x.x));if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minWidth||0,p-h);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT||f==CKEDITOR.DIALOG_RESIZE_BOTH)w=Math.max(d.minHeight||0,q-g);a.resize(r,w);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",
565b);n&&(n.remove(),n=null);if(CKEDITOR.env.ie6Compat){var a=y.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var d=a.definition,f=d.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(),h,g,k,l,m,n,r=CKEDITOR.tools.addFunction(function(d){m=a.getSize();var f=a.parts.contents;f.$.getElementsByTagName("iframe").length&&(n=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),
566f.append(n));g=m.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));h=m.width-a.parts.contents.getSize("width",1);l={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(f=y.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";f==CKEDITOR.DIALOG_RESIZE_WIDTH?
567b=" 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_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+r+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(r)})}}function q(a){a.data.preventDefault(1)}function u(a){var b=
vendor: 70,048 bytes, lines 568-702
568CKEDITOR.document.getWindow(),c=a.config,d=CKEDITOR.skinName||a.config.skin,f=c.dialog_backgroundCoverColor||("moono-lisa"==d?"black":"white"),d=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(f,d,e),h=D[c];h?h.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+f,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&
569(f="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+f+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+f+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),
570e.push("\x3c/div\x3e"),h=CKEDITOR.dom.element.createFromHtml(e.join("")),h.setOpacity(void 0!==d?d:.5),h.on("keydown",q),h.on("keypress",q),h.on("keyup",q),h.appendTo(CKEDITOR.document.getBody()),D[c]=h);a.focusManager.add(h);y=h;a=function(){var a=b.getViewPaneSize();h.setStyles({width:a.width+"px",height:a.height+"px"})};var g=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;h.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)
571}};z=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||h.focus();if(CKEDITOR.env.ie6Compat){var k=function(){g();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};window.onscroll=k},0);g()}}function v(a){y&&(a.focusManager.remove(y),a=CKEDITOR.document.getWindow(),y.hide(),a.removeListener("resize",z),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||
572null},0),z=null)}var x=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';
573CKEDITOR.dialog=function(b,c){function k(){var a=y._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;c<b;c++)a[c].focusIndex=c}function l(a){var b=y._.focusList;a=a||0;if(!(1>b.length)){var c=y._.currentFocusIndex;y._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var f=c,e=1<y._.pageCount;do{f+=a;if(e&&!y._.tabBarMode&&(f==b.length||-1==f)){y._.tabBarMode=!0;y._.tabs[y._.currentTabId][0].focus();
574y._.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(y==CKEDITOR.dialog._.currentTop){var d=c.data.getKeystroke(),f="rtl"==b.lang.dir,e=[37,38,39,40];z=u=0;if(9==d||d==CKEDITOR.SHIFT+9)l(d==CKEDITOR.SHIFT+9?-1:1),z=1;else if(d==CKEDITOR.ALT+121&&!y._.tabBarMode&&1<y.getPageCount())y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1,z=1;else if(-1!=CKEDITOR.tools.indexOf(e,
575d)&&y._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([f?39:37,38],d)?a.call(y):g.call(y),y.selectPage(d),y._.tabs[d][0].focus(),z=1;else if(13!=d&&32!=d||!y._.tabBarMode)if(13==d)d=c.data.getTarget(),d.is("a","button","select","textarea")||d.is("input")&&"button"==d.$.type||((d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d),z=1),u=1;else if(27==d)(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),u=1;else return;else this.selectPage(this._.currentTabId),
576this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1),z=1;w(c)}}function w(a){z?a.data.preventDefault(1):u&&a.data.stopPropagation()}var q=CKEDITOR.dialog._.dialogDefinitions[c],t=CKEDITOR.tools.clone(r),x=b.config.dialog_buttonsOrder||"OS",A=b.lang.dir,v={},z,u;("OS"==x&&CKEDITOR.env.mac||"rtl"==x&&"ltr"==A||"ltr"==x&&"rtl"==A)&&t.buttons.reverse();q=CKEDITOR.tools.extend(q(b),t);q=CKEDITOR.tools.clone(q);q=new p(this,q);t=m(b);this._={editor:b,element:t.element,name:c,contentSize:{width:0,height:0},
577size:{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=t.parts;CKEDITOR.tools.setTimeout(function(){b.fire("ariaWidget",this.parts.contents)},0,this);t={position:CKEDITOR.env.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};t["rtl"==A?"right":"left"]=0;this.parts.dialog.setStyles(t);CKEDITOR.event.call(this);this.definition=q=CKEDITOR.fire("dialogDefinition",
578{name:c,definition:q},b).definition;if(!("removeDialogTabs"in b._)&&b.config.removeDialogTabs){t=b.config.removeDialogTabs.split(";");for(A=0;A<t.length;A++)if(x=t[A].split(":"),2==x.length){var D=x[0];v[D]||(v[D]=[]);v[D].push(x[1])}b._.removeDialogTabs=v}if(b._.removeDialogTabs&&(v=b._.removeDialogTabs[c]))for(A=0;A<v.length;A++)q.removeContents(v[A]);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");
579setTimeout(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 y=this,B=function(a){var b=y._.contents,c=!1,d;for(d in b)for(var f in b[d])if(c=a.call(this,b[d][f]))return};this.on("ok",function(a){B(function(b){if(b.validate){var c=b.validate(this),d="string"==typeof c||!1===c;d&&(a.data.hide=!1,a.stop());e.call(b,!d,"string"==typeof c?
580c:void 0);return d}})},this,null,0);this.on("cancel",function(a){B(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=l;var C=this._.element;b.focusManager.add(C,1);this.on("show",function(){C.on("keydown",n,this);if(CKEDITOR.env.gecko)C.on("keypress",w,this)});this.on("hide",
581function(){C.removeListener("keydown",n);CKEDITOR.env.gecko&&C.removeListener("keypress",w);B(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<y._.pageCount;b.config.dialog_startupFocusTab&&a?(y._.tabBarMode=!0,y._.tabs[y._.currentTabId][0].focus(),y._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=a?-1:this._.focusList.length-1,q.onFocus?
582(a=q.onFocus.call(this))&&a.focus():l(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);d(this);f(this);(new CKEDITOR.dom.text(q.title,CKEDITOR.document)).appendTo(this.parts.title);for(A=0;A<q.contents.length;A++)(v=q.contents[A])&&this.addPage(v);this.parts.tabs.on("click",function(a){var b=a.data.getTarget();b.hasClass("cke_dialog_tab")&&(b=b.$.id,this.selectPage(b.substring(4,b.lastIndexOf("_"))),
583this._.tabBarMode&&(this._.tabBarMode=!1,this._.currentFocusIndex=-1,l(1)),a.data.preventDefault())},this);A=[];v=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:q.buttons},A).getChild();this.parts.footer.setHtml(A.join(""));for(A=0;A<v.length;A++)this._.buttons[v[A].id]=v[A]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(){return function(a,b){this._.contentSize&&this._.contentSize.width==
584a&&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();
585return{width:a.$.offsetWidth||0,height:a.$.offsetHeight||0}},move:function(a,b,c){var d=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir,e="fixed"==d.getComputedStyle("position");CKEDITOR.env.ie&&d.setStyle("zoom","100%");e&&this._.position&&this._.position.x==a&&this._.position.y==b||(this._.position={x:a,y:b},e||(e=CKEDITOR.document.getWindow().getScrollPosition(),a+=e.x,b+=e.y),f&&(e=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-e.width-a),b={top:(0<b?b:0)+"px"},
586b[f?"right":"left"]=(0<a?a:0)+"px",d.setStyles(b),c&&(this._.moved=1))},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,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();this.selectPage(this.definition.contents[0].id);
587null===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,u(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,this._.parentDialog.getElement().getFirst().$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),CKEDITOR.dialog._.currentTop=this);
588a.on("keydown",C);a.on("keyup",E);this._.hasFocus=!1;for(var d in b.contents)if(b.contents[d]){var a=b.contents[d],f=this._.tabs[a.id],e=a.requiredContent,h=0;if(f){for(var g in this._.contents[a.id]){var k=this._.contents[a.id][g];"hbox"!=k.type&&"vbox"!=k.type&&k.getInputElement()&&(k.requiredContent&&!this._.editor.activeFilter.check(k.requiredContent)?k.disable():(k.enable(),h++))}!h||e&&!this._.editor.activeFilter.check(e)?f[0].addClass("cke_dialog_tab_disabled"):f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();
589c(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(),d=(c.width-b.width)/2,f=(c.height-b.height)/2;CKEDITOR.env.ie6Compat||(b.height+(0<f?f:0)>c.height||
590b.width+(0<d?d:0)>c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:d,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)})},
591commitContent: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();
592if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",C);a.removeListener("keyup",E);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;
593this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),f=this._.contents[a.id]={},e=d.getChild(),
594h=0;d=e.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||h++,f[d.id]=d,"function"==typeof d.getChild&&e.push.apply(e,d.getChild());h||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");d=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,'"',d.gecko&&!d.hc?"":' href\x3d"javascript:void(0)"',
595' 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&&(F(this,this,"CTRL+"+a.accessKey,J,H),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&
596!1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var c in this._.tabs){var d=this._.tabs[c][0],f=this._.tabs[c][1];c!=a&&(d.removeClass("cke_dialog_tab_selected"),f.hide());f.setAttribute("aria-hidden",c!=a)}var e=this._.tabs[a];e[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(b(e[1]),e[1].show(),setTimeout(function(){b(e[1],1)},0)):e[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},
597updateStyle: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},
598getContentElement: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},
599getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new l(this,a,b));else{this._.focusList.splice(b,0,new l(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"},
600styles:{"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]&&
601"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",
602{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,
603b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype);var r={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]},n=function(a,b,c){for(var d=0,f;f=a[d];d++)if(f.id==b||c&&f[c]&&(f=n(f[c],
604b,c)))return f;return null},w=function(a,b,c,d,f){if(c){for(var e=0,h;h=a[e];e++){if(h.id==c)return a.splice(e,0,b),b;if(d&&h[d]&&(h=w(h[d],b,c,d,!0)))return h}if(f)return null}a.push(b);return b},A=function(a,b,c){for(var d=0,f;f=a[d];d++){if(f.id==b)return a.splice(d,1);if(c&&f[c]&&(f=A(f[c],b,c)))return f}return null},p=function(a,b){this.dialog=a;for(var c=b.contents,d=0,f;f=c[d];d++)c[d]=f&&new k(a,f);CKEDITOR.tools.extend(this,b)};p.prototype={getContents:function(a){return n(this.contents,
605a)},getButton:function(a){return n(this.buttons,a)},addContents:function(a,b){return w(this.contents,a,b)},addButton:function(a,b){return w(this.buttons,a,b)},removeContents:function(a){A(this.contents,a)},removeButton:function(a){A(this.buttons,a)}};k.prototype={get:function(a){return n(this.elements,a,"children")},add:function(a,b){return w(this.elements,a,b,"children")},remove:function(a){A(this.elements,a,"children")}};var z,D={},y,B={},C=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=
606a.data.$.altKey,d=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=B[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())},E=function(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=B[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),
607a.data.preventDefault()))},F=function(a,b,c,d,f){(B[c]||(B[c]=[])).push({uiElement:a,dialog:b,key:c,keyup:f||a.accessKeyUp,keydown:d||a.accessKeyDown})},I=function(a){for(var b in B){for(var c=B[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete B[b]}},H=function(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])},J=function(){};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,d,f,e,h){if(!(4>arguments.length)){var g=(d.call?d(b):d)||"div",
608k=["\x3c",g," "],l=(f&&f.call?f(b):f)||{},m=(e&&e.call?e(b):e)||{},n=(h&&h.call?h.call(this,a,b):h)||"",r=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed=!0);m.id=r;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var w=m["class"]&&m["class"].split?m["class"].split(" "):[],r=0;r<w.length;r++)w[r]&&(q[w[r]]=1);w=[];for(r in q)w.push(r);
609m["class"]=w.join(" ");b.title&&(m.title=b.title);q=(b.style||"").split(";");b.align&&(w=b.align,l["margin-left"]="left"==w?0:"auto",l["margin-right"]="right"==w?0:"auto");for(r in l)q.push(r+":"+l[r]);b.hidden&&q.push("display:none");for(r=q.length-1;0<=r;r--)""===q[r]&&q.splice(r,1);0<q.length&&(m.style=(m.style?m.style+"; ":"")+q.join("; "));for(r in m)k.push(r+'\x3d"'+CKEDITOR.tools.htmlEncode(m[r])+'" ');k.push("\x3e",n,"\x3c/",g,"\x3e");c.push(k.join(""));(this._||(this._={})).dialog=a;"boolean"==
610typeof 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);
611this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&F(this,a,"CTRL+"+b.accessKey);var p=this;a.on("load",function(){var b=p.getInputElement();if(b){var c=p.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;p.fire("focus");c&&this.addClass(c)});b.on("blur",function(){p.fire("blur");c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=
612a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=p.focusIndex}))}},hbox:function(a,b,c,d,f){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,h=f&&f.widths||null,g=f&&f.height||null,k,l={role:"presentation"};f&&f.align&&(l.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"hbox"},d,"table",{},l,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;k<c.length;k++){var b="cke_dialog_ui_hbox_child",d=[];0===k&&
613(b="cke_dialog_ui_hbox_first");k==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');h?h[k]&&d.push("width:"+x(h[k])):d.push("width:"+Math.floor(100/c.length)+"%");g&&d.push("height:"+x(g));f&&void 0!==f.padding&&d.push("padding:"+x(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[k].align&&d.push("text-align:"+e[k].align);0<d.length&&a.push('style\x3d"'+d.join("; ")+'" ');a.push("\x3e",c[k],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},
614vbox:function(a,b,c,d,f){if(!(3>arguments.length)){this._||(this._={});var e=this._.children=b,h=f&&f.width||null,g=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},d,"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:"+x(h||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(f&&
615f.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;d<c.length;d++){var k=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');h&&k.push("width:"+x(h||"100%"));g?k.push("height:"+x(g[d])):f&&f.expand&&k.push("height:"+Math.floor(100/c.length)+"%");f&&void 0!==f.padding&&k.push("padding:"+x(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[d].align&&k.push("text-align:"+e[d].align);0<k.length&&b.push('style\x3d"',k.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',
616c[d],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a);!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=
617this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b=/^on([A-Z]\w+)/,c,d=function(a,b,c,d){b.on("load",function(){a.getInputElement().on(c,d,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,
618this._.dialog,a[f]):d(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");
619a.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?
620this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var d=b.children,f,e=[],h=[],g=0;g<d.length&&(f=d[g]);g++){var k=[];e.push(k);h.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,k))}return new CKEDITOR.ui.dialog[b.type](a,h,e,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;
621CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){a.openDialog(this.dialogName)},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,d=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i,e=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():
622a[0],c,d=CKEDITOR.VALIDATE_AND,f=[],e;for(e=0;e<a.length;e++)if("function"==typeof a[e])f.push(a[e]);else break;e<a.length&&"string"==typeof a[e]&&(c=a[e],e++);e<a.length&&"number"==typeof a[e]&&(d=a[e]);var h=d==CKEDITOR.VALIDATE_AND?!0:!1;for(e=0;e<f.length;e++)h=d==CKEDITOR.VALIDATE_AND?h&&f[e](b):h||f[e](b);return h?!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,
623a)},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 d.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",
624function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in D)D[c].remove();D={}}a=a.editor._.storedDialogs;for(var d in a)a[d].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b){var c=null,d=CKEDITOR.dialog._.dialogDefinitions[a];null===CKEDITOR.dialog._.currentTop&&u(this);if("function"==typeof d)c=this._.storedDialogs||(this._.storedDialogs={}),c=c[a]||(c[a]=new CKEDITOR.dialog(this,a)),b&&b.call(c,
625c),c.show();else{if("failed"==d)throw v(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof d&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d),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(g){g.data.dialog&&
626a.openDialog(g.data.dialog)},null,null,999)}}),"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 g(b){function c(){var a=b.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(a){b.readOnly&&"cut"==a.name||
627B.initPasteDataTransfer(a,b);a.data.preventDefault()};a.on("copy",d);a.on("cut",d);a.on("cut",function(){b.readOnly||b.extractSelectedHtml()},null,null,999)}a.on(B.mainPasteEvent,function(a){"beforepaste"==B.mainPasteEvent&&C||z(a)});"beforepaste"==B.mainPasteEvent&&(a.on("paste",function(a){E||(h(),a.data.preventDefault(),z(a),k("paste")||b.openDialog("paste"))}),a.on("contextmenu",g,null,null,0),a.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||g()},null,null,0));a.on("beforecut",
628function(){!C&&l(b)});var e;a.attachListener(CKEDITOR.env.ie?a:b.document.getDocumentElement(),"mouseup",function(){e=setTimeout(function(){D()},0)});b.on("destroy",function(){clearTimeout(e)});a.on("keyup",D)}function d(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=k(c);else try{a=b.document.$.execCommand(c,!1,null)}catch(d){a=!1}a||b.showNotification(b.lang.clipboard[this.type+
629"Error"]);return a}}}function e(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(b,c){var d=this,f=function(c,f){c&&a(b,c,!!f);b.fire("afterCommandExec",{name:"paste",command:d,returnValue:!!c})};"string"==typeof c?f({dataValue:c,method:"paste",dataTransfer:B.initPasteDataTransfer()},1):b.getClipboardData(f)}}}function h(){E=1;setTimeout(function(){E=0},100)}function g(){C=1;setTimeout(function(){C=0},10)}function k(a){var c=b.document,d=c.getBody(),e=!1,h=function(){e=!0};
630d.on(a,h);7<CKEDITOR.env.version?c.$.execCommand(a):c.$.selection.createRange().execCommand(a);d.removeListener(a,h);return e}function l(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var a=b.getSelection(),c,d,e;a.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=a.getSelectedElement())&&(d=a.getRanges()[0],e=b.document.createText(""),e.insertBefore(c),d.setStartBefore(e),d.setEndAfter(c),a.selectRanges([d]),setTimeout(function(){c.getParent()&&(e.remove(),a.selectElement(c))},0))}}function m(a,c){var d=b.document,
631e=b.editable(),h=function(a){a.cancel()},g;if(!d.getById("cke_pastebin")){var k=b.getSelection(),l=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!e.is("body")||CKEDITOR.env.ie?"div":"body",d);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var r=0,d=d.getWindow();CKEDITOR.env.webkit?(e.append(n),n.addClass("cke_editable"),e.is("body")||(r="static"!=e.getComputedStyle("position")?e:CKEDITOR.dom.element.get(e.$.offsetParent),
632r=r.getDocumentPosition().y)):e.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(n);n.setStyles({position:"absolute",top:d.getScrollPosition().y-r+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(r=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==b.config.contentsLangDirection?"left":"right",
633"-10000px");b.on("selectionChange",h,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)g=e.once("blur",h,null,null,-100);r&&n.focus();r=new CKEDITOR.dom.range(n);r.selectNodeContents(n);var w=r.select();CKEDITOR.env.ie&&(g=e.once("blur",function(){b.lockSelection(w)}));var q=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=q);g&&g.removeListener();CKEDITOR.env.ie&&e.focus();k.selectBookmarks(l);n.remove();
634var a;CKEDITOR.env.webkit&&(a=n.getFirst())&&a.is&&a.hasClass("Apple-style-span")&&(n=a);b.removeListener("selectionChange",h);c(n.getHtml())},0)}}function A(){if("paste"==B.mainPasteEvent)return b.fire("beforePaste",{type:"auto",method:"paste"}),!1;b.focus();h();var a=b.focusManager;a.lock();if(b.editable().fire(B.mainPasteEvent)&&!k("paste"))return a.unlock(),!1;a.unlock();return!0}function p(a){if("wysiwyg"==b.mode)switch(a.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:a=b.editable();
635h();"paste"==B.mainPasteEvent&&a.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:b.fire("saveSnapshot"),setTimeout(function(){b.fire("saveSnapshot")},50)}}function z(c){var d={type:"auto",method:"paste",dataTransfer:B.initPasteDataTransfer(c)};d.dataTransfer.cacheData();var e=!1!==b.fire("beforePaste",d);e&&B.canClipboardApiBeTrusted(d.dataTransfer,b)?(c.data.preventDefault(),setTimeout(function(){a(b,d)},0)):m(c,function(c){d.dataValue=c.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,
636"");e&&a(b,d)})}function D(){if("wysiwyg"==b.mode){var a=y("paste");b.getCommand("cut").setState(y("cut"));b.getCommand("copy").setState(y("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function y(a){if(F&&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 B=CKEDITOR.plugins.clipboard,
637C=0,E=0,F=0;(function(){b.on("key",p);b.on("contentDom",c);b.on("selectionChange",function(a){F=a.data.selection.getRanges()[0].checkReadOnly();D()});b.contextMenu&&b.contextMenu.addListener(function(a,b){F=b.getRanges()[0].checkReadOnly();return{cut:y("cut"),copy:y("copy"),paste:y("paste")}})})();(function(){function a(c,d,e,h,g){var k=b.lang.clipboard[d];b.addCommand(d,e);b.ui.addButton&&b.ui.addButton(c,{label:k,command:d,toolbar:"clipboard,"+h});b.addMenuItems&&b.addMenuItem(d,{label:k,command:d,
638group:"clipboard",order:g})}a("Cut","cut",d("cut"),10,1);a("Copy","copy",d("copy"),20,4);a("Paste","paste",e(),30,8)})();b.getClipboardData=function(a,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();l=!0;c({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function h(){this.customTitle=a&&a.title}var g=!1,k="auto",l=!1;c||(c=a,a=null);b.on("paste",d,null,null,0);b.on("beforePaste",function(a){a.removeListener();
639g=!0;k=a.data.type},null,null,1E3);!1===A()&&(b.removeListener("paste",d),g&&b.fire("pasteDialog",h)?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){l||c(null)},10)})):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";
640return"htmlifiedtext"}function e(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"),
641b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return l(a,b)}function h(){function a(){var b=
642{},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 m(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,
643a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function c(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function k(b){var c=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function d(c,e,h){e.select();a(b,{dataTransfer:h,
644method:"drop"},1);h.sourceEditor.fire("saveSnapshot");h.sourceEditor.editable().extractHtmlFromRange(c);h.sourceEditor.getSelection().selectRanges([c]);h.sourceEditor.fire("saveSnapshot")}function e(d,h){d.select();a(b,{dataTransfer:h,method:"drop"},1);c.resetDragDataTransfer()}function h(a,c,d){var e={$:a.data.$,target:a.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===b.fire(a.name,e)&&a.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}
645var k=b.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(b),m=b.ui.space("top"),A=b.ui.space("bottom");c.preventDefaultDropOnElement(m);c.preventDefaultDropOnElement(A);k.attachListener(l,"dragstart",h);k.attachListener(b,"dragstart",c.resetDragDataTransfer,c,null,1);k.attachListener(b,"dragstart",function(a){c.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=c.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=
646a?g(a.startContainer):null,c.dragEndContainerChildCount=a?g(a.endContainer):null)},null,null,100);k.attachListener(l,"dragend",h);k.attachListener(b,"dragend",c.initDragDataTransfer,c,null,1);k.attachListener(b,"dragend",c.resetDragDataTransfer,c,null,100);k.attachListener(l,"dragover",function(a){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()});
647k.attachListener(l,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var d=a.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(a,b),e=c.dragRange;d&&h(a,e,d)}}},null,null,9999);k.attachListener(b,"drop",c.initDragDataTransfer,c,null,1);k.attachListener(b,"drop",function(a){if(a=a.data){var h=a.dropRange,g=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(g,
648h,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(g,h,k):e(h,k)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var c,d=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=d.get(c);g(a);k(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var l=["image/png","image/jpeg",
649"image/gif"],x;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d&&1==d.getFilesCount()&&x!=d.id&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(l,d.type))){var e=new FileReader;e.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';a.fire("paste",b.data)},!1);e.addEventListener("abort",function(){a.fire("paste",b.data)},!1);e.addEventListener("error",function(){a.fire("paste",b.data)},!1);e.readAsDataURL(d);x=c.dataTransfer.id;
650b.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,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),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,
651" "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,e,f=new CKEDITOR.dom.element("div");for(f.setHtml(b);1==f.getChildCount()&&
652(d=f.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)f=e=d;e&&(b=e.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^&nbsp;(?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,
653null,3);a.on("paste",function(c){c=c.data;var h=c.type,g=c.dataValue,k,l=a.config.clipboard_defaultContentType||"html",p=c.dataTransfer.getTransferType(a);k="html"==h||"html"==c.preSniffing?"html":b(g);"htmlifiedtext"==k&&(g=e(a.config,g));"text"==h&&"html"==k?g=m(a,g,d.get("plain-text")):p==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!c.dontFilter&&(g=m(a,g,a.pasteFilter));c.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);c.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==h&&
654(h="html"==k||"html"==l?"html":"text");c.type=h;c.dataValue=g;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);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:!CKEDITOR.env.ie&&!CKEDITOR.env.iOS,isCustomDataTypesSupported:!CKEDITOR.env.ie,
655isFileApiSupported:!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())?!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function e(a,
656c,d){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var h=b.startContainer;"number"==typeof d&&"number"==typeof c&&h.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,h,c)||e(a.endContainer,h,d))},isDropRangeAffectedByDragRange:function(a,
657b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(b,c,d,e){var h=CKEDITOR.plugins.clipboard,g=e.editable(),k,l;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,c,h.dragStartContainerChildCount,h.dragEndContainerChildCount);
658(l=this.isDropRangeAffectedByDragRange(b,c))||(k=b.createBookmark(!1));h=c.clone().createBookmark(!1);l&&(k=b.createBookmark(!1));b=k.startNode;c=k.endNode;l=h.startNode;c&&b.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(b);b=e.createRange();b.moveToBookmark(k);g.extractHtmlFromRange(b,1);c=e.createRange();c.moveToBookmark(h);a(e,{dataTransfer:d,method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=
659a.data.$,d=c.clientX,e=c.clientY,h=b.getSelection(!0).getRanges()[0],g=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint)c=b.document.$.caretRangeFromPoint(d,e),g.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),g.collapse(!0);else if(c.rangeParent)g.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),g.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&h&&b.editable().hasFocus)return h;if(document.body.createTextRange){b.focus();
660c=b.document.getBody().$.createTextRange();try{for(var k=!1,l=0;20>l&&!k;l++){if(!k)try{c.moveToPoint(d,e-l),k=!0}catch(m){}if(!k)try{c.moveToPoint(d,e+l),k=!0}catch(p){}}if(k){var z="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+z+'"\x3e​\x3c/span\x3e');var D=b.document.getById(z);g.moveToPosition(D,CKEDITOR.POSITION_BEFORE_START);D.remove()}else{var y=b.document.$.elementFromPoint(d,e),B=new CKEDITOR.dom.element(y),C;if(B.equals(b.editable())||"html"==B.getName())return h&&h.startContainer&&
661!h.startContainer.equals(b.editable())?h:null;C=B.getClientRect();d<C.left?g.setStartAt(B,CKEDITOR.POSITION_AFTER_START):g.setStartAt(B,CKEDITOR.POSITION_BEFORE_END);g.collapse(!0)}}catch(E){return null}}else return null}return g},initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData?d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=
662null},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",c)}};var d=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?
663"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(d);this.id||(this.id="Text"==d?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=d)try{this.$.setData(d,this.id)}catch(c){}b&&(this.sourceEditor=
664b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==d||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){a=this._.normalizeType(a);var b=this._.data[a];if(void 0===b||null===b||""===b)try{b=this.$.getData(a)}catch(c){}if(void 0===b||null===b||""===b)b="";"text/html"==a?(b=b.replace(this._.metaRegExp,
665""),(a=this._.bodyRegExp.exec(b))&&a.length&&(b=a[1],b=b.replace(this._.fragmentRegExp,""))):"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==b.substring(0,7)&&(b="");return b},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==d&&"Text"==a&&(this.id=b);try{this.$.setData(a,b)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:
666CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);d&&(b._.data[c]=d)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");d=this._getImageFromClipboard();if(this.$&&this.$.files||d){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);
6670===this._.files.length&&d&&this._.files.push(d)}}},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 c=
6680;c<this.$.types.length;c++)a[this.$.types[c]]=1}else a.Text=1,a.URL=1;"Text"!=d&&(a[d]=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){}}}}(),function(){function a(a,b,e){e=a.config.forceEnterMode||e;"wysiwyg"==a.mode&&(b||(b=a.activeEnterMode),a.elementPath().isContextFor("p")||(b=CKEDITOR.ENTER_BR,e=1),a.fire("saveSnapshot"),b==CKEDITOR.ENTER_BR?
669l(a,b,null,e):c(a,b,null,e),a.fire("saveSnapshot"))}function g(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)}});
670b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(b){a(b,b.activeShiftEnterMode,1)}});b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var e=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark();CKEDITOR.plugins.enterkey={enterBlock:function(a,c,m,u){if(m=m||g(a)){m=b(m);var v=m.document,x=m.checkStartOfBlock(),t=m.checkEndOfBlock(),r=a.elementPath(m.startContainer),n=r.block,w=c==CKEDITOR.ENTER_DIV?"div":"p",A;if(x&&t){if(n&&(n.is("li")||n.getParent().is("li"))){n.is("li")||
671(n=n.getParent());m=n.getParent();A=m.getParent();u=!n.hasPrevious();var p=!n.hasNext(),w=a.getSelection(),z=w.createBookmarks(),x=n.getDirection(1),t=n.getAttribute("class"),D=n.getAttribute("style"),y=A.getDirection(1)!=x;a=a.enterMode!=CKEDITOR.ENTER_BR||y||D||t;if(A.is("li"))u||p?(u&&p&&m.remove(),n[p?"insertAfter":"insertBefore"](A)):n.breakParent(A);else{if(a)if(r.block.is("li")?(A=v.createElement(c==CKEDITOR.ENTER_P?"p":"div"),y&&A.setAttribute("dir",x),D&&A.setAttribute("style",D),t&&A.setAttribute("class",
672t),n.moveChildren(A)):A=r.block,u||p)A[u?"insertBefore":"insertAfter"](m);else n.breakParent(m),A.insertAfter(m);else if(n.appendBogus(!0),u||p)for(;v=n[u?"getFirst":"getLast"]();)v[u?"insertBefore":"insertAfter"](m);else for(n.breakParent(m);v=n.getLast();)v.insertAfter(m);n.remove()}w.selectBookmarks(z);return}if(n&&n.getParent().is("blockquote")){n.breakParent(n.getParent());n.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||n.getPrevious().remove();n.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||
673n.getNext().remove();m.moveToElementEditStart(n);m.select();return}}else if(n&&n.is("pre")&&!t){l(a,c,m,u);return}if(x=m.splitBlock(w)){c=x.previousBlock;n=x.nextBlock;r=x.wasStartOfBlock;a=x.wasEndOfBlock;n?(z=n.getParent(),z.is("li")&&(n.breakParent(z),n.move(n.getNext(),1))):c&&(z=c.getParent())&&z.is("li")&&(c.breakParent(z),z=c.getNext(),m.moveToElementEditStart(z),c.move(c.getPrevious()));if(r||a){if(c){if(c.is("li")||!k.test(c.getName())&&!c.is("pre"))A=c.clone()}else n&&(A=n.clone());A?u&&
674!A.is("li")&&A.renameNode(w):z&&z.is("li")?A=z:(A=v.createElement(w),c&&(p=c.getDirection())&&A.setAttribute("dir",p));if(v=x.elementPath)for(u=0,w=v.elements.length;u<w;u++){z=v.elements[u];if(z.equals(v.block)||z.equals(v.blockLimit))break;CKEDITOR.dtd.$removeEmpty[z.getName()]&&(z=z.clone(),A.moveChildren(z),A.append(z))}A.appendBogus();A.getParent()||m.insertNode(A);A.is("li")&&A.removeAttribute("value");!CKEDITOR.env.ie||!r||a&&c.getChildCount()||(m.moveToElementEditStart(a?c:A),m.select());
675m.moveToElementEditStart(r&&!a?n:A)}else n.is("li")&&(A=m.clone(),A.selectNodeContents(n),A=new CKEDITOR.dom.walker(A),A.evaluator=function(a){return!(h(a)||e(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(z=A.next())&&z.type==CKEDITOR.NODE_ELEMENT&&z.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?v.createElement("br"):v.createText(" ")).insertBefore(z)),n&&m.moveToElementEditStart(n);m.select();m.scrollIntoView()}}},enterBr:function(a,b,
676e,h){if(e=e||g(a)){var l=e.document,m=e.checkEndOfBlock(),t=new CKEDITOR.dom.elementPath(a.getSelection().getStartElement()),r=t.block,n=r&&t.block.getName();h||"li"!=n?(!h&&m&&k.test(n)?(m=r.getDirection())?(l=l.createElement("div"),l.setAttribute("dir",m),l.insertAfter(r),e.setStart(l,0)):(l.createElement("br").insertAfter(r),CKEDITOR.env.gecko&&l.createText("").insertAfter(r),e.setStartAt(r.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(a="pre"==n&&CKEDITOR.env.ie&&
6778>CKEDITOR.env.version?l.createText("\r"):l.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("").insertAfter(a),m&&(r||t.blockLimit).appendBogus(),a.getNext().$.nodeValue="",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):c(a,b,e,h)}}};var m=CKEDITOR.plugins.enterkey,l=m.enterBr,c=m.enterBlock,k=/^h[1-6]$/}(),CKEDITOR.plugins.colordialog={requires:"dialog",
678init:function(a){var g=new CKEDITOR.dialogCommand("colordialog");g.editorFocus=!1;a.addCommand("colordialog",g);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");a.getColorFromDialog=function(b,e){var h=function(a){this.removeListener("ok",h);this.removeListener("cancel",h);a="ok"==a.name?this.getValueOf("picker","selectedColor"):null;b.call(e,a)},g=function(a){a.on("ok",h);a.on("cancel",h)};a.execCommand("colordialog");if(a._.storedDialogs&&a._.storedDialogs.colordialog)g(a._.storedDialogs.colordialog);
679else 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(){g(this);b.onLoad=a;"function"==typeof a&&a.call(this)}})}})}}},CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog),function(){function a(a){var h=a.config,m=a.fire("uiSpace",{space:"top",html:""}).html,l=function(){function c(a,d,e){k.setStyle(d,b(e));k.setStyle("position",a)}function d(a){var b=
680m.getDocumentPosition();switch(a){case "top":c("absolute","top",b.y-w-z);break;case "pin":c("fixed","top",y);break;case "bottom":c("absolute","top",b.y+(r.height||r.bottom-r.top)+z)}f=a}var f,m,t,r,n,w,A,p=h.floatSpaceDockedOffsetX||0,z=h.floatSpaceDockedOffsetY||0,D=h.floatSpacePinnedOffsetX||0,y=h.floatSpacePinnedOffsetY||0;return function(c){if(m=a.editable()){var q=c&&"focus"==c.name;q&&k.show();a.fire("floatingSpaceLayout",{show:q});k.removeStyle("left");k.removeStyle("right");t=k.getClientRect();
681r=m.getClientRect();n=g.getViewPaneSize();w=t.height;A="pageXOffset"in g.$?g.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;f?(w+z<=r.top?d("top"):w+z>n.height-r.bottom?d("pin"):d("bottom"),c=n.width/2,c=h.floatSpacePreferRight?"right":0<r.left&&r.right<n.width&&r.width>t.width?"rtl"==h.contentsLangDirection?"right":"left":c-r.left>r.right-c?"left":"right",t.width>n.width?(c="left",q=0):(q="left"==c?0<r.left?r.left:0:r.right<n.width?n.width-r.right:0,q+t.width>n.width&&(c="left"==c?
682"right":"left",q=0)),k.setStyle(c,b(("pin"==f?D:p)+q+("pin"==f?0:"left"==c?A:-A)))):(f="pin",d("pin"),l(c))}}}();if(m){var c=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':
683" ")+'\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'),k=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(c.output({content:m,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}))),d=CKEDITOR.tools.eventsBuffer(500,l),f=CKEDITOR.tools.eventsBuffer(100,l);k.unselectable();k.on("mousedown",
684function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){l(b);a.on("change",d.input);g.on("scroll",f.input);g.on("resize",f.input)});a.on("blur",function(){k.hide();a.removeListener("change",d.input);g.removeListener("scroll",f.input);g.removeListener("resize",f.input)});a.on("destroy",function(){g.removeListener("scroll",f.input);g.removeListener("resize",f.input);k.clearCustomData();k.remove()});a.focusManager.hasFocus&&k.show();a.focusManager.add(k,
6851)}}var g=CKEDITOR.document.getWindow(),b=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){a(this)},null,null,20)}})}(),"use strict",function(){var a=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(c){function e(a){f.enabled&&!1!==a.data.command.canUndo&&f.save()}function d(){f.enabled=c.readOnly?!1:"wysiwyg"==c.mode;f.onChange()}var f=c.undoManager=new b(c),h=f.editingHandler=
686new m(f),g=c.addCommand("undo",{exec:function(){f.undo()&&(c.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),l=c.addCommand("redo",{exec:function(){f.redo()&&(c.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[a[0],"undo"],[a[1],"redo"],[a[2],"redo"]]);f.onChange=function(){g.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);l.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};c.on("beforeCommandExec",
687e);c.on("afterCommandExec",e);c.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});c.on("contentDom",h.attachListeners,h);c.on("instanceReady",function(){c.fire("saveSnapshot")});c.on("beforeModeUnload",function(){"wysiwyg"==c.mode&&f.save(!0)});c.on("mode",d);c.on("readOnly",d);c.ui.addButton&&(c.ui.addButton("Undo",{label:c.lang.undo.undo,command:"undo",toolbar:"undo,10"}),c.ui.addButton("Redo",{label:c.lang.undo.redo,command:"redo",toolbar:"undo,20"}));c.resetUndo=function(){f.reset();
688c.fire("saveSnapshot")};c.on("updateSnapshot",function(){f.currentImage&&f.update()});c.on("lockSnapshot",function(a){a=a.data;f.lock(a&&a.dontUpdate,a&&a.forceUpdate)});c.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 d=b.getKeyGroup(a),f=this.strokesRecorded[d]+
6891;e=e||f>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());e?(f=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[d]=f;this.previousKeyGroup=d},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=
690-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,d){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;b||(b=new e(f));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==d&&f.fire("change");h.splice(this.index+
6911,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(b)-1;this.currentImage=b;!1!==d&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,d;a.bookmarks&&(b.focus(),d=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?d.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(d=this.editor.document.getBody().$.createTextRange(),d.collapse(!0),d.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];
692this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,d=this.currentImage,e;if(d)if(a)for(e=this.index-1;0<=e;e--){if(a=b[e],!d.equalsContent(a))return a.index=e,a}else for(e=this.index+1;e<b.length;e++)if(a=b[e],!d.equalsContent(a))return a.index=e,a;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var a=this.getNextImage(!0);if(a)return this.restoreImage(a),
693!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 e(this.editor));for(var b=this.index,d=this.snapshots;0<b&&this.currentImage.equalsContent(d[b-1]);)--b;d.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,d=b[b.length-1];return d.equalsContent(a)&&!d.equalsSelection(a)?
694(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 d=null;if(b)d=!0;else{var f=new e(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(f)&&(d=f)}this.locked={update:d,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 e(this.editor,!0);a.equalsContent(b)||this.update()}}}};b.navigationKeyCodes=
695{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 g[a]?e.FUNCTIONAL:e.PRINTABLE};b.getOppositeKeyGroup=function(a){var e=b.keyGroups;return a==e.FUNCTIONAL?e.PRINTABLE:e.FUNCTIONAL};b.ieFunctionalKeysBug=function(a){return CKEDITOR.env.ie&&b.getKeyGroup(a)==b.keyGroups.FUNCTIONAL};var e=CKEDITOR.plugins.undo.Image=function(a,b){this.editor=a;a.fire("beforeUndoImage");
696var d=a.getSnapshot();CKEDITOR.env.ie&&d&&(d=d.replace(/\s+data-cke-expando=".*?"/g,""));this.contents=d;b||(this.bookmarks=(d=d&&a.getSelection())&&d.createBookmarks2(!0));a.fire("afterUndoImage")},h=/\b(?:href|src|name)="[^"]*?"/gi;e.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||
697!a||b.length!=a.length)return!1;for(var d=0;d<b.length;d++){var e=b[d],h=a[d];if(e.startOffset!=h.startOffset||e.endOffset!=h.endOffset||!CKEDITOR.tools.arrayCompare(e.start,h.start)||!CKEDITOR.tools.arrayCompare(e.end,h.end))return!1}}return!0}};var m=CKEDITOR.plugins.undo.NativeEditingHandler=function(a){this.undoManager=a;this.ignoreInputEvent=!1;this.keyEventsStack=new l;this.lastKeydownImage=null};m.prototype={onKeydown:function(c){var h=c.data.getKey();if(229!==h)if(-1<CKEDITOR.tools.indexOf(a,
698c.data.getKeystroke()))c.data.preventDefault();else if(this.keyEventsStack.cleanUp(c),c=this.undoManager,this.keyEventsStack.getLast(h)||this.keyEventsStack.push(h),this.lastKeydownImage=new e(c.editor),b.isNavigationKey(h)||this.undoManager.keyGroupChanged(h))if(c.strokesRecorded[0]||c.strokesRecorded[1])c.save(!1,this.lastKeydownImage,!1),c.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var a=this.keyEventsStack.getLast();a||(a=this.keyEventsStack.push(0));
699this.keyEventsStack.increment(a.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var h=this.undoManager;a=a.data.getKey();var d=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(b.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new e(h.editor,!0))))if(0<d)h.type(a);else if(b.isNavigationKey(a))this.onNavigationKey(!0)},
700onNavigationKey:function(a){var b=this.undoManager;!a&&b.save(!0,null,!1)||b.updateSelection(new e(b.editor));b.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},attachListeners:function(){var a=this.undoManager.editor,e=a.editable(),d=this;e.attachListener(e,"keydown",function(a){d.onKeydown(a);if(b.ieFunctionalKeysBug(a.data.getKey()))d.onInput()},null,null,999);e.attachListener(e,CKEDITOR.env.ie?"keypress":"input",d.onInput,d,null,999);e.attachListener(e,"keyup",d.onKeyup,
701d,null,999);e.attachListener(e,"paste",d.ignoreInputEventListener,d,null,999);e.attachListener(e,"drop",d.ignoreInputEventListener,d,null,999);e.attachListener(e.isInline()?e:a.document.getDocumentElement(),"click",function(){d.onNavigationKey()},null,null,999);e.attachListener(this.undoManager.editor,"blur",function(){d.keyEventsStack.remove(9)},null,null,999)}};var l=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};l.prototype={push:function(a){a=this.stack.push({keyCode:a,inputs:0});
702return this.stack[a-1]}
vendor: 5,714 bytes, lines 702-710
702,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},
703getTotalInputs: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)}}}(),CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ru:1,
704si:1,sk:1,sl:1,sq:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(a){var g=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar",{exec:function(){var b=a.langCode,b=g.availableLangs[b]?b:g.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(g.path+"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,g.langEntries[b]);a.openDialog("specialchar")})},
705modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "),
706function(){function a(a,b){var c=e.exec(a),h=e.exec(b);if(c){if(!c[2]&&"px"==h[2])return h[1];if("px"==c[2]&&!h[2])return h[1]+"px"}return b}var g=CKEDITOR.htmlParser.cssStyle,b=CKEDITOR.tools.cssLength,e=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,h={elements:{$:function(b){var e=b.attributes;if((e=(e=(e=e&&e["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(e)))&&e.children[0])&&b.attributes["data-cke-resizable"]){var c=(new g(b)).rules;b=e.attributes;var h=c.width,
707c=c.height;h&&(b.width=a(b.width,h));c&&(b.height=a(b.height,c))}return e}}};CKEDITOR.plugins.add("fakeobjects",{init:function(a){a.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")},afterInit:function(a){(a=(a=a.dataProcessor)&&a.htmlFilter)&&a.addRules(h,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(a,e,c,h){var d=this.lang.fakeobjects,d=d[c]||d.unknown;e={"class":e,"data-cke-realelement":encodeURIComponent(a.getOuterHtml()),"data-cke-real-node-type":a.type,
708alt:d,title:d,align:a.getAttribute("align")||""};CKEDITOR.env.hc||(e.src=CKEDITOR.tools.transparentImageData);c&&(e["data-cke-real-element-type"]=c);h&&(e["data-cke-resizable"]=h,c=new g,h=a.getAttribute("width"),a=a.getAttribute("height"),h&&(c.rules.width=b(h)),a&&(c.rules.height=b(a)),c.populate(e));return this.document.createElement("img",{attributes:e})};CKEDITOR.editor.prototype.createFakeParserElement=function(a,e,c,h){var d=this.lang.fakeobjects,d=d[c]||d.unknown,f;f=new CKEDITOR.htmlParser.basicWriter;
709a.writeHtml(f);f=f.getHtml();e={"class":e,"data-cke-realelement":encodeURIComponent(f),"data-cke-real-node-type":a.type,alt:d,title:d,align:a.attributes.align||""};CKEDITOR.env.hc||(e.src=CKEDITOR.tools.transparentImageData);c&&(e["data-cke-real-element-type"]=c);h&&(e["data-cke-resizable"]=h,h=a.attributes,a=new g,c=h.width,h=h.height,void 0!==c&&(a.rules.width=b(c)),void 0!==h&&(a.rules.height=b(h)),a.populate(e));return new CKEDITOR.htmlParser.element("img",e)};CKEDITOR.editor.prototype.restoreRealElement=
710function(b){if(b.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var e=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(b.data("cke-realelement")),this.document);if(b.data("cke-resizable")){var c=b.getStyle("width");b=b.getStyle("height");c&&e.setAttribute("width",a(e.getAttribute("width"),c));b&&e.setAttribute("height",a(e.getAttribute("height"),b))}return e}}(),"use strict",function(){function a(a){return a.replace(/'/g,"\\$\x26")}
vendor: 4,305 bytes, lines 710-719
710function g(a){for(var b,c=a.length,d=[],e=0;e<
711c;e++)b=a.charCodeAt(e),d.push(b);return"String.fromCharCode("+d.join(",")+")"}function b(b,c){var d=b.plugins.link,e=d.compiledProtectionFunction.params,h,f;f=[d.compiledProtectionFunction.name,"("];for(var g=0;g<e.length;g++)d=e[g].toLowerCase(),h=c[d],0<g&&f.push(","),f.push("'",h?a(encodeURIComponent(c[d])):"","'");f.push(")");return f.join("")}function e(a){a=a.config.emailProtection||"";var b;a&&"encode"!=a&&(b={},a.replace(/^([^(]+)\(([^)]+)\)$/,function(a,c,d){b.name=c;b.params=[];d.replace(/[^,\s]+/g,
712function(a){b.params.push(a)})}));return b}CKEDITOR.plugins.add("link",{requires:"dialog,fakeobjects",onLoad:function(){function a(b){return c.replace(/%1/g,"rtl"==b?"right":"left").replace(/%2/g,"cke_contents_"+b)}var b="background:url("+CKEDITOR.getUrl(this.path+"images"+(CKEDITOR.env.hidpi?"/hidpi":"")+"/anchor.png")+") no-repeat %1 center;border:1px dotted #00f;background-size:16px;",c=".%2 a.cke_anchor,.%2 a.cke_anchor_empty,.cke_editable.%2 a[name],.cke_editable.%2 a[data-cke-saved-name]{"+
713b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(a){var b="a[!href]";CKEDITOR.dialog.isTabEnabled(a,"link","advanced")&&(b=b.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(b=b.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:b,
714requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.addCommand("unlink",new CKEDITOR.unlinkCommand);a.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand);a.setKeystroke(CKEDITOR.CTRL+76,"link");a.ui.addButton&&(a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"}),a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"}),a.ui.addButton("Anchor",
715{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");a.on("doubleclick",function(b){var c=CKEDITOR.plugins.link.getSelectedLink(a)||b.data.element;c.isReadOnly()||(c.is("a")?(b.data.dialog=!c.getAttribute("name")||c.getAttribute("href")&&c.getChildCount()?"link":"anchor",b.data.link=c):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,c)&&(b.data.dialog="anchor"))},null,
716null,0);a.on("doubleclick",function(b){b.data.dialog in{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},null,null,20);a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu,command:"anchor",group:"anchor",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&
717a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var c={};b.getAttribute("href")&&b.getChildCount()&&(c={link:CKEDITOR.TRISTATE_OFF,unlink:CKEDITOR.TRISTATE_OFF});b&&b.hasAttribute("name")&&(c.anchor=c.removeAnchor=CKEDITOR.TRISTATE_OFF);return c});this.compiledProtectionFunction=e(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?
718b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var h=/^javascript:/,m=/^mailto:([^?]+)(?:\?(.+))?$/,l=/subject=([^;?:@&=$,\/]*)/i,c=/body=([^;?:@&=$,\/]*)/i,k=/^#(.*)$/,d=/^((?:http|https|ftp|news):\/\/)?(.*)$/,f=/^(_(?:self|top|parent|blank))$/,
719q=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,u=/^javascript:([^(]+)\(([^)]+)\)$/,v=/\s*window.open\(\s*this\.href\s*,\
vendor: 6,869 bytes, lines 719-732
719s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/,x=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,t={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};
720CKEDITOR.plugins.link={getSelectedLink:function(a){var b=a.getSelection(),c=b.getSelectedElement();return c&&c.is("a")?c:(b=b.getRanges()[0])?(b.shrink(CKEDITOR.SHRINK_TEXT),a.elementPath(b.getCommonAncestor()).contains("a",1)):null},getEditorAnchors:function(a){for(var b=a.editable(),c=b.isInline()&&!a.plugins.divarea?a.document:b,b=c.getElementsByTag("a"),c=c.getElementsByTag("img"),d=[],e=0,h;h=b.getItem(e++);)(h.data("cke-saved-name")||h.hasAttribute("name"))&&d.push({name:h.data("cke-saved-name")||
721h.getAttribute("name"),id:h.getAttribute("id")});for(e=0;h=c.getItem(e++);)(h=this.tryRestoreFakeAnchor(a,h))&&d.push({name:h.getAttribute("name"),id:h.getAttribute("id")});return d},fakeAnchor:!0,tryRestoreFakeAnchor:function(a,b){if(b&&b.data("cke-real-element-type")&&"anchor"==b.data("cke-real-element-type")){var c=a.restoreRealElement(b);if(c.data("cke-saved-name"))return c}},parseLinkAttributes:function(a,b){var e=b&&(b.data("cke-saved-href")||b.getAttribute("href"))||"",g=a.plugins.link.compiledProtectionFunction,
722p=a.config.emailProtection,z,D={};e.match(h)&&("encode"==p?e=e.replace(q,function(a,b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):p&&e.replace(u,function(a,b,c){if(b==g.name){D.type="email";a=D.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,e,h,f=0;f<d;f++)e=decodeURIComponent,h=c[f].replace(b,"").replace(/\\'/g,"'"),h=e(h),e=g.params[f].toLowerCase(),a[e]=h;a.address=[a.name,a.domain].join("@")}}));if(!D.type)if(p=e.match(k))D.type=
723"anchor",D.anchor={},D.anchor.name=D.anchor.id=p[1];else if(p=e.match(m)){z=e.match(l);e=e.match(c);D.type="email";var y=D.email={};y.address=p[1];z&&(y.subject=decodeURIComponent(z[1]));e&&(y.body=decodeURIComponent(e[1]))}else e&&(z=e.match(d))&&(D.type="url",D.url={},D.url.protocol=z[1],D.url.url=z[2]);if(b){if(e=b.getAttribute("target"))D.target={type:e.match(f)?e:"frame",name:e};else if(e=(e=b.data("cke-pa-onclick")||b.getAttribute("onclick"))&&e.match(v))for(D.target={type:"popup",name:e[1]};p=
724x.exec(e[2]);)"yes"!=p[2]&&"1"!=p[2]||p[1]in{height:1,width:1,top:1,left:1}?isFinite(p[2])&&(D.target[p[1]]=p[2]):D.target[p[1]]=!0;null!==b.getAttribute("download")&&(D.download=!0);var e={},B;for(B in t)(p=b.getAttribute(B))&&(e[t[B]]=p);if(B=b.data("cke-saved-name")||e.advName)e.advName=B;CKEDITOR.tools.isEmpty(e)||(D.advanced=e)}return D},getLinkAttributes:function(c,d){var e=c.config.emailProtection||"",h={};switch(d.type){case "url":var e=d.url&&void 0!==d.url.protocol?d.url.protocol:"http://",
725f=d.url&&CKEDITOR.tools.trim(d.url.url)||"";h["data-cke-saved-href"]=0===f.indexOf("/")?f:e+f;break;case "anchor":e=d.anchor&&d.anchor.id;h["data-cke-saved-href"]="#"+(d.anchor&&d.anchor.name||e||"");break;case "email":var k=d.email,f=k.address;switch(e){case "":case "encode":var l=encodeURIComponent(k.subject||""),m=encodeURIComponent(k.body||""),k=[];l&&k.push("subject\x3d"+l);m&&k.push("body\x3d"+m);k=k.length?"?"+k.join("\x26"):"";"encode"==e?(e=["javascript:void(location.href\x3d'mailto:'+",
726g(f)],k&&e.push("+'",a(k),"'"),e.push(")")):e=["mailto:",f,k];break;default:e=f.split("@",2),k.name=e[0],k.domain=e[1],e=["javascript:",b(c,k)]}h["data-cke-saved-href"]=e.join("")}if(d.target)if("popup"==d.target.type){for(var e=["window.open(this.href, '",d.target.name||"","', '"],x="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),f=x.length,l=function(a){d.target[a]&&x.push(a+"\x3d"+d.target[a])},k=0;k<f;k++)x[k]+=d.target[x[k]]?"\x3dyes":"\x3dno";l("width");
727l("left");l("height");l("top");e.push(x.join(","),"'); return false;");h["data-cke-pa-onclick"]=e.join("")}else"notSet"!=d.target.type&&d.target.name&&(h.target=d.target.name);d.download&&(h.download="");if(d.advanced){for(var q in t)(e=d.advanced[t[q]])&&(h[q]=e);h.name&&(h["data-cke-saved-name"]=h.name)}h["data-cke-saved-href"]&&(h.href=h["data-cke-saved-href"]);q={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};d.advanced&&CKEDITOR.tools.extend(q,t);for(var v in h)delete q[v];
728return{set:h,removed:CKEDITOR.tools.objectKeys(q)}},showDisplayTextForElement:function(a,b){var c={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1};return b.widgets&&b.widgets.focused?!1:!a||!a.getName||!a.is(c)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){var b=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(b)},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant("a",!0);
729c&&"a"==c.getName()&&c.getAttribute("href")&&c.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)},contextSensitive:1,startDisabled:1,requiredContent:"a[href]"};CKEDITOR.removeAnchorCommand=function(){};CKEDITOR.removeAnchorCommand.prototype={exec:function(a){var b=a.getSelection(),c=b.createBookmarks(),d;if(b&&(d=b.getSelectedElement())&&(d.getChildCount()?d.is("a"):CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,d)))d.remove(1);else if(d=CKEDITOR.plugins.link.getSelectedLink(a))d.hasAttribute("href")?
730(d.removeAttributes({name:1,"data-cke-saved-name":1}),d.removeClass("cke_anchor")):d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0})}(),function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-gb":1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,
731mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(a){var g=this;a.addCommand("a11yHelp",{exec:function(){var b=a.langCode,b=g.availableLangs[b]?b:g.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(g.path+"dialogs/lang/"+b+".js"),function(){a.lang.a11yhelp=g.langEntries[b];a.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,
732canUndo:!1});a.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");a.on("ariaEditorHelpLabel",function(b){b.data.label=a.lang.common.editorHelp})}})}(),function(){function a(a){if(!a||a.type!=CKEDITOR.NODE_ELEMENT||"form"!=a.getName())return[];for(var b=[],c=["style","className"],e=0;e<c.length;e++){var d=a.$.elements.namedItem(c[e]);
vendor: 21,964 bytes, lines 732-775
732d&&(d=new CKEDITOR.dom.element(d),b.push([d,d.nextSibling]),d.remove())}return b}function g(a,b){if(a&&a.type==CKEDITOR.NODE_ELEMENT&&
733"form"==a.getName()&&0<b.length)for(var c=b.length-1;0<=c;c--){var e=b[c][0],d=b[c][1];d?e.insertBefore(d):e.appendTo(a)}}function b(b,e){var c=a(b),h={},d=b.$;e||(h["class"]=d.className||"",d.className="");h.inline=d.style.cssText||"";e||(d.style.cssText="position: static; overflow: visible");g(c);return h}function e(b,e){var c=a(b),h=b.$;"class"in e&&(h.className=e["class"]);"inline"in e&&(h.style.cssText=e.inline);g(c)}function h(a){if(!a.editable().isInline()){var b=CKEDITOR.instances,c;for(c in b){var e=
734b[c];"wysiwyg"!=e.mode||e.readOnly||(e=e.document.getBody(),e.setAttribute("contentEditable",!1),e.setAttribute("contentEditable",!0))}a.editable().hasFocus&&(a.toolbox.focus(),a.focus())}}CKEDITOR.plugins.add("maximize",{init:function(a){function g(){var b=d.getViewPaneSize();a.resize(b.width,b.height,null,!0)}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var c=a.lang,k=CKEDITOR.document,d=k.getWindow(),f,q,u,v=CKEDITOR.TRISTATE_OFF;a.addCommand("maximize",{modes:{wysiwyg:!CKEDITOR.env.iOS,source:!CKEDITOR.env.iOS},
735readOnly:1,editorFocus:!1,exec:function(){var x=a.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}),t=a.ui.space("contents");if("wysiwyg"==a.mode){var r=a.getSelection();f=r&&r.getRanges();q=d.getScrollPosition()}else{var n=a.editable().$;f=!CKEDITOR.env.ie&&[n.selectionStart,n.selectionEnd];q=[n.scrollLeft,n.scrollTop]}if(this.state==CKEDITOR.TRISTATE_OFF){d.on("resize",g);u=d.getScrollPosition();for(r=a.container;r=r.getParent();)r.setCustomData("maximize_saved_styles",
736b(r)),r.setStyle("z-index",a.config.baseFloatZIndex-5);t.setCustomData("maximize_saved_styles",b(t,!0));x.setCustomData("maximize_saved_styles",b(x,!0));t={overflow:CKEDITOR.env.webkit?"":"hidden",width:0,height:0};k.getDocumentElement().setStyles(t);!CKEDITOR.env.gecko&&k.getDocumentElement().setStyle("position","fixed");CKEDITOR.env.gecko&&CKEDITOR.env.quirks||k.getBody().setStyles(t);CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(0,0)},0):d.$.scrollTo(0,0);x.setStyle("position",CKEDITOR.env.gecko&&
737CKEDITOR.env.quirks?"fixed":"absolute");x.$.offsetLeft;x.setStyles({"z-index":a.config.baseFloatZIndex-5,left:"0px",top:"0px"});x.addClass("cke_maximized");g();t=x.getDocumentPosition();x.setStyles({left:-1*t.x+"px",top:-1*t.y+"px"});CKEDITOR.env.gecko&&h(a)}else if(this.state==CKEDITOR.TRISTATE_ON){d.removeListener("resize",g);for(var r=[t,x],w=0;w<r.length;w++)e(r[w],r[w].getCustomData("maximize_saved_styles")),r[w].removeCustomData("maximize_saved_styles");for(r=a.container;r=r.getParent();)e(r,
738r.getCustomData("maximize_saved_styles")),r.removeCustomData("maximize_saved_styles");CKEDITOR.env.ie?setTimeout(function(){d.$.scrollTo(u.x,u.y)},0):d.$.scrollTo(u.x,u.y);x.removeClass("cke_maximized");CKEDITOR.env.webkit&&(x.setStyle("display","inline"),setTimeout(function(){x.setStyle("display","block")},0));a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:t.$.offsetHeight,outerWidth:a.container.$.offsetWidth})}this.toggleState();if(r=this.uiItems[0])t=this.state==CKEDITOR.TRISTATE_OFF?
739c.maximize.maximize:c.maximize.minimize,r=CKEDITOR.document.getById(r._.id),r.getChild(1).setHtml(t),r.setAttribute("title",t),r.setAttribute("href",'javascript:void("'+t+'");');"wysiwyg"==a.mode?f?(CKEDITOR.env.gecko&&h(a),a.getSelection().selectRanges(f),(n=a.getSelection().getStartElement())&&n.scrollIntoView(!0)):d.$.scrollTo(q.x,q.y):(f&&(n.selectionStart=f[0],n.selectionEnd=f[1]),n.scrollLeft=q[0],n.scrollTop=q[1]);f=q=null;v=this.state;a.fire("maximize",this.state)},canUndo:!1});a.ui.addButton&&
740a.ui.addButton("Maximize",{label:c.maximize.maximize,command:"maximize",toolbar:"tools,10"});a.on("mode",function(){var b=a.getCommand("maximize");b.setState(b.state==CKEDITOR.TRISTATE_DISABLED?CKEDITOR.TRISTATE_DISABLED:v)},null,null,100)}}})}(),function(){function a(a){function b(a){var d=!1;f.attachListener(f,"keydown",function(){var b=c.getBody().getElementsByTag(a);if(!d){for(var e=0;e<b.count();e++)b.getItem(e).setCustomData("retain",!0);d=!0}},null,null,1);f.attachListener(f,"keyup",function(){var b=
741c.getElementsByTag(a);d&&(1!=b.count()||b.getItem(0).getCustomData("retain")||b.getItem(0).hasAttribute("data-cke-temp")||b.getItem(0).remove(1),d=!1)})}var e=this.editor,c=a.document,k=c.body,d=c.getElementById("cke_actscrpt");d&&d.parentNode.removeChild(d);(d=c.getElementById("cke_shimscrpt"))&&d.parentNode.removeChild(d);(d=c.getElementById("cke_basetagscrpt"))&&d.parentNode.removeChild(d);k.contentEditable=!0;CKEDITOR.env.ie&&(k.hideFocus=!0,k.disabled=!0,k.removeAttribute("disabled"));delete this._.isLoadingData;
742this.$=k;c=new CKEDITOR.dom.document(c);this.setup();this.fixInitialSelection();var f=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&c.getDocumentElement().addClass(c.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&e.enterMode!=CKEDITOR.ENTER_P?b("p"):CKEDITOR.env.edge&&e.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)c.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){e.editable().focus()})});
743g(e);try{e.document.$.execCommand("2D-position",!1,!0)}catch(q){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==e.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b=a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){e.getSelection().scrollIntoView()},0);else if(e.window.$.innerHeight>this.$.offsetHeight){var c=e.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&
744this.attachListener(c,"blur",function(){try{c.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(c,"touchend",function(){a.focus()});k=e.document.getElementsByTag("title").getItem(0);k.data("cke-title",k.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)},
7450,this)}function g(a){function b(){var c;a.editable().attachListener(a,"selectionChange",function(){var b=a.getSelection().getSelectedElement();b&&(c&&(c.detachEvent("onresizestart",e),c=null),b.$.attachEvent("onresizestart",e),c=b.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var c=a.document.$;c.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);c.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(g){}else CKEDITOR.env.ie&&11>
746CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function b(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var b=[],e;for(e in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+e+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));
747a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var e;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(b){function g(c){c&&c.removeListener();a.editable(new e(a,k.$.contentWindow.document.body));a.setData(a.getData(1),b)}var c="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+
748")();":"")+"document.close();",c=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(c)+"}())":"",k=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+c+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');k.setStyles({width:"100%",height:"100%"});k.addClass("cke_wysiwyg_frame").addClass("cke_reset");c=a.ui.space("contents");c.append(k);var d=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(d)k.on("load",g);var f=a.title,
749q=a.fire("ariaEditorHelpLabel",{}).label;f&&(CKEDITOR.env.ie&&q&&(f+=", "+q),k.setAttribute("title",f));if(q){var f=CKEDITOR.tools.getNextId(),u=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+q+"\x3c/span\x3e");c.append(u,1);k.setAttribute("aria-describedby",f)}a.on("beforeModeUnload",function(a){a.removeListener();u&&u.remove()});k.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&g();a.fire("ariaWidget",k)})}});CKEDITOR.editor.prototype.addContentsCss=
750function(a){var b=this.config,e=b.contentsCss;CKEDITOR.tools.isArray(e)||(b.contentsCss=e?[e]:[]);b.contentsCss.push(a)};e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(a,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var g=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),g.fire("dataReady");
751else{this._.isLoadingData=!0;g._.dataStore={id:1};var c=g.config,k=c.fullPage,d=c.docType,f=CKEDITOR.tools.buildStyleHtml(b()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');k||(f+=CKEDITOR.tools.buildStyleHtml(g.config.contentsCss));var q=c.baseHref?'\x3cbase href\x3d"'+c.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";k&&(a=a.replace(/<!DOCTYPE[^>]*>/i,function(a){g.docType=d=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){g.xmlDeclaration=a;return""}));a=g.dataProcessor.toHtml(a);k?(/<body[\s|>]/.test(a)||
752(a="\x3cbody\x3e"+a),/<html[\s|>]/.test(a)||(a="\x3chtml\x3e"+a+"\x3c/html\x3e"),/<head[\s|>]/.test(a)?/<title[\s|>]/.test(a)||(a=a.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):a=a.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"),q&&(a=a.replace(/<head[^>]*?>/,"$\x26"+q)),a=a.replace(/<\/head\s*>/,f+"$\x26"),a=d+a):a=c.docType+'\x3chtml dir\x3d"'+c.contentsLangDirection+'" lang\x3d"'+(c.contentsLanguage||g.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+
753this._.docTitle+"\x3c/title\x3e"+q+f+"\x3c/head\x3e\x3cbody"+(c.bodyId?' id\x3d"'+c.bodyId+'"':"")+(c.bodyClass?' class\x3d"'+c.bodyClass+'"':"")+"\x3e"+a+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(a=a.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&&(a=a.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));c='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+
754this._.frameLoadedHandler+",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(c+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e');q&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');
755a=a.replace(/(?=\s*<\/(:?head)>)/,c);this.clearCustomData();this.clearListeners();g.fire("contentDomUnload");var u=this.getDocument();try{u.write(a)}catch(v){setTimeout(function(){u.write(a)},0)}}},getData:function(a){if(a)return this.getHtml();a=this.editor;var b=a.config,e=b.fullPage,c=e&&a.docType,g=e&&a.xmlDeclaration,d=this.getDocument(),e=e?d.getDocumentElement().getOuterHtml():d.getBody().getHtml();CKEDITOR.env.gecko&&b.enterMode!=CKEDITOR.ENTER_BR&&(e=e.replace(/<br>(?=\s*(:?$|<\/body>))/,
756""));e=a.dataProcessor.toDataFormat(e);g&&(e=g+"\n"+e);c&&(e=c+"\n"+e);return e},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:e.baseProto.focus.call(this)},detach:function(){var a=this.editor,b=a.document,g;try{g=a.window.getFrame()}catch(c){}e.baseProto.detach.call(this);this.clearCustomData();b.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);g&&g.getParent()?(g.clearCustomData(),(a=g.removeCustomData("onResize"))&&a.removeListener(),
757g.remove()):CKEDITOR.warn("editor-destroy-iframe")}}})}(),CKEDITOR.config.disableObjectResizing=!1,CKEDITOR.config.disableNativeTableHandles=!0,CKEDITOR.config.disableNativeSpellChecker=!0,CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function g(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var b=a.lang.table;a.addCommand("table",new CKEDITOR.dialogCommand("table",
758{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+(a.plugins.dialogadvtab?"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(a){a.styles&&(a.styles.border&&a.styles.border.match(/solid/)&&(a.attributes.border=1),"collapse"==a.styles["border-collapse"]&&
759(a.attributes.cellspacing=0))}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",g()));a.addCommand("tableDelete",g({exec:function(a){var b=a.elementPath().contains("table",1);if(b){var g=b.getParent(),l=a.editable();1!=g.getChildCount()||g.is("td","th")||g.equals(l)||(b=g);a=a.createRange();a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START);b.remove();a.select()}}}));a.ui.addButton&&a.ui.addButton("Table",{label:b.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",
760this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");a.addMenuItems&&a.addMenuItems({table:{label:b.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:b.deleteTable,command:"tableDelete",group:"table",order:1}});a.on("doubleclick",function(a){a.data.element.is("table")&&(a.data.dialog="tableProperties")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),
761function(){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",
762'\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'),g=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');
763CKEDITOR.ui.panel.prototype={render:function(e,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("+
764e+");"},m)));a.getWindow().$.CKEDITOR=CKEDITOR;a.on("keydown",function(a){var b=a.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");this._.onKeyDown&&!1===this._.onKeyDown(b)?a.data.preventDefault():(27==b||b==("rtl"==c?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 m={editorId:e.id,id:this.id,langCode:e.langCode,
765dir:e.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":e.config.baseFloatZIndex+1};if(this.isFramed){var l=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";m.frame=g.output({id:this.id+"_frame",src:l})}l=a.output(m);h&&h.push(l);return l},addBlock:function(a,b){b=this._.blocks[a]=b instanceof CKEDITOR.ui.panel.block?b:new CKEDITOR.ui.panel.block(this.getHolderElement(),
766b);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,g=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");b&&b.hide();this._.currentBlock=a;CKEDITOR.fire("ariaWidget",g);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=
767CKEDITOR.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=
768a),CKEDITOR.env.webkit&&a.getDocument().getWindow().focus(),a.focus(),this.onMark&&this.onMark(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 g=this.keys[a];switch(g){case "next":for(var l=this._.focusIndex,g=this.element.getElementsByTag("a"),c;c=g.getItem(++l);)if(c.getAttribute("_cke_focus")&&c.$.offsetWidth){this._.focusIndex=l;c.focus();break}return c||
769b?!1:(this._.focusIndex=-1,this.onKeyDown(a,1));case "prev":l=this._.focusIndex;for(g=this.element.getElementsByTag("a");0<l&&(c=g.getItem(--l));){if(c.getAttribute("_cke_focus")&&c.$.offsetWidth){this._.focusIndex=l;c.focus();break}c=null}return c||b?!1:(this._.focusIndex=g.count(),this.onKeyDown(a,1));case "click":case "mouseup":return l=this._.focusIndex,(c=0<=l&&this.element.getElementsByTag("a").getItem(l))&&(c.$[g]?c.$[g]():c.$["on"+g]()),!1}return!0}}})}(),CKEDITOR.plugins.add("floatpanel",
770{requires:"panel"}),function(){function a(a,e,h,m,l){l=CKEDITOR.tools.genKey(e.getUniqueId(),h.getUniqueId(),a.lang.dir,a.uiColor||"",m.css||"",l||"");var c=g[l];c||(c=g[l]=new CKEDITOR.ui.panel(e,m),c.element=h.append(CKEDITOR.dom.element.createFromHtml(c.render(a),e)),c.element.setStyles({display:"none",position:"absolute"}));return c}var g={};CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(b,e,h,g){function l(){f.hide()}h.forceIFrame=1;h.toolbarRelated&&b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&
771(e=CKEDITOR.document.getById("cke_"+b.name));var c=e.getDocument();g=a(b,c,e,h,g||0);var k=g.element,d=k.getFirst(),f=this;k.disableContextMenu();this.element=k;this._={editor:b,panel:g,parentElement:e,definition:h,document:c,iframe:d,children:[],dir:b.lang.dir,showBlockParams:null};b.on("mode",l);b.on("resize",l);c.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(a,e){return this._.panel.addBlock(a,e)},addListBlock:function(a,e){return this._.panel.addListBlock(a,
772e)},getBlock:function(a){return this._.panel.getBlock(a)},showBlock:function(a,e,h,g,l,c){var k=this._.panel,d=k.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 q=this.element,f=this._.iframe,f=CKEDITOR.env.ie&&!CKEDITOR.env.edge?f:new CKEDITOR.dom.window(f.$.contentWindow),u=q.getDocument(),v=this._.parentElement.getPositionedAncestor(),
773x=e.getDocumentPosition(u),u=v?v.getDocumentPosition(u):{x:0,y:0},t="rtl"==this._.dir,r=x.x+(g||0)-u.x,n=x.y+(l||0)-u.y;!t||1!=h&&4!=h?t||2!=h&&3!=h||(r+=e.$.offsetWidth-1):r+=e.$.offsetWidth;if(3==h||4==h)n+=e.$.offsetHeight-1;this._.panel._.offsetParentId=e.getId();q.setStyles({top:n+"px",left:0,display:""});q.setOpacity(0);q.getFirst().removeStyle("width");this._.editor.focusManager.add(f);this._.blurSet||(CKEDITOR.event.useCapture=!0,f.on("blur",function(a){function b(){delete this._.returnFocus;
774this.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,
775this._.blurSet=1);
vendor: 5,018 bytes, lines 775-784
775k.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=q;a.removeStyle("width");if(d.autoSize){var b=d.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge?d.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=d.element.$.scrollHeight;CKEDITOR.env.ie&&
776CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");k._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");t&&(r-=q.$.offsetWidth);q.setStyle("left",r+"px");var b=k.element.getWindow(),a=q.$.getBoundingClientRect(),b=b.getViewPaneSize(),e=a.width||a.right-a.left,f=a.height||a.bottom-a.top,h=t?a.right:b.width-a.left,g=t?b.width-a.right:a.left;t?h<e&&(r=g>e?r+e:b.width>e?r-a.left:r-a.right+b.width):
777h<e&&(r=g>e?r-e:b.width>e?r-a.right+b.width:r-a.left);e=a.top;b.height-a.top<f&&(n=e>f?n-f:b.height>f?n-a.bottom+b.height:n-a.top);CKEDITOR.env.ie&&(b=a=new CKEDITOR.dom.element(q.$.offsetParent),"html"==b.getName()&&(b=b.getDocument().getBody()),"rtl"==b.getComputedStyle("direction")&&(r=CKEDITOR.env.ie8Compat?r-2*q.getDocument().getDocumentElement().$.scrollLeft:r-(a.$.scrollWidth-a.$.clientWidth)));var a=q.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",
778this);q.setStyles({top:n+"px",left:r+"px"});q.setOpacity(1);c&&c()},this);k.isLoaded?a():k.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();d.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);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;
779this.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();
780this.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 e=this._.panel;void 0!==a&&(e.allowBlur=a);return e.allowBlur},showAsChild:function(a,e,h,g,l,c){if(this._.activeChild!=a||a._.panel._.offsetParentId!=h.getId())this.hideChild(),a.onHide=
781CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(e,h,g,l,c),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var e=this._.activeChild;e&&(delete e.onHide,delete this._.activeChild,e.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),
782e;for(e in g){var h=g[e];a?h.destroy():h.element.hide()}a&&(g={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var g=a.config.menu_groups.split(","),b=a._.menuGroups={},e=a._.menuItems={},h=0;h<g.length;h++)b[g[h]]=h+1;a.addMenuGroup=function(a,e){b[a]=e||100};a.addMenuItem=function(a,h){b[h.group]&&(e[a]=new CKEDITOR.menuItem(this,a,h))};a.addMenuItems=function(a){for(var b in a)this.addMenuItem(b,a[b])};a.getMenuItem=function(a){return e[a]};a.removeMenuItem=
783function(a){delete e[a]}}}),function(){function a(a){a.sort(function(a,b){return a.group<b.group?-1:a.group>b.group?1:a.order<b.order?-1:a.order>b.order?1:0})}var g='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"';
784CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(g+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(g+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');var g=g+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});
vendor: 13,078 bytes, lines 784-810
784" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),b=CKEDITOR.addTemplate("menuItem",
785g+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e'),e=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),
786h=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),e=c.block.attributes=c.attributes||{};!e.role&&(e.role="menu");this._.panelDefinition=
787c},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),e=this._.listeners;this.removeAll();for(var d=0;d<e.length;d++){var f=e[d](b,a,c);if(f)for(var h in f){var g=this.editor.getMenuItem(h);!g||g.command&&!this.editor.getCommand(g.command).state||(g.state=f[h],this.add(g))}}},onClick:function(a){this.hide();if(a.onClick)a.onClick();else a.command&&this.editor.execCommand(a.command)},onEscape:function(a){var b=this.parent;b?b._.panel.hideChild(1):
78827==a&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(a){var b=this._.subMenu,c=this.items[a];if(c=c.getItems&&c.getItems()){b?b.removeAll():(b=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({},this._.definition,{level:this._.level+1},!0)),b.parent=this,b._.onClick=CKEDITOR.tools.bind(this._.onClick,this));for(var e in c){var d=this.editor.getMenuItem(e);d&&(d.state=c[e],b.add(d))}var f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+
789String(a));setTimeout(function(){b.show(f,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(a){a.order||(a.order=this.items.length);this.items.push(a)},removeAll:function(){this.items=[]},show:function(b,e,c,h){if(!this.parent&&(this._.onShow(),!this.items.length))return;e=e||("rtl"==this.editor.lang.dir?2:1);var d=this.items,f=this.editor,g=this._.panel,u=this._.element;if(!g){g=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);
790g.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);g.onShow=function(){g._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};g.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);u=g.addBlock(this.id,this._.panelDefinition.block);u.autoSize=!0;var v=u.keys;v[40]="next";v[9]="next";v[38]="prev";v[CKEDITOR.SHIFT+9]="prev";v["rtl"==f.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";v[32]=CKEDITOR.env.ie?"mouseup":
791"click";CKEDITOR.env.ie&&(v[13]="mouseup");u=this._.element=u.element;v=u.getDocument();v.getBody().setStyle("overflow","hidden");v.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu,f.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);
792this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}a(d);for(var v=f.elementPath(),v=['\x3cdiv class\x3d"cke_menu'+(v&&v.direction()!=f.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'],x=d.length,t=x&&d[0].group,r=0;r<x;r++){var n=d[r];t!=n.group&&(v.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),
793t=n.group);n.render(this,r,v)}v.push("\x3c/div\x3e");u.setHtml(v.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(g,this.id,b,e,c,h):g.showBlock(this.id,b,e,c,h);f.fire("menuShow",[g])},addListener:function(a){this._.listeners.push(a)},hide:function(a){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(a)}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(a,b,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+b});this.group=
794a._.menuGroups[this.group];this.editor=a;this.name=b},proto:{render:function(a,g,c){var k=a.id+String(g),d="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF:this.state,f="",q=this.editor,u,v,x=d==CKEDITOR.TRISTATE_ON?"on":d==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(f=' aria-checked\x3d"'+(d==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var t=this.getItems,r="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",n=this.name;this.icon&&!/\./.test(this.icon)&&
795(n=this.icon);this.command&&(u=q.getCommand(this.command),(u=q.getCommandKeystroke(u))&&(v=CKEDITOR.tools.keystrokeToString(q.lang.common.keyboard,u)));a={id:k,name:this.name,iconName:n,label:this.label,cls:this.className||"",state:x,hasPopup:t?"true":"false",disabled:d==CKEDITOR.TRISTATE_DISABLED,title:this.label+(v?" ("+v.display+")":""),ariaShortcut:v?q.lang.common.keyboardShortcut+" "+v.aria:"",href:"javascript:void('"+(this.label||"").replace("'")+"')",hoverFn:a._.itemOverFn,moveOutFn:a._.itemOutFn,
796clickFn:a._.itemClickFn,index:g,iconStyle:CKEDITOR.skin.getIconStyle(n,"rtl"==this.editor.lang.dir,n==this.icon?null:this.icon,this.iconOffset),shortcutHtml:v?h.output({shortcut:v.display}):"",arrowHtml:t?e.output({label:r}):"",role:this.role?this.role:"menuitem",ariaChecked:f};b.output(a,c)}}})}(),CKEDITOR.config.menu_groups="clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div",
797CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu,$:function(a){this.base.call(this,a,{panel:{className:"cke_menu_panel",attributes:{"aria-label":a.lang.contextmenu.options}}})},proto:{addTarget:function(a,g){a.on("contextmenu",function(a){a=a.data;var e=CKEDITOR.env.webkit?b:CKEDITOR.env.mac?a.$.metaKey:a.$.ctrlKey;if(!g||!e){a.preventDefault();if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var e=this.editor,
798l=(new CKEDITOR.dom.elementPath(a.getTarget(),e.editable())).contains(function(a){return a.hasAttribute("contenteditable")},!0);l&&"false"==l.getAttribute("contenteditable")&&e.getSelection().fake(l)}var l=a.getTarget().getDocument(),c=a.getTarget().getDocument().getDocumentElement(),e=!l.equals(CKEDITOR.document),l=l.getWindow().getScrollPosition(),k=e?a.$.clientX:a.$.pageX||l.x+a.$.clientX,d=e?a.$.clientY:a.$.pageY||l.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(c,null,k,d)},CKEDITOR.env.ie?
799200:0,this)}},this);if(CKEDITOR.env.webkit){var b,e=function(){b=0};a.on("keydown",function(a){b=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",e);a.on("contextmenu",e)}},open:function(a,g,b,e){this.editor.focus();a=a||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1);this.show(a,g,b,e)}}})},beforeInit:function(a){var g=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){g.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});
800a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),function(){function a(a){function b(a){0<c.length||a.type!=CKEDITOR.NODE_ELEMENT||!u.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(d,a,"selected_cell",!0),c.push(a))}a=a.getRanges();for(var c=[],d={},e=0;e<a.length;e++){var f=a[e];if(f.collapsed)f=f.getCommonAncestor(),
801(f=f.getAscendant("td",!0)||f.getAscendant("th",!0))&&c.push(f);else{var f=new CKEDITOR.dom.walker(f),h;for(f.guard=b;h=f.next();)h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.table)||(h=h.getAscendant("td",!0)||h.getAscendant("th",!0))&&!h.getCustomData("selected_cell")&&(CKEDITOR.dom.element.setMarker(d,h,"selected_cell",!0),c.push(h))}}CKEDITOR.dom.element.clearAllMarkers(d);return c}function g(b,c){for(var d=a(b),e=d[0],f=e.getAscendant("table"),e=e.getDocument(),h=d[0].getParent(),g=h.$.rowIndex,
802d=d[d.length-1],k=d.getParent().$.rowIndex+d.$.rowSpan-1,d=new CKEDITOR.dom.element(f.$.rows[k]),g=c?g:k,h=c?h:d,d=CKEDITOR.tools.buildTableMap(f),f=d[g],g=c?d[g-1]:d[g+1],d=d[0].length,e=e.createElement("tr"),k=0;f[k]&&k<d;k++){var l;1<f[k].rowSpan&&g&&f[k]==g[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.appendBogus(),e.append(l),l=l.$);k+=l.colSpan-1}c?e.insertBefore(h):e.insertAfter(h)}function b(c){if(c instanceof CKEDITOR.dom.selection){var d=
803a(c),e=d[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e);c=d[0].getParent().$.rowIndex;for(var d=d[d.length-1],h=d.getParent().$.rowIndex+d.$.rowSpan-1,d=[],g=c;g<=h;g++){for(var k=f[g],l=new CKEDITOR.dom.element(e.$.rows[g]),m=0;m<k.length;m++){var q=new CKEDITOR.dom.element(k[m]),u=q.getParent().$.rowIndex;1==q.$.rowSpan?q.remove():(--q.$.rowSpan,u==g&&(u=f[g+1],u[m-1]?q.insertAfter(new CKEDITOR.dom.element(u[m-1])):(new CKEDITOR.dom.element(e.$.rows[g+1])).append(q,1)));m+=q.$.colSpan-
8041}d.push(l)}f=e.$.rows;e=new CKEDITOR.dom.element(f[h+1]||(0<c?f[c-1]:null)||e.$.parentNode);for(g=d.length;0<=g;g--)b(d[g]);return e}c instanceof CKEDITOR.dom.element&&(e=c.getAscendant("table"),1==e.$.rows.length?e.remove():c.remove());return null}function e(a,b){for(var c=b?Infinity:0,d=0;d<a.length;d++){var e;e=a[d];for(var f=b,h=e.getParent().$.cells,g=0,k=0;k<h.length;k++){var l=h[k],g=g+(f?1:l.colSpan);if(l==e.$)break}e=g-1;if(b?e<c:e>c)c=e}return c}function h(b,c){for(var d=a(b),f=d[0].getAscendant("table"),
805h=e(d,1),d=e(d),h=c?h:d,g=CKEDITOR.tools.buildTableMap(f),f=[],d=[],k=g.length,l=0;l<k;l++)f.push(g[l][h]),d.push(c?g[l][h-1]:g[l][h+1]);for(l=0;l<k;l++)f[l]&&(1<f[l].colSpan&&d[l]==f[l]?(h=f[l],h.colSpan+=1):(h=(new CKEDITOR.dom.element(f[l])).clone(),h.removeAttribute("colSpan"),h.appendBogus(),h[c?"insertBefore":"insertAfter"].call(h,new CKEDITOR.dom.element(f[l])),h=h.$),l+=h.rowSpan-1)}function m(a,b){var c=a.getStartElement();if(c=c.getAscendant("td",1)||c.getAscendant("th",1)){var d=c.clone();
806d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function l(b){if(b instanceof CKEDITOR.dom.selection){b=a(b);var d=b[0]&&b[0].getAscendant("table"),e;a:{var f=0;e=b.length-1;for(var h={},g,k;g=b[f++];)CKEDITOR.dom.element.setMarker(h,g,"delete_cell",!0);for(f=0;g=b[f++];)if((k=g.getPrevious())&&!k.getCustomData("delete_cell")||(k=g.getNext())&&!k.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(h);e=k;break a}CKEDITOR.dom.element.clearAllMarkers(h);k=b[0].getParent();(k=k.getPrevious())?
807e=k.getLast():(k=b[e].getParent(),e=(k=k.getNext())?k.getChild(0):null)}for(k=b.length-1;0<=k;k--)l(b[k]);e?c(e,!0):d&&d.remove()}else b instanceof CKEDITOR.dom.element&&(d=b.getParent(),1==d.getChildCount()?d.remove():b.remove())}function c(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function k(a,b,
808c){a=a[b];if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function d(b,c,d){var e=a(b),f;if((c?1!=e.length:2>e.length)||(f=b.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;var h;b=e[0];f=b.getAscendant("table");var g=CKEDITOR.tools.buildTableMap(f),l=g.length,m=g[0].length,q=b.getParent().$.rowIndex,u=k(g,q,b);if(c){var B;try{var C=parseInt(b.getAttribute("rowspan"),
80910)||1;h=parseInt(b.getAttribute("colspan"),10)||1;B=g["up"==c?q-C:"down"==c?q+C:q]["left"==c?u-h:"right"==c?u+h:u]}catch(E){return!1}if(!B||b.$==B)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(B))}c=b.getDocument();var F=q,C=B=0,I=!d&&new CKEDITOR.dom.documentFragment(c),H=0;for(c=0;c<e.length;c++){h=e[c];var J=h.getParent(),L=h.getFirst(),G=h.$.colSpan,S=h.$.rowSpan,J=J.$.rowIndex,O=k(g,J,h),H=H+G*S,C=Math.max(C,O-u+G);B=Math.max(B,J-q+S);d||(G=h,(S=G.getBogus())&&S.remove(),
810G.trim(),h.getChildren().count()&&(J==F||!L||L.isBlockBoundary&&L.isBlockBoundary({br:1}
810)||(F=I.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!F||F.is&&F.is("br")||I.append("br")),h.moveChildren(I)),c?h.remove():h.setHtml(""));F=J}if(d)return B*C==H;I.moveChildren(b);b.appendBogus();C>=m?b.removeAttribute("rowSpan"):b.$.rowSpan=B;B>=l?b.removeAttribute("colSpan"):b.$.colSpan=C;d=new CKEDITOR.dom.nodeList(f.$.rows);e=d.count();for(c=e-1;0<=c;c--)f=d.getItem(c),f.$.cells.length||(f.remove(),e++);return b}
811function f(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),g=e.$.rowIndex,l=k(h,g,d),m=d.$.rowSpan,q;if(1<m){q=Math.ceil(m/2);for(var m=Math.floor(m/2),e=g+q,f=new CKEDITOR.dom.element(f.$.rows[e]),h=k(h,e),u,e=d.clone(),g=0;g<h.length;g++)if(u=h[g],u.parentNode==f.$&&g>l){e.insertBefore(new CKEDITOR.dom.element(u));break}else u=null;u||f.append(e)}else for(m=q=1,f=e.clone(),f.insertAfter(e),f.append(e=d.clone()),
812u=k(h,g),l=0;l<u.length;l++)u[l].rowSpan++;e.appendBogus();d.$.rowSpan=q;e.$.rowSpan=m;1==q&&d.removeAttribute("rowSpan");1==m&&e.removeAttribute("rowSpan");return e}function q(b,c){var d=a(b);if(1<d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),f=CKEDITOR.tools.buildTableMap(f),h=k(f,e.$.rowIndex,d),g=d.$.colSpan;if(1<g)e=Math.ceil(g/2),g=Math.floor(g/2);else{for(var g=e=1,l=[],m=0;m<f.length;m++){var q=f[m];l.push(q[h]);1<q[h].rowSpan&&(m+=q[h].rowSpan-1)}for(f=
8130;f<l.length;f++)l[f].colSpan++}f=d.clone();f.insertAfter(d);f.appendBogus();d.$.colSpan=e;f.$.colSpan=g;1==e&&d.removeAttribute("colSpan");1==g&&f.removeAttribute("colSpan");return f}var u=/^(?:td|th)$/;CKEDITOR.plugins.tabletools={requires:"table,dialog,contextmenu",init:function(e){function k(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function t(a,b){var c=e.addCommand(a,
814b);e.addFeature(c)}var r=e.lang.table;t("cellProperties",new CKEDITOR.dialogCommand("cellProperties",k({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:"table",contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&a.styles.background.match(/^(#[a-fA-F0-9]{3,6}|rgb\([\d, ]+\)|\w+)$/)},right:function(a){a.styles["background-color"]=a.styles.background}}]]})));CKEDITOR.dialog.add("cellProperties",
815this.path+"dialogs/tableCell.js");t("rowDelete",k({requiredContent:"table",exec:function(a){a=a.getSelection();c(b(a))}}));t("rowInsertBefore",k({requiredContent:"table",exec:function(a){a=a.getSelection();g(a,!0)}}));t("rowInsertAfter",k({requiredContent:"table",exec:function(a){a=a.getSelection();g(a)}}));t("columnDelete",k({requiredContent:"table",exec:function(b){b=b.getSelection();b=a(b);var d=b[0],e=b[b.length-1];b=d.getAscendant("table");for(var f=CKEDITOR.tools.buildTableMap(b),h,g,k=[],l=
8160,m=f.length;l<m;l++)for(var r=0,t=f[l].length;r<t;r++)f[l][r]==d.$&&(h=r),f[l][r]==e.$&&(g=r);for(l=h;l<=g;l++)for(r=0;r<f.length;r++)e=f[r],d=new CKEDITOR.dom.element(b.$.rows[r]),e=new CKEDITOR.dom.element(e[l]),e.$&&(1==e.$.colSpan?e.remove():--e.$.colSpan,r+=e.$.rowSpan-1,d.$.cells.length||k.push(d));g=b.$.rows[0]&&b.$.rows[0].cells;h=new CKEDITOR.dom.element(g[h]||(h?g[h-1]:b.$.parentNode));k.length==m&&b.remove();h&&c(h,!0)}}));t("columnInsertBefore",k({requiredContent:"table",exec:function(a){a=
817a.getSelection();h(a,!0)}}));t("columnInsertAfter",k({requiredContent:"table",exec:function(a){a=a.getSelection();h(a)}}));t("cellDelete",k({requiredContent:"table",exec:function(a){a=a.getSelection();l(a)}}));t("cellMerge",k({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a){c(d(a.getSelection()),!0)}}));t("cellMergeRight",k({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){c(d(a.getSelection(),"right"),!0)}}));t("cellMergeDown",
818k({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){c(d(a.getSelection(),"down"),!0)}}));t("cellVerticalSplit",k({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){c(q(a.getSelection()))}}));t("cellHorizontalSplit",k({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){c(f(a.getSelection()))}}));t("cellInsertBefore",k({requiredContent:"table",exec:function(a){a=a.getSelection();m(a,!0)}}));t("cellInsertAfter",k({requiredContent:"table",
819exec:function(a){a=a.getSelection();m(a)}}));e.addMenuItems&&e.addMenuItems({tablecell:{label:r.cell.menu,group:"tablecell",order:1,getItems:function(){var b=e.getSelection(),c=a(b);return{tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:d(b,null,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:d(b,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:d(b,
820"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:q(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:f(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_properties:0<c.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED}}},tablecell_insertBefore:{label:r.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:r.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",
821order:10},tablecell_delete:{label:r.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:r.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:r.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:r.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:r.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:r.cell.splitVertical,
822group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:r.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:r.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF,tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:r.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:r.row.insertAfter,
823group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:r.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:r.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF,tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:r.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:r.column.insertAfter,
824group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:r.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});e.contextMenu&&e.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF,tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getSelectedCells:a};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)}(),CKEDITOR.tools.buildTableMap=function(a){a=
825a.$.rows;for(var g=-1,b=[],e=0;e<a.length;e++){g++;!b[g]&&(b[g]=[]);for(var h=-1,m=0;m<a[e].cells.length;m++){var l=a[e].cells[m];for(h++;b[g][h];)h++;for(var c=isNaN(l.colSpan)?1:l.colSpan,l=isNaN(l.rowSpan)?1:l.rowSpan,k=0;k<l;k++){b[g+k]||(b[g+k]=[]);for(var d=0;d<c;d++)b[g+k][h+d]=a[e].cells[m]}h+=c-1}}return b},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'),
826g=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'),
827e=/\'/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 e=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(e["aria-multiselectable"]=!0);!e.role&&(e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";
vendor: 20,315 bytes, lines 827-866
827e[CKEDITOR.SHIFT+
8289]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=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,
829b,l){var c=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=c;var k;k=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:c,val:k,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||a),text:b||a};this._.pendingList.push(g.output(a))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(b.output({id:e,
830label: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")},
831showAll:function(){var a=this._.items,b=this._.groups,e=this.element.getDocument(),c;for(c in a)e.getById(a[c]).setStyle("display","");for(var g in b)a=e.getById(b[g]),c=a.getNext(),a.setStyle("display",""),c&&"ul"==c.getName()&&c.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)},
832unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var e=b.getById(a);e.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),e;for(e in a){var c=a[e];b.getById(c).removeClass("cke_selected");b.getById(c+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},
833focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),e,c=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++c);){if(a.equals(e)){this._.focusIndex=c;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),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}"';
834CKEDITOR.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}"'),
835a=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',g=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,
836CKEDITOR.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 m(){var b=a.mode;b&&(b=this.modes[b]?void 0!==n[b]?n[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:
837b,this.setState(b),this.refresh&&this.refresh())}var l=CKEDITOR.env,c=this._.id=CKEDITOR.tools.getNextId(),k="",d=this.command,f,q,u;this._.editor=a;var v={id:c,button:this,editor:a,focus:function(){CKEDITOR.document.getById(c).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},x=CKEDITOR.tools.addFunction(function(a){if(v.onkey)return a=new CKEDITOR.dom.event(a),!1!==v.onkey(v,a.getKeystroke())}),t=CKEDITOR.tools.addFunction(function(a){var b;v.onfocus&&
838(b=!1!==v.onfocus(v,new CKEDITOR.dom.event(a)));return b}),r=0;v.clickFn=f=CKEDITOR.tools.addFunction(function(){r&&(a.unlockSelection(1),r=0);v.execute();l.iOS&&a.focus()});if(this.modes){var n={};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(n[a.mode]=this._.state)},this);a.on("activeFilterChange",m,this);a.on("mode",m,this);!this.readOnly&&a.on("readOnly",m,this)}else d&&(d=a.getCommand(d))&&(d.on("state",function(){this.setState(d.state)},this),k+=d.state==
839CKEDITOR.TRISTATE_ON?"on":d.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(w,"rtl"==b,this.icon,this.iconOffset))},this);d?(q=a.getCommandKeystroke(d))&&(u=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,q)):k+="off";var w=q=this.name||
840this.command;this.icon&&!/\./.test(this.icon)&&(w=this.icon,this.icon=null);k={id:c,name:q,iconName:w,label:this.label,cls:this.className||"",state:k,ariaDisabled:"disabled"==k?"true":"false",title:this.title+(u?" ("+u.display+")":""),ariaShortcut:u?a.lang.common.keyboardShortcut+" "+u.aria:"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:x,focusFn:t,clickFn:f,style:CKEDITOR.skin.getIconStyle(w,"rtl"==a.lang.dir,this.icon,this.iconOffset),
841arrowHtml:this.hasArrow?g.output():""};b.output(k,h);if(this.onRender)this.onRender();return v},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)):
842a==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)}}(),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO,
843CKEDITOR.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&&
844(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'+
845(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),g=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";
846a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var e=[];this.render(a,e);return e.join("")},render:function(a,e){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 m=
847CKEDITOR.env,l="cke_"+this.id,c=CKEDITOR.tools.addFunction(function(c){u&&(a.unlockSelection(1),u=0);d.execute(c)},this),k=this,d={id:l,combo:this,focus:function(){CKEDITOR.document.getById(l).getChild(1).focus()},execute:function(c){var d=k._;if(d.state!=CKEDITOR.TRISTATE_DISABLED)if(k.createPanel(a),d.on)d.panel.hide();else{k.commit();var e=k.getValue();e?d.list.mark(e):d.list.unmarkAll();d.panel.showBlock(k.id,new CKEDITOR.dom.element(c),4)}},clickFn:c};a.on("activeFilterChange",h,this);a.on("mode",
848h,this);a.on("selectionChange",h,this);!this.readOnly&&a.on("readOnly",h,this);var f=CKEDITOR.tools.addFunction(function(e,f){e=new CKEDITOR.dom.event(e);var h=e.getKeystroke();if(40==h)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(h){case 13:case 32:case 40:CKEDITOR.tools.callFunction(c,f);break;default:d.onkey(d,h)}e.preventDefault()}),q=CKEDITOR.tools.addFunction(function(){d.onfocus&&d.onfocus()}),u=0;d.keyDownFn=f;m={id:l,name:this.name||this.command,label:this.label,
849title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:f,focusFn:q,clickFn:c};g.output(m,e);if(this.onRender)this.onRender();return d},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,h=this._.panelDefinition.block,g=e.parent||CKEDITOR.document.getBody(),l="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(a,g,e),k=c.addListBlock(this.id,h),d=this;c.onShow=function(){this.element.addClass(l);d.setState(CKEDITOR.TRISTATE_ON);
850d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen();a.once("panelShow",function(){k.focus(!k.multiSelect&&d.getValue())})};c.onHide=function(c){this.element.removeClass(l);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!c&&d.onClose)d.onClose()};c.onEscape=function(){c.hide(1)};k.onClick=function(a,b){d.onClick&&d.onClick.call(d,a,b);c.hide()};this._.panel=c;this._.list=k;c.getBlock(this.id).onHide=function(){d._.on=
8510;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var h=this.document.getById("cke_"+this.id+"_text");h&&(a||e?h.removeClass("cke_combo_inlinelabel"):(e=this.label,h.addClass("cke_combo_inlinelabel")),h.setText("undefined"!=typeof e?e: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)},
852showAll:function(){this._.list.showAll()},add:function(a,e,h){this._.items[a]=h||a;this._.list.add(a,e,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 e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",!0):e.removeAttribute("aria-disabled");this._.state=
853a}},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,e){this.add(a,CKEDITOR.UI_RICHCOMBO,e)}}(),function(){function a(a,e,h,m,l,c,k,d){var f=a.config,q=new CKEDITOR.style(k),
854u=l.split(";");l=[];for(var v={},x=0;x<u.length;x++){var t=u[x];if(t){var t=t.split("/"),r={},n=u[x]=t[0];r[h]=l[x]=t[1]||n;v[n]=new CKEDITOR.style(k,r);v[n]._.definition.name=n}else u.splice(x--,1)}a.ui.addRichCombo(e,{label:m.label,title:m.panelTitle,toolbar:"styles,"+d,allowedContent:q,requiredContent:q,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(" ");
855a.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":m.panelTitle}},init:function(){this.startGroup(m.panelTitle);for(var a=0;a<u.length;a++){var b=u[a];this.add(b,
856v[b].buildPreview(),b)}},onClick:function(c){a.focus();a.fire("saveSnapshot");var d=this.getValue(),e=v[c];if(d&&c!=d){var f=v[d],h=a.getSelection().getRanges()[0];if(h.collapsed){var k=a.elementPath(),l=k.contains(function(a){return f.checkElementRemovable(a)});if(l){var m=h.checkBoundaryOfElement(l,CKEDITOR.START),n=h.checkBoundaryOfElement(l,CKEDITOR.END);if(m&&n){for(m=h.createBookmark();k=l.getFirst();)k.insertBefore(l);l.remove();h.moveToBookmark(m)}else m||n?h.moveToPosition(l,m?CKEDITOR.POSITION_BEFORE_START:
857CKEDITOR.POSITION_AFTER_END):(h.splitElement(l),h.moveToPosition(l,CKEDITOR.POSITION_AFTER_END)),g(h,k.elements.slice(),l);a.getSelection().selectRanges([h])}}else a.removeStyle(f)}a[d==c?"removeStyle":"applyStyle"](e);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(d){var e=this.getValue();d=d.data.path.elements;for(var f=0,h;f<d.length;f++){h=d[f];for(var g in v)if(v[g].checkElementMatch(h,!0,a)){g!=e&&this.setValue(g);return}}this.setValue("",c)},this)},refresh:function(){a.activeFilter.check(q)||
858this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function g(a,e,h){var m=e.pop();if(m){if(h)return g(a,e,m.equals(h)?null:h);h=m.clone();a.insertNode(h);a.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);g(a,e)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(b){var e=b.config;a(b,"Font","family",b.lang.font,e.font_names,e.font_defaultLabel,e.font_style,30);a(b,"FontSize","size",b.lang.font.fontSize,e.fontSize_sizes,e.fontSize_defaultLabel,e.fontSize_style,40)}})}(),CKEDITOR.config.font_names=
859"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",
860attributes:{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("find",{requires:"dialog",init:function(a){var g=a.addCommand("find",new CKEDITOR.dialogCommand("find"));g.canUndo=!1;g.readOnly=
8611;a.addCommand("replace",new CKEDITOR.dialogCommand("replace")).canUndo=!1;a.ui.addButton&&(a.ui.addButton("Find",{label:a.lang.find.find,command:"find",toolbar:"find,10"}),a.ui.addButton("Replace",{label:a.lang.find.replace,command:"replace",toolbar:"find,20"}));CKEDITOR.dialog.add("find",this.path+"dialogs/find.js");CKEDITOR.dialog.add("replace",this.path+"dialogs/find.js")}}),CKEDITOR.config.find_highlight={element:"span",styles:{"background-color":"#004",color:"#fff"}},CKEDITOR.plugins.add("resize",
862{init:function(a){function g(b){var h=k.width,g=k.height,l=h+(b.data.$.screenX-c.x)*("rtl"==m?-1:1);b=g+(b.data.$.screenY-c.y);d&&(h=Math.max(e.resize_minWidth,Math.min(l,e.resize_maxWidth)));f&&(g=Math.max(e.resize_minHeight,Math.min(b,e.resize_maxHeight)));a.resize(d?h:null,g)}function b(){CKEDITOR.document.removeListener("mousemove",g);CKEDITOR.document.removeListener("mouseup",b);a.document&&(a.document.removeListener("mousemove",g),a.document.removeListener("mouseup",b))}var e=a.config,h=a.ui.spaceId("resizer"),
863m=a.element?a.element.getDirection(1):"ltr";!e.resize_dir&&(e.resize_dir="vertical");void 0===e.resize_maxWidth&&(e.resize_maxWidth=3E3);void 0===e.resize_maxHeight&&(e.resize_maxHeight=3E3);void 0===e.resize_minWidth&&(e.resize_minWidth=750);void 0===e.resize_minHeight&&(e.resize_minHeight=250);if(!1!==e.resize_enabled){var l=null,c,k,d=("both"==e.resize_dir||"horizontal"==e.resize_dir)&&e.resize_minWidth!=e.resize_maxWidth,f=("both"==e.resize_dir||"vertical"==e.resize_dir)&&e.resize_minHeight!=
864e.resize_maxHeight,q=CKEDITOR.tools.addFunction(function(d){l||(l=a.getResizable());k={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0};c={x:d.screenX,y:d.screenY};e.resize_minWidth>k.width&&(e.resize_minWidth=k.width);e.resize_minHeight>k.height&&(e.resize_minHeight=k.height);CKEDITOR.document.on("mousemove",g);CKEDITOR.document.on("mouseup",b);a.document&&(a.document.on("mousemove",g),a.document.on("mouseup",b));d.preventDefault&&d.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(q)});
865a.on("uiSpace",function(b){if("bottom"==b.data.space){var c="";d&&!f&&(c=" cke_resizer_horizontal");!d&&f&&(c=" cke_resizer_vertical");var e='\x3cspan id\x3d"'+h+'" class\x3d"cke_resizer'+c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event)"\x3e'+("ltr"==m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?b.data.html+=e:b.data.html=e+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==
866CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(a){var g=a.config,b=a.lang.stylescombo,e={},h=[],m=[];a.on("stylesSet",function(b){if(b=b.data.styles){for(var c,k,d,f=0,q=b.length;f<q;f++)(c=b[f],a.blockless&&c.element in CKEDITOR.dtd.$block||"string"==typeof c.type&&!CKEDITOR.style.customHandlers[c.type]||(k=c.name,c=new CKEDITOR.style(c),a.filter.customConfig&&!
vendor: 10,259 bytes, lines 866-886
866a.filter.check(c)))||(c._name=k,c._.enterMode=g.enterMode,
867c._.type=d=c.assignedTo||c.type,c._.weight=f+1E3*(d==CKEDITOR.STYLE_OBJECT?1:d==CKEDITOR.STYLE_BLOCK?2:3),e[k]=c,h.push(c),m.push(c));h.sort(function(a,b){return a._.weight-b._.weight})}});a.ui.addRichCombo("Styles",{label:b.label,title:b.panelTitle,toolbar:"styles,10",allowedContent:m,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(g.contentsCss),multiSelect:!0,attributes:{"aria-label":b.panelTitle}},init:function(){var a,c,e,d,f,g;f=0;for(g=h.length;f<g;f++)a=h[f],c=a._name,d=a._.type,d!=e&&
868(this.startGroup(b["panelTitle"+String(d)]),e=d),this.add(c,a.type==CKEDITOR.STYLE_OBJECT?c:a.buildPreview(),c);this.commit()},onClick:function(b){a.focus();a.fire("saveSnapshot");b=e[b];var c=a.elementPath();if(b.group&&b.removeStylesFromSameGroup(a))a.applyStyle(b);else a[b.checkActive(c,a)?"removeStyle":"applyStyle"](b);a.fire("saveSnapshot")},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path.elements;for(var h=0,d=b.length,f;h<d;h++){f=b[h];for(var g in e)if(e[g].checkElementRemovable(f,
869!0,a)){g!=c&&this.setValue(g);return}}this.setValue("")},this)},onOpen:function(){var h=a.getSelection().getSelectedElement(),h=a.elementPath(h),c=[0,0,0,0];this.showAll();this.unmarkAll();for(var g in e){var d=e[g],f=d._.type;d.checkApplicable(h,a,a.activeFilter)?c[f]++:this.hideItem(g);d.checkActive(h,a)&&this.mark(g)}c[CKEDITOR.STYLE_BLOCK]||this.hideGroup(b["panelTitle"+String(CKEDITOR.STYLE_BLOCK)]);c[CKEDITOR.STYLE_INLINE]||this.hideGroup(b["panelTitle"+String(CKEDITOR.STYLE_INLINE)]);c[CKEDITOR.STYLE_OBJECT]||
870this.hideGroup(b["panelTitle"+String(CKEDITOR.STYLE_OBJECT)])},refresh:function(){var b=a.elementPath();if(b){for(var c in e)if(e[c].checkApplicable(b,a,a.activeFilter))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}},reset:function(){e={};h=[]}})}})}(),function(){function a(a){return{editorFocus:!1,canUndo:!1,modes:{wysiwyg:1},exec:function(b){if(b.editable().hasFocus){var e=b.getSelection(),c;if(c=(new CKEDITOR.dom.elementPath(e.getCommonAncestor(),e.root)).contains({td:1,th:1},1)){var e=b.createRange(),
871g=CKEDITOR.tools.tryThese(function(){var b=c.getParent().$.cells[c.$.cellIndex+(a?-1:1)];b.parentNode.parentNode;return b},function(){var b=c.getParent(),b=b.getAscendant("table").$.rows[b.$.rowIndex+(a?-1:1)];return b.cells[a?b.cells.length-1:0]});if(g||a)if(g)g=new CKEDITOR.dom.element(g),e.moveToElementEditStart(g),e.checkStartOfBlock()&&e.checkEndOfBlock()||e.selectNodeContents(g);else return!0;else{for(var d=c.getAscendant("table").$,g=c.getParent().$.cells,d=new CKEDITOR.dom.element(d.insertRow(-1),
872b.document),f=0,q=g.length;f<q;f++)d.append((new CKEDITOR.dom.element(g[f],b.document)).clone(!1,!1)).appendBogus();e.moveToElementEditStart(d)}e.select(!0);return!0}}return!1}}}var g={editorFocus:!1,modes:{wysiwyg:1,source:1}},b={exec:function(a){a.container.focusNext(!0,a.tabIndex)}},e={exec:function(a){a.container.focusPrevious(!0,a.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(h){for(var m=!1!==h.config.enableTabKeyTools,l=h.config.tabSpaces||0,c="";l--;)c+=" ";if(c)h.on("key",function(a){9==
873a.data.keyCode&&(h.insertText(c),a.cancel())});if(m)h.on("key",function(a){(9==a.data.keyCode&&h.execCommand("selectNextCell")||a.data.keyCode==CKEDITOR.SHIFT+9&&h.execCommand("selectPreviousCell"))&&a.cancel()});h.addCommand("blur",CKEDITOR.tools.extend(b,g));h.addCommand("blurBack",CKEDITOR.tools.extend(e,g));h.addCommand("selectNextCell",a());h.addCommand("selectPreviousCell",a(!0))}})}(),CKEDITOR.dom.element.prototype.focusNext=function(a,g){var b=void 0===g?this.getTabIndex():g,e,h,m,l,c,k;if(0>=
874b)for(c=this.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);c;){if(c.isVisible()&&0===c.getTabIndex()){m=c;break}c=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(c=this.getDocument().getBody().getFirst();c=c.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!h&&c.equals(this)){if(h=!0,a){if(!(c=c.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else h&&!this.contains(c)&&(e=1);if(c.isVisible()&&!(0>(k=c.getTabIndex()))){if(e&&k==b){m=c;break}k>b&&(!m||!l||k<l)?(m=c,l=k):m||0!==k||
875(m=c,l=k)}}m&&m.focus()},CKEDITOR.dom.element.prototype.focusPrevious=function(a,g){for(var b=void 0===g?this.getTabIndex():g,e,h,m,l=0,c,k=this.getDocument().getBody().getLast();k=k.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!h&&k.equals(this)){if(h=!0,a){if(!(k=k.getPreviousSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else h&&!this.contains(k)&&(e=1);if(k.isVisible()&&!(0>(c=k.getTabIndex())))if(0>=b){if(e&&0===c){m=k;break}c>l&&(m=k,l=c)}else{if(e&&c==b){m=k;break}c<b&&(!m||
876c>l)&&(m=k,l=c)}}m&&m.focus()},function(){function a(a,b){function l(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 c(){d&&d.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete f.list}var k=a.ui.spaceId("path"),d,f=a._.elementsPath,
877q=f.idBase;b.html+='\x3cspan id\x3d"'+k+'_label" class\x3d"cke_voice_label"\x3e'+a.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+k+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+k+'_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=l;var u=CKEDITOR.tools.addFunction(l),v=CKEDITOR.tools.addFunction(function(b,c){var d=f.idBase,e;c=new CKEDITOR.dom.event(c);
878e="rtl"==a.lang.dir;switch(c.getKeystroke()){case e?39:37:case 9:return(e=CKEDITOR.document.getById(d+(b+1)))||(e=CKEDITOR.document.getById(d+"0")),e.focus(),!1;case e?37:39:case CKEDITOR.SHIFT+9:return(e=CKEDITOR.document.getById(d+(b-1)))||(e=CKEDITOR.document.getById(d+(f.list.length-1))),e.focus(),!1;case 27:return a.focus(),!1;case 13:case 32:return l(b),!1}return!0});a.on("selectionChange",function(){for(var b=[],c=f.list=[],g=[],l=f.filters,m=!0,A=a.elementPath().elements,p,z=A.length;z--;){var D=
879A[z],y=0;p=D.data("cke-display-name")?D.data("cke-display-name"):D.data("cke-real-element-type")?D.data("cke-real-element-type"):D.getName();(m=D.hasAttribute("contenteditable")?"true"==D.getAttribute("contenteditable"):m)||D.hasAttribute("contenteditable")||(y=1);for(var B=0;B<l.length;B++){var C=l[B](D,p);if(!1===C){y=1;break}p=C||p}y||(c.unshift(D),g.unshift(p))}c=c.length;for(l=0;l<c;l++)p=g[l],m=a.lang.elementspath.eleTitle.replace(/%1/,p),p=e.output({id:q+l,label:m,text:p,jsTitle:"javascript:void('"+
880p+"')",index:l,keyDownFn:v,clickFn:u}),b.unshift(p);d||(d=CKEDITOR.document.getById(k));g=d;g.setHtml(b.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');a.fire("elementsPathUpdate",{space:g})});a.on("readOnly",c);a.on("contentDomUnload",c);a.addCommand("elementsPathFocus",g.toolbarFocus);a.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")}var g={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(a){(a=CKEDITOR.document.getById(a._.elementsPath.idBase+"0"))&&a.focus(CKEDITOR.env.ie||
881CKEDITOR.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 e=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');
882CKEDITOR.plugins.add("elementspath",{init:function(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};b.on("uiSpace",function(e){"bottom"==e.data.space&&a(b,e.data)})}})}(),function(){var a={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[b]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",
883{modes:{wysiwyg:1},onLoad:function(){var a;a=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g,
884"cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(a)},init:function(g){var b=g.addCommand("showborders",a);b.canUndo=!1;!1!==g.config.startupShowBorders&&b.setState(CKEDITOR.TRISTATE_ON);g.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(g)},null,null,100);g.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(g)});g.on("removeFormatCleanup",function(a){a=a.data;g.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&a.is("table")&&(!a.hasAttribute("border")||
8850>=parseInt(a.getAttribute("border"),10))&&a.addClass("cke_show_border")})},afterInit:function(a){var b=a.dataProcessor;a=b&&b.dataFilter;b=b&&b.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"],g=parseInt(a.border,10);g&&!(0>=g)||b&&-1!=b.indexOf("cke_show_border")||(a["class"]=(b||"")+" cke_show_border")}}});b&&b.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/,
886""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.name;if("table"==b||"tableProperties"==b)if(a=a.data.definition,b=a.getContents("info").get("txtBorder"),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,g){a.apply(this,arguments);var l=parseInt(this.getValue(),10);g[!l||0>=l?"addClass":"removeClass"]("cke_show_border")}}
vendor: 7,460 bytes, lines 886-901
886),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this,
887arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,g){a.apply(this,arguments);parseInt(g.getAttribute("border"),10)||g.addClass("cke_show_border")}})})}(),CKEDITOR.plugins.add("htmlwriter",{init:function(a){var g=new CKEDITOR.htmlWriter;g.forceSimpleAmpersand=a.config.forceSimpleAmpersand;g.indentationChars=a.config.dataIndentationChars||"\t";a.dataProcessor.writer=g}}),CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,
888$: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,g;for(g in CKEDITOR.tools.extend({},a.$nonBodyContent,a.$block,a.$listItem,a.$tableContent))this.setRules(g,{indent:!a[g]["#"],breakBeforeOpen:1,breakBeforeClose:!a[g]["#"],breakAfterClose:1,needsSpace:g in a.$block&&!(g in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",
889{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(a){var g=this._.rules[a];this._.afterCloser&&g&&g.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():g&&g.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",a);this._.afterCloser=0},openTagClose:function(a,g){var b=this._.rules[a];g?(this._.output.push(this.selfClosingEnd),b&&
890b.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,g){"string"==typeof g&&(this.forceSimpleAmpersand&&(g=g.replace(/&amp;/g,"\x26")),g=CKEDITOR.tools.htmlEncodeAttr(g));this._.output.push(" ",a,'\x3d"',g,'"')},closeTag:function(a){var g=this._.rules[a];g&&g.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));
891this._.indent?this.indentation():g&&g.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",a,"\x3e");"pre"==a&&(this._.inPre=0);g&&g.breakAfterClose&&(this.lineBreak(),this._.needsSpace=g.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&&
8920<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,g){var b=this._.rules[a];b?CKEDITOR.tools.extend(b,g,!0):this._.rules[a]=g}}}),CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",
893CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var g=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),b=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),e=CKEDITOR.plugins.removeformat.filter,
894h=a.getSelection().getRanges(),m=h.createIterator(),l=function(a){return a.type==CKEDITOR.NODE_ELEMENT},c;c=m.getNextRange();){c.collapsed||c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var k=c.createBookmark(),d=k.startNode,f=k.endNode,q=function(b){for(var c=a.elementPath(b),d=c.elements,f=1,h;(h=d[f])&&!h.equals(c.block)&&!h.equals(c.blockLimit);f++)g.test(h.getName())&&e(a,h)&&b.breakParent(h)};q(d);if(f)for(q(f),d=d.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);d&&!d.equals(f);)if(d.isReadOnly()){if(d.getPosition(f)&
895CKEDITOR.POSITION_CONTAINS)break;d=d.getNext(l)}else q=d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==d.getName()&&d.data("cke-realelement")||!e(a,d)||(g.test(d.getName())?d.remove(1):(d.removeAttributes(b),a.fire("removeFormatCleanup",d))),d=q;c.moveToBookmark(k)}a.forceNextSelectionCheck();a.getSelection().selectRanges(h)}}},filter:function(a,g){for(var b=a._.removeFormatFilters||[],e=0;e<b.length;e++)if(!1===b[e](g))return!1;return!0}},CKEDITOR.editor.prototype.addRemoveFormatFilter=function(a){this._.removeFormatFilters||
896(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(a)},CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var",CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign",CKEDITOR.plugins.add("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),
8974))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(g){var b=g.panel||{};delete g.panel;this.base(g);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 e=this._.panelDefinition,h=this._.panelDefinition.block,
898m=e.parent||CKEDITOR.document.getBody(),l=this._.panel=new CKEDITOR.ui.floatPanel(a,m,e),e=l.addBlock(b.id,h),c=this;l.onShow=function(){c.className&&this.element.addClass(c.className+"_panel");c.setState(CKEDITOR.TRISTATE_ON);b.on=1;c.editorFocus&&a.focus();if(c.onOpen)c.onOpen()};l.onHide=function(e){c.className&&this.element.getFirst().removeClass(c.className+"_panel");c.setState(c.modes&&c.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b.on=0;if(!e&&c.onClose)c.onClose()};l.onEscape=
899function(){l.hide(1);c.document.getById(b.id).focus()};if(this.onBlock)this.onBlock(l,e);e.onHide=function(){b.on=0;c.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}),CKEDITOR.UI_PANELBUTTON="panelbutton",CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(a){function g(c,d,e,g,l){var v=new CKEDITOR.style(h["colorButton_"+d+"Style"]),x=CKEDITOR.tools.getNextId()+"_colorBox";l=l||
900{};a.ui.add(c,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+g,allowedContent:v,requiredContent:v,contentTransformations:l.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox","aria-label":m.panelTitle}},onBlock:function(c,e){e.autoSize=!0;e.element.addClass("cke_colorblock");e.element.setHtml(b(c,d,x));e.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var f=e.keys,h="rtl"==
901a.lang.dir;f[h?37:39]="next";f[40]="next";f[9]="next";f[h?39:37]="prev";f[38]="prev";
901f[CKEDITOR.SHIFT+9]="prev";f[32]="click"},refresh:function(){a.activeFilter.check(v)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var b=a.getSelection(),b=b&&b.getStartElement(),b=a.elementPath(b),c;if(b){b=b.block||b.blockLimit||a.document.getBody();do c=b&&b.getComputedStyle("back"==d?"background-color":"color")||"transparent";while("back"==d&&"transparent"==c&&b&&(b=b.getParent()));c&&"transparent"!=
902c||(c="#ffffff");!1!==h.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(x).setStyle("background-color",c);return c}}})}function b(b,c,f){var g=[],l=h.colorButton_colors.split(","),v=h.colorButton_colorsPerRow||6,x=a.plugins.colordialog&&!1!==h.colorButton_enableMore,t=l.length+(x?2:1),r=CKEDITOR.tools.addFunction(function(c,d){function f(a){this.removeListener("ok",f);this.removeListener("cancel",f);"ok"==a.name&&g(this.getContentElement("picker","selectedColor").getValue(),
903d)}var g=arguments.callee;if("?"==c)a.openDialog("colordialog",function(){this.on("ok",f);this.on("cancel",f)});else{a.focus();b.hide();a.fire("saveSnapshot");a.removeStyle(new CKEDITOR.style(h["colorButton_"+d+"Style"],{color:"inherit"}));if(c){var l=h["colorButton_"+d+"Style"];l.childRule="back"==d?function(a){return e(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||e(a)};a.applyStyle(new CKEDITOR.style(l,{color:c}))}a.fire("saveSnapshot")}});!1!==h.colorButton_enableAutomatic&&
904g.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',m.auto,'" onclick\x3d"CKEDITOR.tools.callFunction(',r,",null,'",c,"');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"'+v+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',f,'"\x3e\x3c/span\x3e',m.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");
905g.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(f=0;f<l.length;f++){0===f%v&&g.push("\x3c/tr\x3e\x3ctr\x3e");var n=l[f].split("/"),w=n[0],A=n[1]||w;n[1]||(w="#"+w.replace(/^(.)(.)(.)$/,"$1$1$2$2$3$3"));n=a.lang.colorbutton.colors[A]||A;g.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',n,'" onclick\x3d"CKEDITOR.tools.callFunction(',r,",'",w,"','",c,"'); return false;\" href\x3d\"javascript:void('",n,'\')" role\x3d"option" aria-posinset\x3d"',
906f+2,'" aria-setsize\x3d"',t,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',A,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}x&&g.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+v+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',m.more,'" onclick\x3d"CKEDITOR.tools.callFunction(',r,",'?','",c,"');return false;\" href\x3d\"javascript:void('",m.more,"')\"",' role\x3d"option" aria-posinset\x3d"',t,'" aria-setsize\x3d"',t,'"\x3e',m.more,
907"\x3c/a\x3e\x3c/td\x3e");g.push("\x3c/tr\x3e\x3c/table\x3e");return g.join("")}function e(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}var h=a.config,m=a.lang.colorbutton;if(!CKEDITOR.env.hc){g("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 l=
908{}
vendor: 8,718 bytes, lines 908-924
908,c=a.config.colorButton_normalizeBackground;if(void 0===c||c)l.contentTransformations=[[{element:"span",left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.objectKeys(a).length},right:function(b){var c=(new CKEDITOR.style(a.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=c.element;b.styles=c.styles;b.attributes=c.attributes||{};return b}}]];g("BGColor",
909"back",m.bgColorTitle,20,l)}}}),CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000",CKEDITOR.config.colorButton_foreStyle={element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]},CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}},CKEDITOR.plugins.add("format",{requires:"richcombo",
910init:function(a){if(!a.blockless){for(var g=a.config,b=a.lang.format,e=g.format_tags.split(";"),h={},m=0,l=[],c=0;c<e.length;c++){var k=e[c],d=new CKEDITOR.style(g["format_"+k]);if(!a.filter.customConfig||a.filter.check(d))m++,h[k]=d,h[k]._.enterMode=a.config.enterMode,l.push(d)}0!==m&&a.ui.addRichCombo("Format",{label:b.label,title:b.panelTitle,toolbar:"styles,20",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(g.contentsCss),multiSelect:!1,attributes:{"aria-label":b.panelTitle}},
911init:function(){this.startGroup(b.panelTitle);for(var a in h){var c=b["tag_"+a];this.add(a,h[a].buildPreview(c),c)}},onClick:function(b){a.focus();a.fire("saveSnapshot");b=h[b];var c=a.elementPath();a[b.checkActive(c,a)?"removeStyle":"applyStyle"](b);setTimeout(function(){a.fire("saveSnapshot")},0)},onRender:function(){a.on("selectionChange",function(b){var c=this.getValue();b=b.data.path;this.refresh();for(var d in h)if(h[d].checkActive(b,a)){d!=c&&this.setValue(d,a.lang.format["tag_"+d]);return}this.setValue("")},
912this)},onOpen:function(){this.showAll();for(var b in h)a.activeFilter.check(h[b])||this.hideItem(b)},refresh:function(){var b=a.elementPath();if(b){if(b.isContextFor("p"))for(var c in h)if(a.activeFilter.check(h[c]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}}),CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div",CKEDITOR.config.format_p={element:"p"},CKEDITOR.config.format_div={element:"div"},CKEDITOR.config.format_pre={element:"pre"},CKEDITOR.config.format_address={element:"address"},
913CKEDITOR.config.format_h1={element:"h1"},CKEDITOR.config.format_h2={element:"h2"},CKEDITOR.config.format_h3={element:"h3"},CKEDITOR.config.format_h4={element:"h4"},CKEDITOR.config.format_h5={element:"h5"},CKEDITOR.config.format_h6={element:"h6"},function(){function a(a,h){var m,l;h.on("refresh",function(a){var e=[g],d;for(d in a.data.states)e.push(a.data.states[d]);this.setState(CKEDITOR.tools.search(e,b)?b:g)},h,null,100);h.on("exec",function(b){m=a.getSelection();l=m.createBookmarks(1);b.data||
914(b.data={});b.data.done=!1},h,null,0);h.on("exec",function(){a.forceNextSelectionCheck();m.selectBookmarks(l)},h,null,100)}var g=CKEDITOR.TRISTATE_DISABLED,b=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var h=CKEDITOR.plugins.indent.genericDefinition;a(b,b.addCommand("indent",new h(!0)));a(b,b.addCommand("outdent",new h));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,
915command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",function(a){var h=b.createRange(),c=a.data.node;h.setStartBefore(c);h.setEndAfter(c);for(var g=new CKEDITOR.dom.walker(h),d;d=g.next();)if(d.type==CKEDITOR.NODE_ELEMENT)if(!d.equals(c)&&d.getDirection())h.setStartAfter(d),g=new CKEDITOR.dom.walker(h);else{var f=b.config.indentClasses;if(f)for(var q="ltr"==a.data.dir?["_rtl",""]:["","_rtl"],u=0;u<f.length;u++)d.hasClass(f[u]+q[0])&&(d.removeClass(f[u]+q[0]),d.addClass(f[u]+q[1]));
916f=d.getStyle("margin-right");q=d.getStyle("margin-left");f?d.setStyle("margin-left",f):d.removeStyle("margin-left");q?d.setStyle("margin-right",q):d.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(a){this.isIndent=!!a;this.startDisabled=!this.isIndent},specificDefinition:function(a,b,g){this.name=b;this.editor=a;this.jobs={};this.enterBr=a.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!g;this.relatedGlobal=g?"indent":"outdent";this.indentKey=g?9:CKEDITOR.SHIFT+
9179;this.database={}},registerCommands:function(a,b){a.on("pluginsLoaded",function(){for(var a in b)(function(a,b){var e=a.getCommand(b.relatedGlobal),d;for(d in b.jobs)e.on("exec",function(e){e.data.done||(a.fire("lockSnapshot"),b.execJob(a,d)&&(e.data.done=!0),a.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(b.database))},this,null,d),e.on("refresh",function(e){e.data.states||(e.data.states={});e.data.states[b.name+"@"+d]=b.refreshJob(a,d,e.data.path)},this,null,d);a.addFeature(b)})(this,
918b[a])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(a,b){var m=this.jobs[b];if(m.state!=g)return m.exec.call(this,a)},refreshJob:function(a,b,m){b=this.jobs[b];a.activeFilter.checkFeature(this)?b.state=b.refresh.call(this,a,m):b.state=g;return b.state},getContext:function(a){return a.contains(this.context)}}}(),function(){function a(a){function e(g){for(var k=m.startContainer,l=m.endContainer;k&&
919!k.getParent().equals(g);)k=k.getParent();for(;l&&!l.getParent().equals(g);)l=l.getParent();if(!k||!l)return!1;for(var t=k,k=[],p=!1;!p;)t.equals(l)&&(p=!0),k.push(t),t=t.getNext();if(1>k.length)return!1;t=g.getParents(!0);for(l=0;l<t.length;l++)if(t[l].getName&&h[t[l].getName()]){g=t[l];break}for(var t=d.isIndent?1:-1,l=k[0],k=k[k.length-1],p=CKEDITOR.plugins.list.listToArray(g,f),x=p[k.getCustomData("listarray_index")].indent,l=l.getCustomData("listarray_index");l<=k.getCustomData("listarray_index");l++)if(p[l].indent+=
920t,0<t){var u=p[l].parent;p[l].parent=new CKEDITOR.dom.element(u.getName(),u.getDocument())}for(l=k.getCustomData("listarray_index")+1;l<p.length&&p[l].indent>x;l++)p[l].indent+=t;k=CKEDITOR.plugins.list.arrayToList(p,f,null,a.config.enterMode,g.getDirection());if(!d.isIndent){var y;if((y=g.getParent())&&y.is("li"))for(var t=k.listNode.getChildren(),B=[],C,l=t.count()-1;0<=l;l--)(C=t.getItem(l))&&C.is&&C.is("li")&&B.push(C)}k&&k.listNode.replace(g);if(B&&B.length)for(l=0;l<B.length;l++){for(C=g=B[l];(C=
921C.getNext())&&C.is&&C.getName()in h;)CKEDITOR.env.needsNbspFiller&&!g.getFirst(b)&&g.append(m.document.createText(" ")),g.append(C);g.insertAfter(y)}k&&a.fire("contentDomInvalidated");return!0}for(var d=this,f=this.database,h=this.context,l=a.getSelection(),l=(l&&l.getRanges()).createIterator(),m;m=l.getNextRange();){for(var x=m.getCommonAncestor();x&&(x.type!=CKEDITOR.NODE_ELEMENT||!h[x.getName()]);){if(a.editable().equals(x)){x=!1;break}x=x.getParent()}x||(x=m.startPath().contains(h))&&m.setEndAt(x,
922CKEDITOR.POSITION_BEFORE_END);if(!x){var t=m.getEnclosedNode();t&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in h&&(m.setStartAt(t,CKEDITOR.POSITION_AFTER_START),m.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),x=t)}x&&m.startContainer.type==CKEDITOR.NODE_ELEMENT&&m.startContainer.getName()in h&&(t=new CKEDITOR.dom.walker(m),t.evaluator=g,m.startContainer=t.next());x&&m.endContainer.type==CKEDITOR.NODE_ELEMENT&&m.endContainer.getName()in h&&(t=new CKEDITOR.dom.walker(m),t.evaluator=g,m.endContainer=t.previous());
923if(x)return e(x)}return 0}function g(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")}function b(a){return e(a)&&h(a)}var e=CKEDITOR.dom.walker.whitespaces(!0),h=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function e(b){d.specificDefinition.apply(this,arguments);this.requiredContent=["ul","ol"];b.on("key",function(a){if("wysiwyg"==b.mode&&a.data.keyCode==this.indentKey){var c=this.getContext(b.elementPath());
924!c||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,b.elementPath(),c)||(b.execCommand(this.relatedGlobal),a.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?l:m}:function(a,b){return!this.getContext(b)||this.isIndent?m:l},exec:CKEDITOR.tools.bind(a,this)}}var d=CKEDITOR.plugins.indent;d.registerCommands(b,{indentlist:new e(b,
vendor: 4,565 bytes, lines 925-933
925"indentlist",!0),outdentlist:new e(b,"outdentlist")});CKEDITOR.tools.extend(e.prototype,d.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(a,b,d){var e=b.contains(g);d||(d=b.contains(a));return d&&e&&e.equals(d.getFirst(g))}}(),function(){function a(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||
926m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],h=0;h<b.contents.length;h++){var g=b.contents[h];(g=g.getAscendant("li",!0))&&!g.getCustomData("list_item_processed")&&(f.push(g),CKEDITOR.dom.element.setMarker(c,g,"list_item_processed",!0))}g=null;for(h=0;h<f.length;h++)g=f[h].getCustomData("listarray_index"),e[g].indent=-1;for(h=g+1;h<e.length;h++)if(e[h].indent>e[h-1].indent+1){f=e[h-1].indent+
9271-e[h].indent;for(g=e[h].indent;e[h]&&e[h].indent>=g;)e[h].indent+=f,h++;h--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function g(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function b(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](v);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":
928"insertAfter"](c):b.append(e,d)}function e(a){function c(d){var e=a[d?"getPrevious":"getNext"](f);e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(a.getName())&&(b(a,e,null,!d),a.remove(),a=e)}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 m(a,c,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var h=d.extractContents();c.trim(!1,!0);var g=c.createBookmark(),
929k=new CKEDITOR.dom.elementPath(c.startContainer),m=k.block,k=k.lastElement.getAscendant("li",1)||m,z=new CKEDITOR.dom.elementPath(d.startContainer),u=z.contains(CKEDITOR.dtd.$listItem),z=z.contains(CKEDITOR.dtd.$list);m?(m=m.getBogus())&&m.remove():z&&(m=z.getPrevious(f))&&q(m)&&m.remove();(m=h.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&m.is("br")&&m.remove();(m=c.startContainer.getChild(c.startOffset))?h.insertBefore(m):c.startContainer.append(h);u&&(h=l(u))&&(k.contains(u)?(b(h,u.getParent(),u),
930h.remove()):k.append(h));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){z=d.startPath();h=z.block;if(!h)break;h.is("li")&&(k=h.getParent(),h.equals(k.getLast(f))&&h.equals(k.getFirst(f))&&(h=k));d.moveToPosition(h,CKEDITOR.POSITION_BEFORE_START);h.remove()}d=d.clone();h=a.editable();d.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return f(a)&&!q(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&e(d);c.moveToBookmark(g);
931c.select();a.fire("saveSnapshot")}function l(a){return(a=a.getLast(f))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in c?a:null}var c={ol:1,ul:1},k=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(),f=function(a){return!(k(a)||d(a))},q=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,d,e,f){if(!c[a.getName()])return[];e||(e=0);d||(d=[]);for(var h=0,g=a.getChildCount();h<g;h++){var k=a.getChild(h);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&&
932CKEDITOR.plugins.list.listToArray(k,b,d,e+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:e,element:k,contents:[]};f?l.grandparent=f:(l.grandparent=a.getParent(),l.grandparent&&"li"==l.grandparent.$.nodeName.toLowerCase()&&(l.grandparent=l.grandparent.getParent()));b&&CKEDITOR.dom.element.setMarker(b,k,"listarray_index",d.length);d.push(l);for(var m=0,q=k.getChildCount(),u;m<q;m++)u=k.getChild(m),u.type==CKEDITOR.NODE_ELEMENT&&c[u.getName()]?CKEDITOR.plugins.list.listToArray(u,b,d,
933e+1,l.grandparent):l.contents.push(u)}}return d},arrayToList:function(a,b,e,h,g){e||(e=0);if(!a||a.length<e+1)return null;for(var k,l=a[e].parent.getDocument(),m=new CKEDITOR.dom.documentFragment(l),q=null,u=e,v=Math.max(a[e].indent,0),C=null,E,F,I=h==CKEDITOR.ENTER_P?"p":"div";;){var H=a[u];k=H.grandparent;E=H.element.getDirection(1);if(H.indent==v){q&&a[u].parent.getName()==q.getName()||(q=a[u].parent.clone(!1,1),g&&q.setAttribute("dir",g),m.append(q));C=q.append(H.element.clone(0,1));E!=q.getDirection(1)&&
vendor: 9,920 bytes, lines 934-953
934C.setAttribute("dir",E);for(k=0;k<H.contents.length;k++)C.append(H.contents[k].clone(1,1));u++}else if(H.indent==Math.max(v,0)+1)H=a[u-1].element.getDirection(1),u=CKEDITOR.plugins.list.arrayToList(a,null,u,h,H!=E?E:null),!C.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=l.$.documentMode&&C.append(l.createText(" ")),C.append(u.listNode),u=u.nextIndex;else if(-1==H.indent&&!e&&k){c[k.getName()]?(C=H.element.clone(!1,!0),E!=k.getDirection(1)&&C.setAttribute("dir",E)):C=new CKEDITOR.dom.documentFragment(l);
935var q=k.getDirection(1)!=E,J=H.element,L=J.getAttribute("class"),G=J.getAttribute("style"),S=C.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(h!=CKEDITOR.ENTER_BR||q||G||L),O,T=H.contents.length,M;for(k=0;k<T;k++)if(O=H.contents[k],d(O)&&1<T)S?M=O.clone(1,1):C.append(O.clone(1,1));else if(O.type==CKEDITOR.NODE_ELEMENT&&O.isBlockBoundary()){q&&!O.getDirection()&&O.setAttribute("dir",E);F=O;var V=J.getAttribute("style");V&&F.setAttribute("style",V.replace(/([^;])$/,"$1;")+(F.getAttribute("style")||""));L&&
936O.addClass(L);F=null;M&&(C.append(M),M=null);C.append(O.clone(1,1))}else S?(F||(F=l.createElement(I),C.append(F),q&&F.setAttribute("dir",E)),G&&F.setAttribute("style",G),L&&F.setAttribute("class",L),M&&(F.append(M),M=null),F.append(O.clone(1,1))):C.append(O.clone(1,1));M&&((F||C).append(M),M=null);C.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&u!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(E=C.getLast())&&E.type==CKEDITOR.NODE_ELEMENT&&E.is("br")&&E.remove(),(E=C.getLast(f))&&E.type==CKEDITOR.NODE_ELEMENT&&
937E.is(CKEDITOR.dtd.$block)||C.append(l.createElement("br")));E=C.$.nodeName.toLowerCase();"div"!=E&&"p"!=E||C.appendBogus();m.append(C);q=null;u++}else return null;F=null;if(a.length<=u||Math.max(a[u].indent,0)<v)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=h=void 0,h=e.getDirection()))){for(g=e.getParent();g&&!(l=g.getDirection());)g=g.getParent();h==l&&e.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:m,
938nextIndex:u}}};var u=/^h[1-6]$/,v=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);g.prototype={exec:function(b){this.refresh(b,b.elementPath());var d=b.config,h=b.getSelection(),g=h&&h.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var k=b.editable();if(k.getFirst(f)){var l=1==g.length&&g[0];(d=l&&l.getEnclosedNode())&&d.is&&this.type==d.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else d.enterMode==CKEDITOR.ENTER_BR?k.appendBogus():g[0].fixBlock(1,d.enterMode==CKEDITOR.ENTER_P?"p":"div"),
939h.selectRanges(g)}for(var d=h.createBookmarks(!0),k=[],m={},g=g.createIterator(),q=0;(l=g.getNextRange())&&++q;){var v=l.getBoundaryNodes(),y=v.startNode,B=v.endNode;y.type==CKEDITOR.NODE_ELEMENT&&"td"==y.getName()&&l.setStartAt(v.startNode,CKEDITOR.POSITION_AFTER_START);B.type==CKEDITOR.NODE_ELEMENT&&"td"==B.getName()&&l.setEndAt(v.endNode,CKEDITOR.POSITION_BEFORE_END);l=l.createIterator();for(l.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;v=l.getNextParagraph();)if(!v.getCustomData("list_block")){CKEDITOR.dom.element.setMarker(m,
940v,"list_block",1);for(var C=b.elementPath(v),y=C.elements,B=0,C=C.blockLimit,E,F=y.length-1;0<=F&&(E=y[F]);F--)if(c[E.getName()]&&C.contains(E)){C.removeCustomData("list_group_object_"+q);(y=E.getCustomData("list_group_object"))?y.contents.push(v):(y={root:E,contents:[v]},k.push(y),CKEDITOR.dom.element.setMarker(m,E,"list_group_object",y));B=1;break}B||(B=C,B.getCustomData("list_group_object_"+q)?B.getCustomData("list_group_object_"+q).contents.push(v):(y={root:B,contents:[v]},CKEDITOR.dom.element.setMarker(m,
941B,"list_group_object_"+q,y),k.push(y)))}}for(E=[];0<k.length;)if(y=k.shift(),this.state==CKEDITOR.TRISTATE_OFF)if(c[y.root.getName()]){g=b;q=y;y=m;l=E;B=CKEDITOR.plugins.list.listToArray(q.root,y);C=[];for(v=0;v<q.contents.length;v++)F=q.contents[v],(F=F.getAscendant("li",!0))&&!F.getCustomData("list_item_processed")&&(C.push(F),CKEDITOR.dom.element.setMarker(y,F,"list_item_processed",!0));for(var F=q.root.getDocument(),I=void 0,H=void 0,v=0;v<C.length;v++){var J=C[v].getCustomData("listarray_index"),
942I=B[J].parent;I.is(this.type)||(H=F.createElement(this.type),I.copyAttributes(H,{start:1,type:1}),H.removeStyle("list-style-type"),B[J].parent=H)}y=CKEDITOR.plugins.list.arrayToList(B,y,null,g.config.enterMode);B=void 0;C=y.listNode.getChildCount();for(v=0;v<C&&(B=y.listNode.getChild(v));v++)B.getName()==this.type&&l.push(B);y.listNode.replace(q.root);g.fire("contentDomInvalidated")}else{B=b;l=y;v=E;C=l.contents;g=l.root.getDocument();q=[];1==C.length&&C[0].equals(l.root)&&(y=g.createElement("div"),
943C[0].moveChildren&&C[0].moveChildren(y),C[0].append(y),C[0]=y);l=l.contents[0].getParent();for(F=0;F<C.length;F++)l=l.getCommonAncestor(C[F].getParent());I=B.config.useComputedState;B=y=void 0;I=void 0===I||I;for(F=0;F<C.length;F++)for(H=C[F];J=H.getParent();){if(J.equals(l)){q.push(H);!B&&H.getDirection()&&(B=1);H=H.getDirection(I);null!==y&&(y=y&&y!=H?null:H);break}H=J}if(!(1>q.length)){C=q[q.length-1].getNext();F=g.createElement(this.type);v.push(F);for(I=v=void 0;q.length;)v=q.shift(),I=g.createElement("li"),
944H=v,H.is("pre")||u.test(H.getName())||"false"==H.getAttribute("contenteditable")?v.appendTo(I):(v.copyAttributes(I),y&&v.getDirection()&&(I.removeStyle("direction"),I.removeAttribute("dir")),v.moveChildren(I),v.remove()),I.appendTo(F);y&&B&&F.setAttribute("dir",y);C?F.insertBefore(C):F.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&c[y.root.getName()]&&a.call(this,b,y,m);for(F=0;F<E.length;F++)e(E[F]);CKEDITOR.dom.element.clearAllMarkers(m);h.selectBookmarks(d);b.focus()},refresh:function(a,
945b){var d=b.contains(c,1),e=b.blockLimit||b.root;d&&e.contains(d)?this.setState(d.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless||(a.addCommand("numberedlist",new g("numberedlist","ol")),a.addCommand("bulletedlist",new g("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),
946a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var d=b.data.domEvent.getKey(),e;if("wysiwyg"==a.mode&&d in{8:1,46:1}){var g=a.getSelection().getRanges()[0],k=g&&g.startPath();if(g&&g.collapsed){var p=8==d,v=a.editable(),u=new CKEDITOR.dom.walker(g.clone());u.evaluator=function(a){return f(a)&&!q(a)};u.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};d=g.clone();if(p){var y;
947(y=k.contains(c))&&g.checkBoundaryOfElement(y,CKEDITOR.START)&&(y=y.getParent())&&y.is("li")&&(y=l(y))?(e=y,y=y.getPrevious(f),d.moveToPosition(y&&q(y)?y:e,CKEDITOR.POSITION_BEFORE_START)):(u.range.setStartAt(v,CKEDITOR.POSITION_AFTER_START),u.range.setEnd(g.startContainer,g.startOffset),(y=u.previous())&&y.type==CKEDITOR.NODE_ELEMENT&&(y.getName()in c||y.is("li"))&&(y.is("li")||(u.range.selectNodeContents(y),u.reset(),u.evaluator=h,y=u.previous()),e=y,d.moveToElementEditEnd(e),d.moveToPosition(d.endPath().block,
948CKEDITOR.POSITION_BEFORE_END)));if(e)m(a,d,g),b.cancel();else{var B=k.contains(c);B&&g.checkBoundaryOfElement(B,CKEDITOR.START)&&(e=B.getFirst(f),g.checkBoundaryOfElement(e,CKEDITOR.START)&&(y=B.getPrevious(f),l(e)?y&&(g.moveToElementEditEnd(y),g.select()):a.execCommand("outdent"),b.cancel()))}}else if(e=k.contains("li")){if(u.range.setEndAt(v,CKEDITOR.POSITION_BEFORE_END),p=(v=e.getLast(f))&&h(v)?v:e,k=0,(y=u.next())&&y.type==CKEDITOR.NODE_ELEMENT&&y.getName()in c&&y.equals(v)?(k=1,y=u.next()):g.checkBoundaryOfElement(p,
949CKEDITOR.END)&&(k=2),k&&y){g=g.clone();g.moveToElementEditStart(y);if(1==k&&(d.optimize(),!d.startContainer.equals(e))){for(e=d.startContainer;e.is(CKEDITOR.dtd.$inline);)B=e,e=e.getParent();B&&d.moveToPosition(B,CKEDITOR.POSITION_AFTER_END)}2==k&&(d.moveToPosition(d.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));m(a,d,g);b.cancel()}}else u.range.setEndAt(v,CKEDITOR.POSITION_BEFORE_END),(y=u.next())&&y.type==CKEDITOR.NODE_ELEMENT&&
950y.is(c)&&(y=y.getFirst(f),k.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(k.block.remove(),g.moveToElementEditStart(y),g.select()):l(y)?(g.moveToElementEditStart(y),g.select()):(g=g.clone(),g.moveToElementEditStart(y),m(a,d,g)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})}(),function(){var a={canUndo:!1,async:!0,exec:function(g){g.getClipboardData({title:g.lang.pastetext.title},function(b){b&&g.fire("paste",{type:"text",dataValue:b.dataValue,method:"paste",dataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()});
951g.fire("afterCommandExec",{name:"pastetext",command:a,returnValue:!!b})})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(g){g.addCommand("pastetext",a);g.ui.addButton&&g.ui.addButton("PasteText",{label:g.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(g.config.forcePasteAsPlainText)g.on("beforePaste",function(a){"html"!=a.data.type&&(a.data.type="text")});g.on("pasteState",function(a){g.getCommand("pastetext").setState(a.data)})}})}(),function(){function a(a,
952b){var e={},h=[],m={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,c){var g=b?"\x26"+c+";":m[c];e[g]=b?m[c]:"\x26"+c+";";h.push(g);return""});if(!b&&a){a=a.split(",");var l=document.createElement("div"),c;l.innerHTML="\x26"+a.join(";\x26")+";";c=l.innerHTML;l=null;for(l=0;l<c.length;l++){var k=c.charAt(l);e[k]="\x26"+a[l]+";";h.push(k)}}e.regex=h.join(b?"|":"");return e}CKEDITOR.plugins.add("entities",{afterInit:function(g){function b(a){return k[a]}
953function e(a){return"force"!=h.entities_processNumerical&&l[a]?l[a]:"\x26#"+a.charCo
vendor: 5,318 bytes, lines 953-962
953deAt(0)+";"}var h=g.config;if(g=(g=g.dataProcessor)&&g.htmlFilter){var m=[];!1!==h.basicEntities&&m.push("nbsp,gt,lt,amp");h.entities&&(m.length&&m.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"),
954h.entities_latin&&m.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),h.entities_greek&&m.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"),
955h.entities_additional&&m.push(h.entities_additional));var l=a(m.join(",")),c=l.regex?"["+l.regex+"]":"a^";delete l.regex;h.entities&&h.entities_processNumerical&&(c="[^ -~]|"+c);var c=new RegExp(c,"g"),k=a("nbsp,gt,lt,amp,shy",!0),d=new RegExp(k.regex,"g");g.addRules({text:function(a){return a.replace(d,b).replace(c,e)}},{applyToAll:!0,excludeNestedEditable:!0})}}})}(),CKEDITOR.config.basicEntities=!0,CKEDITOR.config.entities=!0,CKEDITOR.config.entities_latin=!0,CKEDITOR.config.entities_greek=!0,
956CKEDITOR.config.entities_additional="#39",CKEDITOR.plugins.add("basicstyles",{init:function(a){var g=0,b=function(b,c,h,d){if(d){d=new CKEDITOR.style(d);var f=e[h];f.unshift(d);a.attachStyleStateChange(d,function(b){!a.readOnly&&a.getCommand(h).setState(b)});a.addCommand(h,new CKEDITOR.styleCommand(d,{contentForms:f}));a.ui.addButton&&a.ui.addButton(b,{label:c,command:h,toolbar:"basicstyles,"+(g+=10)})}},e={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],
957italic:["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,m=a.lang.basicstyles;b("Bold",m.bold,"bold",h.coreStyles_bold);b("Italic",m.italic,"italic",h.coreStyles_italic);b("Underline",m.underline,"underline",h.coreStyles_underline);b("Strike",m.strike,
958"strike",h.coreStyles_strike);b("Subscript",m.subscript,"subscript",h.coreStyles_subscript);b("Superscript",m.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"},
959CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var a={canUndo:!1,exec:function(a){var b=a.document.createElement("hr");a.insertElement(b)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(g){g.blockless||(g.addCommand("horizontalrule",a),g.ui.addButton&&g.ui.addButton("HorizontalRule",{label:g.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})}(),function(){function a(a){function b(){for(var d=
960e(),f=CKEDITOR.tools.clone(a.config.toolbarGroups)||g(a),k=0;k<f.length;k++){var m=f[k];if("/"!=m){"string"==typeof m&&(m=f[k]={name:m});var t,r=m.groups;if(r)for(var n=0;n<r.length;n++)t=r[n],(t=d[t])&&c(m,t);(t=d[m.name])&&c(m,t)}}return f}function e(){var b={},c,d,f;for(c in a.ui.items)d=a.ui.items[c],f=d.toolbar||"others",f=f.split(","),d=f[0],f=parseInt(f[1]||-1,10),b[d]||(b[d]=[]),b[d].push({name:c,order:f});for(d in b)b[d]=b[d].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order?
9611:a.order<b.order?-1:1});return b}function c(b,c){if(c.length){b.items?b.items.push(a.ui.create("-")):b.items=[];for(var e;e=c.shift();)e="string"==typeof e?e:e.name,d&&-1!=CKEDITOR.tools.indexOf(d,e)||(e=a.ui.create(e))&&a.addFeature(e)&&b.items.push(e)}}function k(a){var b=[],d,e,f;for(d=0;d<a.length;++d)e=a[d],f={},"/"==e?b.push(e):CKEDITOR.tools.isArray(e)?(c(f,CKEDITOR.tools.clone(e)),b.push(f)):e.items&&(c(f,CKEDITOR.tools.clone(e.items)),f.name=e.name,b.push(f));return b}var d=a.config.removeButtons,
962d=d&&d.split(","),f=a.config.toolbar;"string"==typeof f&&(f=a.config["toolbar_"+f]);return a.toolbar=f?k(f):b()}
vendor: 5,374 bytes, lines 962-972
962function g(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"},
963"/",{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 e=0,c;c=b.items[e++];)if(c.focus){c.focus();return}};var e={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",
964{requires:"button",init:function(h){var g,l=function(a,b){var d,e="rtl"==h.lang.dir,q=h.config.toolbarGroupCycling,u=e?37:39,e=e?39:37,q=void 0===q||q;switch(b){case 9:case CKEDITOR.SHIFT+9:for(;!d||!d.items.length;)if(d=9==b?(d?d.next:a.toolbar.next)||h.toolbox.toolbars[0]:(d?d.previous:a.toolbar.previous)||h.toolbox.toolbars[h.toolbox.toolbars.length-1],d.items.length)for(a=d.items[g?d.items.length-1:0];a&&!a.focus;)(a=g?a.previous:a.next)||(d=0);a&&a.focus();return!1;case u:d=a;do d=d.next,!d&&
965q&&(d=a.toolbar.items[0]);while(d&&!d.focus);d?d.focus():l(a,9);return!1;case 40:return a.button&&a.button.hasArrow?(h.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)}),a.execute()):l(a,40==b?u:e),!1;case e:case 38:d=a;do d=d.previous,!d&&q&&(d=a.toolbar.items[a.toolbar.items.length-1]);while(d&&!d.focus);d?d.focus():(g=1,l(a,CKEDITOR.SHIFT+9),g=0);return!1;case 27:return h.focus(),!1;case 13:case 32:return a.execute(),!1}return!0};h.on("uiSpace",function(c){if(c.data.space==
966h.config.toolbarLocation){c.removeListener();h.toolbox=new b;var e=CKEDITOR.tools.getNextId(),d=['\x3cspan id\x3d"',e,'" class\x3d"cke_voice_label"\x3e',h.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+h.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',e,'" onmousedown\x3d"return false;"\x3e'],e=!1!==h.config.toolbarStartupExpanded,f,g;h.config.toolbarCanCollapse&&h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&d.push('\x3cspan class\x3d"cke_toolbox_main"'+
967(e?"\x3e":' style\x3d"display:none"\x3e'));for(var m=h.toolbox.toolbars,v=a(h),x=v.length,t=0;t<x;t++){var r,n=0,w,A=v[t],p="/"!==A&&("/"===v[t+1]||t==x-1),z;if(A)if(f&&(d.push("\x3c/span\x3e"),g=f=0),"/"===A)d.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{z=A.items||A;for(var D=0;D<z.length;D++){var y=z[D],B;if(y){var C=function(a){a=a.render(h,d);E=n.items.push(a)-1;0<E&&(a.previous=n.items[E-1],a.previous.next=a);a.toolbar=n;a.onkey=l;a.onfocus=function(){h.toolbox.focusCommandExecuted||
968h.focus()}};if(y.type==CKEDITOR.UI_SEPARATOR)g=f&&y;else{B=!1!==y.canGroup;if(!n){r=CKEDITOR.tools.getNextId();n={id:r,items:[]};w=A.name&&(h.lang.toolbar.toolbarGroups[A.name]||A.name);d.push('\x3cspan id\x3d"',r,'" class\x3d"cke_toolbar'+(p?' cke_toolbar_last"':'"'),w?' aria-labelledby\x3d"'+r+'_label"':"",' role\x3d"toolbar"\x3e');w&&d.push('\x3cspan id\x3d"',r,'_label" class\x3d"cke_voice_label"\x3e',w,"\x3c/span\x3e");d.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var E=m.push(n)-
9691;0<E&&(n.previous=m[E-1],n.previous.next=n)}B?f||(d.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'),f=1):f&&(d.push("\x3c/span\x3e"),f=0);g&&(C(g),g=0);C(y)}}}f&&(d.push("\x3c/span\x3e"),g=f=0);n&&d.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}h.config.toolbarCanCollapse&&d.push("\x3c/span\x3e");if(h.config.toolbarCanCollapse&&h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var F=CKEDITOR.tools.addFunction(function(){h.execCommand("toolbarCollapse")});
970h.on("destroy",function(){CKEDITOR.tools.removeFunction(F)});h.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b=a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),e=c.getParent(),f=parseInt(d.$.style.height,10),h=e.$.offsetHeight,g=b.hasClass("cke_toolbox_collapser_min");g?(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));
971b.getFirst().setText(g?"▲":"◀");d.setStyle("height",f-(e.$.offsetHeight-h)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight,contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});h.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");d.push('\x3ca title\x3d"'+(e?h.lang.toolbar.toolbarCollapse:h.lang.toolbar.toolbarExpand)+'" id\x3d"'+h.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');
972e||d.push(" cke_toolbox_collapser_min");d.push('" onclick\x3d"CKEDITOR.tools.callFunction('+F+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}d.push("\x3c/span\x3e");c.data.html+=d.join("")}});h.on("destroy",function(){if(this.toolbox){var a,b=0,d,e,h;for(a=this.toolbox.toolbars;b<a.length;b++)for(e=a[b].items,d=0;d<e.length;
972d++)h=e[d],h.clickFn&&CKEDITOR.tools.removeFunction(h.clickFn),h.keyDownFn&&CKEDITOR.tools.removeFunction(h.keyDownFn)}});h.on("uiReady",function(){var a=
973h.ui.space("toolbox");a&&h.focusManager.add(a,1)});h.addCommand("toolbarFocus",e);h.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");h.ui.add("-",CKEDITOR.UI_SEPARATOR,{});h.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,e){var c=g(this.editor),k=0===b,d={name:a};if(e){if(e=CKEDITOR.tools.search(c,function(a){return a.name==
974e})){!e.groups&&(e.groups=[]);if(b&&(b=CKEDITOR.tools.indexOf(e.groups,b),0<=b)){e.groups.splice(b+1,0,a);return}k?e.groups.splice(0,0,a):e.groups.push(a);return}b=null}b&&(b=CKEDITOR.tools.indexOf(c,function(a){return a.name==b}));k?c.splice(0,0,a):"number"==typeof b?c.splice(b+1,0,d):c.push(a)}}(),CKEDITOR.UI_SEPARATOR="separator",CKEDITOR.config.toolbarLocation="top",function(){CKEDITOR.plugins.add("sourcearea",{init:function(g){function b(){var a=h&&this.equals(CKEDITOR.document.getActive());
975this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=CKEDITOR.plugins.sourcearea;g.addMode("source",function(e){var h=g.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",
976g.config.sourceAreaTabSize||4)));h.setAttribute("dir","ltr");h.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");g.ui.space("contents").append(h);h=g.editable(new a(g,h));h.setData(g.getData(1));CKEDITOR.env.ie&&(h.attachListener(g,"resize",b,h),h.attachListener(CKEDITOR.document.getWindow(),"resize",b,h),CKEDITOR.tools.setTimeout(b,0,h));g.fire("ariaWidget",this);e()});g.addCommand("source",e.commands.source);g.ui.addButton&&g.ui.addButton("Source",{label:g.lang.sourcearea.toolbar,
977command:"source",toolbar:"mode,10"});g.on("mode",function(){g.getCommand("source").setState("source"==g.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?
978"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}}},function(){function a(a,e,h){var g=CKEDITOR.cleanWord;g?h():(a=CKEDITOR.getUrl(a.config.pasteFromWordCleanupFile||
979e+"filter/default.js"),CKEDITOR.scriptLoader.load(a,h,null,!0));return!g}function g(a){a.data.type="html"}CKEDITOR.plugins.add("pastefromword",{requires:"clipboard",init:function(b){var e=0,h=this.path;b.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(a){var b=this;e=1;a.once("beforePaste",g);a.getClipboardData({title:a.lang.pastefromword.title},function(c){c&&a.fire("paste",{type:"html",dataValue:c.dataValue,method:"paste",dataTransfer:CKEDITOR.plugins.clipboard.initPasteDataTransfer()});
980a.fire("afterCommandExec",{name:"pastefromword",command:b,returnValue:!!c})})}});b.ui.addButton&&b.ui.addButton("PasteFromWord",{label:b.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});b.on("pasteState",function(a){b.getCommand("pastefromword").setState(a.data)});b.on("paste",function(g){var l=g.data,c=l.dataValue,k=/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,d={dataValue:c};if(c&&(e||k.test(c))&&(!1!==b.fire("pasteFromWord",d)||e)){l.dontFilter=
981!0;var f=a(b,h,function(){if(f)b.fire("paste",l);else if(!b.config.pasteFromWordPromptCleanup||e||confirm(b.lang.pastefromword.confirmCleanup))d.dataValue=CKEDITOR.cleanWord(d.dataValue,b),b.fire("afterPasteFromWord",d),l.dataValue=d.dataValue;e=0});f&&g.cancel()}},null,null,3)}})}
vendor: 4,444 bytes, lines 981-990
981(),function(){function a(a,e){e||(e=a.getSelection().getSelectedElement());if(e&&e.is("img")&&!e.data("cke-realelement")&&!e.isReadOnly())return e}function g(a){var e=a.getStyle("float");if("inherit"==e||"none"==e)e=0;e||
982(e=a.getAttribute("align"));return e}CKEDITOR.plugins.add("image",{requires:"dialog",init:function(b){if(!b.plugins.image2){CKEDITOR.dialog.add("image",this.path+"dialogs/image.js");var e="img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}";CKEDITOR.dialog.isTabEnabled(b,"image","advanced")&&(e="img[alt,dir,id,lang,longdesc,!src,title]{*}(*)");b.addCommand("image",new CKEDITOR.dialogCommand("image",{allowedContent:e,requiredContent:"img[alt,src]",
983contentTransformations:[["img{width}: sizeToStyle","img[width]: sizeToAttribute"],["img{float}: alignmentToStyle","img[align]: alignmentToAttribute"]]}));b.ui.addButton&&b.ui.addButton("Image",{label:b.lang.common.image,command:"image",toolbar:"insert,10"});b.on("doubleclick",function(a){var b=a.data.element;!b.is("img")||b.data("cke-realelement")||b.isReadOnly()||(a.data.dialog="image")});b.addMenuItems&&b.addMenuItems({image:{label:b.lang.image.menu,command:"image",group:"image"}});b.contextMenu&&
984b.contextMenu.addListener(function(e){if(a(b,e))return{image:CKEDITOR.TRISTATE_OFF}})}},afterInit:function(b){function e(e){var m=b.getCommand("justify"+e);if(m){if("left"==e||"right"==e)m.on("exec",function(l){var c=a(b),k;c&&(k=g(c),k==e?(c.removeStyle("float"),e==g(c)&&c.removeAttribute("align")):c.setStyle("float",e),l.cancel())});m.on("refresh",function(l){var c=a(b);c&&(c=g(c),this.setState(c==e?CKEDITOR.TRISTATE_ON:"right"==e||"left"==e?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),l.cancel())})}}
985b.plugins.image2||(e("left"),e("right"),e("center"),e("block"))}})}(),CKEDITOR.config.image_removeLinkByEmptyURL=!0,function(){function a(a,b){b=void 0===b||b;var g;if(b)g=a.getComputedStyle("text-align");else{for(;!a.hasAttribute||!a.hasAttribute("align")&&!a.getStyle("text-align");){g=a.getParent();if(!g)break;a=g}g=a.getStyle("text-align")||a.getAttribute("align")||""}g&&(g=g.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!g&&b&&(g="rtl"==a.getComputedStyle("direction")?"right":"left");return g}
986function g(a,b,g){this.editor=a;this.name=b;this.value=g;this.context="p";b=a.config.justifyClasses;var l=a.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(b){switch(g){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=l+"("+this.cssClassName+")"}else this.requiredContent=l+"{text-align}";this.allowedContent=
987{"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,g=b.createRange();g.setStartBefore(a.data.node);g.setEndAfter(a.data.node);for(var l=new CKEDITOR.dom.walker(g),c;c=l.next();)if(c.type==CKEDITOR.NODE_ELEMENT)if(!c.equals(a.data.node)&&c.getDirection())g.setStartAfter(c),l=new CKEDITOR.dom.walker(g);else{var k=
988b.config.justifyClasses;k&&(c.hasClass(k[0])?(c.removeClass(k[0]),c.addClass(k[2])):c.hasClass(k[2])&&(c.removeClass(k[2]),c.addClass(k[0])));k=c.getStyle("text-align");"left"==k?c.setStyle("text-align","right"):"right"==k&&c.setStyle("text-align","left")}}g.prototype={exec:function(b){var g=b.getSelection(),m=b.config.enterMode;if(g){for(var l=g.createBookmarks(),c=g.getRanges(),k=this.cssClassName,d,f,q=b.config.useComputedState,q=void 0===q||q,u=c.length-1;0<=u;u--)for(d=c[u].createIterator(),
989d.enlargeBr=m!=CKEDITOR.ENTER_BR;f=d.getNextParagraph(m==CKEDITOR.ENTER_P?"p":"div");)if(!f.isReadOnly()){f.removeAttribute("align");f.removeStyle("text-align");var v=k&&(f.$.className=CKEDITOR.tools.ltrim(f.$.className.replace(this.cssClassRegex,""))),x=this.state==CKEDITOR.TRISTATE_OFF&&(!q||a(f,!0)!=this.value);k?x?f.addClass(k):v||f.removeAttribute("class"):x&&f.setStyle("text-align",this.value)}b.focus();b.forceNextSelectionCheck();g.selectBookmarks(l)}},refresh:function(b,g){var m=g.block||
990g.blockLimit;this.setState("body"!=m.getName()&&a(m,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}};
990CKEDITOR.plugins.add("justify",{init:function(a){if(!a.blockless){var h=new g(a,"justifyleft","left"),m=new g(a,"justifycenter","center"),l=new g(a,"justifyright","right"),c=new g(a,"justifyblock","justify");a.addCommand("justifyleft",h);a.addCommand("justifycenter",m);a.addCommand("justifyright",l);a.addCommand("justifyblock",c);a.ui.addButton&&(a.ui.addButton("JustifyLeft",
991{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)}}})}(),CKEDITOR.config.plugins="magicline,blockquote,dialogui,dialog,clipboard,enterkey,colordialog,floatingspace,undo,specialchar,fakeobjects,link,a11yhelp,maximize,wysiwygarea,table,panel,floatpanel,menu,contextmenu,tabletools,listblock,button,richcombo,font,find,resize,stylescombo,tab,elementspath,showborders,htmlwriter,removeformat,panelbutton,colorbutton,format,indent,indentlist,list,pastetext,entities,basicstyles,horizontalrule,toolbar,sourcearea,pastefromword,image,justify",
992CKEDITOR.config.skin="moono-lisa",function(){var a=function(a,b){var e=CKEDITOR.getUrl("plugins/"+b);a=a.split(",");for(var h=0;h<a.length;h++)CKEDITOR.skin.icons[a[h]]={path:e,offset:-a[++h],bgsize:a[++h]}};CKEDITOR.env.hidpi?a("bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,blockquote,144,,copy-rtl,168,,copy,192,,cut-rtl,216,,cut,240,,paste-rtl,264,,paste,288,,bgcolor,312,,textcolor,336,,find-rtl,360,,find,384,,replace,408,,horizontalrule,432,,image,456,,indent-rtl,480,,indent,504,,outdent-rtl,528,,outdent,552,,justifyblock,576,,justifycenter,600,,justifyleft,624,,justifyright,648,,anchor-rtl,672,,anchor,696,,link,720,,unlink,744,,bulletedlist-rtl,768,,bulletedlist,792,,numberedlist-rtl,816,,numberedlist,840,,maximize,864,,pastefromword-rtl,888,,pastefromword,912,,pastetext-rtl,936,,pastetext,960,,removeformat,984,,source-rtl,1008,,source,1032,,specialchar,1056,,table,1080,,redo-rtl,1104,,redo,1128,,undo-rtl,1152,,undo,1176,",
993"icons_hidpi.png"):a("bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,blockquote,144,auto,copy-rtl,168,auto,copy,192,auto,cut-rtl,216,auto,cut,240,auto,paste-rtl,264,auto,paste,288,auto,bgcolor,312,auto,textcolor,336,auto,find-rtl,360,auto,find,384,auto,replace,408,auto,horizontalrule,432,auto,image,456,auto,indent-rtl,480,auto,indent,504,auto,outdent-rtl,528,auto,outdent,552,auto,justifyblock,576,auto,justifycenter,600,auto,justifyleft,624,auto,justifyright,648,auto,anchor-rtl,672,auto,anchor,696,auto,link,720,auto,unlink,744,auto,bulletedlist-rtl,768,auto,bulletedlist,792,auto,numberedlist-rtl,816,auto,numberedlist,840,auto,maximize,864,auto,pastefromword-rtl,888,auto,pastefromword,912,auto,pastetext-rtl,936,auto,pastetext,960,auto,removeformat,984,auto,source-rtl,1008,auto,source,1032,auto,specialchar,1056,auto,table,1080,auto,redo-rtl,1104,auto,redo,1128,auto,undo-rtl,1152,auto,undo,1176,auto",
994"icons.png")}(),CKEDITOR.lang.languages={fr:1,en:1,es:1})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.