1/*1707042816000*/ 2(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var d=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"L3Q6",version:"4.14.1 DEV",revision:"6e200c318",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:d},status:"unloaded",basePath:function(){var f=window.CKEDITOR_BASEPATH||"";if(!f)for(var b=document.getElementsByTagName("script"),g=0;g<b.length;g++){var k=b[g].src.match(d);if(k){f=k[1];break}}-1==f.indexOf(":/")&&"//"!= 3f.slice(0,2)&&(f=0===f.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+f:location.href.match(/^[^\?]*\/(?:)/)[0]+f);if(!f)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return f}(),getUrl:function(f){function b(d,k){f.match(new RegExp("[\x26?]"+d+"\\b"))||(f+=(0<=f.indexOf("?")?"\x26":"?")+d+"\x3d"+k)}-1===f.indexOf(":/")&&0!==f.indexOf("/")&&(f=this.basePath+f);"/"!==f.charAt(f.length- 41)&&(this.timestamp&&b("t",this.timestamp),Object.keys(h.ADDITIONAL_RESOURCE_PARAMS).forEac
vendor: 4,450 bytes, lines 4-12
4h(function(d){var k=h.ADDITIONAL_RESOURCE_PARAMS[d];/\.css$/.test(f)&&"languageId"===d||b(d,k)}));return f},domReady:function(){function f(){try{document.addEventListener?(document.removeEventListener("DOMContentLoaded",f,!1),b()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",f),b())}catch(d){}}function b(){for(var f;f=d.shift();)f()}var d=[];return function(b){function c(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(c, 51);return}f()}d.push(b);"complete"===document.readyState&&setTimeout(f,1);if(1==d.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",f);window.attachEvent("onload",f);b=!1;try{b=!window.frameElement}catch(e){}document.documentElement.doScroll&&b&&c()}}}()},g=window.CKEDITOR_GETURL;if(g){var b=h.getUrl;h.getUrl=function(f){return g.call(h,f)||b.call(h,f)}}return h}()); 6CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(d){var h=CKEDITOR.event.prototype,g;for(g in h)null==d[g]&&(d[g]=h[g])},CKEDITOR.event.prototype=function(){function d(b){var f=h(this);return f[b]||(f[b]=new g(b))}var h=function(b){b=b.getPrivate&&b.getPrivate()||b._||(b._={});return b.events||(b.events={})},g=function(b){this.name=b;this.listeners=[]};g.prototype={getListenerIndex:function(b){for(var f=0,d=this.listeners;f<d.length;f++)if(d[f].fn==b)return f;return-1}}; 7return{define:function(b,f){var g=d.call(this,b);CKEDITOR.tools.extend(g,f,!0)},on:function(b,f,g,h,k){function c(a,n,c,w){a={name:b,sender:this,editor:a,data:n,listenerData:h,stop:c,cancel:w,removeListener:e};return!1===f.call(g,a)?!1:a.data}function e(){n.removeListener(b,f)}var a=d.call(this,b);if(0>a.getListenerIndex(f)){a=a.listeners;g||(g=this);isNaN(k)&&(k=10);var n=this;c.fn=f;c.priority=k;for(var w=a.length-1;0<=w;w--)if(a[w].priority<=k)return a.splice(w+1,0,c),{removeListener:e};a.unshift(c)}return{removeListener:e}}, 8once:function(){var b=Array.prototype.slice.call(arguments),f=b[1];b[1]=function(b){b.removeListener();return f.apply(this,arguments)};return this.on.apply(this,b)},capture:function(){CKEDITOR.event.useCapture=1;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,f=function(){b=1},d=0,g=function(){d=1};return function(k,c,e){var a=h(this)[k];k=b;var n=d;b=d=0;if(a){var w=a.listeners;if(w.length)for(var w=w.slice(0),y,r=0;r<w.length;r++){if(a.errorProof)try{y= 9w[r].call(this,e,c,f,g)}catch(t){}else y=w[r].call(this,e,c,f,g);!1===y?d=1:"undefined"!=typeof y&&(c=y);if(b||d)break}}c=d?!1:"undefined"==typeof c?!0:c;b=k;d=n;return c}}(),fireOnce:function(b,f,d){f=this.fire(b,f,d);delete h(this)[b];return f},removeListener:function(b,f){var d=h(this)[b];if(d){var g=d.getListenerIndex(f);0<=g&&d.listeners.splice(g,1)}},removeAllListeners:function(){var b=h(this),f;for(f in b)delete b[f]},hasListeners:function(b){return(b=h(this)[b])&&0<b.listeners.length}}}()); 10CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(d,h){d in{instanceReady:1,loaded:1}&&(this[d]=!0);return CKEDITOR.event.prototype.fire.call(this,d,h,this)},CKEDITOR.editor.prototype.fireOnce=function(d,h){d in{instanceReady:1,loaded:1}&&(this[d]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,d,h,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));CKEDITOR.env||(CKEDITOR.env= 11function(){var d=navigator.userAgent.toLowerCase(),h=d.match(/edge[ \/](\d+.?\d*)/),g=-1<d.indexOf("trident/"),g=!(!h&&!g),g={ie:g,edge:!!h,webkit:!g&&-1<d.indexOf(" applewebkit/"),air:-1<d.indexOf(" adobeair/"),mac:-1<d.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<d.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(d),isCustomDomain:function(){if(!this.ie)return!1;var b=document.domain,d=window.location.hostname;return b!= 12d&&b!="["+d+"]"},secure:"https:"==location.protocol};g.gecko="Gecko"==navigator.product&&!g.webkit&&!g.ie;g.webkit&&(-1<d.indexOf("chrome")?g.chrome=!0:g.safari=!0);var b=0;g.ie&&(b=h?parseFloat(h[1]):g.quirks||!document.documentMode?parseFloat(d.match(/msie (\d+)/)[1]):document.documentMode,g.ie9Compat=9==b,g.ie8Compat=8==b,g.ie7Compat=7==b,g.ie6Compat=7>b||g.quirks);
vendor: 23,439 bytes, lines 12-58
12g.gecko&&(h=d.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),b=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));g.air&&(b=parseFloat(d.match(/ adobeair\/(\d+)/)[1])); 13g.webkit&&(b=parseFloat(d.match(/ applewebkit\/(\d+)/)[1]));g.version=b;g.isCompatible=!(g.ie&&7>b)&&!(g.gecko&&4E4>b)&&!(g.webkit&&534>b);g.hidpi=2<=window.devicePixelRatio;g.needsBrFiller=g.gecko||g.webkit||g.ie&&10<b;g.needsNbspFiller=g.ie&&11>b;g.cssClass="cke_browser_"+(g.ie?"ie":g.gecko?"gecko":g.webkit?"webkit":"unknown");g.quirks&&(g.cssClass+=" cke_browser_quirks");g.ie&&(g.cssClass+=" cke_browser_ie"+(g.quirks?"6 cke_browser_iequirks":g.version));g.air&&(g.cssClass+=" cke_browser_air"); 14g.iOS&&(g.cssClass+=" cke_browser_ios");g.hidpi&&(g.cssClass+=" cke_hidpi");return g}());"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var d=document.createElement("script");d.type="text/javascript";d.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(d)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add= 15function(d){(this._.pending||(this._.pending=[])).push(d)};(function(){CKEDITOR.domReady(function(){var d=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;d&&(CKEDITOR.status="basic_ready",d&&d._load?d():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(d,h){CKEDITOR.verbosity& 16CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:d,additionalData:h})};CKEDITOR.error=function(d,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:d,additionalData:h})};CKEDITOR.on("log",function(d){if(window.console&&window.console.log){var h=console[d.data.type]?d.data.type:"log",g=d.data.errorCode;if(d=d.data.additionalData)console[h]("[CKEDITOR] Error code: "+g+".",d);else console[h]("[CKEDITOR] Error code: "+g+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+ 17g)}},null,null,999);CKEDITOR.dom={};(function(){function d(a,c,e){this._minInterval=a;this._context=e;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(c,e||{});var b=this;this.input=function(){function a(){b._lastOutput=(new Date).getTime();b._scheduledTimer=0;b._call()}if(!b._scheduledTimer||!1!==b._reschedule()){var n=(new Date).getTime()-b._lastOutput;n<b._minInterval?b._scheduledTimer=setTimeout(a,b._minInterval-n):a()}}}function h(a,c,e){d.call(this,a,c,e);this._args= 18[];var b=this;this.input=CKEDITOR.tools.override(this.input,function(a){return function(){b._args=Array.prototype.slice.call(arguments);a.call(this)}})}var g=[],b=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",f=/&/g,m=/>/g,l=/</g,k=/"/g,c=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,e={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:"\u00a0",shy:"\u00ad"},a=function(a,c){return"#"==c[0]?String.fromCharCode(parseInt(c.slice(1),10)):e[c]};CKEDITOR.on("reset",function(){g= 19[]});CKEDITOR.tools={arrayCompare:function(a,c){if(!a&&!c)return!0;if(!a||!c||a.length!=c.length)return!1;for(var e=0;e<a.length;e++)if(a[e]!=c[e])return!1;return!0},getIndex:function(a,c){for(var e=0;e<a.length;++e)if(c(a[e]))return e;return-1},clone:function(a){var c;if(a&&a instanceof Array){c=[];for(var e=0;e<a.length;e++)c[e]=CKEDITOR.tools.clone(a[e]);return c}if(null===a||"object"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp|| 20a.nodeType||a.window===a)return a;c=new a.constructor;for(e in a)c[e]=CKEDITOR.tools.clone(a[e]);return c},capitalize:function(a,c){return a.charAt(0).toUpperCase()+(c?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var c=arguments.length,e,b;"boolean"==typeof(e=arguments[c-1])?c--:"boolean"==typeof(e=arguments[c-2])&&(b=arguments[c-1],c-=2);for(var f=1;f<c;f++){var d=arguments[f]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(d),function(c){if(!0===e||null==a[c])if(!b||c in 21b)a[c]=d[c]})}return a},prototypedCopy:function(a){var c=function(){};c.prototype=a;return new c},copy:function(a){var c={},e;for(e in a)c[e]=a[e];return c},isArray:function(a){return"[object Array]"==Object.prototype.toString.call(a)},isEmpty:function(a){for(var c in a)if(a.hasOwnProperty(c))return!1;return!0},cssVendorPrefix:function(a,c,e){if(e)return b+a+":"+c+";"+a+":"+c;e={};e[a]=c;e[b+a]=c;return e},cssStyleToDomStyle:function(){var a=document.createElement("div").style,c="undefined"!=typeof a.cssFloat? 22"cssFloat":"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?c:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a=[].concat(a);for(var c,e=[],b=0;b<a.length;b++)if(c=a[b])/@import|[{}]/.test(c)?e.push("\x3cstyle\x3e"+c+"\x3c/style\x3e"):e.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+c+'"\x3e');return e.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(f,"\x26amp;").replace(m, 23"\x26gt;").replace(l,"\x26lt;")},htmlDecode:function(n){return n.replace(c,a)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(k,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)},transformPlainTextToHtml:function(a,c){var e=c==CKEDITOR.ENTER_BR,b=this.htmlEncode(a.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),f=c==CKEDITOR.ENTER_P?"p":"div";if(!e){var d=/\n{2}/g;if(d.test(b))var k="\x3c"+f+"\x3e",g="\x3c/"+f+"\x3e",b=k+ 24b.replace(d,function(){return g+k})+g}b=b.replace(/\n/g,"\x3cbr\x3e");e||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+f+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g,function(a,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",c=0;8>c;c++)a+=Math.floor(65536* 25(1+Math.random())).toString(16).substring(1);return a},override:function(a,c){var e=c(a);e.prototype=a.prototype;return e},setTimeout:function(a,c,e,b,f){f||(f=window);e||(e=f);return f.setTimeout(function(){b?a.apply(e,[].concat(b)):a.apply(e)},c||0)},throttle:function(a,c,e){return new this.buffers.throttle(a,c,e)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(c){return c.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(c){return c.replace(a,"")}}(), 26rtrim:function(){var a=/[ \t\n\r]+$/g;return function(c){return c.replace(a,"")}}(),indexOf:function(a,c){if("function"==typeof c)for(var e=0,b=a.length;e<b;e++){if(c(a[e]))return e}else{if(a.indexOf)return a.indexOf(c);e=0;for(b=a.length;e<b;e++)if(a[e]===c)return e}return-1},search:function(a,c){var e=CKEDITOR.tools.indexOf(a,c);return 0<=e?a[e]:null},bind:function(a,c){var e=Array.prototype.slice.call(arguments,2);return function(){return a.apply(c,e.concat(Array.prototype.slice.call(arguments)))}}, 27createClass:function(a){var c=a.$,e=a.base,b=a.privates||a._,f=a.proto;a=a.statics;!c&&(c=function(){e&&this.base.apply(this,arguments)});if(b)var d=c,c=function(){var a=this._||(this._={}),c;for(c in b){var n=b[c];a[c]="function"==typeof n?CKEDITOR.tools.bind(n,this):n}d.apply(this,arguments)};e&&(c.prototype=this.prototypedCopy(e.prototype),c.prototype.constructor=c,c.base=e,c.baseProto=e.prototype,c.prototype.base=function p(){this.base=e.prototype.base;e.apply(this,arguments);this.base=p});f&& 28this.extend(c.prototype,f,!0);a&&this.extend(c,a,!0);return c},addFunction:function(a,c){return g.push(function(){return a.apply(c||this,arguments)})-1},removeFunction:function(a){g[a]=null},callFunction:function(a){var c=g[a];return c&&c.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,c;return function(e){c=CKEDITOR.tools.trim(e+"")+"px";return a.test(c)?c:e||""}}(),convertToPx:function(){var a;return function(c){a||(a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e', 29CKEDITOR.document),CKEDITOR.document.getBody().append(a));if(!/%$/.test(c)){var e=0>parseFloat(c);e&&(c=c.replace("-",""));a.setStyle("width",c);c=a.$.clientWidth;return e?-c:c}return c}}(),repeat:function(a,c){return Array(c+1).join(a)},tryThese:function(){for(var a,c=0,e=arguments.length;c<e;c++){var b=arguments[c];try{a=b();break}catch(f){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var c=arguments,e=this;window.setTimeout(function(){a.apply(e, 30c)},0)}},normalizeCssText:function(a,c){var e=[],b,f=CKEDITOR.tools.parseCssText(a,!0,c);for(b in f)e.push(b+":"+f[b]);e.sort();return e.length?e.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,c,n,e){a=[c,n,e];for(c=0;3>c;c++)a[c]=("0"+parseInt(a[c],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,c,n,e){a=c.toLowerCase();3==a.length&& 31(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+e})},parseCssText:function(a,c,e){var b={};e&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return b;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,n){c&&(e=e.toLowerCase(),"font-family"==e&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));b[e]=n});return b}, 32writeCssText:function(a,c){var e,b=[];for(e in a)b.push(e+":"+a[e]);c&&b.sort();return b.join("; ")},objectCompare:function(a,c,e){var b;if(!a&&!c)return!0;if(!a||!c)return!1;for(b in a)if(a[b]!=c[b])return!1;if(!e)for(b in c)if(a[b]!=c[b])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,c){var e={};1==arguments.length&&(c=!0);for(var b=0,f=a.length;b<f;++b)e[a[b]]=c;return e},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain; 33break}catch(c){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a,c,e){return new this.buffers.event(a,c,e)},enableHtml5Elements:function(a,c){for(var e="abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "),b=e.length,f;b--;)f=a.createElement(e[b]),c&&a.appendChild(f)},checkIfAnyArrayItemMatches:function(a,c){for(var e= 340,b=a.length;e<b;++e)if(a[e].match(c))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,c){for(var e in a)if(e.match(c))return!0;return!1},keystrokeToString:function(a,c){var e=this.keystrokeToArray(a,c);e.display=e.display.join("+");e.aria=e.aria.join("+");return e},keystrokeToArray:function(a,c){var e=c&16711680,b=c&65535,f=CKEDITOR.env.mac,d=[],k=[];e&CKEDITOR.CTRL&&(d.push(f?"\u2318":a[17]),k.push(f?a[224]:a[17]));e&CKEDITOR.ALT&&(d.push(f?"\u2325":a[18]),k.push(a[18]));e&CKEDITOR.SHIFT&& 35(d.push(f?"\u21e7":a[16]),k.push(a[16]));b&&(a[b]?(d.push(a[b]),k.push(a[b])):(d.push(String.fromCharCode(b)),k.push(String.fromCharCode(b))));return{display:d,aria:k}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();for(var c=document.cookie.split(";"),e,b,f=0;f<c.length;f++)if(e=c[f].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(e[0]).toLowerCase()),b===a)return decodeURIComponent(1< 36e.length?e[1]:"");return null},setCookie:function(a,c){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(c)+";path\x3d/"},getCsrfToken:function(){var a=CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],c="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var e=0;40>e;e++)a.push(Math.floor(256*Math.random()));for(e=0;e<a.length;e++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[e]%36),c=c+(.5<Math.random()? 37b.toUpperCase():b);a=c;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){return a?window.CSS&&CSS.escape?CSS.escape(a):isNaN(parseInt(a.charAt(0),10))?a:"\\3"+a.charAt(0)+" "+a.substring(1,a.length):""},getMouseButton:function(a){return(a=a&&a.data?a.data.$:a)?CKEDITOR.tools.normalizeMouseButton(a.button):!1},normalizeMouseButton:function(a,c){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return a;for(var e=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE, 384],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],b=0;b<e.length;b++){var f=e[b];if(f[0]===a&&c)return f[1];if(!c&&f[1]===a)return f[0]}},convertHexStringToBytes:function(a){var c=[],e=a.length/2,b;for(b=0;b<e;b++)c.push(parseInt(a.substr(2*b,2),16));return c},convertBytesToBase64:function(a){var c="",e=a.length,b;for(b=0;b<e;b+=3){var f=a.slice(b,b+3),d=f.length,k=[],g;if(3>d)for(g=d;3>g;g++)f[g]=0;k[0]=(f[0]&252)>>2;k[1]=(f[0]&3)<<4|f[1]>>4;k[2]=(f[1]&15)<<2|(f[2]&192)>>6;k[3]=f[2]&63;for(g=0;4>g;g++)c=g<=d? 39c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k[g]):c+"\x3d"}return c},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C", 40cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF", 41firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2", 42lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A", 43mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399", 44red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00", 45yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var c={},e=this._findColor(a);e.length&&(c.color=e[0],CKEDITOR.tools.array.forEach(e,function(c){a=a.replace(c,"")})); 46if(a=CKEDITOR.tools.trim(a))c.unprocessed=a;return c},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(a,c){function e(a){b.top=f[a[0]];b.right=f[a[1]];b.bottom=f[a[2]];b.left=f[a[3]]}var b={},f=c?c(a):a.split(/\s+/);switch(f.length){case 1:e([0,0,0,0]);break;case 2:e([0,1,0,1]);break;case 3:e([0,1,2,1]);break;case 4:e([0,1,2,3])}return b},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(a)}, 47_findColor:function(a){var c=[],e=CKEDITOR.tools.array,c=c.concat(a.match(this._rgbaRegExp)||[]),c=c.concat(a.match(this._hslaRegExp)||[]);return c=c.concat(e.filter(a.split(/\s+/),function(a){return a.match(/^#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,c,e){var b=[];this.forEach(a,function(f,d){c.call(e,f,d,a)&&b.push(f)});return b},find:function(a,c,e){for(var b=a.length,f=0;f<b;){if(c.call(e,a[f],f,a))return a[f];f++}}, 48forEach:function(a,c,e){var b=a.length,f;for(f=0;f<b;f++)c.call(e,a[f],f,a)},map:function(a,c,e){for(var b=[],f=0;f<a.length;f++)b.push(c.call(e,a[f],f,a));return b},reduce:function(a,c,e,b){for(var f=0;f<a.length;f++)e=c.call(b,e,a[f],f,a);return e},every:function(a,c,e){if(!a.length)return!0;c=this.filter(a,c,e);return a.length===c.length},some:function(a,c,e){for(var b=0;b<a.length;b++)if(c.call(e,a[b],b,a))return!0;return!1}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "), 49entries:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(c){return[c,a[c]]})},values:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(c){return a[c]})},keys:function(a){var c=Object.prototype.hasOwnProperty,e=[],b=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!a||"object"!==typeof a)){c=[];if("string"===typeof a)for(e=0;e<a.length;e++)c.push(String(e));return c}for(var f in a)e.push(f);if(CKEDITOR.env.ie&& 509>CKEDITOR.env.version)for(f=0;f<b.length;f++)c.call(a,b[f])&&e.push(b[f]);return e},findKey:function(a,c){if("object"!==typeof a)return null;for(var e in a)if(a[e]===c)return e;return null},merge:function(a,c){var e=CKEDITOR.tools,b=e.clone(a),f=e.clone(c);e.array.forEach(e.object.keys(f),function(a){b[a]="object"===typeof f[a]&&"object"===typeof b[a]?e.object.merge(b[a],f[a]):f[a]});return b}},getAbsoluteRectPosition:function(a,c){function e(a){if(a){var c=a.getClientRect();b.top+=c.top;b.left+= 51c.left;"x"in b&&"y"in b&&(b.x+=c.x,b.y+=c.y);e(a.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(c);e(a.getFrame());var f=CKEDITOR.document.getWindow().getScrollPosition();b.top+=f.y;b.left+=f.x;"x"in b&&"y"in b&&(b.y+=f.y,b.x+=f.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};d.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer); 52this._scheduledTimer=0}};h.prototype=CKEDITOR.tools.prototypedCopy(d.prototype);h.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};h.prototype._call=function(){this._output.apply(this._context,this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=d;CKEDITOR.tools.buffers.throttle=h;CKEDITOR.tools.style.border=CKEDITOR.tools.createClass({$:function(a){a=a||{};this.width=a.width;this.style=a.style;this.color=a.color;this._.normalize()},_:{normalizeMap:{color:[[/windowtext/g, 53"black"]]},normalize:function(){for(var a in this._.normalizeMap){var c=this[a];c&&(this[a]=CKEDITOR.tools.array.reduce(this._.normalizeMap[a],function(a,c){return a.replace(c[0],c[1])},c))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width,this.style,this.color],function(a){return!!a}).join(" ")}},statics:{fromCssRule:function(a){var c={},e=a.split(/\s+/g);a=CKEDITOR.tools.style.parse._findColor(a);a.length&&(c.color=a[0]);CKEDITOR.tools.array.forEach(e,function(a){c.style|| 54-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,a)?!c.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&(c.width=a):c.style=a});return new CKEDITOR.tools.style.border(c)},splitCssValues:function(a,c){c=c||{};var e=CKEDITOR.tools.array.reduce(["width","style","color"],function(e,b){var f=a["border-"+b]||c[b];e[b]=f?CKEDITOR.tools.style.parse.sideShorthand(f):null;return e},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(c,b){var f={},d;for(d in e){var k= 55a["border-"+b+"-"+d];f[d]=k?k:e[d]&&e[d][b]}c["border-"+b]=new CKEDITOR.tools.style.border(f);return c},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE=1;CKEDITOR.MOUSE_BUTTON_RIGHT=2})();CKEDITOR.dtd=function(){var d=CKEDITOR.tools.extend,h=function(c,a){for(var b=CKEDITOR.tools.clone(c),f=1;f<arguments.length;f++){a=arguments[f];for(var d in a)delete b[d]}return b},g={},b={}, 56f={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={},k={"#":1},c={center:1,dir:1,noframes:1};d(g,{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, 57mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},k,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});d(b,f,g,c);h={a:h(g,{a:1,button:1}),abbr:g,address:b,area:l,article:b,aside:b,audio:d({source:1,track:1},b),b:g,base:l,bdi:g,bdo:g,blockquote:b,body:b,br:l,button:h(g,{a:1,button:1}),canvas:g,caption:b,cite:g,code:g,col:l,colgroup:{col:1},command:l, 58datalist:d({option:1},g),dd:b,del:g,details:d({summary:1}
vendor: 17,389 bytes, lines 58-91
58,b),dfn:g,div:b,dl:{dt:1,dd:1},dt:b,em:g,embed:l,fieldset:d({legend:1},b),figcaption:b,figure:d({figcaption:1},b),footer:b,form:b,h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,head:d({title:1,base:1},m),header:b,hgroup:{h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:d({head:1,body:1},b,m),i:g,iframe:k,img:l,input:l,ins:g,kbd:g,keygen:l,label:g,legend:g,li:b,link:l,main:b,map:b,mark:g,menu:d({li:1},b),meta:l,meter:h(g,{meter:1}),nav:b,noscript:d({link:1,meta:1,style:1}, 59g),object:d({param:1},g),ol:{li:1},optgroup:{option:1},option:k,output:g,p:g,param:l,pre:g,progress:h(g,{progress:1}),q:g,rp:g,rt:g,ruby:d({rp:1,rt:1},g),s:g,samp:g,script:k,section:b,select:{optgroup:1,option:1},small:g,source:l,span:g,strong:g,style:k,sub:g,summary:d({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},g),sup:g,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:b,textarea:k,tfoot:{tr:1},th:b,thead:{tr:1},time:h(g,{time:1}),title:k,tr:{th:1,td:1},track:l,u:g,ul:{li:1},"var":g, 60video:d({source:1,track:1},b),wbr:l,acronym:g,applet:d({param:1},b),basefont:l,big:g,center:b,dialog:l,dir:{li:1},font:g,isindex:l,noframes:b,strike:g,tt:g};d(h,{$block:d({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},f,c),$blockLimit:{article:1,aside:1,audio:1,body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1, 61aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1,keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1},$inline:g,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:d({body:1,head:1,html:1},h.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1, 62option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1, 63td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}});return h}();CKEDITOR.dom.event=function(d){this.$=d};CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var d=this.getKey();if(this.$.ctrlKey||this.$.metaKey)d+=CKEDITOR.CTRL; 64this.$.shiftKey&&(d+=CKEDITOR.SHIFT);this.$.altKey&&(d+=CKEDITOR.ALT);return d},preventDefault:function(d){var h=this.$;h.preventDefault?h.preventDefault():h.returnValue=!1;d&&this.stopPropagation()},stopPropagation:function(){var d=this.$;d.stopPropagation?d.stopPropagation():d.cancelBubble=!0},getTarget:function(){var d=this.$.target||this.$.srcElement;return d?new CKEDITOR.dom.node(d):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var d=this.getTarget().getDocument().$; 65return{x:this.$.pageX||this.$.clientX+(d.documentElement.scrollLeft||d.body.scrollLeft),y:this.$.pageY||this.$.clientY+(d.documentElement.scrollTop||d.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1;CKEDITOR.EVENT_PHASE_AT_TARGET=2;CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(d){d&&(this.$=d)};CKEDITOR.dom.domObject.prototype=function(){var d=function(d,g){return function(b){"undefined"!=typeof CKEDITOR&&d.fire(g, 66new CKEDITOR.dom.event(b))}};return{getPrivate:function(){var d;(d=this.getCustomData("_"))||this.setCustomData("_",d={});return d},on:function(h){var g=this.getCustomData("_cke_nativeListeners");g||(g={},this.setCustomData("_cke_nativeListeners",g));g[h]||(g=g[h]=d(this,h),this.$.addEventListener?this.$.addEventListener(h,g,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+h,g));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(d){CKEDITOR.event.prototype.removeListener.apply(this, 67arguments);if(!this.hasListeners(d)){var g=this.getCustomData("_cke_nativeListeners"),b=g&&g[d];b&&(this.$.removeEventListener?this.$.removeEventListener(d,b,!1):this.$.detachEvent&&this.$.detachEvent("on"+d,b),delete g[d])}},removeAllListeners:function(){try{var d=this.getCustomData("_cke_nativeListeners"),g;for(g in d){var b=d[g];this.$.detachEvent?this.$.detachEvent("on"+g,b):this.$.removeEventListener&&this.$.removeEventListener(g,b,!1);delete d[g]}}catch(f){if(!CKEDITOR.env.edge||-2146828218!== 68f.number)throw f;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();(function(d){var h={};CKEDITOR.on("reset",function(){h={}});d.equals=function(d){try{return d&&d.$===this.$}catch(b){return!1}};d.setCustomData=function(d,b){var f=this.getUniqueId();(h[f]||(h[f]={}))[d]=b;return this};d.getCustomData=function(d){var b=this.$["data-cke-expando"];return(b=b&&h[b])&&d in b?b[d]:null};d.removeCustomData=function(d){var b=this.$["data-cke-expando"],b=b&&h[b],f,m;b&&(f=b[d],m=d in b,delete b[d]); 69return m?f:null};d.clearCustomData=function(){this.removeAllListeners();var d=this.getUniqueId();d&&delete h[d]};d.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())};CKEDITOR.event.implementOn(d)})(CKEDITOR.dom.domObject.prototype);CKEDITOR.dom.node=function(d){return d?new CKEDITOR.dom[d.nodeType==CKEDITOR.NODE_DOCUMENT?"document":d.nodeType==CKEDITOR.NODE_ELEMENT?"element":d.nodeType==CKEDITOR.NODE_TEXT?"text":d.nodeType==CKEDITOR.NODE_COMMENT? 70"comment":d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](d):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT=3;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype, 71{appendTo:function(d,h){d.append(this,h);return d},clone:function(d,h){function g(b){b["data-cke-expando"]&&(b["data-cke-expando"]=!1);if(b.nodeType==CKEDITOR.NODE_ELEMENT||b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(h||b.nodeType!=CKEDITOR.NODE_ELEMENT||b.removeAttribute("id",!1),d){b=b.childNodes;for(var f=0;f<b.length;f++)g(b[f])}}function b(f){if(f.type==CKEDITOR.NODE_ELEMENT||f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var g=f.getName();":"==g[0]&& 72f.renameNode(g.substring(1))}if(d)for(g=0;g<f.getChildCount();g++)b(f.getChild(g))}}var f=this.$.cloneNode(d);g(f);f=new CKEDITOR.dom.node(f);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&b(f);return f},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(d){d.$.parentNode.insertBefore(this.$,d.$.nextSibling);return d},insertBefore:function(d){d.$.parentNode.insertBefore(this.$, 73d.$);return d},insertBeforeMe:function(d){this.$.parentNode.insertBefore(d.$,this.$);return d},getAddress:function(d){for(var h=[],g=this.getDocument().$.documentElement,b=this;b&&b!=g;){var f=b.getParent();f&&h.unshift(this.getIndex.call(b,d));b=f}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(d){function h(b,f){var d=f?b.getNext():b.getPrevious();return d&&d.type==CKEDITOR.NODE_TEXT?d.isEmpty()?h(d,f):d: 74null}var g=this,b=-1,f;if(!this.getParent()||d&&g.type==CKEDITOR.NODE_TEXT&&g.isEmpty()&&!h(g)&&!h(g,!0))return-1;do if(!d||g.equals(this)||g.type!=CKEDITOR.NODE_TEXT||!f&&!g.isEmpty())b++,f=g.type==CKEDITOR.NODE_TEXT;while(g=g.getPrevious());return b},getNextSourceNode:function(d,h,g){if(g&&!g.call){var b=g;g=function(f){return!f.equals(b)}}d=!d&&this.getFirst&&this.getFirst();var f;if(!d){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;d=this.getNext()}for(;!d&&(f=(f||this).getParent());){if(g&& 75!1===g(f,!0))return null;d=f.getNext()}return!d||g&&!1===g(d)?null:h&&h!=d.type?d.getNextSourceNode(!1,h,g):d},getPreviousSourceNode:function(d,h,g){if(g&&!g.call){var b=g;g=function(f){return!f.equals(b)}}d=!d&&this.getLast&&this.getLast();var f;if(!d){if(this.type==CKEDITOR.NODE_ELEMENT&&g&&!1===g(this,!0))return null;d=this.getPrevious()}for(;!d&&(f=(f||this).getParent());){if(g&&!1===g(f,!0))return null;d=f.getPrevious()}return!d||g&&!1===g(d)?null:h&&d.type!=h?d.getPreviousSourceNode(!1,h,g): 76d},getPrevious:function(d){var h=this.$,g;do g=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(g&&d&&!d(g));return g},getNext:function(d){var h=this.$,g;do g=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(g&&d&&!d(g));return g},getParent:function(d){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||d&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(d){var h=this,g=[];do g[d?"push":"unshift"](h);while(h=h.getParent()); 77return g},getCommonAncestor:function(d){if(d.equals(this))return this;if(d.contains&&d.contains(this))return d;var h=this.contains?this:this.getParent();do if(h.contains(d))return h;while(h=h.getParent());return null},getPosition:function(d){var h=this.$,g=d.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(g);if(h==g)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&d.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(g))return CKEDITOR.POSITION_CONTAINS+ 78CKEDITOR.POSITION_PRECEDING;if(g.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>g.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex<g.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();d=d.getAddress();for(var g=Math.min(h.length,d.length),b=0;b<g;b++)if(h[b]!=d[b])return h[b]<d[b]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return h.length<d.length?CKEDITOR.POSITION_CONTAINS+ 79CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(d,h){var g=this.$,b,f;h||(g=g.parentNode);"function"==typeof d?(f=!0,b=d):(f=!1,b=function(b){b="string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof d?b==d:b in d});for(;g;){if(b(f?new CKEDITOR.dom.node(g):g))return new CKEDITOR.dom.node(g);try{g=g.parentNode}catch(m){g=null}}return null},hasAscendant:function(d,h){var g=this.$;h||(g=g.parentNode);for(;g;){if(g.nodeName&& 80g.nodeName.toLowerCase()==d)return!0;g=g.parentNode}return!1},move:function(d,h){d.append(this.remove(),h)},remove:function(d){var h=this.$,g=h.parentNode;if(g){if(d)for(;d=h.firstChild;)g.insertBefore(h.removeChild(d),h);g.removeChild(h)}return this},replace:function(d){this.insertBefore(d);d.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var d;this.getFirst&&(d=this.getFirst());){if(d.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.ltrim(d.getText()),g=d.getLength();if(h)h.length< 81g&&(d.split(g-h.length),this.$.removeChild(this.$.firstChild));else{d.remove();continue}}break}},rtrim:function(){for(var d;this.getLast&&(d=this.getLast());){if(d.type==CKEDITOR.NODE_TEXT){var h=CKEDITOR.tools.rtrim(d.getText()),g=d.getLength();if(h)h.length<g&&(d.split(h.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{d.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(d=this.$.lastChild)&&1==d.type&&"br"==d.nodeName.toLowerCase()&&d.parentNode.removeChild(d)},isReadOnly:function(d){var h= 82this;this.type!=CKEDITOR.NODE_ELEMENT&&(h=this.getParent());CKEDITOR.env.edge&&h&&h.is("textarea","input")&&(d=!0);if(!d&&h&&"undefined"!=typeof h.$.isContentEditable)return!(h.$.isContentEditable||h.data("cke-editable"));for(;h;){if(h.data("cke-editable"))return!1;if(h.hasAttribute("contenteditable"))return"false"==h.getAttribute("contenteditable");h=h.getParent()}return!0}});CKEDITOR.dom.window=function(d){CKEDITOR.dom.domObject.call(this,d)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject; 83CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var d=this.$.document,h="CSS1Compat"==d.compatMode;return{width:(h?d.documentElement.clientWidth:d.body.clientWidth)||0,height:(h?d.documentElement.clientHeight:d.body.clientHeight)||0}},getScrollPosition:function(){var d=this.$;if("pageXOffset"in d)return{x:d.pageXOffset||0,y:d.pageYOffset||0};d=d.document;return{x:d.documentElement.scrollLeft||d.body.scrollLeft||0,y:d.documentElement.scrollTop|| 84d.body.scrollTop||0}},getFrame:function(){var d=this.$.frameElement;return d?new CKEDITOR.dom.element.get(d):null}});CKEDITOR.dom.document=function(d){CKEDITOR.dom.domObject.call(this,d)};CKEDITOR.dom.document.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(d){if(this.$.createStyleSheet)this.$.createStyleSheet(d);else{var h=new CKEDITOR.dom.element("link");h.setAttributes({rel:"stylesheet",type:"text/css", 85href:d});this.getHead().append(h)}},appendStyleText:function(d){if(this.$.createStyleSheet){var h=this.$.createStyleSheet("");h.cssText=d}else{var g=new CKEDITOR.dom.element("style",this);g.append(new CKEDITOR.dom.text(d,this));this.getHead().append(g)}return h||g.$.sheet},createElement:function(d,h){var g=new CKEDITOR.dom.element(d,this);h&&(h.attributes&&g.setAttributes(h.attributes),h.styles&&g.setStyles(h.styles));return g},createText:function(d){return new CKEDITOR.dom.text(d,this)},focus:function(){this.getWindow().focus()}, 86getActive:function(){var d;try{d=this.$.activeElement}catch(h){return null}return new CKEDITOR.dom.element(d)},getById:function(d){return(d=this.$.getElementById(d))?new CKEDITOR.dom.element(d):null},getByAddress:function(d,h){for(var g=this.$.documentElement,b=0;g&&b<d.length;b++){var f=d[b];if(h)for(var m=-1,l=0;l<g.childNodes.length;l++){var k=g.childNodes[l];if(!0!==h||3!=k.nodeType||!k.previousSibling||3!=k.previousSibling.nodeType)if(m++,m==f){g=k;break}}else g=g.childNodes[f]}return g?new CKEDITOR.dom.node(g): 87null},getElementsByTag:function(d,h){CKEDITOR.env.ie&&8>=document.documentMode||!h||(d=h+":"+d);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(d))},getHead:function(){var d=this.$.getElementsByTagName("head")[0];return d=d?new CKEDITOR.dom.element(d):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow|| 88this.$.defaultView)},write:function(d){this.$.open("text/html","replace");CKEDITOR.env.ie&&(d=d.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(d);this.$.close()},find:function(d){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(d))},findOne:function(d){return(d=this.$.querySelector(d))?new CKEDITOR.dom.element(d):null},_getHtml5ShivFrag:function(){var d=this.getCustomData("html5ShivFrag");d|| 89(d=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(d,!0),this.setCustomData("html5ShivFrag",d));return d}});CKEDITOR.dom.nodeList=function(d){this.$=d};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(d){return 0>d||d>=this.$.length?null:(d=this.$[d])?new CKEDITOR.dom.node(d):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(d){return new CKEDITOR.dom.node(d)})}};CKEDITOR.dom.element=function(d,h){"string"==typeof d&& 90(d=(h?h.$:document).createElement(d));CKEDITOR.dom.domObject.call(this,d)};CKEDITOR.dom.element.get=function(d){return(d="string"==typeof d?document.getElementById(d)||document.getElementsByName(d)[0]:d)&&(d.$?d:new CKEDITOR.dom.element(d))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(d,h){var g=new CKEDITOR.dom.element("div",h);g.setHtml(d);return g.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(d,h,g,b){var f=h.getCustomData("list_marker_id")|| 91h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");d[f]=h;m[g]=1;return h.setCustomData(g,b)};CKEDITOR.dom.element.clearAllMarkers=function(d){for(var h in d)CKEDITOR.dom.element.clearMarkers(d,d[h],1)};CKEDITOR.dom.element.clearMarkers=function(d,h,g){var b=h.getCustomData("list_marker_names"),f=h.getCustomData("list_marker_id"),m;
vendor: 7,712 bytes, lines 91-106
91for(m in b)h.removeCustomData(m); 92h.removeCustomData("list_marker_names");g&&(h.removeCustomData("list_marker_id"),delete d[f])};(function(){function d(b,c){return-1<(" "+b+" ").replace(m," ").indexOf(" "+c+" ")}function h(b){var c=!0;b.$.id||(b.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||b.removeAttribute("id")}}function g(b,c){var e=CKEDITOR.tools.escapeCss(b.$.id);return"#"+e+" "+c.split(/,\s*/).join(", #"+e+" ")}function b(b){for(var c=0,e=0,a=l[b].length;e<a;e++)c+=parseFloat(this.getComputedStyle(l[b][e])|| 930,10)||0;return c}var f=document.createElement("_").classList,f="undefined"!==typeof f&&null!==String(f.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g;CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:f?function(b){this.$.classList.add(b);return this}:function(b){var c=this.$.className;c&&(d(c,b)||(c+=" "+b));this.$.className=c||b;return this},removeClass:f?function(b){var c=this.$;c.classList.remove(b);c.className||c.removeAttribute("class");return this}:function(b){var c= 94this.getAttribute("class");c&&d(c,b)&&((c=c.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class",c):this.removeAttribute("class"));return this},hasClass:function(b){return d(this.$.className,b)},append:function(b,c){"string"==typeof b&&(b=this.getDocument().createElement(b));c?this.$.insertBefore(b.$,this.$.firstChild):this.$.appendChild(b.$);return b},appendHtml:function(b){if(this.$.childNodes.length){var c=new CKEDITOR.dom.element("div",this.getDocument()); 95c.setHtml(b);c.moveChildren(this)}else this.setHtml(b)},appendText:function(b){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version?this.$.text+=b:this.append(new CKEDITOR.dom.text(b))},appendBogus:function(b){if(b||CKEDITOR.env.needsBrFiller){for(b=this.getLast();b&&b.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(b.getText());)b=b.getPrevious();b&&b.is&&b.is("br")||(b=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&b.setAttribute("type","_moz"),this.append(b))}},breakParent:function(b, 96c){var e=new CKEDITOR.dom.range(this.getDocument());e.setStartAfter(this);e.setEndAfter(b);var a=e.extractContents(!1,c||!1),f;e.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(e=new CKEDITOR.dom.element("div");f=a.getFirst();)f.$.style.backgroundColor&&(f.$.style.backgroundColor=f.$.style.backgroundColor),e.append(f);e.insertAfter(this);e.remove(!0)}else a.insertAfterNode(this)},contains:document.compareDocumentPosition?function(b){return!!(this.$.compareDocumentPosition(b.$)& 9716)}:function(b){var c=this.$;return b.type!=CKEDITOR.NODE_ELEMENT?c.contains(b.getParent().$):c!=b.$&&c.contains(b.$)},focus:function(){function b(){try{this.$.focus()}catch(c){}}return function(c){c?CKEDITOR.tools.setTimeout(b,100,this):b.call(this)}}(),getHtml:function(){var b=this.$.innerHTML;return CKEDITOR.env.ie?b.replace(/<\?[^>]*>/g,""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(!0)); 98return b.innerHTML},getClientRect:function(b){var c=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&&(c.height=c.bottom-c.top);return b?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),c):c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(b){try{var c=this.$;if(this.getParent())return c.innerHTML=b;var e=this.getDocument()._getHtml5ShivFrag();e.appendChild(c);c.innerHTML=b;e.removeChild(c);return b}catch(a){this.$.innerHTML=""; 99c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=b;for(c=c.getChildren();c.count();)this.append(c.getItem(0));return b}}:function(b){return this.$.innerHTML=b},setText:function(){var b=document.createElement("p");b.innerHTML="x";b=b.textContent;return function(c){this.$[b?"textContent":"innerText"]=c}}(),getAttribute:function(){var b=function(c){return this.$.getAttribute(c,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c){switch(c){case "class":c= 100"className";break;case "http-equiv":c="httpEquiv";break;case "name":return this.$.name;case "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"): 101null}return this.$.getAttribute(c,2)}:b}(),getAttributes:function(b){var c={},e=this.$.attributes,a;b=CKEDITOR.tools.isArray(b)?b:[];for(a=0;a<e.length;a++)-1===CKEDITOR.tools.indexOf(b,e[a].name)&&(c[e[a].name]=e[a].value);return c},getChildren:function(){return new CKEDITOR.dom.nodeList(this.$.childNodes)},getClientSize:function(){return{width:this.$.clientWidth,height:this.$.clientHeight}},getComputedStyle:document.defaultView&&document.defaultView.getComputedStyle?function(b){var c=this.getWindow().$.getComputedStyle(this.$, 102null);return c?c.getPropertyValue(b):""}:function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]},getDtd:function(){var b=CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var b=this.$.tabIndex;return 0!==b||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?b:-1},getText:function(){return this.$.textContent||this.$.innerText||""}, 103getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name||null},getName:function(){var b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var c=this.$.scopeName;"HTML"!=c&&(b=c.toLowerCase()+":"+b)}this.getName=function(){return b};return this.getName()},getValue:function(){return this.$.value},getFirst:function(b){var c=this.$.firstChild;(c=c&&new CKEDITOR.dom.node(c))&&b&&!b(c)&&(c=c.getNext(b)); 104return c},getLast:function(b){var c=this.$.lastChild;(c=c&&new CKEDITOR.dom.node(c))&&b&&!b(c)&&(c=c.getPrevious(b));return c},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if("object"==typeof arguments[0])return!!arguments[0][b];for(var c=0;c<arguments.length;c++)if(arguments[c]==b)return!0;return!1},isEditable:function(b){var c=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")|| 105CKEDITOR.dtd.$nonEditable[c]||CKEDITOR.dtd.$empty[c]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==b?(b=CKEDITOR.dtd[c]||CKEDITOR.dtd.span,!(!b||!b["#"])):!0},isIdentical:function(b){var c=this.clone(0,1);b=b.clone(0,1);c.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);b.removeAttributes(["_moz_dirty","data-cke-expando","data-cke-saved-href","data-cke-saved-name"]);if(c.$.isEqualNode)return c.$.style.cssText= 106CKEDITOR.tools.normalizeCssText(c.$.style.cssText),b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),c.$.isEqualNode(b.$);c=c.getOuterHtml();b=b.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var e=this.getParent();e.type==CKEDITOR.NODE_ELEMENT&&(e=e.clone(),e.setHtml(c),c=e.getHtml(),e.setHtml(b),b=e.getHtml())}return c==b},isVisible:function(){var b=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"
vendor: 5,804 bytes, lines 106-118
106!=this.getComputedStyle("visibility"),c,e;b&&CKEDITOR.env.webkit&& 107(c=this.getWindow(),!c.equals(CKEDITOR.document.getWindow())&&(e=c.$.frameElement)&&(b=(new CKEDITOR.dom.element(e)).isVisible()));return!!b},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var b=this.getChildren(),c=0,e=b.count();c<e;c++){var a=b.getItem(c);if(a.type!=CKEDITOR.NODE_ELEMENT||!a.data("cke-bookmark"))if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEmptyInlineRemoveable()||a.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(a.getText()))return!1}return!0}, 108hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var b=this.$.attributes,c=0;c<b.length;c++){var e=b[c];switch(e.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue;default:if(e.specified)return!0}}return!1}:function(){var b=this.$.attributes,c=b.length,e={"data-cke-expando":1,_moz_dirty:1};return 0<c&&(2<c||!e[b[0].nodeName]||2==c&&!e[b[1].nodeName])},hasAttribute:function(){function b(c){var e=this.$.attributes.getNamedItem(c); 109if("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 e?e.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(c){return"name"==c?!!this.$.name:b.call(this,c)}:b:function(c){return!!this.$.attributes.getNamedItem(c)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(b,c){var e=this.$; 110b=b.$;if(e!=b){var a;if(c)for(;a=e.lastChild;)b.insertBefore(e.removeChild(a),b.firstChild);else for(;a=e.firstChild;)b.appendChild(e.removeChild(a))}},mergeSiblings:function(){function b(c,e,a){if(e&&e.type==CKEDITOR.NODE_ELEMENT){for(var f=[];e.data("cke-bookmark")||e.isEmptyInlineRemoveable();)if(f.push(e),e=a?e.getNext():e.getPrevious(),!e||e.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(e)){for(var d=a?c.getLast():c.getFirst();f.length;)f.shift().move(c,!a);e.moveChildren(c,!a);e.remove(); 111d&&d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings()}}}return function(c){if(!1===c||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))b(this,this.getNext(),!0),b(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(c,b){this.$.setAttribute(c,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c,e){"class"==c?this.$.className=e:"style"==c?this.$.style.cssText=e:"tabindex"==c? 112this.$.tabIndex=e:"checked"==c?this.$.checked=e:"contenteditable"==c?b.call(this,"contentEditable",e):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,e){if("src"==c&&e.match(/^http:\/\//))try{b.apply(this,arguments)}catch(a){}else b.apply(this,arguments);return this}:b}(),setAttributes:function(b){for(var c in b)this.setAttribute(c,b[c]);return this},setValue:function(b){this.$.value=b;return this},removeAttribute:function(){var b=function(c){this.$.removeAttribute(c)}; 113return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c){"class"==c?c="className":"tabindex"==c?c="tabIndex":"contenteditable"==c&&(c="contentEditable");this.$.removeAttribute(c)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var c=0;c<b.length;c++)this.removeAttribute(b[c]);else for(c in b=b||this.getAttributes(),b)b.hasOwnProperty(c)&&this.removeAttribute(c)},removeStyle:function(b){var c=this.$.style;if(c.removeProperty||"border"!=b&&"margin"!=b&&"padding"!= 114b)c.removeProperty?c.removeProperty(b):c.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(b)),this.$.style.cssText||this.removeAttribute("style");else{var e=["top","left","right","bottom"],a;"border"==b&&(a=["color","style","width"]);for(var c=[],f=0;f<e.length;f++)if(a)for(var d=0;d<a.length;d++)c.push([b,e[f],a[d]].join("-"));else c.push([b,e[f]].join("-"));for(b=0;b<c.length;b++)this.removeStyle(c[b])}},setStyle:function(b,c){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]=c;return this},setStyles:function(b){for(var c in b)this.setStyle(c, 115b[c]);return this},setOpacity:function(b){CKEDITOR.env.ie&&9>CKEDITOR.env.version?(b=Math.round(100*b),this.setStyle("filter",100<=b?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+b+")")):this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var b,c=this.getElementsByTag("*"),e=0,a=c.count();e<a;e++)b=c.getItem(e),b.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var b= 116this;"html"!=b.getName();){if("static"!=b.getComputedStyle("position"))return b;b=b.getParent()}return null},getDocumentPosition:function(b){var c=0,e=0,a=this.getDocument(),f=a.getBody(),d="BackCompat"==a.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie?8!==CKEDITOR.env.version:1)){var g=this.$.getBoundingClientRect(),h=a.$.documentElement,l=h.clientTop||f.$.clientTop||0,u=h.clientLeft||f.$.clientLeft||0,m=!0;CKEDITOR.env.ie&&(m=a.getDocumentElement().contains(this), 117a=a.getBody().contains(this),m=d&&a||!d&&m);m&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(c=f.$.scrollLeft||h.scrollLeft,e=f.$.scrollTop||h.scrollTop):(e=d?f.$:h,c=e.scrollLeft,e=e.scrollTop),c=g.left+c-u,e=g.top+e-l)}else for(l=this,u=null;l&&"body"!=l.getName()&&"html"!=l.getName();){c+=l.$.offsetLeft-l.$.scrollLeft;e+=l.$.offsetTop-l.$.scrollTop;l.equals(this)||(c+=l.$.clientLeft||0,e+=l.$.clientTop||0);for(;u&&!u.equals(l);)c-=u.$.scrollLeft,e-=u.$.scrollTop,u=u.getParent(); 118u=l;l=(g=l.$.offsetParent)?new CKEDITOR.dom.element(g):null}
vendor: 5,054 bytes, lines 118-128
118b&&(g=this.getWindow(),l=b.getWindow(),!g.equals(l)&&g.$.frameElement&&(b=(new CKEDITOR.dom.element(g.$.frameElement)).getDocumentPosition(b),c+=b.x,e+=b.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko||d||(c+=this.$.clientLeft?1:0,e+=this.$.clientTop?1:0);return{x:c,y:e}},scrollIntoView:function(b){var c=this.getParent();if(c){do if((c.$.clientWidth&&c.$.clientWidth<c.$.scrollWidth||c.$.clientHeight&&c.$.clientHeight< 119c.$.scrollHeight)&&!c.is("body")&&this.scrollIntoParent(c,b,1),c.is("html")){var e=c.getWindow();try{var a=e.$.frameElement;a&&(c=new CKEDITOR.dom.element(a))}catch(f){}}while(c=c.getParent())}},scrollIntoParent:function(b,c,e){var a,f,d,g;function h(a,c){/body|html/.test(b.getName())?b.getWindow().$.scrollBy(a,c):(b.$.scrollLeft+=a,b.$.scrollTop+=c)}function l(a,b){var c={x:0,y:0};if(!a.is(m?"body":"html")){var e=a.$.getBoundingClientRect();c.x=e.left;c.y=e.top}e=a.getWindow();e.equals(b)||(e=l(CKEDITOR.dom.element.get(e.$.frameElement), 120b),c.x+=e.x,c.y+=e.y);return c}function u(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!b&&(b=this.getWindow());d=b.getDocument();var m="BackCompat"==d.$.compatMode;b instanceof CKEDITOR.dom.window&&(b=m?d.getBody():d.getDocumentElement());CKEDITOR.env.webkit&&(d=this.getEditor(!1))&&(d._.previousScrollTop=null);d=b.getWindow();f=l(this,d);var p=l(b,d),z=this.$.offsetHeight;a=this.$.offsetWidth;var v=b.$.clientHeight,q=b.$.clientWidth;d=f.x-u(this,"left")-p.x||0;g=f.y-u(this,"top")- 121p.y||0;a=f.x+a+u(this,"right")-(p.x+q)||0;f=f.y+z+u(this,"bottom")-(p.y+v)||0;(0>g||0<f)&&h(0,!0===c?g:!1===c?f:0>g?g:f);e&&(0>d||0<a)&&h(0>d?d:a,0)},setState:function(b,c,e){c=c||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+"_off");this.removeClass(c+"_disabled");e&&this.setAttribute("aria-pressed",!0);e&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on"); 122e&&this.setAttribute("aria-disabled",!0);e&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off"),this.removeClass(c+"_on"),this.removeClass(c+"_disabled"),e&&this.removeAttribute("aria-pressed"),e&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(c){b.src=b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,c){var e=this.$.attributes;c=c||{};for(var a=0;a<e.length;a++){var f= 123e[a],d=f.nodeName.toLowerCase(),g;if(!(d in c))if("checked"==d&&(g=this.getAttribute(d)))b.setAttribute(d,g);else if(!CKEDITOR.env.ie||this.hasAttribute(d))g=this.getAttribute(d),null===g&&(g=f.nodeValue),b.setAttribute(d,g)}""!==this.$.style.cssText&&(b.$.style.cssText=this.$.style.cssText)},renameNode:function(b){if(this.getName()!=b){var c=this.getDocument();b=new CKEDITOR.dom.element(b,c);this.copyAttributes(b);this.moveChildren(b);this.getParent(!0)&&this.$.parentNode.replaceChild(b.$,this.$); 124b.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=b.$;delete this.getName}},getChild:function(){function b(c,e){var a=c.childNodes;if(0<=e&&e<a.length)return a[e]}return function(c){var e=this.$;if(c.slice)for(c=c.slice();0<c.length&&e;)e=b(e,c.shift());else e=b(e,c);return e?new CKEDITOR.dom.node(e):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function b(c){return c.type==CKEDITOR.NODE_ELEMENT&&c.hasClass("cke_enable_context_menu")}this.on("contextmenu", 125function(c){c.data.getTarget().getAscendant(b,!0)||c.data.preventDefault()})},getDirection:function(b){return b?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir||"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(b,c){b="data-"+b;if(void 0===c)return this.getAttribute(b);!1===c?this.removeAttribute(b):this.setAttribute(b,c);return null},getEditor:function(b){var c=CKEDITOR.instances,e,a,f;b= 126b||void 0===b;for(e in c)if(a=c[e],a.element.equals(this)&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!b&&(f=a.editable())&&(f.equals(this)||f.contains(this)))return a;return null},find:function(b){var c=h(this);b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(g(this,b)));c();return b},findOne:function(b){var c=h(this);b=this.$.querySelector(g(this,b));c();return b?new CKEDITOR.dom.element(b):null},forEach:function(b,c,e){if(!(e||c&&this.type!=c))var a=b(this);if(!1!==a){e=this.getChildren(); 127for(var f=0;f<e.count();f++)a=e.getItem(f),a.type==CKEDITOR.NODE_ELEMENT?a.forEach(b,c):c&&a.type!=c||b(a)}},fireEventHandler:function(b,c){var e="on"+b,a=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var f=a.ownerDocument.createEventObject(),d;for(d in c)f[d]=c[d];a.fireEvent(e,f)}else a[a[b]?b:e](c)},isDetached:function(){var b=this.getDocument(),c=b.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!b.$.defaultView: 128!1:!0}
vendor: 8,718 bytes, lines 128-145
128});var l={width:["border-left-width","border-right-width","padding-left","padding-right"],height:["border-top-width","border-bottom-width","padding-top","padding-bottom"]};CKEDITOR.dom.element.prototype.setSize=function(f,c,e){"number"==typeof c&&(!e||CKEDITOR.env.ie&&CKEDITOR.env.quirks||(c-=b.call(this,f)),this.setStyle(f,c+"px"))};CKEDITOR.dom.element.prototype.getSize=function(f,c){var e=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(f)],this.$["client"+CKEDITOR.tools.capitalize(f)])|| 1290;c&&(e-=b.call(this,f));return e}})();CKEDITOR.dom.documentFragment=function(d){d=d||CKEDITOR.document;this.$=d.type==CKEDITOR.NODE_DOCUMENT?d.$.createDocumentFragment():d};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,insertAfterNode:function(d){d=d.$;d.parentNode.insertBefore(this.$,d.nextSibling)},getHtml:function(){var d=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(d);return d.getHtml().replace(/\s*data-cke-expando=".*?"/g, 130"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1});(function(){function d(a,b){var c=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(c.collapsed)return this.end(), 131null;c.optimize()}var e,f=c.startContainer;e=c.endContainer;var d=c.startOffset,g=c.endOffset,n,h=this.guard,q=this.type,l=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var k=e.type==CKEDITOR.NODE_ELEMENT?e:e.getParent(),m=e.type==CKEDITOR.NODE_ELEMENT?e.getChild(g):e.getNext();this._.guardLTR=function(a,b){return(!b||!k.equals(a))&&(!m||!a.equals(m))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}if(a&&!this._.guardRTL){var G=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(), 132F=f.type==CKEDITOR.NODE_ELEMENT?d?f.getChild(d-1):null:f.getPrevious();this._.guardRTL=function(a,b){return(!b||!G.equals(a))&&(!F||!a.equals(F))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(c.root))}}var J=a?this._.guardRTL:this._.guardLTR;n=h?function(a,b){return!1===J(a,b)?!1:h(a,b)}:J;this.current?e=this.current[l](!1,q,n):(a?e.type==CKEDITOR.NODE_ELEMENT&&(e=0<g?e.getChild(g-1):!1===n(e,!0)?null:e.getPreviousSourceNode(!0,q,n)):(e=f,e.type==CKEDITOR.NODE_ELEMENT&&((e=e.getChild(d))||(e=!1=== 133n(f,!0)?null:f.getNextSourceNode(!0,q,n)))),e&&!1===n(e)&&(e=null));for(;e&&!this._.end;){this.current=e;if(!this.evaluator||!1!==this.evaluator(e)){if(!b)return e}else if(b&&this.evaluator)return!1;e=e[l](!1,q,n)}this.end();return this.current=null}function h(a){for(var b,c=null;b=d.call(this,a);)c=b;return c}CKEDITOR.dom.walker=CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return d.call(this)},previous:function(){return d.call(this, 1341)},checkForward:function(){return!1!==d.call(this,0,1)},checkBackward:function(){return!1!==d.call(this,1,1)},lastForward:function(){return h.call(this)},lastBackward:function(){return h.call(this,1)},reset:function(){delete this.current;this._={}}}});var g={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1,"table-footer-group":1,"table-row":1,"table-column-group":1,"table-column":1,"table-cell":1,"table-caption":1},b={absolute:1,fixed:1};CKEDITOR.dom.element.prototype.isBlockBoundary= 135function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in b||!g[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(b){return!(b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function c(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")} 136return function(e){var f,d;f=e&&e.type!=CKEDITOR.NODE_ELEMENT&&(d=e.getParent())&&c(d);f=a?f:f||c(e);return!!(b^f)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var c;b&&b.type==CKEDITOR.NODE_TEXT&&(c=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^c)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.env.webkit?1:0;return function(e){b(e)?e=1:(e.type==CKEDITOR.NODE_TEXT&& 137(e=e.getParent()),e=e.$.offsetWidth<=c);return!!(a^e)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(c){return!!(b^c.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!m(a)&&!l(a)}return function(c){var e=CKEDITOR.env.needsBrFiller?c.is&&c.is("br"):c.getText&&f.test(c.getText());e&&(e=c.getParent(),c=c.getNext(b),e=e.isBlockBoundary()&&(!c||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()));return!!(a^e)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!= 138CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var f=/^[\t\r\n ]*(?: |\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),k=CKEDITOR.dom.walker.temp(),c=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(a){return function(b){b=m(b)||l(b)||k(b);return!!(a^b)}};var e=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty= 139function(a){return function(b){for(var c=0,f=b.getChildCount();c<f;++c)if(!e(b.getChild(c)))return!!a;return!a}};var a=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable=function(b){return function(c){c=e(c)?!1:c.type==CKEDITOR.NODE_TEXT||c.type==CKEDITOR.NODE_ELEMENT&&(c.is(CKEDITOR.dtd.$inline)||c.is("hr")|| 140"false"==c.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&c.is(n)&&a(c))?!0:!1;return!!(b^c)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(c(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&f.test(a.getText()))?a:!1}})();CKEDITOR.dom.range=function(d){this.endOffset=this.endContainer=this.startOffset=this.startContainer=null;this.collapsed=!0;var h=d instanceof CKEDITOR.dom.document;this.document=h?d:d.getDocument(); 141this.root=h?d.getBody():d};(function(){function d(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function h(a,b,c,e,f){function d(a,b,c,e){var g=c?a.getPrevious():a.getNext();if(e&&l)return g;m||e?b.append(a.clone(!0,f),c):(a.remove(),k&&b.append(a,c));return g}function g(){var a,b,c,e=Math.min(H.length,K.length);for(a=0;a<e;a++)if(b=H[a],c=K[a],!b.equals(c))return a;return a-1}function h(){var b=E-1,c=J&&I&&!q.equals(A);b<T-1|| 142b<O-1||c?(c?a.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START):O==b+1&&F?a.moveToPosition(K[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(K[b+1],CKEDITOR.POSITION_BEFORE_START),e&&(b=H[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),b.mergeSiblings(!1),a.moveToBookmark({startNode:c}))):a.collapse(!0)}a.optimizeBookmark();var l=0===b,k=1==b,m=2==b;b=m|| 143k;var q=a.startContainer,A=a.endContainer,B=a.startOffset,C=a.endOffset,G,F,J,I,D,M;if(m&&A.type==CKEDITOR.NODE_TEXT&&(q.equals(A)||q.type===CKEDITOR.NODE_ELEMENT&&q.getFirst().equals(A)))c.append(a.document.createText(A.substring(B,C)));else{A.type==CKEDITOR.NODE_TEXT?m?M=!0:A=A.split(C):0<A.getChildCount()?C>=A.getChildCount()?(A=A.getChild(C-1),F=!0):A=A.getChild(C):I=F=!0;q.type==CKEDITOR.NODE_TEXT?m?D=!0:q.split(B):0<q.getChildCount()?0===B?(q=q.getChild(B),G=!0):q=q.getChild(B-1):J=G=!0;for(var H= 144q.getParents(),K=A.getParents(),E=g(),T=H.length-1,O=K.length-1,N=c,Y,R,X,ea=-1,L=E;L<=T;L++){R=H[L];X=R.getNext();for(L!=T||R.equals(K[L])&&T<O?b&&(Y=N.append(R.clone(0,f))):G?d(R,N,!1,J):D&&N.append(a.document.createText(R.substring(B)));X;){if(X.equals(K[L])){ea=L;break}X=d(X,N)}N=Y}N=c;for(L=E;L<=O;L++)if(c=K[L],X=c.getPrevious(),c.equals(H[L]))b&&(N=N.getChild(0));else{L!=O||c.equals(H[L])&&O<T?b&&(Y=N.append(c.clone(0,f))):F?d(c,N,!1,I):M&&N.append(a.document.createText(c.substring(0,C)));if(L> 145ea)for(;X;)X=d(X,N,!0);N=Y}m||h()}}
145function g(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),e=CKEDITOR.dom.walker.bogus();return function(f){return c(f)||b(f)?!0:e(f)&&!a?a=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(m)?!1:!0}}function b(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(e){return c(e)||b(e)?!0:!a&&l(e)||e.type==CKEDITOR.NODE_ELEMENT&& 146e.is(CKEDITOR.dtd.$removeEmpty)}}function f(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&e(a)&&(b=a);return c(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(),k=/^[\t\r\n ]*(?: |\xa0)$/,c=CKEDITOR.dom.walker.editable(),e=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype= 147{clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document); 148this.collapsed||h(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,c,a,"undefined"==typeof b?!0:b);return c},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&&this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var b; 149if(b=a.data&&a.data("cke-temp"))b=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return b},!0)}var c=this.startContainer,e=this.endContainer,f=this.collapsed,d,g,h,l;d=this.document.createElement("span");d.data("cke-bookmark",1);d.setStyle("display","none");d.setHtml("\x26nbsp;");a&&(h="cke_bm_"+CKEDITOR.tools.getNextNumber(),d.setAttribute("id",h+(f?"C":"S")));f||(g=d.clone(),g.setHtml("\x26nbsp;"),a&&g.setAttribute("id",h+"E"),l=this.clone(),b(e)&&(e=b(e), 150l.moveToPosition(e,CKEDITOR.POSITION_AFTER_END)),l.collapse(),l.insertNode(g));l=this.clone();b(c)&&(e=b(c),l.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START));l.collapse(!0);l.insertNode(d);g?(this.setStartAfter(d),this.setEndBefore(g)):this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END);return{startNode:a?h+(f?"C":"S"):d,endNode:a?h+"E":g,serializable:a,collapsed:f}},createBookmark2:function(){function a(a){var b=a.container,e=a.offset,f;f=b;var d=e;f=f.type!=CKEDITOR.NODE_ELEMENT||0===d||d==f.getChildCount()? 1510:f.getChild(d-1).type==CKEDITOR.NODE_TEXT&&f.getChild(d).type==CKEDITOR.NODE_TEXT;f&&(b=b.getChild(e-1),e=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<e){a:{for(f=b;e--;)if(d=f.getChild(e).getIndex(!0),0<=d){e=d;break a}e=-1}e+=1}if(b.type==CKEDITOR.NODE_TEXT){f=b;for(d=0;(f=f.getPrevious())&&f.type==CKEDITOR.NODE_TEXT;)d+=f.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;f=d;b.isEmpty()?(d=b.getPrevious(c),f?(e=f,b=d?d.getNext():b.getParent().getFirst()):(b=b.getParent(), 152e=d?d.getIndex(!0)+1:0)):e+=f}a.container=b;a.offset=e}function b(a,c){var e=c.getCustomData("cke-fillingChar");if(e){var f=a.container;e.equals(f)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=f.getIndex(),a.container=f.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var e=this.collapsed,f={container:this.startContainer,offset:this.startOffset},d={container:this.endContainer,offset:this.endOffset};c&&(a(f),b(f,this.root), 153e||(a(d),b(d,this.root)));return{start:f.container.getAddress(c),end:e?null:d.container.getAddress(c),startOffset:f.offset,endOffset:d.offset,normalized:c,collapsed:e,is2:!0}}}
vendor: 16,176 bytes, lines 153-184
153(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,e=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);e?this.setEnd(e,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode,a=c?this.document.getById(a.endNode): 154a.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,e=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT)if(f=a.getChildCount(),f>c)a=a.getChild(c);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(),f>e)b=b.getChild(e).getPreviousSourceNode(!0); 155else if(1>f)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,e=this.endContainer,c=c.equals(e)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(e);return b&&!c.is?c.getParent():c},optimize:function(){var a=this.startContainer,b=this.startOffset; 156a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a, 157b){var c=this.startContainer,e=this.startOffset,f=this.collapsed;if((!a||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(e)if(e>=c.getLength())e=c.getIndex()+1,c=c.getParent();else{var d=c.split(e),e=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(d,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else e=c.getIndex(),c=c.getParent();this.setStart(c,e);if(f){this.collapse(!0);return}}c=this.endContainer;e=this.endOffset;b||f||!c||c.type!= 158CKEDITOR.NODE_TEXT||(e?(e>=c.getLength()||c.split(e),e=c.getIndex()+1):e=c.getIndex(),c=c.getParent(),this.setEnd(c,e))},enlarge:function(a,b){function c(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var e=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var f=1;case CKEDITOR.ENLARGE_ELEMENT:var d=function(a,b){var c=new CKEDITOR.dom.range(h);c.setStart(a,b);c.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),f;for(c.guard= 159function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};f=c.next();){if(f.type!=CKEDITOR.NODE_TEXT)return!1;G=f!=a?f.getText():f.substring(b);if(e.test(G))return!1}return!0};if(this.collapsed)break;var g=this.getCommonAncestor(),h=this.root,l,m,k,q,A,B=!1,C,G;C=this.startContainer;var F=this.startOffset;C.type==CKEDITOR.NODE_TEXT?(F&&(C=!CKEDITOR.tools.trim(C.substring(0,F)).length&&C,B=!!C),C&&((q=C.getPrevious())||(k=C.getParent()))):(F&&(q=C.getChild(F-1)||C.getLast()),q||(k=C)); 160for(k=c(k);k||q;){if(k&&!q){!A&&k.equals(g)&&(A=!0);if(f?k.isBlockBoundary():!h.contains(k))break;B&&"inline"==k.getComputedStyle("display")||(B=!1,A?l=k:this.setStartBefore(k));q=k.getPrevious()}for(;q;)if(C=!1,q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT)G=q.getText(),e.test(G)&&(q=null),C=/[\s\ufeff]$/.test(G);else if((q.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&q.is("br"))&&!q.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[q.getName()]){G=q.getText(); 161if(e.test(G))q=null;else for(var F=q.$.getElementsByTagName("*"),J=0,I;I=F[J++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){q=null;break}q&&(C=!!G.length)}else q=null;C&&(B?A?l=k:k&&this.setStartBefore(k):B=!0);if(q){C=q.getPrevious();if(!k&&!C){k=q;q=null;break}q=C}else k=null}k&&(k=c(k.getParent()))}C=this.endContainer;F=this.endOffset;k=q=null;A=B=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(F)).length?B=!0:(B=!C.getLength(),F==C.getLength()?(q=C.getNext())||(k=C.getParent()): 162d(C,F)&&(k=C.getParent())):(q=C.getChild(F))||(k=C);for(;k||q;){if(k&&!q){!A&&k.equals(g)&&(A=!0);if(f?k.isBlockBoundary():!h.contains(k))break;B&&"inline"==k.getComputedStyle("display")||(B=!1,A?m=k:k&&this.setEndAfter(k));q=k.getNext()}for(;q;){C=!1;if(q.type==CKEDITOR.NODE_TEXT)G=q.getText(),d(q,0)||(q=null),C=/^[\s\ufeff]/.test(G);else if(q.type==CKEDITOR.NODE_ELEMENT){if((0<q.$.offsetWidth||b&&q.is("br"))&&!q.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[q.getName()]){G=q.getText();if(e.test(G))q= 163null;else for(F=q.$.getElementsByTagName("*"),J=0;I=F[J++];)if(!CKEDITOR.dtd.$removeEmpty[I.nodeName.toLowerCase()]){q=null;break}q&&(C=!!G.length)}else q=null}else C=1;C&&B&&(A?m=k:this.setEndAfter(k));if(q){C=q.getNext();if(!k&&!C){k=q;q=null;break}q=C}else k=null}k&&(k=c(k.getParent()))}l&&m&&(g=l.contains(m)?m:l,this.setStartBefore(g),this.setEndAfter(g));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:k=new CKEDITOR.dom.range(this.root);h=this.root;k.setStartAt(h, 164CKEDITOR.POSITION_AFTER_START);k.setEnd(this.startContainer,this.startOffset);k=new CKEDITOR.dom.walker(k);var D,M,H=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),K=null,E=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(K){if(K.equals(a)){K=null;return}}else K=a;else if(K)return;var b=H(a);b||(D=a);return b},f=function(a){var b=E(a);!b&&a.is&&a.is("br")&&(M=a);return b};k.guard=E;k=k.lastBackward();D=D||h;this.setStartAt(D, 165!D.is("br")&&(!k&&this.checkStartOfBlock()||k&&D.contains(k))?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_AFTER_END);if(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS){k=this.clone();k=new CKEDITOR.dom.walker(k);var T=CKEDITOR.dom.walker.whitespaces(),O=CKEDITOR.dom.walker.bookmark();k.evaluator=function(a){return!T(a)&&!O(a)};if((k=k.previous())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br"))break}k=this.clone();k.collapse();k.setEndAt(h,CKEDITOR.POSITION_BEFORE_END);k=new CKEDITOR.dom.walker(k);k.guard= 166a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?f:E;D=K=M=null;k=k.lastForward();D=D||h;this.setEndAt(D,!k&&this.checkEndOfBlock()||k&&D.contains(k)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);M&&this.setEndAfter(M)}},shrink:function(a,b,c){var e="boolean"===typeof c?c:c&&"boolean"===typeof c.shrinkOnBlockBoundary?c.shrinkOnBlockBoundary:!0,f=c&&c.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var d=this.clone(),g=this.startContainer,k=this.endContainer,h=this.startOffset,l=this.endOffset, 167m=c=1;g&&g.type==CKEDITOR.NODE_TEXT&&(h?h>=g.getLength()?d.setStartAfter(g):(d.setStartBefore(g),c=0):d.setStartBefore(g));k&&k.type==CKEDITOR.NODE_TEXT&&(l?l>=k.getLength()?d.setEndAfter(k):(d.setEndAfter(k),m=0):d.setEndBefore(k));var d=new CKEDITOR.dom.walker(d),q=CKEDITOR.dom.walker.bookmark(),A=CKEDITOR.dom.walker.bogus();d.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var B;d.guard=function(b,c){if(f&&A(b)||q(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&& 168b.type==CKEDITOR.NODE_TEXT||c&&b.equals(B)||!1===e&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(B=b);return!0};c&&(g=d[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(g,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);m&&(d.reset(),(d=d[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(d,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END)); 169return!(!c&&!m)}},insertNode:function(a){this.optimizeBookmark();this.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, 170a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||(this._setEndContainer(a),this.endOffset=b);d(this)},setEnd:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a), 171this.startOffset=b);d(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a, 172a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}d(this)},setEndAt:function(a,b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a,a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}d(this)},fixBlock:function(a, 173b){var c=this.createBookmark(),e=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(e);e.trim();this.insertNode(e);var f=e.getBogus();f&&f.remove();e.appendBogus();this.moveToBookmark(c);return e},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),e=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=c.block,d=e.block,g=null;if(!c.blockLimit.equals(e.blockLimit))return null;"br"!= 174a&&(f||(f=this.fixBlock(!0,a),d=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),d||(d=this.fixBlock(!1,a)));c=f&&this.checkStartOfBlock();e=d&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(d)&&(e?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(d,CKEDITOR.POSITION_AFTER_END),d=null):c?(g=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f=null):(d=this.splitElement(f,b|| 175!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:d,wasStartOfBlock:c,wasEndOfBlock:e,elementPath:g}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),e=a.clone(!1,b||!1);c.appendTo(e);e.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return e},removeEmptyBlocksAtEnd:function(){function a(a){return function(e){return b(e)||c(e)||e.type==CKEDITOR.NODE_ELEMENT&&e.isEmptyInlineRemoveable()|| 176a.is("table")&&e.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),e=this[b?"endPath":"startPath"](),f=e.block||e.blockLimit,d;f&&!f.equals(e.root)&&!f.getFirst(a(f));)d=f.getParent(),this[b?"setEndAt":"setStartAt"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=d;this.moveToBookmark(c)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer, 177this.root)},checkBoundaryOfElement:function(a,c){var e=c==CKEDITOR.START,f=this.clone();f.collapse(e);f[e?"setStartAt":"setEndAt"](a,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=b(e);return f[e?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,b=this.startOffset;CKEDITOR.env.ie&&b&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0,b)),k.test(a)&&this.trim(0,1));this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer, 178this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=g();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,b=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(b)),k.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END); 179a=new CKEDITOR.dom.walker(b);a.evaluator=g();return a.checkForward()},getPreviousNode:function(a,b,c){var e=this.clone();e.collapse(1);e.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var e=this.clone();e.collapse();e.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(e);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(a,b){for(;a;){if(a.type== 180CKEDITOR.NODE_ELEMENT){if("false"==a.getAttribute("contentEditable")&&!a.data("cke-editable"))return 0;if(a.is("html")||"true"==a.getAttribute("contentEditable")&&(a.contains(b)||a.equals(b)))break}a=a.getParent()}return 1}return function(){var b=this.startContainer,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), 181!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); 182else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var f=a,d=c,g=void 0;f.type==CKEDITOR.NODE_ELEMENT&&f.isEditable(!1)&&(g=f[b?"getLast":"getFirst"](e));d||g||(g=f[b?"getPrevious":"getNext"](e));a=g}return!!c},moveToClosestEditablePosition:function(a,b){var c,e=0,f,d,g=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,g[b?0:1])):c=this.clone();if(a&& 183!a.is(CKEDITOR.dtd.$block))e=1;else if(f=c[b?"getNextEditableNode":"getPreviousEditableNode"]())e=1,(d=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?(c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&d&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(f,0),c.collapse()):c.moveToPosition(f,g[b?1:0]);e&&this.moveToRange(c);return!!e},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)}, 184moveToElementEditEnd: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.whitespace
vendor: 5,155 bytes, lines 184-194
184s(!0);a.evaluator=function(a){return c(a)&&b(a)};var e=a.next();a.reset();return e&&e.equals(a.previous())?e:null},getTouchedStartNode:function(){var a=this.startContainer; 185return 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:f(),getPreviousEditableNode:f(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),c=this.getTouchedEndNode(),e=b.getAscendant("table",!0),c=c.getAscendant("table",!0);return e&&!this.root.contains(e)? 186null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):e&&c&&(e.equals(c)||e.contains(c)||c.contains(e))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,e,f=this.clone();f.optimize();(e=f.startContainer.type==CKEDITOR.NODE_TEXT)?(c=f.startContainer.getText(),b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView();e&&(f.startContainer.setText(c), 187b.remove());a.remove()},getClientRects:function(){function a(a,b){var c=CKEDITOR.tools.array.map(a,function(a){return a}),e=new CKEDITOR.dom.range(b.root),f,d,g;b.startContainer instanceof CKEDITOR.dom.element&&(d=0===b.startOffset&&b.startContainer.hasAttribute("data-widget"));b.endContainer instanceof CKEDITOR.dom.element&&(g=(g=b.endOffset===(b.endContainer.getChildCount?b.endContainer.getChildCount():b.endContainer.length))&&b.endContainer.hasAttribute("data-widget"));d&&e.setStart(b.startContainer.getParent(), 188b.startContainer.getIndex());g&&e.setEnd(b.endContainer.getParent(),b.endContainer.getIndex()+1);if(d||g)b=e;e=b.cloneContents().find("[data-cke-widget-id]").toArray();if(e=CKEDITOR.tools.array.map(e,function(a){var c=b.root.editor;a=a.getAttribute("data-cke-widget-id");return c.widgets.instances[a].element}))return e=CKEDITOR.tools.array.map(e,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;f=this.root.getDocument().$.createRange();f.setStart(b.getParent().$,b.getIndex()); 189f.setEnd(b.getParent().$,b.getIndex()+1);b=f.getClientRects();b.widgetRect=a.getClientRect();return b},b),CKEDITOR.tools.array.forEach(e,function(a){function b(f){CKEDITOR.tools.array.forEach(c,function(b,d){var g=CKEDITOR.tools.objectCompare(a[f],b);g||(g=CKEDITOR.tools.objectCompare(a.widgetRect,b));g&&(Array.prototype.splice.call(c,d,a.length-f,a.widgetRect),e=!0)});e||(f<c.length-1?b(f+1):c.push(a.widgetRect))}var e;b(0)}),c}function b(a,c,f){var d;c.collapsed?f.startContainer instanceof CKEDITOR.dom.element? 190(a=f.checkStartOfBlock(),d=new CKEDITOR.dom.text("\u200b"),a?f.startContainer.append(d,!0):0===f.startOffset?d.insertBefore(f.startContainer.getFirst()):(f=f.startContainer.getChildren().getItem(f.startOffset-1),d.insertAfter(f)),c.setStart(d.$,0),c.setEnd(d.$,0),a=c.getClientRects(),d.remove()):f.startContainer instanceof CKEDITOR.dom.text&&(""===f.startContainer.getText()?(f.startContainer.setText("\u200b"),a=c.getClientRects(),f.startContainer.setText("")):a=[e(f.createBookmark())]):a=[e(f.createBookmark())]; 191return a}function c(a,b,e){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(e.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a}function e(a){var b=a.startNode;a=a.endNode;var c;b.setText("\u200b");b.removeStyle("display");a?(a.setText("\u200b"),a.removeStyle("display"),c=[b.getClientRect(),a.getClientRect()],a.remove()):c=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(c[0].right,c[1].right), 192bottom:Math.max(c[0].bottom,c[1].bottom),left:Math.min(c[0].left,c[1].left),top:Math.min(c[0].top,c[1].top),width:Math.abs(c[0].left-c[1].left),height:Math.max(c[0].bottom,c[1].bottom)-Math.min(c[0].top,c[1].top)}}return void 0!==this.document.getSelection?function(e){var f=this.root.getDocument().$.createRange(),d;f.setStart(this.startContainer.$,this.startOffset);f.setEnd(this.endContainer.$,this.endOffset);d=f.getClientRects();d=a(d,this);d.length||(d=b(d,f,this));return CKEDITOR.tools.array.map(d, 193function(a){return c(a,e,this)},this)}:function(a){return[c(e(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),e=this.getBoundaryNodes(),f=[],d,g,k,h;if(c&&c.find)for(g=c.find(a),d=0;d<g.count();d++)if(c=g.getItem(d),b||!c.isReadOnly())k=c.getPosition(e.startNode)&CKEDITOR.POSITION_FOLLOWING||e.startNode.equals(c),h=c.getPosition(e.endNode)&CKEDITOR.POSITION_PRECEDING+ 194CKEDITOR.POSITION_IS_CONTAINED||e.endNode.equals(c),k&&h&&f.push(c);return f}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var c=a[a.length-1],e=!1;b=b.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(c){var f=new CKEDITOR.dom.range(b.root),e=new CKEDITOR.dom.walker(f),d=CKEDITOR.dom.walker.whitespace
vendor: 10,265 bytes, lines 194-214
194s();f.setStart(c.endContainer,c.endOffset);f.setEnd(b.startContainer,b.startOffset);for(f=e.next();d(f)||b.endContainer.equals(f);)f=e.next();e=!f}e?c.setEnd(b.endContainer, 195b.endOffset):a.push(b);return a},[])}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT=1;CKEDITOR.ENLARGE_BLOCK_CONTENTS=2;CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3;CKEDITOR.ENLARGE_INLINE=4;CKEDITOR.START=1;CKEDITOR.END=2;CKEDITOR.SHRINK_ELEMENT=1;CKEDITOR.SHRINK_TEXT=2;"use strict";(function(){function d(b){1>arguments.length||(this.range=b,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks= 1960,this._||(this._={}))}function h(b){var a=[];b.forEach(function(b){if("true"==b.getAttribute("contenteditable"))return a.push(b),!1},CKEDITOR.NODE_ELEMENT,!0);return a}function g(b,a,c,f){a:{null==f&&(f=h(c));for(var d;d=f.shift();)if(d.getDtd().p){f={element:d,remaining:f};break a}f=null}if(!f)return 0;if((d=CKEDITOR.filter.instances[f.element.data("cke-filter")])&&!d.check(a))return g(b,a,c,f.remaining);a=new CKEDITOR.dom.range(f.element);a.selectNodeContents(f.element);a=a.createIterator();a.enlargeBr= 197b.enlargeBr;a.enforceRealBlocks=b.enforceRealBlocks;a.activeFilter=a.filter=d;b._.nestedEditable={element:f.element,container:c,remaining:f.remaining,iterator:a};return 1}function b(b,a,c){if(!a)return!1;b=b.clone();b.collapse(!c);return b.checkBoundaryOfElement(a,c?CKEDITOR.START:CKEDITOR.END)}var f=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(b){return m(b)&&l(b)},c={dd:1,dt:1,li:1};d.prototype={getNextParagraph:function(e){var a,d,h,l,r; 198e=e||"p";if(this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(e))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;this.activeFilter=this.filter;if(g(this,e,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(e);this._.nestedEditable=null}if(!this.range.root.getDtd()[e])return null;if(!this._.started){var t=this.range.clone(); 199d=t.startPath();var u=t.endPath(),x=!t.collapsed&&b(t,d.block),p=!t.collapsed&&b(t,u.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);x&&t.setStartAt(d.block,CKEDITOR.POSITION_BEFORE_END);p&&t.setEndAt(u.block,CKEDITOR.POSITION_AFTER_START);d=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!d||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(d=new CKEDITOR.dom.walker(t.clone()),u=CKEDITOR.dom.walker.bookmark(!0, 200!0),d.evaluator=u,this._.nextNode=d.next(),d=new CKEDITOR.dom.walker(t.clone()),d.evaluator=u,d=d.previous(),this._.lastNode=d.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(u=this.range.clone(),u.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),u.checkEndOfBlock()&&(u=new CKEDITOR.dom.elementPath(u.endContainer,u.root),this._.lastNode=(u.block|| 201u.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(d)),t=null);this._.started=1;d=t}u=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;u;){var x=0,p=u.hasAscendant("pre"),z=u.type!=CKEDITOR.NODE_ELEMENT,v=0;if(z)u.type==CKEDITOR.NODE_TEXT&&f.test(u.getText())&&(z=0);else{var q=u.getName();if(CKEDITOR.dtd.$block[q]&&"false"==u.getAttribute("contenteditable")){a= 202u;g(this,e,a);break}else if(u.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){if("br"==q)z=1;else if(!d&&!u.getChildCount()&&"hr"!=q){a=u;h=u.equals(t);break}d&&(d.setEndAt(u,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=u));x=1}else{if(u.getFirst()){d||(d=this.range.clone(),d.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));u=u.getFirst();continue}z=1}}z&&!d&&(d=this.range.clone(),d.setStartAt(u,CKEDITOR.POSITION_BEFORE_START));h=(!x||z)&&u.equals(t);if(d&&!x)for(;!u.getNext(k)&&!h;){q= 203u.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!p&&{br:1})){x=1;z=0;h||q.equals(t);d.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}u=q;z=1;h=u.equals(t);v=1}z&&d.setEndAt(u,CKEDITOR.POSITION_AFTER_END);u=this._getNextSourceNode(u,v,t);if((h=!u)||x&&d)break}if(!a){if(!d)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;a=new CKEDITOR.dom.elementPath(d.startContainer,d.root);u=a.blockLimit;x={div:1,th:1,td:1};a=a.block;!a&&u&&!this.enforceRealBlocks&&x[u.getName()]&& 204d.checkStartOfBlock()&&d.checkEndOfBlock()&&!u.equals(d.root)?a=u:!a||this.enforceRealBlocks&&a.is(c)?(a=this.range.document.createElement(e),d.extractContents().appendTo(a),a.trim(),d.insertNode(a),l=r=!0):"li"!=a.getName()?d.checkStartOfBlock()&&d.checkEndOfBlock()||(a=a.clone(!1),d.extractContents().appendTo(a),a.trim(),r=d.splitBlock(),l=!r.wasStartOfBlock,r=!r.wasEndOfBlock,d.insertNode(a)):h||(this._.nextNode=a.equals(t)?null:this._getNextSourceNode(d.getBoundaryNodes().endNode,1,t))}l&&(l= 205a.getPrevious())&&l.type==CKEDITOR.NODE_ELEMENT&&("br"==l.getName()?l.remove():l.getLast()&&"br"==l.getLast().$.nodeName.toLowerCase()&&l.getLast().remove());r&&(l=a.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&"br"==l.getName()&&(!CKEDITOR.env.needsBrFiller||l.getPrevious(m)||l.getNext(m))&&l.remove();this._.nextNode||(this._.nextNode=h||a.equals(t)||!t?null:this._getNextSourceNode(a,1,t));return a},_getNextSourceNode:function(b,a,c){function f(a){return!(a.equals(c)||a.equals(d))}var d=this.range.root; 206for(b=b.getNextSourceNode(a,null,f);!m(b);)b=b.getNextSourceNode(a,null,f);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new d(this)}})();CKEDITOR.command=function(d,h){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&d.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,d,b)};this.refresh=function(b,f){if(!this.readOnly&&b.readOnly)return!0;if(this.context&&!f.isContextFor(this.context)|| 207!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[b.mode]&&this.disable();return!1===this.fire("refresh",{editor:b,path:f})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var g;this.checkAllowed=function(b){return b||"boolean"!=typeof g?g=d.activeFilter.checkFeature(this):g};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)};CKEDITOR.command.prototype= 208{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(d){if(this.state==d||d!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=d;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON): 209this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ADDITIONAL_RESOURCE_PARAMS={};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, 210contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};(function(){function d(a,b,c,e,f){var d,g;a=[];for(d in b){g=b[d];g="boolean"==typeof g?{}:"function"==typeof g?{match:g}:J(g);"$"!=d.charAt(0)&&(g.elements=d);c&&(g.featureName=c.toLowerCase());var q=g;q.elements=l(q.elements,/\s+/)||null;q.propertiesOnly=q.propertiesOnly||!0===q.elements;var k= 211/\s*,\s*/,h=void 0;for(h in M){q[h]=l(q[h],k)||null;var n=q,m=H[h],u=l(q[H[h]],k),E=q[h],p=[],A=!0,O=void 0;u?A=!1:u={};for(O in E)"!"==O.charAt(0)&&(O=O.slice(1),p.push(O),u[O]=!0,A=!1);for(;O=p.pop();)E[O]=E["!"+O],delete E["!"+O];n[m]=(A?!1:u)||null}q.match=q.match||null;e.push(g);a.push(g)}b=f.elements;f=f.generic;var w;c=0;for(e=a.length;c<e;++c){d=J(a[c]);g=!0===d.classes||!0===d.styles||!0===d.attributes;q=d;h=m=k=void 0;for(k in M)q[k]=x(q[k]);n=!0;for(h in H){k=H[h];m=q[k];u=[];E=void 0; 212for(E in m)-1<E.indexOf("*")?u.push(new RegExp("^"+E.replace(/\*/g,".*")+"$")):u.push(E);m=u;m.length&&(q[k]=m,n=!1)}q.nothingRequired=n;q.noProperties=!(q.attributes||q.classes||q.styles);if(!0===d.elements||null===d.elements)f[g?"unshift":"push"](d);else for(w in q=d.elements,delete d.elements,q)if(b[w])b[w][g?"unshift":"push"](d);else b[w]=[d]}}function h(a,b,c,e){if(!a.match||a.match(b))if(e||k(a,b))if(a.propertiesOnly||(c.valid=!0),c.allAttributes||(c.allAttributes=g(a.attributes,b.attributes, 213c.validAttributes)),c.allStyles||(c.allStyles=g(a.styles,b.styles,c.validStyles)),!c.allClasses){a=a.classes;b=b.classes;e=c.validClasses;if(a)if(!0===a)a=!0;else{for(var f=0,d=b.length,q;f<d;++f)q=b[f],e[q]||(e[q]=a(q));a=!1}else a=!1;c.allClasses=a}}function g(a,b,c){if(!a)return!1;if(!0===a)return!0;for(var e in b)c[e]||(c[e]=a(e));return!1}function b(a,b,c){if(!a.match||a.match(b)){if(a.noProperties)return!1;c.hadInvalidAttribute=f(a.attributes,b.attributes)||c.hadInvalidAttribute;c.hadInvalidStyle= 214f(a.styles,b.styles)||c.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var e=!1,d=!0===a,g=b.length;g--;)if(d||a(b[g]))b.splice(g,1),e=!0;a=e}else a=!1;c.hadInvalidClass=a||c.hadInvalidClass}}function f(a,b){if(!a)return!1;var c=!1,e=!0===a,f;for(f in b)if(e||a(f))delete b[f],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: 13,154 bytes, lines 214-240
214if("string"==typeof a)return a=I(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b)); 215if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var c={},e=0,f;for(f in a)c[f]=a[f],e++;return e?c:!1}function k(a,b){if(a.nothingRequired)return!0;var e,f,d,g;if(d=a.requiredClasses)for(g=b.classes,e=0;e<d.length;++e)if(f=d[e],"string"==typeof f){if(-1==CKEDITOR.tools.indexOf(g,f))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(g,f))return!1;return c(b.styles,a.requiredStyles)&&c(b.attributes,a.requiredAttributes)}function c(a,b){if(!b)return!0; 216for(var c=0,e;c<b.length;++c)if(e=b[c],"string"==typeof e){if(!(e in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,e))return!1;return!0}function e(a){if(!a)return{};a=a.split(/\s*,\s*/).sort();for(var b={};a.length;)b[a.shift()]="cke-test";return b}function a(a){var b,c,e,f,d={},g=1;for(a=I(a);b=a.match(K);)(c=b[2])?(e=n(c,"styles"),f=n(c,"attrs"),c=n(c,"classes")):e=f=c=null,d["$"+g++]={elements:b[1],classes:c,styles:e,attributes:f},a=a.slice(b[0].length);return d}function n(a, 217b){var c=a.match(E[b]);return c?I(c[1]):null}function w(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 y(a,c,e,f){var d=0,g;f.toHtml&&(c.name=c.name.replace(T,"$1"));if(f.doCallbacks&&a.elementCallbacks){a:{g=a.elementCallbacks;for(var k=0,l=g.length,n;k<l;++k)if(n=g[k](c)){g=n;break a}g=void 0}if(g)return g}if(f.doTransform&&(g=a._.transformations[c.name])){w(c); 218for(k=0;k<g.length;++k)q(a,c,g[k]);t(c)}if(f.doFilter){a:{k=c.name;l=a._;a=l.allowedRules.elements[k];g=l.allowedRules.generic;k=l.disallowedRules.elements[k];l=l.disallowedRules.generic;n=f.skipRequired;var m={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1,allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},E,p;if(a||g){w(c);if(k)for(E=0,p=k.length;E<p;++E)if(!1===b(k[E],c,m)){a=null;break a}if(l)for(E=0,p=l.length;E<p;++E)b(l[E], 219c,m);if(a)for(E=0,p=a.length;E<p;++E)h(a[E],c,m,n);if(g)for(E=0,p=g.length;E<p;++E)h(g[E],c,m,n);a=m}else a=null}if(!a||!a.valid)return e.push(c),1;p=a.validAttributes;var A=a.validStyles;g=a.validClasses;var k=c.attributes,x=c.styles,l=c.classes;n=c.classBackup;var Q=c.styleBackup,P,F,I=[],m=[],z=/^data-cke-/;E=!1;delete k.style;delete k["class"];delete c.classBackup;delete c.styleBackup;if(!a.allAttributes)for(P in k)p[P]||(z.test(P)?P==(F=P.replace(/^data-cke-saved-/,""))||p[F]||(delete k[P],E= 220!0):(delete k[P],E=!0));if(!a.allStyles||a.hadInvalidStyle){for(P in x)a.allStyles||A[P]?I.push(P+":"+x[P]):E=!0;I.length&&(k.style=I.sort().join("; "))}else Q&&(k.style=Q);if(!a.allClasses||a.hadInvalidClass){for(P=0;P<l.length;++P)(a.allClasses||g[l[P]])&&m.push(l[P]);m.length&&(k["class"]=m.sort().join(" "));n&&m.length<n.split(/\s+/).length&&(E=!0)}else n&&(k["class"]=n);E&&(d=1);if(!f.skipFinalValidation&&!u(c))return e.push(c),1}f.toHtml&&(c.name=c.name.replace(O,"cke:$1"));return d}function r(a){var b= 221[],c;for(c in a)-1<c.indexOf("*")&&b.push(c.replace(/\*/g,".*"));return b.length?new 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 u(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function x(a){if(!a)return!1;if(!0=== 222a)return!0;var b=r(a);return function(c){return c in a||b&&c.match(b)}}function p(){return new CKEDITOR.htmlParser.element("br")}function z(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||F.$block[a.name])}function v(a,b,c){var e=a.name;if(F.$empty[e]||!a.children.length)"hr"==e&&"br"==b?a.replaceWith(p()):(a.parent&&c.push({check:"it",el:a.parent}),a.remove());else if(F.$block[e]||"tr"==e)if("br"==b)a.previous&&!z(a.previous)&&(b=p(),b.insertBefore(a)),a.next&&!z(a.next)&&(b=p(),b.insertAfter(a)), 223a.replaceWithChildren();else{var e=a.children,f;b:{f=F[b];for(var d=0,g=e.length,q;d<g;++d)if(q=e[d],q.type==CKEDITOR.NODE_ELEMENT&&!f[q.name]){f=!1;break b}f=!0}if(f)a.name=b,a.attributes={},c.push({check:"parent-down",el:a});else{f=a.parent;for(var d=f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==f.name,k,h,g=e.length;0<g;)q=e[--g],d&&(q.type==CKEDITOR.NODE_TEXT||q.type==CKEDITOR.NODE_ELEMENT&&F.$inline[q.name])?(k||(k=new CKEDITOR.htmlParser.element(b),k.insertAfter(a),c.push({check:"parent-down", 224el:k})),k.add(q,0)):(k=null,h=F[f.name]||F.span,q.insertAfter(a),f.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||q.type!=CKEDITOR.NODE_ELEMENT||h[q.name]||c.push({check:"el-up",el:q}));a.remove()}}else e in{style:1,script:1}?a.remove():(a.parent&&c.push({check:"it",el:a.parent}),a.replaceWithChildren())}function q(a,b,c){var e,f;for(e=0;e<c.length;++e)if(f=c[e],!(f.check&&!a.check(f.check,!1)||f.left&&!f.left(b))){f.right(b,N);break}}function A(a,b){var c=b.getDefinition(),e=c.attributes,f=c.styles,d,g, 225q,k;if(a.name!=c.element)return!1;for(d in e)if("class"==d)for(c=e[d].split(/\s+/),q=a.classes.join("|");k=c.pop();){if(-1==q.indexOf(k))return!1}else if(a.attributes[d]!=e[d])return!1;for(g in f)if(a.styles[g]!=f[g])return!1;return!0}function B(a,b){var c,e;"string"==typeof a?c=a:a instanceof CKEDITOR.style?e=a:(c=a[0],e=a[1]);return[{element:c,left:e,right:function(a,c){c.transform(a,b)}}]}function C(a){return function(b){return A(b,a)}}function G(a){return function(b,c){c[a](b)}}var F=CKEDITOR.dtd, 226J=CKEDITOR.tools.copy,I=CKEDITOR.tools.trim,D=["","p","br","div"];CKEDITOR.FILTER_SKIP_TREE=2;CKEDITOR.filter=function(a,b){this.allowedContent=[];this.disallowedContent=[];this.elementCallbacks=null;this.disabled=!1;this.editor=null;this.id=CKEDITOR.tools.getNextNumber();this._={allowedRules:{elements:{},generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}};CKEDITOR.filter.instances[this.id]=this;var c=this.editor=a instanceof CKEDITOR.editor?a:null; 227if(c&&!b){this.customConfig=!0;var e=c.config.allowedContent;!0===e?this.disabled=!0:(e||(this.customConfig=!1),this.allow(e,"config",1),this.allow(c.config.extraAllowedContent,"extra",1),this.allow(D[c.enterMode]+" "+D[c.shiftEnterMode],"default",1),this.disallow(c.config.disallowedContent))}else this.customConfig=!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,c,e){if(!m(this,b,e))return!1;var f,g;if("string"==typeof b)b=a(b);else if(b instanceof 228CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),c,e);f=b.getDefinition();b={};e=f.attributes;b[f.element]=f={styles:f.styles,requiredStyles:f.styles&&CKEDITOR.tools.object.keys(f.styles)};e&&(e=J(e),f.classes=e["class"]?e["class"].split(/\s+/):null,f.requiredClasses=f.classes,delete e["class"],f.attributes=e,f.requiredAttributes=e&&CKEDITOR.tools.object.keys(e))}else if(CKEDITOR.tools.isArray(b)){for(f=0;f<b.length;++f)g=this.allow(b[f],c,e);return g}d(this, 229b,c,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,c,e){if(this.disabled)return!1;var f=this,d=[],g=this.editor&&this.editor.config.protectedSource,q,k=!1,h={doFilter:!c,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1;if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(q=y(f,a,d,h),q&1)k=!0;else if(q&2)return!1}else if(a.type== 230CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var c;a:{var e=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));c=[];var l,n,m;if(g)for(n=0;n<g.length;++n)if((m=e.match(g[n]))&&m[0].length==e.length){c=!0;break a}e=CKEDITOR.htmlParser.fragment.fromHtml(e);1==e.children.length&&(l=e.children[0]).type==CKEDITOR.NODE_ELEMENT&&y(f,l,c,h);c=!c.length}c||d.push(a)}},null,!0);d.length&&(k=!0);var l;a=[];e=D[e||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var n;c= 231d.pop();)c.type==CKEDITOR.NODE_ELEMENT?v(c,e,a):c.remove();for(;l=a.pop();)if(c=l.el,c.parent)switch(n=F[c.parent.name]||F.span,l.check){case "it":F.$removeEmpty[c.name]&&!c.children.length?v(c,e,a):u(c)||v(c,e,a);break;case "el-up":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||v(c,e,a);break;case "parent-down":c.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||n[c.name]||v(c.parent,e,a)}return k},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor)); 232return!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=a(b));d(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,c,e=[],f;for(b=0;b<a.length&&!f;++b)c=a[b],("string"==typeof c||c instanceof CKEDITOR.style)&&this.check(c)&&(f=c);if(f){for(b=0;b<a.length;++b)e.push(B(a[b],f));this.addTransformations(e)}}},addElementCallback:function(a){this.elementCallbacks|| 233(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)?this.check(a.requiredContent):!0},addTransformations:function(a){var b,c;if(!this.disabled&&a){var e=this._.transformations,f;for(f=0;f<a.length;++f){b= 234a[f];var d=void 0,g=void 0,q=void 0,k=void 0,h=void 0,l=void 0;c=[];for(g=0;g<b.length;++g)q=b[g],"string"==typeof q?(q=q.split(/\s*:\s*/),k=q[0],h=null,l=q[1]):(k=q.check,h=q.left,l=q.right),d||(d=q,d=d.element?d.element:k?k.match(/^([a-z0-9]+)/i)[0]:d.left.getDefinition().element),h instanceof CKEDITOR.style&&(h=C(h)),c.push({check:k==d?null:k,left:h,right:"string"==typeof l?G(l):l});b=d;e[b]||(e[b]=[]);e[b].push(c)}}},check:function(b,c,f){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(b)){for(var d= 235b.length;d--;)if(this.check(b[d],c,f))return!0;return!1}var g,k;if("string"==typeof b){k=b+"\x3c"+(!1===c?"0":"1")+(f?"1":"0")+"\x3e";if(k in this._.cachedChecks)return this._.cachedChecks[k];g=a(b).$1;var h=g.styles,d=g.classes;g.name=g.elements;g.classes=d=d?d.split(/\s*,\s*/):[];g.styles=e(h);g.attributes=e(g.attributes);g.children=[];d.length&&(g.attributes["class"]=d.join(" "));h&&(g.attributes.style=CKEDITOR.tools.writeCssText(g.styles))}else g=b.getDefinition(),h=g.styles,d=g.attributes||{}, 236h&&!CKEDITOR.tools.isEmpty(h)?(h=J(h),d.style=CKEDITOR.tools.writeCssText(h,!0)):h={},g={name:g.element,attributes:d,classes:d["class"]?d["class"].split(/\s+/):[],styles:h,children:[]};var h=CKEDITOR.tools.clone(g),l=[],n;if(!1!==c&&(n=this._.transformations[g.name])){for(d=0;d<n.length;++d)q(this,g,n[d]);t(g)}y(this,h,l,{doFilter:!0,doTransform:!1!==c,skipRequired:!f,skipFinalValidation:!f});0<l.length?f=!1:((c=g.attributes["class"])&&(g.attributes["class"]=g.attributes["class"].split(" ").sort().join(" ")), 237f=CKEDITOR.tools.objectCompare(g.attributes,h.attributes,!0),c&&(g.attributes["class"]=c));"string"==typeof b&&(this._.cachedChecks[k]=f);return f},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(c,e){var f=a.slice(),d;if(this.check(D[c]))return c;for(e||(f=f.reverse());d=f.pop();)if(this.check(d))return b[d];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent= 238b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent;delete this.disallowedContent}};var M={styles:1,attributes:1,classes:1},H={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"}, 239K=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,E={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},T=/^cke:(object|embed|param)$/,O=/^(object|embed|param)$/,N;N=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|| 240b;if(!(c in a.styles)){var e=a.attributes[b];e&&(/^\d+$/.test(e)&&(e+="px"),a.styles[c]=e)}delete a.attributes[b]},lengthToAttribute:function(a,b,c){c=c||b;if(!(c in a.attributes)){var e=a.styles[b],f=e&&e.match(/^(\d+)(?:\.\d*)?px$/);f?a.attributes[c]=f[1]:"cke-test"==e&&(a.attributes[c]="cke-test")}delete a.styles[b]}
vendor: 9,905 bytes, lines 240-259
240,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 241a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var b=CKEDITOR.tools.style.parse.border(a.styles.border);b.color&&(a.styles["border-color"]=b.color);b.style&&(a.styles["border-style"]=b.style);b.width&&(a.styles["border-width"]=b.width);delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha"; 242break;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(e){a.styles["margin-top"]=c[e[0]];a.styles["margin-right"]=c[e[1]];a.styles["margin-bottom"]=c[e[2]];a.styles["margin-left"]=c[e[3]]}if(a.styles.margin){var c=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)|| 243["0px"];switch(c.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:A,transform:function(a,b){if("string"==typeof b)a.name=b;else{var c=b.getDefinition(),e=c.styles,f=c.attributes,d,g,q,k;a.name=c.element;for(d in f)if("class"==d)for(c=a.classes.join("|"),q=f[d].split(/\s+/);k=q.pop();)-1==c.indexOf(k)&&a.classes.push(k);else a.attributes[d]=f[d];for(g in e)a.styles[g]=e[g]}}}})();(function(){CKEDITOR.focusManager= 244function(d){if(d.focusManager)return d.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:d};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(d){this._.timer&&clearTimeout(this._.timer);d&&(this.currentActive=d);this.hasFocus||this._.locked||((d=CKEDITOR.currentInstance)&&d.focusManager.blur(1),this.hasFocus=!0,(d=this._.editor.container)&&d.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked}, 245blur:function(d){function h(){if(this.hasFocus){this.hasFocus=!1;var b=this._.editor.container;b&&b.removeClass("cke_focus");this._.editor.fire("blur")}}if(!this._.locked){this._.timer&&clearTimeout(this._.timer);var g=CKEDITOR.focusManager._.blurDelay;d||!g?h.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer;h.call(this)},g,this)}},add:function(d,h){var g=d.getCustomData("focusmanager");if(!g||g!=this){g&&g.remove(d);var g="focus",b="blur";h&&(CKEDITOR.env.ie?(g="focusin", 246b="focusout"):CKEDITOR.event.useCapture=1);var f={blur:function(){d.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(d)}};d.on(g,f.focus,this);d.on(b,f.blur,this);h&&(CKEDITOR.event.useCapture=0);d.setCustomData("focusmanager",this);d.setCustomData("focusmanager_handlers",f)}},remove:function(d){d.removeCustomData("focusmanager");var h=d.removeCustomData("focusmanager_handlers");d.removeListener("blur",h.blur);d.removeListener("focus",h.focus)}}})();CKEDITOR.keystrokeHandler=function(d){if(d.keystrokeHandler)return d.keystrokeHandler; 247this.keystrokes={};this.blockedKeystrokes={};this._={editor:d};return this};(function(){var d,h=function(b){b=b.data;var f=b.getKeystroke(),g=this.keystrokes[f],h=this._.editor;d=!1===h.fire("key",{keyCode:f,domEvent:b});d||(g&&(d=!1!==h.execCommand(g,{from:"keystrokeHandler"})),d||(d=!!this.blockedKeystrokes[f]));d&&b.preventDefault(!0);return!d},g=function(b){d&&(d=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(b){b.on("keydown",h,this);if(CKEDITOR.env.gecko&& 248CKEDITOR.env.mac)b.on("keypress",g,this)}}})();(function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1, 249ku:1,ug:1},load:function(d,h,g){d&&CKEDITOR.lang.languages[d]||(d=this.detect(h,d));var b=this;h=function(){b[d].dir=b.rtl[d]?"rtl":"ltr";g(d,b[d])};this[d]?h():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+d+".js"),h,this)},detect:function(d,h){var g=this.languages;h=h||navigator.userLanguage||navigator.language||d;var b=h.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),f=b[1],b=b[2];g[f+"-"+b]?f=f+"-"+b:g[f]||(f=null);CKEDITOR.lang.detect=f?function(){return f}:function(b){return b};return f|| 250d}}})();CKEDITOR.scriptLoader=function(){var d={},h={};return{load:function(g,b,f,m){var l="string"==typeof g;l&&(g=[g]);f||(f=CKEDITOR);var k=g.length,c=[],e=[],a=function(a){b&&(l?b.call(f,a):b.call(f,c,e))};if(0===k)a(!0);else{var n=function(b,f){(f?c:e).push(b);0>=--k&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(f))},w=function(a,b){d[a]=1;var c=h[a];delete h[a];for(var e=0;e<c.length;e++)c[e](a,b)},y=function(a){if(d[a])n(a,!0);else{var c=h[a]||(h[a]=[]);c.push(n);if(!(1< 251c.length)){var e=new CKEDITOR.dom.element("script");e.setAttributes({type:"text/javascript",src:a});b&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==e.$.readyState)e.$.onreadystatechange=null,w(a,!0)}:(e.$.onload=function(){setTimeout(function(){e.$.onload=null;e.$.onerror=null;w(a,!0)},0)},e.$.onerror=function(){e.$.onload=null;e.$.onerror=null;w(a,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};m&& 252CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r<k;r++)y(g[r])}},queue:function(){function d(){var f;(f=b[0])&&this.load(f.scriptUrl,f.callback,CKEDITOR,0)}var b=[];return function(f,h){var l=this;b.push({scriptUrl:f,callback:function(){h&&h.apply(this,arguments);b.shift();d.call(l)}});1==b.length&&d.call(this)}}()}}();CKEDITOR.resourceManager=function(d,h){this.basePath=d;this.fileName=h;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};CKEDITOR.resourceManager.prototype= 253{add:function(d,h){if(this.registered[d])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+d+'" is already registered.');var g=this.registered[d]=h||{};g.name=d;g.path=this.getPath(d);CKEDITOR.fire(d+CKEDITOR.tools.capitalize(this.fileName)+"Ready",g);return this.get(d)},get:function(d){return this.registered[d]||null},getPath:function(d){var h=this.externals[d];return CKEDITOR.getUrl(h&&h.dir||this.basePath+d+"/")},getFilePath:function(d){var h=this.externals[d];return CKEDITOR.getUrl(this.getPath(d)+ 254(h?h.file:this.fileName+".js"))},addExternal:function(d,h,g){g||(h=h.replace(/[^\/]+$/,function(b){g=b;return""}));g=g||this.fileName+".js";d=d.split(",");for(var b=0;b<d.length;b++)this.externals[d[b]]={dir:h,file:g}},load:function(d,h,g){CKEDITOR.tools.isArray(d)||(d=d?[d]:[]);for(var b=this.loaded,f=this.registered,m=[],l={},k={},c=0;c<d.length;c++){var e=d[c];if(e)if(b[e]||f[e])k[e]=this.get(e);else{var a=this.getFilePath(e);m.push(a);a in l||(l[a]=[]);l[a].push(e)}}CKEDITOR.scriptLoader.load(m, 255function(a,c){if(c.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+l[c[0]].join(",")+'" was not found at "'+c[0]+'".');for(var e=0;e<a.length;e++)for(var f=l[a[e]],d=0;d<f.length;d++){var m=f[d];k[m]=this.get(m);b[m]=1}h.call(g,k)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load=CKEDITOR.tools.override(CKEDITOR.plugins.load,function(d){var h={};return function(g,b,f){var m={},l=function(g){d.call(this,g,function(c){CKEDITOR.tools.extend(m, 256c);var e=[],a;for(a in c){var d=c[a],g=d&&d.requires;if(!h[a]){if(d.icons)for(var k=d.icons.split(","),r=k.length;r--;)CKEDITOR.skin.addIcon(k[r],d.path+"icons/"+(CKEDITOR.env.hidpi&&d.hidpi?"hidpi/":"")+k[r]+".png");d.isSupportedEnvironment=d.isSupportedEnvironment||function(){return!0};h[a]=1}if(g)for(g.split&&(g=g.split(",")),d=0;d<g.length;d++)m[g[d]]||e.push(g[d])}if(e.length)l.call(this,e);else{for(a in m)d=m[a],d.onLoad&&!d.onLoad._called&&(!1===d.onLoad()&&delete m[a],d.onLoad._called=1); 257b&&b.call(f||window,m)}},this)};l.call(this,g)}});CKEDITOR.plugins.setLang=function(d,h,g){var b=this.get(d);d=b.langEntries||(b.langEntries={});b=b.lang||(b.lang=[]);b.split&&(b=b.split(","));-1==CKEDITOR.tools.indexOf(b,h)&&b.push(h);d[h]=g};CKEDITOR.ui=function(d){if(d.ui)return d.ui;this.items={};this.instances={};this.editor=d;this._={handlers:{}};return this};CKEDITOR.ui.prototype={add:function(d,h,g){g.name=d.toLowerCase();var b=this.items[d]={type:h,command:g.command||null,args:Array.prototype.slice.call(arguments, 2582)};CKEDITOR.tools.extend(b,g)},get:function(d){return this.instances[d]},create:function(d){var h=this.items[d],g=h&&this._.handlers[h.type],b=h&&h.command&&this.editor.getCommand(h.command),g=g&&g.create.apply(this,h.args);this.instances[d]=g;b&&b.uiItems.push(g);g&&!g.type&&(g.type=h.type);return g},addHandler:function(d,h){this._.handlers[d]=h},space:function(d){return CKEDITOR.document.getById(this.spaceId(d))},spaceId:function(d){return this.editor.id+"_"+d}};CKEDITOR.event.implementOn(CKEDITOR.ui); 259(function(){function d(a,c,e){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==c){if(!(c instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!e)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks.");
vendor: 18,398 bytes, lines 259-295
259if(!g(c,e))throw Error('The specified element mode is not supported on element: "'+c.getName()+'".'); 260this.element=c;this.elementMode=e;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(c.getId()||c.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||h();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager=new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly", 261b);this.on("selectionChange",function(a){m(this,a.data.path)});this.on("activeFilterChange",function(){m(this,this.elementPath(),!0)});this.on("mode",b);CKEDITOR.dom.selection.setupEditorOptimization(this);this.on("instanceReady",function(){if(this.config.startupFocus){if("end"===this.config.startupFocus){var a=this.createRange();a.selectNodeContents(this.editable());a.shrink(CKEDITOR.SHRINK_ELEMENT,!0);a.collapse();this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated", 262null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||this.isDetached()||k(this,a)},0,this)}function h(){do var a="editor"+ ++r;while(CKEDITOR.instances[a]);return a}function g(a,b){return b==CKEDITOR.ELEMENT_MODE_INLINE?a.is(CKEDITOR.dtd.$editable)||a.is("textarea"):b==CKEDITOR.ELEMENT_MODE_REPLACE?!a.is(CKEDITOR.dtd.$nonBodyContent):1}function b(){var a=this.commands,b;for(b in a)f(this,a[b])}function f(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable": 263b.modes[a.mode]?"enable":"disable"]()}function m(a,b,c){if(b){var e,f,d=a.commands;for(f in d)e=d[f],(c||e.contextSensitive)&&e.refresh(a,b)}}function l(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),c=t[b]||(t[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 k(a,b){a.on("customConfigLoaded", 264function(){if(b){if(b.on)for(var e in b.on)a.on(e,b.on[e]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}e=a.config;a.readOnly=e.readOnly?!0:a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.element.is("textarea")?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):a.element.isReadOnly():a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.element.hasAttribute("disabled")||a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")|| 265CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=e.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:e.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:e.shiftEnterMode;e.skin&&(CKEDITOR.skinName=e.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a);a.filter=a.activeFilter=new CKEDITOR.filter(a);c(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig); 266l(a)||a.fireOnce("customConfigLoaded")}function c(a){CKEDITOR.skin.loadPart("editor",function(){e(a)})}function e(b){CKEDITOR.lang.load(b.config.language,b.config.defaultLanguage,function(c,e){var f=b.config.title;b.langCode=c;b.lang=CKEDITOR.tools.prototypedCopy(e);b.title="string"==typeof f||!1===f?f:[b.lang.editor,b.name].join(", ");b.config.contentsLangDirection||(b.config.contentsLangDirection=b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?b.element.getDirection(1):b.lang.dir);b.fire("langLoaded"); 267a(b)})}function a(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);n(a)})}function n(a){function b(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var c=a.config,e=b(c.plugins),f=b(c.extraPlugins),d=b(c.removePlugins);if(f)var g=new RegExp("(?:^|,)(?:"+f.replace(/,/g,"|")+")(?\x3d,|$)","g"),e=e.replace(g,""),e=e+(","+f);if(d)var k=new RegExp("(?:^|,)(?:"+d.replace(/,/g,"|")+")(?\x3d,|$)","g"),e=e.replace(k, 268"");CKEDITOR.env.air&&(e+=",adobeair");CKEDITOR.plugins.load(e.split(","),function(b){var e=[],f=[],d=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var g in b){var q=b[g],h=q.lang,l=null,n=q.requires,m;CKEDITOR.tools.isArray(n)&&(n=n.join(","));if(n&&(m=n.match(k)))for(;n=m.pop();)CKEDITOR.error("editor-plugin-required",{plugin:n.replace(",",""),requiredBy:g});h&&!a.lang[g]&&(h.split&&(h=h.split(",")),0<=CKEDITOR.tools.indexOf(h,a.langCode)?l=a.langCode:(l=a.langCode.replace(/-.*/,""),l= 269l!=a.langCode&&0<=CKEDITOR.tools.indexOf(h,l)?l:0<=CKEDITOR.tools.indexOf(h,"en")?"en":h[0]),q.langEntries&&q.langEntries[l]?(a.lang[g]=q.langEntries[l],l=null):d.push(CKEDITOR.getUrl(q.path+"lang/"+l+".js")));f.push(l);e.push(q)}CKEDITOR.scriptLoader.load(d,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],d=0;d<b.length;d++)for(var g=0;g<e.length;g++){var q=e[g];0===d&&f[g]&&q.lang&&q.langEntries&&(a.lang[q.name]=q.langEntries[f[g]]);if(q[b[d]])q[b[d]](a)}a.fireOnce("pluginsLoaded"); 270c.keystrokes&&a.setKeystroke(a.config.keystrokes);for(g=0;g<a.config.blockedKeystrokes.length;g++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[g]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function w(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&&(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function y(a,b){function c(a){var b= 271a.startContainer,e=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(e)&&a.endOffset===b.getChildCount())?!0:!1}function e(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var f=new CKEDITOR.dom.documentFragment,d,g,k,h=0;h<a.length;h++){var l=a[h],n=l.startContainer.getAscendant("tr",!0);c(l)?(d||(d=n.getAscendant("table").clone(),d.append(n.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),f.append(d),d=d.findOne("thead, tbody, tfoot")),g&&g.equals(n)||(g= 272n,k=n.clone(),d.append(k)),k.append(e(l))):f.append(l.cloneContents())}return d?f:b.getHtmlFromRange(a[0])}d.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=d;var r=0,t={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var c=0;c<b.length;c++){var e=b[c];if(this[e])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:e}),!0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var c=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this, 273b);this.mode&&f(this,c);return this.commands[a]=c},_attachToForm:function(){function a(b){c.updateElement();c._.required&&!e.getValue()&&!1===c.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var c=this,e=c.element,f=new CKEDITOR.dom.element(e.$.form);e.is("textarea")&&f&&(f.on("submit",a),b(f.$.submit)&&(f.$.submit=CKEDITOR.tools.override(f.$.submit,function(b){return function(){a();b.apply?b.apply(this):b()}})),c.on("destroy",function(){f.removeListener("submit", 274a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,c=this;this.fire("beforeDestroy");!a&&w.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];c===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this);CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null; 275a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var c=this.getCommand(a),e={name:a,commandData:b||{},command:c};return c&&c.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",e)&&(e.returnValue=c.exec(e.commandData),!c.async&&!1!==this.fire("afterCommandExec",e))?e.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&& 276this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a, 277b,c){var e=!0,f=b;b&&"object"==typeof b&&(c=b.internal,f=b.callback,e=!b.noSnapshot);!c&&e&&this.fire("saveSnapshot");if(f||!c)this.once("dataReady",function(a){!c&&e&&this.fire("saveSnapshot");f&&f.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, 278b,c){this.fire("insertHtml",{dataValue:a,mode:b,range:c})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),c=this.getSelection(),c=c&&c.getRanges();if(!b||!c||0===c.length)return null;b=y(c,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var c=this.editable(),e=this.getSelection().getRanges(),f=new CKEDITOR.dom.documentFragment,d;if(!c||0===e.length)return null;for(d=0;d<e.length;d++)f.append(c.extractHtmlFromRange(e[d], 279b));b||this.getSelection().selectRanges([e[0]]);return a?f.getHtml():f},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return w.call(this)},setKeystroke:function(){for(var a=this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],c,e,f=b.length;f--;)c=b[f],e=0,CKEDITOR.tools.isArray(c)&& 280(e=c[1],c=c[0]),e?a[c]=e:delete a[c]},getCommandKeystroke:function(a,b){var c="string"===typeof a?this.getCommand(a):a,e=[];if(c){var f=CKEDITOR.tools.object.findKey(this.commands,c),d=this.keystrokeHandler.keystrokes;if(c.fakeKeystroke)e.push(c.fakeKeystroke);else for(var g in d)d[g]===f&&e.push(g)}return b?e:e[0]||null},addFeature:function(a){return this.filter.addFeature(a)},setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"), 281a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode=a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)},isDetached:function(){return!!this.container&& 282this.container.isDetached()},isDestroyed:function(){return"destroyed"===this.status}});CKEDITOR.editor._getEditorElement=function(a){if(!CKEDITOR.env.isCompatible)return null;var b=CKEDITOR.dom.element.get(a);return b?b.getEditor()?(CKEDITOR.error("editor-element-conflict",{editorName:b.getEditor().name}),null):b:(CKEDITOR.error("editor-incorrect-element",{element:a}),null)}})();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE= 2833;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}};(function(){var d=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){}, 284onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(g){for(var b,f,m=0,l;b=this._.htmlPartsRegex.exec(g);){f=b.index;if(f>m)if(m=g.substring(m,f),l)l.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(f=b[1])if(f=f.toLowerCase(),l&&CKEDITOR.dtd.$cdata[f]&&(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(f);continue}if(l)l.push(b[0]);else if(f=b[3]){if(f=f.toLowerCase(),!/="/.test(f)){var k={},c,e=b[4];b=!!b[5];if(e)for(;c=d.exec(e);){var a=c[1].toLowerCase(); 285c=c[2]||c[3]||c[4]||"";k[a]=!c&&h[a]?a:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(f,k,b);!l&&CKEDITOR.dtd.$cdata[f]&&(l=[])}}else if(f=b[2])this.onComment(f)}if(g.length>m)this.onText(g.substring(m,g.length))}}})();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(d){this._.output.push("\x3c",d)},openTagClose:function(d,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(d,h){"string"==typeof h&&(h= 286CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",d,'\x3d"',h,'"')},closeTag:function(d){this._.output.push("\x3c/",d,"\x3e")},text:function(d){this._.output.push(d)},comment:function(d){this._.output.push("\x3c!--",d,"--\x3e")},write:function(d){this._.output.push(d)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(d){var h=this._.output.join("");d&&this.reset();return h}}});"use strict";(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype= 287{remove:function(){var d=this.parent.children,h=CKEDITOR.tools.indexOf(d,this),g=this.previous,b=this.next;g&&(g.next=b);b&&(b.previous=g);d.splice(h,1);this.parent=null},replaceWith:function(d){var h=this.parent.children,g=CKEDITOR.tools.indexOf(h,this),b=d.previous=this.previous,f=d.next=this.next;b&&(b.next=d);f&&(f.previous=d);h[g]=d;d.parent=this.parent;this.parent=null},insertAfter:function(d){var h=d.parent.children,g=CKEDITOR.tools.indexOf(h,d),b=d.next;h.splice(g+1,0,this);this.next=d.next; 288this.previous=d;d.next=this;b&&(b.previous=this);this.parent=d.parent},insertBefore:function(d){var h=d.parent.children,g=CKEDITOR.tools.indexOf(h,d);h.splice(g,0,this);this.next=d;(this.previous=d.previous)&&(d.previous.next=this);d.previous=this;this.parent=d.parent},getAscendant:function(d){var h="function"==typeof d?d:"string"==typeof d?function(b){return b.name==d}:function(b){return b.name in d},g=this.parent;for(;g&&g.type==CKEDITOR.NODE_ELEMENT;){if(h(g))return g;g=g.parent}return null},wrapWith:function(d){this.replaceWith(d); 289d.add(this);return d},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(d){return d||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(d){this.value=d;this._={isBlockLike:!1}};CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(d,h){var g=this.value;if(!(g=d.onComment(h,g,this)))return this.remove(),!1;if("string"!=typeof g)return this.replaceWith(g),!1;this.value= 290g;return!0},writeHtml:function(d,h){h&&this.filter(h);d.comment(this.value)}});"use strict";(function(){CKEDITOR.htmlParser.text=function(d){this.value=d;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(d,h){if(!(this.value=d.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(d,h){h&&this.filter(h);d.text(this.value)}})})();"use strict";(function(){CKEDITOR.htmlParser.cdata=function(d){this.value= 291d};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(d){d.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}};(function(){function d(b){return b.attributes["data-cke-survive"]?!1:"a"==b.name&&b.attributes.href||CKEDITOR.dtd.$removeEmpty[b.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1}, 292CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),g={ol:1,ul:1},b=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),f={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,k){function c(a){var b;if(0<u.length)for(var c=0;c<u.length;c++){var f=u[c],d=f.name,g=CKEDITOR.dtd[d],k=p.name&&CKEDITOR.dtd[p.name];k&&!k[d]||a&&g&&!g[a]&&CKEDITOR.dtd[a]?d== 293p.name&&(n(p,p.parent,1),c--):(b||(e(),b=1),f=f.clone(),f.parent=p,p=f,u.splice(c,1),c--)}}function e(){for(;x.length;)n(x.shift(),p)}function a(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,c=a.children[b-1],e;c&&c.type==CKEDITOR.NODE_TEXT&&((e=CKEDITOR.tools.rtrim(c.value))?c.value=e:a.children.length=b-1)}}function n(b,c,e){c=c||p||t;var f=p;void 0===b.previous&&(w(c,b)&&(p=c,r.onTagOpen(k,{}),b.returnPoint=c=p),a(b),d(b)&&!b.children.length||c.add(b),"pre"== 294b.name&&(v=!1),"textarea"==b.name&&(z=!1));b.returnPoint?(p=b.returnPoint,delete b.returnPoint):p=e?c:f}function w(a,b){if((a==t||"body"==a.name)&&k&&(!a.name||CKEDITOR.dtd[a.name][k])){var c,e;return(c=b.attributes&&(e=b.attributes["data-cke-real-element-type"])?e:b.name)&&c in CKEDITOR.dtd.$inline&&!(c in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function y(a,b){return a in CKEDITOR.dtd.$listItem||a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var r= 295new CKEDITOR.htmlParser,t=l instanceof CKEDITOR.htmlParser.element?l:"string"==typeof l?new CKEDITOR.htmlParser.element(l):new CKEDITOR.htmlParser.fragment,u=[],x=[],p=t,z="textarea"==t.name,v="pre"==t.name;r.onTagOpen=function(a,f,k,l){f=new CKEDITOR.htmlParser.element(a,f);f.isUnknown&&k&&(f.isEmpty=!0);f.isOptionalClose=l;
vendor: 11,260 bytes, lines 295-317
295if(d(f))u.push(f);else{if("pre"==a)v=!0;else{if("br"==a&&v){p.add(new CKEDITOR.htmlParser.text("\n"));return}"textarea"==a&&(z=!0)}if("br"==a)x.push(f);else{for(;!(l=(k=p.name)? 296CKEDITOR.dtd[k]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b,f.isUnknown||p.isUnknown||l[a]);)if(p.isOptionalClose)r.onTagClose(k);else if(a in g&&k in g)k=p.children,(k=k[k.length-1])&&"li"==k.name||n(k=new CKEDITOR.htmlParser.element("li"),p),!f.returnPoint&&(f.returnPoint=p),p=k;else if(a in CKEDITOR.dtd.$listItem&&!y(a,k))r.onTagOpen("li"==a?"ul":"dl",{},0,1);else if(k in h&&!y(a,k))!f.returnPoint&&(f.returnPoint=p),p=p.parent;else if(k in CKEDITOR.dtd.$inline&&u.unshift(p),p.parent)n(p, 297p.parent,1);else{f.isOrphan=1;break}c(a);e();f.parent=p;f.isEmpty?n(f):p=f}}};r.onTagClose=function(a){for(var b=u.length-1;0<=b;b--)if(a==u[b].name){u.splice(b,1);return}for(var c=[],f=[],d=p;d!=t&&d.name!=a;)d._.isBlockLike||f.unshift(d),c.push(d),d=d.returnPoint||d.parent;if(d!=t){for(b=0;b<c.length;b++){var g=c[b];n(g,g.parent)}p=d;d._.isBlockLike&&e();n(d,d.parent);d==p&&(p=p.parent);u=u.concat(f)}"body"==a&&(k=!1)};r.onText=function(a){if(!(p._.hasInlineStarted&&!x.length||v||z)&&(a=CKEDITOR.tools.ltrim(a), 2980===a.length))return;var d=p.name,g=d?CKEDITOR.dtd[d]||(p._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b;if(!z&&!g["#"]&&d in h)r.onTagOpen(f[d]||""),r.onText(a);else{e();c();v||z||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(w(p,a))this.onTagOpen(k,{},0,1);p.add(a)}};r.onCDATA=function(a){p.add(new CKEDITOR.htmlParser.cdata(a))};r.onComment=function(a){e();c();p.add(new CKEDITOR.htmlParser.comment(a))};r.parse(m);for(e();p!=t;)n(p,p.parent,1);a(t);return t}; 299CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(b,f){isNaN(f)&&(f=this.children.length);var d=0<f?this.children[f-1]:null;if(d){if(b._.isBlockLike&&d.type==CKEDITOR.NODE_TEXT&&(d.value=CKEDITOR.tools.rtrim(d.value),0===d.value.length)){this.children.pop();this.add(b);return}d.next=b}b.previous=d;b.parent=this;this.children.splice(f,0,b);this._.hasInlineStarted||(this._.hasInlineStarted=b.type==CKEDITOR.NODE_TEXT||b.type==CKEDITOR.NODE_ELEMENT&&!b._.isBlockLike)}, 300filter:function(b,f){f=this.getFilterContext(f);b.onRoot(f,this);this.filterChildren(b,!1,f)},filterChildren:function(b,f,d){if(this.childrenFilteredBy!=b.id){d=this.getFilterContext(d);if(f&&!this.parent)b.onRoot(d,this);this.childrenFilteredBy=b.id;for(f=0;f<this.children.length;f++)!1===this.children[f].filter(b,d)&&f--}},writeHtml:function(b,f){f&&this.filter(f);this.writeChildrenHtml(b)},writeChildrenHtml:function(b,f,d){var c=this.getFilterContext();if(d&&!this.parent&&f)f.onRoot(c,this);f&& 301this.filterChildren(f,!1,c);f=0;d=this.children;for(c=d.length;f<c;f++)d[f].writeHtml(b)},forEach:function(b,f,d){if(!(d||f&&this.type!=f))var c=b(this);if(!1!==c){d=this.children;for(var e=0;e<d.length;e++)c=d[e],c.type==CKEDITOR.NODE_ELEMENT?c.forEach(b,f):f&&c.type!=f||b(c)}},getFilterContext:function(b){return b||{}}}})();"use strict";(function(){function d(){this.rules=[]}function h(g,b,f,h){var l,k;for(l in b)(k=g[l])||(k=g[l]=new d),k.add(b[l],f,h)}CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(g){this.id= 302CKEDITOR.tools.getNextNumber();this.elementNameRules=new d;this.attributeNameRules=new d;this.elementsRules={};this.attributesRules={};this.textRules=new d;this.commentRules=new d;this.rootRules=new d;g&&this.addRules(g,10)},proto:{addRules:function(d,b){var f;"number"==typeof b?f=b:b&&"priority"in b&&(f=b.priority);"number"!=typeof f&&(f=10);"object"!=typeof b&&(b={});d.elementNames&&this.elementNameRules.addMany(d.elementNames,f,b);d.attributeNames&&this.attributeNameRules.addMany(d.attributeNames, 303f,b);d.elements&&h(this.elementsRules,d.elements,f,b);d.attributes&&h(this.attributesRules,d.attributes,f,b);d.text&&this.textRules.add(d.text,f,b);d.comment&&this.commentRules.add(d.comment,f,b);d.root&&this.rootRules.add(d.root,f,b)},applyTo:function(d){d.filter(this)},onElementName:function(d,b){return this.elementNameRules.execOnName(d,b)},onAttributeName:function(d,b){return this.attributeNameRules.execOnName(d,b)},onText:function(d,b,f){return this.textRules.exec(d,b,f)},onComment:function(d, 304b,f){return this.commentRules.exec(d,b,f)},onRoot:function(d,b){return this.rootRules.exec(d,b)},onElement:function(d,b){for(var f=[this.elementsRules["^"],this.elementsRules[b.name],this.elementsRules.$],h,l=0;3>l;l++)if(h=f[l]){h=h.exec(d,b,this);if(!1===h)return null;if(h&&h!=b)return this.onNode(d,h);if(b.parent&&!b.name)break}return b},onNode:function(d,b){var f=b.type;return f==CKEDITOR.NODE_ELEMENT?this.onElement(d,b):f==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(d,b.value, 305b)):f==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(d,b.value,b)):null},onAttribute:function(d,b,f,h){return(f=this.attributesRules[f])?f.exec(d,h,b,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=d;d.prototype={add:function(d,b,f){this.rules.splice(this.findIndex(b),0,{value:d,priority:b,options:f})},addMany:function(d,b,f){for(var h=[this.findIndex(b),0],l=0,k=d.length;l<k;l++)h.push({value:d[l],priority:b,options:f});this.rules.splice.apply(this.rules,h)},findIndex:function(d){for(var b= 306this.rules,f=b.length-1;0<=f&&d<b[f].priority;)f--;return f+1},exec:function(d,b){var f=b instanceof CKEDITOR.htmlParser.node||b instanceof CKEDITOR.htmlParser.fragment,h=Array.prototype.slice.call(arguments,1),l=this.rules,k=l.length,c,e,a,n;for(n=0;n<k;n++)if(f&&(c=b.type,e=b.name),a=l[n],!(d.nonEditable&&!a.options.applyToAll||d.nestedEditable&&a.options.excludeNestedEditable)){a=a.value.apply(null,h);if(!1===a||f&&a&&(a.name!=e||a.type!=c))return a;null!=a&&(h[0]=b=a)}return b},execOnName:function(d, 307b){for(var f=0,h=this.rules,l=h.length,k;b&&f<l;f++)k=h[f],d.nonEditable&&!k.options.applyToAll||d.nestedEditable&&k.options.excludeNestedEditable||(b=b.replace(k.value[0],k.value[1]));return b}}})();(function(){function d(a,c){function e(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text("\u00a0"):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function d(a,c){return function(f){if(f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=[],k=g(f),q,l;if(k)for(h(k,1)&&d.push(k);k;)m(k)&& 308(q=b(k))&&h(q)&&((l=b(q))&&!m(l)?d.push(q):(e(n).insertAfter(q),q.remove())),k=k.previous;for(k=0;k<d.length;k++)d[k].remove();if(d=!a||!1!==("function"==typeof c?c(f):c))n||CKEDITOR.env.needsBrFiller||f.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?n||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||f.name in CKEDITOR.dtd.tr||f.name in CKEDITOR.dtd.$listItem)?(d=g(f),d=!d||"form"==f.name&&"input"==d.name):d=!1:d=!1;d&&f.add(e(a))}}}function h(a,b){if((!n||CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&& 309"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var c;return a.type==CKEDITOR.NODE_TEXT&&(c=a.value.match(x))&&(c.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,c.index))).insertBefore(a),a.value=c[0]),!CKEDITOR.env.needsBrFiller&&n&&(!b||a.parent.name in E)||!n&&((c=a.previous)&&"br"==c.name||!c||m(c)))?!0:!1}var k={elements:{}},n="html"==c,E=CKEDITOR.tools.extend({},q),p;for(p in E)"#"in z[p]||delete E[p];for(p in E)k.elements[p]=d(n,a.config.fillEmptyBlocks);k.root=d(n,!1);k.elements.br= 310function(a){return function(c){if(c.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var d=c.attributes;if("data-cke-bogus"in d||"data-cke-eol"in d)delete d["data-cke-bogus"];else{for(d=c.next;d&&f(d);)d=d.next;var g=b(c);!d&&m(c.parent)?l(c.parent,e(a)):m(d)&&g&&!m(g)&&e(a).insertBefore(d)}}}}(n);return k}function h(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function g(a){for(a=a.children[a.children.length-1];a&&f(a);)a=a.previous;return a}function b(a){for(a=a.previous;a&& 311f(a);)a=a.previous;return a}function f(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 q||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 k(a){a=a.attributes;"false"!=a.contenteditable&&(a["data-cke-editable"]=a.contenteditable?"true":1); 312a.contenteditable="false"}function c(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function e(a){return a.replace(F,function(a,b,c){return"\x3c"+b+c.replace(J,function(a,b){return I.test(b)&&-1==c.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function a(a,b){return a.replace(b,function(a,b,c){0===a.indexOf("\x3ctextarea")&&(a=b+y(c).replace(/</g,"\x26lt;").replace(/>/g, 313"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(H,function(a,b){return decodeURIComponent(b)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+p+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function y(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function r(a,b){var c=b._.dataStore; 314return 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=[],e=b.config.protectedSource,f=b._.dataStore||(b._.dataStore={id:1}),d=/\x3c!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,e=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(e);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+ 315(c.push(a)-1)+"--\x3e"});for(var g=0;g<e.length;g++)a=a.replace(e[g],function(a){a=a.replace(d,function(a,b,e){return c[e]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(c.push(a)-1)+"--\x3e"});a=a.replace(d,function(a,b,e){return"\x3c!--"+p+(b?"{C}":"")+encodeURIComponent(c[e]).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, 316b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,e,f){return"\x3c"+c+e+"\x3e"+r(y(f),b)+"\x3c/"+c+"\x3e"})}var u;CKEDITOR.htmlDataProcessor=function(b){var c,f,g=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(A);c.addRules(B,{applyToAll:!0});c.addRules(d(b,"data"), 317{applyToAll:!0});f.addRules(C);f.addRules(G,{applyToAll:!0});f.addRules(d(b,"html"),{applyToAll:!0});b.on("toHtml",function(c){c=c.data;var f=c.dataValue,d,f=u(f),f=t(f,b),f=a(f,M),f=e(f),f=a(f,D),f=f.replace(K,"$1cke:$2"),f=f.replace(T,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),f=f.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),f=f.replace(/([^a-z0-9<\-])(on\w{3,})(?!>
vendor: 9,807 bytes, lines 317-336
317)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");d=c.context||b.editable().getName();var g;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==d&&(d="div", 318f="\x3cpre\x3e"+f+"\x3c/pre\x3e",g=1);d=b.document.createElement(d);d.setHtml("a"+f);f=d.getHtml().substr(1);f=f.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");g&&(f=f.replace(/^<pre>|<\/pre>$/gi,""));f=f.replace(E,"$1$2");f=n(f);f=y(f);d=!1===c.fixForBody?!1:h(c.enterMode,b.config.autoParagraph);f=CKEDITOR.htmlParser.fragment.fromHtml(f,c.context,d);d&&(g=f,!g.children.length&&CKEDITOR.dtd[g.name][d]&&(d=new CKEDITOR.htmlParser.element(d),g.add(d)));c.dataValue=f},null,null,5);b.on("toHtml", 319function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(g.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=w(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,"")); 320a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,h(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(g.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,e=g.writer;e.reset();c.writeChildrenHtml(e);c=e.getHtml(!0);c=y(c);c=r(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype= 321{toHtml:function(a,b,c,e){var f=this.editor,d,g,k,h;b&&"object"==typeof b?(d=b.context,c=b.fixForBody,e=b.dontFilter,g=b.filter,k=b.enterMode,h=b.protectedWhitespaces):d=b;d||null===d||(d=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:d,fixForBody:c,dontFilter:e,filter:g||f.filter,enterMode:k||f.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,b){var c,e,f;b&&(c=b.context,e=b.filter,f=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat", 322{dataValue:a,filter:e||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue}};var x=/(?: |\xa0)$/,p="{cke_protected}",z=CKEDITOR.dtd,v="caption colgroup col thead tfoot tbody".split(" "),q=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),A={elements:{input:k,textarea:k}},B={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi, 323"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},C={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);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},G={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/, 324""],[/^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"],e,f=0;f<c.length;f++)e="data-cke-saved-"+c[f],e in b&&delete b[c[f]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var c,e;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(c=CKEDITOR.tools.indexOf(v,a.name),e=CKEDITOR.tools.indexOf(v,b.name));-1<c&&-1<e&&c!=e||(c=a.parent?a.getIndex():-1,e=b.parent?b.getIndex():-1);return c>e? 3251:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&l(a,b=new CKEDITOR.htmlParser.text); 326b.value=a.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(G.attributes.style=function(a){return a.replace(/(^|;)([^:]+)/g,function(a){return a.toLowerCase()})});var F=/<(a|area|img|input|source)\b([^>]*)>/gi,J=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,I=/^(href|src|name)$/i,D=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, 327M=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,H=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,K=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,E=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,T=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;u=function(){function a(c){return CKEDITOR.tools.array.reduce(c.split(""),function(a,c){var e=c.toLowerCase(),f=c.toUpperCase(),d=b(e);e!==f&&(d+="|"+b(f));return a+("("+d+")")},"")}function b(a){var c;c=a.charCodeAt(0);var e=c.toString(16); 328c={htmlCode:"\x26#"+c+";?",hex:"\x26#x0*"+e+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var f in c)c[f]&&(a+="|"+c[f]);return a}var c=new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+"?"+a("cke:encoded\x3e")+")","gi"),e=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+a("}")+")","gi");return function(a){return a.replace(c,"").replace(e,"")}}()})();"use strict";CKEDITOR.htmlParser.element=function(d,h){this.name=d;this.attributes= 329h||{};this.children=[];var g=d||"",b=g.match(/^cke:(.*)/);b&&(g=b[1]);g=!!(CKEDITOR.dtd.$nonBodyContent[g]||CKEDITOR.dtd.$block[g]||CKEDITOR.dtd.$listItem[g]||CKEDITOR.dtd.$tableContent[g]||CKEDITOR.dtd.$nonEditable[g]||"br"==g);this.isEmpty=!!CKEDITOR.dtd.$empty[d];this.isUnknown=!CKEDITOR.dtd[d];this._={isBlockLike:g,hasInlineStarted:this.isEmpty||!g}};CKEDITOR.htmlParser.cssStyle=function(d){var h={};((d instanceof CKEDITOR.htmlParser.element?d.attributes.style:d)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, 330function(d,b,f){"font-family"==b&&(f=f.replace(/["']/g,""));h[b.toLowerCase()]=f});return{rules:h,populate:function(d){var b=this.toString();b&&(d instanceof CKEDITOR.dom.element?d.setAttribute("style",b):d instanceof CKEDITOR.htmlParser.element?d.attributes.style=b:d.style=b)},toString:function(){var d=[],b;for(b in h)h[b]&&d.push(b,":",h[b],";");return d.join("")}}};(function(){function d(b){return function(f){return f.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof b?f.name==b:f.name in b)}}var h= 331function(b,f){b=b[0];f=f[0];return b<f?-1:b>f?1:0},g=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:g.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(b,f){var d=this,g,k;f=d.getFilterContext(f);if(!d.parent)b.onRoot(f,d);for(;;){g=d.name;if(!(k=b.onElementName(f,g)))return this.remove(),!1;d.name=k;if(!(d=b.onElement(f,d)))return this.remove(), 332!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==g)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}g=d.attributes;var c,e;for(c in g){for(k=g[c];;)if(e=b.onAttributeName(f,c))if(e!=c)delete g[c],c=e;else break;else{delete g[c];break}e&&(!1===(k=b.onAttribute(f,d,e,k))?delete g[e]:g[e]=k)}d.isEmpty||this.filterChildren(b,!1,f);return!0},filterChildren:g.filterChildren,writeHtml:function(b,f){f&&this.filter(f);var d=this.name, 333g=[],k=this.attributes,c,e;b.openTag(d,k);for(c in k)g.push([c,k[c]]);b.sortAttributes&&g.sort(h);c=0;for(e=g.length;c<e;c++)k=g[c],b.attribute(k[0],k[1]);b.openTagClose(d,this.isEmpty);this.writeChildrenHtml(b);this.isEmpty||b.closeTag(d)},writeChildrenHtml:g.writeChildrenHtml,replaceWithChildren:function(){for(var b=this.children,f=b.length;f;)b[--f].insertAfter(this);this.remove()},forEach:g.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&& 334(b=d(b));for(var f=0,g=this.children.length;f<g;++f)if(b(this.children[f]))return this.children[f];return null},getHtml:function(){var b=new CKEDITOR.htmlParser.basicWriter;this.writeChildrenHtml(b);return b.getHtml()},setHtml:function(b){b=this.children=CKEDITOR.htmlParser.fragment.fromHtml(b).children;for(var f=0,d=b.length;f<d;++f)b[f].parent=this},getOuterHtml:function(){var b=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(b);return b.getHtml()},split:function(b){for(var f=this.children.splice(b, 335this.children.length-b),d=this.clone(),g=0;g<f.length;++g)f[g].parent=d;d.children=f;f[0]&&(f[0].previous=null);0<b&&(this.children[b-1].next=null);this.parent.add(d,this.getIndex()+1);return d},find:function(b,f){void 0===f&&(f=!1);var d=[],g;for(g=0;g<this.children.length;g++){var k=this.children[g];"function"==typeof b&&b(k)?d.push(k):"string"==typeof b&&k.name===b&&d.push(k);f&&k.find&&(d=d.concat(k.find(b,f)))}return d},findOne:function(b,f){var d=null,g=CKEDITOR.tools.array.find(this.children, 336function(g){var c="function"===typeof b?b(g):g.name===b;if(c||!f)return c;g.children&&g.findOne&&(d=g.findOne(b,!0));return!!d});return d||g||null},addClass:function(b){if(!this.hasClass(b)){var f=this.attributes["class"]||"";this.attributes["class"]=f+(f?" ":"")+b}},removeClass:function(b){var f=this.attributes["class"];f&&((f=CKEDITOR.tools.trim(f.replace(new RegExp("(?:\\s+|^)"+b+"(?:\\
336s+|$)")," ")))?this.attributes["class"]=f:delete this.attributes["class"])},hasClass:function(b){var f=this.attributes["class"]; 337return f?(new RegExp("(?:^|\\s)"+b+"(?\x3d\\s|$)")).test(f):!1},getFilterContext:function(b){var f=[];b||(b={nonEditable:!1,nestedEditable:!1});b.nonEditable||"false"!=this.attributes.contenteditable?b.nonEditable&&!b.nestedEditable&&"true"==this.attributes.contenteditable&&f.push("nestedEditable",!0):f.push("nonEditable",!0);if(f.length){b=CKEDITOR.tools.copy(b);for(var d=0;d<f.length;d+=2)b[f[d]]=f[d+1]}return b}},!0)})();(function(){var d=/{([^}]+)}/g;CKEDITOR.template=function(d){this.source= 338"function"===typeof d?d:String(d)};CKEDITOR.template.prototype.output=function(h,g){var b=("function"===typeof this.source?this.source(h):this.source).replace(d,function(b,d){return void 0!==h[d]?h[d]:b});return g?g.push(b):b}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(d){function h(){CKEDITOR.currentInstance==d&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[d.name]=d;d.on("focus", 339function(){CKEDITOR.currentInstance!=d&&(CKEDITOR.currentInstance=d,CKEDITOR.fire("currentInstance"))});d.on("blur",h);d.on("destroy",h);CKEDITOR.fire("instance",null,d)};CKEDITOR.remove=function(d){delete CKEDITOR.instances[d.name]};(function(){var d={};CKEDITOR.addTemplate=function(h,g){var b=d[h];if(b)return b;b={name:h,source:g};CKEDITOR.fire("template",b);return d[h]=new CKEDITOR.template(b.source)};CKEDITOR.getTemplate=function(h){return d[h]}})();(function(){var d=[];CKEDITOR.addCss=function(h){d.push(h)}; 340CKEDITOR.getCss=function(){return d.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(d,h){d=CKEDITOR.editor._getEditorElement(d);if(!d)return null;var g=new CKEDITOR.editor(h,d,CKEDITOR.ELEMENT_MODE_INLINE),b=d.is("textarea")?d:null;b?(g.setData(b.getValue(),null,!0),d=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+ 341!!g.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+b.getValue()+"\x3c/div\x3e",CKEDITOR.document),d.insertAfter(b),b.hide(),b.$.form&&g._attachToForm()):(h&&"undefined"!==typeof h.readOnly&&!h.readOnly&&d.setAttribute("contenteditable","true"),g.setData(d.getHtml(),null,!0));g.on("loaded",function(){g.fire("uiReady");g.editable(d);g.container=d;g.ui.contentsElement=d;g.setData(g.getData(1));g.resetDirty();g.fire("contentDom");g.mode="wysiwyg";g.fire("mode");g.status="ready";g.fireOnce("instanceReady"); 342CKEDITOR.fire("instanceReady",null,g)},null,null,1E4);g.on("destroy",function(){var f=g.container;b&&f&&(f.clearCustomData(),f.remove());b&&b.show();g.element.clearCustomData();delete g.element});return g};CKEDITOR.inlineAll=function(){var d,h,g;for(g in CKEDITOR.dtd.$editable)for(var b=CKEDITOR.document.getElementsByTag(g),f=0,m=b.count();f<m;f++)d=b.getItem(f),"true"==d.getAttribute("contenteditable")&&(h={element:d,config:{}},!1!==CKEDITOR.fire("inline",h)&&CKEDITOR.inline(d,h.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&& 343CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";(function(){function d(b,f,d,l){b=CKEDITOR.editor._getEditorElement(b);if(!b)return null;var k=new CKEDITOR.editor(f,b,l);l==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.setStyle("visibility","hidden"),k._.required=b.hasAttribute("required"),b.removeAttribute("required"));d&&k.setData(d,null,!0);k.on("loaded",function(){k.isDestroyed()||k.isDetached()||(g(k),l==CKEDITOR.ELEMENT_MODE_REPLACE&&k.config.autoUpdateElement&&b.$.form&&k._attachToForm(),k.setMode(k.config.startupMode, 344function(){k.resetDirty();k.status="ready";k.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,k)}))});k.on("destroy",h);return k}function h(){var b=this.container,f=this.element;b&&(b.clearCustomData(),b.remove());f&&(f.clearCustomData(),this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(f.show(),this._.required&&f.setAttribute("required","required")),delete this.element)}function g(b){var f=b.name,d=b.element,g=b.elementMode,k=b.fire("uiSpace",{space:"top",html:""}).html,c=b.fire("uiSpace", 345{space:"bottom",html:""}).html,e=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"'+(b.title?' aria-labelledby\x3d"cke_{name}_arialbl"':"")+"\x3e"+(b.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'), 346f=CKEDITOR.dom.element.createFromHtml(e.output({id:b.id,name:f,langDir:b.lang.dir,langCode:b.langCode,voiceLabel:b.title,topHtml:k?'\x3cspan id\x3d"'+b.ui.spaceId("top")+'" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e'+k+"\x3c/span\x3e":"",contentId:b.ui.spaceId("contents"),bottomHtml:c?'\x3cspan id\x3d"'+b.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+c+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));g==CKEDITOR.ELEMENT_MODE_REPLACE? 347(d.hide(),f.insertAfter(d)):d.append(f);b.container=f;b.ui.contentsElement=b.ui.space("contents");k&&b.ui.space("top").unselectable();c&&b.ui.space("bottom").unselectable();d=b.config.width;g=b.config.height;d&&f.setStyle("width",CKEDITOR.tools.cssLength(d));g&&b.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(g));f.disableContextMenu();CKEDITOR.env.webkit&&f.on("focus",function(){b.focus()});b.fireOnce("uiReady")}CKEDITOR.replace=function(b,f){return d(b,f,null,CKEDITOR.ELEMENT_MODE_REPLACE)}; 348CKEDITOR.appendTo=function(b,f,g){return d(b,f,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var b=document.getElementsByTagName("textarea"),f=0;f<b.length;f++){var d=null,g=b[f];
vendor: 5,156 bytes, lines 348-358
348if(g.name||g.id){if("string"==typeof arguments[0]){if(!(new RegExp("(?:^|\\s)"+arguments[0]+"(?:$|\\s)")).test(g.className))continue}else if("function"==typeof arguments[0]&&(d={},!1===arguments[0](g,d)))continue;this.replace(g,d)}}};CKEDITOR.editor.prototype.addMode=function(b,f){(this._.modes||(this._.modes= 349{}))[b]=f};CKEDITOR.editor.prototype.setMode=function(b,f){var d=this,g=this._.modes;if(b!=d.mode&&g&&g[b]){d.fire("beforeSetMode",b);if(d.mode){var k=d.checkDirty(),g=d._.previousModeData,c,e=0;d.fire("beforeModeUnload");d.editable(0);d._.previousMode=d.mode;d._.previousModeData=c=d.getData(1);"source"==d.mode&&g==c&&(d.fire("lockSnapshot",{forceUpdate:!0}),e=1);d.ui.space("contents").setHtml("");d.mode=""}else d._.previousModeData=d.getData(1);this._.modes[b](function(){d.mode=b;void 0!==k&&!k&& 350d.resetDirty();e?d.fire("unlockSnapshot"):"wysiwyg"==b&&d.fire("saveSnapshot");setTimeout(function(){d.isDestroyed()||d.isDetached()||(d.fire("mode"),f&&f.call(d))},0)})}};CKEDITOR.editor.prototype.resize=function(b,f,d,g){var k=this.container,c=this.ui.space("contents"),e=CKEDITOR.env.webkit&&this.document&&this.document.getWindow().$.frameElement;g=g?this.container.getFirst(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_inner")}):k;b=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(b)); 351g.setSize("width",b,!0);e&&(e.style.width="1%");f=CKEDITOR.tools.convertToPx(CKEDITOR.tools.cssLength(f));var a=(g.$.offsetHeight||0)-(c.$.clientHeight||0),k=Math.max(f-(d?0:a),0);f=d?f+a:f;c.setStyle("height",CKEDITOR.tools.cssLength(k));e&&(e.style.width="100%");this.fire("resize",{outerHeight:f,contentsHeight:k,outerWidth:b||g.getSize("width")})};CKEDITOR.editor.prototype.getResizable=function(b){return b?this.ui.space("contents"):this.container};CKEDITOR.domReady(function(){CKEDITOR.replaceClass&& 352CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";(function(){function d(a){var c=a.editor,e=a.data.path,f=e.blockLimit,d=a.data.selection,g=d.getRanges()[0],k;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(d=h(d,e))d.appendBogus(),k=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&c._.previousActive;l(c,e.block,f)&&g.collapsed&&!g.getCommonAncestor().isReadOnly()&&(e=g.clone(),e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(e), 353f.guard=function(a){return!b(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||e.checkStartOfBlock()&&e.checkEndOfBlock())&&(c=g.fixBlock(!0,c.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(c=c.getFirst(b))&&c.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(c.getText()).match(/^(?: |\xa0)$/)&&c.remove(),k=1,a.cancel());k&&g.select()}function h(a,c){if(a.isFake)return 0;var e=c.block||c.blockLimit,f=e&&e.getLast(b);if(!(!e||!e.isBlockBoundary()|| 354f&&f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()||e.is("pre")||e.getBogus()))return e}function g(a){var b=a.data.getTarget();b.is("input")&&(b=b.getAttribute("type"),"submit"!=b&&"reset"!=b||a.data.preventDefault())}function b(a){return n(a)&&w(a)}function f(a,b){return function(c){var e=c.data.$.toElement||c.data.$.fromElement||c.data.$.relatedTarget;(e=e&&e.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(e):null)&&(b.equals(e)||b.contains(e))||a.call(this,c)}}function m(a){function c(a){return function(c, 355f){f&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(d)&&(e=c);if(!(f||!b(c)||a&&r(c)))return!1}}var e,f=a.getRanges()[0];a=a.root;var d={table:1,ul:1,ol:1,dl:1};if(f.startPath().contains(d)){var g=f.clone();g.collapse(1);g.setStartAt(a,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(g);a.guard=c();a.checkBackward();if(e)return g=f.clone(),g.collapse(),g.setEndAt(e,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(g),a.guard=c(!0),e=!1,a.checkForward(),e}return null}function l(a,b,c){return!1!== 356a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(c)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function k(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p":!1}function c(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function e(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function a(a,b,c){var e=a.getCommonAncestor(b);for(b=a=c? 357b:a;(a=a.getParent())&&!e.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var n,w,y,r,t,u,x,p,z,v;CKEDITOR.editable=CKEDITOR.tools.createClass({base:CKEDITOR.dom.element,$:function(a,b){this.base(b.$||b);this.editor=a;this.status="unloaded";this.hasFocus=!1;this.setup()},proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&& 358this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var b=this.$.scrollTop;
vendor: 4,198 bytes, lines 358-366
358this.$.focus();this.$.scrollTop=b}else this.$.focus();else this.$.setActive()}catch(c){if(!CKEDITOR.env.ie)throw c;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())}, 359on:function(a,b){var c=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=f(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= 360this._.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), 361"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 f=this.editor;f.focus();f.fire("saveSnapshot");c||(c=f.getSelection().getRanges()[0]);u(this,b||"html",a,c);c.select();e(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,c){u(this,c||"html",a,b);this.editor.fire("afterInsertHtml", 362{intoRange:b})},insertElement:function(a,c){var f=this.editor;f.focus();f.fire("saveSnapshot");var d=f.activeEnterMode,f=f.getSelection(),g=a.getName(),g=CKEDITOR.dtd.$block[g];c||(c=f.getRanges()[0]);this.insertElementIntoRange(a,c)&&(c.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),g&&((g=a.getNext(function(a){return b(a)&&!r(a)}))&&g.type==CKEDITOR.NODE_ELEMENT&&g.is(CKEDITOR.dtd.$block)?g.getDtd()["#"]?c.moveToElementEditStart(g):c.moveToElementEditEnd(a):g||d==CKEDITOR.ENTER_BR||(g=c.fixBlock(!0, 363d==CKEDITOR.ENTER_DIV?"div":"p"),c.moveToElementEditStart(g))));f.selectRanges([c]);e(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var e=this.editor,f=e.config.enterMode,d=a.getName(),g=CKEDITOR.dtd.$block[d];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})?x(b):b.startContainer.is(CKEDITOR.dtd.$list)&&p(b));var k,h;if(g)for(;(k=b.getCommonAncestor(0, 3641))&&(h=CKEDITOR.dtd[k.getName()])&&(!h||!h[d]);)if(k.getName()in CKEDITOR.dtd.span){var g=b.splitElement(k),n=b.createBookmark();c(k);c(g);b.moveToBookmark(n)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(k),b.collapse(!0),k.remove()):b.splitBlock(f==CKEDITOR.ENTER_DIV?"div":"p",e.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")}, 365getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.status="detached";this.editor.setData(this.editor.getData(),{internal:!0});this.clearListeners();try{this._.cleanCustomData()}catch(a){if(!CKEDITOR.env.ie||-2146828218!==a.number)throw a;}this.editor.fire("contentDomUnload");delete this.editor.document;delete this.editor.window;delete this.editor},isInline:function(){return this.getDocument().equals(CKEDITOR.document)}, 366fixInitialSelection:function(){function a(){var b=c.getDocument().$,e=b.getSelection(),f;a:if(e.anchorNode&&e.anchorNode==c.$)f=!0;else{if(CKEDITOR.env.webkit&&(f=c.getDocument().getActive())&&f.equals(c)&&!e.anchorNode){f=!0;break a}f=void 0}
vendor: 5,161 bytes, lines 366-376
366f&&(f=new CKEDITOR.dom.range(c),f.moveToElementEditStart(c),b=b.createRange(),b.setStart(f.startContainer.$,f.startOffset),b.collapse(!0),e.removeAllRanges(),e.addRange(b))}function b(){var a=c.getDocument().$,e=a.selection,f=c.getDocument().getActive();"None"== 367e.type&&f.equals(c)&&(e=new CKEDITOR.dom.range(c),a=a.body.createTextRange(),e.moveToElementEditStart(c),e=e.startContainer,e.type!=CKEDITOR.NODE_ELEMENT&&(e=e.getParent()),a.moveToElementText(e.$),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); 368a={doc:this.getDocument(),range:a.clone()};z.eol.detect(a,this);z.bogus.exclude(a);z.cell.shrink(a);a.fragment=a.range.cloneContents();z.tree.rebuild(a,this);z.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=v,e={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(e);e.bookmark=a.createBookmark();delete e.range;var d=this.editor.createRange(); 369d.moveToPosition(e.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);e.targetBookmark=d.createBookmark();c.list.detectMerge(e,this);c.table.detectRanges(e,this);c.block.detectMerge(e,this);e.tableContentsRanges?(c.table.deleteRanges(e),a.moveToBookmark(e.bookmark),e.range=a):(a.moveToBookmark(e.bookmark),e.range=a,a.extractContents(c.detectExtractMerge(e)));a.moveToBookmark(e.targetBookmark);a.optimize();c.fixUneditableRangePosition(a);c.list.merge(e,this);c.table.purge(e,this);c.block.merge(e,this); 370if(b){c=a.startPath();if(e=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var e=c.block.getElementsByTag("span"),d=0,g;if(e)for(;g=e.getItem(d++);)if(!w(g)){e=!0;break a}e=!1}e=!e}e&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),y(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return f},setup:function(){var c=this.editor;this.attachListener(c,"beforeGetData",function(){var a= 371this.getData();this.is("textarea")||!1!==c.config.ignoreEmptyParagraph&&(a=a.replace(t,function(a,b){return b}));c.setData(a,null,1)},this);this.attachListener(c,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(c,"afterSetData",function(){this.setData(c.getData(1))},this);this.attachListener(c,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(c,"beforeFocus",function(){var a=c.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()}, 372this);this.attachListener(c,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(c,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(c,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(c.readOnly);this.attachClass("cke_editable");c.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):c.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&c.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO|| 373this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+c.config.contentsLangDirection);c.keystrokeHandler.blockedKeystrokes[8]=+c.readOnly;c.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(){c._.previousScrollTop=c.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var e=function(){var a=c.editable(); 374null!=c._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=c._.previousScrollTop,c._.previousScrollTop=null,this.removeListener("scroll",e))};this.on("scroll",e)}c.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,c.once("contentDom",function(){c.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",c.tabIndex);if(!this.is("textarea")){c.document=this.getDocument();c.window=this.getWindow();var f=c.document;this.changeAttr("spellcheck", 375!c.config.disableNativeSpellChecker);var d=c.config.contentsLangDirection;this.getDirection(1)!=d&&this.changeAttr("dir",d);var k=CKEDITOR.getCss();if(k){var d=f.getHead(),h=d.getCustomData("stylesheet");h?k!=h.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?h.$.styleSheet.cssText=k:h.setText(k)):(k=f.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),d.setCustomData("stylesheet",k),k.data("cke-temp",1))}d=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref", 376d+1);this.setCustomData("cke_includeReadonly",!c.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var l={8:1,46:1};
vendor: 32,841 bytes, lines 376-440
376this.attachListener(c,"key",function(a){if(c.readOnly)return!0;var b=a.data.domEvent.getKey(),e;a=c.getSelection();if(0!==a.getRanges().length){if(b in l){var f,d=a.getRanges()[0],g=d.startPath(),k,h,p,b=8==b;CKEDITOR.env.ie&& 37711>CKEDITOR.env.version&&(f=a.getSelectedElement())||(f=m(a))?(c.fire("saveSnapshot"),d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove(),d.select(),c.fire("saveSnapshot"),e=1):d.collapsed&&((k=g.block)&&(p=k[b?"getPrevious":"getNext"](n))&&p.type==CKEDITOR.NODE_ELEMENT&&p.is("table")&&d[b?"checkStartOfBlock":"checkEndOfBlock"]()?(c.fire("saveSnapshot"),d[b?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),d["moveToElementEdit"+(b?"End":"Start")](p),d.select(),c.fire("saveSnapshot"), 378e=1):g.blockLimit&&g.blockLimit.is("td")&&(h=g.blockLimit.getAscendant("table"))&&d.checkBoundaryOfElement(h,b?CKEDITOR.START:CKEDITOR.END)&&(p=h[b?"getPrevious":"getNext"](n))?(c.fire("saveSnapshot"),d["moveToElementEdit"+(b?"End":"Start")](p),d.checkStartOfBlock()&&d.checkEndOfBlock()?p.remove():d.select(),c.fire("saveSnapshot"),e=1):(h=g.contains(["td","th","caption"]))&&d.checkBoundaryOfElement(h,b?CKEDITOR.START:CKEDITOR.END)&&(e=1))}return!e}});c.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&& 379this.attachListener(this,"keyup",function(a){a.data.getKeystroke()in l&&!this.getFirst(b)&&(this.appendBogus(),a=c.createRange(),a.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),a.select())});this.attachListener(this,"dblclick",function(a){if(c.readOnly)return!1;a={element:a.data.getTarget()};c.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",g);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var b=a.data.getTarget();b.is("img","hr", 380"input","textarea","select")&&!b.isReadOnly()&&(c.getSelection().selectElement(b),b.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&c.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(t,""))){var b=c.createRange();b.moveToElementEditStart(a); 381b.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(c,"key",function(b){if(c.readOnly)return!0;var e=b.data.domEvent.getKey();if(e in l&&(b=c.getSelection(),0!==b.getRanges().length)){var e=8==e,f=b.getRanges()[0];b=f.startPath();if(f.collapsed)a:{var d= 382b.block;if(d&&f[e?"checkStartOfBlock":"checkEndOfBlock"]()&&f.moveToClosestEditablePosition(d,!e)&&f.collapsed){if(f.startContainer.type==CKEDITOR.NODE_ELEMENT){var g=f.startContainer.getChild(f.startOffset-(e?1:0));if(g&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("hr")){c.fire("saveSnapshot");g.remove();b=!0;break a}}f=f.startPath().block;if(!f||f&&f.contains(d))b=void 0;else{c.fire("saveSnapshot");var k;(k=(e?f:d).getBogus())&&k.remove();k=c.getSelection();g=k.createBookmarks();(e?d:f).moveChildren(e? 383f:d,!1);b.lastElement.mergeSiblings();a(d,f,!e);k.selectBookmarks(g);b=!0}}else b=!1}else e=f,k=b.block,f=e.endPath().block,k&&f&&!k.equals(f)?(c.fire("saveSnapshot"),(d=k.getBogus())&&d.remove(),e.enlarge(CKEDITOR.ENLARGE_INLINE),e.deleteContents(),f.getParent()&&(f.moveChildren(k,!1),b.lastElement.mergeSiblings(),a(k,f,!0)),e=c.getSelection().getRanges()[0],e.collapse(1),e.optimize(),""===e.startContainer.getHtml()&&e.startContainer.appendBogus(),e.select(),b=!0):b=!1;if(!b)return;c.getSelection().scrollIntoView(); 384c.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(b){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref"); 385--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;if(!arguments.length)return b;a?b=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),b=null);return this._.editable=b};CKEDITOR.on("instanceLoaded",function(a){var b=a.editor;b.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")|| 386a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});b.on("selectionChange",function(a){if(!b.readOnly){var c=b.getSelection();c&&!c.isLocked&&(c=b.checkDirty(),b.fire("lockSnapshot"),d(a),b.fire("unlockSnapshot"),!c&&b.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role", 387"textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var e=b.fire("ariaEditorHelpLabel",{}).label;if(e&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var f=CKEDITOR.tools.getNextId(),e=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+e+"\x3c/span\x3e");c.append(e);a.changeAttr("aria-describedby",f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"); 388n=CKEDITOR.dom.walker.whitespaces(!0);w=CKEDITOR.dom.walker.bookmark(!1,!0);y=CKEDITOR.dom.walker.empty();r=CKEDITOR.dom.walker.bogus();t=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;u=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function e(b,c){var f,d,g,k,h=[],n=c.range.startContainer;f=c.range.startPath();for(var n=m[n.getName()],l=0,p=b.getChildren(),w=p.count(),u=-1,t=-1,x=0,F=f.contains(m.$list);l< 389w;++l)f=p.getItem(l),a(f)?(g=f.getName(),F&&g in CKEDITOR.dtd.$list?h=h.concat(e(f,c)):(k=!!n[g],"br"!=g||!f.data("cke-eol")||l&&l!=w-1||(x=(d=l?h[l-1].node:p.getItem(l+1))&&(!a(d)||!d.is("br")),d=d&&a(d)&&m.$block[d.getName()]),-1!=u||k||(u=l),k||(t=l),h.push({isElement:1,isLineBreak:x,isBlock:f.isBlockBoundary(),hasBlockSibling:d,node:f,name:g,allowed:k}),d=x=0)):h.push({isElement:0,node:f,allowed:1});-1<u&&(h[u].firstNotAllowed=1);-1<t&&(h[t].lastNotAllowed=1);return h}function f(b,c){var e=[], 390d=b.getChildren(),g=d.count(),k,h=0,n=m[c],l=!b.is(m.$inline)||b.is("br");for(l&&e.push(" ");h<g;h++)k=d.getItem(h),a(k)&&!k.is(n)?e=e.concat(f(k,c)):e.push(k);l&&e.push(" ");return e}function d(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function g(b){return b&&a(b)&&(b.is(m.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function h(b,c,e,f){var d=b.clone(),g,k;d.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);(g=(new CKEDITOR.dom.walker(d)).next())&&a(g)&&p[g.getName()]&& 391(k=g.getPrevious())&&a(k)&&!k.getParent().equals(b.startContainer)&&e.contains(k)&&f.contains(g)&&g.isIdentical(k)&&(g.moveChildren(k),g.remove(),h(b,c,e,f))}function n(b,c){function e(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),d=c.endContainer.getChild(c.endOffset-1);f&&e(f,b[b.length-1]);d&&e(d,b[0])&&(c.setEnd(c.endContainer,c.endOffset-1),c.collapse())}var m=CKEDITOR.dtd,p={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1, 392h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},w={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},u=CKEDITOR.tools.extend({},m.$inline);delete u.br;return function(p,E,t,x){var v=p.editor,z=!1;"unfiltered_html"==E&&(E="html",z=!0);if(!x.checkReadOnly()){var y=(new CKEDITOR.dom.elementPath(x.startContainer,x.root)).blockLimit||x.root;E={type:E,dontFilter:z,editable:p,editor:v,range:x,blockLimit:y,mergeCandidates:[],zombies:[]};var z=E.range,y=E.mergeCandidates,r="html"===E.type,D,L,U,Z,ca,aa;"text"==E.type&& 393z.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(L=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",z.document),z.insertNode(L),z.setStartAfter(L));U=new CKEDITOR.dom.elementPath(z.startContainer);E.endPath=Z=new CKEDITOR.dom.elementPath(z.endContainer);if(!z.collapsed){D=Z.block||Z.blockLimit;var da=z.getCommonAncestor();D&&!D.equals(da)&&!D.contains(da)&&z.checkEndOfBlock()&&E.zombies.push(D);z.deleteContents()}for(;(ca=d(z))&&a(ca)&&ca.isBlockBoundary()&&U.contains(ca);)z.moveToPosition(ca, 394CKEDITOR.POSITION_BEFORE_END);h(z,E.blockLimit,U,Z);L&&(z.setEndBefore(L),z.collapse(),L.remove());L=z.startPath();if(D=L.contains(g,!1,1))aa=z.splitElement(D),E.inlineStylesRoot=D,E.inlineStylesPeak=L.lastElement;L=z.createBookmark();r&&(c(D),c(aa));(D=L.startNode.getPrevious(b))&&a(D)&&g(D)&&y.push(D);(D=L.startNode.getNext(b))&&a(D)&&g(D)&&y.push(D);for(D=L.startNode;(D=D.getParent())&&g(D);)y.push(D);z.moveToBookmark(L);v.enterMode===CKEDITOR.ENTER_DIV&&""===v.getData(!0)&&((v=p.getFirst())&& 395v.remove(),x.setStartAt(p,CKEDITOR.POSITION_AFTER_START),x.collapse(!0));if(p=t){p=E.range;if("text"==E.type&&E.inlineStylesRoot){x=E.inlineStylesPeak;v=x.getDocument().createText("{cke-peak}");for(aa=E.inlineStylesRoot.getParent();!x.equals(aa);)v=v.appendTo(x.clone()),x=x.getParent();t=v.getOuterHtml().split("{cke-peak}").join(t)}x=E.blockLimit.getName();if(/^\s+|\s+$/.test(t)&&"span"in CKEDITOR.dtd[x]){var ba='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';t=ba+t+ba}t=E.editor.dataProcessor.toHtml(t, 396{context:null,fixForBody:!1,protectedWhitespaces:!!ba,dontFilter:E.dontFilter,filter:E.editor.activeFilter,enterMode:E.editor.activeEnterMode});x=p.document.createElement("body");x.setHtml(t);ba&&(x.getFirst().remove(),x.getLast().remove());if((ba=p.startPath().block)&&(1!=ba.getChildCount()||!ba.getBogus()))a:{var S;if(1==x.getChildCount()&&a(S=x.getFirst())&&S.is(w)&&!S.hasAttribute("contenteditable")){ba=S.getElementsByTag("*");p=0;for(aa=ba.count();p<aa;p++)if(v=ba.getItem(p),!v.is(u))break a; 397S.moveChildren(S.getParent(1));S.remove()}}E.dataWrapper=x;p=t}if(p){S=E.range;p=S.document;x=E.blockLimit;aa=0;var W,ba=[],V,Q;t=L=0;var P,v=S.startContainer;ca=E.endPath.elements[0];var ga,z=ca.getPosition(v),y=!!ca.getCommonAncestor(v)&&z!=CKEDITOR.POSITION_IDENTICAL&&!(z&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),v=e(E.dataWrapper,E);for(n(v,S);aa<v.length;aa++){z=v[aa];if(r=z.isLineBreak)r=S,D=x,Z=U=void 0,z.hasBlockSibling?r=1:(U=r.startContainer.getAscendant(m.$block,1))&&U.is({div:1, 398p:1})?(Z=U.getPosition(D),Z==CKEDITOR.POSITION_IDENTICAL||Z==CKEDITOR.POSITION_CONTAINS?r=0:(D=r.splitElement(U),r.moveToPosition(D,CKEDITOR.POSITION_AFTER_START),r=1)):r=0;if(r)t=0<aa;else{r=S.startPath();!z.isBlock&&l(E.editor,r.block,r.blockLimit)&&(Q=k(E.editor))&&(Q=p.createElement(Q),Q.appendBogus(),S.insertNode(Q),CKEDITOR.env.needsBrFiller&&(W=Q.getBogus())&&W.remove(),S.moveToPosition(Q,CKEDITOR.POSITION_BEFORE_END));if((r=S.startPath().block)&&!r.equals(V)){if(W=r.getBogus())W.remove(), 399ba.push(r);V=r}z.firstNotAllowed&&(L=1);if(L&&z.isElement){r=S.startContainer;for(D=null;r&&!m[r.getName()][z.name];){if(r.equals(x)){r=null;break}D=r;r=r.getParent()}if(r)D&&(P=S.splitElement(D),E.zombies.push(P),E.zombies.push(D));else{D=x.getName();ga=!aa;r=aa==v.length-1;D=f(z.node,D);U=[];Z=D.length;for(var da=0,ia=void 0,ha=0,fa=-1;da<Z;da++)ia=D[da]," "==ia?(ha||ga&&!da||(U.push(new CKEDITOR.dom.text(" ")),fa=U.length),ha=1):(U.push(ia),ha=0);r&&fa==U.length&&U.pop();ga=U}}if(ga){for(;r=ga.pop();)S.insertNode(r); 400ga=0}else S.insertNode(z.node);z.lastNotAllowed&&aa<v.length-1&&((P=y?ca:P)&&S.setEndAt(P,CKEDITOR.POSITION_AFTER_START),L=0);S.collapse()}}1!=v.length?W=!1:(W=v[0],W=W.isElement&&"false"==W.node.getAttribute("contenteditable"));W&&(t=!0,r=v[0].node,S.setStartAt(r,CKEDITOR.POSITION_BEFORE_START),S.setEndAt(r,CKEDITOR.POSITION_AFTER_END));E.dontMoveCaret=t;E.bogusNeededBlocks=ba}W=E.range;var ja;P=E.bogusNeededBlocks;for(ga=W.createBookmark();V=E.zombies.pop();)V.getParent()&&(Q=W.clone(),Q.moveToElementEditStart(V), 401Q.removeEmptyBlocksAtEnd());if(P)for(;V=P.pop();)CKEDITOR.env.needsBrFiller?V.appendBogus():V.append(W.document.createText("\u00a0"));for(;V=E.mergeCandidates.pop();)V.mergeSiblings();W.moveToBookmark(ga);if(!E.dontMoveCaret){for(V=d(W);V&&a(V)&&!V.is(m.$empty);){if(V.isBlockBoundary())W.moveToPosition(V,CKEDITOR.POSITION_BEFORE_END);else{if(g(V)&&V.getHtml().match(/(\s| )$/g)){ja=null;break}ja=W.clone();ja.moveToPosition(V,CKEDITOR.POSITION_BEFORE_END)}V=V.getLast(b)}ja&&W.moveToRange(ja)}}}}(); 402x=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$tableContent)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,c,e){c=a.getDocument().createElement(c);a.append(c,e);return c}function c(a){var b=a.count(),e;for(b;0<b--;)e=a.getItem(b),CKEDITOR.tools.trim(e.getHtml())||(e.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&e.getChildCount()&&e.getFirst().remove())} 403return function(e){var f=e.startContainer,d=f.getAscendant("table",1),g=!1;c(d.getElementsByTag("td"));c(d.getElementsByTag("th"));d=e.clone();d.setStart(f,0);d=a(d).lastBackward();d||(d=e.clone(),d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),d=a(d).lastForward(),g=!0);d||(d=f);d.is("table")?(e.setStartAt(d,CKEDITOR.POSITION_BEFORE_START),e.collapse(!0),d.remove()):(d.is({tbody:1,thead:1,tfoot:1})&&(d=b(d,"tr",g)),d.is("tr")&&(d=b(d,d.getParent().is("thead")?"th":"td",g)),(f=d.getBogus())&&f.remove(), 404e.moveToPosition(d,g?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();p=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,e=!1,f;f=b.clone();f.setStart(c,0);f=a(f).lastBackward();f||(f=b.clone(),f.setEndAt(c, 405CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),e=!0);f||(f=c);f.is(CKEDITOR.dtd.$list)?(b.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),f.remove()):((c=f.getBogus())&&c.remove(),b.moveToPosition(f,e?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();z={eol:{detect:function(a,b){var c=a.range,e=c.clone(),f=c.clone(),d=new CKEDITOR.dom.elementPath(c.startContainer,b),g=new CKEDITOR.dom.elementPath(c.endContainer,b);e.collapse(1);f.collapse();d.block&&e.checkBoundaryOfElement(d.block, 406CKEDITOR.END)&&(c.setStartAfter(d.block),a.prependEolBr=1);g.block&&f.checkBoundaryOfElement(g.block,CKEDITOR.START)&&(c.setEndBefore(g.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),e;a.appendEolBr&&(e=this.createEolBr(c),a.fragment.append(e));!a.prependEolBr||e&&!e.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, 407b=b.endNode;!b||!r(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,e=c.getCommonAncestor(),f=new CKEDITOR.dom.elementPath(e,b),d=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),g;e.type==CKEDITOR.NODE_TEXT&&(e=e.getParent());if(f.blockLimit.is({tr:1,table:1})){var k=f.contains("table").getParent();g=function(a){return!a.equals(k)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(d=d.contains(CKEDITOR.dtd.$list), 408c=c.contains(CKEDITOR.dtd.$list),!d.equals(c))){var h=f.contains(CKEDITOR.dtd.$list).getParent();g=function(a){return!a.equals(h)}}g||(g=function(a){return!a.equals(f.block)&&!a.equals(f.blockLimit)});this.rebuildFragment(a,b,e,g)},rebuildFragment:function(a,b,c,e){for(var f;c&&!c.equals(b)&&e(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,e=a.startOffset,f=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&& 409b.equals(c)&&b.is("tr")&&++e==f&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};v=function(){function a(b,c){var e=b.getParent();if(e.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](e)}function b(c,e,f){a(e);a(f,1);for(var d;d=f.getNext();)d.insertAfter(e),e=d;y(c)&&c.remove()}function c(a,b){var e=new CKEDITOR.dom.range(a);e.setStartAfter(b.startNode);e.setEndBefore(b.endNode);return e}return{list:{detectMerge:function(a,b){var e=c(b,a.bookmark),f=e.startPath(),d=e.endPath(),g=f.contains(CKEDITOR.dtd.$list), 410k=d.contains(CKEDITOR.dtd.$list);a.mergeList=g&&k&&g.getParent().equals(k.getParent())&&!g.equals(k);a.mergeListItems=f.block&&d.block&&f.block.is(CKEDITOR.dtd.$listItem)&&d.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)e=e.clone(),e.setStartBefore(a.bookmark.startNode),e.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=e.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var e=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,d=new CKEDITOR.dom.elementPath(e, 411c),g=new CKEDITOR.dom.elementPath(f,c);if(a.mergeList){var k=d.contains(CKEDITOR.dtd.$list),h=g.contains(CKEDITOR.dtd.$list);k.equals(h)||(h.moveChildren(k),h.remove())}a.mergeListItems&&(d=d.contains(CKEDITOR.dtd.$listItem),g=g.contains(CKEDITOR.dtd.$listItem),d.equals(g)||b(g,e,f));e.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= 412c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var e=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,d=new CKEDITOR.dom.elementPath(e,c),g=new CKEDITOR.dom.elementPath(f,c),d=d.block,g=g.block;d&&g&&!d.equals(g)&&b(g,e,f);e.remove();f.remove()}}},table:function(){function a(c){var f=[],d,g=new CKEDITOR.dom.walker(c),k=c.startPath().contains(e),h=c.endPath().contains(e),n={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+ 413(g?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(n,a,l,1)}if(g&&k&&a.equals(k))d=c.clone(),d.setEndAt(k,CKEDITOR.POSITION_BEFORE_END),f.push(d);else if(!g&&h&&a.equals(h))d=c.clone(),d.setStartAt(h,CKEDITOR.POSITION_AFTER_START),f.push(d);else{if(l=!g)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(e)&&(!k||b(a,k))&&(!h||b(a,h));if(!l&&(l=g))if(a.is(e))var l=k&&k.getAscendant("table",!0),m=h&&h.getAscendant("table",!0),p=a.getAscendant("table",!0),l=l&&l.contains(p)||m&&m.contains(p); 414else l=void 0;l&&(d=c.clone(),d.selectNodeContents(a),f.push(d))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return f}function b(a,c){var e=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,f=a.getPosition(c);return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&e)}var e={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),f=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(e)&& 415++f};c.checkForward();if(1<f){var c=b.startPath().contains("table"),d=b.endPath().contains("table");c&&d&&b.checkBoundaryOfElement(c,CKEDITOR.START)&&b.checkBoundaryOfElement(d,CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(c),b.setEndAfter(d),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(f,d){var g=c(d,f.bookmark),k=g.clone(),h,n,l=g.getCommonAncestor();l.is(CKEDITOR.dtd.$tableContent)&&!l.is(e)&&(l=l.getAscendant("table",!0));n=l;l=new CKEDITOR.dom.elementPath(g.startContainer, 416n);n=new CKEDITOR.dom.elementPath(g.endContainer,n);l=l.contains("table");n=n.contains("table");if(l||n)l&&n&&b(l,n)?(f.tableSurroundingRange=k,k.setStartAt(l,CKEDITOR.POSITION_AFTER_END),k.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),k=g.clone(),k.setEndAt(l,CKEDITOR.POSITION_AFTER_END),h=g.clone(),h.setStartAt(n,CKEDITOR.POSITION_BEFORE_START),h=a(k).concat(a(h))):l?n||(f.tableSurroundingRange=k,k.setStartAt(l,CKEDITOR.POSITION_AFTER_END),g.setEndAt(l,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange= 417k,k.setEndAt(n,CKEDITOR.POSITION_BEFORE_START),g.setStartAt(n,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=h?h:a(g)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(),y(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,c=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);c.moveToBookmark(a.purgeTableBookmark); 418c.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))},fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var c=b.startPath(),e;l(a,c.block,c.blockLimit)&&(e=k(a))&&(e=b.document.createElement(e),e.appendBogus(),b.insertNode(e),b.moveToPosition(e, 419CKEDITOR.POSITION_AFTER_START))}}}()})();(function(){function d(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function h(a,b){if(0===a.length||d(a[0].getEnclosedNode()))return!1;var c,e;if((c=!b&&1===a.length)&&!(c=a[0].collapsed)){var f=a[0];c=f.startContainer.getAscendant({td:1,th:1},!0);var g=f.endContainer.getAscendant({td:1,th:1},!0);e=CKEDITOR.tools.trim;c&&c.equals(g)&&!c.findOne("td, th, tr, tbody, table")?(f=f.cloneContents(),c=f.getFirst()?e(f.getFirst().getText())!== 420e(c.getText()):!0):c=!1}if(c)return!1;for(e=0;e<a.length;e++)if(c=a[e]._getTableElement(),!c)return!1;return!0}function g(a){function b(a){a=a.find("td, th");var c=[],e;for(e=0;e<a.count();e++)c.push(a.getItem(e));return c}var c=[],e,f;for(f=0;f<a.length;f++)e=a[f]._getTableElement(),e.is&&e.is({td:1,th:1})?c.push(e):c=c.concat(b(e));return c}function b(a){a=g(a);var b="",c=[],e,f;for(f=0;f<a.length;f++)e&&!e.equals(a[f].getAscendant("tr"))?(b+=c.join("\t")+"\n",e=a[f].getAscendant("tr"),c=[]):0=== 421f&&(e=a[f].getAscendant("tr")),c.push(a[f].getText());return b+=c.join("\t")}function f(a){var c=this.root.editor,e=c.getSelection(1);this.reset();v=!0;e.root.once("selectionchange",function(a){a.cancel()},null,null,0);e.selectRanges([a[0]]);e=this._.cache;e.ranges=new CKEDITOR.dom.rangeList(a);e.type=CKEDITOR.SELECTION_TEXT;e.selectedElement=a[0]._getTableElement();e.selectedText=b(a);e.nativeSel=null;this.isFake=1;this.rev=x++;c._.fakeSelection=this;v=!1;this.root.fire("selectionchange")}function m(){var a= 422this._.fakeSelection,b;if(a){b=this.getSelection(1);var c;if(!(c=!b)&&(c=!b.isHidden())){c=a;var e=b.getRanges(),f=c.getRanges(),g=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),k=f.length&&f[0]._getTableElement()&&f[0]._getTableElement().getAscendant("table",!0),n=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table"),l=1===f.length&&f[0]._getTableElement()&&f[0]._getTableElement().is("table");if(d(c.getSelectedElement()))c=!1;else{var m=1=== 423e.length&&e[0].collapsed,f=h(e,!!CKEDITOR.env.webkit)&&h(f);g=g&&k?g.equals(k)||k.contains(g):!1;g&&(m||f)?(n&&!l&&c.selectRanges(e),c=!0):c=!1}c=!c}c&&(a.reset(),a=0)}if(!a&&(a=b||this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(c=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||c||(this._.previousActive= 424this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:a,path:b}))}function l(){A=!0;q||(k.call(this),q=CKEDITOR.tools.setTimeout(k,200,this))}function k(){q=null;A&&(CKEDITOR.tools.setTimeout(m,0,this),A=!1)}function c(a){return B(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function e(a){function b(c,e){return c&&c.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(e?"End":"Start")](c):!1}if(!(a.root instanceof CKEDITOR.editable))return!1; 425var e=a.startContainer,f=a.getPreviousNode(c,null,e),d=a.getNextNode(c,null,e);return b(f)||b(d,1)||!(f||d||e.type==CKEDITOR.NODE_ELEMENT&&e.isBlockBoundary()&&e.getBogus())?!0:!1}function a(a){n(a,!1);var b=a.getDocument().createText(p);a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var c=a&&a.removeCustomData("cke-fillingChar");if(c){if(!1!==b){var e=a.getDocument().getSelection().getNative(),f=e&&"None"!=e.type&&e.getRangeAt(0),d=p.length;if(c.getLength()>d&&f&&f.intersectsNode(c.$)){var g= 426[{node:e.anchorNode,offset:e.anchorOffset},{node:e.focusNode,offset:e.focusOffset}];e.anchorNode==c.$&&e.anchorOffset>d&&(g[0].offset-=d);e.focusNode==c.$&&e.focusOffset>d&&(g[1].offset-=d)}}c.setText(w(c.getText(),1));g&&(c=a.getDocument().$,e=c.getSelection(),c=c.createRange(),c.setStart(g[0].node,g[0].offset),c.collapse(!0),e.removeAllRanges(),e.addRange(c),e.extend(g[1].node,g[1].offset))}}function w(a,b){return b?a.replace(z,function(a,b){return b?"\u00a0":""}):a.replace(p,"")}function y(a,b){var c= 427b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",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;width:0;height:0;overflow:hidden;")+'"\x3e'+c+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var e=a.getSelection(1),f=a.createRange(),d=e.root.on("selectionchange",function(a){a.cancel()},null,null,0);f.setStartAt(c,CKEDITOR.POSITION_AFTER_START); 428f.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);e.selectRanges([f]);d.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function r(a){var b={37:1,39:1,8:1,46:1};return function(c){var e=c.data.getKeystroke();if(b[e]){var f=a.getSelection().getRanges(),d=f[0];1==f.length&&d.collapsed&&(e=d[38>e?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable")&&(a.getSelection().fake(e),c.data.preventDefault(),c.cancel())}}} 429function t(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 e=c.startContainer,f;e&&!((f=e.type==CKEDITOR.NODE_ELEMENT)&&e.is("body")||!e.isReadOnly());)f&&"false"==e.getAttribute("contentEditable")&&c.setStartAfter(e),e=e.getParent();e=c.startContainer;f=c.endContainer;var d=c.startOffset,g=c.endOffset,k=c.clone();e&&e.type==CKEDITOR.NODE_TEXT&&(d>=e.getLength()?k.setStartAfter(e):k.setStartBefore(e)); 430f&&f.type==CKEDITOR.NODE_TEXT&&(g?k.setEndAfter(f):k.setEndBefore(f));e=new CKEDITOR.dom.walker(k);e.evaluator=function(e){if(e.type==CKEDITOR.NODE_ELEMENT&&e.isReadOnly()){var f=c.clone();c.setEndBefore(e);c.collapsed&&a.splice(b--,1);e.getPosition(k.endContainer)&CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(e),f.collapsed||a.splice(b+1,0,f));return!0}return!1};e.next()}}return a}var u="function"!=typeof window.getSelection,x=1,p=CKEDITOR.tools.repeat("\u200b",7),z=new RegExp(p+"( )?","g"),v,q,A, 431B=CKEDITOR.dom.walker.invisible(1),C=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,e=c.createRange(),f;if(!c.readOnly)return(f=e.moveToClosestEditablePosition(b.selected,a))||(f=e.moveToClosestEditablePosition(b.selected,!a)),f&&c.getSelection().selectRanges([e]),c.fire("saveSnapshot"),b.selected.remove(),f||(e.moveToElementEditablePosition(c.editable()), 432c.getSelection().selectRanges([e])),c.fire("saveSnapshot"),!1}}var c=a(),e=a(1);return{37:c,38:c,39:e,40:e,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){t=new CKEDITOR.dom.selection(c.getSelection());t.lock()}function b(){g.removeListener("mouseup",b);p.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&& 433c.parentElement().ownerDocument==d.$&&c.select()}function e(a){var b,c;b=(b=this.document.getActive())?"input"===b.getName()||"textarea"===b.getName():!1;b||(b=this.getSelection(1),(c=f(b))&&!c.equals(k)&&(b.selectElement(c),a.data.preventDefault()))}function f(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var d=c.document,g=CKEDITOR.document, 434k=c.editable(),h=d.getBody(),p=d.getDocumentElement(),q=k.isInline(),w,t;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==w&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=c.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){w=c._.previousActive&&c._.previousActive.equals(d.getActive());var a= 435null!=c._.previousScrollTop&&c._.previousScrollTop!=k.$.scrollTop;CKEDITOR.env.webkit&&w&&a&&(k.$.scrollTop=c._.previousScrollTop)}c.unlockSelection(w);w=0},null,null,-1);k.attachListener(k,"mousedown",function(){w=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||q)u?k.attachListener(k,"beforedeactivate",a,null,null,-1):k.attachListener(c,"selectionCheck",a,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a=t&&(t.isFake||2>t.getRanges().length); 436CKEDITOR.env.gecko&&!q&&a||(c.lockSelection(t),w=1)},null,null,-1),k.attachListener(k,"mousedown",function(){w=0});if(CKEDITOR.env.ie&&!q){var x;k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(x=c.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&x&&(c.document.$.documentElement.scrollLeft=x.x,c.document.$.documentElement.scrollTop=x.y);x=null});if("BackCompat"!=d.$.compatMode){if(CKEDITOR.env.ie7Compat|| 437CKEDITOR.env.ie6Compat){var v,z;p.on("mousedown",function(a){function b(a){a=a.data.$;if(v){var c=h.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(e){}v.setEndPoint(0>z.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);v.select()}}function c(){p.removeListener("mousemove",b);g.removeListener("mouseup",c);p.removeListener("mouseup",c);v.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<p.$.clientHeight&&a.$.x<p.$.clientWidth){v=h.$.createTextRange();try{v.moveToPoint(a.$.clientX, 438a.$.clientY)}catch(e){}z=v.duplicate();p.on("mousemove",b);g.on("mouseup",c);p.on("mouseup",c)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)p.on("mousedown",function(a){a.data.getTarget().is("html")&&(g.on("mouseup",b),p.on("mouseup",b))})}}k.attachListener(k,"selectionchange",m,c);k.attachListener(k,"keyup",l,c);k.attachListener(k,"touchstart",l,c);k.attachListener(k,"touchend",l,c);CKEDITOR.env.ie&&k.attachListener(k,"keydown",e,c);k.attachListener(k,CKEDITOR.env.webkit||CKEDITOR.env.gecko? 439"focusin":"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(q&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var A;k.attachListener(k,"mousedown",function(){A=1});k.attachListener(d.getDocumentElement(),"mouseup",function(){A&&l.call(c);A=0})}else k.attachListener(CKEDITOR.env.ie?k:d.getDocumentElement(),"mouseup",l,c);CKEDITOR.env.webkit&&k.attachListener(d,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:k.hasFocus&& 440n(k)}},null,null,-1);k.attachListener(k,"keydown",r(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});
vendor: 4,433 bytes, lines 440-449
440c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&& 441(b.remove(),CKEDITOR.env.gecko&&(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var e=C[a.data.keyCode];if(e)return e({editor:c,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"); 442c&&(c.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=w(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection|| 443a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.getSelectedRanges=function(a){var b=this.getSelection();return b&&b.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b? 444(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT= 4453;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:x++;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),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var e,f;if(a)if(a.getRangeAt)e=(f=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer); 446else{try{f=a.createRange()}catch(d){}e=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!e||e.type!=CKEDITOR.NODE_ELEMENT&&e.type!=CKEDITOR.NODE_TEXT||!this.root.equals(e)&&!this.root.contains(e))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var G={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, 447select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:w,_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:p});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=u?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:u?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE; 448try{var c=this.getNative(),e=c.type;"Text"==e&&(b=CKEDITOR.SELECTION_TEXT);"Control"==e&&(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;else if(1==c.rangeCount){var c=c.getRangeAt(0),e=c.startContainer;e==c.endContainer&&1==e.nodeType&&1==c.endOffset-c.startOffset&&G[e.childNodes[c.startOffset].nodeName.toLowerCase()]&& 449(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=u?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}
vendor: 5,696 bytes, lines 449-460
449var b=function(b,c){b=b.duplicate();b.collapse(c);var e=b.parentElement();if(!e.hasChildNodes())return{container:e,offset:0};for(var f=e.children,d,g,k=b.duplicate(),h=0,n=f.length-1,l=-1,m,p;h<=n;)if(l=Math.floor((h+n)/2),d=f[l],k.moveToElementText(d),m=k.compareEndPoints("StartToStart",b),0<m)n=l-1;else if(0>m)h=l+1;else return{container:e,offset:a(d)}; 450if(-1==l||l==f.length-1&&0>m){k.moveToElementText(e);k.setEndPoint("StartToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length;f=e.childNodes;if(!k)return d=f[f.length-1],d.nodeType!=CKEDITOR.NODE_TEXT?{container:e,offset:f.length}:{container:d,offset:d.nodeValue.length};for(e=f.length;0<k&&0<e;)g=f[--e],g.nodeType==CKEDITOR.NODE_TEXT&&(p=g,k-=g.nodeValue.length);return{container:p,offset:-k}}k.collapse(0<m?!0:!1);k.setEndPoint(0<m?"StartToStart":"EndToStart",b);k=k.text.replace(/(\r\n|\r)/g,"\n").length; 451if(!k)return{container:e,offset:a(d)+(0<m?0:1)};for(;0<k;)try{g=d[0<m?"previousSibling":"nextSibling"],g.nodeType==CKEDITOR.NODE_TEXT&&(k-=g.nodeValue.length,p=g),d=g}catch(q){return{container:e,offset:a(d)}}return{container:p,offset:0<m?-k:p.nodeValue.length+k}};return function(){var a=this.getNative(),c=a&&a.createRange(),e=this.getType();if(!a)return[];if(e==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root),e=b(c,!0),a.setStart(new CKEDITOR.dom.node(e.container),e.offset),e=b(c), 452a.setEnd(new CKEDITOR.dom.node(e.container),e.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(e==CKEDITOR.SELECTION_ELEMENT){for(var e=[],f=0;f<c.length;f++){for(var d=c.item(f),g=d.parentNode,k=0,a=new CKEDITOR.dom.range(this.root);k<g.childNodes.length&&g.childNodes[k]!=d;k++);a.setStart(new CKEDITOR.dom.node(g),k);a.setEnd(new CKEDITOR.dom.node(g),k+1);e.push(a)}return e}return[]}}():function(){var a= 453[],b,c=this.getNative();if(!c)return a;for(var e=0;e<c.rangeCount;e++){var f=c.getRangeAt(e);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,e=c.ranges;e||(c.ranges=e=new CKEDITOR.dom.rangeList(a.call(this)));return b?t(new CKEDITOR.dom.rangeList(e.slice())):e}}(),getStartElement:function(){var a=this._.cache;if(void 0!==a.startElement)return a.startElement; 454var 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?b.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== 455CKEDITOR.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)},function(){for(var a=b.getRanges()[0].clone(),c,e,f=2;f&&!((c=a.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&G[c.getName()]&& 456(e=c));f--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return e&&e.$});return a.selectedElement=c?new CKEDITOR.dom.element(c):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;var b=this.getNative(),b=u?"Control"==b.type?"":b.createRange().text:b.toString();return a.selectedText=b},lock:function(){this.getRanges();this.getStartElement();this.getSelectedElement();this.getSelectedText();this._.cache.nativeSel=null;this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b= 457this.getSelectedElement(),c=this.getRanges(),e=this.isFake;this.isLocked=0;this.reset();a&&(a=b||c[0]&&c[0].getCommonAncestor())&&a.getAscendant("body",1)&&((a=this.root.editor)&&a.plugins.tableselection&&a.plugins.tableselection.isSupportedEnvironment(a)&&h(c)?f.call(this,c):e?this.fake(b):b&&2>c.length?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; 458var 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=x++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(b){var c=this.root.editor,d=c&&c._.hiddenSelectionContainer;this.reset();if(d)for(var d=this.root,g,k=0;k<b.length;++k)g= 459b[k],g.endContainer.equals(d)&&(g.endOffset=Math.min(g.endOffset,d.getChildCount()));if(b.length)if(this.isLocked){var l=CKEDITOR.document.getActive();this.unlock();this.selectRanges(b);this.lock();l&&!l.equals(this.root)&&l.focus()}else{var m;a:{var p,q;if(1==b.length&&!(q=b[0]).collapsed&&(m=q.getEnclosedNode())&&m.type==CKEDITOR.NODE_ELEMENT&&(q=q.clone(),q.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(p=q.getEnclosedNode())&&p.type==CKEDITOR.NODE_ELEMENT&&(m=p),"false"==m.getAttribute("contenteditable")))break a; 460m=void 0}if(m)this.fake(m);else if(c&&c.plugins.tableselection&&c.plugins.tableselection.isSupportedEnvironment(c)&&h(b)&&!v&&!b[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))f.call(this,b);
vendor: 12,605 bytes, lines 460-484
460else{if(u){p=CKEDITOR.dom.walker.whitespaces(!0);m=/\ufeff|\u00a0/;q={table:1,tbody:1,tr:1};1<b.length&&(c=b[b.length-1],b[0].setEnd(c.endContainer,c.endOffset));c=b[0];b=c.collapsed;var w,t,x;if((d=c.getEnclosedNode())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in G&&(!d.is("a")|| 461!d.getText()))try{x=d.$.createControlRange();x.addElement(d.$);x.select();return}catch(z){}if(c.startContainer.type==CKEDITOR.NODE_ELEMENT&&c.startContainer.getName()in q||c.endContainer.type==CKEDITOR.NODE_ELEMENT&&c.endContainer.getName()in q)c.shrink(CKEDITOR.NODE_ELEMENT,!0),b=c.collapsed;x=c.createBookmark();q=x.startNode;b||(l=x.endNode);x=c.document.$.body.createTextRange();x.moveToElementText(q.$);x.moveStart("character",1);l?(m=c.document.$.body.createTextRange(),m.moveToElementText(l.$), 462x.setEndPoint("EndToEnd",m),x.moveEnd("character",-1)):(w=q.getNext(p),t=q.hasAscendant("pre"),w=!(w&&w.getText&&w.getText().match(m))&&(t||!q.hasPrevious()||q.getPrevious().is&&q.getPrevious().is("br")),t=c.document.createElement("span"),t.setHtml("\x26#65279;"),t.insertBefore(q),w&&c.document.createText("\ufeff").insertBefore(q));c.setStartBefore(q);q.remove();b?(w?(x.moveStart("character",-1),x.select(),c.document.$.selection.clear()):x.select(),c.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START), 463t.remove()):(c.setEndBefore(l),l.remove(),x.select())}else{l=this.getNative();if(!l)return;this.removeAllRanges();for(x=0;x<b.length;x++){if(x<b.length-1&&(w=b[x],t=b[x+1],m=w.clone(),m.setStart(w.endContainer,w.endOffset),m.setEnd(t.startContainer,t.startOffset),!m.collapsed&&(m.shrink(CKEDITOR.NODE_ELEMENT,!0),c=m.getCommonAncestor(),m=m.getEnclosedNode(),c.isReadOnly()||m&&m.isReadOnly()))){t.setStart(w.startContainer,w.startOffset);b.splice(x--,1);continue}c=b[x];t=this.document.$.createRange(); 464c.collapsed&&e(c)&&(m=a(this.root),c.insertNode(m),(w=m.getNext())&&!m.getPrevious()&&w.type==CKEDITOR.NODE_ELEMENT&&"br"==w.getName()?(n(this.root),c.moveToPosition(w,CKEDITOR.POSITION_BEFORE_START)):c.moveToPosition(m,CKEDITOR.POSITION_AFTER_END));t.setStart(c.startContainer.$,c.startOffset);try{t.setEnd(c.endContainer.$,c.endOffset)}catch(A){if(0<=A.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))c.collapse(1),t.setEnd(c.endContainer.$,c.endOffset);else throw A;}l.addRange(t)}}this.reset();this.root.fire("selectionchange")}}}, 465fake:function(a,b){var c=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();y(c,b);var e=this._.cache,f=new CKEDITOR.dom.range(this.root);f.setStartBefore(a);f.setEndAfter(a);e.ranges=new CKEDITOR.dom.rangeList(f);e.selectedElement=e.startElement=a;e.type=CKEDITOR.SELECTION_ELEMENT;e.selectedText=e.nativeSel=null;this.isFake=1;this.rev=x++;c._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a=this.getCommonAncestor(); 466a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return h(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],c,e=0;e<a.length;e++){var f=new CKEDITOR.dom.range(this.root); 467f.moveToBookmark(a[e]);b.push(f)}a.isFake&&(c=h(b)?b[0]._getTableElement():b[0].getEnclosedNode(),c&&c.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!h(b)?this.fake(c):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&&this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!= 468CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[u?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();"use strict";CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3;(function(){function d(a,b){for(var c,e;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))c=a;else if(!e){var f=a.getAttribute("contentEditable");"false"==f?c=a:"true"==f&&(e=1)}return c}function h(a,b,c,e){return(a.getPosition(b)|e)==e&&(!c.childRule||c.childRule(a))}function g(a){var b= 469a.document;if(a.collapsed)b=x(this,b),a.insertNode(b),a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_END);else{var c=this.element,e=this._.definition,k,l=e.ignoreReadonly,n=l||e.includeReadonly;null==n&&(n=a.root.getCustomData("cke_includeReadonly"));var m=CKEDITOR.dtd[c];m||(k=!0,m=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var p=a.createBookmark(),q=p.startNode,w=p.endNode,t=q,u;if(!l){var v=a.getCommonAncestor(),l=d(q,v),v=d(w,v);l&&(t=l.getNextSourceNode(!0));v&&(w=v)}for(t.getPosition(w)== 470CKEDITOR.POSITION_FOLLOWING&&(t=0);t;){l=!1;if(t.equals(w))t=null,l=!0;else{var z=t.type==CKEDITOR.NODE_ELEMENT?t.getName():null,v=z&&"false"==t.getAttribute("contentEditable"),A=z&&t.getAttribute("data-nostyle");if(z&&t.data("cke-bookmark")||t.type===CKEDITOR.NODE_COMMENT){t=t.getNextSourceNode(!0);continue}if(v&&n&&CKEDITOR.dtd.$block[z])for(var y=t,B=f(y),C=void 0,Q=B.length,P=0,y=Q&&new CKEDITOR.dom.range(y.getDocument());P<Q;++P){var C=B[P],ga=CKEDITOR.filter.instances[C.data("cke-filter")]; 471if(ga?ga.check(this):1)y.selectNodeContents(C),g.call(this,y)}B=z?!m[z]||A?0:v&&!n?0:h(t,w,e,M):1;if(B)if(C=t.getParent(),B=e,Q=c,P=k,!C||!(C.getDtd()||CKEDITOR.dtd.span)[Q]&&!P||B.parentRule&&!B.parentRule(C))l=!0;else{if(u||z&&CKEDITOR.dtd.$removeEmpty[z]&&(t.getPosition(w)|M)!=M||(u=a.clone(),u.setStartBefore(t)),z=t.type,z==CKEDITOR.NODE_TEXT||v||z==CKEDITOR.NODE_ELEMENT&&!t.getChildCount()){for(var z=t,ia;(l=!z.getNext(I))&&(ia=z.getParent(),m[ia.getName()])&&h(ia,q,e,H);)z=ia;u.setEndAfter(z)}}else l= 472!0;t=t.getNextSourceNode(A||v)}if(l&&u&&!u.collapsed){for(var l=x(this,b),v=l.hasAttributes(),A=u.getCommonAncestor(),z={},B={},C={},Q={},ha,fa,G;l&&A;){if(A.getName()==c){for(ha in e.attributes)!Q[ha]&&(G=A.getAttribute(fa))&&(l.getAttribute(ha)==G?B[ha]=1:Q[ha]=1);for(fa in e.styles)!C[fa]&&(G=A.getStyle(fa))&&(l.getStyle(fa)==G?z[fa]=1:C[fa]=1)}A=A.getParent()}for(ha in B)l.removeAttribute(ha);for(fa in z)l.removeStyle(fa);v&&!l.hasAttributes()&&(l=null);l?(u.extractContents().appendTo(l),u.insertNode(l), 473r.call(this,l),l.mergeSiblings(),CKEDITOR.env.ie||l.$.normalize()):(l=new CKEDITOR.dom.element("span"),u.extractContents().appendTo(l),u.insertNode(l),r.call(this,l),l.remove(!0));u=null}}a.moveToBookmark(p);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(e.getParent()),c=new CKEDITOR.dom.elementPath(n.getParent()),f=null,d=null,g=0;g<a.elements.length;g++){var k=a.elements[g];if(k==a.block||k==a.blockLimit)break; 474m.checkElementRemovable(k,!0)&&(f=k)}for(g=0;g<c.elements.length;g++){k=c.elements[g];if(k==c.block||k==c.blockLimit)break;m.checkElementRemovable(k,!0)&&(d=k)}d&&n.breakParent(d);f&&e.breakParent(f)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var c=a.createBookmark(),e=c.startNode,f=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var d=new CKEDITOR.dom.elementPath(e.getParent(),a.root),g,k=0,h;k<d.elements.length&&(h=d.elements[k])&&h!=d.block&&h!=d.blockLimit;k++)if(this.checkElementRemovable(h)){var l; 475!f&&a.collapsed&&(a.checkBoundaryOfElement(h,CKEDITOR.END)||(l=a.checkBoundaryOfElement(h,CKEDITOR.START)))?(g=h,g.match=l?"start":"end"):(h.mergeSiblings(),h.is(this.element)?y.call(this,h):t(h,v(this)[h.getName()]))}if(g){f=e;for(k=0;;k++){h=d.elements[k];if(h.equals(g))break;else if(h.match)continue;else h=h.clone();h.append(f);f=h}f["start"==g.match?"insertBefore":"insertAfter"](g)}}else{var n=c.endNode,m=this;b();for(d=e;!d.equals(n);)g=d.getNextSourceNode(),d.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(d)&& 476(d.getName()==this.element?y.call(this,d):t(d,v(this)[d.getName()]),g.type==CKEDITOR.NODE_ELEMENT&&g.contains(e)&&(b(),g=e.getNext())),d=g}a.moveToBookmark(c);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function f(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()&&p(a,this)} 477function 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 e in c)a.removeAttribute(e,c[e]);if(b.styles)for(var f in b.styles)b.styles.hasOwnProperty(f)&&a.removeStyle(f)}}function k(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var f,d=a.document,g;f=c.getNextParagraph();)!f.isReadOnly()&& 478(c.activeFilter?c.activeFilter.check(this):1)&&(g=x(this,d,f),e(f,g));a.moveToBookmark(b)}function c(a){var b=a.createBookmark(1),c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var f,d;f=c.getNextParagraph();)this.checkElementRemovable(f)&&(f.is("pre")?((d=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&f.copyAttributes(d),e(f,d)):y.call(this,f));a.moveToBookmark(b)}function e(b,c){var e= 479!c;e&&(c=b.getDocument().createElement("div"),b.copyAttributes(c));var f=c&&c.is("pre"),d=b.is("pre"),g=!f&&d;if(f&&!d){d=c;(g=b.getBogus())&&g.remove();g=b.getHtml();g=n(g,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");g=g.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g," ");g=g.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var k=b.getDocument().createElement("div");k.append(d);d.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";d.copyAttributes(k.getFirst());d=k.getFirst().remove()}else d.setHtml(g); 480c=d}else g?c=w(e?[b.getHtml()]:a(b),c):b.moveChildren(c);c.replace(b);if(f){var e=c,h;(h=e.getPrevious(D))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("pre")&&(f=n(h.getHtml(),/\n$/,"")+"\n\n"+n(e.getHtml(),/^\n/,""),CKEDITOR.env.ie?e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e":e.setHtml(f),h.remove())}else e&&u(c)}function a(a){var b=[];n(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, 481function(a,c){b.push(c)});return b}function n(a,b,c){var e="",f="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(e=b);c&&(f=c);return""});return e+a.replace(b,c)+f}function w(a,b){var c;1<a.length&&(c=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var e=0;e<a.length;e++){var f=a[e],f=f.replace(/(\r\n|\r)/g,"\n"),f=n(f,/^[ \t]*\n/,""),f=n(f,/\n$/,""),f=n(f,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;": 482b?" "+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 d=b.clone();d.setHtml(f);c.append(d)}else b.setHtml(f)}return c||b}function y(a,b){var c=this._.definition,e=c.attributes,c=c.styles,f=v(this)[a.getName()],d=CKEDITOR.tools.isEmpty(e)&&CKEDITOR.tools.isEmpty(c),g;for(g in e)if("class"!=g&&!this._.definition.fullMatch|| 483a.getAttribute(g)==q(g,e[g]))b&&"data-"==g.slice(0,5)||(d=a.hasAttribute(g),a.removeAttribute(g));for(var k in c)this._.definition.fullMatch&&a.getStyle(k)!=q(k,c[k],!0)||(d=d||!!a.getStyle(k),a.removeStyle(k));t(a,f,C[a.getName()]);d&&(this._.definition.alwaysRemoveElement?u(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?u(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))}function r(a){for(var b=v(this),c=a.getElementsByTag(this.element), 484e,f=c.count();0<=--f;)e=c.getItem(f),e.isReadOnly()||y.call(this,e,!0);for(var d in b)if(d!=this.element)for(c=a.getElementsByTag(d),f=c.count()-1;0<=f;f--)e=c.getItem(f),e.isReadOnly()||t(e,b[d])}function t(a,b,c){if(b=b&&b.attributes)for(var e=0;e<b.length;e++){var f=b[e][0],d;if(d=a.getAttribute(f)){var g=b[e][1];(null===g||g.test&&g.test(d)||"string"==typeof g&&d==g)&&a.removeAttribute(f)}}c||u(a)}function u(a,b){if(!a.hasAttributes()||b)if(CKEDITOR.dtd.$block[a.getName()]){var c=a.getPrevious(D),
vendor: 4,219 bytes, lines 485-493
485e=a.getNext(D);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br",1);!e||e.type!=CKEDITOR.NODE_TEXT&&e.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else c=a.getFirst(),e=a.getLast(),a.remove(!0),c&&(c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings(),e&&!c.equals(e)&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings())}function x(a,b,c){var e;e=a.element;"*"==e&&(e="span");e=new CKEDITOR.dom.element(e,b);c&&c.copyAttributes(e);e=p(e,a);b.getCustomData("doc_processing_style")&& 486e.hasAttribute("id")?e.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return e}function p(a,b){var c=b._.definition,e=c.attributes,c=CKEDITOR.style.getStyleText(c);if(e)for(var f in e)a.setAttribute(f,e[f]);c&&a.setAttribute("style",c);a.getDocument().removeCustomData("doc_processing_style");return a}function z(a,b){for(var c in a)a[c]=a[c].replace(J,function(a,c){return b[c]})}function v(a){if(a._.overrides)return a._.overrides;var b=a._.overrides={},c=a._.definition.overrides;if(c){CKEDITOR.tools.isArray(c)|| 487(c=[c]);for(var e=0;e<c.length;e++){var f=c[e],d,g;"string"==typeof f?d=f.toLowerCase():(d=f.element?f.element.toLowerCase():a.element,g=f.attributes);f=b[d]||(b[d]={});if(g){var f=f.attributes=f.attributes||[],k;for(k in g)f.push([k.toLowerCase(),g[k]])}}}return b}function q(a,b,c){var e=new CKEDITOR.dom.element("span");e[c?"setStyle":"setAttribute"](a,b);return e[c?"getStyle":"getAttribute"](a)}function A(a,b){function c(a,b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"== 488typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var e in a)if(!(e in b)||c(b[e],e)!=c(a[e],e)&&"inherit"!=a[e]&&"inherit"!=b[e])return!1;return!0}function B(a,b,c){var e=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var f,d=e.createIterator();f=d.getNextRange();)b.call(this,f,c);a.selectRanges(e)}var C={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1, 489hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},G={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},F=/\s*(?:;\s*|$)/,J=/#\((.+?)\)/g,I=CKEDITOR.dom.walker.bookmark(0,1),D=CKEDITOR.dom.walker.whitespaces(1);CKEDITOR.style=function(a,b){if("string"==typeof a.type)return new CKEDITOR.style.customHandlers[a.type](a);var c=a.attributes;c&&c.style&&(a.styles=CKEDITOR.tools.extend({}, 490a.styles,CKEDITOR.tools.parseCssText(c.style)),delete c.style);b&&(a=CKEDITOR.tools.clone(a),z(a.attributes,b),z(a.styles,b));c=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(C[c]?CKEDITOR.STYLE_BLOCK:G[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 B.call(this,a.getSelection()); 491if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);B.call(this,a.getSelection(),0,a);this._.enterMode=b}},remove:function(a){if(a instanceof CKEDITOR.dom.document)return B.call(this,a.getSelection(),1);if(this.checkApplicable(a.elementPath(),a)){var b=this._.enterMode;b||(this._.enterMode=a.activeEnterMode);B.call(this,a.getSelection(),1,a);this._.enterMode=b}},applyToRange:function(a){this.applyToRange=this.type==CKEDITOR.STYLE_INLINE?g:this.type== 492CKEDITOR.STYLE_BLOCK?k:this.type==CKEDITOR.STYLE_OBJECT?m:null;return this.applyToRange(a)},removeFromRange:function(a){this.removeFromRange=this.type==CKEDITOR.STYLE_INLINE?b:this.type==CKEDITOR.STYLE_BLOCK?c:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.removeFromRange(a)},applyToObject:function(a){p(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= 493a.elements,e=0,f;e<c.length;e++)if(f=c[e],this.type!=CKEDITOR.STYLE_INLINE||f!=a.block&&f!=a.blockLimit){if(this.t
493ype==CKEDITOR.STYLE_OBJECT){var d=f.getName();if(!("string"==typeof this.element?d==this.element:d 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}, 494checkElementMatch:function(a,b){var c=this._.definition;if(!a||!c.ignoreReadonly&&a.isReadOnly())return!1;var e=a.getName();if("string"==typeof this.element?e==this.element:e in this.element){if(!b&&!a.hasAttributes())return!0;if(e=c._AC)c=e;else{var e={},f=0,d=c.attributes;if(d)for(var g in d)f++,e[g]=d[g];if(g=CKEDITOR.style.getStyleText(c))e.style||f++,e.style=g;e._length=f;c=c._AC=e}if(c._length){for(var k in c)if("_length"!=k)if(e=a.getAttribute(k)||"","style"==k?A(c[k],e):c[k]==e){if(!b)return!0}else if(b)return!1; 495if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,c){if(this.checkElementMatch(a,b,c))return!0;if(b=v(this)[a.getName()]){var e;if(!(b=b.attributes))return!0;for(c=0;c<b.length;c++)if(e=b[c][0],e=a.getAttribute(e)){var f=b[c][1];if(null===f)return!0;if("string"==typeof f){if(e==f)return!0}else if(f.test(e))return!0}}return!1},buildPreview:function(a){var b=this._.definition,c=[],e=b.element;"bdo"==e&&(e="span");var c=["\x3c",e],f=b.attributes;if(f)for(var d in f)c.push(" ", 496d,'\x3d"',f[d],'"');(f=CKEDITOR.style.getStyleText(b))&&c.push(' style\x3d"',f,'"');c.push("\x3e",a||b.name,"\x3c/",e,"\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||"",e="";c.length&&(c=c.replace(F,";"));for(var f in b){var d=b[f],g=(f+":"+d).replace(F,";");"inherit"==d?e+=g:c+=g}c.length&&(c=CKEDITOR.tools.normalizeCssText(c,!0));return a._ST=c+e};CKEDITOR.style.customHandlers= 497{};CKEDITOR.style.addCustomHandler=function(a){var b=function(a){this._={definition:a};this.setup&&this.setup(a)};b.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype),{assignedTo:CKEDITOR.STYLE_OBJECT},a,!0);return this.customHandlers[a.type]=b};var M=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,H=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(d, 498h){this.requiredContent=this.allowedContent=this.style=d;CKEDITOR.tools.extend(this,h,!0)};CKEDITOR.styleCommand.prototype.exec=function(d){d.focus();this.state==CKEDITOR.TRISTATE_OFF?d.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&d.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(d,h,g){CKEDITOR.stylesSet.addExternal(d,h,"");CKEDITOR.stylesSet.load(d, 499g)};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(d,h){var g=this._.styleStateChangeCallbacks;g||(g=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(b){for(var f=0;f<g.length;f++){var d=g[f],h=d.style.checkActive(b.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;d.fn.call(this,h)}}));g.push({style:d,fn:h})},applyStyle:function(d){d.apply(this)},removeStyle:function(d){d.remove(this)},getStylesSet:function(d){if(this._.stylesDefinitions)d(this._.stylesDefinitions); 500else{var h=this,g=h.config.stylesCombo_stylesSet||h.config.stylesSet;if(!1===g)d(null);else if(g instanceof Array)h._.stylesDefinitions=g,d(g);else{g||(g="default");var g=g.split(":"),b=g[0];CKEDITOR.stylesSet.addExternal(b,g[1]?g.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(b,function(f){h._.stylesDefinitions=f[b];d(h._.stylesDefinitions)})}}}});(function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var d=CKEDITOR.getUrl("vendor/promise.js");if("function"=== 501typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([d],function(d){CKEDITOR.tools.promise=d});CKEDITOR.scriptLoader.load(d,function(h){if(!h)return CKEDITOR.error("no-vendor-lib",{path:d});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}})();(function(){function d(b,f,d){b.once("selectionCheck",function(b){if(!h){var k=b.data.getRanges()[0];d.equals(k)?b.cancel():f.equals(k)&&(g=!0)}},null,null,-1)}var h=!0,g=!1;CKEDITOR.dom.selection.setupEditorOptimization= 502function(b){b.on("selectionCheck",function(b){b.data&&!g&&b.data.optimizeInElementEnds();g=!1});b.on("contentDom",function(){var f=b.editable();f&&(f.attachListener(f,"keydown",function(b){this._.shiftPressed=b.data.$.shiftKey},this),f.attachListener(f,"keyup",function(b){this._.shiftPressed=b.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var b=this.getRanges()[0],f=this.root.editor,g;if(this.root.editor._.shiftPressed||this.isFake||b.isCollapsed||b.startContainer.equals(b.endContainer))g= 503!1;else if(0===b.endOffset)g=!0;else{g=b.startContainer.type===CKEDITOR.NODE_TEXT;var l=b.endContainer.type===CKEDITOR.NODE_TEXT,k=g?b.startContainer.getLength():b.startContainer.getChildCount();g=b.startOffset===k||g^l}g&&(g=b.clone(),b.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!CKEDITOR.env.webkit}),h=!1,d(f,b,g),b.select(),h=!0)}})();CKEDITOR.dom.comment=function(d,h){"string"==typeof d&&(d=(h?h.$:document).createComment(d));CKEDITOR.dom.domObject.call(this,d)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node; 504CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}});"use strict";(function(){var d={},h={},g;for(g in CKEDITOR.dtd.$blockLimit)g in CKEDITOR.dtd.$list||(d[g]=1);for(g in CKEDITOR.dtd.$block)g in CKEDITOR.dtd.$blockLimit||g in CKEDITOR.dtd.$empty||(h[g]=1);CKEDITOR.dom.elementPath=function(b,f){var g=null,l=null,k=[],c=b,e;f=f||b.getDocument().getBody();c||(c=f);do if(c.type==CKEDITOR.NODE_ELEMENT){k.push(c); 505if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)||"false"==c.getAttribute("contenteditable")))continue;if(c.equals(f))break;if(!l&&(e=c.getName(),"true"==c.getAttribute("contenteditable")?l=c:!g&&h[e]&&(g=c),d[e])){if(e=!g&&"div"==e){a:{e=c.getChildren();for(var a=0,n=e.count();a<n;a++){var w=e.getItem(a);if(w.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[w.getName()]){e=!0;break a}}e=!1}e=!e}e?g=c:l=c}}while(c=c.getParent());l||(l=f);this.block=g;this.blockLimit=l;this.root= 506f;this.elements=k}})();CKEDITOR.dom.elementPath.prototype={compare:function(d){var h=this.elements;d=d&&d.elements;if(!d||h.length!=d.length)return!1;for(var g=0;g<h.length;g++)if(!h[g].equals(d[g]))return!1;return!0},contains:function(d,h,g){var b=0,f;"string"==typeof d&&(f=function(b){return b.getName()==d});d instanceof CKEDITOR.dom.element?f=function(b){return b.equals(d)}:CKEDITOR.tools.isArray(d)?f=function(b){return-1<CKEDITOR.tools.indexOf(d,b.getName())}:"function"==typeof d?f=d:"object"== 507typeof d&&(f=function(b){return b.getName()in d});var m=this.elements,l=m.length;h&&(g?b+=1:--l);g&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;b<l;b++)if(f(m[b]))return m[b];return null},isContextFor:function(d){var h;return d in CKEDITOR.dtd.$block?(h=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!h.getDtd()[d]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};CKEDITOR.dom.text=function(d,h){"string"==
vendor: 5,326 bytes, lines 508-518
508typeof d&&(d=(h?h.$:document).createTextNode(d));this.$=d};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(d){this.$.nodeValue=d},isEmpty:function(d){var h=this.getText();d&&(h=CKEDITOR.tools.trim(h));return!h||h===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(d){var h=this.$.parentNode,g=h.childNodes.length, 509b=this.getLength(),f=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(d),f);h.childNodes.length==g&&(d>=b?(m=f.createText(""),m.insertAfter(this)):(d=f.createText(""),d.insertAfter(m),d.remove()));return m},substring:function(d,h){return"number"!=typeof h?this.$.nodeValue.substr(d):this.$.nodeValue.substring(d,h)}});(function(){function d(d,b,f){var h=d.serializable,l=b[f?"endContainer":"startContainer"],k=f?"endOffset":"startOffset",c=h?b.document.getById(d.startNode):d.startNode;d=h? 510b.document.getById(d.endNode):d.endNode;l.equals(c.getPrevious())?(b.startOffset=b.startOffset-l.getLength()-d.getPrevious().getLength(),l=d.getNext()):l.equals(d.getPrevious())&&(b.startOffset-=l.getLength(),l=d.getNext());l.equals(c.getParent())&&b[k]++;l.equals(d.getParent())&&b[k]++;b[f?"endContainer":"startContainer"]=l;return b}CKEDITOR.dom.rangeList=function(d){if(d instanceof CKEDITOR.dom.rangeList)return d;d?d instanceof CKEDITOR.dom.range&&(d=[d]):d=[];return CKEDITOR.tools.extend(d,h)}; 511var h={createIterator:function(){var d=this,b=CKEDITOR.dom.walker.bookmark(),f=[],h;return{getNextRange:function(l){h=void 0===h?0:h+1;var k=d[h];if(k&&1<d.length){if(!h)for(var c=d.length-1;0<=c;c--)f.unshift(d[c].createBookmark(!0));if(l)for(var e=0;d[h+e+1];){var a=k.document;l=0;c=a.getById(f[e].endNode);for(a=a.getById(f[e+1].startNode);;){c=c.getNextSourceNode(!1);if(a.equals(c))l=1;else if(b(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary())continue;break}if(!l)break;e++}for(k.moveToBookmark(f.shift());e--;)c= 512d[++h],c.moveToBookmark(f.shift()),k.setEnd(c.endContainer,c.endOffset)}return k}}},createBookmarks:function(g){for(var b=[],f,h=0;h<this.length;h++){b.push(f=this[h].createBookmark(g,!0));for(var l=h+1;l<this.length;l++)this[l]=d(f,this[l]),this[l]=d(f,this[l],!0)}return b},createBookmarks2:function(d){for(var b=[],f=0;f<this.length;f++)b.push(this[f].createBookmark2(d));return b},moveToBookmarks:function(d){for(var b=0;b<this.length;b++)this[b].moveToBookmark(d[b])}}})();(function(){function d(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]|| 513"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function h(b){var a=CKEDITOR.skin["ua_"+b],c=CKEDITOR.env;if(a)for(var a=a.split(",").sort(function(a,b){return a>b?-1:1}),f=0,g;f<a.length;f++)if(g=a[f],c.ie&&(g.replace(/^ie/,"")==c.version||c.quirks&&"iequirks"==g)&&(g="ie"),c[g]){b+="_"+a[f];break}return CKEDITOR.getUrl(d()+b+".css")}function g(b,a){m[b]||(CKEDITOR.document.appendStyleSheet(h(b)),m[b]=1);a&&a()}function b(b){var a=b.getById(l);a||(a=b.getHead().append("style"),a.setAttribute("id", 514l),a.setAttribute("type","text/css"));return a}function f(b,a,c){var f,d,g;if(CKEDITOR.env.webkit)for(a=a.split("}").slice(0,-1),d=0;d<a.length;d++)a[d]=a[d].split("{");for(var k=0;k<b.length;k++)if(CKEDITOR.env.webkit)for(d=0;d<a.length;d++){g=a[d][1];for(f=0;f<c.length;f++)g=g.replace(c[f][0],c[f][1]);b[k].$.sheet.addRule(a[d][0],g)}else{g=a;for(f=0;f<c.length;f++)g=g.replace(c[f][0],c[f][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?b[k].$.styleSheet.cssText+=g:b[k].$.innerHTML+=g}}var m={};CKEDITOR.skin= 515{path:d,loadPart:function(b,a){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(d()+"skin.js"),function(){g(b,a)}):g(b,a)},getPath:function(b){return CKEDITOR.getUrl(h(b))},icons:{},addIcon:function(b,a,c,f){b=b.toLowerCase();this.icons[b]||(this.icons[b]={path:a,offset:c||0,bgsize:f||"16px"})},getIconStyle:function(b,a,c,f,d){var g;b&&(b=b.toLowerCase(),a&&(g=this.icons[b+"-rtl"]),g||(g=this.icons[b]));b=c||g&&g.path||"";f=f||g&&g.offset;d=d||g&&g.bgsize|| 516"16px";b&&(b=b.replace(/'/g,"\\'"));return b&&"background-image:url('"+CKEDITOR.getUrl(b)+"');background-position:0 "+f+"px;background-size:"+d+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(e){var a=b(CKEDITOR.document);return(this.setUiColor=function(b){this.uiColor=b;var e=CKEDITOR.skin.chameleon,d="",g="";"function"==typeof e&&(d=e(this,"editor"),g=e(this,"panel"));b=[[c,b]];f([a],d,b);f(k,g,b)}).call(this,e)}});var l="cke_ui_color", 517k=[],c=/\$color/g;CKEDITOR.on("instanceLoaded",function(e){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var a=e.editor;e=function(e){e=(e.data[0]||e.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!e.getById("cke_ui_color")){var d=b(e);k.push(d);a.on("destroy",function(){k=CKEDITOR.tools.array.filter(k,function(a){return d!==a})});(e=a.getUiColor())&&f([d],CKEDITOR.skin.chameleon(a,"panel"),[[c,e]])}};a.on("panelShow",e);a.on("menuShow",e);a.config.uiColor&&a.setUiColor(a.config.uiColor)}})})(); 518(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var d=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;
518left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);d.appendTo(CKEDITOR.document.getHead());try{var h=d.getComputedStyle("border-top-color"),g=d.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=g)}catch(b){CKEDITOR.env.hc=!1}d.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); 519CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(d=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;h<d.length;h++)CKEDITOR.editor.prototype.constructor.apply(d[h][0],d[h][1]),CKEDITOR.add(d[h][0])})();CKEDITOR.skin.name="moono-lexicon";CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie8";CKEDITOR.skin.chameleon=function(){var d=function(){return function(d,b){for(var f=d.match(/[^#]./g),h=0;3>h;h++){var l=h,k;k=parseInt(f[h],16);k=("0"+(0>b?0|k*(1+ 520b):0|k+(255-k)*b).toString(16)).slice(-2);f[l]=k}return"#"+f.join("")}}(),h
vendor: 2,839 bytes, lines 520-522
520={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};] "), 521panel: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};] ")}; 522return function(
vendor: 5,115 bytes, lines 522-532
522g,b){var f=d(g.uiColor,.4),f={id:"."+g.id,defaultBorder:d(f,-.2),toolbarElementsBorder:d(f,-.25),defaultBackground:f,lightBackground:d(f,.8),darkBackground:d(f,-.15),ckeButtonOn:d(f,.4),ckeResizer:d(f,-.4),ckeColorauto:d(f,.8),dialogBody:d(f,.7),dialogTab:d(f,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:d(f,-.6),menubuttonHover:d(f,.1),menubuttonIcon:d(f,.5),menubuttonIconHover:d(f,.3)};return h[b].output(f).replace(/\[/g,"{").replace(/\]/g,"}")}}(); 523CKEDITOR.plugins.add("dialogui",{onLoad:function(){var d=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var e=[this._],a=1;a<arguments.length;a++)e.push(arguments[a]);e.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,e);return this._},h={build:function(b,e,a){return new CKEDITOR.ui.dialog.textInput(b,e,a)}},g={build:function(b,e,a){return new CKEDITOR.ui.dialog[e.type](b,e,a)}},b={isChanged:function(){return this.getValue()!= 524this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},f=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,e){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&&this.fire("change",{value:this.getValue()})}, 525this)},this),this._.domOnChangeRegistered=!0);this.on("change",e)}},!0),m=/^on([A-Z]\w+)/,l=function(b){for(var e in b)(m.test(e)||"title"==e||"type"==e)&&delete b[e];return b},k=function(b){b=b.data.getKeystroke();b==CKEDITOR.SHIFT+CKEDITOR.ALT+36?this.setDirectionMarker("ltr"):b==CKEDITOR.SHIFT+CKEDITOR.ALT+35&&this.setDirectionMarker("rtl")};CKEDITOR.tools.extend(CKEDITOR.ui.dialog,{labeledElement:function(b,e,a,f){if(!(4>arguments.length)){var g=d.call(this,e);g.labelId=CKEDITOR.tools.getNextId()+ 526"_label";this._.children=[];var k={role:e.role||"presentation"};e.includeLabel&&(k["aria-labelledby"]=g.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,e,a,"div",null,k,function(){var a=[],d=e.required?" cke_required":"";"horizontal"!=e.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+d+'" ',' id\x3d"'+g.labelId+'"',g.inputId?' for\x3d"'+g.inputId+'"':"",(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e",e.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', 527e.controlStyle?' style\x3d"'+e.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,b,e),"\x3c/div\x3e"):(d={type:"hbox",widths:e.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+d+'" id\x3d"'+g.labelId+'" for\x3d"'+g.inputId+'"'+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(e.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(e.controlStyle?' style\x3d"'+e.controlStyle+ 528'"':"")+"\x3e"+f.call(this,b,e)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,a));return a.join("")})}},textInput:function(b,e,a){if(!(3>arguments.length)){d.call(this,e);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",g={"class":"cke_dialog_ui_input_"+e.type,id:f,type:e.type};e.validate&&(this.validate=e.validate);e.maxLength&&(g.maxlength=e.maxLength);e.size&&(g.size=e.size);e.inputStyle&&(g.style=e.inputStyle);var h=this,l=!1;b.on("load",function(){h.getInputElement().on("keydown", 529function(a){13==a.data.getKeystroke()&&(l=!0)});h.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);h.bidi&&k.call(h,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,e,a,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',e.type,'" role\x3d"presentation"'];e.width&&a.push('style\x3d"width:'+e.width+'" ');a.push("\x3e\x3cinput ");g["aria-labelledby"]=this._.labelId;this._.required&& 530(g["aria-required"]=this._.required);for(var b in g)a.push(b+'\x3d"'+g[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,e,a){if(!(3>arguments.length)){d.call(this,e);var f=this,g=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};e.validate&&(this.validate=e.validate);h.rows=e.rows||5;h.cols=e.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(e["class"]||"");"undefined"!=typeof e.inputStyle&&(h.style=e.inputStyle);e.dir&&(h.dir=e.dir);if(f.bidi)b.on("load", 531function(){f.getInputElement().on("keyup",k)},f);CKEDITOR.ui.dialog.labeledElement.call(this,b,e,a,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',g,'" '],b;for(b in h)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(h[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, 532e,a){if(!(3>
vendor: 6,101 bytes, lines 532-543
532arguments.length)){var f=d.call(this,e,{"default":!!e["default"]});e.validate&&(this.validate=e.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,e,a,"span",null,null,function(){var a=CKEDITOR.tools.extend({},e,{id:e.id?e.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),d=[],g=CKEDITOR.tools.getNextId()+"_label",k={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(a);e["default"]&&(k.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); 533f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,d,"input",null,k);d.push(' \x3clabel id\x3d"',g,'" for\x3d"',k.id,'"'+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(e.label),"\x3c/label\x3e");return d.join("")})}},radio:function(b,e,a){if(!(3>arguments.length)){d.call(this,e);this._["default"]||(this._["default"]=this._.initValue=e.items[0][1]);e.validate&&(this.validate=e.validate);var f=[],g=this;e.role="radiogroup";e.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, 534b,e,a,function(){for(var a=[],d=[],k=(e.id?e.id:CKEDITOR.tools.getNextId())+"_radio",h=0;h<e.items.length;h++){var m=e.items[h],p=void 0!==m[2]?m[2]:m[0],z=void 0!==m[1]?m[1]:m[0],v=CKEDITOR.tools.getNextId()+"_radio_input",q=v+"_label",v=CKEDITOR.tools.extend({},e,{id:v,title:null,type:null},!0),p=CKEDITOR.tools.extend({},v,{title:p},!0),A={type:"radio","class":"cke_dialog_ui_radio_input",name:k,value:z,"aria-labelledby":q},B=[];g._["default"]==z&&(A.checked="checked");l(v);l(p);"undefined"!=typeof v.inputStyle&& 535(v.style=v.inputStyle);v.keyboardFocusable=!0;f.push(new CKEDITOR.ui.dialog.uiElement(b,v,B,"input",null,A));B.push(" ");new CKEDITOR.ui.dialog.uiElement(b,p,B,"label",null,{id:q,"for":A.id},m[0]);a.push(B.join(""))}new CKEDITOR.ui.dialog.hbox(b,f,a,d);return d.join("")});this._.children=f}},button:function(b,e,a){if(arguments.length){"function"==typeof e&&(e=e(b.getParentEditor()));d.call(this,e,{disabled:e.disabled||!1});CKEDITOR.event.implementOn(this);var f=this;b.on("load",function(){var a=this.getElement(); 536(function(){a.on("click",function(a){f.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(f.click(),a.data.preventDefault())})})();a.unselectable()},this);var g=CKEDITOR.tools.extend({},e);delete g.style;var k=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,g,a,"a",null,{style:e.style,href:"javascript:void(0)",title:e.label,hidefocus:"true","class":e["class"],role:"button","aria-labelledby":k},'\x3cspan id\x3d"'+k+'" class\x3d"cke_dialog_ui_button"\x3e'+ 537CKEDITOR.tools.htmlEncode(e.label)+"\x3c/span\x3e")}},select:function(b,e,a){if(!(3>arguments.length)){var f=d.call(this,e);e.validate&&(this.validate=e.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,e,a,function(){var a=CKEDITOR.tools.extend({},e,{id:e.id?e.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),d=[],g=[],k={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};d.push('\x3cdiv class\x3d"cke_dialog_ui_input_', 538e.type,'" role\x3d"presentation"');e.width&&d.push('style\x3d"width:'+e.width+'" ');d.push("\x3e");void 0!==e.size&&(k.size=e.size);void 0!==e.multiple&&(k.multiple=e.multiple);l(a);for(var h=0,m;h<e.items.length&&(m=e.items[h]);h++)g.push('\x3coption value\x3d"',CKEDITOR.tools.htmlEncode(void 0!==m[1]?m[1]:m[0]).replace(/"/g,"\x26quot;"),'" /\x3e ',CKEDITOR.tools.htmlEncode(m[0]));"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle);f.select=new CKEDITOR.ui.dialog.uiElement(b,a,d,"select",null, 539k,g.join(""));d.push("\x3c/div\x3e");return d.join("")})}},file:function(b,e,a){if(!(3>arguments.length)){void 0===e["default"]&&(e["default"]="");var f=CKEDITOR.tools.extend(d.call(this,e),{definition:e,buttons:[]});e.validate&&(this.validate=e.validate);b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,e,a,function(){f.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"', 540f.frameId,'" title\x3d"',e.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,e,a){var f=this;if(!(3>arguments.length)){d.call(this,e);e.validate&&(this.validate=e.validate);var g=CKEDITOR.tools.extend({},e),k=g.onClick;g.className=(g.className?g.className+" ":"")+"cke_dialog_ui_button";g.onClick=function(a){var f= 541e["for"];a=k?k.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(f[0],f[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(e["for"][0],e["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,g,a)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,e=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,a=/\/$/;return function(f,d,g){if(!(3>arguments.length)){var k=[],h=d.html;"\x3c"!=h.charAt(0)&&(h="\x3cspan\x3e"+h+"\x3c/span\x3e");var l=d.focus;if(l){var m=this.focus; 542this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};d.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,d,k,"span",null,null,"");k=k.join("").match(b);h=h.match(e)||["","",""];a.test(h[1])&&(h[1]=h[1].slice(0,-1),h[2]="/"+h[2]);g.push([h[1]," ",k[1]||"",h[2]].join(""))}}}(),fieldset:function(b,e,a,f,d){var g=d.label;this._={children:e};CKEDITOR.ui.dialog.uiElement.call(this,b,d,f,"fieldset",null,null,function(){var b= 543[];g&&b.push("\x3clegend"+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var c=0;c<a.length;c++)b.push(a[c]);return b.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{set
vendor: 10,949 bytes, lines 543-564
543Label:function(b){var e=CKEDITOR.document.getById(this._.labelId);1>e.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(e):e.getChild(0).$.nodeValue= 544b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:f},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")}, 545isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,e){this.on("click",function(){e.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)}, 546focus:function(){var b=this.selectParentTab();setTimeout(function(){var e=b.getInputElement();e&&e.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var e=b.getInputElement();e&&(e.$.focus(),e.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var e=b&&b.charAt(0);(e="\u202a"==e?"ltr":"\u202b"==e?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(e)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this, 547arguments)},getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var e=this.getDirectionMarker();e&&(b=("ltr"==e?"\u202a":"\u202b")+b)}return b},setDirectionMarker:function(b){var e=this.getInputElement();b?e.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&e.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.textarea.prototype= 548new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,e,a){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),d=this.getInputElement().$;f.$.text=b;f.$.value=void 0===e||null===e?b:e;void 0===a||null===a?CKEDITOR.env.ie?d.add(f.$):d.add(f.$,null):d.add(f.$,a);return this},remove:function(b){this.getInputElement().$.remove(b); 549return this},clear:function(){for(var b=this.getInputElement().$;0<b.length;)b.remove(0);return this},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.checkbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(b,e){this.getInputElement().$.checked=b;!e&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b, 550e){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return f.onChange.apply(this,arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",e);return null}},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,e){for(var a=this._.children,f,d=0;d<a.length&&(f=a[d]);d++)f.getElement().$.checked= 551f.getValue()==b;!e&&this.fire("change",{value:b})},getValue:function(){for(var b=this._.children,e=0;e<b.length;e++)if(b[e].getElement().$.checked)return b[e].getValue();return null},accessKeyUp:function(){var b=this._.children,e;for(e=0;e<b.length;e++)if(b[e].getElement().$.checked){b[e].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,e){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return f.onChange.apply(this,arguments);b.on("load",function(){for(var a= 552this._.children,b=this,c=0;c<a.length;c++)a[c].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",e);return null}}},b,!0);CKEDITOR.ui.dialog.file.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,b,{getInputElement:function(){var b=CKEDITOR.document.getById(this._.frameId).getFrameDocument();return 0<b.$.forms.length?new CKEDITOR.dom.element(b.$.forms[0].elements[0]): 553this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var e=/^on([A-Z]\w+)/,a,f=function(a,b,c,e){a.on("formLoaded",function(){a.getInputElement().on(c,e,a)})},d;for(d in b)if(a=d.match(e))this.eventProcessors[d]?this.eventProcessors[d].call(this,this._.dialog,b[d]):f(this,this._.dialog,a[1].toLowerCase(),b[d]);return this},reset:function(){function b(){a.$.open(); 554var c="";f.size&&(c=f.size-(CKEDITOR.env.ie?7:0));var m=e.frameId+"_input";a.$.write(['\x3chtml dir\x3d"'+h+'" lang\x3d"'+l+'"\x3e\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e\x3cbody style\x3d"margin: 0; overflow: hidden; background: transparent;"\x3e','\x3cform enctype\x3d"multipart/form-data" method\x3d"POST" dir\x3d"'+h+'" lang\x3d"'+l+'" action\x3d"',CKEDITOR.tools.htmlEncode(f.action),'"\x3e\x3clabel id\x3d"',e.labelId,'" for\x3d"',m,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(f.label), 555'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',m,'" aria-labelledby\x3d"',e.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(f.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<c?c:""),'" /\x3e\x3c/form\x3e\x3c/body\x3e\x3c/html\x3e\x3cscript\x3e',CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"","window.parent.CKEDITOR.tools.callFunction("+g+");","window.onbeforeunload \x3d function() {window.parent.CKEDITOR.tools.callFunction("+k+")}","\x3c/script\x3e"].join("")); 556a.$.close();for(c=0;c<d.length;c++)d[c].enable()}var e=this._,a=CKEDITOR.document.getById(e.frameId).getFrameDocument(),f=e.definition,d=e.buttons,g=this.formLoadedNumber,k=this.formUnloadNumber,h=e.dialog._.editor.lang.dir,l=e.dialog._.editor.langCode;g||(g=this.formLoadedNumber=CKEDITOR.tools.addFunction(function(){this.fire("formLoaded")},this),k=this.formUnloadNumber=CKEDITOR.tools.addFunction(function(){this.getInputElement().clearCustomData()},this),this.getDialog()._.editor.on("destroy",function(){CKEDITOR.tools.removeFunction(g); 557CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(b,500):b()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(b,e){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",e)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype= 558new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",h);CKEDITOR.dialog.addUIElement("password",h);CKEDITOR.dialog.addUIElement("tel",h);CKEDITOR.dialog.addUIElement("textarea",g);CKEDITOR.dialog.addUIElement("checkbox",g);CKEDITOR.dialog.addUIElement("radio",g);CKEDITOR.dialog.addUIElement("button",g);CKEDITOR.dialog.addUIElement("select",g);CKEDITOR.dialog.addUIElement("file",g);CKEDITOR.dialog.addUIElement("fileButton", 559g);CKEDITOR.dialog.addUIElement("html",g);CKEDITOR.dialog.addUIElement("fieldset",{build:function(b,e,a){for(var f=e.children,d,g=[],k=[],h=0;h<f.length&&(d=f[h]);h++){var l=[];g.push(l);k.push(CKEDITOR.dialog._.uiElementBuilders[d.type].build(b,d,l))}return new CKEDITOR.ui.dialog[e.type](b,k,g,a,e)}})}});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 d(a){a._.tabBarMode= 560!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function h(){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,this._.currentTabId),c=b+1;c<b+a;c++)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a]; 561return null}function b(a,b){for(var c=a.$.getElementsByTagName("input"),e=0,f=c.length;e<f;e++){var d=new CKEDITOR.dom.element(c[e]);"text"==d.getAttribute("type").toLowerCase()&&(b?(d.setAttribute("value",d.getCustomData("fake_value")||""),d.removeCustomData("fake_value")):(d.setCustomData("fake_value",d.getAttribute("value")),d.setAttribute("value","")))}}function f(a,b){var c=this.getInputElement();c&&(a?c.removeAttribute("aria-invalid"):c.setAttribute("aria-invalid",!0));a||(this.select?this.select(): 562this.focus());b&&alert(b);this.fire("validated",{valid:a,msg:b})}function m(){var a=this.getInputElement();a&&a.removeAttribute("aria-invalid")}function l(a){var b=CKEDITOR.dom.element.createFromHtml(CKEDITOR.addTemplate("dialog",J).output({id:CKEDITOR.tools.getNextNumber(),editorId:a.id,langDir:a.lang.dir,langCode:a.langCode,editorDialogClass:"cke_editor_"+a.name.replace(/\./g,"\\.")+"_dialog",closeTitle:a.lang.common.close,hidpi:CKEDITOR.env.hidpi?"cke_hidpi":""})),c=b.getChild([0,0,0,0,0]),e=c.getChild(0), 563f=c.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(c);!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(c.getParent()));e.unselectable();f.unselectable();return{element:b, 564parts:{dialog:b.getChild(0),title:e,close:f,tabs:c.getChild(2),contents:c.getChild([3,0,0,0]),footer:c.getChild([3,0,1,0])}}}function k(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()};
564b.on("keydown",function(a){a.data.getKeystroke()in{32:1,13:1}&&this.fire("click")});b.on("focus",function(){this.fire("mouseover")});b.on("blur",function(){this.fire("mouseout")})} 565function c(a){function b(){a.layout()}var c=CKEDITOR.document.getWindow();c.on("resize",b);a.on("hide",function(){c.removeListener("resize",b)})}function e(b,c){this.dialog=b;for(var e=c.contents,f=0,d;d=e[f];f++)e[f]=d&&new a(b,d);CKEDITOR.tools.extend(this,c)}function a(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function n(a){function b(c){var h=a.getSize(),l=a.parts.dialog.getParent().getClientSize(),n=c.data.$.screenX,m=c.data.$.screenY,p=n-e.x,q=m-e.y;e={x:n,y:m};f.x+=p;f.y+=q;n=f.x+ 566k[3]<g?-k[3]:f.x-k[1]>l.width-h.width-g?l.width-h.width+("rtl"==d.lang.dir?0:k[1]):f.x;h=f.y+k[0]<g?-k[0]:f.y-k[2]>l.height-h.height-g?l.height-h.height+k[2]:f.y;n=Math.floor(n);h=Math.floor(h);a.move(n,h,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=G.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var e=null,f=null,d=a.getParentEditor(), 567g=d.config.dialog_magnetDistance,k=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(d){if(!a._.moved){var g=a._.element;g.getFirst().setStyle("position","absolute");g.removeStyle("display");a._.moved=!0;a.layout()}e={x:d.data.$.screenX,y:d.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);f=a.getPosition();CKEDITOR.env.ie6Compat&&(g=G.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",c));d.data.preventDefault()}, 568a)}function w(a){function b(c){var m="rtl"==d.lang.dir,p=n.width,q=n.height,u=p+(c.data.$.screenX-l.x)*(m?-1:1)*(a._.moved?1:2),Q=q+(c.data.$.screenY-l.y)*(a._.moved?1:2),P=a._.element.getFirst(),P=m&&parseInt(P.getComputedStyle("right"),10),x=a.getPosition();x.x=x.x||0;x.y=x.y||0;x.y+Q>h.height&&(Q=h.height-x.y);(m?P:x.x)+u>h.width&&(u=h.width-(m?P:x.x));Q=Math.floor(Q);u=Math.floor(u);if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)p=Math.max(e.minWidth||0,u-g);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT|| 569f==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(e.minHeight||0,Q-k);a.resize(p,q);a._.moved&&y(a,a._.position.x,a._.position.y);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);m&&(m.remove(),m=null);if(CKEDITOR.env.ie6Compat){var a=G.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var e=a.definition,f=e.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var d= 570a.getParentEditor(),g,k,h,l,n,m,p=CKEDITOR.tools.addFunction(function(e){function f(a){return a.isVisible()}n=a.getSize();var d=a.parts.contents,p=d.$.getElementsByTagName("iframe").length,q=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);p&&(m=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),d.append(m));k=n.height-a.parts.contents.getFirst(f).getSize("height",q); 571g=n.width-a.parts.contents.getFirst(f).getSize("width",1);l={x:e.screenX,y:e.screenY};h=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(d=G.getChild(0).getFrameDocument(),d.on("mousemove",b),d.on("mouseup",c));e.preventDefault&&e.preventDefault()});a.on("load",function(){var b="";f==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":f==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+ 572b+" cke_resizer_"+d.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(d.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+p+', event )"\x3e'+("ltr"==d.lang.dir?"\u25e2":"\u25e3")+"\x3c/div\x3e");a.parts.footer.append(b,1)});d.on("destroy",function(){CKEDITOR.tools.removeFunction(p)})}}function y(a,b,c){var e=a.parts.dialog.getParent().getClientSize(),f=a.getSize(),d=a._.viewportRatio,g=Math.max(e.width-f.width,0),e=Math.max(e.height-f.height,0);d.width=g?b/g:d.width;d.height=e? 573c/e:d.height;a._.viewportRatio=d}function r(a){a.data.preventDefault(1)}function t(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,e=b.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=b.dialog_backgroundCoverOpacity,f=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(e,c,f),d=H[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");d?d.show():(f=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;", 574CKEDITOR.env.ie6Compat?"":"background-color: "+e,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(e="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+e+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",f.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),f.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+e+"' );document.close();")+"})())"),f.push('" style\x3d"position:absolute;
574left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')), 575f.push("\x3c/div\x3e"),d=CKEDITOR.dom.element.createFromHtml(f.join("")),d.setOpacity(void 0!==c?c:.5),d.on("keydown",r),d.on("keypress",r),d.on("keyup",r),d.appendTo(CKEDITOR.document.getBody()),H[b]=d);a.focusManager.add(d);G=d;CKEDITOR.env.mac&&CKEDITOR.env.webkit||d.focus()}function u(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");G&&(a.focusManager.remove(G),G.hide())}function x(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode); 576(b=K[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function p(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,e=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=K[(b?"CTRL+":"")+(c?"ALT+":"")+(e?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function z(a,b,c,e,f){(K[c]||(K[c]=[])).push({uiElement:a, 577dialog:b,key:c,keyup:f||a.accessKeyUp,keydown:e||a.accessKeyDown})}function v(a){for(var b in K){for(var c=K[b],e=c.length-1;0<=e;e--)c[e].dialog!=a&&c[e].uiElement!=a||c.splice(e,1);0===c.length&&delete K[b]}}function q(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function A(){}var B=CKEDITOR.tools.cssLength,C,G,F=!CKEDITOR.env.ie||CKEDITOR.env.edge,J='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(F?"display:flex": 578"")+'" 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"'+(F?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; 579CKEDITOR.dialog=function(a,b){function c(){var a=B._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,e=0;e<b;e++)a[e].focusIndex=e}function k(a){var b=B._.focusList;a=a||0;if(!(1>b.length)){var c=B._.currentFocusIndex;B._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(e){}var f=c,d=1<B._.pageCount;do{f+=a;if(d&&!B._.tabBarMode&&(f==b.length||-1==f)){B._.tabBarMode=!0;B._.tabs[B._.currentTabId][0].focus(); 580B._.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 p(b){if(B==CKEDITOR.dialog._.currentTop){var c=b.data.getKeystroke(),e="rtl"==a.lang.dir,f=[37,38,39,40];A=r=0;if(9==c||c==CKEDITOR.SHIFT+9)k(c==CKEDITOR.SHIFT+9?-1:1),A=1;else if(c==CKEDITOR.ALT+121&&!B._.tabBarMode&&1<B.getPageCount())d(B),A=1;else if(-1!=CKEDITOR.tools.indexOf(f,c)&&B._.tabBarMode)c=-1!=CKEDITOR.tools.indexOf([e?39:37,38],c)? 581h.call(B):g.call(B),B.selectPage(c),B._.tabs[c][0].focus(),A=1;else if(13!=c&&32!=c||!B._.tabBarMode)if(13==c)c=b.data.getTarget(),c.is("a","button","select","textarea")||c.is("input")&&"button"==c.$.type||((c=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(c.click,0,c),A=1),r=1;else if(27==c)(c=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(c.click,0,c):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),r=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex= 582-1,k(1),A=1;q(b)}}function q(a){A?a.data.preventDefault(1):r&&a.data.stopPropagation()}var u=CKEDITOR.dialog._.dialogDefinitions[b],x=CKEDITOR.tools.clone(C),t=a.config.dialog_buttonsOrder||"OS",v=a.lang.dir,z={},A,r;("OS"==t&&CKEDITOR.env.mac||"rtl"==t&&"ltr"==v||"ltr"==t&&"rtl"==v)&&x.buttons.reverse();u=CKEDITOR.tools.extend(u(a),x);u=CKEDITOR.tools.clone(u);u=new e(this,u);x=l(a);this._={editor:a,element:x.element,name:b,model:null,contentSize:{
582width:0,height:0},size:{width:0,height:0},contents:{}, 583buttons:{},accessKeyMap:{},viewportRatio:{width:.5,height:.5},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1};this.parts=x.parts;CKEDITOR.tools.setTimeout(function(){a.fire("ariaWidget",this.parts.contents)},0,this);x={top:0,visibility:"hidden"};CKEDITOR.env.ie6Compat&&(x.position="absolute");x["rtl"==v?"right":"left"]=0;this.parts.dialog.setStyles(x);CKEDITOR.event.call(this);this.definition=u=CKEDITOR.fire("dialogDefinition", 584{name:b,definition:u,dialog:this},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){x=a.config.removeDialogTabs.split(";");for(v=0;v<x.length;v++)if(t=x[v].split(":"),2==t.length){var y=t[0];z[y]||(z[y]=[]);z[y].push(t[1])}a._.removeDialogTabs=z}if(a._.removeDialogTabs&&(z=a._.removeDialogTabs[b]))for(v=0;v<z.length;v++)u.removeContents(z[v]);if(u.onLoad)this.on("load",u.onLoad);if(u.onShow)this.on("show",u.onShow);if(u.onHide)this.on("hide",u.onHide);if(u.onOk)this.on("ok", 585function(b){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0);!1===u.onOk.call(this,b)&&(b.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(u.onCancel)this.on("cancel",function(a){!1===u.onCancel.call(this,a)&&(a.data.hide=!1)});var B=this,G=function(a){var b=B._.contents,c=!1,e;for(e in b)for(var f in b[e])if(c=a.call(this,b[e][f]))return};this.on("ok",function(a){G(function(b){if(b.validate){var c=b.validate(this),e="string"==typeof c||!1===c;e&&(a.data.hide=!1,a.stop()); 586f.call(b,!e,"string"==typeof c?c:void 0);return e}})},this,null,0);this.on("cancel",function(b){G(function(c){if(c.isChanged())return a.config.dialog_noConfirmCancel||confirm(a.lang.common.confirmCancel)||(b.data.hide=!1),!0})},this,null,0);this.parts.close.on("click",function(a){!1!==this.fire("cancel",{hide:!0}).hide&&this.hide();a.data.preventDefault()},this);this.changeFocus=k;var F=this._.element;a.focusManager.add(F,1);this.on("show",function(){F.on("keydown",p,this);if(CKEDITOR.env.gecko)F.on("keypress", 587q,this)});this.on("hide",function(){F.removeListener("keydown",p);CKEDITOR.env.gecko&&F.removeListener("keypress",q);G(function(a){m.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",p,this,null,0)});this.on("show",function(){c();var b=1<B._.pageCount;a.config.dialog_startupFocusTab&&b?(B._.tabBarMode=!0,B._.tabs[B._.currentTabId][0].focus(),B._.currentFocusIndex=-1):this._.hasFocus||(this._.currentFocusIndex=b?-1:this._.focusList.length- 5881,u.onFocus?(b=u.onFocus.call(this))&&b.focus():k(1))},this,null,4294967295);if(CKEDITOR.env.ie6Compat)this.on("load",function(){var a=this.getElement(),b=a.getFirst();b.remove();b.appendTo(a)},this);n(this);w(this);(new CKEDITOR.dom.text(u.title,CKEDITOR.document)).appendTo(this.parts.title);for(v=0;v<u.contents.length;v++)(z=u.contents[v])&&this.addPage(z);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("_"))), 589d(this),a.data.preventDefault())},this);v=[];z=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:u.buttons},v).getChild();this.parts.footer.setHtml(v.join(""));for(v=0;v<z.length;v++)this._.buttons[z[v].id]=z[v]};CKEDITOR.dialog.prototype={destroy:function(){this.hide();this._.element.remove()},resize:function(a,b){if(!this._.contentSize||this._.contentSize.width!=a||this._.contentSize.height!=b){CKEDITOR.dialog.fire("resize", 590{dialog:this,width:a,height:b},this._.editor);this.fire("resize",{width:a,height:b},this._.editor);this.parts.contents.setStyles({width:a+"px",height:b+"px"});if("rtl"==this._.editor.lang.dir&&this._.position){var c=this.parts.dialog.getParent().getClientSize().width;this._.position.x=c-this._.contentSize.width-parseInt(this._.element.getFirst().getStyle("right"),10)}this._.contentSize={width:a,height:b}}},getSize:function(){var a=this._.element.getFirst();return{width:a.$.offsetWidth||0,height:a.$.offsetHeight|| 5910}},move:function(a,b,c){var e=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&e.setStyle("zoom","100%");var d=this.parts.dialog.getParent().getClientSize(),g=this.getSize(),k=this._.viewportRatio,h=Math.max(d.width-g.width,0),d=Math.max(d.height-g.height,0);this._.position&&this._.position.x==a&&this._.position.y==b?(a=Math.floor(h*k.width),b=Math.floor(d*k.height)):y(this,a,b);this._.position={x:a,y:b};f&&(a=h-a);b={top:(0<b?b:0)+"px"};b[f?"right":"left"]=(0<a?a:0)+"px"; 592e.setStyles(b);c&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition,e=CKEDITOR.document.getBody(),f=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(e)?a.setStyle("display",F?"flex":"block"):a.appendTo(e);this.resize(this._.contentSize&&this._.contentSize.width||b.width||b.minWidth,this._.contentSize&&this._.contentSize.height||b.height||b.minHeight);this.reset();null===this._.currentTabId&& 593this.selectPage(this.definition.contents[0].id);null===CKEDITOR.dialog._.currentZIndex&&(CKEDITOR.dialog._.currentZIndex=f);this._.element.getFirst().setStyle("z-index",CKEDITOR.dialog._.currentZIndex+=10);this.getElement().setStyle("z-index",CKEDITOR.dialog._.currentZIndex);null===CKEDITOR.dialog._.currentTop?(CKEDITOR.dialog._.currentTop=this,this._.parentDialog=null,t(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,e=this._.parentDialog.getElement().getFirst(),e.$.style.zIndex-= 594Math.floor(f/2),this._.parentDialog.getElement().setStyle("z-index",e.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",x);a.on("keyup",p);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,g=0;if(f){for(var k in this._.contents[a.id]){var h=this._.contents[a.id][k];
vendor: 4,975 bytes, lines 594-604
594"hbox"!=h.type&&"vbox"!=h.type&&h.getInputElement()&&(h.requiredContent&&!this._.editor.activeFilter.check(h.requiredContent)?h.disable():(h.enable(), 595g++))}!g||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();c(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= 596this.parts.dialog;if(this._.moved||!F){var b=this.getSize(),c=CKEDITOR.document.getWindow().getViewPaneSize(),e;this._.moved&&this._.position?(e=this._.position.x,b=this._.position.y):(e=(c.width-b.width)/2,b=(c.height-b.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));e=Math.floor(e);b=Math.floor(b);this.move(e,b)}},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= 597function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]); 598var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(v(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();this._.parentDialog.getElement().removeStyle("z-index");b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else u(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-= 59910;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",x);a.removeListener("keyup",p);var c=this._.editor;c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+ 600'"':"",e=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: inherit;"},b),f=this._.contents[a.id]={},d=e.getChild(),g=0;e=d.shift();)e.notAllowed||"hbox"==e.type||"vbox"==e.type||g++,f[e.id]=e,"function"==typeof e.getChild&&d.push.apply(d,e.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height", 601"100%");e=CKEDITOR.env;f="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",c,a.hidden?' style\x3d"display:none"':"",' id\x3d"',f,'"',e.gecko&&!e.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",f);this._.tabs[a.id]=[c,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++; 602this._.lastTab=c;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);c.unselectable();this.parts.tabs.append(c);a.accessKey&&(z(this,this,"CTRL+"+a.accessKey,A,q),this._.accessKeyMap["CTRL+"+a.accessKey]=a.id)}},selectPage:function(a){if(this._.currentTabId!=a&&!this._.tabs[a][0].hasClass("cke_dialog_tab_disabled")&&!1!==this.fire("selectPage",{page:a,currentPage:this._.currentTabId})){for(var c in this._.tabs){var e=this._.tabs[c][0],f=this._.tabs[c][1];c!=a&&(e.removeClass("cke_dialog_tab_selected"), 603e.removeAttribute("aria-selected"),f.hide());f.setAttribute("aria-hidden",c!=a)}var d=this._.tabs[a];d[0].addClass("cke_dialog_tab_selected");d[0].setAttribute("aria-selected",!0);CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(b(d[1]),d[1].show(),setTimeout(function(){b(d[1],1)},0)):d[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b= 604this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&&b.isVisible()&&(a==this._.currentTabId&&this.selectPage(h.call(this)),b.hide(),this._.pageCount--,this.updateStyle())}
vendor: 6,882 bytes, lines 604-617
604,showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var c=this._.contents[a];return c&&c[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()}, 605setValueOf:function(a,b,c){return this.getContentElement(a,b).setValue(c)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a, 606b){if("undefined"==typeof b)b=this._.focusList.length,this._.focusList.push(new k(this,a,b));else{this._.focusList.splice(b,0,new k(this,a,b));for(var c=b+1;c<this._.focusList.length;c++)this._.focusList[c].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,c={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};c.styles["margin-"+("rtl"==b?"left":"right")]= 607"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)}},getModel:function(a){return this._.model?this._.model:this.definition.getModel?this.definition.getModel(a):null},setModel:function(a){this._.model=a},getMode:function(a){if(this.definition.getMode)return this.definition.getMode(a); 608a=this.getModel(a);return!a||a instanceof CKEDITOR.dom.element&&!a.getParent()?CKEDITOR.dialog.CREATION_MODE:CKEDITOR.dialog.EDITING_MODE}};CKEDITOR.tools.extend(CKEDITOR.dialog,{CREATION_MODE:0,EDITING_MODE:1,add:function(a,b){this._.dialogDefinitions[a]&&"function"!=typeof b||(this._.dialogDefinitions[a]=b)},exists:function(a){return!!this._.dialogDefinitions[a]},getCurrent:function(){return CKEDITOR.dialog._.currentTop},isTabEnabled:function(a,b,c){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+ 609b+":"+c+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button", 610label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(c){return a(c,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype); 611C={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var I=function(a,b,c){for(var e=0,f;f=a[e];e++)if(f.id==b||c&&f[c]&&(f=I(f[c],b,c)))return f;return null},D=function(a,b,c,e,f){if(c){for(var d=0,g;g=a[d];d++){if(g.id==c)return a.splice(d,0,b),b;if(e&&g[e]&&(g=D(g[e],b,c,e,!0)))return g}if(f)return null}a.push(b);return b},M=function(a,b,c){for(var e=0,f;f=a[e];e++){if(f.id==b)return a.splice(e,1);if(c&&f[c]&&(f=M(f[c], 612b,c)))return f}return null};e.prototype={getContents:function(a){return I(this.contents,a)},getButton:function(a){return I(this.buttons,a)},addContents:function(a,b){return D(this.contents,a,b)},addButton:function(a,b){return D(this.buttons,a,b)},removeContents:function(a){M(this.contents,a)},removeButton:function(a){M(this.buttons,a)}};a.prototype={get:function(a){return I(this.elements,a,"children")},add:function(a,b){return D(this.elements,a,b,"children")},remove:function(a){M(this.elements,a, 613"children")}};var H={},K={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,c,e,f,d,g){if(!(4>arguments.length)){var k=(e.call?e(b):e)||"div",h=["\x3c",k," "],l=(f&&f.call?f(b):f)||{},n=(d&&d.call?d(b):d)||{},m=(g&&g.call?g.call(this,a,b):g)||"",p=this.domId=n.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(l.display="none",this.notAllowed=!0);n.id=p;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]= 6141);b.disabled&&(q.cke_disabled=1);for(var u=n["class"]&&n["class"].split?n["class"].split(" "):[],p=0;p<u.length;p++)u[p]&&(q[u[p]]=1);u=[];for(p in q)u.push(p);n["class"]=u.join(" ");b.title&&(n.title=b.title);q=(b.style||"").split(";");b.align&&(u=b.align,l["margin-left"]="left"==u?0:"auto",l["margin-right"]="right"==u?0:"auto");for(p in l)q.push(p+":"+l[p]);b.hidden&&q.push("display:none");for(p=q.length-1;0<=p;p--)""===q[p]&&q.splice(p,1);0<q.length&&(n.style=(n.style?n.style+"; ":"")+q.join("; ")); 615for(p in n)h.push(p+'\x3d"'+CKEDITOR.tools.htmlEncode(n[p])+'" ');h.push("\x3e",m,"\x3c/",k,"\x3e");c.push(h.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(c){a.call(this,b.setValue.call(this,c))}}));"function"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue, 616function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&z(this,a,"CTRL+"+b.accessKey);var x=this;a.on("load",function(){var b=x.getInputElement();if(b){var c=x.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;x.fire("focus");c&&this.addClass(c)});b.on("blur",function(){x.fire("blur"); 617c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=x.focusIndex}))}},hbox:function(a,b,c,e,f){if(!(4>arguments.length)){this._||(this._={});
vendor: 13,435 bytes, lines 617-643
617var d=this._.children=b,g=f&&f.widths||null,k=f&&f.height||null,h,l={role:"presentation"};f&&f.align&&(l.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"hbox"},e,"table",{},l,function(){var a= 618['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(h=0;h<c.length;h++){var b="cke_dialog_ui_hbox_child",e=[];0===h&&(b="cke_dialog_ui_hbox_first");h==c.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');g?g[h]&&e.push("width:"+B(g[h])):e.push("width:"+Math.floor(100/c.length)+"%");k&&e.push("height:"+B(k));f&&void 0!==f.padding&&e.push("padding:"+B(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&d[h].align&&e.push("text-align:"+d[h].align); 6190<e.length&&a.push('style\x3d"'+e.join("; ")+'" ');a.push("\x3e",c[h],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,c,e,f){if(!(3>arguments.length)){this._||(this._={});var d=this._.children=b,g=f&&f.width||null,k=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');f&&f.expand&&b.push("height:100%;"); 620b.push("width:"+B(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(f&&f.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;e<c.length;e++){var h=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');g&&h.push("width:"+B(g||"100%"));k?h.push("height:"+B(k[e])):f&&f.expand&&h.push("height:"+Math.floor(100/c.length)+"%");f&&void 0!==f.padding&&h.push("padding:"+B(f.padding));CKEDITOR.env.ie&& 621CKEDITOR.env.quirks&&d[e].align&&h.push("text-align:"+d[e].align);0<h.length&&b.push('style\x3d"',h.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',c[e],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a); 622!b&&this.fire("change",{value:a});return this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){for(var a=this.getInputElement();(a=a.getParent())&&-1==a.$.className.search("cke_dialog_page_contents"););if(!a)return this;a=a.getAttribute("name");this._.dialog._.currentTabId!=a&&this._.dialog.selectPage(a);return this},focus:function(){this.selectParentTab().getInputElement().focus();return this},registerEvents:function(a){var b= 623/^on([A-Z]\w+)/,c,e=function(a,b,c,e){b.on("load",function(){a.getInputElement().on(c,e,a)})},f;for(f in a)if(c=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):e(this,this._.dialog,c[1].toLowerCase(),a[f]);return this},eventProcessors:{onLoad:function(a,b){a.on("load",b,this)},onShow:function(a,b){a.on("show",b,this)},onHide:function(a,b){a.on("hide",b,this)}},accessKeyDown:function(){this.focus()},accessKeyUp:function(){},disable:function(){var a=this.getElement(); 624this.getInputElement().setAttribute("disabled","true");a.addClass("cke_disabled")},enable:function(){var a=this.getElement();this.getInputElement().removeAttribute("disabled");a.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return this.isEnabled()&&this.isVisible()?!0:!1}};CKEDITOR.ui.dialog.hbox.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement, 625{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var e=b.children,f,d=[],g=[],k=0;k<e.length&&(f=e[k]);k++){var h=[];d.push(h);g.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,h))}return new CKEDITOR.ui.dialog[b.type](a, 626g,d,c,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,c=/^\d*(?:\.\d+)?$/,e=/^(((\d*(\.\d+))|(\d*))(px|%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|%)?)?$/i,d= 627/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],c,e=CKEDITOR.VALIDATE_AND,f=[],d;for(d=0;d<a.length;d++)if("function"==typeof a[d])f.push(a[d]);else break;d<a.length&&"string"==typeof a[d]&&(c=a[d],d++);d<a.length&&"number"==typeof a[d]&&(e=a[d]);var g=e==CKEDITOR.VALIDATE_AND?!0:!1;for(d=0;d<f.length;d++)g=e==CKEDITOR.VALIDATE_AND?g&& 628f[d](b):g||f[d](b);return g?!0:c}},regex:function(a,b){return function(c){c=this&&this.getValue?this.getValue():c;return a.test(c)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(c,a)},cssLength:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return d.test(CKEDITOR.tools.trim(a))}, 629a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var c in H)H[c].remove();H={}}a=a.editor._.storedDialogs;for(var e in a)a[e].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,c){var e=null,f=CKEDITOR.dialog._.dialogDefinitions[a]; 630null===CKEDITOR.dialog._.currentTop&&t(this);if("function"==typeof f)f=this._.storedDialogs||(this._.storedDialogs={}),e=f[a]||(f[a]=new CKEDITOR.dialog(this,a)),e.setModel(c),b&&b.call(e,e),e.show();else{if("failed"==f)throw u(this),Error('[CKEDITOR.dialog.openDialog] Dialog "'+a+'" failed when loading definition.');"string"==typeof f&&CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f),function(){"function"!=typeof CKEDITOR.dialog._.dialogDefinitions[a]&&(CKEDITOR.dialog._.dialogDefinitions[a]="failed"); 631this.openDialog(a,b,c)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(e)e.once("hide",function(){e.setModel(null)},null,null,999);return e}})})();var ka=!1;CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(d){ka||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),ka=!0);d.on("doubleclick",function(h){h.data.dialog&&d.openDialog(h.data.dialog)},null,null,999)}});(function(){CKEDITOR.plugins.add("a11yhelp",{requires:"dialog",availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1, 632cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1},init:function(d){var h=this;d.addCommand("a11yHelp",{exec:function(){var g=d.langCode,g=h.availableLangs[g]?g:h.availableLangs[g.replace(/-.*/,"")]?g.replace(/-.*/,""): 633"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+g+".js"),function(){d.lang.a11yhelp=h.langEntries[g];d.openDialog("a11yHelp")})},modes:{wysiwyg:1,source:1},readOnly:1,canUndo:!1});d.setKeystroke(CKEDITOR.ALT+48,"a11yHelp");CKEDITOR.dialog.add("a11yHelp",this.path+"dialogs/a11yhelp.js");d.on("ariaEditorHelpLabel",function(g){g.data.label=d.lang.common.editorHelp})}})})();CKEDITOR.plugins.add("basicstyles",{init:function(d){var h=0,g=function(f,g,c,e){if(e){e=new CKEDITOR.style(e); 634var a=b[c];a.unshift(e);d.attachStyleStateChange(e,function(a){!d.readOnly&&d.getCommand(c).setState(a)});d.addCommand(c,new CKEDITOR.styleCommand(e,{contentForms:a}));d.ui.addButton&&d.ui.addButton(f,{label:g,command:c,toolbar:"basicstyles,"+(h+=10)})}},b={bold:["strong","b",["span",function(b){b=b.styles["font-weight"];return"bold"==b||700<=+b}]],italic:["em","i",["span",function(b){return"italic"==b.styles["font-style"]}]],underline:["u",["span",function(b){return"underline"==b.styles["text-decoration"]}]], 635strike:["s","strike",["span",function(b){return"line-through"==b.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},f=d.config,m=d.lang.basicstyles;g("Bold",m.bold,"bold",f.coreStyles_bold);g("Italic",m.italic,"italic",f.coreStyles_italic);g("Underline",m.underline,"underline",f.coreStyles_underline);g("Strike",m.strike,"strike",f.coreStyles_strike);g("Subscript",m.subscript,"subscript",f.coreStyles_subscript);g("Superscript",m.superscript,"superscript",f.coreStyles_superscript); 636d.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"};CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){var d={exec:function(d){var g= 637d.getCommand("blockquote").state,b=d.getSelection(),f=b&&b.getRanges()[0];if(f){var m=b.createBookmarks();if(CKEDITOR.env.ie){var l=m[0].startNode,k=m[0].endNode,c;if(l&&"blockquote"==l.getParent().getName())for(c=l;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){l.move(c,!0);break}if(k&&"blockquote"==k.getParent().getName())for(c=k;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){k.move(c);break}}var e=f.createIterator();e.enlargeBr=d.config.enterMode!= 638CKEDITOR.ENTER_BR;if(g==CKEDITOR.TRISTATE_OFF){for(l=[];g=e.getNextParagraph();)l.push(g);1>l.length&&(g=d.document.createElement(d.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),k=m.shift(),f.insertNode(g),g.append(new CKEDITOR.dom.text("\ufeff",d.document)),f.moveToBookmark(k),f.selectNodeContents(g),f.collapse(!0),k=f.createBookmark(),l.push(g),m.unshift(k));c=l[0].getParent();f=[];for(k=0;k<l.length;k++)g=l[k],c=c.getCommonAncestor(g.getParent());for(g={table:1,tbody:1,tr:1,ol:1,ul:1};g[c.getName()];)c= 639c.getParent();for(k=null;0<l.length;){for(g=l.shift();!g.getParent().equals(c);)g=g.getParent();g.equals(k)||f.push(g);k=g}for(;0<f.length;)if(g=f.shift(),"blockquote"==g.getName()){for(k=new CKEDITOR.dom.documentFragment(d.document);g.getFirst();)k.append(g.getFirst().remove()),l.push(k.getLast());k.replace(g)}else l.push(g);f=d.document.createElement("blockquote");for(f.insertBefore(l[0]);0<l.length;)g=l.shift(),f.append(g)}else if(g==CKEDITOR.TRISTATE_ON){k=[];for(c={};g=e.getNextParagraph();){for(l= 640f=null;g.getParent();){if("blockquote"==g.getParent().getName()){f=g.getParent();l=g;break}g=g.getParent()}f&&l&&!l.getCustomData("blockquote_moveout")&&(k.push(l),CKEDITOR.dom.element.setMarker(c,l,"blockquote_moveout",!0))}CKEDITOR.dom.element.clearAllMarkers(c);g=[];l=[];for(c={};0<k.length;)e=k.shift(),f=e.getParent(),e.getPrevious()?e.getNext()?(e.breakParent(e.getParent()),l.push(e.getNext())):e.remove().insertAfter(f):e.remove().insertBefore(f),f.getCustomData("blockquote_processed")||(l.push(f), 641CKEDITOR.dom.element.setMarker(c,f,"blockquote_processed",!0)),g.push(e);CKEDITOR.dom.element.clearAllMarkers(c);for(k=l.length-1;0<=k;k--){f=l[k];a:{c=f;for(var e=0,a=c.getChildCount(),n=void 0;e<a&&(n=c.getChild(e));e++)if(n.type==CKEDITOR.NODE_ELEMENT&&n.isBlockBoundary()){c=!1;break a}c=!0}c&&f.remove()}if(d.config.enterMode==CKEDITOR.ENTER_BR)for(f=!0;g.length;)if(e=g.shift(),"div"==e.getName()){k=new CKEDITOR.dom.documentFragment(d.document);!f||!e.getPrevious()||e.getPrevious().type==CKEDITOR.NODE_ELEMENT&& 642e.getPrevious().isBlockBoundary()||k.append(d.document.createElement("br"));for(f=e.getNext()&&!(e.getNext().type==CKEDITOR.NODE_ELEMENT&&e.getNext().isBlockBoundary());e.getFirst();)e.getFirst().remove().appendTo(k);f&&k.append(d.document.createElement("br"));k.replace(e);f=!1}}b.selectBookmarks(m);d.focus()}},refresh:function(d,g){this.setState(d.elementPath(g.block||g.blockLimit).contains("blockquote",1)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)},context:"blockquote",allowedContent:"blockquote", 643requiredContent:"blockquote"};CKEDITOR.plugins.add("blockquote",{init:function(h){h.blockless||(h.addCommand("blockquote",d),h.ui.addButton&&h.ui.addButton("Blockquote",{label:h.lang.blockquote.toolbar,command:"blockquote",toolbar:"blocks,10"}))}})})();"use strict";(function(){function d(d,b){CKEDITOR.tools.extend(this,b,{editor:d,id:"cke-"+CKEDITOR.tools.getUniqueId(),area:d._.notificationArea});
vendor: 14,091 bytes, lines 643-670
643b.type||(this.type="info");this.element=this._createElement();d.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)} 644function h(d){var b=this;this.editor=d;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);d.on("destroy",function(){b._removeListeners();b.element.remove()})}CKEDITOR.plugins.add("notification",{init:function(d){function b(b){var d=new CKEDITOR.dom.element("div");d.setStyles({position:"fixed","margin-left":"-9999px"});d.setAttributes({"aria-live":"assertive", 645"aria-atomic":"true"});d.setText(b);CKEDITOR.document.getBody().append(d);setTimeout(function(){d.remove()},100)}d._.notificationArea=new h(d);d.showNotification=function(b,h,l){var k,c;"progress"==h?k=l:c=l;b=new CKEDITOR.plugins.notification(d,{message:b,type:h,progress:k,duration:c});b.show();return b};d.on("key",function(f){if(27==f.data.keyCode){var h=d._.notificationArea.notifications;h.length&&(b(d.lang.notification.closed),h[h.length-1].hide(),f.cancel())}})}});d.prototype={show:function(){!1!== 646this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(d){var b=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:d})&&(b=!1);var f=this.element,h=f.findOne(".cke_notification_message"),l=f.findOne(".cke_notification_progress"),k=d.type;f.removeAttribute("role");d.progress&&"progress"!=this.type&&(k="progress");k&&(f.removeClass(this._getClass()),f.removeAttribute("aria-label"),this.type=k,f.addClass(this._getClass()), 647f.setAttribute("aria-label",this.type),"progress"!=this.type||l?"progress"!=this.type&&l&&l.remove():(l=this._createProgressElement(),l.insertBefore(h)));void 0!==d.message&&(this.message=d.message,h.setHtml(this.message));void 0!==d.progress&&(this.progress=d.progress,l&&l.setStyle("width",this._getPercentageProgress()));b&&d.important&&(f.setAttribute("role","alert"),this.isVisible()||this.area.add(this));this.duration=d.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide", 648{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var d=this,b,f,h=this.editor.lang.common.close;b=new CKEDITOR.dom.element("div");b.addClass("cke_notification");b.addClass(this._getClass());b.setAttributes({id:this.id,role:"alert","aria-label":this.type});"progress"==this.type&&b.append(this._createProgressElement());f=new CKEDITOR.dom.element("p");f.addClass("cke_notification_message");f.setHtml(this.message); 649b.append(f);f=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+h+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');b.append(f);f.on("click",function(){d.editor.focus();d.hide()});return b},_getClass:function(){return"progress"==this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var d=new CKEDITOR.dom.element("span");d.addClass("cke_notification_progress"); 650d.setStyle("width",this._getPercentageProgress());return d},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var d=this,b;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)b=this.duration;else if("info"==this.type||"success"==this.type)b="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;b&&(d._hideTimeoutId=setTimeout(function(){d.hide()},b))}};h.prototype= 651{add:function(d){this.notifications.push(d);this.element.append(d.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(d){var b=CKEDITOR.tools.indexOf(this.notifications,d);0>b||(this.notifications.splice(b,1),d.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var d=this.editor,b=d.config,f=new CKEDITOR.dom.element("div");f.addClass("cke_notifications_area"); 652f.setAttribute("id","cke_notifications_area_"+d.name);f.setStyle("z-index",b.baseFloatZIndex-2);return f},_attachListeners:function(){var d=CKEDITOR.document.getWindow(),b=this.editor;d.on("scroll",this._uiBuffer.input);d.on("resize",this._uiBuffer.input);b.on("change",this._changeBuffer.input);b.on("floatingSpaceLayout",this._layout,this,null,20);b.on("blur",this._layout,this,null,20)},_removeListeners:function(){var d=CKEDITOR.document.getWindow(),b=this.editor;d.removeListener("scroll",this._uiBuffer.input); 653d.removeListener("resize",this._uiBuffer.input);b.removeListener("change",this._changeBuffer.input);b.removeListener("floatingSpaceLayout",this._layout);b.removeListener("blur",this._layout)},_layout:function(){function d(){b.setStyle("left",x(p+h.width-n-w))}var b=this.element,f=this.editor,h=f.ui.contentsElement.getClientRect(),l=f.ui.contentsElement.getDocumentPosition(),k,c,e=b.getClientRect(),a,n=this._notificationWidth,w=this._notificationMargin;a=CKEDITOR.document.getWindow();var y=a.getScrollPosition(), 654r=a.getViewPaneSize(),t=CKEDITOR.document.getBody(),u=t.getDocumentPosition(),x=CKEDITOR.tools.cssLength;n&&w||(a=this.element.getChild(0),n=this._notificationWidth=a.getClientRect().width,w=this._notificationMargin=parseInt(a.getComputedStyle("margin-left"),10)+parseInt(a.getComputedStyle("margin-right"),10));f.toolbar&&(k=f.ui.space(f.config.toolbarLocation),c=k.getClientRect());k&&k.isVisible()&&c.bottom>h.top&&c.bottom<h.bottom-e.height?b.setStyles({position:"fixed",top:x(c.bottom)}):0<h.top? 655b.setStyles({position:"absolute",top:x(l.y)}):l.y+h.height-e.height>y.y?b.setStyles({position:"fixed",top:0}):b.setStyles({position:"absolute",top:x(l.y+h.height-e.height)});var p="fixed"==b.getStyle("position")?h.left:"static"!=t.getComputedStyle("position")?l.x-u.x:l.x;h.width<n+w?l.x+n+w>y.x+r.width?d():b.setStyle("left",x(p)):l.x+n+w>y.x+r.width?b.setStyle("left",x(p)):l.x+h.width/2+n/2+w>y.x+r.width?b.setStyle("left",x(p-l.x+y.x+r.width-n-w)):0>h.left+h.width-n-w?d():0>h.left+h.width/2-n/2?b.setStyle("left", 656x(p-l.x+y.x)):b.setStyle("left",x(p+h.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=d})();(function(){var d='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&& 657CKEDITOR.env.mac&&(d+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(d+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var d=d+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ 658'\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",d);CKEDITOR.plugins.add("button",{beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_BUTTON, 659CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(b){CKEDITOR.tools.extend(this,b,{title:b.label,click:b.click||function(d){d.execCommand(b.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(b){return new CKEDITOR.ui.button(b)}};CKEDITOR.ui.button.prototype={render:function(f,d){function h(){var a=f.mode;a&&(a=this.modes[a]?void 0!==k[a]?k[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=f.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED: 660a,this.setState(a),this.refresh&&this.refresh())}var k=null,c=CKEDITOR.env,e=this._.id=CKEDITOR.tools.getNextId(),a="",n=this.command,w,y,r;this._.editor=f;var t={id:e,button:this,editor:f,focus:function(){CKEDITOR.document.getById(e).focus()},execute:function(){this.button.click(f)},attach:function(a){this.button.attach(a)}},u=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t,a.getKeystroke())}),x=CKEDITOR.tools.addFunction(function(a){var b;t.onfocus&& 661(b=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return b}),p=0;t.clickFn=w=CKEDITOR.tools.addFunction(function(){p&&(f.unlockSelection(1),p=0);t.execute();c.iOS&&f.focus()});this.modes?(k={},f.on("beforeModeUnload",function(){f.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(k[f.mode]=this._.state)},this),f.on("activeFilterChange",h,this),f.on("mode",h,this),!this.readOnly&&f.on("readOnly",h,this)):n&&(n=f.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),a+=n.state==CKEDITOR.TRISTATE_ON? 662"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var z;if(this.directional)f.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),c=b.getFirst();a=a.data;a!=f.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(z,"rtl"==a,this.icon,this.iconOffset))},this);n?(y=f.getCommandKeystroke(n))&&(r=CKEDITOR.tools.keystrokeToString(f.lang.common.keyboard,y)):a+="off";y=this.name||this.command;var v= 663null,q=this.icon;z=y;this.icon&&!/\./.test(this.icon)?(z=this.icon,q=null):(this.icon&&(v=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(v=this.iconHiDpi));v?(CKEDITOR.skin.addIcon(v,v),q=null):v=z;a={id:e,name:y,iconName:z,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:a,ariaDisabled:"disabled"==a?"true":"false",title:this.title+(r?" ("+r.display+")":""),ariaShortcut:r?f.lang.common.keyboardShortcut+" "+r.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title|| 664"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:u,focusFn:x,clickFn:w,style:CKEDITOR.skin.getIconStyle(v,"rtl"==f.lang.dir,q,this.iconOffset),arrowHtml:this.hasArrow?g.output():""};b.output(a,d);if(this.onRender)this.onRender();return t},setState:function(b){if(this._.state==b)return!1;this._.state=b;var d=CKEDITOR.document.getById(this._.id);return d?(d.setState(b,"cke_button"),d.setAttribute("aria-disabled",b==CKEDITOR.TRISTATE_DISABLED), 665this.hasArrow?d.setAttribute("aria-expanded",b==CKEDITOR.TRISTATE_ON):b===CKEDITOR.TRISTATE_ON?d.setAttribute("aria-pressed",!0):d.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(b){if(this._.feature)return this._.feature;var d=this;this.allowedContent||this.requiredContent||!this.command||(d=b.getCommand(this.command)||d);return this._.feature=d}};CKEDITOR.ui.prototype.addButton=function(b,d){this.add(b,CKEDITOR.UI_BUTTON,d)}})();(function(){function d(b){function d(){for(var a= 666g(),c=CKEDITOR.tools.clone(b.config.toolbarGroups)||h(b),e=0;e<c.length;e++){var m=c[e];if("/"!=m){"string"==typeof m&&(m=c[e]={name:m});var t,u=m.groups;if(u)for(var x=0;x<u.length;x++)t=u[x],(t=a[t])&&k(m,t);(t=a[m.name])&&k(m,t)}}return c}function g(){var a={},c,e,d;for(c in b.ui.items)e=b.ui.items[c],d=e.toolbar||"others",d=d.split(","),e=d[0],d=parseInt(d[1]||-1,10),a[e]||(a[e]=[]),a[e].push({name:c,order:d});for(e in a)a[e]=a[e].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order? 6671:a.order<b.order?-1:1});return a}function k(a,c){if(c.length){a.items?a.items.push(b.ui.create("-")):a.items=[];for(var d;d=c.shift();)d="string"==typeof d?d:d.name,e&&-1!=CKEDITOR.tools.indexOf(e,d)||(d=b.ui.create(d))&&b.addFeature(d)&&a.items.push(d)}}function c(a){var b=[],c,e,d;for(c=0;c<a.length;++c)e=a[c],d={},"/"==e?b.push(e):CKEDITOR.tools.isArray(e)?(k(d,CKEDITOR.tools.clone(e)),b.push(d)):e.items&&(k(d,CKEDITOR.tools.clone(e.items)),d.name=e.name,b.push(d));return b}var e=b.config.removeButtons, 668e=e&&e.split(","),a=b.config.toolbar;"string"==typeof a&&(a=b.config["toolbar_"+a]);return b.toolbar=a?c(a):d()}function h(b){return b._.toolbarGroups||(b._.toolbarGroups=[{name:"document",groups:["mode","document","doctools"]},{name:"clipboard",groups:["clipboard","undo"]},{name:"editing",groups:["find","selection","spellchecker"]},{name:"forms"},"/",{name:"basicstyles",groups:["basicstyles","cleanup"]},{name:"paragraph",groups:["list","indent","blocks","align","bidi"]},{name:"links"},{name:"insert"}, 669"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var g=function(){this.toolbars=[];this.focusCommandExecuted=!1};g.prototype.focus=function(){for(var b=0,d;d=this.toolbars[b++];)for(var g=0,k;k=d.items[g++];)if(k.focus){k.focus();return}};var b={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(b){b.toolbox&&(b.toolbox.focusCommandExecuted=!0,CKEDITOR.env.ie||CKEDITOR.env.air?setTimeout(function(){b.toolbox.focus()},100):b.toolbox.focus())}};CKEDITOR.plugins.add("toolbar", 670{requires:"button",init:function(f){var h,l=function(b,c){var e,a="rtl"==f.lang.dir,d=f.config.toolbarGroupCycling,g=a?37:39,a=a?39:37,d=void 0===d||d;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!e||!e.items.length;)if(e=9==c?(e?e.next:b.toolbar.next)||f.toolbox.toolbars[0]:(e?e.previous:b.toolbar.previous)||f.toolbox.toolbars[f.toolbox.toolbars.length-1],e.items.length)for(b=e.items[h?e.items.length-1:0];b&&!b.focus;)(b=h?b.previous:b.next)||(e=0);
vendor: 4,113 bytes, lines 670-678
670b&&b.focus();return!1;case g:e=b;do e=e.next,!e&& 671d&&(e=b.toolbar.items[0]);while(e&&!e.focus);e?e.focus():l(b,9);return!1;case 40:return b.button&&b.button.hasArrow?b.execute():l(b,40==c?g:a),!1;case a:case 38:e=b;do e=e.previous,!e&&d&&(e=b.toolbar.items[b.toolbar.items.length-1]);while(e&&!e.focus);e?e.focus():(h=1,l(b,CKEDITOR.SHIFT+9),h=0);return!1;case 27:return f.focus(),!1;case 13:case 32:return b.execute(),!1}return!0};f.on("uiSpace",function(b){if(b.data.space==f.config.toolbarLocation){b.removeListener();f.toolbox=new g;var c=CKEDITOR.tools.getNextId(), 672e=['\x3cspan id\x3d"',c,'" class\x3d"cke_voice_label"\x3e',f.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+f.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',c,'" onmousedown\x3d"return false;"\x3e'],c=!1!==f.config.toolbarStartupExpanded,a,h;f.config.toolbarCanCollapse&&f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&e.push('\x3cspan class\x3d"cke_toolbox_main"'+(c?"\x3e":' style\x3d"display:none"\x3e'));for(var m=f.toolbox.toolbars,y=d(f),r=y.length, 673t=0;t<r;t++){var u,x=0,p,z=y[t],v="/"!==z&&("/"===y[t+1]||t==r-1),q;if(z)if(a&&(e.push("\x3c/span\x3e"),h=a=0),"/"===z)e.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{q=z.items||z;for(var A=0;A<q.length;A++){var B=q[A],C;if(B){var G=function(a){a=a.render(f,e);F=x.items.push(a)-1;0<F&&(a.previous=x.items[F-1],a.previous.next=a);a.toolbar=x;a.onkey=l;a.onfocus=function(){f.toolbox.focusCommandExecuted||f.focus()}};if(B.type==CKEDITOR.UI_SEPARATOR)h=a&&B;else{C=!1!==B.canGroup; 674if(!x){u=CKEDITOR.tools.getNextId();x={id:u,items:[]};p=z.name&&(f.lang.toolbar.toolbarGroups[z.name]||z.name);e.push('\x3cspan id\x3d"',u,'" class\x3d"cke_toolbar'+(v?' cke_toolbar_last"':'"'),p?' aria-labelledby\x3d"'+u+'_label"':"",' role\x3d"toolbar"\x3e');p&&e.push('\x3cspan id\x3d"',u,'_label" class\x3d"cke_voice_label"\x3e',p,"\x3c/span\x3e");e.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var F=m.push(x)-1;0<F&&(x.previous=m[F-1],x.previous.next=x)}C?a||(e.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'), 675a=1):a&&(e.push("\x3c/span\x3e"),a=0);h&&(G(h),h=0);G(B)}}}a&&(e.push("\x3c/span\x3e"),h=a=0);x&&e.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}f.config.toolbarCanCollapse&&e.push("\x3c/span\x3e");if(f.config.toolbarCanCollapse&&f.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var J=CKEDITOR.tools.addFunction(function(){f.execCommand("toolbarCollapse")});f.on("destroy",function(){CKEDITOR.tools.removeFunction(J)});f.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b= 676a.ui.space("toolbar_collapser"),c=b.getPrevious(),e=a.ui.space("contents"),d=c.getParent(),f=parseInt(e.$.style.height,10),g=d.$.offsetHeight,k=b.hasClass("cke_toolbox_collapser_min");k?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(k?"\u25b2":"\u25c0");e.setStyle("height",f-(d.$.offsetHeight-g)+"px");a.fire("resize", 677{outerHeight:a.container.$.offsetHeight,contentsHeight:e.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});f.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");e.push('\x3ca title\x3d"'+(c?f.lang.toolbar.toolbarCollapse:f.lang.toolbar.toolbarExpand)+'" id\x3d"'+f.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');c||e.push(" cke_toolbox_collapser_min");e.push('" onclick\x3d"CKEDITOR.tools.callFunction('+ 678J+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e',"\x3c/a\x3e")}e.push("\x3c/span\x3e");b.data.html+=e.join("")}});f.on("destroy",function(){if(this.toolbox){var b,c=0,e,a,d;for(b=this.toolbox.toolbars;c<b.length;c++)for(a=b[c].items,e=0;e<a.length;e++)d=a[e],d.clickFn&&CKEDITOR.tools.removeFunction(d.clickFn),d.keyDownFn&&CKEDITOR.tools.removeFunction(d.keyDownFn)}});f.on("uiReady",function(){var b=f.ui.space("toolbox");
vendor: 25,479 bytes, lines 678-728
678b&&f.focusManager.add(b,1)});f.addCommand("toolbarFocus", 679b);f.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");f.ui.add("-",CKEDITOR.UI_SEPARATOR,{});f.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(b,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(b,d,g){var k=h(this.editor),c=0===d,e={name:b};if(g){if(g=CKEDITOR.tools.search(k,function(a){return a.name==g})){!g.groups&&(g.groups=[]);if(d&&(d=CKEDITOR.tools.indexOf(g.groups, 680d),0<=d)){g.groups.splice(d+1,0,b);return}c?g.groups.splice(0,0,b):g.groups.push(b);return}d=null}d&&(d=CKEDITOR.tools.indexOf(k,function(a){return a.name==d}));c?k.splice(0,0,b):"number"==typeof d?k.splice(d+1,0,e):k.push(b)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";"use strict";(function(){function d(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&& 681"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()});return a.fire("paste",b)}function h(a){function b(){var c=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var e=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||C.initPasteDataTransfer(b,a),b.data.preventDefault())};c.on("copy",e);c.on("cut",e);c.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}c.on(C.mainPasteEvent,function(a){"beforepaste"==C.mainPasteEvent&& 682G||q(a)});"beforepaste"==C.mainPasteEvent&&(c.on("paste",function(a){F||(f(),a.data.preventDefault(),q(a),k("paste"))}),c.on("contextmenu",g,null,null,0),c.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||g()},null,null,0));c.on("beforecut",function(){!G&&h(a)});var d;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){d=setTimeout(A,0)});a.on("destroy",function(){clearTimeout(d)});c.on("keyup",A)}function c(b){return{type:b,canUndo:"cut"== 683b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+67,exec:function(){"cut"==this.type&&h();var b;var c=this.type;if(CKEDITOR.env.ie)b=k(c);else try{b=a.document.$.execCommand(c,!1,null)}catch(e){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function e(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function c(b,g){g="undefined"!==typeof g?g:!0;b?(b.method="paste",b.dataTransfer||(b.dataTransfer=C.initPasteDataTransfer()), 684d(a,b,g)):f&&!a._.forcePasteDialog&&a.showNotification(h,"info",a.config.clipboard_notificationDuration);a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:e,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var e=this,f="undefined"!==typeof b.notification?b.notification:!0,g=b.type,k=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),h="string"===typeof f?f:a.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+k.aria+ 685'"\x3e'+k.display+"\x3c/kbd\x3e"),k="string"===typeof b?b:b.dataValue;g&&!0!==a.config.forcePasteAsPlainText&&"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=g:delete a._.nextPasteType;"string"===typeof k?c({dataValue:k}):a.getClipboardData(c)}}}function f(){F=1;setTimeout(function(){F=0},100)}function g(){G=1;setTimeout(function(){G=0},10)}function k(b){var c=a.document,e=c.getBody(),d=!1,f=function(){d=!0};e.on(b,f);7<CKEDITOR.env.version?c.$.execCommand(b):c.$.selection.createRange().execCommand(b); 686e.removeListener(b,f);return d}function h(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b=a.getSelection(),c,e,d;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())&&(e=b.getRanges()[0],d=a.document.createText(""),d.insertBefore(c),e.setStartBefore(d),e.setEndAfter(c),b.selectRanges([e]),setTimeout(function(){c.getParent()&&(d.remove(),b.selectElement(c))},0))}}function l(b,c){var e=a.document,d=a.editable(),f=function(a){a.cancel()},g;if(!e.getById("cke_pastebin")){var k=a.getSelection(), 687h=k.createBookmarks();CKEDITOR.env.ie&&k.root.fire("selectionchange");var n=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&&!d.is("body")||CKEDITOR.env.ie?"div":"body",e);n.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var p=0,e=e.getWindow();CKEDITOR.env.webkit?(d.append(n),n.addClass("cke_editable"),d.is("body")||(p="static"!=d.getComputedStyle("position")?d:CKEDITOR.dom.element.get(d.$.offsetParent),p=p.getDocumentPosition().y)):d.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(n); 688n.setStyles({position:"absolute",top:e.getScrollPosition().y-p+10+"px",width:"1px",height:Math.max(1,e.getViewPaneSize().height-20)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&n.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(p=n.getParent().isReadOnly())?(n.setOpacity(0),n.setAttribute("contenteditable",!0)):n.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",f,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)g= 689d.once("blur",f,null,null,-100);p&&n.focus();p=new CKEDITOR.dom.range(n);p.selectNodeContents(n);var q=p.select();CKEDITOR.env.ie&&(g=d.once("blur",function(){a.lockSelection(q)}));var m=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=m);g&&g.removeListener();CKEDITOR.env.ie&&d.focus();k.selectBookmarks(h);n.remove();var b;CKEDITOR.env.webkit&&(b=n.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&(n=b);a.removeListener("selectionChange", 690f);c(n.getHtml())},0)}}function m(){if("paste"==C.mainPasteEvent)return a.fire("beforePaste",{type:"auto",method:"paste"}),!1;a.focus();f();var b=a.focusManager;b.lock();if(a.editable().fire(C.mainPasteEvent)&&!k("paste"))return b.unlock(),!1;b.unlock();return!0}function v(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();f();"paste"==C.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot"), 691setTimeout(function(){a.fire("saveSnapshot")},50)}}function q(b){var c={type:"auto",method:"paste",dataTransfer:C.initPasteDataTransfer(b)};c.dataTransfer.cacheData();var e=!1!==a.fire("beforePaste",c);e&&C.canClipboardApiBeTrusted(c.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){d(a,c)},0)):l(b,function(b){c.dataValue=b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&d(a,c)})}function A(){if("wysiwyg"==a.mode){var b=B("paste");a.getCommand("cut").setState(B("cut"));a.getCommand("copy").setState(B("copy")); 692a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function B(b){var c=a.getSelection(),c=c&&c.getRanges()[0];if((a.readOnly||c&&c.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var C=CKEDITOR.plugins.clipboard,G=0,F=0;(function(){a.on("key",v);a.on("contentDom",b);a.on("selectionChange", 693A);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:B("cut"),copy:B("copy"),paste:B("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=CKEDITOR.document.getById(b._.id))b.on("touchend", 694function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,e,d,f,g){var k=a.lang.clipboard[e];a.addCommand(e,d);a.ui.addButton&&a.ui.addButton(c,{label:k,command:e,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(e,{label:k,command:e,group:"clipboard",order:g})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",e(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,c){function e(a){a.removeListener(); 695a.cancel();c(a.data)}function d(a){a.removeListener();a.cancel();c({type:g,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,g="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();f=!0;g=a.data.type},null,null,1E3);a.on("paste",e,null,null,0);!1===m()&&(a.removeListener("paste",e),a._.forcePasteDialog&&f&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",d),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit", 696d);a.data._.committed||c(null)})):c(null))}}function g(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(<div><br( ?\/)?><\/div>|<div>[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi)&&!a.match(/^(<p>([^<]|<br( ?\/)?>)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|<br( ?\/)?>)*$/gi))return"html"}else return"html";return"htmlifiedtext"}function b(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e", 697~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g, 698function(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 f(a){function b(){var a={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!= 699c&&(a[c]=1);return a}var c={};return{get:function(e){return"plain-text"==e?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==e?((e=c.semanticContent)||(e=new CKEDITOR.filter(a,{}),e.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),e=c.semanticContent=e),e):e?new CKEDITOR.filter(a,e):null}}}function m(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var e=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(e);return e.getHtml()} 700function 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 k(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function c(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,e,f){e.select();d(a,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot"); 701f.sourceEditor.editable().extractHtmlFromRange(b);f.sourceEditor.getSelection().selectRanges([b]);f.sourceEditor.fire("saveSnapshot")}function e(c,f){c.select();d(a,{dataTransfer:f,method:"drop"},1);b.resetDragDataTransfer()}function f(b,c,e){var d={$:b.data.$,target:b.data.getTarget()};c&&(d.dragRange=c);e&&(d.dropRange=e);!1===a.fire(b.name,d)&&b.data.preventDefault()}function g(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=a.editable(),h=CKEDITOR.plugins.clipboard.getDropTarget(a), 702l=a.ui.space("top"),m=a.ui.space("bottom");b.preventDefaultDropOnElement(l);b.preventDefaultDropOnElement(m);k.attachListener(h,"dragstart",f);k.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);k.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);k.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=c?g(c.startContainer):null,b.dragEndContainerChildCount= 703c?g(c.endContainer):null)},null,null,100);k.attachListener(h,"dragend",f);k.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);k.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);k.attachListener(h,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}}); 704k.attachListener(h,"drop",function(c){if(!c.data.$.defaultPrevented&&(c.data.preventDefault(),!a.readOnly)){var e=c.data.getTarget();if(!e.isReadOnly()||e.type==CKEDITOR.NODE_ELEMENT&&e.is("html")){var e=b.getRangeAtDropPosition(c,a),d=b.dragRange;e&&f(c,d,e)}}},null,null,9999);k.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);k.attachListener(a,"drop",function(d){if(d=d.data){var f=d.dropRange,g=d.dragRange,k=d.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){b.internalDrop(g, 705f,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(g,f,k):e(f,k)}},null,null,9999)})}var e;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){function e(a){if(!a||t===a.id)return!1;var b=a.getTypes(),b=1===b.length&&"Files"===b[0];a=1===a.getFilesCount();return b&&a}var d,k=f(a);a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content"); 706a.pasteFilter=k.get(d);h(a);c(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var l=["image/png","image/jpeg","image/gif"],t;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&e(d)&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(l,d.type))){var f=new FileReader;f.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+f.result+'" /\x3e';a.fire("paste",b.data)},!1);f.addEventListener("abort",function(){a.fire("paste", 707b.data)},!1);f.addEventListener("error",function(){a.fire("paste",b.data)},!1);f.readAsDataURL(d);t=c.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,e=c.getData("text/html");if(e)b.data.dataValue=e,b.data.type="html";else if(e=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(e),b.data.type="text"}},null,null,1);a.on("paste", 708function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space"> <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi, 709"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var e,d,f=new CKEDITOR.dom.element("div");for(f.setHtml(b);1==f.getChildCount()&&(e=f.getFirst())&&e.type==CKEDITOR.NODE_ELEMENT&&(e.hasClass("cke_editable")||e.hasClass("cke_contents"));)f=d=e;d&&(b=d.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,e){return e.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+e):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,e){return e in 710c?(a.data.endsWithEOL=1,"\x3c/"+e+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(c){c=c.data;var e=a._.nextPasteType||c.type,d=c.dataValue,f,h=a.config.clipboard_defaultContentType||"html",l=c.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;f="html"==e||"html"==c.preSniffing?"html":g(d);delete a._.nextPasteType;"htmlifiedtext"==f&&(d=b(a.config,d));if("text"==e&&"html"==f)d= 711m(a,d,k.get("plain-text"));else if(l&&a.pasteFilter&&!c.dontFilter||n)d=m(a,d,a.pasteFilter);c.startsWithEOL&&(d='\x3cbr data-cke-eol\x3d"1"\x3e'+d);c.endsWithEOL&&(d+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==e&&(e="html"==f||"html"==h?"html":"text");c.type=e;c.dataValue=d;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null, 7121E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9<CKEDITOR.env.version,mainPasteEvent:CKEDITOR.env.ie&&!CKEDITOR.env.edge?"beforepaste":"paste",addPasteButton:function(a,b,c){a.ui.addButton&&(a.ui.addButton(b, 713c),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL||CKEDITOR.env.chrome&&!a.isEmpty()||CKEDITOR.env.gecko&&(a.getData("text/html")||a.getFilesCount())||CKEDITOR.env.safari&&603<=CKEDITOR.env.version&&!CKEDITOR.env.iOS||CKEDITOR.env.iOS&&605<=CKEDITOR.env.version||CKEDITOR.env.edge&&16<=CKEDITOR.env.version?!0:!1},getDropTarget:function(a){var b=a.editable();return CKEDITOR.env.ie&& 7149>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,e){function d(a,c,e){var f=a;f.type==CKEDITOR.NODE_TEXT&&(f=a.getParent());if(f.equals(c)&&e!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(e=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,e),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof e&&"number"== 715typeof c&&f.type==CKEDITOR.NODE_ELEMENT&&(d(a.startContainer,f,c)||d(a.endContainer,f,e))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,e=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=e||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<e||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<e?!0:!1},internalDrop:function(a,b,c,e){var f=CKEDITOR.plugins.clipboard,g=e.editable(),k,h;e.fire("saveSnapshot");e.fire("lockSnapshot",{dontUpdate:1}); 716CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(h=this.isDropRangeAffectedByDragRange(a,b))||(k=a.createBookmark(!1));f=b.clone().createBookmark(!1);h&&(k=a.createBookmark(!1));a=k.startNode;b=k.endNode;h=f.startNode;b&&a.getPosition(h)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(h)&CKEDITOR.POSITION_FOLLOWING&&h.insertBefore(a);a=e.createRange();a.moveToBookmark(k);g.extractHtmlFromRange(a,1);b=e.createRange(); 717f.startNode.getCommonAncestor(g)||(f=e.getSelection().createBookmarks()[0]);b.moveToBookmark(f);d(e,{dataTransfer:c,method:"drop",range:b},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,e=c.clientX,d=c.clientY,f=b.getSelection(!0).getRanges()[0],g=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(e,d))c=b.document.$.caretRangeFromPoint(e,d),g.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset), 718g.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&&f&&b.editable().hasFocus)return f;if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var k=!1,h=0;20>h&&!k;h++){if(!k)try{c.moveToPoint(e,d-h),k=!0}catch(l){}if(!k)try{c.moveToPoint(e,d+h),k=!0}catch(m){}}if(k){var q="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+q+'"\x3e\u200b\x3c/span\x3e'); 719var A=b.document.getById(q);g.moveToPosition(A,CKEDITOR.POSITION_BEFORE_START);A.remove()}else{var B=b.document.$.elementFromPoint(e,d),C=new CKEDITOR.dom.element(B),G;if(C.equals(b.editable())||"html"==C.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;G=C.getClientRect();e<G.left?g.setStartAt(C,CKEDITOR.POSITION_AFTER_START):g.setStartAt(C,CKEDITOR.POSITION_BEFORE_END);g.collapse(!0)}}catch(F){return null}}else return null}return g},initDragDataTransfer:function(a, 720b){var c=a.data.$?a.data.$.dataTransfer:null,e=new this.dataTransfer(c,b);"dragstart"===a.name&&e.storeId();c?this.dragData&&e.id==this.dragData.id?e=this.dragData:this.dragData=e:this.dragData?e=this.dragData:this.dragData=e;a.data.dataTransfer=e},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var c=a.data.$.clipboardData,e=new this.dataTransfer(c,b);"copy"!==a.name&&"cut"!==a.name||e.storeId();this.copyCutData&& 721e.id==this.copyCutData.id?(e=this.copyCutData,e.$=c):this.copyCutData=e;return e}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&&a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",k)}};e=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^<meta.*?>/i,bodyRegExp:/<body(?:[\s\S]*?)>([\s\S]*)<\/body>/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g, 722data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(e);this.id||(this.id="Text"==e?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==e||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL= 7231;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(e){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"== 724c.substring(0,7)&&(c="");if("string"===typeof c)var d=c.indexOf("\x3c/html\x3e"),c=-1!==d?c.substring(0,d+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==e&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!== 725e&&this.setData(e,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(a){a=b._.normalizeType(a);var c=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a,!0),c=b._stripHtml(c));c&&(b._.data[a]=c)}if(this.$){var b=this,c,e;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"), 726a("URL");e=this._getImageFromClipboard();if(this.$&&this.$.files||e){this._.files=[];if(this.$.files&&this.$.files.length)for(c=0;c<this.$.files.length;c++)this._.files.push(this.$.files[c]);0===this._.files.length&&e&&this._.files.push(e)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length? 727this.$.files[a]:0===a?this._getImageFromClipboard():void 0},isEmpty:function(){var a={},b;if(this.getFilesCount())return!1;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(this._.data),function(b){a[b]=1});if(this.$)if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(var c=0;c<this.$.types.length;c++)a[this.$.types[c]]=1}else a.Text=1,a.URL=1;"Text"!=e&&(a[e]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},getTypes:function(){return this.$&&this.$.types? 728[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var a;try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}}
728,_stripHtml:function(a){if(a&&a.length){a=a.replace(this._.metaRegExp,"");var b=this._.bodyRegExp.exec(a);b&&b.length&&(a=b[1],a=a.replace(this._.fragmentRegExp,""))}return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported= 729null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$;if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1; 730return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),e=null,e=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==e?e:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var e=b,d=this._dataTransfer.$;try{d.setData(a,e),c&&(this._dataTransfer._.nativeHtmlCache=e)}catch(f){if(this._isUnsupportedMimeTypeError(f)){c= 731CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),g=this._getFallbackTypeData();g[a]=e;try{e=this._applyDataComment(c,g),d.setData(this._customDataFallbackType,e),this._dataTransfer._.nativeHtmlCache=e}catch(k){e=""}}}return e},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(e){return null}},_getFallbackTypeContent:function(){var a= 732this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content);return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&& 733-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&&16<a.length){var c;(c=/\x3c!--cke-data:(.*?)--\x3e/g.exec(a))&&c[1]&&(b.data=JSON.parse(decodeURIComponent(c[1])),b.content=a.replace(c[0],""))}return b},_applyDataComment:function(a,b){var c="";b&&CKEDITOR.tools.object.keys(b).length&&(c="\x3c!--cke-data:"+encodeURIComponent(JSON.stringify(b))+"--\x3e");return c+(a&&a.length?a:"")}}})();CKEDITOR.config.clipboard_notificationDuration= 7341E4;(function(){var d=!1;CKEDITOR.plugins.add("codemirror",{_createCodeMirrorEditor:function(d){var b=this;d.addMode("source",function(f){var m=d.ui.space("contents"),l=m.getDocument().createElement("textarea");m.append(l);b.codeMirrorEditor=CodeMirror.fromTextArea(l.$,{lineNumbers:!0,lineWrapping:!0,mode:"text/html"});m=d.getData(1);l=d.editable(new h(d,l));l.setData(m);b.codeMirrorEditor.setValue(m);l=l.getParent().getClientSize();l.height&&b.codeMirrorEditor.setSize(null,l.height);b.codeMirrorEditor.on("change", 735b._handleCodeMirrorChange.bind(b,d,m));d.on("resize",b._handleEditorResize.bind(b));d.on("dataReady",function(d){d=d.data;var c=b.codeMirrorEditor.getValue();d&&d!==c&&b.codeMirrorEditor.setValue(d)});d.fire("ariaWidget",this);f()})},_handleCodeMirrorChange:function(d,b){var f=this.codeMirrorEditor.getValue();f!==b&&d.setData(f)},_handleEditorResize:function(d){this.codeMirrorEditor.setSize(null,d.data.contentsHeight)},hidpi:!0,icons:"source,source-rtl",init:function(g){var b=this;g.plugins.detectConflict("codemirror", 736["sourcearea"])||g.elementMode===CKEDITOR.ELEMENT_MODE_INLINE||(d||(CKEDITOR.document.appendStyleSheet(this.path+"skins/default.css"),CKEDITOR.document.appendStyleSheet(this.path+"vendors/vendors.css"),d=!0),CKEDITOR.scriptLoader.load(this.path+"vendors/vendors.js",function(){b._createCodeMirrorEditor(g)}),g.addCommand("codemirror",CKEDITOR.plugins.codemirror.commands.source),g.addCommand("codemirrordialog",CKEDITOR.tools.extend(new CKEDITOR.dialogCommand("codemirrordialog"),{modes:{source:1,wysiwyg:0}, 737state:CKEDITOR.TRISTATE_OFF})),CKEDITOR.dialog.add("codemirrordialog",this.path+"dialogs/codemirrordialog.js"),g.ui.addButton&&(g.ui.addButton("Source",{label:g.lang.codemirror.source,command:"codemirror",toolbar:"mode,10"}),g.ui.addButton("Expand",{label:g.lang.common.preview,command:"codemirrordialog",toolbar:"mode,11"})),g.on("mode",function(){g.getCommand("codemirror").setState("source"===g.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)}))}});var h=CKEDITOR.tools.createClass({base:CKEDITOR.editable, 738proto:{setData:function(d){this.setValue(d);this.status="ready";this.editor.fire("dataReady",d)},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(d){this[(d?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){h.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})})();CKEDITOR.plugins.codemirror={commands:{source:{modes:{source:1,wysiwyg:1},editorFocus:!0,exec:function(d){"wysiwyg"=== 739d.mode&&d.fire("saveSnapshot");d.getCommand("codemirror").setState(CKEDITOR.TRISTATE_DISABLED);d.setMode("source"===d.mode?"wysiwyg":"source")},canUndo:!1}}};CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function d(d){var g=this._;g.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(d),g.on?g.panel.hide():g.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(h){var g=h.panel|| 740{};delete h.panel;this.base(h);this.document=g.parent&&g.parent.getDocument()||CKEDITOR.document;g.block={attributes:g.attributes};g.toolbarRelated=!0;this.hasArrow="listbox";this.click=d;this._={panelDefinition:g}},statics:{handler:{create:function(d){return new CKEDITOR.ui.panelButton(d)}}},proto:{createPanel:function(d){var g=this._;if(!g.panel){var b=this._.panelDefinition,f=this._.panelDefinition.block,m=b.parent||CKEDITOR.document.getBody(),l=this._.panel=new CKEDITOR.ui.floatPanel(d,m,b),b= 741l.addBlock(g.id,f),k=this,c=d.getCommand(this.command);l.onShow=function(){k.className&&this.element.addClass(k.className+"_panel");k.setState(CKEDITOR.TRISTATE_ON);g.on=1;k.editorFocus&&d.focus();if(k.onOpen)k.onOpen()};l.onHide=function(b){k.className&&this.element.getFirst().removeClass(k.className+"_panel");!k.modes&&c?k.setStateFromCommand(c):k.setState(k.modes&&k.modes[d.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g.on=0;if(!b&&k.onClose)k.onClose()};l.onEscape=function(){l.hide(1); 742k.document.getById(g.id).focus()};if(this.onBlock)this.onBlock(l,b);b.onHide=function(){g.on=0;!k.modes&&k.command?k.setStateFromCommand(c):k.setState(CKEDITOR.TRISTATE_OFF)}}},setStateFromCommand:function(d){this.setState(d.state)}}})},beforeInit:function(d){d.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}});CKEDITOR.UI_PANELBUTTON="panelbutton";(function(){CKEDITOR.plugins.add("panel",{beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}}); 743CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(b,d){d&&CKEDITOR.tools.extend(this,d);CKEDITOR.tools.extend(this,{className:"",css:[]});this.id=CKEDITOR.tools.getNextId();this.document=b;this.isFramed=this.forceIFrame||this.css.length;this._={blocks:{}}};CKEDITOR.ui.panel.handler={create:function(b){return new CKEDITOR.ui.panel(b)}};var d=CKEDITOR.addTemplate("panel",'\x3cdiv lang\x3d"{langCode}" id\x3d"{id}" dir\x3d{dir} class\x3d"cke cke_reset_all {editorId} cke_panel cke_panel {cls} cke_{dir}" style\x3d"z-index:{z-index}" role\x3d"presentation"\x3e{frame}\x3c/div\x3e'), 744h=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'),g=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e');CKEDITOR.ui.panel.prototype={render:function(b, 745f){var m={editorId:b.id,id:this.id,langCode:b.langCode,dir:b.lang.dir,cls:this.className,frame:"",env:CKEDITOR.env.cssClass,"z-index":b.config.baseFloatZIndex+1};this.getHolderElement=function(){var b=this._.holder;if(!b){if(this.isFramed){var b=this.document.getById(this.id+"_frame"),c=b.getParent(),b=b.getFrameDocument();CKEDITOR.env.iOS&&c.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});c=CKEDITOR.tools.addFunction(CKEDITOR.tools.bind(function(){this.isLoaded=!0;if(this.onLoad)this.onLoad()}, 746this));b.write(g.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+c+");"},m)));b.getWindow().$.CKEDITOR=CKEDITOR;
vendor: 6,132 bytes, lines 746-758
746b.on("keydown",function(b){var a=b.data.getKeystroke(),c=this.document.getById(this.id).getAttribute("dir");if("input"!==b.data.getTarget().getName()||37!==a&&39!==a)this._.onKeyDown&&!1===this._.onKeyDown(a)?"input"===b.data.getTarget().getName()&&32===a||b.data.preventDefault():(27==a||a==("rtl"==c?39:37))&& 747this.onEscape&&!1===this.onEscape(a)&&b.data.preventDefault()},this);b=b.getBody();b.unselectable();CKEDITOR.env.air&&CKEDITOR.tools.callFunction(c)}else b=this.document.getById(this.id);this._.holder=b}return b};if(this.isFramed){var l=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())":"";m.frame=h.output({id:this.id+"_frame",src:l})}l=d.output(m);f&& 748f.push(l);return l},addBlock:function(b,d){d=this._.blocks[b]=d instanceof CKEDITOR.ui.panel.block?d:new CKEDITOR.ui.panel.block(this.getHolderElement(),d);this._.currentBlock||this.showBlock(b);return d},getBlock:function(b){return this._.blocks[b]},showBlock:function(b){b=this._.blocks[b];var d=this._.currentBlock,g=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");d&&d.hide();this._.currentBlock=b;CKEDITOR.fire("ariaWidget",g);b._.focusIndex=-1;this._.onKeyDown= 749b.onKeyDown&&CKEDITOR.tools.bind(b.onKeyDown,b);b.show();return b},destroy:function(){this.element&&this.element.remove()}};CKEDITOR.ui.panel.block=CKEDITOR.tools.createClass({$:function(b,d){this.element=b.append(b.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));d&&CKEDITOR.tools.extend(this,d);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title|| 750this.attributes["aria-label"]});this.keys={};this._.focusIndex=-1;this.element.disableContextMenu()},_:{markItem:function(b){-1!=b&&(b=this._.getItems().getItem(this._.focusIndex=b),CKEDITOR.env.webkit&&b.getDocument().getWindow().focus(),b.focus(),this.onMark&&this.onMark(b))},markFirstDisplayed:function(b){for(var d=function(b){return b.type==CKEDITOR.NODE_ELEMENT&&"none"==b.getStyle("display")},g=this._.getItems(),h,k,c=g.count()-1;0<=c;c--)if(h=g.getItem(c),h.getAscendant(d)||(k=h,this._.focusIndex= 751c),"true"==h.getAttribute("aria-selected")){k=h;this._.focusIndex=c;break}k&&(b&&b(),CKEDITOR.env.webkit&&k.getDocument().getWindow().focus(),k.focus(),this.onMark&&this.onMark(k))},getItems:function(){return this.element.find("a,input")}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){this.onHide&&!0===this.onHide.call(this)||this.element.setStyle("display","none")},onKeyDown:function(b,d){var g=this.keys[b];switch(g){case "next":for(var h=this._.focusIndex,g=this._.getItems(), 752k;k=g.getItem(++h);)if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=h;k.focus(!0);break}return k||d?!1:(this._.focusIndex=-1,this.onKeyDown(b,1));case "prev":h=this._.focusIndex;for(g=this._.getItems();0<h&&(k=g.getItem(--h));){if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=h;k.focus(!0);break}k=null}return k||d?!1:(this._.focusIndex=g.count(),this.onKeyDown(b,1));case "click":case "mouseup":return h=this._.focusIndex,(k=0<=h&&this._.getItems().getItem(h))&& 753k.fireEventHandler(g,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})})();CKEDITOR.plugins.add("floatpanel",{requires:"panel"});(function(){function d(d,b,f,m,l){l=CKEDITOR.tools.genKey(b.getUniqueId(),f.getUniqueId(),d.lang.dir,d.uiColor||"",m.css||"",l||"");var k=h[l];k||(k=h[l]=new CKEDITOR.ui.panel(b,m),k.element=f.append(CKEDITOR.dom.element.createFromHtml(k.render(d),b)),k.element.setStyles({display:"none",position:"absolute"}));return k}var h={}; 754CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(g,b,f,h){function l(){a.hide()}f.forceIFrame=1;f.toolbarRelated&&g.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(b=CKEDITOR.document.getById("cke_"+g.name));var k=b.getDocument();h=d(g,k,b,f,h||0);var c=h.element,e=c.getFirst(),a=this;c.disableContextMenu();this.element=c;this._={editor:g,panel:h,parentElement:b,definition:f,document:k,iframe:e,children:[],dir:g.lang.dir,showBlockParams:null,markFirst:void 0!==f.markFirst?f.markFirst:!0}; 755g.on("mode",l);g.on("resize",l);k.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(d,b){return this._.panel.addBlock(d,b)},addListBlock:function(d,b){return this._.panel.addListBlock(d,b)},getBlock:function(d){return this._.panel.getBlock(d)},showBlock:function(d,b,f,h,l,k){var c=this._.panel,e=c.showBlock(d);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement); 756this._.hideTimeout=0;var n=this.element,a=this._.iframe,a=CKEDITOR.env.ie&&!CKEDITOR.env.edge?a:new CKEDITOR.dom.window(a.$.contentWindow),w=n.getDocument(),y=this._.parentElement.getPositionedAncestor(),r=b.getDocumentPosition(w),w=y?y.getDocumentPosition(w):{x:0,y:0},t="rtl"==this._.dir,u=r.x+(h||0)-w.x,x=r.y+(l||0)-w.y;!t||1!=f&&4!=f?t||2!=f&&3!=f||(u+=b.$.offsetWidth-1):u+=b.$.offsetWidth;if(3==f||4==f)x+=b.$.offsetHeight-1;this._.panel._.offsetParentId=b.getId();n.setStyles({top:x+"px",left:0, 757display:""});n.setOpacity(0);n.getFirst().removeStyle("width");this._.editor.focusManager.add(a);this._.blurSet||(CKEDITOR.event.useCapture=!0,a.on("blur",function(a){function b(){delete this._.returnFocus;this.hide()}this.allowBlur()&&a.data.getPhase()==CKEDITOR.EVENT_PHASE_AT_TARGET&&this.visible&&!this._.activeChild&&(CKEDITOR.env.iOS?this._.hideTimeout||(this._.hideTimeout=CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),a.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)}, 758this),CKEDITOR.env.iOS&&(a.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),a.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);
vendor: 4,094 bytes, lines 758-766
758c.onEscape=CKEDITOR.tools.bind(function(a){if(this.onEscape&&!1===this.onEscape(a))return!1},this);CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.tools.bind(function(){var a=n;a.removeStyle("width");if(e.autoSize){var b=e.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge? 759e.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=e.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");c._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");t&&(u-=n.$.offsetWidth);n.setStyle("left",u+"px");var b=c.element.getWindow(),a=n.$.getBoundingClientRect(), 760b=b.getViewPaneSize(),d=a.width||a.right-a.left,f=a.height||a.bottom-a.top,g=t?a.right:b.width-a.left,h=t?b.width-a.right:a.left;t?g<d&&(u=h>d?u+d:b.width>d?u-a.left:u-a.right+b.width):g<d&&(u=h>d?u-d:b.width>d?u-a.right+b.width:u-a.left);d=a.top;b.height-a.top<f&&(x=d>f?x-f:b.height>f?x-a.bottom+b.height:x-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&& 761(u=CKEDITOR.env.ie8Compat?u-2*n.getDocument().getDocumentElement().$.scrollLeft:u-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:x+"px",left:u+"px"});n.setOpacity(1);k&&k()},this);c.isLoaded?a():c.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();e.element.focus();CKEDITOR.env.webkit&& 762(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){e.markFirstDisplayed?e.markFirstDisplayed():e._.markFirstDisplayed()},0):e.markFirstDisplayed?e.markFirstDisplayed():e._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var d=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(), 763this.showBlock.apply(this,d))},focus:function(){if(CKEDITOR.env.webkit){var d=CKEDITOR.document.getActive();d&&!d.equals(this._.iframe)&&d.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var d=this._.iframe.getFrameDocument().getActive();d&&d.is("a")&&(this._.lastFocused=d)},hide:function(d){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(); 764this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(d=d&&this._.returnFocus)CKEDITOR.env.webkit&&d.type&&d.getWindow().$.focus(),d.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(d){var b=this._.panel;void 0!==d&&(b.allowBlur=d);return b.allowBlur},showAsChild:function(d,b,f,h,l,k){if(this._.activeChild!=d||d._.panel._.offsetParentId!=f.getId())this.hideChild(),d.onHide= 765CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=d,this._.focused=!1,d.showBlock(b,f,h,l,k),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){d.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(d){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),d&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var d=CKEDITOR.tools.isEmpty(CKEDITOR.instances), 766b;for(b in h){var f=h[b];d?f.destroy():f.element.hide()}d&&(h={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(d){function h(a){var b=a.name,c=a.type,e=a.title,h=a.order,t
766=a.commandName;a=a.contentTransformations||{};var u=new CKEDITOR.style(l["colorButton_"+c+"Style"]),x=CKEDITOR.tools.getNextId()+"_colorBox",p={type:c},z=new CKEDITOR.style(l["colorButton_"+c+"Style"],{color:"inherit"}),v;d.addCommand(t,{contextSensitive:!0,exec:function(a,b){if(!a.readOnly){var c= 767b.newStyle;a.removeStyle(z);a.focus();c&&a.applyStyle(c);a.fire("saveSnapshot")}},refresh:function(a,b){z.checkApplicable(b,a,a.activeFilter)?z.checkActive(b,a)?this.setState(CKEDITOR.TRISTATE_ON):this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}});d.ui.add(b,CKEDITOR.UI_PANELBUTTON,{label:e,title:e,command:t,editorFocus:0,toolbar:"colors,"+h,allowedContent:u,requiredContent:u,contentTransformations:a,panel:{css:CKEDITOR.skin.getPath("editor"),attributes:{role:"listbox", 768"aria-label":k.panelTitle}},select:function(a){var b=l.colorButton_colors.split(",");a=CKEDITOR.tools.array.find(b,a);a=m(a);f(v,a);v._.markFirstDisplayed()},onBlock:function(a,b){v=b;b.autoSize=!0;b.element.addClass("cke_colorblock");b.element.setHtml(g({type:c,colorBoxId:x,colorData:p,commandName:t}));b.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var e=b.keys,f="rtl"==d.lang.dir;e[f?37:39]="next";e[40]="next";e[9]="next";e[f?39:37]="prev";e[38]="prev";
769e[CKEDITOR.SHIFT+9]="prev";e[32]="click"},onOpen:function(){var a=d.getSelection(),b=a&&a.getStartElement(),e=d.elementPath(b);if(!e)return null;b=e.block||e.blockLimit||d.document.getBody();do e=b&&b.getComputedStyle("back"==c?"background-color":"color")||"transparent";while("back"==c&&"transparent"==e&&b&&(b=b.getParent()));e&&"transparent"!=e||(e="#ffffff");!1!==l.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(x).setStyle("background-color",e);if(b=a&&a.getRanges()[0]){for(var a= 770new CKEDITOR.dom.walker(b),g=b.collapsed?b.startContainer:a.next(),b="";g;){g.type!==CKEDITOR.NODE_ELEMENT&&(g=g.getParent());g=m(g.getComputedStyle("back"==c?"background-color":"color"));b=b||g;if(b!==g){b="";break}g=a.next()}"transparent"==b&&(b="");"fore"==c&&(p.automaticTextColor="#"+m(e));p.selectionColor=b?"#"+b:"";f(v,b)}return e}})}function g(a){function c(a){a=a&&new CKEDITOR.style(v,{color:a});d.execCommand(h,{newStyle:a})}var e=a.type,f=a.colorBoxId,g=a.colorData,h=a.commandName;a=[];var m= 771l.colorButton_colors.split(","),x=l.colorButton_colorsPerRow||6,p=d.plugins.colordialog&&!1!==l.colorButton_enableMore,z=m.length+(p?2:1),v=d.config["colorButton_"+e+"Style"];v.childRule="back"==e?function(a){return b(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||b(a)};var q=CKEDITOR.tools.addFunction(function(a){d.focus();d.fire("saveSnapshot");"?"==a?d.getColorFromDialog(function(a){a&&c(a)},null,g):c(a&&"#"+a)});!1!==l.colorButton_enableAutomatic&&a.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"', 772k.auto,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',q,",null,'",e,"');return false;\" href\x3d\"javascript:void('",k.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',z,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+x+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',f,'"\x3e\x3c/span\x3e',k.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e"); 773a.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(f=0;f<m.length;f++){0===f%x&&a.push("\x3c/tr\x3e\x3ctr\x3e");var A=m[f].split("/"),B=A[0],C=A[1]||B;a.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',A[1]?B:d.lang.colorbutton.colors[C]||C,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',q,",'",C,"','",e,"'); return false;\" href\x3d\"javascript:void('",C,'\')" data-value\x3d"'+ 774C+'" role\x3d"option" aria-posinset\x3d"',f+2,'" aria-setsize\x3d"',z,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',C,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}p&&a.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+x+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',k.more,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',q,",'?','",e,"');return false;\" href\x3d\"javascript:void('", 775k.more,"')\"",' role\x3d"option" aria-posinset\x3d"',z,'" aria-setsize\x3d"',z,'"\x3e',k.more,"\x3c/a\x3e\x3c/td\x3e");a.push("\x3c/tr\x3e\x3c/table\x3e");return a.join("")}function b(a){return"false"==a.getAttribute("contentEditable")||a.getAttribute("data-nostyle")}function f(a,b){for(var c=a._.getItems(),e=0;e<c.count();e++){var d=c.getItem(e);d.removeAttribute("aria-selected");b&&b==m(d.getAttribute("data-value"))&&d.setAttribute("aria-selected",!0)}}function m(a){return CKEDITOR.tools.normalizeHex("#"+ 776CKEDITOR.tools.convertRgbToHex(a||"")).replace(/#/g,"")}var l=d.config,k=d.lang.colorbutton;if(!CKEDITOR.env.hc){h({name:"TextColor",type:"fore",commandName:"textColor",title:k.textColorTitle,order: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}}]]});
776var c,e=d.config.colorButton_normalizeBackground;if(void 0===e||e)c=[[{element:"span", 777left:function(a){var b=CKEDITOR.tools;if("span"!=a.name||!a.styles||!a.styles.background)return!1;a=b.style.parse.background(a.styles.background);return a.color&&1===b.object.keys(a).length},right:function(a){var b=(new CKEDITOR.style(d.config.colorButton_backStyle,{color:a.styles.background})).getDefinition();a.name=b.element;a.styles=b.styles;a.attributes=b.attributes||{};return a}}]];h({name:"BGColor",type:"back",commandName:"bgColor",title:k.bgColorTitle,order:20,contentTransformations:c})}}}); 778CKEDITOR.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("menu",{requires:"floatpanel",beforeInit:function(d){for(var h= 779d.config.menu_groups.split(","),g=d._.menuGroups={},b=d._.menuItems={},f=0;f<h.length;f++)g[h[f]]=f+1;d.addMenuGroup=function(b,d){g[b]=d||100};d.addMenuItem=function(d,f){g[f.group]&&(b[d]=new CKEDITOR.menuItem(this,d,f))};d.addMenuItems=function(b){for(var d in b)this.addMenuItem(d,b[d])};d.getMenuItem=function(d){return b[d]};d.removeMenuItem=function(d){delete b[d]}}});(function(){function d(b){b.sort(function(b,c){return b.group<c.group?-1:b.group>c.group?1:b.order<c.order?-1:b.order>c.order? 7801:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"',g="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&& 781(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+g+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e', 782b=CKEDITOR.addTemplate("menuItem",h),f=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(b,d){d=this._.definition=d||{};this.id=CKEDITOR.tools.getNextId();this.editor=b;this.items=[];this._.listeners=[];this._.level=d.level||1;var c=CKEDITOR.tools.extend({}, 783d.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),e=c.block.attributes=c.attributes||{};!e.role&&(e.role="menu");this._.panelDefinition=c},_:{onShow:function(){var b=this.editor.getSelection(),d=b&&b.getStartElement(),c=this.editor.elementPath(),e=this._.listeners;this.removeAll();for(var a=0;a<e.length;a++){var f=e[a](d,b,c);if(f)for(var g in f){var h=this.editor.getMenuItem(g);!h||h.command&&!this.editor.getCommand(h.command).state||(h.state=f[g],this.add(h))}}},onClick:function(b){this.hide(); 784if(b.onClick)b.onClick();else b.command&&this.editor.execCommand(b.command)},onEscape:function(b){var d=this.parent;d?d._.panel.hideChild(1):27==b&&this.hide(1);return!1},onHide:function(){this.onHide&&this.onHide()},showSubMenu:function(b){var d=this._.subMenu,c=this.items[b];if(c=c.getItems&&c.getItems()){d?d.removeAll():(d=this._.subMenu=new CKEDITOR.menu(this.editor,CKEDITOR.tools.extend({}
vendor: 1,163 bytes, lines 784-787
784,this._.definition,{level:this._.level+1},!0)),d.parent=this,d._.onClick=CKEDITOR.tools.bind(this._.onClick, 785this));for(var e in c){var a=this.editor.getMenuItem(e);a&&(a.state=c[e],d.add(a))}var f=this._.panel.getBlock(this.id).element.getDocument().getById(this.id+String(b));setTimeout(function(){d.show(f,2)},0)}else this._.panel.hideChild(1)}},proto:{add:function(b){b.order||(b.order=this.items.length);this.items.push(b)},removeAll:function(){this.items=[]},show:function(b,f,c,e){if(!this.parent&&(this._.onShow(),!this.items.length))return;f=f||("rtl"==this.editor.lang.dir?2:1);var a=this.items,g=this.editor, 786h=this._.panel,m=this._.element;if(!h){h=this._.panel=new CKEDITOR.ui.floatPanel(this.editor,CKEDITOR.document.getBody(),this._.panelDefinition,this._.level);h.onEscape=CKEDITOR.tools.bind(function(a){if(!1===this._.onEscape(a))return!1},this);h.onShow=function(){h._.panel.getHolderElement().getParent().addClass("cke").addClass("cke_reset_all")};h.onHide=CKEDITOR.tools.bind(function(){this._.onHide&&this._.onHide()},this);m=h.addBlock(this.id,this._.panelDefinition.block);m.autoSize=!0;var r=m.keys; 787r[40]="next";r[9]="next";r[38]="prev";
vendor: 4,478 bytes, lines 787-795
787r[CKEDITOR.SHIFT+9]="prev";r["rtl"==g.lang.dir?37:39]=CKEDITOR.env.ie?"mouseup":"click";r[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(r[13]="mouseup");m=this._.element=m.element;r=m.getDocument();r.getBody().setStyle("overflow","hidden");r.getElementsByTag("html").getItem(0).setStyle("overflow","hidden");this._.itemOverFn=CKEDITOR.tools.addFunction(function(a){clearTimeout(this._.showSubTimeout);this._.showSubTimeout=CKEDITOR.tools.setTimeout(this._.showSubMenu, 788g.config.menu_subMenuDelay||400,this,[a])},this);this._.itemOutFn=CKEDITOR.tools.addFunction(function(){clearTimeout(this._.showSubTimeout)},this);this._.itemClickFn=CKEDITOR.tools.addFunction(function(a){var b=this.items[a];if(b.state==CKEDITOR.TRISTATE_DISABLED)this.hide(1);else if(b.getItems)this._.showSubMenu(a);else this._.onClick(b)},this)}d(a);for(var r=g.elementPath(),r=['\x3cdiv class\x3d"cke_menu'+(r&&r.direction()!=g.lang.dir?" cke_mixed_dir_content":"")+'" role\x3d"presentation"\x3e'], 789t=a.length,u=t&&a[0].group,x=0;x<t;x++){var p=a[x];u!=p.group&&(r.push('\x3cdiv class\x3d"cke_menuseparator" role\x3d"separator"\x3e\x3c/div\x3e'),u=p.group);p.render(this,x,r)}r.push("\x3c/div\x3e");m.setHtml(r.join(""));CKEDITOR.ui.fire("ready",this);this.parent?this.parent._.panel.showAsChild(h,this.id,b,f,c,e):h.showBlock(this.id,b,f,c,e);g.fire("menuShow",[h])},addListener:function(b){this._.listeners.push(b)},hide:function(b){this._.onHide&&this._.onHide();this._.panel&&this._.panel.hide(b)}, 790findItemByCommandName:function(b){var d=CKEDITOR.tools.array.filter(this.items,function(c){return b===c.command});return d.length?(d=d[0],{item:d,element:this._.element.findOne("."+d.className)}):null}}});CKEDITOR.menuItem=CKEDITOR.tools.createClass({$:function(b,d,c){CKEDITOR.tools.extend(this,c,{order:0,className:"cke_menubutton__"+d});this.group=b._.menuGroups[this.group];this.editor=b;this.name=d},proto:{render:function(d,g,c){var e=d.id+String(g),a="undefined"==typeof this.state?CKEDITOR.TRISTATE_OFF: 791this.state,h="",w=this.editor,y,r,t=a==CKEDITOR.TRISTATE_ON?"on":a==CKEDITOR.TRISTATE_DISABLED?"disabled":"off";this.role in{menuitemcheckbox:1,menuitemradio:1}&&(h=' aria-checked\x3d"'+(a==CKEDITOR.TRISTATE_ON?"true":"false")+'"');var u=this.getItems,x="\x26#"+("rtl"==this.editor.lang.dir?"9668":"9658")+";",p=this.name;this.icon&&!/\./.test(this.icon)&&(p=this.icon);this.command&&(y=w.getCommand(this.command),(y=w.getCommandKeystroke(y))&&(r=CKEDITOR.tools.keystrokeToString(w.lang.common.keyboard, 792y)));y=CKEDITOR.tools.htmlEncodeAttr(this.label);d={id:e,name:this.name,iconName:p,label:this.label,attrLabel:y,cls:this.className||"",state:t,hasPopup:u?"true":"false",disabled:a==CKEDITOR.TRISTATE_DISABLED,title:y+(r?" ("+r.display+")":""),ariaShortcut:r?w.lang.common.keyboardShortcut+" "+r.aria:"",href:"javascript:void('"+(y||"").replace("'")+"')",hoverFn:d._.itemOverFn,moveOutFn:d._.itemOutFn,clickFn:d._.itemClickFn,index:g,iconStyle:CKEDITOR.skin.getIconStyle(p,"rtl"==this.editor.lang.dir,p== 793this.icon?null:this.icon,this.iconOffset),shortcutHtml:r?m.output({shortcut:r.display}):"",arrowHtml:u?f.output({label:x}):"",role:this.role?this.role:"menuitem",ariaChecked:h};b.output(d,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";CKEDITOR.plugins.add("contextmenu",{requires:"menu",onLoad:function(){CKEDITOR.plugins.contextMenu=CKEDITOR.tools.createClass({base:CKEDITOR.menu, 794$:function(d){this.base.call(this,d,{panel:{css:d.config.contextmenu_contentsCss,className:"cke_menu_panel",attributes:{"aria-label":d.lang.contextmenu.options}}})},proto:{addTarget:function(d,h){function g(){f=!1}var b,f;d.on("contextmenu",function(d){d=d.data;var g=CKEDITOR.env.webkit?b:CKEDITOR.env.mac?d.$.metaKey:d.$.ctrlKey;if(!h||!g)if(d.preventDefault(),!f){if(CKEDITOR.env.mac&&CKEDITOR.env.webkit){var g=this.editor,c=(new CKEDITOR.dom.elementPath(d.getTarget(),g.editable())).contains(function(a){return a.hasAttribute("contenteditable")}, 795!0);c&&"false"==c.getAttribute("contenteditable")&&g.getSelection().fake(c)}var c=d.getTarget().getDocument(),e=d.getTarget().getDocument().getDocumentElement(),g=!c.equals(CKEDITOR.document),c=c.getWindow().getScrollPosition(),a=g?d.$.clientX:d.$.pageX||c.x+d.$.clientX,m=g?d.$.clientY:d.$.pageY||c.y+d.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(e,null,a,m)}
795,CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var m=function(){b=0};d.on("keydown",function(d){b=CKEDITOR.env.mac? 796d.data.$.metaKey:d.data.$.ctrlKey});d.on("keyup",m);d.on("contextmenu",m)}CKEDITOR.env.gecko&&!CKEDITOR.env.mac&&(d.on("keydown",function(b){b.data.$.shiftKey&&121===b.data.$.keyCode&&(f=!0)},null,null,0),d.on("keyup",g),d.on("contextmenu",g))},open:function(d,h,g,b){!1!==this.editor.config.enableContextMenu&&this.editor.getSelection().getType()!==CKEDITOR.SELECTION_NONE&&(this.editor.focus(),d=d||CKEDITOR.document.getDocumentElement(),this.editor.selectionChange(1),this.show(d,h,g,b))}}})},beforeInit:function(d){var h= 797d.contextMenu=new CKEDITOR.plugins.contextMenu(d);d.on("contentDom",function(){h.addTarget(d.editable(),!1!==d.config.browserContextMenuOnCtrl)});d.addCommand("contextMenu",{exec:function(d){var b=0,f=0,h=d.getSelection().getRanges(),h=h[h.length-1].getClientRects(d.editable().isInline());if(h=h[h.length-1])b=h["rtl"===d.lang.dir?"left":"right"],f=h.bottom;d.contextMenu.open(d.document.getBody().getParent(),null,b,f)}});d.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");d.setKeystroke(CKEDITOR.CTRL+ 798CKEDITOR.SHIFT+121,"contextMenu")}});(function(){function d(b){var d=this.att;b=b&&b.hasAttribute(d)&&b.getAttribute(d)||"";void 0!==b&&this.setValue(b)}function h(){for(var b,d=0;d<arguments.length;d++)if(arguments[d]instanceof CKEDITOR.dom.element){b=arguments[d];break}if(b){var d=this.att,g=this.getValue();g?b.setAttribute(d,g):b.removeAttribute(d,g)}}var g={id:1,dir:1,classes:1,styles:1};CKEDITOR.plugins.add("dialogadvtab",{requires:"dialog",allowedContent:function(b){b||(b=g);var d=[];b.id&& 799d.push("id");b.dir&&d.push("dir");var h="";d.length&&(h+="["+d.join(",")+"]");b.classes&&(h+="(*)");b.styles&&(h+="{*}");return h},createAdvancedTab:function(b,f,m){f||(f=g);var l=b.lang.common,k={id:"advanced",label:l.advancedTab,title:l.advancedTab,elements:[{type:"vbox",padding:1,children:[]}]},c=[];if(f.id||f.dir)f.id&&c.push({id:"advId",att:"id",type:"text",requiredContent:m?m+"[id]":null,label:l.id,setup:d,commit:h}),f.dir&&c.push({id:"advLangDir",att:"dir",type:"select",requiredContent:m?m+ 800"[dir]":null,label:l.langDir,"default":"",style:"width:100%",items:[[l.notSet,""],[l.langDirLTR,"ltr"],[l.langDirRTL,"rtl"]],setup:d,commit:h}),k.elements[0].children.push({type:"hbox",widths:["50%","50%"],children:[].concat(c)});if(f.styles||f.classes)c=[],f.styles&&c.push({id:"advStyles",att:"style",type:"text",requiredContent:m?m+"{cke-xyz}":null,label:l.styles,"default":"",validate:CKEDITOR.dialog.validate.inlineStyle(l.invalidInlineStyle),onChange:function(){},getStyle:function(b,a){var c=this.getValue().match(new RegExp("(?:^|;)\\s*"+ 801b+"\\s*:\\s*([^;]*)","i"));return c?c[1]:a},updateStyle:function(c,a){var d=this.getValue(),f=b.document.createElement("span");f.setAttribute("style",d);f.setStyle(c,a);d=CKEDITOR.tools.normalizeCssText(f.getAttribute("style"));this.setValue(d,1)},setup:d,commit:h}),f.classes&&c.push({type:"hbox",widths:["45%","55%"],children:[{id:"advCSSClasses",att:"class",type:"text",requiredContent:m?m+"(cke-xyz)":null,label:l.cssClasses,"default":"",setup:d,commit:h}]}),k.elements[0].children.push({type:"hbox", 802widths:["50%","50%"],children:[].concat(c)});return k}})})();(function(){function d(b,a,c){c=b.config.forceEnterMode||c;if("wysiwyg"==b.mode){a||(a=b.activeEnterMode);var d=b.elementPath();d&&!d.isContextFor("p")&&(a=CKEDITOR.ENTER_BR,c=1);b.fire("saveSnapshot");a==CKEDITOR.ENTER_BR?l(b,a,null,c):k(b,a,null,c);b.fire("saveSnapshot")}}function h(b){b=b.getSelection().getRanges(!0);for(var a=b.length-1;0<a;a--)b[a].deleteContents();return b[0]}function g(b){var a=b.startContainer.getAscendant(function(a){return a.type== 803CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(b.root.equals(a))return b;a=new CKEDITOR.dom.range(a);a.moveToRange(b);return a}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){d(a)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){d(a,a.activeShiftEnterMode,1)}});
vendor: 5,785 bytes, lines 803-814
803b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var b=CKEDITOR.dom.walker.whitespaces(),f= 804CKEDITOR.dom.walker.bookmark(),m,l,k,c;CKEDITOR.plugins.enterkey={enterBlock:function(d,a,k,m){function y(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],x.lastElement.getName())||1!==x.lastElement.getChildCount())return!1;a=x.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length?!1:!0}if(k=k||h(d)){k=g(k);var r=k.document,t=k.checkStartOfBlock(),u=k.checkEndOfBlock(),x=d.elementPath(k.startContainer),p=x.block,z=a==CKEDITOR.ENTER_DIV? 805"div":"p",v;if(p&&t&&u){t=p.getParent();if(t.is("li")&&1<t.getChildCount()){r=new CKEDITOR.dom.element("li");v=d.createRange();r.insertAfter(t);p.remove();v.setStart(r,0);d.getSelection().selectRanges([v]);return}if(p.is("li")||p.getParent().is("li")){p.is("li")||(p=p.getParent(),t=p.getParent());v=t.getParent();k=!p.hasPrevious();var q=!p.hasNext();m=d.getSelection();var z=m.createBookmarks(),A=p.getDirection(1),u=p.getAttribute("class"),B=p.getAttribute("style"),C=v.getDirection(1)!=A;d=d.enterMode!= 806CKEDITOR.ENTER_BR||C||B||u;if(v.is("li"))k||q?(k&&q&&t.remove(),p[q?"insertAfter":"insertBefore"](v)):p.breakParent(v);else{if(d)if(x.block.is("li")?(v=r.createElement(a==CKEDITOR.ENTER_P?"p":"div"),C&&v.setAttribute("dir",A),B&&v.setAttribute("style",B),u&&v.setAttribute("class",u),p.moveChildren(v)):v=x.block,k||q)v[k?"insertBefore":"insertAfter"](t);else p.breakParent(t),v.insertAfter(t);else if(p.appendBogus(!0),k||q)for(;r=p[k?"getFirst":"getLast"]();)r[k?"insertBefore":"insertAfter"](t);else for(p.breakParent(t);r= 807p.getLast();)r.insertAfter(t);p.remove()}m.selectBookmarks(z);return}if(p&&p.getParent().is("blockquote")){p.breakParent(p.getParent());p.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||p.getPrevious().remove();p.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||p.getNext().remove();k.moveToElementEditStart(p);k.select();return}}else if(p&&p.is("pre")&&!u){l(d,a,k,m);return}if(B=k.splitBlock(z)){d=B.previousBlock;p=B.nextBlock;t=B.wasStartOfBlock;u=B.wasEndOfBlock;p?(q=p.getParent(), 808q.is("li")&&(p.breakParent(q),p.move(p.getNext(),1))):d&&(q=d.getParent())&&q.is("li")&&(d.breakParent(q),q=d.getNext(),k.moveToElementEditStart(q),d.move(d.getPrevious()));if(t||u)if(y(a))k.moveToElementEditStart(k.getTouchedStartNode());else{if(d){if(d.is("li")||!c.test(d.getName())&&!d.is("pre"))v=d.clone()}else p&&(v=p.clone());v?m&&!v.is("li")&&v.renameNode(z):q&&q.is("li")?v=q:(v=r.createElement(z),d&&(A=d.getDirection())&&v.setAttribute("dir",A));if(r=B.elementPath)for(a=0,m=r.elements.length;a< 809m;a++){z=r.elements[a];if(z.equals(r.block)||z.equals(r.blockLimit))break;CKEDITOR.dtd.$removeEmpty[z.getName()]&&(z=z.clone(),v.moveChildren(z),v.append(z))}v.appendBogus();v.getParent()||k.insertNode(v);v.is("li")&&v.removeAttribute("value");!CKEDITOR.env.ie||!t||u&&d.getChildCount()||(k.moveToElementEditStart(u?d:v),k.select());k.moveToElementEditStart(t&&!u?p:v)}else p.is("li")&&(v=k.clone(),v.selectNodeContents(p),v=new CKEDITOR.dom.walker(v),v.evaluator=function(a){return!(f(a)||b(a)||a.type== 810CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(q=v.next())&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?r.createElement("br"):r.createText("\u00a0")).insertBefore(q)),p&&k.moveToElementEditStart(p);k.select();k.scrollIntoView()}}},enterBr:function(b,a,d,f){if(d=d||h(b)){var g=d.document,l=d.checkEndOfBlock(),m=new CKEDITOR.dom.elementPath(b.getSelection().getStartElement()),u=m.block,x=u&&m.block.getName();f||"li"!= 811x?(!f&&l&&c.test(x)?(l=u.getDirection())?(g=g.createElement("div"),g.setAttribute("dir",l),g.insertAfter(u),d.setStart(g,0)):(g.createElement("br").insertAfter(u),CKEDITOR.env.gecko&&g.createText("").insertAfter(u),d.setStartAt(u.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(b="pre"==x&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?g.createText("\r"):g.createElement("br"),d.deleteContents(),d.insertNode(b),CKEDITOR.env.needsBrFiller?(g.createText("\ufeff").insertAfter(b), 812l&&(u||m.blockLimit).appendBogus(),b.getNext().$.nodeValue="",d.setStartAt(b.getNext(),CKEDITOR.POSITION_AFTER_START)):d.setStartAt(b,CKEDITOR.POSITION_AFTER_END)),d.collapse(!0),d.select(),d.scrollIntoView()):k(b,a,d,f)}}};m=CKEDITOR.plugins.enterkey;l=m.enterBr;k=m.enterBlock;c=/^h[1-6]$/})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var d=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item", 813'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),g=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'), 814b=/'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(b,d){return this.addBlock(b,new CKEDITOR.ui.listBlock(this.getHolderElement(),d))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(b,d){d=d||{};var g=d.attributes||(d.attributes={});(this.multiSelect=!!d.multiSelect)&&(g["aria-multiselectable"]=!0);!g.role&&(g.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",g.role);g=this.keys;g[40]="next";g[9]="next";g[38]="prev";
vendor: 4,875 bytes, lines 814-823
814g[CKEDITOR.SHIFT+ 8159]="prev";g[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(g[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=d.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b);delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(b){var d=this.toggle(b);if(this.onClick)this.onClick(b,d)},this));return this._.click}},proto:{add:function(d, 816g,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[d]=k;var c;c=CKEDITOR.tools.htmlEncodeAttr(d).replace(b,"\\'");d={id:k,val:c,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26':"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||d),text:g||d};this._.pendingList.push(h.output(d))},startGroup:function(b){this._.close();var d=CKEDITOR.tools.getNextId(); 817this._.groups[b]=d;this._.pendingHtml.push(g.output({id:d,label:b}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(b){var d=this.isMarked(b);d?this.unmark(b):this.mark(b);return!d},hideGroup:function(b){var d=(b=this.element.getDocument().getById(this._.groups[b]))&&b.getNext();b&&(b.setStyle("display","none"),d&&"ul"==d.getName()&&d.setStyle("display","none"))},hideItem:function(b){this.element.getDocument().getById(this._.items[b]).setStyle("display", 818"none")},showAll:function(){var b=this._.items,d=this._.groups,g=this.element.getDocument(),h;for(h in b)g.getById(b[h]).setStyle("display","");for(var c in d)b=g.getById(d[c]),h=b.getNext(),b.setStyle("display",""),h&&"ul"==h.getName()&&h.setStyle("display","")},mark:function(b){this.multiSelect||this.unmarkAll();b=this._.items[b];var d=this.element.getDocument().getById(b);d.addClass("cke_selected");this.element.getDocument().getById(b+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(d)}, 819markFirstDisplayed:function(){var b=this;this._.markFirstDisplayed(function(){b.multiSelect||b.unmarkAll()})},unmark:function(b){var d=this.element.getDocument();b=this._.items[b];var g=d.getById(b);g.removeClass("cke_selected");d.getById(b+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(g)},unmarkAll:function(){var b=this._.items,d=this.element.getDocument(),g;for(g in b){var h=b[g];d.getById(h).removeClass("cke_selected");d.getById(h+"_option").removeAttribute("aria-selected")}this.onUnmark&& 820this.onUnmark()},isMarked:function(b){return this.element.getDocument().getById(this._.items[b]).hasClass("cke_selected")},focus:function(b){this._.focusIndex=-1;var d=this.element.getElementsByTag("a"),g,h=-1;if(b)for(g=this.element.getDocument().getById(this._.items[b]).getFirst();b=d.getItem(++h);){if(b.equals(g)){this._.focusIndex=h;break}}else this.element.focus();g&&setTimeout(function(){g.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(d){d.ui.addHandler(CKEDITOR.UI_RICHCOMBO, 821CKEDITOR.ui.richCombo.handler)}});(function(){var d='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&& 822CKEDITOR.env.mac&&(d+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(d+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var d=d+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'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'+ 823(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",d);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(b){CKEDITOR.tools.extend(this,b,{canGroup:!1,title:b.label,modes:{wysiwyg:1},editorFocus:1});b=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=b.parent&&b.parent.getDocument()||CKEDITOR.document;
823b.className="cke_combopanel"; 824b.block={multiSelect:b.multiSelect,attributes:b.attributes};b.toolbarRelated=!0;this._={panelDefinition:b,items:{},listeners:[]}},proto:{renderHtml:function(b){var d=[];this.render(b,d);return d.join("")},render:function(b,d){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a=this.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;b.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}} 825var l=CKEDITOR.env,k,c,e="cke_"+this.id,a=CKEDITOR.tools.addFunction(function(a){c&&(b.unlockSelection(1),c=0);k.execute(a)},this),n=this;k={id:e,combo:this,focus:function(){CKEDITOR.document.getById(e).getChild(1).focus()},execute:function(a){var c=n._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(b),c.on)c.panel.hide();else{n.commit();var d=n.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(n.id,new CKEDITOR.dom.element(a),4)}},clickFn:a};this._.listeners.push(b.on("activeFilterChange", 826h,this));this._.listeners.push(b.on("mode",h,this));this._.listeners.push(b.on("selectionChange",h,this));!this.readOnly&&this._.listeners.push(b.on("readOnly",h,this));var w=CKEDITOR.tools.addFunction(function(b,c){b=new CKEDITOR.dom.event(b);var d=b.getKeystroke();switch(d){case 13:case 32:case 40:CKEDITOR.tools.callFunction(a,c);break;default:k.onkey(k,d)}b.preventDefault()}),y=CKEDITOR.tools.addFunction(function(){k.onfocus&&k.onfocus()});c=0;k.keyDownFn=w;l={id:e,name:this.name||this.command, 827label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:w,focusFn:y,clickFn:a};g.output(l,d);if(this.onRender)this.onRender();return k},createPanel:function(b){if(!this._.panel){var d=this._.panelDefinition,g=this._.panelDefinition.block,h=d.parent||CKEDITOR.document.getBody(),k="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(b,h,d),d=c.addListBlock(this.id,g),e=this;c.onShow=function(){this.element.addClass(k);e.setState(CKEDITOR.TRISTATE_ON); 828e._.on=1;e.editorFocus&&!b.focusManager.hasFocus&&b.focus();if(e.onOpen)e.onOpen()};c.onHide=function(a){this.element.removeClass(k);e.setState(e.modes&&e.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e._.on=0;if(!a&&e.onClose)e.onClose()};c.onEscape=function(){c.hide(1)};d.onClick=function(a,b){e.onClick&&e.onClick.call(e,a,b);c.hide()};this._.panel=c;this._.list=d;c.getBlock(this.id).onHide=function(){e._.on=0;e.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(b, 829d){this._.value=b;var g=this.document.getById("cke_"+this.id+"_text");g&&(b||d?g.removeClass("cke_combo_inlinelabel"):(d=this.label,g.addClass("cke_combo_inlinelabel")),g.setText("undefined"!=typeof d?d:b))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(b){this._.list.mark(b)},hideItem:function(b){this._.list.hideItem(b)},hideGroup:function(b){this._.list.hideGroup(b)},showAll:function(){this._.list.showAll()},add:function(b,d,g){this._.items[b]= 830g||b;this._.list.add(b,d,g)},startGroup:function(b){this._.list.startGroup(b)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(b){if(this._.state!=b){var d=this.document.getById("cke_"+this.id);d.setState(b,"cke_combo");b==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled");this._.state=b}},getState:function(){return this._.state},enable:function(){this._.state== 831CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(b){b.removeListener()});this._.listeners=[]},select:function(b){if(!CKEDITOR.tools.isEmpty(this._.items))for(var d in this._.items)if(b({value:d,text:this._.items[d]})){this.setValue(d);break}}},statics:{handler:{create:function(b){return new CKEDITOR.ui.richCombo(b)}}}}); 832CKEDITOR.ui.prototype.addRichCombo=function(b,d){this.add(b,CKEDITOR.UI_RICHCOMBO,d)}})();(function(){function d(d,g){var l=d.config,k=g.lang,c=new CKEDITOR.style(g.styleDefinition),e=new b({entries:g.entries,styleVariable:g.styleVariable,styleDefinition:g.styleDefinition}),a;d.addCommand(g.commandName,{exec:function(a,b){var c=b.newStyle,d=b.oldStyle,e=a.getSelection().getRanges()[0],f=void 0===c;if(d||c)if(d&&e.collapsed&&h({editor:a,range:e,style:d}),f)a.removeStyle(d);else{if(e=d)e=d instanceof 833CKEDITOR.style&&c instanceof CKEDITOR.style?CKEDITOR.style.getStyleText(d.getDefinition())===CKEDITOR.style.getStyleText(c.getDefinition()):!1,e=!e;e&&a.removeStyle(d);a.applyStyle(c)}},refresh:function(a,b){c.checkApplicable(b,a,a.activeFilter)||this.setState(CKEDITOR.TRISTATE_DISABLED)}});a=d.getCommand(g.commandName);d.ui.addRichCombo(g.comboName,{label:k.label,title:k.panelTitle,command:g.commandName,toolbar:"styles,"+g.order,defaultValue:"cke-default",allowedContent:c,requiredContent:c,contentTransformations:"span"=== 834g.styleDefinition.element?[[{element:"font",check:"span",left:function(a){return!!a.attributes.size||!!a.attributes.align||!!a.attributes.face},right:function(a){var b=" x-small small medium large x-large xx-large 48px".split(" ");a.name="span";a.attributes.size&&(a.styles["font-size"]=b[a.attributes.size],delete a.attributes.size);a.attributes.align&&(a.styles["text-align"]=a.attributes.align,delete a.attributes.align);a.attributes.face&&(a.styles["font-family"]=a.attributes.face,delete a.attributes.face)}}]]: 835null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(l.contentsCss),multiSelect:!1,attributes:{"aria-label":k.panelTitle}},init:function(){var a="("+d.lang.common.optionDefault+")";this.startGroup(k.panelTitle);this.add(this.defaultValue,a,a);e.addToCombo(this)},onClick:function(a){var b=this.getValue();d.focus();d.fire("saveSnapshot");d.execCommand(g.commandName,{newStyle:e.getStyle(a),oldStyle:e.getStyle(b)});d.fire("saveSnapshot")},onRender:function(){d.on("selectionChange",function(a){var b= 836this.getValue();(a=e.getMatchingValue(d,a.data.path))?a!=b&&this.setValue(a):this.setValue("",g.defaultLabel)},this);a.on("state",function(){this.setState(a.state)},this)},refresh:function(){this.setState(a.state)}})}function h(b){var d=b.editor,h=b.range,k=b.style,c,e,a;c=d.elementPath();if(b=c.contains(function(a){return k.checkElementRemovable(a)})){e=h.checkBoundaryOfElement(b,CKEDITOR.START);a=h.checkBoundaryOfElement(b,CKEDITOR.END);if(e&&a){for(e=h.createBookmark();c=b.getFirst();)c.insertBefore(b); 837b.remove();h.moveToBookmark(e)}else e||a?h.moveToPosition(b,e?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(h.splitElement(b),h.moveToPosition(b,CKEDITOR.POSITION_AFTER_END)),g(h,c.elements.slice(),b);d.getSelection().selectRanges([h])}}function g(b,d,h){var k=d.pop();if(k){if(h)return g(b,d,k.equals(h)?null:h);h=k.clone();
837b.insertNode(h);b.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);g(b,d)}}var b=CKEDITOR.tools.createClass({$:function(b){var d=b.entries.split(";");this._.data= 838{};this._.names=[];for(var g=0;g<d.length;g++){var h=d[g],c,e;h?(h=h.split("/"),c=h[0],h=h[1],e={},e[b.styleVariable]=h||c,this._.data[c]=new CKEDITOR.style(b.styleDefinition,e),this._.data[c]._.definition.name=c,this._.names.push(c)):(d.splice(g,1),g--)}},proto:{getStyle:function(b){return this._.data[b]},addToCombo:function(b){for(var d=0;d<this._.names.length;d++){var g=this._.names[d];b.add(g,this.getStyle(g).buildPreview(),g)}},getMatchingValue:function(b,d){for(var g=d.elements,h=0,c;h<g.length;h++)if(c= 839g[h],c=this._.findMatchingStyleName(b,c))return c;return null}},_:{findMatchingStyleName:function(b,d){return CKEDITOR.tools.array.find(this._.names,function(g){return this.getStyle(g).checkElementMatch(d,!0,b)},this)}}});CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(b){var g=b.config;d(b,{comboName:"Font",commandName:"font",styleVariable:"family",lang:b.lang.font,entries:g.font_names,defaultLabel:g.font_defaultLabel,styleDefinition:g.font_style,order:30});d(b,{comboName:"FontSize", 840commandName:"fontSize",styleVariable:"size",lang:b.lang.font.fontSize,entries:g.fontSize_sizes,defaultLabel:g.fontSize_defaultLabel,styleDefinition:g.fontSize_style,order:40})}})})();CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif"; 841CKEDITOR.config.font_defaultLabel="";CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]};CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px";CKEDITOR.config.fontSize_defaultLabel="";CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]};CKEDITOR.plugins.add("format", 842{requires:"richcombo",init:function(d){if(!d.blockless){for(var h=d.config,g=d.lang.format,b=h.format_tags.split(";"),f={},m=0,l=[],k=0;k<b.length;k++){var c=b[k],e=new CKEDITOR.style(h["format_"+c]);if(!d.filter.customConfig||d.filter.check(e))m++,f[c]=e,f[c]._.enterMode=d.config.enterMode,l.push(e)}0!==m&&d.ui.addRichCombo("Format",{label:g.label,title:g.panelTitle,toolbar:"styles,20",allowedContent:l,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(h.contentsCss),multiSelect:!1,attributes:{"aria-label":g.panelTitle}}, 843init:function(){this.startGroup(g.panelTitle);for(var a in f){var b=g["tag_"+a];this.add(a,f[a].buildPreview(b),b)}},onClick:function(a){d.focus();d.fire("saveSnapshot");a=f[a];var b=d.elementPath();a.checkActive(b,d)||d.applyStyle(a);setTimeout(function(){d.fire("saveSnapshot")},0)},onRender:function(){d.on("selectionChange",function(a){var b=this.getValue();a=a.data.path;this.refresh();for(var c in f)if(f[c].checkActive(a,d)){c!=b&&this.setValue(c,d.lang.format["tag_"+c]);return}this.setValue("")}, 844this)},onOpen:function(){this.showAll();for(var a in f)d.activeFilter.check(f[a])||this.hideItem(a)},refresh:function(){var a=d.elementPath();if(a){if(a.isContextFor("p"))for(var b in f)if(d.activeFilter.check(f[b]))return;this.setState(CKEDITOR.TRISTATE_DISABLED)}}})}}});CKEDITOR.config.format_tags="p;h1;h2;h3;h4;h5;h6;pre;address;div";CKEDITOR.config.format_p={element:"p"};CKEDITOR.config.format_div={element:"div"};CKEDITOR.config.format_pre={element:"pre"};CKEDITOR.config.format_address={element:"address"}; 845CKEDITOR.config.format_h1={element:"h1"};CKEDITOR.config.format_h2={element:"h2"};CKEDITOR.config.format_h3={element:"h3"};CKEDITOR.config.format_h4={element:"h4"};CKEDITOR.config.format_h5={element:"h5"};CKEDITOR.config.format_h6={element:"h6"};(function(){var d={canUndo:!1,exec:function(d){var g=d.document.createElement("hr");d.insertElement(g)},allowedContent:"hr",requiredContent:"hr"};CKEDITOR.plugins.add("horizontalrule",{init:function(h){h.blockless||(h.addCommand("horizontalrule",d),h.ui.addButton&& 846h.ui.addButton("HorizontalRule",{label:h.lang.horizontalrule.toolbar,command:"horizontalrule",toolbar:"insert,40"}))}})})();CKEDITOR.plugins.add("htmlwriter",{init:function(d){var h=new CKEDITOR.htmlWriter;h.forceSimpleAmpersand=d.config.forceSimpleAmpersand;h.indentationChars=d.config.dataIndentationChars||"\t";d.dataProcessor.writer=h}});CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e"; 847this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var d=CKEDITOR.dtd,h;for(h in CKEDITOR.tools.extend({},d.$nonBodyContent,d.$block,d.$listItem,d.$tableContent))this.setRules(h,{indent:!d[h]["#"],breakBeforeOpen:1,breakBeforeClose:!d[h]["#"],breakAfterClose:1,needsSpace:h in d.$block&&!(h in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1}); 848this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(d){var h=this._.rules[d];this._.afterCloser&&h&&h.needsSpace&&this._.needsSpace&&this._.output.push("\n");this._.indent?this.indentation():h&&h.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",d);this._.afterCloser=0},openTagClose:function(d,h){var g=this._.rules[d];h?(this._.output.push(this.selfClosingEnd),g&&g.breakAfterClose&&(this._.needsSpace=g.needsSpace)):(this._.output.push("\x3e"),g&& 849g.indent&&(this._.indentation+=this.indentationChars));g&&g.breakAfterOpen&&this.lineBreak();"pre"==d&&(this._.inPre=1)},attribute:function(d,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h),this.forceSimpleAmpersand&&(h=h.replace(/&/g,"\x26")));this._.output.push(" ",d,'\x3d"',h,'"')},closeTag:function(d){var h=this._.rules[d];h&&h.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():h&&h.breakBeforeClose&&(this.lineBreak(), 850this.indentation());this._.output.push("\x3c/",d,"\x3e");"pre"==d&&(this._.inPre=0);h&&h.breakAfterClose&&(this.lineBreak(),this._.needsSpace=h.needsSpace);this._.afterCloser=1},text:function(d){this._.indent&&(this.indentation(),!this._.inPre&&(d=CKEDITOR.tools.ltrim(d)));this._.output.push(d)},comment:function(d){this._.indent&&this.indentation();this._.output.push("\x3c!--",d,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent= 8511},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(d,h){var g=this._.rules[d];g?CKEDITOR.tools.extend(g,h,!0):this._.rules[d]=h}}});"use strict";(function(){function d(b,d){CKEDITOR.tools.extend(this,{editor:b,editable:b.editable(),doc:b.document,win:b.
vendor: 17,720 bytes, lines 851-886
851window},d,!0);this.inline=this.editable.isInline(); 852this.inline||(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function h(b,d){CKEDITOR.tools.extend(this,d,{editor:b},!0)}function g(b,d){var a=b.editable();CKEDITOR.tools.extend(this,{editor:b,editable:a,inline:a.isInline(),doc:b.document,win:b.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},d,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var g=CKEDITOR.tools.bind(this.queryViewport, 853this),h=CKEDITOR.tools.bind(this.hideVisible,this),k=CKEDITOR.tools.bind(this.removeAll,this);a.attachListener(this.winTop,"resize",g);a.attachListener(this.winTop,"scroll",g);a.attachListener(this.winTop,"resize",h);a.attachListener(this.win,"scroll",h);a.attachListener(this.inline?a:this.frame,"mouseout",function(a){var b=a.data.$.clientX;a=a.data.$.clientY;this.queryViewport();(b<=this.rect.left||b>=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width|| 8540>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);a.attachListener(b,"resize",g);a.attachListener(b,"mode",k);b.on("destroy",k);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},m,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({}, 855f,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},f,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function b(b){var d;if(d=b&&b.type==CKEDITOR.NODE_ELEMENT)d=!(l[b.getComputedStyle("float")]||l[b.getAttribute("align")]);return d&&!k[b.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE= 8561;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;d.prototype={start:function(b){var d=this,a=this.editor,f=this.doc,g,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(d.relations={},(h=f.$.elementFromPoint(k,l))&&h.nodeType&&(g=new CKEDITOR.dom.element(h),d.traverseSearch(g),isNaN(k+l)||d.pixelSearch(g,k,l),b&&b(d.relations,k,l)))});this.listener=this.editable.attachListener(this.target,"mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;m.input()}); 857this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){m.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var b={};b[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;b[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;b[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(d){var a=this.editor.createRange();a.moveToPosition(this.relations[d.uid].element,b[d.type]);return a}}(),store:function(){function c(b, 858a,c){var d=b.getUniqueId();d in c?c[d].type|=a:c[d]={element:b,type:a}}return function(d,a){var f;a&CKEDITOR.LINEUTILS_AFTER&&b(f=d.getNext())&&f.isVisible()&&(c(f,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_AFTER);a&CKEDITOR.LINEUTILS_INSIDE&&b(f=d.getFirst())&&f.isVisible()&&(c(f,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_INSIDE);c(d,a,this.relations)}}(),traverseSearch:function(c){var d,a,f;do if(f=c.$["data-cke-expando"],!(f&&f in this.relations)){if(c.equals(this.editable))break; 859if(b(c))for(d in this.lookups)(a=this.lookups[d](c))&&this.store(c,a)}while((!c||c.type!=CKEDITOR.NODE_ELEMENT||"true"!=c.getAttribute("contenteditable"))&&(c=c.getParent()))},pixelSearch:function(){function c(a,c,f,g,h){for(var k=0,l;h(f);){f+=g;if(25==++k)break;if(l=this.doc.$.elementFromPoint(c,f))if(l==a)k=0;else if(d(a,l)&&(k=0,b(l=new CKEDITOR.dom.element(l))))return l}}var d=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:function(a,b){return!!(a.compareDocumentPosition(b)& 86016)};return function(a,d,e){var f=this.win.getViewPaneSize().height,g=c.call(this,a.$,d,e,-1,function(a){return 0<a});d=c.call(this,a.$,d,e,1,function(a){return a<f});if(g)for(this.traverseSearch(g);!g.getParent().equals(a);)g=g.getParent();if(d)for(this.traverseSearch(d);!d.getParent().equals(a);)d=d.getParent();for(;g||d;){g&&(g=g.getNext(b));if(!g||g.equals(d))break;this.traverseSearch(g);d&&(d=d.getPrevious(b));if(!d||d.equals(g))break;this.traverseSearch(d)}}}(),greedySearch:function(){this.relations= 861{};for(var c=this.editable.getElementsByTag("*"),d=0,a,f,g;a=c.getItem(d++);)if(!a.equals(this.editable)&&a.type==CKEDITOR.NODE_ELEMENT&&(a.hasAttribute("contenteditable")||!a.isReadOnly())&&b(a)&&a.isVisible())for(g in this.lookups)(f=this.lookups[g](a))&&this.store(a,f);return this.relations}};h.prototype={locate:function(){function c(c,a){var d=c.element[a===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return d&&b(d)?(c.siblingRect=d.getClientRect(),a==CKEDITOR.LINEUTILS_BEFORE?(c.siblingRect.bottom+ 862c.elementRect.top)/2:(c.elementRect.bottom+c.siblingRect.top)/2):a==CKEDITOR.LINEUTILS_BEFORE?c.elementRect.top:c.elementRect.bottom}return function(b){var a;this.locations={};for(var d in b)a=b[d],a.elementRect=a.element.getClientRect(),a.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(d,CKEDITOR.LINEUTILS_BEFORE,c(a,CKEDITOR.LINEUTILS_BEFORE)),a.type&CKEDITOR.LINEUTILS_AFTER&&this.store(d,CKEDITOR.LINEUTILS_AFTER,c(a,CKEDITOR.LINEUTILS_AFTER)),a.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(d,CKEDITOR.LINEUTILS_INSIDE, 863(a.elementRect.top+a.elementRect.bottom)/2);return this.locations}}(),sort:function(){var b,d,a,f;return function(g,h){b=this.locations;d=[];for(var k in b)for(var l in b[k])if(a=Math.abs(g-b[k][l]),d.length){for(f=0;f<d.length;f++)if(a<d[f].dist){d.splice(f,0,{uid:+k,type:l,dist:a});break}f==d.length&&d.push({uid:+k,type:l,dist:a})}else d.push({uid:+k,type:l,dist:a});return"undefined"!=typeof h?d.slice(0,h):d}}(),store:function(b,d,a){this.locations[b]||(this.locations[b]={});this.locations[b][d]= 864a}};var f={display:"block",width:"0px",height:"0px","border-color":"transparent","border-style":"solid",position:"absolute",top:"-6px"},m={height:"0px","border-top":"1px dashed red",position:"absolute","z-index":9999};g.prototype={removeAll:function(){for(var b in this.hidden)this.hidden[b].remove(),delete this.hidden[b];for(b in this.visible)this.visible[b].remove(),delete this.visible[b]},hideLine:function(b){var d=b.getUniqueId();b.hide();this.hidden[d]=b;delete this.visible[d]},showLine:function(b){var d= 865b.getUniqueId();b.show();this.visible[d]=b;delete this.hidden[d]},hideVisible:function(){for(var b in this.visible)this.hideLine(this.visible[b])},placeLine:function(b,d){var a,f,g;if(a=this.getStyle(b.uid,b.type)){for(g in this.visible)if(this.visible[g].getCustomData("hash")!==this.hash){f=this.visible[g];break}if(!f)for(g in this.hidden)if(this.hidden[g].getCustomData("hash")!==this.hash){this.showLine(f=this.hidden[g]);break}f||this.showLine(f=this.addLine());f.setCustomData("hash",this.hash); 866this.visible[f.getUniqueId()]=f;f.setStyles(a);d&&d(f)}},getStyle:function(b,d){var a=this.relations[b],f=this.locations[b][d],g={};g.width=a.siblingRect?Math.max(a.siblingRect.width,a.elementRect.width):a.elementRect.width;g.top=this.inline?f+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+f;if(g.top-this.winTopScroll.y<this.rect.top||g.top-this.winTopScroll.y>this.rect.bottom)return!1;this.inline?g.left=a.elementRect.left-this.rect.relativeX:(0<a.elementRect.left?g.left= 867this.rect.left+a.elementRect.left:(g.width+=a.elementRect.left,g.left=this.rect.left),0<(a=g.left+g.width-(this.rect.left+this.winPane.width))&&(g.width-=a));g.left+=this.winTopScroll.x;for(var h in g)g[h]=CKEDITOR.tools.cssLength(g[h]);return g},addLine:function(){var b=CKEDITOR.dom.element.createFromHtml(this.lineTpl);b.appendTo(this.container);return b},prepare:function(b,d){this.relations=b;this.locations=d;this.hash=Math.random()},cleanup:function(){var b,d;for(d in this.visible)b=this.visible[d], 868b.getCustomData("hash")!==this.hash&&this.hideLine(b)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(b){b=b.getClientRect();var d=this.container.getDocumentPosition(),a=this.container.getComputedStyle("position");b.relativeX=b.relativeY=0;"static"!=a&&(b.relativeY=d.y,b.relativeX=d.x,b.top-=b.relativeY, 869b.bottom-=b.relativeY,b.left-=b.relativeX,b.right-=b.relativeX);return b}};var l={left:1,right:1,center:1},k={absolute:1,fixed:1};CKEDITOR.plugins.lineutils={finder:d,locator:h,liner:g}})();(function(){function d(d){return d.getName&&!d.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(d){if(CKEDITOR.env.webkit){var g=CKEDITOR.plugins.widgetselection;d.on("contentDom",function(b){b=b.editor;var d=b.editable();d.attachListener(d,"keydown",function(b){b.data.getKeystroke()== 870CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){g.addFillers(d)||g.removeFillers(d)},0)},null,null,-1);b.on("selectionCheck",function(b){g.removeFillers(b.editor.editable())});b.on("paste",function(b){b.data.dataValue=g.cleanPasteData(b.data.dataValue)});"selectall"in b.plugins&&g.addSelectAllIntegration(b)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(h){var g= 871h.editor;if(!this.isWholeContentSelected(h)&&0<h.getChildCount()){var b=h.getFirst(d),f=h.getLast(d);b&&b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable()&&(this.startFiller=this.createFiller(),h.append(this.startFiller,1));f&&f.type==CKEDITOR.NODE_ELEMENT&&!f.isEditable()&&(this.endFiller=this.createFiller(!0),h.append(this.endFiller,0));if(this.hasFiller(h))return g=g.createRange(),g.selectNodeContents(h),g.select(),!0}return!1},removeFillers:function(d){if(this.hasFiller(d)&&!this.isWholeContentSelected(d)){var g= 872d.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),b=d.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&g&&this.startFiller.equals(g)?this.removeFiller(this.startFiller,d):this.startFiller=g;this.endFiller&&b&&this.endFiller.equals(b)?this.removeFiller(this.endFiller,d):this.endFiller=b}},cleanPasteData:function(d){d&&d.length&&(d=d.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));return d},isWholeContentSelected:function(d){var g= 873d.editor.getSelection().getRanges()[0];return!g||g&&g.collapsed?!1:(g=g.clone(),g.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(g&&d&&g.startContainer&&g.endContainer&&0===g.startOffset&&g.endOffset===d.getChildCount()&&g.startContainer.equals(d)&&g.endContainer.equals(d)))},hasFiller:function(d){return 0<d.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(d){var g=new CKEDITOR.dom.element(this.fillerTagName);g.setHtml(this.fillerContent);g.setAttribute(this.fillerAttribute, 874d?"end":"start");g.setAttribute("data-cke-temp",1);g.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return g},removeFiller:function(d,g){if(d){var b=g.editor,f=g.editor.getSelection().getRanges()[0].startPath(),m=b.createRange(),l,k;f.contains(d)&&(l=d.getHtml(),k=!0);f="start"==d.getAttribute(this.fillerAttribute);d.remove();l&&0<l.length&&l!=this.fillerContent?(g.insertHtmlIntoRange(l,b.getSelection().getRanges()[0]), 875m.setStartAt(g.getChild(g.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),b.getSelection().selectRanges([m])):k&&(f?m.setStartAt(g.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):m.setEndAt(g.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),g.editor.getSelection().selectRanges([m]))}},createFillerRegex:function(d){var g=this.createFiller(d).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((d?"":"^")+g+(d?"$":""))},addSelectAllIntegration:function(d){var g= 876this;d.editable().attachListener(d,"beforeCommandExec",function(b){var f=d.editable();"selectAll"==b.data.name&&f&&g.addFillers(f)},null,null,9999)}}})();"use strict";(function(){function d(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};G(this);C(this);this.on("checkWidgets",l);this.editor.on("contentDomInvalidated",this.checkWidgets,this);B(this);v(this);q(this); 877z(this);A(this)}function h(a,b,c,d,e){var f=a.editor;CKEDITOR.tools.extend(this,d,{editor:f,id:b,inline:"span"==c.getParent().getName(),element:c,data:CKEDITOR.tools.extend({},"function"==typeof d.defaults?d.defaults():d.defaults),dataReady:!1,inited:!1,ready:!1,edit:h.prototype.edit,focusedEditable:null,definition:d,repository:a,draggable:!1!==d.draggable,_:{downcastFn:d.downcast&&"string"==typeof d.downcast?d.downcasts[d.downcast]:d.downcast}},!0);a.fire("instanceCreated",this);O(this,d);this.init&& 878this.init();this.inited=!0;(a=this.element.data("cke-widget-data"))&&this.setData(JSON.parse(decodeURIComponent(a)));e&&this.setData(e);this.data.classes||this.setData("classes",this.getClasses());this.dataReady=!0;da(this);this.fire("data",this.data);this.isInited()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function g(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=b?b.getAllowedEnterMode(a.enterMode): 879a.enterMode,this.shiftEnterMode=b?b.getAllowedEnterMode(a.shiftEnterMode,!0):a.shiftEnterMode):this.enterMode=this.shiftEnterMode=CKEDITOR.ENTER_BR}function b(a,b){a.addCommand(b.name,{exec:function(a,c){function d(){a.widgets.finalizeCreation(h)}var e=a.widgets.focused;if(e&&e.name==b.name)e.edit();else if(b.insert)b.insert({editor:a,commandData:c});else if(b.template){var e="function"==typeof b.defaults?b.defaults():b.defaults,e=CKEDITOR.dom.element.createFromHtml(b.template.output(e),a.document), 880f,g=a.widgets.wrapElement(e,b.name),h=new CKEDITOR.dom.documentFragment(g.getDocument());h.append(g);(f=a.widgets.initOn(e,b,c&&c.startupData))?(e=f.once("edit",function(b){if(b.data.dialog)f.once("dialog",function(b){b=b.data;var c,e;c=b.once("ok",d,null,null,20);e=b.once("cancel",function(b){b.data&&!1===b.data.hide||a.widgets.destroy(f,!0)});b.once("hide",function(){c.removeListener();e.removeListener()})});else d()},null,null,999),f.edit(),e.removeListener()):d()}},allowedContent:b.allowedContent, 881requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function f(a,b){function c(a,d){var e=b.upcast.split(","),f,g;for(g=0;g<e.length;g++)if(f=e[g],f===a.name)return b.upcasts[f].call(this,a,d);return!1}function d(b,c,e){var f=CKEDITOR.tools.getIndex(a._.upcasts,function(a){return a[2]>e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c, 882b,f):d(e,b,f))}function m(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function l(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,g;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();d<e;d++){f=k.getItem(d);if(g=!this.getByElement(f, 883!0)){a:{g=t;for(var l=f;l=l.getParent();)if(g(l)){g=!0;break a}g=!1}g=!g}g&&b.contains(f)&&(f.addClass("cke_widget_new"),c.push(this.initOn(f.getFirst(h.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function k(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=c(a),d=e(a),f=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=1,b.value=b.value.replace(/^\s/g,"\x26nbsp;"),f=!0);d&&d.value&&d.value.match(/\s$/g)&&(d.parent.attributes["data-cke-white-space-last"]= 8841,d.value=d.value.replace(/\s$/g,"\x26nbsp;"),f=!0);f&&(a.attributes["data-cke-widget-white-space"]=1)}}function c(a){return a.find(function(a){return 3===a.type},!0).shift()}function e(a){return a.find(function(a){return 3===a.type},!0).pop()}function a(a,b,c){if(!c.allowedContent&&!c.disallowedContent)return null;var d=this._.filters[a];d||(this._.filters[a]=d={});a=d[b];a||(a=c.allowedContent?new CKEDITOR.filter(c.allowedContent):this.editor.filter.clone(),d[b]=a,c.disallowedContent&&a.disallow(c.disallowedContent)); 885return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,f,g,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(h.isParserWidgetElement))&&b.push([a]),!1;if("data-widget"in a.attributes)return b.push([a]),!1;if(l=c.length){if(a.attributes["data-cke-widget-upcasted"])return!1;k=0;for(e=d.length;k<e;++k)if(!1===d[k](a))return;for(k=0;k<l;++k)if(e=c[k],g={},f=e[0](a,g))return f instanceof CKEDITOR.htmlParser.element&&(a=f),a.attributes["data-cke-widget-data"]= 886encodeURIComponent(JSON.stringify(g)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,e[1]]),!1}}}}
886function w(a,b){return{tabindex:-1,contenteditable:"false","data-cke-widget-wrapper":1,"data-cke-filter":"off","class":"cke_widget_wrapper cke_widget_new cke_widget_"+(a?"inline":"block")+(b?" cke_widget_"+b:"")}}function y(a,b,c){if(a.type==CKEDITOR.NODE_ELEMENT){var d=CKEDITOR.dtd[a.name];if(d&&!d[c.name]){var d=a.split(b),e=a.parent;b=d.getIndex();a.children.length||(--b,a.remove());d.children.length|| 887d.remove();return y(e,b,c)}}a.add(c,b)}function r(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function t(a){return a.hasAttribute("data-cke-temp")}function u(a,b,c,d){var e=a.editor;e.fire("lockSnapshot");c?(d=c.data("cke-widget-editable"),d=b.editables[d],a.widgetHoldingFocusedEditable=b,b.focusedEditable=d,c.addClass("cke_widget_editable_focused"),d.filter&&e.setActiveFilter(d.filter),e.setActiveEnterMode(d.enterMode,d.shiftEnterMode)):(d||b.focusedEditable.removeClass("cke_widget_editable_focused"), 888b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function x(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function p(a,b){return CKEDITOR.tools.trim(b)}function z(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;h.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id", 889d.id),b.focus(),d.focus())});b.on("drop",function(c){var d=c.data.dataTransfer,e=d.getData("cke/widget-id"),f=d.getTransferType(b),d=b.createRange();if(""!==e&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS)c.cancel();else if(f==CKEDITOR.DATA_TRANSFER_INTERNAL)if(""===e&&0<b.widgets.selected.length)c.data.dataTransfer.setData("text/html",T(b));else if(e=a.instances[e])d.setStartBefore(e.wrapper),d.setEndAfter(e.wrapper),c.data.dragRange=d,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount, 890c.data.dataTransfer.setData("text/html",e.getClipboardHtml()),b.widgets.destroy(e,!0)});b.on("contentDom",function(){var d=b.editable();CKEDITOR.tools.extend(a,{finder:new c.finder(b,{lookups:{"default":function(b){if(!b.is(CKEDITOR.dtd.$listItem)&&b.is(CKEDITOR.dtd.$block)&&!h.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=h.getNestedEditable(d,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent; 891if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE|CKEDITOR.LINEUTILS_AFTER}}}}),locator:new c.locator(b),liner:new c.liner(b,{lineStyle:{cursor:"move !important","border-top-color":"#666"},tipLeftStyle:{"border-left-color":"#666"},tipRightStyle:{"border-right-color":"#666"}})},!0)})}function v(a){var b=a.editor;b.on("contentDom",function(){var c=b.editable(),d=c.isInline()?c:b.document,e,f;c.attachListener(d,"mousedown",function(c){var d=c.data.getTarget();e=d instanceof CKEDITOR.dom.element? 892a.getByElement(d):null;f=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&&d.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=e&&b.getSelection().removeAllRanges()):h.getNestedEditable(e.wrapper,d)?e=null:(c.data.preventDefault(),CKEDITOR.env.ie||e.focus()))});c.attachListener(d,"mouseup",function(){f&&e&&e.wrapper&&(f=0,e.focus())});CKEDITOR.env.ie&&c.attachListener(d,"mouseup",function(){setTimeout(function(){e&&e.wrapper&&c.contains(e.wrapper)&&(e.focus(),e=null)})})});b.on("doubleclick", 893function(b){var c=a.getByElement(b.data.element);if(c&&!h.getNestedEditable(c.wrapper,b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function q(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8== 894c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&&d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function A(a){function b(d){1>a.selected.length||M(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function B(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),f=c(a.endContainer); 895!d&&f?(a.setEndBefore(f.wrapper),a.select()):d&&!f&&(a.setStartAfter(d.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")}var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(), 896b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;
896d?d===c&&d.focusedEditable.equals(b)||(u(a,d,null),c&&b&&u(a,c,b)):c&&b&&u(a,c,b)});e.on("dataReady",function(){F(a).commit()});e.on("blur",function(){var b;(b=a.focused)&&m(a,b);(b=a.widgetHoldingFocusedEditable)&&u(a,b,null)})}function C(a){var b=a.editor,d={};b.on("toDataFormat",function(b){var f=CKEDITOR.tools.getNextNumber(),g=[];b.data.downcastingSessionId=f;d[f]=g;b.data.dataValue.forEach(function(b){var d= 897b.attributes,f;if("data-cke-widget-white-space"in d){f=c(b);var k=e(b);f.parent.attributes["data-cke-white-space-first"]&&(f.value=f.value.replace(/^ /g," "));k.parent.attributes["data-cke-white-space-last"]&&(k.value=k.value.replace(/ $/g," "))}if("data-cke-widget-id"in d){if(d=a.instances[d["data-cke-widget-id"]])f=b.getFirst(h.isParserWidgetElement),g.push({wrapper:b,element:f,widget:d,editables:{}}),"1"!=f.attributes["data-cke-widget-keep-attr"]&&delete f.attributes["data-widget"]}else if("data-cke-widget-editable"in 898d)return 0<g.length&&(g[g.length-1].editables[d["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=d[a.data.downcastingSessionId],c,e,f,g,h,k;c=b.shift();){e=c.widget;f=c.element;g=e._.downcastFn&&e._.downcastFn.call(e,f);a.data.widgetsCopy&&e.getClipboardHtml&&(g=CKEDITOR.htmlParser.fragment.fromHtml(e.getClipboardHtml()),g=g.children[0]);for(k in c.editables)h=c.editables[k],delete h.attributes.contenteditable, 899h.setHtml(e.editables[k].getData());g||(g=f);c.wrapper.replaceWith(g)}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function G(a){var b=a.editor,c,d;b.on("toHtml",function(b){var d=n(a),e;for(b.data.dataValue.forEach(d.iterator,CKEDITOR.NODE_ELEMENT,!0);e=d.toBeWrapped.pop();){var f=e[0],g=f.parent;g.type==CKEDITOR.NODE_ELEMENT&&g.attributes["data-cke-widget-wrapper"]&&g.replaceWith(f);a.wrapElement(e[0],e[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&& 900h.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&h.isParserWidgetWrapper(b.data.dataValue.children[0])},null,null,8);b.on("dataReady",function(){if(d)for(var c=b.editable().find(".cke_widget_wrapper"),e,f,g=0,k=c.count();g<k;++g)e=c.getItem(g),f=e.getFirst(h.isDomWidgetElement),f.type==CKEDITOR.NODE_ELEMENT&&f.data("widget")?(f.replace(e),a.wrapElement(f)):e.remove();d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&& 901(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(S,p);a.range&&(a=h.getNestedEditable(b.editable(),a.range.startContainer))&&(a=CKEDITOR.filter.instances[a.data("cke-filter")])&&b.setActiveFilter(a)});b.on("afterInsertHtml",function(d){d.data.intoRange?a.checkWidgets({initOnlyNew:!0}):(b.fire("lockSnapshot"),a.checkWidgets({initOnlyNew:!0,focusInited:c}),b.fire("unlockSnapshot"))})}function F(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0> 902CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&m(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g= 903c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function J(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"").replace(/<span[^>]*cke_widget_drag_handler_container[^>]*.*?<\/span>/gmi,"")})}function I(a,b,c){var d=0;b=H(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function D(a){a.cancel()}function M(a,b){var c= 904a.widgets.focused,d,e,f;V.hasCopyBin(a)||(e=new V(a,{beforeDestroy:function(){!b&&c&&c.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),e.handle(T(a)))}function H(a){return(a=(a=a.getDefinition().attributes)&& 905a["class"])?a.split(/\s+/):null}function K(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function E(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function T(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();
905a.once("toDataFormat",function(a){a.data.widgetsCopy= 906!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function O(a,b){N(a);Y(a);R(a);X(a);U(a);ca(a);aa(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){M(a.editor,b== 907CKEDITOR.CTRL+88);return}if(b in W||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function N(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function Y(a,b){a.partSelectors||(a.partSelectors=a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]= 908d):c[e]=a.parts[e];a.parts=c}}function R(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function X(a){if(!0===a.mask)ea(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,L,a),c=CKEDITOR.env.gecko?300:0,d,e;a.on("focus",function(){b.input();d=a.editor.on("change",b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()}, 909c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[g].on("blur",function(){a.editor.removeListener("change",b.input)});b.input()}}function ea(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img", 910a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function L(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");b||(b=new CKEDITOR.dom.element("img",this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b)); 911this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+"px",height:a.$.offsetHeight+"px"})}}}function U(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span", 912b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1",src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d), 913a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",Z,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function Z(a){function b(){var c;for(m.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner, 914g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=this.repository.finder,d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,p;this.repository._.draggedWidget=this;var q=c.greedySearch(),m=CKEDITOR.tools.eventsBuffer(50, 915function(){l=d.locate(q);k=d.sort(p,1);k.length&&(e.prepare(q,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){p=a.data.$.clientY;m.input()}));
vendor: 4,132 bytes, lines 915-921
915f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}}function ca(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})} 916function aa(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function da(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function ba(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a, 917c,d){for(var e=a.length,f=0;f<e;){if(c.call(d,a[f],f,a))return a[f];f++}}function e(a){function b(a,c){var d=CKEDITOR.tools.object.keys(a),e=CKEDITOR.tools.object.keys(c);if(d.length!==e.length)return!1;for(var f in a)if(("object"!==typeof a[f]||"object"!==typeof c[f]||!b(a[f],c[f]))&&a[f]!==c[f])return!1;return!0}return function(c){return b(a.getDefinition(),c.getDefinition())}}var f=a.widget,g;d[f]||(d[f]={});for(var h=0,k=a.group.length;h<k;h++)g=a.group[h],d[f][g]||(d[f][g]=[]),g=d[f][g],b(g, 918e(a))||g.push(a)}var d={};CKEDITOR.style.addCustomHandler({type:"widget",setup:function(a){this.widget=a.widget;(this.group="string"==typeof a.group?[a.group]:a.group)&&c(this)},apply:function(a){var b;a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&(b=a.widgets.focused,this.group&&this.removeStylesFromSameGroup(a),b.applyStyle(this))},remove:function(a){a instanceof CKEDITOR.editor&&this.checkApplicable(a.elementPath(),a)&&a.widgets.focused.removeStyle(this)},removeStylesFromSameGroup:function(a){var b= 919!1,c,e;if(!(a instanceof CKEDITOR.editor))return!1;e=a.elementPath();if(this.checkApplicable(e,a))for(var f=0,g=this.group.length;f<g;f++){c=d[this.widget][this.group[f]];for(var h=0;h<c.length;h++)c[h]!==this&&c[h].checkActive(e,a)&&(a.widgets.focused.removeStyle(c[h]),b=!0)}return b},checkActive:function(a,b){return this.checkElementMatch(a.lastElement,0,b)},checkApplicable:function(a,b){return b instanceof CKEDITOR.editor?this.checkElement(a.lastElement):!1},checkElementMatch:b,checkElementRemovable:b, 920checkElement:function(a){return h.isDomWidgetWrapper(a)?(a=a.getFirst(h.isDomWidgetElement))&&a.data("widget")==this.widget:!1},buildPreview:function(a){return a||this._.definition.name},toAllowedContentRules:function(a){if(!a)return null;a=a.widgets.registered[this.widget];var b,c={};if(!a)return null;if(a.styleableElements){b=this.getClassesArray();if(!b)return null;c[a.styleableElements]={classes:b,propertiesOnly:!0};return c}return a.styleToAllowedContentRules?a.styleToAllowedContentRules(this): 921null},getClassesArray:function(){var a=this._.definition.attributes&&this._.definition.attributes["class"];return a?CKEDITOR.tools.trim(a).split(/\s+/):null},applyToRange:a,removeFromRange:a,applyToObject:a})}CKEDITOR.plugins.add("widget",{requires:"lineutils,clipboard,widgetselection",onLoad:function(){void 0!==CKEDITOR.document.$.querySelectorAll&&(CKEDITOR.addCss('.cke_widget_wrapper{position:relative;outline:none}.cke_widget_inline{display:inline-block}.cke_widget_wrapper:hover\x3e.cke_widget_element{outline:2px solid #ffd25c;cursor:default}.cke_widget_wrapper:hover .cke_widget_editable{outline:2px solid #ffd25c}.cke_widget_wrapper.cke_widget_focused\x3e.cke_widget_element,.cke_widget_wrapper .cke_widget_editable.cke_widget_editable_focused{outline:2px solid #47a4f5}.cke_widget_editable{cursor:text}.cke_widget_drag_handler_container{position:absolute;width:15px;height:0;display:block;opacity:0.75;transition:height 0s 0.2s;line-height:0}.cke_widget_wrapper:hover\x3e.cke_widget_drag_handler_container{height:15px;transition:none}.cke_widget_drag_handler_container:hover{opacity:1}.cke_editable[contenteditable\x3d"false"] .cke_widget_drag_handler_container{display:none;}img.cke_widget_drag_handler{cursor:move;width:15px;height:15px;
921display:inline-block}.cke_widget_mask{position:absolute;top:0;left:0;width:100%;height:100%;display:block}.cke_widget_partial_mask{position:absolute;display:block}.cke_editable.cke_widget_dragging, .cke_editable.cke_widget_dragging *{cursor:move !important}'), 922ba())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new d(a))},afterInit:function(a){if(void 0!==CKEDITOR.document.$.querySelectorAll){var b=a.widgets.registered,c,d,e;for(d in b)c=b[d],(e=c.button)&&a.ui.addButton&&a.ui.addButton(CKEDITOR.tools.capitalize(c.name,!0),{label:e,command:c.name,toolbar:"insert,10"});x(a);J(a.undoManager)}}});d.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,c){var d=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=a; 923c._=c._||{};d.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));b(d,c);f(this,c);this.registered[a]=c;if(c.dialog&&d.plugins.dialog)var e=CKEDITOR.on("dialogDefinition",function(a){a=a.data.definition;var b=a.dialog;a.getMode||b.getName()!==c.dialog||(a.getMode=function(){var a=b.getModel(d);return a&&a instanceof CKEDITOR.plugins.widget&&a.ready?CKEDITOR.dialog.EDITING_MODE:CKEDITOR.dialog.CREATION_MODE});e.removeListener()});return c},addUpcastCallback:function(a){this._.upcastCallbacks.push(a)}, 924checkSelection:function(){if(this.editor.getSelection()){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=F(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=h.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()}},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))},del:function(a){if(this.focused===a){var b=a.editor, 925c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper,!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&u(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f<e;++f)(c=this.getByElement(d.getItem(f), 926!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c,a)},finalizeCreation:function(a){(a=a.getFirst())&&h.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(), 927initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]):b=this.registered[a.data("widget")];if(!b)return null;var d=this.wrapElement(a,b.name);return d?d.hasClass("cke_widget_new")?(a=new h(this,this._.nextId++,a,b,c),a.isInited()?this.instances[a.id]=a:null):this.getByElement(a):null},initOnAll:function(a){a=(a||this.editor.editable()).find(".cke_widget_new");for(var b=[],c,d=a.count();d--;)(c=this.initOn(a.getItem(d).getFirst(h.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b= 928Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d=this.instances[c];d.name==a&&d.on.apply(d,b)}this.on("instanceCreated",function(c){c=c.data;c.name==a&&c.on.apply(c,b)})},parseElementClasses:function(a){if(!a)return null;a=CKEDITOR.tools.trim(a).split(/\s+/);for(var b,c={},d=0;b=a.pop();)-1==b.indexOf("cke_")&&(c[b]=d=1);return d?c:null},wrapElement:function(a,b){var c=null,d,e;if(a instanceof CKEDITOR.dom.element){b=b||a.data("widget");d=this.registered[b];if(!d)return null; 929if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c;a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);(e=r(d,a.getName()))&&k(a);c=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());c.setAttributes(w(e,b));c.data("cke-display-name",d.pathName?d.pathName:a.getName());a.getParent(!0)&&c.replace(a);a.appendTo(c)}else if(a instanceof CKEDITOR.htmlParser.element){b=b||a.attributes["data-widget"]; 930d=this.registered[b];
vendor: 6,831 bytes, lines 930-943
930if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&&c.attributes["data-cke-widget-wrapper"])return c;"data-cke-widget-keep-attr"in a.attributes||(a.attributes["data-cke-widget-keep-attr"]=a.attributes["data-widget"]?1:0);b&&(a.attributes["data-widget"]=b);(e=r(d,a.name))&&k(a);c=new CKEDITOR.htmlParser.element(e?"span":"div",w(e,b));c.attributes["data-cke-display-name"]=d.pathName?d.pathName:a.name;d=a.parent;var f;d&&(f=a.getIndex(),a.remove());c.add(a);d&&y(d, 931f,c)}return c},_tests_createEditableFilter:a};CKEDITOR.event.implementOn(d.prototype);h.prototype={addClass:function(a){this.element.addClass(a);this.wrapper.addClass(h.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){I(this,a,1)},checkStyleActive:function(a){a=H(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&& 932this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data","data-cke-widget-keep-attr"]),this.element.removeClass("cke_widget_element"),this.element.replace(this.wrapper));this.wrapper=null},destroyEditable:function(a,b){var c=this.editables[a],d=!0;c.removeListener("focus",E);c.removeListener("blur",K);this.editor.focusManager.remove(c);if(c.filter){for(var e in this.repository.instances){var f=this.repository.instances[e];f.editables&&(f=f.editables[a])&&f!== 933c&&c.filter===f.filter&&(d=!1)}d&&(c.filter.destroy(),(d=this.repository._.filters[this.name])&&delete d[a])}b||(this.repository.destroyAll(!1,c),c.removeClass("cke_widget_editable"),c.removeClass("cke_widget_editable_focused"),c.removeAttributes(["contenteditable","data-cke-widget-editable","data-cke-enter-mode"]));delete this.editables[a]},edit:function(){var a={dialog:this.dialog},b=this;if(!1===this.fire("edit",a)||!a.dialog)return!1;this.editor.openDialog(a.dialog,function(a){var c,d;!1!==b.fire("dialog", 934a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data",function(a){c=1;a.cancel()},null,null,0);b.editor.fire("saveSnapshot");a.commitContent(b);d.removeListener();c&&(b.fire("data",b.data),b.editor.fire("saveSnapshot"))}),a.once("hide",function(){c.removeListener();d.removeListener()}))},b);return!0},getClasses:function(){return this.repository.parseElementClasses(this.element.getAttribute("class"))},getClipboardHtml:function(){var a=this.editor.createRange(); 935a.setStartBefore(this.wrapper);a.setEndAfter(this.wrapper);return this.editor.editable().getHtmlFromRange(a).getHtml()},hasClass:function(a){return this.element.hasClass(a)},initEditable:function(b,c){var d=this._findOneNotNested(c.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new g(this.editor,d,{filter:a.call(this.repository,this.name,b,c)}),this.editables[b]=d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":b,"data-cke-enter-mode":d.enterMode}),d.filter&&d.data("cke-filter", 936d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),c.pathName&&d.data("cke-display-name",c.pathName),this.editor.focusManager.add(d),d.on("focus",E,this),CKEDITOR.env.ie&&d.on("blur",K,this),d._.initialSetData=!0,d.setData(d.getHtml()),!0):!1},_findOneNotNested:function(a){a=this.wrapper.find(a);for(var b,c,d=0;d<a.count();d++)if(b=a.getItem(d),c=b.getAscendant(h.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper|| 937!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection();if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},refreshMask:function(){X(this)},refreshParts:function(a){Y(this,"undefined"!==typeof a?a:!0)},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(h.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){I(this,a,0)},setData:function(a,b){var c=this.data, 938d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=e[a])}d&&this.dataReady&&(da(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused");this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset, 939b={x:b.offsetLeft,y:b.offsetTop-15};CKEDITOR.env.ie&&(b.y=0);c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"),!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(h.prototype);h.getNestedEditable=function(a,b){return!b||b.equals(a)?null:h.isDomNestedEditable(b)?b:h.getNestedEditable(a,b.getParent())};h.isDomDragHandler=function(a){return a.type== 940CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};h.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};h.isDomNestedEditable=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};h.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};h.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")}; 941h.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};h.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};h.isParserWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};h.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";g.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData|| 942this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)},getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var S=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, 943W={37:1,38:1,39:1,40:1,8:1,46:1};
943W[CKEDITOR.SHIFT+121]=1;var V=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection? 944"left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,p=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout, 945q,m,x;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e\u200b\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e\u200b\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);q=c.on("selectionChange",D,null,null,0);m=c.widgets.on("checkSelection",D,null,null,0);e&&(x=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=x);return new CKEDITOR.tools.promise(function(a){p(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();q.removeListener();m.removeListener(); 946c.fire("unlockSnapshot");h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!V.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=d;h.nestedEditable=g})();"use strict";(function(){function d(b){function c(){this.deflated||(b.widgets.focused==this.widget&&(this.focused=!0),b.widgets.destroy(this.widget),this.deflated=!0)}function d(){var a=b.editable(),c=b.document;if(this.deflated)this.widget=b.widgets.initOn(this.element, 947"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,a)).block&&(a=c.createElement(b.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),a.replace(this.widget.wrapper),this.widget.wrapper.move(a)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var e=this.widget,a=f,c=e.wrapper,g=e.data.align,e=e.data.hasCaption;if(a){for(var h=3;h--;)c.removeClass(a[h]);"center"==g?e&&c.addClass(a[1]):"none"!=g&&c.addClass(a[y[g]])}else"center"== 948g?(e?c.setStyle("text-align","center"):c.removeStyle("text-align"),c.removeStyle("float")):("none"==g?c.removeStyle("float"):c.setStyle("float",g),c.removeStyle("text-align"))}}var f=b.config.image2_alignClasses,k=b.config.image2_captionedClass;return{allowedContent:e(b),requiredContent:"img[src,alt]",features:a(b),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}}, 949parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var a=this.features;this.data.hasCaption&&!b.filter.checkFeature(a.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||b.filter.checkFeature(a.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:c,inflate:d});this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&& 950delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var e in this.data.classes)this.parts.image.removeClass(e);if(b.filter.checkFeature(a.dimension)){a=this.data;a={width:a.width,height:a.height};e=this.parts.image;for(var f in a)a[f]?e.setAttribute(f,a[f]):e.removeAttribute(f)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var a=CKEDITOR.plugins.image2, 951c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.getAttribute("width")||"",height:c.getAttribute("height")||"",lock:this.ready?a.checkHasNaturalRatio(c):!0},e=c.getAscendant("a");e&&this.wrapper.contains(e)&&(this.parts.link=e);d.align||(c=d.hasCaption?this.element:c,f?(c.hasClass(f[0])?d.align="left":c.hasClass(f[2])&&(d.align="right"),d.align?c.removeClass(f[y[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float"))); 952b.plugins.link&&this.parts.link&&(d.link=a.getLinkAttributesParser()(b,this.parts.link),(c=d.link.advanced)&&c.advCSSClasse
952s&&(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(d);b.filter.checkFeature(this.features.dimension)&&!0!==b.config.image2_disableResizer&&m(this);this.shiftState=a.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF; 953if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF})},addClass:function(a){n(this).addClass(a)},hasClass:function(a){return n(this).hasClass(a)},removeClass:function(a){n(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+[].concat(k,f).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(b),downcast:g(b),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/, 954(this.data.alt||"")+" "+this.pathName)}}}function h(a){var c=b(a),d=a.config.image2_captionedClass;return function(a,b){var e={width:1,height:1},g=a.name,h;if(!a.attributes["data-cke-realelement"]&&(c(a)?("div"==g&&(h=a.getFirst("figure"))&&(a.replaceWith(h),a=h),b.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==g&&a.hasClass(d)?h=a.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:f(a)&&(h="a"==a.name?a.children[0]: 955a),h)){for(var k in e)(e=h.attributes[k])&&e.match(r)&&delete h.attributes[k];return a}}}function g(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var f=a.getFirst("span");f&&f.replaceWith(f.getFirst({img:1,a:1}))}e&&"none"!=e&&(f=CKEDITOR.tools.parseCssText(d.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1, 956right:1}&&(b?c.addClass(b[y[e]]):f["float"]=e),b||CKEDITOR.tools.isEmpty(f)||(d.style=CKEDITOR.tools.writeCssText(f)));return a}}function b(a){var b=a.config.image2_captionedClass,c=a.config.image2_alignClasses,d={figure:1,a:1,img:1};return function(e){if(!(e.name in{div:1,p:1}))return!1;var g=e.children;if(1!==g.length)return!1;g=g[0];if(!(g.name in d))return!1;if("p"==e.name){if(!f(g))return!1}else if("figure"==g.name){if(!g.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!f(g))return!1; 957return(c?e.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(e.attributes.style||"",!0)["text-align"])?!0:!1}}function f(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function m(a){var b=a.editor,c=b.editable(),d=b.document,e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("\u200b",d));if(a.inline)a.wrapper.append(e);else{var f=a.parts.link||a.parts.image,g=f.getParent(), 958h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(f);h.append(e);a.element.append(h,!0);g.is("span")&&g.remove()}e.on("mousedown",function(f){function g(a,b,c){var e=CKEDITOR.document,f=[];d.equals(e)||f.push(e.on(a,b));f.push(d.on(a,b));if(c)for(a=f.length;a--;)c.push(f.pop())}function h(){R=A+m*L;X=Math.round(R/r)}function k(){X=w-U;R=Math.round(X*r)}var l=a.parts.image,q=function(){var a=b.config.image2_maxSize,c;if(!a)return null;a=CKEDITOR.tools.copy(a);c=CKEDITOR.plugins.image2.getNatural(l); 959a.width=Math.max("natural"===a.width?c.width:a.width,15);a.height=Math.max("natural"===a.height?c.height:a.height,15);return a}(),m="right"==a.data.align?-1:1,v=f.data.$.screenX,n=f.data.$.screenY,A=l.$.clientWidth,w=l.$.clientHeight,r=A/w,y=[],N="cke_image_s"+(~m?"e":"w"),Y,R,X,ea,L,U,Z;b.fire("saveSnapshot");g("mousemove",function(a){Y=a.data.$;L=Y.screenX-v;U=n-Y.screenY;Z=Math.abs(L/U);1==m?0>=L?0>=U?h():Z>=r?h():k():0>=U?Z>=r?k():h():k():0>=L?0>=U?Z>=r?k():h():k():0>=U?h():Z>=r?h():k();a=q&& 960(R>q.width||X>q.height);15>R||15>X||a||(ea={width:R,height:X},l.setAttributes(ea))},y);g("mouseup",function(){for(var d;d=y.pop();)d.removeListener();c.removeClass(N);e.removeClass("cke_image_resizing");ea&&(a.setData(ea),b.fire("saveSnapshot"));ea=!1},y);c.addClass(N);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function l(a){var b=[],d;return function(e){var f=a.getCommand("justify"+e);if(f){b.push(function(){f.refresh(a, 961a.elementPath())});if(e in{right:1,left:1,center:1})f.on("exec",function(d){var f=c(a);if(f){f.setData("align",e);for(f=b.length;f--;)b[f]();d.cancel()}});f.on("refresh",function(b){var f=c(a),g={right:1,left:1,center:1};f&&(void 0===d&&(d=a.filter.checkFeature(a.widgets.registered.image.features.align)),d?this.setState(f.data.align==e?CKEDITOR.TRISTATE_ON:e in g?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function k(a){if(a.plugins.link){var b= 962CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var d=b.onShow,e=b.onOk;b.onShow=function(){var b=c(a),e=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();
962b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),e.hide()):(e.show(),d.apply(this,arguments))};b.onOk=function(){var b=c(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);b.setData("link",d)}else e.apply(this, 963arguments)}}});a.on("destroy",function(){b.removeListener()});a.getCommand("unlink").on("exec",function(b){var d=c(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())});a.getCommand("unlink").on("refresh",function(b){var d=c(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}function c(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function e(a){var c=a.config.image2_alignClasses; 964a={div:{match:b(a)},p:{match:b(a)},img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+a.config.image2_captionedClass},figcaption:!0};c?(a.div.classes=c[1],a.p.classes=a.div.classes,a.img.classes=c[0]+","+c[2],a.figure.classes+=","+a.img.classes):(a.div.styles="text-align",a.p.styles="text-align",a.img.styles="float",a.figure.styles="float,display");return a}function a(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a? 965"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}}function n(a){return a.data.hasCaption?a.element:a.parts.image}var w=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),y={left:0,center:1,right:2},r=/^\s*(\d+%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')}, 966init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,c=a.lang.image2,e=d(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;e.pathName=c.pathName;e.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",e);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:c.menu,command:"image", 967group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=l(a),d;for(d in b)c(d);k(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,f){var g={};e?g.attributes={"class":e[1]}:g.styles={"text-align":"center"};g=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",g);c(g,f);f.move(g);return g}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START); 968d.remove();g.insertElementIntoRange(b,e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,f=a.config.image2_captionedClass,g=a.editable(),h=["hasCaption","align","link"],k={align:function(c,d,f){var g=c.element;c.changed.align?c.newData.hasCaption||("center"==f&&(c.deflate(),c.element=b(a,g)),c.changed.hasCaption||"center"!=d||"center"==f||(c.deflate(),d=g.findOne("a,img"),d.replace(g),c.element=d)):"center"==f&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element= 969b(a,g));!e&&g.is("figure")&&("center"==f?g.setStyle("display","inline-block"):g.removeStyle("display"))},hasCaption:function(b,e,g){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),g?(g=CKEDITOR.dom.element.createFromHtml(w.output({captionedClass:f,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(g,b.element),e.replace(g.findOne("img")),b.element=g):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var f=b.element.is("img")? 970b.element:b.element.findOne("img"),g=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(f),f.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||g).setAttributes(e.set),e.removed.length&&(k||g).removeAttributes(e.removed)):(e=g.findOne("img"),e.replace(g),k=e);h&&(b.element=k)}}};return function(a){var b,c; 971a.changed={};for(c=0;c<h.length;c++)b=h[c],a.changed[b]=a.oldData?a.oldData[b]!==a.newData[b]:!1;for(c=0;c<h.length;c++)b=h[c],k[b](a,a.oldData?a.oldData[b]:null,a.newData[b]);a.inflate()}},checkHasNaturalRatio:function(a){var b=a.$;a=this.getNatural(a);return Math.round(b.clientWidth/a.width*a.height)==b.clientHeight||Math.round(b.clientHeight/a.height*a.width)==b.clientWidth}
971,getNatural:function(a){if(a.$.naturalWidth)a={width:a.$.naturalWidth,height:a.$.naturalHeight};else{var b=new Image;b.src= 972a.getAttribute("src");a={width:b.width,height:b.height}}return a},getLinkAttributesGetter:function(){return CKEDITOR.plugins.link.getLinkAttributes},getLinkAttributesParser:function(){return CKEDITOR.plugins.link.parseLinkAttributes}}})();CKEDITOR.config.image2_captionedClass="image";(function(){CKEDITOR.plugins.add("imagespacingbox",{init:function(d){CKEDITOR.on("dialogDefinition",function(h){var g=h.data.definition;"image2"===h.data.dialog.getName()&&(h=g.getContents("info"),h.get("spacingBox")|| 973(g={children:[{children:[{commit:function(b){b.setData("hspace",this.getValue());var d=b.data.hspace;(b=b.parts.image)&&d&&b.setStyles({"margin-left":d+"px","margin-right":d+"px"})},id:"hspace",label:d.lang.image.hSpace,requiredContent:"img{margin-left,margin-right}",setup:function(b){this.setValue(b.data.hspace)},type:"text",validate:CKEDITOR.dialog.validate.integer(d.lang.image.validateHSpace)}],type:"hbox"},{children:[{commit:function(b){b.setData("vspace",this.getValue());var d=b.data.vspace; 974(b=b.parts.image)&&d&&b.setStyles({"margin-bottom":d+"px","margin-top":d+"px"})},id:"vspace",label:d.lang.image.vSpace,requiredContent:"img{margin-top,margin-bottom}",setup:function(b){this.setValue(b.data.vspace)},type:"text",validate:CKEDITOR.dialog.validate.integer(d.lang.image.validateVSpace)}],type:"hbox"}],id:"spacingBox",type:"hbox"},h.add(g)))})}})})();(function(){function d(b,d){var m,l;d.on("refresh",function(b){var c=[h],d;for(d in b.data.states)c.push(b.data.states[d]);this.setState(CKEDITOR.tools.search(c, 975g)?g:h)},d,null,100);d.on("exec",function(d){m=b.getSelection();l=m.createBookmarks(1);d.data||(d.data={});d.data.done=!1},d,null,0);d.on("exec",function(){b.forceNextSelectionCheck();m.selectBookmarks(l)},d,null,100)}var h=CKEDITOR.TRISTATE_DISABLED,g=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var f=CKEDITOR.plugins.indent.genericDefinition;d(b,b.addCommand("indent",new f(!0)));d(b,b.addCommand("outdent",new f));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent, 976command:"indent",directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged",function(d){var f=b.createRange(),g=d.data.node;f.setStartBefore(g);f.setEndAfter(g);for(var c=new CKEDITOR.dom.walker(f),e;e=c.next();)if(e.type==CKEDITOR.NODE_ELEMENT)if(!e.equals(g)&&e.getDirection())f.setStartAfter(e),c=new CKEDITOR.dom.walker(f);else{var a=b.config.indentClasses;if(a)for(var h="ltr"==d.data.dir?["_rtl", 977""]:["","_rtl"],w=0;w<a.length;w++)e.hasClass(a[w]+h[0])&&(e.removeClass(a[w]+h[0]),e.addClass(a[w]+h[1]));a=e.getStyle("margin-right");h=e.getStyle("margin-left");a?e.setStyle("margin-left",a):e.removeStyle("margin-left");h?e.setStyle("margin-right",h):e.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(b){this.isIndent=!!b;this.startDisabled=!this.isIndent},specificDefinition:function(b,d,g){this.name=d;this.editor=b;this.jobs={};this.enterBr=b.config.enterMode== 978CKEDITOR.ENTER_BR;this.isIndent=!!g;this.relatedGlobal=g?"indent":"outdent";this.indentKey=g?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(b,d){b.on("pluginsLoaded",function(){for(var b in d)(function(b,d){var c=b.getCommand(d.relatedGlobal),e;for(e in d.jobs)c.on("exec",function(a){a.data.done||(b.fire("lockSnapshot"),d.execJob(b,e)&&(a.data.done=!0),b.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(d.database))},this,null,e),c.on("refresh",function(a){a.data.states|| 979(a.data.states={});a.data.states[d.name+"@"+e]=d.refreshJob(b,e,a.data.path)},this,null,e);b.addFeature(d)})(this,d[b])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype={execJob:function(b,d){var g=this.jobs[d];if(g.state!=h)return g.exec.call(this,b)},refreshJob:function(b,d,g){d=this.jobs[d];b.activeFilter.checkFeature(this)?d.state=d.refresh.call(this,b,g):d.state=h;return d.state},getContext:function(b){return b.contains(this.context)}}})(); 980(function(){function d(b){function c(c){for(var h=l.startContainer,p=l.endContainer;h&&!h.getParent().equals(c);)h=h.getParent();for(;p&&!p.getParent().equals(c);)p=p.getParent();if(!h||!p)return!1;for(var m=[],v=!1;!v;
vendor: 15,123 bytes, lines 980-1009
980)h.equals(p)&&(v=!0),m.push(h),h=h.getNext();if(1>m.length)return!1;h=c.getParents(!0);for(p=0;p<h.length;p++)if(h[p].getName&&f[h[p].getName()]){c=h[p];break}for(var h=d.isIndent?1:-1,p=m[0],m=m[m.length-1],v=CKEDITOR.plugins.list.listToArray(c,a),q=v[m.getCustomData("listarray_index")].indent, 981p=p.getCustomData("listarray_index");p<=m.getCustomData("listarray_index");p++)if(v[p].indent+=h,0<h){for(var t=v[p].parent,B=p-1;0<=B;B--)if(v[B].indent===h){t=v[B].parent;break}v[p].parent=new CKEDITOR.dom.element(t.getName(),t.getDocument())}for(p=m.getCustomData("listarray_index")+1;p<v.length&&v[p].indent>q;p++)v[p].indent+=h;h=CKEDITOR.plugins.list.arrayToList(v,a,null,b.config.enterMode,c.getDirection());if(!d.isIndent){var r;if((r=c.getParent())&&r.is("li"))for(var m=h.listNode.getChildren(), 982G=[],y,p=m.count()-1;0<=p;p--)(y=m.getItem(p))&&y.is&&y.is("li")&&G.push(y)}h&&h.listNode.replace(c);if(G&&G.length)for(p=0;p<G.length;p++){for(y=c=G[p];(y=y.getNext())&&y.is&&y.getName()in f;)CKEDITOR.env.needsNbspFiller&&!c.getFirst(g)&&c.append(l.document.createText("\u00a0")),c.append(y);c.insertAfter(r)}h&&b.fire("contentDomInvalidated");return!0}for(var d=this,a=this.database,f=this.context,l,m=b.getSelection(),m=(m&&m.getRanges()).createIterator();l=m.getNextRange();){for(var r=l.getCommonAncestor();r&& 983(r.type!=CKEDITOR.NODE_ELEMENT||!f[r.getName()]);){if(b.editable().equals(r)){r=!1;break}r=r.getParent()}r||(r=l.startPath().contains(f))&&l.setEndAt(r,CKEDITOR.POSITION_BEFORE_END);if(!r){var t=l.getEnclosedNode();t&&t.type==CKEDITOR.NODE_ELEMENT&&t.getName()in f&&(l.setStartAt(t,CKEDITOR.POSITION_AFTER_START),l.setEndAt(t,CKEDITOR.POSITION_BEFORE_END),r=t)}r&&l.startContainer.type==CKEDITOR.NODE_ELEMENT&&l.startContainer.getName()in f&&(t=new CKEDITOR.dom.walker(l),t.evaluator=h,l.startContainer= 984t.next());r&&l.endContainer.type==CKEDITOR.NODE_ELEMENT&&l.endContainer.getName()in f&&(t=new CKEDITOR.dom.walker(l),t.evaluator=h,l.endContainer=t.previous());if(r)return c(r)}return 0}function h(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.is("li")}function g(d){return b(d)&&f(d)}var b=CKEDITOR.dom.walker.whitespaces(!0),f=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function c(a){e.specificDefinition.apply(this, 985arguments);this.requiredContent=["ul","ol"];a.on("key",function(b){var c=a.elementPath();if("wysiwyg"==a.mode&&b.data.keyCode==this.indentKey&&c){var d=this.getContext(c);!d||this.isIndent&&CKEDITOR.plugins.indentList.firstItemInPath(this.context,c,d)||(a.execCommand(this.relatedGlobal),b.cancel())}},this);this.jobs[this.isIndent?10:30]={refresh:this.isIndent?function(a,b){var c=this.getContext(b),d=CKEDITOR.plugins.indentList.firstItemInPath(this.context,b,c);return c&&this.isIndent&&!d?l:m}:function(a, 986b){return!this.getContext(b)||this.isIndent?m:l},exec:CKEDITOR.tools.bind(d,this)}}var e=CKEDITOR.plugins.indent;e.registerCommands(b,{indentlist:new c(b,"indentlist",!0),outdentlist:new c(b,"outdentlist")});CKEDITOR.tools.extend(c.prototype,e.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(b,c,d){var a=c.contains(h);d||(d=c.contains(b));return d&&a&&a.equals(d.getFirst(h))}})();(function(){function d(b,d,c){if(!b.getCustomData("indent_processed")){var e= 987this.editor,a=this.isIndent;if(d){e=b.$.className.match(this.classNameRegex);c=0;e&&(e=e[1],c=CKEDITOR.tools.indexOf(d,e)+1);if(0>(c+=a?1:-1))return;c=Math.min(c,d.length);c=Math.max(c,0);b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.classNameRegex,""));0<c&&b.addClass(d[c-1])}else{d=h(b,c);c=parseInt(b.getStyle(d),10);var f=e.config.indentOffset||40;isNaN(c)&&(c=0);c+=(a?1:-1)*f;if(0>c)return;c=Math.max(c,0);c=Math.ceil(c/f)*f;b.setStyle(d,c?c+(e.config.indentUnit||"px"):"");""=== 988b.getAttribute("style")&&b.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,b,"indent_processed",1)}}function h(b,d){return"ltr"==(d||b.getComputedStyle("direction"))?"margin-left":"margin-right"}var g=CKEDITOR.dtd.$listItem,b=CKEDITOR.dtd.$list,f=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(l){function k(){c.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0, 989styles:e?null:"margin-left,margin-right",classes:e||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&&(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(e? 990"("+e.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var c=b.block||b.blockLimit;if(!c.is(g))var d=c.getAscendant(g),c=d&&b.contains(d)||c;c.is(g)&&(c=c.getParent());if(this.enterBr||this.getContext(b)){if(e){var d=e,c=c.$.className.match(this.classNameRegex),k=this.isIndent,d=c?k?c[1]!=d.slice(-1):!0:k;return d?m:f}return this.isIndent?m:c?CKEDITOR[0>=(parseInt(c.getStyle(h(c)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:f}return f},exec:function(a){var c=a.getSelection(),c= 991c&&c.getRanges()[0],f;if(f=a.elementPath().contains(b))d.call(this,f,e);else for(c=c.createIterator(),a=a.config.enterMode,c.enforceRealBlocks=!0,c.enlargeBr=a!=CKEDITOR.ENTER_BR;f=c.getNextParagraph(a==CKEDITOR.ENTER_P?"p":"div");)f.isReadOnly()||d.call(this,f,e);return!0}}}}var c=CKEDITOR.plugins.indent,e=l.config.indentClasses;c.registerCommands(l,{indentblock:new k(l,"indentblock",!0),outdentblock:new k(l,"outdentblock")});CKEDITOR.tools.extend(k.prototype,c.specificDefinition.prototype,{context:{div:1, 992dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:e?new RegExp("(?:^|\\s+)("+e.join("|")+")(?\x3d$|\\s)"):null})}})})();(function(){function d(b,d){d=void 0===d||d;var g;if(d)g=b.getComputedStyle("text-align");else{for(;!b.hasAttribute||!b.hasAttribute("align")&&!b.getStyle("text-align");){g=b.getParent();if(!g)break;b=g}g=b.getStyle("text-align")||b.getAttribute("align")||""}g&&(g=g.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!g&&d&&(g="rtl"==b.getComputedStyle("direction")? 993"right":"left");return g}function h(b,d,g){this.editor=b;this.name=d;this.value=g;this.context="p";d=b.config.justifyClasses;var h=b.config.enterMode==CKEDITOR.ENTER_P?"p":"div";if(d){switch(g){case "left":this.cssClassName=d[0];break;case "center":this.cssClassName=d[1];break;case "right":this.cssClassName=d[2];break;case "justify":this.cssClassName=d[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+d.join("|")+")(?\x3d$|\\s)");this.requiredContent=h+"("+this.cssClassName+")"}else this.requiredContent= 994h+"{text-align}";this.allowedContent={"caption div h1 h2 h3 h4 h5 h6 p pre td th li":{propertiesOnly:!0,styles:this.cssClassName?null:"text-align",classes:this.cssClassName||null}};b.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function g(b){var d=b.editor,g=d.createRange();g.setStartBefore(b.data.node);g.setEndAfter(b.data.node);for(var h=new CKEDITOR.dom.walker(g),k;k=h.next();)if(k.type==CKEDITOR.NODE_ELEMENT)if(!k.equals(b.data.node)&&k.getDirection())g.setStartAfter(k),h= 995new CKEDITOR.dom.walker(g);else{var c=d.config.justifyClasses;c&&(k.hasClass(c[0])?(k.removeClass(c[0]),k.addClass(c[2])):k.hasClass(c[2])&&(k.removeClass(c[2]),k.addClass(c[0])));c=k.getStyle("text-align");"left"==c?k.setStyle("text-align","right"):"right"==c&&k.setStyle("text-align","left")}}h.prototype={exec:function(b){var f=b.getSelection(),g=b.config.enterMode;if(f){for(var h=f.createBookmarks(),k=f.getRanges(),c=this.cssClassName,e,a,n=b.config.useComputedState,n=void 0===n||n,w=k.length-1;0<= 996w;w--)for(e=k[w].createIterator(),e.enlargeBr=g!=CKEDITOR.ENTER_BR;a=e.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){var y=a.getName(),r;r=b.activeFilter.check(y+"{text-align}");if((y=b.activeFilter.check(y+"("+c+")"))||r){a.removeAttribute("align");a.removeStyle("text-align");var t=c&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),u=this.state==CKEDITOR.TRISTATE_OFF&&(!n||d(a,!0)!=this.value);c&&y?u?a.addClass(c):t||a.removeAttribute("class"): 997u&&r&&a.setStyle("text-align",this.value)}}b.focus();b.forceNextSelectionCheck();f.selectBookmarks(h)}},refresh:function(b,f){var g=f.block||f.blockLimit,h=g.getName(),k=g.equals(b.editable()),h=this.cssClassName?b.activeFilter.check(h+"("+this.cssClassName+")"):b.activeFilter.check(h+"{text-align}");k&&!CKEDITOR.dtd.$list[f.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!k&&h?this.setState(d(g,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF): 998this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(b){if(!b.blockless){var d=new h(b,"justifyleft","left"),m=new h(b,"justifycenter","center"),l=new h(b,"justifyright","right"),k=new h(b,"justifyblock","justify");b.addCommand("justifyleft",d);b.addCommand("justifycenter",m);b.addCommand("justifyright",l);b.addCommand("justifyblock",k);b.ui.addButton&&(b.ui.addButton("JustifyLeft",{label:b.lang.common.alignLeft,command:"justifyleft",toolbar:"align,10"}),b.ui.addButton("JustifyCenter", 999{label:b.lang.common.center,command:"justifycenter",toolbar:"align,20"}),b.ui.addButton("JustifyRight",{label:b.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}),b.ui.addButton("JustifyBlock",{label:b.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));b.on("dirChanged",g)}}})})();(function(){function d(d,f){var g=b.exec(d),c=b.exec(f);if(g){if(!g[2]&&"px"==c[2])return c[1];if("px"==g[2]&&!c[2])return c[1]+"px"}return f}var h=CKEDITOR.htmlParser.cssStyle,g=CKEDITOR.tools.cssLength, 1000b=/^((?:\d*(?:\.\d+))|(?:\d+))(.*)?$/i,f={elements:{$:function(b){var f=b.attributes;if((f=(f=(f=f&&f["data-cke-realelement"])&&new CKEDITOR.htmlParser.fragment.fromHtml(decodeURIComponent(f)))&&f.children[0])&&b.attributes["data-cke-resizable"]){var g=(new h(b)).rules;b=f.attributes;var c=g.width,g=g.height;c&&(b.width=d(b.width,c));g&&(b.height=d(b.height,g))}return f}}};CKEDITOR.plugins.add("fakeobjects",{init:function(b){b.filter.allow("img[!data-cke-realelement,src,alt,title](*){*}","fakeobjects")}, 1001afterInit:function(b){(b=(b=b.dataProcessor)&&b.htmlFilter)&&b.addRules(f,{applyToAll:!0})}});CKEDITOR.editor.prototype.createFakeElement=function(b,d,f,c){var e=this.lang.fakeobjects,e=e[f]||e.unknown;d={"class":d,"data-cke-realelement":encodeURIComponent(b.getOuterHtml()),"data-cke-real-node-type":b.type,alt:e,title:e,align:b.getAttribute("align")||""};CKEDITOR.env.hc||(d.src=CKEDITOR.tools.transparentImageData);f&&(d["data-cke-real-element-type"]=f);c&&(d["data-cke-resizable"]=c,f=new h,c=b.getAttribute("width"), 1002b=b.getAttribute("height"),c&&(f.rules.width=g(c)),b&&(f.rules.height=g(b)),f.populate(d));return this.document.createElement("img",{attributes:d})};CKEDITOR.editor.prototype.createFakeParserElement=function(b,d,f,c){var e=this.lang.fakeobjects,e=e[f]||e.unknown,a;a=new CKEDITOR.htmlParser.basicWriter;b.writeHtml(a);a=a.getHtml();d={"class":d,"data-cke-realelement":encodeURIComponent(a),"data-cke-real-node-type":b.type,alt:e,title:e,align:b.attributes.align||""};CKEDITOR.env.hc||(d.src=CKEDITOR.tools.transparentImageData); 1003f&&(d["data-cke-real-element-type"]=f);c&&(d["data-cke-resizable"]=c,c=b.attributes,b=new h,f=c.width,c=c.height,void 0!==f&&(b.rules.width=g(f)),void 0!==c&&(b.rules.height=g(c)),b.populate(d));return new CKEDITOR.htmlParser.element("img",d)};CKEDITOR.editor.prototype.restoreRealElement=function(b){if(b.data("cke-real-node-type")!=CKEDITOR.NODE_ELEMENT)return null;var f=CKEDITOR.dom.element.createFromHtml(decodeURIComponent(b.data("cke-realelement")),this.document);if(b.data("cke-resizable")){var g= 1004b.getStyle("width");b=b.getStyle("height");g&&f.setAttribute("width",d(f.getAttribute("width"),g));b&&f.setAttribute("height",d(f.getAttribute("height"),b))}return f}})();"use strict";(function(){function d(a){return a.replace(/'/g,"\\$\x26")}function h(a){for(var b=a.length,c=[],d,e=0;e<b;e++)d=a.charCodeAt(e),c.push(d);return"String.fromCharCode("+c.join(",")+")"}function g(a,b){for(var c=a.plugins.link,e=c.compiledProtectionFunction.params,c=[c.compiledProtectionFunction.name,"("],f,g,h=0;h<e.length;h++)f= 1005e[h].toLowerCase(),g=b[f],0<h&&c.push(","),c.push("'",g?d(encodeURIComponent(b[f])):"","'");c.push(")");return c.join("")}function b(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,function(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)} 1006var 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]{"+b+"padding-%1:18px;cursor:auto;}.%2 img.cke_anchor{"+b+"width:16px;min-height:15px;height:1.15em;vertical-align:text-bottom;}";CKEDITOR.addCss(a("ltr")+a("rtl"))},init:function(a){var c="a[!href]";CKEDITOR.dialog.isTabEnabled(a, 1007"link","advanced")&&(c=c.replace("]",",accesskey,charset,dir,id,lang,name,rel,tabindex,title,type,download]{*}(*)"));CKEDITOR.dialog.isTabEnabled(a,"link","target")&&(c=c.replace("]",",target,onclick]"));a.addCommand("link",new CKEDITOR.dialogCommand("link",{allowedContent:c,requiredContent:"a[href]"}));a.addCommand("anchor",new CKEDITOR.dialogCommand("anchor",{allowedContent:"a[!name,id]",requiredContent:"a[name]"}));a.addCommand("unlink",new CKEDITOR.unlinkCommand);a.addCommand("removeAnchor",new CKEDITOR.removeAnchorCommand); 1008a.setKeystroke(CKEDITOR.CTRL+76,"link");a.setKeystroke(CKEDITOR.CTRL+75,"link");a.ui.addButton&&(a.ui.addButton("Link",{label:a.lang.link.toolbar,command:"link",toolbar:"links,10"}),a.ui.addButton("Unlink",{label:a.lang.link.unlink,command:"unlink",toolbar:"links,20"}),a.ui.addButton("Anchor",{label:a.lang.link.anchor.toolbar,command:"anchor",toolbar:"links,30"}));CKEDITOR.dialog.add("link",this.path+"dialogs/link.js");CKEDITOR.dialog.add("anchor",this.path+"dialogs/anchor.js");a.on("doubleclick", 1009function(b){var c=b.data.element.getAscendant({a:1,img:1},!0);c&&!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,null,0);a.on("doubleclick",function(b){b.data.dialog in{link:1,anchor:1}&&b.data.link&&a.getSelection().selectElement(b.data.link)},null,null,20);
vendor: 20,064 bytes, lines 1009-1048
1009a.addMenuItems&&a.addMenuItems({anchor:{label:a.lang.link.anchor.menu, 1010command:"anchor",group:"anchor",order:1},removeAnchor:{label:a.lang.link.anchor.remove,command:"removeAnchor",group:"anchor",order:5},link:{label:a.lang.link.menu,command:"link",group:"link",order:1},unlink:{label:a.lang.link.unlink,command:"unlink",group:"link",order:5}});a.contextMenu&&a.contextMenu.addListener(function(b){if(!b||b.isReadOnly())return null;b=CKEDITOR.plugins.link.tryRestoreFakeAnchor(a,b);if(!b&&!(b=CKEDITOR.plugins.link.getSelectedLink(a)))return null;var c={};b.getAttribute("href")&& 1011b.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=b(a)},afterInit:function(a){a.dataProcessor.dataFilter.addRules({elements:{a:function(b){return b.attributes.name?b.children.length?null:a.createFakeParserElement(b,"cke_anchor","anchor"):null}}});var b=a._.elementsPath&&a._.elementsPath.filters;b&&b.push(function(b,c){if("a"==c&&(CKEDITOR.plugins.link.tryRestoreFakeAnchor(a, 1012b)||b.getAttribute("name")&&(!b.getAttribute("href")||!b.getChildCount())))return"anchor"})}});var f=/^javascript:/,m=/^(?:mailto)(?:(?!\?(subject|body)=).)+/i,l=/subject=([^;?:@&=$,\/]*)/i,k=/body=([^;?:@&=$,\/]*)/i,c=/^#(.*)$/,e=/^((?:http|https|ftp|news):\/\/)?(.*)$/,a=/^(_(?:self|top|parent|blank))$/,n=/^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,w=/^javascript:([^(]+)\(([^)]+)\)$/,y=/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/, 1013r=/(?:^|,)([^=]+)=(\d+|yes|no)/gi,t=/^tel:(.*)$/,u={id:"advId",dir:"advLangDir",accessKey:"advAccessKey",name:"advName",lang:"advLangCode",tabindex:"advTabIndex",title:"advTitle",type:"advContentType","class":"advCSSClasses",charset:"advCharset",style:"advStyles",rel:"advRel"};CKEDITOR.plugins.link={getSelectedLink:function(a,b){var c=a.getSelection(),d=c.getSelectedElement(),e=c.getRanges(),f=[],g;if(!b&&d&&d.is("a"))return d;for(d=0;d<e.length;d++)if(g=c.getRanges()[d],g.shrink(CKEDITOR.SHRINK_ELEMENT, 1014!0,{skipBogus:!0}),(g=a.elementPath(g.getCommonAncestor()).contains("a",1))&&b)f.push(g);else if(g)return g;return b?f: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,f;f=b.getItem(e++);)(f.data("cke-saved-name")||f.hasAttribute("name"))&&d.push({name:f.data("cke-saved-name")||f.getAttribute("name"),id:f.getAttribute("id")});for(e=0;f=c.getItem(e++);)(f=this.tryRestoreFakeAnchor(a, 1015f))&&d.push({name:f.getAttribute("name"),id:f.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(b,d){var g=d&&(d.data("cke-saved-href")||d.getAttribute("href"))||"",h=b.plugins.link.compiledProtectionFunction,q=b.config.emailProtection,A={},B;g.match(f)&&("encode"==q?g=g.replace(n,function(a, 1016b,c){c=c||"";return"mailto:"+String.fromCharCode.apply(String,b.split(","))+c.replace(/\\'/g,"'")}):q&&g.replace(w,function(a,b,c){if(b==h.name){A.type="email";a=A.email={};b=/(^')|('$)/g;c=c.match(/[^,\s]+/g);for(var d=c.length,e,f,g=0;g<d;g++)e=decodeURIComponent,f=c[g].replace(b,"").replace(/\\'/g,"'"),f=e(f),e=h.params[g].toLowerCase(),a[e]=f;a.address=[a.name,a.domain].join("@")}}));if(!A.type)if(q=g.match(c))A.type="anchor",A.anchor={},A.anchor.name=A.anchor.id=q[1];else if(q=g.match(t))A.type= 1017"tel",A.tel=q[1];else if(q=g.match(m)){B=g.match(l);var g=g.match(k),C=A.email={};A.type="email";C.address=q[0].replace("mailto:","");B&&(C.subject=decodeURIComponent(B[1]));g&&(C.body=decodeURIComponent(g[1]))}else g&&(B=g.match(e))&&(A.type="url",A.url={},A.url.protocol=B[1],A.url.url=B[2]);if(d){if(g=d.getAttribute("target"))A.target={type:g.match(a)?g:"frame",name:g};else if(g=(g=d.data("cke-pa-onclick")||d.getAttribute("onclick"))&&g.match(y))for(A.target={type:"popup",name:g[1]};q=r.exec(g[2]);)"yes"!= 1018q[2]&&"1"!=q[2]||q[1]in{height:1,width:1,top:1,left:1}?isFinite(q[2])&&(A.target[q[1]]=q[2]):A.target[q[1]]=!0;null!==d.getAttribute("download")&&(A.download=!0);var g={},G;for(G in u)(q=d.getAttribute(G))&&(g[u[G]]=q);if(G=d.data("cke-saved-name")||g.advName)g.advName=G;CKEDITOR.tools.isEmpty(g)||(A.advanced=g)}return A},getLinkAttributes:function(a,b){var c=a.config.emailProtection||"",e={};switch(b.type){case "url":var c=b.url&&void 0!==b.url.protocol?b.url.protocol:"http://",f=b.url&&CKEDITOR.tools.trim(b.url.url)|| 1019"";e["data-cke-saved-href"]=0===f.indexOf("/")?f:c+f;break;case "anchor":c=b.anchor&&b.anchor.id;e["data-cke-saved-href"]="#"+(b.anchor&&b.anchor.name||c||"");break;case "email":var k=b.email,f=k.address;switch(c){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"==c?(c=["javascript:void(location.href\x3d'mailto:'+",h(f)],k&&c.push("+'",d(k),"'"),c.push(")")): 1020c=["mailto:",f,k];break;default:c=f.split("@",2),k.name=c[0],k.domain=c[1],c=["javascript:",g(a,k)]}e["data-cke-saved-href"]=c.join("");break;case "tel":e["data-cke-saved-href"]="tel:"+b.tel}if(b.target)if("popup"==b.target.type){for(var c=["window.open(this.href, '",b.target.name||"","', '"],n="resizable status location toolbar menubar fullscreen scrollbars dependent".split(" "),f=n.length,l=function(a){b.target[a]&&n.push(a+"\x3d"+b.target[a])},k=0;k<f;k++)n[k]+=b.target[n[k]]?"\x3dyes":"\x3dno"; 1021l("width");l("left");l("height");l("top");c.push(n.join(","),"'); return false;");e["data-cke-pa-onclick"]=c.join("")}else"notSet"!=b.target.type&&b.target.name&&(e.target=b.target.name);b.download&&(e.download="");if(b.advanced){for(var t in u)(c=b.advanced[u[t]])&&(e[t]=c);e.name&&(e["data-cke-saved-name"]=e.name)}e["data-cke-saved-href"]&&(e.href=e["data-cke-saved-href"]);t={target:1,onclick:1,"data-cke-pa-onclick":1,"data-cke-saved-name":1,download:1};b.advanced&&CKEDITOR.tools.extend(t,u);for(var w in e)delete t[w]; 1022return{set:e,removed:CKEDITOR.tools.object.keys(t)}},showDisplayTextForElement:function(a,b){var c={img:1,table:1,tbody:1,thead:1,tfoot:1,input:1,select:1,textarea:1},d=b.getSelection();return b.widgets&&b.widgets.focused||d&&1<d.getRanges().length?!1:!a||!a.getName||!a.is(c)}};CKEDITOR.unlinkCommand=function(){};CKEDITOR.unlinkCommand.prototype={exec:function(a){if(CKEDITOR.env.ie){var b=a.getSelection().getRanges()[0],c=b.getPreviousEditableNode()&&b.getPreviousEditableNode().getAscendant("a",!0)|| 1023b.getNextEditableNode()&&b.getNextEditableNode().getAscendant("a",!0),d;b.collapsed&&c&&(d=b.createBookmark(),b.selectNodeContents(c),b.select())}c=new CKEDITOR.style({element:"a",type:CKEDITOR.STYLE_INLINE,alwaysRemoveElement:1});a.removeStyle(c);d&&(b.moveToBookmark(d),b.select())},refresh:function(a,b){var c=b.lastElement&&b.lastElement.getAscendant("a",!0);c&&"a"==c.getName()&&c.getAttribute("href")&&c.getChildCount()?this.setState(CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}, 1024contextSensitive:1,startDisabled:1,requiredContent:"a[href]",editorFocus:1};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")?(d.removeAttributes({name:1,"data-cke-saved-name":1}),d.removeClass("cke_anchor")): 1025d.remove(1);b.selectBookmarks(c)},requiredContent:"a[name]"};CKEDITOR.tools.extend(CKEDITOR.config,{linkShowAdvancedTab:!0,linkShowTargetTab:!0,linkDefaultProtocol:"http://"})})();(function(){function d(a,b,c,d){for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,l,g=0;g< 1026f.length;g++){var m=f[g].getCustomData("listarray_index");k=e[m].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),e[m].parent=l)}c=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode);for(var n,e=c.listNode.getChildCount(),g=0;g<e&&(n=c.listNode.getChild(g));g++)n.getName()==this.type&&d.push(n);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function h(a,b,c){var d=b.contents,e=b.root.getDocument(),f= 1027[];if(1==d.length&&d[0].equals(b.root)){var g=e.createElement("div");d[0].moveChildren&&d[0].moveChildren(g);d[0].append(g);d[0]=g}b=b.contents[0].getParent();for(g=0;g<d.length;g++)b=b.getCommonAncestor(d[g].getParent());a=a.config.useComputedState;var h,k;a=void 0===a||a;for(g=0;g<d.length;g++)for(var l=d[g],m;m=l.getParent();){if(m.equals(b)){f.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=m}if(!(1>f.length)){d=f[f.length-1].getNext();g=e.createElement(this.type); 1028for(c.push(g);f.length;)c=f.shift(),a=e.createElement("li"),l=c,l.is("pre")||r.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a),c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function g(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)))|| 1029m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(f.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<f.length;g++)h=f[g].getCustomData("listarray_index"),e[h].indent=-1;for(g=h+1;g<e.length;g++)if(e[g].indent>e[g-1].indent+1){f=e[g-1].indent+ 10301-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}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 b(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function f(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](t);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore": 1031"insertAfter"](c):b.append(e,d),c=e}function m(a){function b(c){var d=a[c?"getPrevious":"getNext"](w);d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())&&(f(a,d,null,!c),a.remove(),a=d)}b();b(1)}function l(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function k(a,b,d){a.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var e=d.extractContents();b.trim(!1,!0);var g=b.createBookmark(), 1032h=new CKEDITOR.dom.elementPath(b.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,l=new CKEDITOR.dom.elementPath(d.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(w))&&y(k)&&k.remove();(k=e.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?e.insertBefore(k):b.startContainer.append(e);n&&(e=c(n))&&(h.contains(n)?(f(e,n.getParent(),n), 1033e.remove()):h.append(e));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){l=d.startPath();e=l.block;if(!e)break;e.is("li")&&(h=e.getParent(),e.equals(h.getLast(w))&&e.equals(h.getFirst(w))&&(e=h));d.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);e.remove()}d=d.clone();e=a.editable();d.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(a){return w(a)&&!y(a)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&m(d);b.moveToBookmark(g); 1034b.select();a.fire("saveSnapshot")}function c(a){return(a=a.getLast(w))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in e?a:null}var e={ol:1,ul:1},a=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),w=function(b){return!(a(b)||n(b))},y=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,f){if(!e[a.getName()])return[];d||(d=0);c||(c=[]);for(var g=0,h=a.getChildCount();g<h;g++){var k=a.getChild(g);k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in CKEDITOR.dtd.$list&& 1035CKEDITOR.plugins.list.listToArray(k,b,c,d+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a,indent:d,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",c.length);c.push(l);for(var m=0,n=k.getChildCount(),t;m<n;m++)t=k.getChild(m),t.type==CKEDITOR.NODE_ELEMENT&&e[t.getName()]?CKEDITOR.plugins.list.listToArray(t,b,c, 1036d+1,l.grandparent):l.contents.push(t)}}return c},arrayToList:function(a,b,c,d,f){c||(c=0);if(!a||a.length<c+1)return null;for(var g,h=a[c].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(h),l=null,m=c,t=Math.max(a[c].indent,0),r=null,y,D,M=d==CKEDITOR.ENTER_P?"p":"div";;){var H=a[m];g=H.grandparent;y=H.element.getDirection(1);if(H.indent==t){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),f&&l.setAttribute("dir",f),k.append(l));r=l.append(H.element.clone(0,1));y!=l.getDirection(1)&& 1037r.setAttribute("dir",y);for(g=0;g<H.contents.length;g++)r.append(H.contents[g].clone(1,1));m++}else if(H.indent==Math.max(t,0)+1)H=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,d,H!=y?y:null),!r.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=h.$.documentMode&&r.append(h.createText("\u00a0")),r.append(m.listNode),m=m.nextIndex;else if(-1==H.indent&&!c&&g){e[g.getName()]?(r=H.element.clone(!1,!0),y!=g.getDirection(1)&&r.setAttribute("dir",y)):r=new CKEDITOR.dom.documentFragment(h); 1038var l=g.getDirection(1)!=y,K=H.element,E=K.getAttribute("class"),T=K.getAttribute("style"),O=r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(d!=CKEDITOR.ENTER_BR||l||T||E),N,Y=H.contents.length,R;for(g=0;g<Y;g++)if(N=H.contents[g],n(N)&&1<Y)O?R=N.clone(1,1):r.append(N.clone(1,1));else if(N.type==CKEDITOR.NODE_ELEMENT&&N.isBlockBoundary()){l&&!N.getDirection()&&N.setAttribute("dir",y);D=N;var X=K.getAttribute("style");X&&D.setAttribute("style",X.replace(/([^;])$/,"$1;")+(D.getAttribute("style")||""));E&& 1039N.addClass(E);D=null;R&&(r.append(R),R=null);r.append(N.clone(1,1))}else O?(D||(D=h.createElement(M),r.append(D),l&&D.setAttribute("dir",y)),T&&D.setAttribute("style",T),E&&D.setAttribute("class",E),R&&(D.append(R),R=null),D.append(N.clone(1,1))):r.append(N.clone(1,1));R&&((D||r).append(R),R=null);r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(y=r.getLast())&&y.type==CKEDITOR.NODE_ELEMENT&&y.is("br")&&y.remove(),(y=r.getLast(w))&&y.type==CKEDITOR.NODE_ELEMENT&& 1040y.is(CKEDITOR.dtd.$block)||r.append(h.createElement("br")));y=r.$.nodeName.toLowerCase();"div"!=y&&"p"!=y||r.appendBogus();k.append(r);l=null;m++}else return null;D=null;if(a.length<=m||Math.max(a[m].indent,0)<t)break}if(b)for(a=k.getFirst();a;){if(a.type==CKEDITOR.NODE_ELEMENT&&(CKEDITOR.dom.element.clearMarkers(b,a),a.getName()in CKEDITOR.dtd.$listItem&&(c=a,h=f=d=void 0,d=c.getDirection()))){for(f=c.getParent();f&&!(h=f.getDirection());)f=f.getParent();d==h&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k, 1041nextIndex:m}}};var r=/^h[1-6]$/,t=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);b.prototype={exec:function(a){function b(a){return e[a.root.getName()]&&!c(a.root,[CKEDITOR.NODE_COMMENT])}function c(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function f(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(a,a.elementPath()); 1042var k=a.config,l=a.getSelection(),n=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var t=a.editable();if(t.getFirst(w)){var r=1==n.length&&n[0];(k=r&&r.getEnclosedNode())&&k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else k.enterMode==CKEDITOR.ENTER_BR?t.appendBogus():n[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(n)}for(var k=l.createBookmarks(!0),t=[],y={},n=n.createIterator(),F=0;(r=n.getNextRange())&&++F;){var J=r.getBoundaryNodes(),I=J.startNode, 1043D=J.endNode;I.type==CKEDITOR.NODE_ELEMENT&&"td"==I.getName()&&r.setStartAt(J.startNode,CKEDITOR.POSITION_AFTER_START);D.type==CKEDITOR.NODE_ELEMENT&&"td"==D.getName()&&r.setEndAt(J.endNode,CKEDITOR.POSITION_BEFORE_END);r=r.createIterator();for(r.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;J=r.getNextParagraph();)if(!J.getCustomData("list_block")&&!f(J)){CKEDITOR.dom.element.setMarker(y,J,"list_block",1);for(var M=a.elementPath(J),I=M.elements,D=0,M=M.blockLimit,H,K=I.length-1;0<=K&&(H=I[K]);K--)if(e[H.getName()]&& 1044M.contains(H)){M.removeCustomData("list_group_object_"+F);(I=H.getCustomData("list_group_object"))?I.contents.push(J):(I={root:H,contents:[J]},t.push(I),CKEDITOR.dom.element.setMarker(y,H,"list_group_object",I));D=1;break}D||(D=M,D.getCustomData("list_group_object_"+F)?D.getCustomData("list_group_object_"+F).contents.push(J):(I={root:D,contents:[J]},CKEDITOR.dom.element.setMarker(y,D,"list_group_object_"+F,I),t.push(I)))}}for(H=[];0<t.length;)I=t.shift(),this.state==CKEDITOR.TRISTATE_OFF?b(I)||(e[I.root.getName()]? 1045d.call(this,a,I,y,H):h.call(this,a,I,H)):this.state==CKEDITOR.TRISTATE_ON&&e[I.root.getName()]&&!b(I)&&g.call(this,a,I,y);for(K=0;K<H.length;K++)m(H[K]);CKEDITOR.dom.element.clearAllMarkers(y);l.selectBookmarks(k);a.focus()},refresh:function(a,b){var c=b.contains(e,1),d=b.blockLimit||b.root;c&&d.contains(c)?this.setState(c.is(this.type)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.plugins.add("list",{requires:"indentlist",init:function(a){a.blockless|| 1046(a.addCommand("numberedlist",new b("numberedlist","ol")),a.addCommand("bulletedlist",new b("bulletedlist","ul")),a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var d=b.data.domEvent.getKey(),f;if("wysiwyg"==a.mode&&d in{8:1,46:1}){var g=a.getSelection().getRanges()[0], 1047h=g&&g.startPath();if(g&&g.collapsed){var m=8==d,n=a.editable(),t=new CKEDITOR.dom.walker(g.clone());t.evaluator=function(a){return w(a)&&!y(a)};t.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};d=g.clone();if(m){var r;(r=h.contains(e))&&g.checkBoundaryOfElement(r,CKEDITOR.START)&&(r=r.getParent())&&r.is("li")&&(r=c(r))?(f=r,r=r.getPrevious(w),d.moveToPosition(r&&y(r)?r:f,CKEDITOR.POSITION_BEFORE_START)):(t.range.setStartAt(n,CKEDITOR.POSITION_AFTER_START),t.range.setEnd(g.startContainer, 1048g.startOffset),(r=t.previous())&&r.type==CKEDITOR.NODE_ELEMENT&&(r.getName()in e||r.is("li"))&&(r.is("li")||(t.range.selectNodeContents(r),t.reset(),t.evaluator=l,r=t.previous()),f=r,d.moveToElementEditEnd(f),d.moveToPosition(d.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(f)k(a,d,g),b.cancel();else{var F=h.contains(e);F&&g.checkBoundaryOfElement(F,CKEDITOR.START)&&(f=F.getFirst(w),g.checkBoundaryOfElement(f,CKEDITOR.START)&&(r=F.getPrevious(w),c(f)?r&&(g.moveToElementEditEnd(r),g.select()):
vendor: 19,675 bytes, lines 1049-1087
1049a.execCommand("outdent"),b.cancel()))}}else if(f=h.contains("li")){if(t.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),m=(n=f.getLast(w))&&l(n)?n:f,h=0,(r=t.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in e&&r.equals(n)?(h=1,r=t.next()):g.checkBoundaryOfElement(m,CKEDITOR.END)&&(h=2),h&&r){g=g.clone();g.moveToElementEditStart(r);if(1==h&&(d.optimize(),!d.startContainer.equals(f))){for(f=d.startContainer;f.is(CKEDITOR.dtd.$inline);)F=f,f=f.getParent();F&&d.moveToPosition(F,CKEDITOR.POSITION_AFTER_END)}2== 1050h&&(d.moveToPosition(d.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block,CKEDITOR.POSITION_AFTER_START));k(a,d,g);b.cancel()}}else t.range.setEndAt(n,CKEDITOR.POSITION_BEFORE_END),(r=t.next())&&r.type==CKEDITOR.NODE_ELEMENT&&r.is(e)&&(r=r.getFirst(w),h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(h.block.remove(),g.moveToElementEditStart(r),g.select()):c(r)?(g.moveToElementEditStart(r),g.select()):(g=g.clone(),g.moveToElementEditStart(r),k(a, 1051d,g)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})})();(function(){CKEDITOR.plugins.liststyle={requires:"dialog,contextmenu",init:function(d){if(!d.blockless){var h;h=new CKEDITOR.dialogCommand("numberedListStyle",{requiredContent:"ol",allowedContent:"ol{list-style-type}[start]; li{list-style-type}[value]",contentTransformations:[["ol: listTypeToStyle"]]});h=d.addCommand("numberedListStyle",h);d.addFeature(h);CKEDITOR.dialog.add("numberedListStyle",this.path+"dialogs/liststyle.js"); 1052h=new CKEDITOR.dialogCommand("bulletedListStyle",{requiredContent:"ul",allowedContent:"ul{list-style-type}",contentTransformations:[["ul: listTypeToStyle"]]});h=d.addCommand("bulletedListStyle",h);d.addFeature(h);CKEDITOR.dialog.add("bulletedListStyle",this.path+"dialogs/liststyle.js");d.addMenuGroup("list",108);d.addMenuItems({numberedlist:{label:d.lang.liststyle.numberedTitle,group:"list",command:"numberedListStyle"},bulletedlist:{label:d.lang.liststyle.bulletedTitle,group:"list",command:"bulletedListStyle"}}); 1053d.contextMenu.addListener(function(d){if(!d||d.isReadOnly())return null;for(;d;){var b=d.getName();if("ol"==b)return{numberedlist:CKEDITOR.TRISTATE_OFF};if("ul"==b)return{bulletedlist:CKEDITOR.TRISTATE_OFF};d=d.getParent()}return null})}}};CKEDITOR.plugins.add("liststyle",CKEDITOR.plugins.liststyle)})();"use strict";(function(){function d(a,b,c){return n(b)&&n(c)&&c.equals(b.getNext(function(a){return!(S(a)||W(a)||w(a))}))}function h(a){this.upper=a[0];this.lower=a[1];this.set.apply(this,a.slice(2))} 1054function g(a){var b=a.element;if(b&&n(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 b(a,b,c){v(a,b);v(a,c);a=b.size.bottom;c=c.size.top;return a&&c?0|(a+c)/2:a||c}function f(b,c,d){return c=c[d?"getPrevious":"getNext"](function(c){return c&&c.type==CKEDITOR.NODE_TEXT&&!S(c)||n(c)&&!w(c)&&!a(b,c)})}function m(a,b,c){return a>b&&a<c}function l(a,b){if(a.data("cke-editable"))return null; 1055for(b||(a=a.getParent());a&&!a.data("cke-editable");){if(a.hasAttribute("contenteditable"))return a;a=a.getParent()}return null}function k(a){var b=a.doc,d=F('\x3cspan contenteditable\x3d"false" data-cke-magic-line\x3d"1" style\x3d"'+ca+"position:absolute;border-top:1px dashed "+a.boxColor+'"\x3e\x3c/span\x3e',b),e=CKEDITOR.getUrl(this.path+"images/"+(J.hidpi?"hidpi/":"")+"icon"+(a.rtl?"-rtl":"")+".png");C(d,{attach:function(){this.wrap.getParent()||this.wrap.appendTo(a.editable,!0);return this}, 1056lineChildren:[C(F('\x3cspan title\x3d"'+a.editor.lang.magicline.title+'" contenteditable\x3d"false"\x3e\x26#8629;\x3c/span\x3e',b),{base:ca+"height:17px;width:17px;"+(a.rtl?"left":"right")+":17px;background:url("+e+") center no-repeat "+a.boxColor+";cursor:pointer;"+(J.hc?"font-size: 15px;line-height:14px;border:1px solid #fff;text-align:center;":"")+(J.hidpi?"background-size: 9px 10px;":""),looks:["top:-8px; border-radius: 2px;","top:-17px; border-radius: 2px 2px 0px 0px;","top:-1px; border-radius: 0px 0px 2px 2px;"]}), 1057C(F(da,b),{base:aa+"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"]}),C(F(da,b),{base:aa+"right:0px;border-right-color:"+a.boxColor+";",looks:["border-width:8px 8px 8px 0;top:-8px","border-width:8px 8px 0 0;top:-8px","border-width:0 8px 8px 0;top:0px"]})],detach:function(){this.wrap.getParent()&&this.wrap.remove();return this},mouseNear:function(){v(a,this);var b=a.holdDistance,c=this.size; 1058return 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,e=d.upper,f=d.lower,g=e||f,h=g.getParent(),k={};this.trigger=d;e&&v(a,e,!0);f&&v(a,f,!0);v(a,h,!0);a.inInlineMode&&q(a,!0);h.equals(c)?(k.left=b.scroll.x,k.right=-b.scroll.x,k.width=""):(k.left=g.size.left-g.size.margin.left+b.scroll.x-(a.inInlineMode?b.editable.left+b.editable.border.left:0),k.width=g.size.outerWidth+g.size.margin.left+g.size.margin.right+b.scroll.x, 1059k.right="");e&&f?k.top=e.size.margin.bottom===f.size.margin.top?0|e.size.bottom+e.size.margin.bottom/2:e.size.margin.bottom<f.size.margin.top?e.size.bottom+e.size.margin.bottom:e.size.bottom+e.size.margin.bottom-f.size.margin.top:e?f||(k.top=e.size.bottom+e.size.margin.bottom):k.top=f.size.top-f.size.margin.top;d.is(O)||m(k.top,b.scroll.y-15,b.scroll.y+5)?(k.top=a.inInlineMode?0:b.scroll.y,this.look(O)):d.is(N)||m(k.top,b.pane.bottom-5,b.pane.bottom+15)?(k.top=a.inInlineMode?b.editable.height+b.editable.padding.top+ 1060b.editable.padding.bottom:b.pane.bottom-1,this.look(N)):(a.inInlineMode&&(k.top-=b.editable.top+b.editable.border.top),this.look(Y));a.inInlineMode&&(k.top--,k.top+=b.editable.scroll.top,k.left+=b.editable.scroll.left);for(var l in k)k[l]=CKEDITOR.tools.cssLength(k[l]);this.setStyles(k)},look:function(a){if(this.oldLook!=a){for(var b=this.lineChildren.length,c;b--;)(c=this.lineChildren[b]).setAttribute("style",c.base+c.looks[0|a/2]);this.oldLook=a}},wrap:new G("span",a.doc)});for(b=d.lineChildren.length;b--;)d.lineChildren[b].appendTo(d); 1061d.look(Y);d.appendTo(d.wrap);d.unselectable();d.lineChildren[0].on("mouseup",function(b){d.detach();c(a,function(b){var c=a.line.trigger;b[c.is(H)?"insertBefore":"insertAfter"](c.is(H)?c.lower:c.upper)},!0);a.editor.focus();J.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();b.data.preventDefault(!0)});d.on("mousedown",function(a){a.data.preventDefault(!0)});a.line=d}function c(a,b,c){var d=new CKEDITOR.dom.range(a.doc),e=a.editor,f;J.ie&&a.enterMode==CKEDITOR.ENTER_BR?f=a.doc.createText(R): 1062(f=(f=l(a.element,!0))&&f.data("cke-enter-mode")||a.enterMode,f=new G(M[f],a.doc),f.is("br")||a.doc.createText(R).appendTo(f));c&&e.fire("saveSnapshot");b(f);d.moveToPosition(f,CKEDITOR.POSITION_AFTER_START);e.getSelection().selectRanges([d]);a.hotNode=f;c&&e.fire("saveSnapshot")}function e(a,b){return{canUndo:!0,modes:{wysiwyg:1},exec:function(){function d(e){var f=J.ie&&9>J.version?" ":R,g=a.hotNode&&a.hotNode.getText()==f&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;c(a,function(c){g&& 1063a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](e);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});J.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(c){c=c.getSelection().getStartElement();var e;c=c.getAscendant(U,1);if(!t(a,c)&&c&&!c.equals(a.editable)&&!c.contains(a.editable)){(e=l(c))&&"false"==e.getAttribute("contenteditable")&&(c=e);a.element=c;e=f(a,c,!b);var h;n(e)&&e.is(a.triggers)&& 1064e.is(L)&&(!f(a,e,!b)||(h=f(a,e,!b))&&n(h)&&h.is(a.triggers))?d(e):(h=g(a,c),n(h)&&(f(a,h,!b)?(c=f(a,h,!b))&&n(c)&&c.is(a.triggers)&&d(h):d(h)))}}}()}}function a(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!n(a))return!1;var b;(b=y(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function y(a){return!!{absolute:1, 1065fixed:1}[a.getComputedStyle("position")]}function r(a,b){return n(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 e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function u(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(ea)});if(!b)return!1;v(a,b);return c?b.size.top>a.mouse.y:b.size.bottom<a.mouse.y}function x(b){var c=b.editable,d=b.mouse,e=b.view,f=b.triggerOffset;q(b);var g=d.y> 1066(b.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),c=c[g?"getLast":"getFirst"](function(a){return!(S(a)||W(a))});if(!c)return null;a(b,c)&&(c=b.line.wrap[g?"getPrevious":"getNext"](function(a){return!(S(a)||W(a))}));if(!n(c)||w(c)||!r(b,c))return null;v(b,c);return!g&&0<=c.size.top&&m(d.y,0,c.size.top+f)?(b=b.inInlineMode||0===e.scroll.y?O:Y,new h([null,c,H,T,b])):g&&c.size.bottom<=e.pane.height&&m(d.y,c.size.bottom-f,e.pane.height)?(b=b.inInlineMode|| 1067m(c.size.bottom,e.pane.height-f,e.pane.height)?N:Y,new h([c,null,K,T,b])):null}function p(a){var b=a.mouse,c=a.view,d=a.triggerOffset,e=g(a);if(!e)return null;v(a,e);var d=Math.min(d,0|e.size.outerHeight/2),k=[],l,p;if(m(b.y,e.size.top-1,e.size.top+d))p=!1;else if(m(b.y,e.size.bottom-d,e.size.bottom+1))p=!0;else return null;if(w(e)||u(a,e,p)||e.getParent().is(X))return null;var t=f(a,e,!p);if(t){if(t&&t.type==CKEDITOR.NODE_TEXT)return null;if(n(t)){if(w(t)||!r(a,t)||t.getParent().is(X))return null; 1068k=[t,e][p?"reverse":"concat"]().concat([E,T])}}else e.equals(a.editable[p?"getLast":"getFirst"](a.isRelevant))?(q(a),p&&m(b.y,e.size.bottom-d,c.pane.height)&&m(e.size.bottom,c.pane.height-d,c.pane.height)?l=N:m(b.y,0,e.size.top+d)&&(l=O)):l=Y,k=[null,e][p?"reverse":"concat"]().concat([p?K:H,T,l,e.equals(a.editable[p?"getLast":"getFirst"](a.isRelevant))?p?N:O:Y]);return 0 in k?new h(k):null}function z(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=Q.length;l--;)f[Q[l]]=parseInt(b.getComputedStyle.call(b, 1069"border-"+Q[l]+"-width"),10)||0,h[Q[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+Q[l]),10)||0,g[Q[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+Q[l]),10)||0;c&&!d||A(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+f.top+f.bottom);k.width=k.outerWidth-(h.left+h.right+f.left+f.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop, 1070left:b.$.scrollLeft});return C({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function v(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-Z)return null;return C(b.size,z(a,b,c),{date:+new Date},!0)}function q(a,b){a.view.editable=z(a,a.editable,b,!0)}function A(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-Z)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();C(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth- 1071d.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 B(a,b,c,d){for(var e=d,f=d,g=0,k=!1,l=!1,m=a.view.pane.height,q=a.mouse;q.y+g<m&&0<q.y-g;){k||(k=b(e,d));l||(l=b(f,d));!k&&0<q.y-g&&(e=c(a,{x:q.x,y:q.y-g}));!l&&q.y+g<m&&(f=c(a,{x:q.x,y:q.y+g}));if(k&&l)break;g+=2}return new h([e,f,null,null])}CKEDITOR.plugins.add("magicline",{init:function(b){var d=b.config,l=d.magicline_triggerOffset||30,m={editor:b, 1072enterMode:d.enterMode,triggerOffset:l,holdDistance:0|l*(d.magicline_holdDistance||.5),boxColor:d.magicline_color||"#ff0000",rtl:"rtl"==d.contentsLangDirection,tabuList:["data-cke-hidden-sel"].concat(d.magicline_tabuList||[]),triggers:d.magicline_everywhere?U:{table:1,hr:1,div:1,ul:1,ol:1,dl:1,form:1,blockquote:1}},u,r,v;m.isRelevant=function(b){return n(b)&&!a(m,b)&&!w(b)};b.on("contentDom",function(){var l=b.editable(),n=b.document,w=b.window;C(m,{editable:l,inInlineMode:l.isInline(),doc:n,win:w, 1073hotNode:null},!0);m.boundary=m.inInlineMode?m.editable:m.doc.getDocumentElement();l.is(D.$inline)||(m.inInlineMode&&!y(l)&&l.setStyles({position:"relative",top:null,left:null}),k.call(this,m),A(m),l.attachListener(b,"beforeUndoImage",function(){m.line.detach()}),l.attachListener(b,"beforeGetData",function(){m.line.wrap.getParent()&&(m.line.detach(),b.once("getData",function(){m.line.attach()},null,null,1E3))},null,null,0),l.attachListener(m.inInlineMode?n:n.getWindow().getFrame(),"mouseout",function(a){if("wysiwyg"== 1074b.mode)if(m.inInlineMode){var c=a.data.$.clientX;a=a.data.$.clientY;A(m);q(m,!0);var d=m.view.editable,e=m.view.scroll;c>d.left-e.x&&c<d.right-e.x&&a>d.top-e.y&&a<d.bottom-e.y||(clearTimeout(v),v=null,m.line.detach())}else clearTimeout(v),v=null,m.line.detach()}),l.attachListener(l,"keyup",function(){m.hiddenMode=0}),l.attachListener(l,"keydown",function(a){if("wysiwyg"==b.mode)switch(a.data.getKeystroke()){case 2228240:case 16:m.hiddenMode=1,m.line.detach()}}),l.attachListener(m.inInlineMode?l:n, 1075"mousemove",function(a){r=!0;if("wysiwyg"==b.mode&&!b.readOnly&&!v){var c={x:a.data.$.clientX,y:a.data.$.clientY};v=setTimeout(function(){m.mouse=c;v=m.trigger=null;A(m);r&&!m.hiddenMode&&b.focusManager.hasFocus&&!m.line.mouseNear()&&(m.element=ba(m,!0))&&((m.trigger=x(m)||p(m)||V(m))&&!t(m,m.trigger.upper||m.trigger.lower)?m.line.attach().place():(m.trigger=null,m.line.detach()),r=!1)},30)}}),l.attachListener(w,"scroll",function(){"wysiwyg"==b.mode&&(m.line.detach(),J.webkit&&(m.hiddenMode=1,clearTimeout(u), 1076u=setTimeout(function(){m.mouseDown||(m.hiddenMode=0)},50)))}),l.attachListener(I?n:w,"mousedown",function(){"wysiwyg"==b.mode&&(m.line.detach(),m.hiddenMode=1,m.mouseDown=1)}),l.attachListener(I?n:w,"mouseup",function(){m.hiddenMode=0;m.mouseDown=0}),b.addCommand("accessPreviousSpace",e(m)),b.addCommand("accessNextSpace",e(m,!0)),b.setKeystroke([[d.magicline_keystrokePrevious,"accessPreviousSpace"],[d.magicline_keystrokeNext,"accessNextSpace"]]),b.on("loadSnapshot",function(){var a,c,d,e;for(e in{p:1, 1077br:1,div:1})for(a=b.document.getElementsByTag(e),d=a.count();d--;)if((c=a.getItem(d)).data("cke-magicline-hot")){m.hotNode=c;m.lastCmdDirection="true"===c.data("cke-magicline-dir")?!0:!1;return}}),b._.magiclineBackdoor={accessFocusSpace:c,boxTrigger:h,isLine:a,getAscendantTrigger:g,getNonEmptyNeighbour:f,getSize:z,that:m,triggerEdge:p,triggerEditable:x,triggerExpand:V})},this)}});var C=CKEDITOR.tools.extend,G=CKEDITOR.dom.element,F=G.createFromHtml,J=CKEDITOR.env,I=CKEDITOR.env.ie&&9>CKEDITOR.env.version, 1078D=CKEDITOR.dtd,M={},H=128,K=64,E=32,T=16,O=4,N=2,Y=1,R="\u00a0",X=D.$listItem,ea=D.$tableContent,L=C({},D.$nonEditable,D.$empty),U=D.$block,Z=100,ca="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",aa=ca+"border-color:transparent;display:block;border-style:solid;",da="\x3cspan\x3e"+R+"\x3c/span\x3e";M[CKEDITOR.ENTER_BR]="br";M[CKEDITOR.ENTER_P]="p";M[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties= 1079a+b+(c||Y);return this},is:function(a){return(this.properties&a)==a}};var ba=function(){function b(a,c){var d=a.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(c,d,e){if(!c.mouse)return null;var f=c.doc,g=c.line.wrap;e=e||c.mouse;var h=b(f,e);d&&a(c,h)&&(g.hide(),h=b(f,e),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||J.ie&&9>J.version&&!c.boundary.equals(h)&&!c.boundary.contains(h)?null:h}}(),S=CKEDITOR.dom.walker.whitespaces(),W=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT), 1080V=function(){function c(a){var f=a.element,g,h,k;if(!n(f)||f.contains(a.editable)||f.isReadOnly())return null;k=B(a,function(a,b){return!b.equals(a)},function(a,b){return ba(a,!0,b)},f);g=k.upper;h=k.lower;if(d(a,g,h))return k.set(E,8);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(b){return e(a,b)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(b){return e(a,b)});if(!g||!h)return null;v(a,g);v(a,h);if(!m(a.mouse.y, 1081g.size.top,h.size.bottom))return null;for(var f=Number.MAX_VALUE,l,q,p,t;h&&!h.equals(g)&&(q=g.getNext(a.isRelevant));)l=Math.abs(b(a,g,q)-a.mouse.y),l<f&&(f=l,p=g,t=q),g=q,v(a,g);if(!p||!t||!m(a.mouse.y,p.size.top,t.size.bottom))return null;k.upper=p;k.lower=t;return k.set(E,8)}function e(b,c){return!(c&&c.type==CKEDITOR.NODE_TEXT||W(c)||w(c)||a(b,c)||c.type==CKEDITOR.NODE_ELEMENT&&c.$&&c.is("br"))}return function(a){var b=c(a),e;if(e=b){e=b.upper;var f=b.lower;e=!e||!f||w(f)||w(e)||f.equals(e)|| 1082e.equals(f)||f.contains(e)||e.contains(f)?!1:r(a,e)&&r(a,f)&&d(a,e,f)?!0:!1}return e?b:null}}(),Q=["top","left","right","bottom"]})();CKEDITOR.config.magicline_keystrokePrevious=CKEDITOR.CTRL+CKEDITOR.SHIFT+51;CKEDITOR.config.magicline_keystrokeNext=CKEDITOR.CTRL+CKEDITOR.SHIFT+52;"use strict";(function(){function d(d){return{"aria-label":d,"class":"cke_pagebreak",contenteditable:"false","data-cke-display-name":"pagebreak","data-cke-pagebreak":1,style:"page-break-after: always",title:d}}CKEDITOR.plugins.add("pagebreak", 1083{requires:"fakeobjects",onLoad:function(){var d=("background:url("+CKEDITOR.getUrl(this.path+"images/pagebreak.gif")+") no-repeat center center;clear:both;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;padding:0;height:7px;cursor:default;").replace(/;/g," !important;");CKEDITOR.addCss("div.cke_pagebreak{"+d+"}")},init:function(d){d.blockless||(d.addCommand("pagebreak",CKEDITOR.plugins.pagebreakCmd),d.ui.addButton&&d.ui.addButton("PageBreak",{label:d.lang.pagebreak.toolbar,command:"pagebreak", 1084toolbar:"insert,70"}),CKEDITOR.env.webkit&&d.on("contentDom",function(){d.document.on("click",function(g){g=g.data.getTarget();g.is("div")&&g.hasClass("cke_pagebreak")&&d.getSelection().selectElement(g)})}))},afterInit:function(h){function g(b){CKEDITOR.tools.extend(b.attributes,d(h.lang.pagebreak.alt),!0);b.children.length=0}var b=h.dataProcessor,f=b&&b.dataFilter,b=b&&b.htmlFilter,m=/page-break-after\s*:\s*always/i,l=/display\s*:\s*none/i;b&&b.addRules({attributes:{"class":function(b,c){var d=b.replace("cke_pagebreak", 1085"");if(d!=b){var a=CKEDITOR.htmlParser.fragment.fromHtml('\x3cspan style\x3d"display: none;"\x3e\x26nbsp;\x3c/span\x3e').children[0];c.children.length=0;c.add(a);a=c.attributes;delete a["aria-label"];delete a.contenteditable;delete a.title}return d}}},{applyToAll:!0,priority:5});f&&f.addRules({elements:{div:function(b){if(b.attributes["data-cke-pagebreak"])g(b);else if(m.test(b.attributes.style)){var c=b.children[0];c&&"span"==c.name&&l.test(c.attributes.style)&&g(b)}}}})}});CKEDITOR.plugins.pagebreakCmd= 1086{exec:function(d){d.insertElement(CKEDITOR.plugins.pagebreak.createElement(d))},context:"div",allowedContent:{div:{styles:"!page-break-after"},span:{match:function(d){return(d=d.parent)&&"div"==d.name&&d.styles&&d.styles["page-break-after"]},styles:"display"}},requiredContent:"div{page-break-after}"};CKEDITOR.plugins.pagebreak={createElement:function(h){return h.document.createElement("div",{attributes:d(h.lang.pagebreak.alt)})}}})();(function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools", 1087init:function(d){function h(b){var d=CKEDITOR.plugins.pastefromword&&CKEDITOR.plugins.pastefromword.images,c,e=[];
1087if(d&&b.editor.filter.check("img[src]")&&(c=d.extractTagsFromHtml(b.data.dataValue),0!==c.length&&(d=d.extractFromRtf(b.data.dataTransfer["text/rtf"]),0!==d.length&&(CKEDITOR.tools.array.forEach(d,function(a){e.push(a.type?"data:"+a.type+";base64,"+CKEDITOR.tools.convertBytesToBase64(CKEDITOR.tools.convertHexStringToBytes(a.hex)):null)},this),c.length===e.length))))for(d=0;d<c.length;d++)0=== 1088c[d].indexOf("file://")&&e[d]&&(b.data.dataValue=b.data.dataValue.replace(c[d],e[d]))}var g=0,b=CKEDITOR.plugins.getPath("pastetools"),f=this.path,m=void 0===d.config.pasteFromWord_inlineImages?!0:d.config.pasteFromWord_inlineImages,b=[CKEDITOR.getUrl(b+"filter/common.js"),CKEDITOR.getUrl(f+"filter/default.js")];d.addCommand("pastefromword",{canUndo:!1,async:!0,exec:function(b,d){g=1;b.execCommand("paste",{type:"html",notification:d&&"undefined"!==typeof d.notification?d.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(d, 1089"PasteFromWord",{label:d.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});d.pasteTools.register({filters:d.config.pasteFromWordCleanupFile?[d.config.pasteFromWordCleanupFile]:b,canHandle:function(b){b=CKEDITOR.plugins.pastetools.getClipboardData(b.data,"text/html");var d=CKEDITOR.plugins.pastetools.getContentGeneratorName(b),c=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument|<o:\w+>|<\/font>)/,d=d?"microsoft"===d:c.test(b);return b&&(g||d)},handle:function(b,f){var c= 1090b.data,e=CKEDITOR.plugins.pastetools.getClipboardData(c,"text/html"),a=CKEDITOR.plugins.pastetools.getClipboardData(c,"text/rtf"),e={dataValue:e,dataTransfer:{"text/rtf":a}};if(!1!==d.fire("pasteFromWord",e)||g){c.dontFilter=!0;if(g||!d.config.pasteFromWordPromptCleanup||confirm(d.lang.pastefromword.confirmCleanup))e.dataValue=CKEDITOR.cleanWord(e.dataValue,d),d.fire("afterPasteFromWord",e),c.dataValue=e.dataValue,!0===d.config.forcePasteAsPlainText?c.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported|| 1091"allow-word"!==d.config.forcePasteAsPlainText||(c.type="html");g=0;f()}}});if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&m)d.on("afterPasteFromWord",h)}})})();(function(){var d={canUndo:!1,async:!0,exec:function(d,g){var b=d.lang,f=CKEDITOR.tools.keystrokeToString(b.common.keyboard,d.getCommandKeystroke(CKEDITOR.env.ie?d.commands.paste:this)),m=g&&"undefined"!==typeof g.notification?g.notification:!g||!g.from||"keystrokeHandler"===g.from&&CKEDITOR.env.ie,b=m&&"string"===typeof m?m:b.pastetext.pasteNotification.replace(/%1/, 1092'\x3ckbd aria-label\x3d"'+f.aria+'"\x3e'+f.display+"\x3c/kbd\x3e");d.execCommand("paste",{type:"text",notification:m?b:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var g=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",d);h.setKeystroke(g,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste", 1093function(b){"html"!=b.data.type&&(b.data.type="text")});h.on("pasteState",function(b){h.getCommand("pastetext").setState(b.data)})}})})();(function(){function d(b,d){return CKEDITOR.tools.array.filter(b,function(b){return b.canHandle(d)}).sort(function(b,d){return b.priority===d.priority?0:b.priority-d.priority})}function h(b,d){var c=b.shift();c&&c.handle(d,function(){h(b,d)})}function g(b){var d=CKEDITOR.tools.array.reduce(b,function(b,d){return CKEDITOR.tools.array.isArray(d.filters)?b.concat(d.filters): 1094b},[]);return CKEDITOR.tools.array.filter(d,function(b,e){return CKEDITOR.tools.array.indexOf(d,b)===e})}function b(b,d){var c=0,e,a;if(!CKEDITOR.tools.array.isArray(b)||0===b.length)return!0;e=CKEDITOR.tools.array.filter(b,function(a){return-1===CKEDITOR.tools.array.indexOf(f,a)});if(0<e.length)for(a=0;a<e.length;a++)(function(a){CKEDITOR.scriptLoader.queue(a,function(b){b&&f.push(a);++c===e.length&&d()})})(e[a]);return 0===e.length}var f=[],m=CKEDITOR.tools.createClass({$:function(){this.handlers= 1095[]},proto:{register:function(b){"number"!==typeof b.priority&&(b.priority=10);this.handlers.push(b)},addPasteListener:function(f){f.on("paste",function(k){var c=d(this.handlers,k),e;if(0!==c.length){e=g(c);e=b(e,function(){return f.fire("paste",k.data)});if(!e)return k.cancel();h(c,k)}},this,null,3)}}});CKEDITOR.plugins.add("pastetools",{requires:"clipboard",beforeInit:function(b){b.pasteTools=new m;b.pasteTools.addPasteListener(b)}});CKEDITOR.plugins.pastetools={filters:{},loadFilters:b,createFilter:function(b){var d= 1096CKEDITOR.tools.array.isArray(b.rules)?b.rules:[b.rules],c=b.additionalTransforms;return function(b,a){var f=new CKEDITOR.htmlParser.basicWriter,g=new CKEDITOR.htmlParser.filter,h;c&&(b=c(b,a));CKEDITOR.tools.array.forEach(d,function(c){g.addRules(c(b,a,g))});h=CKEDITOR.htmlParser.fragment.fromHtml(b);g.applyTo(h);h.writeHtml(f);return f.getHtml()}},getClipboardData:function(b,d){var c;return CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"text/html"===d?(c=b.dataTransfer.getData(d,!0))||"text/html"!== 1097d?c:b.dataValue:null},getConfigValue:function(b,d){if(b&&b.config){var c=CKEDITOR.tools,e=b.config,a=c.object.keys(e),f=["pasteTools_"+d,"pasteFromWord_"+d,"pasteFromWord"+c.capitalize(d,!0)],f=c.array.find(f,function(b){return-1!==c.array.indexOf(a,b)});return e[f]}},getContentGeneratorName:function(b){if((b=/<meta\s+name=["']?generator["']?\s+content=["']?(\w+)/gi.exec(b))&&b.length)return b=b[1].toLowerCase(),0===b.indexOf("microsoft")?"microsoft":0===b.indexOf("libreoffice")?"libreoffice":"unknown"}}; 1098CKEDITOR.pasteFilters={}})();CKEDITOR.plugins.add("removeformat",{init:function(d){d.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);d.ui.addButton&&d.ui.addButton("RemoveFormat",{label:d.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}});CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(d){for(var h=d._.removeFormatRegex||(d._.removeFormatRegex=new RegExp("^(?:"+d.config.removeFormatTags.replace(/,/g,"|")+")$","i")),g=d._.removeAttributes|| 1099(d._.removeAttributes=d.config.removeFormatAttributes.split(",")),b=CKEDITOR.plugins.removeformat.filter,f=d.getSelection().getRanges(),m=f.createIterator(),l=function(a){return a.type==CKEDITOR.NODE_ELEMENT},k;k=m.getNextRange();){k.enlarge(CKEDITOR.ENLARGE_INLINE);var c=k.createBookmark(),e=c.startNode,a=c.endNode,n=function(a){for(var c=d.elementPath(a),e=c.elements,f=1,g;(g=e[f])&&!g.equals(c.block)&&!g.equals(c.blockLimit);f++)h.test(g.getName())&&b(d,g)&&a.breakParent(g)};n(e);if(a)for(n(a), 1100e=e.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);e&&!e.equals(a);)if(e.isReadOnly()){if(e.getPosition(a)&CKEDITOR.POSITION_CONTAINS)break;e=e.getNext(l)}else n=e.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==e.getName()&&e.data("cke-realelement")||!b(d,e)||(h.test(e.getName())?e.remove(1):(e.removeAttributes(g),d.fire("removeFormatCleanup",e))),e=n;k.moveToBookmark(c)}d.forceNextSelectionCheck();d.getSelection().selectRanges(f)}}},filter:function(d,h){for(var g=d._.removeFormatFilters||[],b=0;b< 1101g.length;b++)if(!1===g[b](h))return!1;return!0}};CKEDITOR.editor.prototype.addRemoveFormatFilter=function(d){this._.removeFormatFilters||(this._.removeFormatFilters=[]);this._.removeFormatFilters.push(d)};CKEDITOR.config.removeFormatTags="b,big,cite,code,del,dfn,em,font,i,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var";CKEDITOR.config.removeFormatAttributes="class,style,lang,width,height,align,hspace,valign";CKEDITOR.plugins.add("resize",{init:function(d){function h(f){var g=c.width,h= 1102c.height,l=g+(f.data.$.screenX-k.x)*("rtl"==m?-1:1);f=h+(f.data.$.screenY-k.y);e&&(g=Math.max(b.resize_minWidth,Math.min(l,b.resize_maxWidth)));a&&(h=Math.max(b.resize_minHeight,Math.min(f,b.resize_maxHeight)));d.resize(e?g:null,h)}function g(){CKEDITOR.document.removeListener("mousemove",h);CKEDITOR.document.removeListener("mouseup",g);d.document&&(d.document.removeListener("mousemove",h),d.document.removeListener("mouseup",g))}var b=d.config,f=d.ui.spaceId("resizer"),m=d.element?d.element.getDirection(1): 1103"ltr";!b.resize_dir&&(b.resize_dir="vertical");void 0===b.resize_maxWidth&&(b.resize_maxWidth=3E3);void 0===b.resize_maxHeight&&(b.resize_maxHeight=3E3);void 0===b.resize_minWidth&&(b.resize_minWidth=750);void 0===b.resize_minHeight&&(b.resize_minHeight=250);if(!1!==b.resize_enabled){var l=null,k,c,e=("both"==b.resize_dir||"horizontal"==b.resize_dir)&&b.resize_minWidth!=b.resize_maxWidth,a=("both"==b.resize_dir||"vertical"==b.resize_dir)&&b.resize_minHeight!=b.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(a){l||
vendor: 7,448 bytes, lines 1104-1118
1104(l=d.getResizable());c={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0};k={x:a.screenX,y:a.screenY};b.resize_minWidth>c.width&&(b.resize_minWidth=c.width);b.resize_minHeight>c.height&&(b.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",h);CKEDITOR.document.on("mouseup",g);d.document&&(d.document.on("mousemove",h),d.document.on("mouseup",g));a.preventDefault&&a.preventDefault()});d.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});d.on("uiSpace",function(b){if("bottom"==b.data.space){var c= 1105"";e&&!a&&(c=" cke_resizer_horizontal");!e&&a&&(c=" cke_resizer_vertical");var g='\x3cspan id\x3d"'+f+'" class\x3d"cke_resizer'+c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(d.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==m?"\u25e2":"\u25e3")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?b.data.html+=g:b.data.html=g+b.data.html}},d,null,100);d.on("maximize",function(a){d.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){function d(b){return{editorFocus:!1, 1106canUndo:!1,modes:{wysiwyg:1},exec:function(d){if(d.editable().hasFocus){var g=d.getSelection(),h;if(h=(new CKEDITOR.dom.elementPath(g.getCommonAncestor(),g.root)).contains({td:1,th:1},1)){var g=d.createRange(),c=CKEDITOR.tools.tryThese(function(){var a=h.getParent().$.cells[h.$.cellIndex+(b?-1:1)];a.parentNode.parentNode;return a},function(){var a=h.getParent(),a=a.getAscendant("table").$.rows[a.$.rowIndex+(b?-1:1)];return a.cells[b?a.cells.length-1:0]});if(c||b)if(c)c=new CKEDITOR.dom.element(c), 1107g.moveToElementEditStart(c),g.checkStartOfBlock()&&g.checkEndOfBlock()||g.selectNodeContents(c);else return!0;else{for(var e=h.getAscendant("table").$,c=h.getParent().$.cells,e=new CKEDITOR.dom.element(e.insertRow(-1),d.document),a=0,n=c.length;a<n;a++)e.append((new CKEDITOR.dom.element(c[a],d.document)).clone(!1,!1)).appendBogus();g.moveToElementEditStart(e)}g.select(!0);return!0}}return!1}}}var h={editorFocus:!1,modes:{wysiwyg:1,source:1}},g={exec:function(b){b.container.focusNext(!0,b.tabIndex)}}, 1108b={exec:function(b){b.container.focusPrevious(!0,b.tabIndex)}};CKEDITOR.plugins.add("tab",{init:function(f){for(var m=!1!==f.config.enableTabKeyTools,l=f.config.tabSpaces||0,k="";l--;)k+="\u00a0";if(k)f.on("key",function(b){9==b.data.keyCode&&(f.insertText(k),b.cancel())});if(m)f.on("key",function(b){(9==b.data.keyCode&&f.execCommand("selectNextCell")||b.data.keyCode==CKEDITOR.SHIFT+9&&f.execCommand("selectPreviousCell"))&&b.cancel()});f.addCommand("blur",CKEDITOR.tools.extend(g,h));f.addCommand("blurBack", 1109CKEDITOR.tools.extend(b,h));f.addCommand("selectNextCell",d());f.addCommand("selectPreviousCell",d(!0))}})})();CKEDITOR.dom.element.prototype.focusNext=function(d,h){var g=void 0===h?this.getTabIndex():h,b,f,m,l,k,c;if(0>=g)for(k=this.getNextSourceNode(d,CKEDITOR.NODE_ELEMENT);k;){if(k.isVisible()&&0===k.getTabIndex()){m=k;break}k=k.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(k=this.getDocument().getBody().getFirst();k=k.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!b)if(!f&&k.equals(this)){if(f= 1110!0,d){if(!(k=k.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;b=1}}else f&&!this.contains(k)&&(b=1);if(k.isVisible()&&!(0>(c=k.getTabIndex()))){if(b&&c==g){m=k;break}c>g&&(!m||!l||c<l)?(m=k,l=c):m||0!==c||(m=k,l=c)}}m&&m.focus()};CKEDITOR.dom.element.prototype.focusPrevious=function(d,h){for(var g=void 0===h?this.getTabIndex():h,b,f,m,l=0,k,c=this.getDocument().getBody().getLast();c=c.getPreviousSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!b)if(!f&&c.equals(this)){if(f=!0,d){if(!(c=c.getPreviousSourceNode(!0, 1111CKEDITOR.NODE_ELEMENT)))break;b=1}}else f&&!this.contains(c)&&(b=1);if(c.isVisible()&&!(0>(k=c.getTabIndex())))if(0>=g){if(b&&0===k){m=c;break}k>l&&(m=c,l=k)}else{if(b&&k==g){m=c;break}k<g&&(!m||k>l)&&(m=c,l=k)}}m&&m.focus()};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(d){function h(b){return CKEDITOR.tools.extend(b||{},{contextSensitive:1,refresh:function(b,d){this.setState(d.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!d.blockless){var g=d.lang.table; 1112d.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+(d.plugins.dialogadvtab?"table"+d.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table", 1113right:function(b){if(b.styles){var d;if(b.styles.border)d=CKEDITOR.tools.style.parse.border(b.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var g=b.styles;g["border-left"]&&g["border-left"]===g["border-right"]&&g["border-right"]===g["border-top"]&&g["border-top"]===g["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(g["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(b.attributes.border=1);"collapse"==b.styles["border-collapse"]&&(b.attributes.cellspacing= 11140)}}}]]}));d.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));d.addCommand("tableDelete",h({exec:function(b){var d=b.elementPath().contains("table",1);if(d){var g=d.getParent(),h=b.editable();1!=g.getChildCount()||g.is("td","th")||g.equals(h)||(d=g);b=b.createRange();b.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();b.select()}}}));d.ui.addButton&&d.ui.addButton("Table",{label:g.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+ 1115"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");d.addMenuItems&&d.addMenuItems({table:{label:g.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:g.deleteTable,command:"tableDelete",group:"table",order:1}});d.on("doubleclick",function(b){b.data.element.is("table")&&(b.data.dialog="tableProperties")});d.contextMenu&&d.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}});(function(){function d(a, 1116b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0<e.length||a.type!=CKEDITOR.NODE_ELEMENT||!b.test(a.getName())||a.getCustomData("selected_cell")||(CKEDITOR.dom.element.setMarker(f,a,"selected_cell",!0),e.push(a))}var e=[],f={};if(!a)return e;for(var g=a.getRanges(),h=0;h<g.length;h++){var k=g[h];if(k.collapsed)(k=k.getCommonAncestor().getAscendant({td:1,th:1},!0))&&c(k)&&e.push(k);else{var k=new CKEDITOR.dom.walker(k),l;for(k.guard= 1117d;l=k.next();)l.type==CKEDITOR.NODE_ELEMENT&&l.is(CKEDITOR.dtd.table)||(l=l.getAscendant({td:1,th:1},!0))&&!l.getCustomData("selected_cell")&&c(l)&&(CKEDITOR.dom.element.setMarker(f,l,"selected_cell",!0),e.push(l))}}CKEDITOR.dom.element.clearAllMarkers(f);return e}function h(a,b){for(var c=r(a)?a:d(a),e=c[0],f=e.getAscendant("table"),e=e.getDocument(),g=c[0].getParent(),h=g.$.rowIndex,c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=new CKEDITOR.dom.element(f.$.rows[k]),h=b?h:k,g=b?g:c, 1118c=CKEDITOR.tools.buildTableMap(f),f=c[h],h=b?c[h-1]:c[h+1],c=c[0].length,e=e.createElement("tr"),k=0;f[k]&&k<c;k++){var l;1<f[k].rowSpan&&h&&f[k]==h[k]?(l=f[k],l.rowSpan+=1):(l=(new CKEDITOR.dom.element(f[k])).clone(),l.removeAttribute("rowSpan"),l.a
vendor: 13,888 bytes, lines 1118-1145
1118ppendBogus(),e.append(l),l=l.$);k+=l.colSpan-1}b?e.insertBefore(g):e.insertAfter(g);return e}function g(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),c=d(a),e=c[0].getAscendant("table"),f=CKEDITOR.tools.buildTableMap(e),h=c[0].getParent().$.rowIndex, 1119c=c[c.length-1],k=c.getParent().$.rowIndex+c.$.rowSpan-1,c=[];a.reset();for(a=h;a<=k;a++){for(var l=f[a],m=new CKEDITOR.dom.element(e.$.rows[a]),n=0;n<l.length;n++){var r=new CKEDITOR.dom.element(l[n]),w=r.getParent().$.rowIndex;1==r.$.rowSpan?r.remove():(--r.$.rowSpan,w==a&&(w=f[a+1],w[n-1]?r.insertAfter(new CKEDITOR.dom.element(w[n-1])):(new CKEDITOR.dom.element(e.$.rows[a+1])).append(r,1)));n+=r.$.colSpan-1}c.push(m)}f=e.$.rows;b[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START);h=new CKEDITOR.dom.element(f[k+ 11201]||(0<h?f[h-1]:null)||e.$.parentNode);for(a=c.length;0<=a;a--)g(c[a]);return e.$.parentNode?h:(b[0].select(),null)}a instanceof CKEDITOR.dom.element&&(e=a.getAscendant("table"),1==e.$.rows.length?e.remove():a.remove());return null}function b(a){for(var b=a.getParent().$.cells,c=0,d=0;d<b.length;d++){var e=b[d],c=c+e.colSpan;if(e==a.$)break}return c-1}function f(a,c){for(var d=c?Infinity:0,e=0;e<a.length;e++){var f=b(a[e]);if(c?f<d:f>d)d=f}return d}function m(a,b){for(var c=r(a)?a:d(a),e=c[0].getAscendant("table"), 1121g=f(c,1),c=f(c),h=b?g:c,k=CKEDITOR.tools.buildTableMap(e),e=[],g=[],c=[],l=k.length,m=0;m<l;m++){var n=b?k[m][h-1]:k[m][h+1];e.push(k[m][h]);g.push(n)}for(m=0;m<l;m++)e[m]&&(1<e[m].colSpan&&g[m]==e[m]?(k=e[m],k.colSpan+=1):(h=new CKEDITOR.dom.element(e[m]),k=h.clone(),k.removeAttribute("colSpan"),k.appendBogus(),k[b?"insertBefore":"insertAfter"].call(k,h),c.push(k),k=k.$),m+=k.rowSpan-1);return c}function l(a){function b(a){var c=a.getRanges(),d,e;if(1!==c.length)return a;c=c[0];if(c.collapsed||0!== 1122c.endOffset)return a;d=c.endContainer;e=d.getName().toLowerCase();if("td"!==e&&"th"!==e)return a;for((e=d.getPrevious())||(e=d.getParent().getPrevious().getLast());e.type!==CKEDITOR.NODE_TEXT&&"br"!==e.getName().toLowerCase();)if(e=e.getLast(),!e)return a;c.setEndAt(e,CKEDITOR.POSITION_BEFORE_END);return c.select()}CKEDITOR.env.webkit&&!a.isFake&&(a=b(a));var c=a.getRanges(),e=d(a),f=e[0],g=e[e.length-1],e=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(e),k,l,m=[];a.reset();var n=0;for(a= 1123h.length;n<a;n++)for(var r=0,w=h[n].length;r<w;r++)void 0===k&&h[n][r]==f.$&&(k=r),h[n][r]==g.$&&(l=r);for(n=k;n<=l;n++)for(r=0;r<h.length;r++)g=h[r],f=new CKEDITOR.dom.element(e.$.rows[r]),g=new CKEDITOR.dom.element(g[n]),g.$&&(1==g.$.colSpan?g.remove():--g.$.colSpan,r+=g.$.rowSpan-1,f.$.cells.length||m.push(f));k=h[0].length-1>l?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==a&&(c[0].moveToPosition(e, 1124CKEDITOR.POSITION_AFTER_END),c[0].select(),e.remove());return k}function k(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function c(a){if(a instanceof CKEDITOR.dom.selection){var b=a.getRanges(),f=d(a),g=f[0]&&f[0].getAscendant("table"),h;a:{var k=0;h=f.length-1;for(var l={},m,n;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")|| 1125(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=f[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a=f.length-1;0<=a;a--)c(f[a]);h?e(h,!0):g&&(b[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),b[0].select(),g.remove())}else a instanceof CKEDITOR.dom.element&&(b=a.getParent(),1==b.getChildCount()?b.remove():a.remove())}function e(a, 1126b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function a(a,b,c){a=a[b];if("undefined"==typeof c)return a;for(b=0;a&&b<a.length;b++){if(c.is&&a[b]==c.$)return b;if(b==c)return new CKEDITOR.dom.element(a[b])}return c.is?-1:null}function n(b,c,e){var f=d(b),g;if((c?1!=f.length:2>f.length)||(g=b.getCommonAncestor())&& 1127g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;b=f[0];g=b.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(g),k=h.length,l=h[0].length,m=b.getParent().$.rowIndex,n=a(h,m,b),r;if(c){var w;try{var y=parseInt(b.getAttribute("rowspan"),10)||1;r=parseInt(b.getAttribute("colspan"),10)||1;w=h["up"==c?m-y:"down"==c?m+y:m]["left"==c?n-r:"right"==c?n+r:n]}catch(I){return!1}if(!w||b.$==w)return!1;f["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(w))}c=b.getDocument();var D=m,y=w= 11280,M=!e&&new CKEDITOR.dom.documentFragment(c),H=0;for(c=0;c<f.length;c++){r=f[c];var K=r.getParent(),E=r.getFirst(),T=r.$.colSpan,O=r.$.rowSpan,K=K.$.rowIndex,N=a(h,K,r),H=H+T*O,y=Math.max(y,N-n+T);w=Math.max(w,K-m+O);e||(T=r,(O=T.getBogus())&&O.remove(),T.trim(),r.getChildren().count()&&(K==D||!E||E.isBlockBoundary&&E.isBlockBoundary({br:1})||(D=M.getLast(CKEDITOR.dom.walker.whitespaces(!0)),!D||D.is&&D.is("br")||M.append("br")),r.moveChildren(M)),c?r.remove():r.setHtml(""));D=K}if(e)return w*y== 1129H;M.moveChildren(b);b.appendBogus();y>=l?b.removeAttribute("rowSpan"):b.$.rowSpan=w;w>=k?b.removeAttribute("colSpan"):b.$.colSpan=y;e=new CKEDITOR.dom.nodeList(g.$.rows);f=e.count();for(c=f-1;0<=c;c--)g=e.getItem(c),g.$.cells.length||(g.remove(),f++);return b}function w(b,c){var e=d(b);if(1<e.length)return!1;if(c)return!0;var e=e[0],f=e.getParent(),g=f.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(g),k=f.$.rowIndex,l=a(h,k,e),m=e.$.rowSpan,n;if(1<m){n=Math.ceil(m/2);for(var m=Math.floor(m/ 11302),f=k+n,g=new CKEDITOR.dom.element(g.$.rows[f]),h=a(h,f),r,f=e.clone(),k=0;k<h.length;k++)if(r=h[k],r.parentNode==g.$&&k>l){f.insertBefore(new CKEDITOR.dom.element(r));break}else r=null;r||g.append(f)}else for(m=n=1,g=f.clone(),g.insertAfter(f),g.append(f=e.clone()),r=a(h,k),l=0;l<r.length;l++)r[l].rowSpan++;f.appendBogus();e.$.rowSpan=n;f.$.rowSpan=m;1==n&&e.removeAttribute("rowSpan");1==m&&f.removeAttribute("rowSpan");return f}function y(b,c){var e=d(b);if(1<e.length)return!1;if(c)return!0;var e= 1131e[0],f=e.getParent(),g=f.getAscendant("table"),g=CKEDITOR.tools.buildTableMap(g),h=a(g,f.$.rowIndex,e),k=e.$.colSpan;if(1<k)f=Math.ceil(k/2),k=Math.floor(k/2);else{for(var k=f=1,l=[],m=0;m<g.length;m++){var n=g[m];l.push(n[h]);1<n[h].rowSpan&&(m+=n[h].rowSpan-1)}for(g=0;g<l.length;g++)l[g].colSpan++}g=e.clone();g.insertAfter(e);g.appendBogus();e.$.colSpan=f;g.$.colSpan=k;1==f&&e.removeAttribute("colSpan");1==k&&g.removeAttribute("colSpan");return g}var r=CKEDITOR.tools.isArray;CKEDITOR.plugins.tabletools= 1132{requires:"table,dialog,contextmenu",init:function(a){function b(a){return CKEDITOR.tools.extend(a||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains({td:1,th:1},1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}function f(b,c){var d=a.addCommand(b,c);a.addFeature(d)}var p=a.lang.table,r=CKEDITOR.tools.style.parse,v="td{width} td{height} td{border-color} td{background-color} td{white-space} td{vertical-align} td{text-align} td[colspan] td[rowspan] th".split(" ");f("cellProperties", 1133new CKEDITOR.dialogCommand("cellProperties",b({allowedContent:"td th{width,height,border-color,background-color,white-space,vertical-align,text-align}[colspan,rowspan]",requiredContent:v,contentTransformations:[[{element:"td",left:function(a){return a.styles.background&&r.background(a.styles.background).color},right:function(a){a.styles["background-color"]=r.background(a.styles.background).color}},{element:"td",check:"td{vertical-align}",left:function(a){return a.attributes&&a.attributes.valign}, 1134right:function(a){a.styles["vertical-align"]=a.attributes.valign;delete a.attributes.valign}}],[{element:"tr",check:"td{height}",left:function(a){return a.styles&&a.styles.height},right:function(a){CKEDITOR.tools.array.forEach(a.children,function(b){b.name in{td:1,th:1}&&(b.attributes["cke-row-height"]=a.styles.height)});delete a.styles.height}}],[{element:"td",check:"td{height}",left:function(a){return(a=a.attributes)&&a["cke-row-height"]},right:function(a){a.styles.height=a.attributes["cke-row-height"]; 1135delete a.attributes["cke-row-height"]}}]]})));CKEDITOR.dialog.add("cellProperties",this.path+"dialogs/tableCell.js");f("rowDelete",b({requiredContent:"table",exec:function(a){a=a.getSelection();(a=g(a))&&e(a)}}));f("rowInsertBefore",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=d(a);h(a,!0)}}));f("rowInsertAfter",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=d(a);h(a)}}));f("columnDelete",b({requiredContent:"table",exec:function(a){a=a.getSelection();(a=l(a))&& 1136e(a,!0)}}));f("columnInsertBefore",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=d(a);m(a,!0)}}));f("columnInsertAfter",b({requiredContent:"table",exec:function(a){a=a.getSelection();a=d(a);m(a)}}));f("cellDelete",b({requiredContent:"table",exec:function(a){a=a.getSelection();c(a)}}));f("cellMerge",b({allowedContent:"td[colspan,rowspan]",requiredContent:"td[colspan,rowspan]",exec:function(a,b){b.cell=n(a.getSelection());e(b.cell,!0)}}));f("cellMergeRight",b({allowedContent:"td[colspan]", 1137requiredContent:"td[colspan]",exec:function(a,b){b.cell=n(a.getSelection(),"right");e(b.cell,!0)}}));f("cellMergeDown",b({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a,b){b.cell=n(a.getSelection(),"down");e(b.cell,!0)}}));f("cellVerticalSplit",b({allowedContent:"td[rowspan]",requiredContent:"td[rowspan]",exec:function(a){e(y(a.getSelection()))}}));f("cellHorizontalSplit",b({allowedContent:"td[colspan]",requiredContent:"td[colspan]",exec:function(a){e(w(a.getSelection()))}})); 1138f("cellInsertBefore",b({requiredContent:"table",exec:function(a){a=a.getSelection();k(a,!0)}}));f("cellInsertAfter",b({requiredContent:"table",exec:function(a){a=a.getSelection();k(a)}}));a.addMenuItems&&a.addMenuItems({tablecell:{label:p.cell.menu,group:"tablecell",order:1,getItems:function(){var b=a.getSelection(),c=d(b),b={tablecell_insertBefore:CKEDITOR.TRISTATE_OFF,tablecell_insertAfter:CKEDITOR.TRISTATE_OFF,tablecell_delete:CKEDITOR.TRISTATE_OFF,tablecell_merge:n(b,null,!0)?CKEDITOR.TRISTATE_OFF: 1139CKEDITOR.TRISTATE_DISABLED,tablecell_merge_right:n(b,"right",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_merge_down:n(b,"down",!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_vertical:y(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,tablecell_split_horizontal:w(b,!0)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED};a.filter.check(v)&&(b.tablecell_properties=0<c.length?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);return b}},tablecell_insertBefore:{label:p.cell.insertBefore, 1140group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:p.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:p.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:p.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:p.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:p.cell.mergeDown,group:"tablecell",command:"cellMergeDown", 1141order:18},tablecell_split_horizontal:{label:p.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:p.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:p.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:p.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:CKEDITOR.TRISTATE_OFF,tablerow_insertAfter:CKEDITOR.TRISTATE_OFF, 1142tablerow_delete:CKEDITOR.TRISTATE_OFF}}},tablerow_insertBefore:{label:p.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:p.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:p.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:p.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:CKEDITOR.TRISTATE_OFF,tablecolumn_insertAfter:CKEDITOR.TRISTATE_OFF, 1143tablecolumn_delete:CKEDITOR.TRISTATE_OFF}}},tablecolumn_insertBefore:{label:p.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:p.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:p.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}});a.contextMenu&&a.contextMenu.addListener(function(a,b,c){return(a=c.contains({td:1,th:1},1))&&!a.isReadOnly()?{tablecell:CKEDITOR.TRISTATE_OFF, 1144tablerow:CKEDITOR.TRISTATE_OFF,tablecolumn:CKEDITOR.TRISTATE_OFF}:null})},getCellColIndex:b,insertRow:h,insertColumn:m,getSelectedCells:d};CKEDITOR.plugins.add("tabletools",CKEDITOR.plugins.tabletools)})();CKEDITOR.tools.buildTableMap=function(d,h,g,b,f){d=d.$.rows;g=g||0;b="number"===typeof b?b:d.length-1;f="number"===typeof f?f:-1;var m=-1,l=[];for(h=h||0;h<=b;h++){m++;!l[m]&&(l[m]=[]);for(var k=-1,c=g;c<=(-1===f?d[h].cells.length-1:f);c++){var e=d[h].cells[c];if(!e)break;for(k++;l[m][k];)k++;for(var a= 1145isNaN(e.colSpan)?1:e.colSpan,e=isNaN(e.rowSpan)?1:e.rowSpan,n=0;n<e&&!(h+n>b);n++){l[m+n]||(l[m+n]=[]);for(var w=0;w<a;w++)l[m+n][k+w]=d[h].cells[c]}k+=a-1;if(-1!==f&&k>=f)break}}return l};"use strict";(function(){function d(b,d){return CKEDITOR.tools.array.reduce(d,function(a,b){return b(a)},b)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SH
vendor: 1,134 bytes, lines 1145-1147
1145IFT+90],g={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(c){function d(a){f.enabled&&!1!==a.data.command.canUndo&&f.save()}function a(){f.enabled= 1146c.readOnly?!1:"wysiwyg"==c.mode;f.onChange()}var f=c.undoManager=new b(c),g=f.editingHandler=new l(f),k=c.addCommand("undo",{exec:function(){f.undo()&&(c.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=c.addCommand("redo",{exec:function(){f.redo()&&(c.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);f.onChange=function(){k.setState(f.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED); 1147m.setState(f.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};c.on("beforeCommandExec",d);c.on("afterCommandExec",d);c.on("saveSnapshot",function(a){f.save(a.data&&a.data.contentOnly)});c.on("contentDom",g.attachListeners,g);c.on("instanceReady",function(){c.fire("saveSnapshot")});c.on("beforeModeUnload",function(){"wysiwyg"==c.mode&&f.save(!0)});c.on("mode",a);c.on("readOnly",a);c.ui.addButton&&(c.ui.addButton("Undo",{label:c.lang.undo.undo,command:"und
vendor: 9,974 bytes, lines 1147-1167
1147o",toolbar:"undo,10"}),c.ui.addButton("Redo", 1148{label:c.lang.undo.redo,command:"redo",toolbar:"undo,20"}));c.resetUndo=function(){f.reset();c.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(b){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=b.config.undoStackSize||20;this.strokesLimit= 114925;this._filterRules=[];this.editor=b;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(b){return b.replace(/\s+data-cke-expando=".*?"/g,"")})};b.prototype={type:function(c,d){var a=b.getKeyGroup(c),f=this.strokesRecorded[a]+1;d=d||f>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(f=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[a]=f;this.previousKeyGroup=a},keyGroupChanged:function(c){return b.getKeyGroup(c)!= 1150this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(b,d,a){var g=this.editor;if(this.locked||"ready"!=g.status||"wysiwyg"!=g.mode)return!1;var h=g.editable();if(!h|| 1151"ready"!=h.status)return!1;h=this.snapshots;d||(d=new f(g));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(b||d.equalsSelection(this.currentImage))return!1}else!1!==a&&g.fire("change");h.splice(this.index+1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(d)-1;this.currentImage=d;!1!==a&&this.refreshState();return!0},restoreImage:function(b){var d=this.editor,a;b.bookmarks&&(d.focus(),a=d.getSelection());this.locked={level:999};this.editor.loadSnapshot(b.contents); 1152b.bookmarks?a.selectBookmarks(b.bookmarks):CKEDITOR.env.ie&&(a=this.editor.document.getBody().$.createTextRange(),a.collapse(!0),a.select());this.locked=null;this.index=b.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();d.fire("change")},getNextImage:function(b){var d=this.snapshots,a=this.currentImage,f;if(a)if(b)for(f=this.index-1;0<=f;f--){if(b=d[f],!a.equalsContent(b))return b.index=f,b}else for(f=this.index+1;f<d.length;f++)if(b=d[f],!a.equalsContent(b))return b.index= 1153f,b;return null},redoable:function(){return this.enabled&&this.hasRedo},undoable:function(){return this.enabled&&this.hasUndo},undo:function(){if(this.undoable()){this.save(!0);var b=this.getNextImage(!0);if(b)return this.restoreImage(b),!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var b=this.getNextImage(!1);if(b)return this.restoreImage(b),!0}return!1},update:function(b){if(!this.locked){b||(b=new f(this.editor));for(var d=this.index,a=this.snapshots;0<d&&this.currentImage.equalsContent(a[d- 11541]);)--d;a.splice(d,this.index-d+1,b);this.index=d;this.currentImage=b}},updateSelection:function(b){if(!this.snapshots.length)return!1;var d=this.snapshots,a=d[d.length-1];return a.equalsContent(b)&&!a.equalsSelection(b)?(this.currentImage=d[d.length-1]=b,!0):!1},lock:function(b,d){if(this.locked)this.locked.level++;else if(b)this.locked={level:1};else{var a=null;if(d)a=!0;else{var g=new f(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(g)&&(a=g)}this.locked={update:a,level:1}}}, 1155unlock:function(){if(this.locked&&!--this.locked.level){var b=this.locked.update;this.locked=null;if(!0===b)this.update();else if(b){var d=new f(this.editor,!0);b.equalsContent(d)||this.update()}}},addFilterRule:function(b){this._filterRules.push(b)}};b.navigationKeyCodes={37:1,38:1,39:1,40:1,36:1,35:1,33:1,34:1};b.keyGroups={PRINTABLE:0,FUNCTIONAL:1};b.isNavigationKey=function(c){return!!b.navigationKeyCodes[c]};b.getKeyGroup=function(c){var d=b.keyGroups;return g[c]?d.FUNCTIONAL:d.PRINTABLE};b.getOppositeKeyGroup= 1156function(c){var d=b.keyGroups;return c==d.FUNCTIONAL?d.PRINTABLE:d.FUNCTIONAL};b.ieFunctionalKeysBug=function(c){return CKEDITOR.env.ie&&b.getKeyGroup(c)==b.keyGroups.FUNCTIONAL};var f=CKEDITOR.plugins.undo.Image=function(b,e){this.editor=b;b.fire("beforeUndoImage");var a=b.getSnapshot();a&&(this.contents=d(a,b.undoManager._filterRules));e||(this.bookmarks=(a=a&&b.getSelection())&&a.createBookmarks2(!0));b.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;f.prototype={equalsContent:function(b){var d= 1157this.contents;b=b.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(d=d.replace(m,""),b=b.replace(m,""));return d!=b?!1:!0},equalsSelection:function(b){var d=this.bookmarks;b=b.bookmarks;if(d||b){if(!d||!b||d.length!=b.length)return!1;for(var a=0;a<d.length;a++){var f=d[a],g=b[a];if(f.startOffset!=g.startOffset||f.endOffset!=g.endOffset||!CKEDITOR.tools.arrayCompare(f.start,g.start)||!CKEDITOR.tools.arrayCompare(f.end,g.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler= 1158function(b){this.undoManager=b;this.ignoreInputEvent=!1;this.keyEventsStack=new k;this.lastKeydownImage=null};l.prototype={onKeydown:function(c){var d=c.data.getKey();if(229!==d)if(-1<CKEDITOR.tools.indexOf(h,c.data.getKeystroke()))c.data.preventDefault();else if(this.keyEventsStack.cleanUp(c),c=this.undoManager,this.keyEventsStack.getLast(d)||this.keyEventsStack.push(d),this.lastKeydownImage=new f(c.editor),b.isNavigationKey(d)||this.undoManager.keyGroupChanged(d))if(c.strokesRecorded[0]||c.strokesRecorded[1])c.save(!1, 1159this.lastKeydownImage,!1),c.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var b=this.keyEventsStack.getLast();b||(b=this.keyEventsStack.push(0));this.keyEventsStack.increment(b.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(b.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(c){var d=this.undoManager;c=c.data.getKey();var a=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(c); 1160if(!(b.ieFunctionalKeysBug(c)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new f(d.editor,!0))))if(0<a)d.type(c);else if(b.isNavigationKey(c))this.onNavigationKey(!0)},onNavigationKey:function(b){var d=this.undoManager;!b&&d.save(!0,null,!1)||d.updateSelection(new f(d.editor));d.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var c=this.undoManager.editor,d=c.editable(), 1161a=this;d.attachListener(d,"keydown",function(c){a.onKeydown(c);if(b.ieFunctionalKeysBug(c.data.getKey()))a.onInput()},null,null,999);d.attachListener(d,CKEDITOR.env.ie?"keypress":"input",a.onInput,a,null,999);d.attachListener(d,"keyup",a.onKeyup,a,null,999);d.attachListener(d,"paste",a.ignoreInputEventListener,a,null,999);d.attachListener(d,"drop",a.ignoreInputEventListener,a,null,999);c.on("afterPaste",a.activateInputEventListener,a,null,999);d.attachListener(d.isInline()?d:c.document.getDocumentElement(), 1162"click",function(){a.onNavigationKey()},null,null,999);d.attachListener(this.undoManager.editor,"blur",function(){a.keyEventsStack.remove(9)},null,null,999)}};var k=CKEDITOR.plugins.undo.KeyEventsStack=function(){this.stack=[]};k.prototype={push:function(b){b=this.stack.push({keyCode:b,inputs:0});return this.stack[b-1]},getLastIndex:function(b){if("number"!=typeof b)return this.stack.length-1;for(var d=this.stack.length;d--;)if(this.stack[d].keyCode==b)return d;return-1},getLast:function(b){b=this.getLastIndex(b); 1163return-1!=b?this.stack[b]:null},increment:function(b){this.getLast(b).inputs++},remove:function(b){b=this.getLastIndex(b);-1!=b&&this.stack.splice(b,1)},resetInputs:function(b){if("number"==typeof b)this.getLast(b).inputs=0;else for(b=this.stack.length;b--;)this.stack[b].inputs=0},getTotalInputs:function(){for(var b=this.stack.length,d=0;b--;)d+=this.stack[b].inputs;return d},cleanUp:function(b){b=b.data.$;b.ctrlKey||b.metaKey||this.remove(17);b.shiftKey||this.remove(16);b.altKey||this.remove(18)}}})(); 1164(function(){function d(b){function d(b){var c=!1;a.attachListener(a,"keydown",function(){var a=k.getBody().getElementsByTag(b);if(!c){for(var d=0;d<a.count();d++)a.getItem(d).setCustomData("retain",!0);c=!0}},null,null,1);a.attachListener(a,"keyup",function(){var a=k.getElementsByTag(b);c&&(1==a.count()&&!a.getItem(0).getCustomData("retain")&&CKEDITOR.tools.isEmpty(a.getItem(0).getAttributes())&&a.getItem(0).remove(1),c=!1)})}var g=this.editor;if(g&&!g.isDetached()){var k=b.document,c=k.body,e=k.getElementById("cke_actscrpt"); 1165e&&e.parentNode.removeChild(e);(e=k.getElementById("cke_shimscrpt"))&&e.parentNode.removeChild(e);(e=k.getElementById("cke_basetagscrpt"))&&e.parentNode.removeChild(e);c.contentEditable=!0;CKEDITOR.env.ie&&(c.hideFocus=!0,c.disabled=!0,c.removeAttribute("disabled"));delete this._.isLoadingData;this.$=c;k=new CKEDITOR.dom.document(k);this.setup();this.fixInitialSelection();var a=this;CKEDITOR.env.ie&&!CKEDITOR.env.edge&&k.getDocumentElement().addClass(k.$.compatMode);CKEDITOR.env.ie&&!CKEDITOR.env.edge&& 1166g.enterMode!=CKEDITOR.ENTER_P?d("p"):CKEDITOR.env.edge&&15>CKEDITOR.env.version&&g.enterMode!=CKEDITOR.ENTER_DIV&&d("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10<CKEDITOR.env.version)k.getDocumentElement().on("mousedown",function(a){a.data.getTarget().is("html")&&setTimeout(function(){g.editable().focus()})});h(g);try{g.document.$.execCommand("2D-position",!1,!0)}catch(n){}(CKEDITOR.env.gecko||CKEDITOR.env.ie&&"CSS1Compat"==g.document.$.compatMode)&&this.attachListener(this,"keydown",function(a){var b= 1167a.data.getKeystroke();if(33==b||34==b)if(CKEDITOR.env.ie)setTimeout(function(){g.getSelection().scrollIntoView()},0);
vendor: 10,711 bytes, lines 1167-1182
1167else if(g.window.$.innerHeight>this.$.offsetHeight){var c=g.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(k,"blur",function(){try{k.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(k,"touchend",function(){b.focus()});c=g.document.getElementsByTag("title").getItem(0); 1168c.data("cke-title",c.getText());CKEDITOR.env.ie&&(g.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");g.fire("contentDom");this._.isPendingFocus&&(g.focus(),this._.isPendingFocus=!1);setTimeout(function(){g.fire("dataReady")},0)},0,this)}}function h(b){function d(){var c;b.editable().attachListener(b,"selectionChange",function(){var a=b.getSelection().getSelectedElement();a&&(c&&(c.detachEvent("onresizestart",g),c=null),a.$.attachEvent("onresizestart", 1169g),c=a.$)})}function g(b){b.returnValue=!1}if(CKEDITOR.env.gecko)try{var h=b.document.$;h.execCommand("enableObjectResizing",!1,!b.config.disableObjectResizing);h.execCommand("enableInlineTableEditing",!1,!b.config.disableNativeTableHandles)}catch(c){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&b.config.disableObjectResizing&&d(b)}function g(){var b=[];if(8<=CKEDITOR.document.$.documentMode){b.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var d=[],g;for(g in CKEDITOR.dtd.$removeEmpty)d.push("html.CSS1Compat "+ 1170g+"[contenteditable\x3dfalse]");b.push(d.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(b.push("html{height:100% !important}"),b.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));b.push("html{cursor:text;*cursor:auto}");b.push("img,input,textarea{cursor:default}");return b.join("\n")}var b;CKEDITOR.plugins.add("wysiwygarea",{init:function(d){d.config.fullPage&&d.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", 1171requiredContent:"body"});d.addMode("wysiwyg",function(g){function h(a){a&&a.removeListener();d.isDestroyed()||d.isDetached()||(d.editable(new b(d,c.$.contentWindow.document.body)),d.setData(d.getData(1),g))}var k="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(k)+"}())":"",c=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+ 1172k+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');c.setStyles({width:"100%",height:"100%"});c.addClass("cke_wysiwyg_frame").addClass("cke_reset");k=d.ui.space("contents");k.append(c);var e=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(e)c.on("load",h);var a=d.title,n=d.fire("ariaEditorHelpLabel",{}).label;a&&(CKEDITOR.env.ie&&n&&(a+=", "+n),c.setAttribute("title",a));if(n){var a=CKEDITOR.tools.getNextId(),w=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+a+'" class\x3d"cke_voice_label"\x3e'+ 1173n+"\x3c/span\x3e");k.append(w,1);c.setAttribute("aria-describedby",a)}d.on("beforeModeUnload",function(a){a.removeListener();w&&w.remove()});c.setAttributes({tabIndex:d.tabIndex,allowTransparency:"true"});!e&&h();d.fire("ariaWidget",c)})}});CKEDITOR.editor.prototype.addContentsCss=function(b){var d=this.config,g=d.contentsCss;CKEDITOR.tools.isArray(g)||(d.contentsCss=g?[g]:[]);d.contentsCss.push(b)};b=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler= 1174CKEDITOR.tools.addFunction(function(b){CKEDITOR.tools.setTimeout(d,0,this,b)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(b,d){var h=this.editor;if(d)this.setHtml(b),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var k=h.config,c=k.fullPage,e=k.docType,a=CKEDITOR.tools.buildStyleHtml(g()).replace(/<style>/,'\x3cstyle data-cke-temp\x3d"1"\x3e');c||(a+=CKEDITOR.tools.buildStyleHtml(h.config.contentsCss)); 1175var n=k.baseHref?'\x3cbase href\x3d"'+k.baseHref+'" data-cke-temp\x3d"1" /\x3e':"";c&&(b=b.replace(/<!DOCTYPE[^>]*>/i,function(a){h.docType=e=a;return""}).replace(/<\?xml\s[^\?]*\?>/i,function(a){h.xmlDeclaration=a;return""}));b=h.dataProcessor.toHtml(b);c?(/<body[\s|>]/.test(b)||(b="\x3cbody\x3e"+b),/<html[\s|>]/.test(b)||(b="\x3chtml\x3e"+b+"\x3c/html\x3e"),/<head[\s|>]/.test(b)?/<title[\s|>]/.test(b)||(b=b.replace(/<head[^>]*>/,"$\x26\x3ctitle\x3e\x3c/title\x3e")):b=b.replace(/<html[^>]*>/,"$\x26\x3chead\x3e\x3ctitle\x3e\x3c/title\x3e\x3c/head\x3e"), 1176n&&(b=b.replace(/<head[^>]*?>/,"$\x26"+n)),b=b.replace(/<\/head\s*>/,a+"$\x26"),b=e+b):b=k.docType+'\x3chtml dir\x3d"'+k.contentsLangDirection+'" lang\x3d"'+(k.contentsLanguage||h.langCode)+'"\x3e\x3chead\x3e\x3ctitle\x3e'+this._.docTitle+"\x3c/title\x3e"+n+a+"\x3c/head\x3e\x3cbody"+(k.bodyId?' id\x3d"'+k.bodyId+'"':"")+(k.bodyClass?' class\x3d"'+k.bodyClass+'"':"")+"\x3e"+b+"\x3c/body\x3e\x3c/html\x3e";CKEDITOR.env.gecko&&(b=b.replace(/<body/,'\x3cbody contenteditable\x3d"true" '),2E4>CKEDITOR.env.version&& 1177(b=b.replace(/<body[^>]*>/,"$\x26\x3c!-- cke-content-start --\x3e")));k='\x3cscript id\x3d"cke_actscrpt" type\x3d"text/javascript"'+(CKEDITOR.env.ie?' defer\x3d"defer" ':"")+"\x3evar wasLoaded\x3d0;function onload(){if(!wasLoaded)window.parent.CKEDITOR.tools.callFunction("+this._.frameLoadedHandler+",window);wasLoaded\x3d1;}"+(CKEDITOR.env.ie?"onload();":'document.addEventListener("DOMContentLoaded", onload, false );')+"\x3c/script\x3e";CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(k+='\x3cscript id\x3d"cke_shimscrpt"\x3ewindow.parent.CKEDITOR.tools.enableHtml5Elements(document)\x3c/script\x3e'); 1178n&&CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(k+='\x3cscript id\x3d"cke_basetagscrpt"\x3evar baseTag \x3d document.querySelector( "base" );baseTag.href \x3d baseTag.href;\x3c/script\x3e');b=b.replace(/(?=\s*<\/(:?head)>)/,k);this.clearCustomData();this.clearListeners();h.fire("contentDomUnload");var w=this.getDocument();try{w.write(b)}catch(y){setTimeout(function(){w.write(b)},0)}}},getData:function(b){if(b)return this.getHtml();b=this.editor;var d=b.config,g=d.fullPage,h=g&&b.docType,c=g&&b.xmlDeclaration, 1179e=this.getDocument(),g=g?e.getDocumentElement().getOuterHtml():e.getBody().getHtml();CKEDITOR.env.gecko&&d.enterMode!=CKEDITOR.ENTER_BR&&(g=g.replace(/<br>(?=\s*(:?$|<\/body>))/,""));g=b.dataProcessor.toDataFormat(g);c&&(g=c+"\n"+g);h&&(g=h+"\n"+g);return g},focus:function(){this._.isLoadingData?this._.isPendingFocus=!0:b.baseProto.focus.call(this)},detach:function(){var d=this.editor,g=d.document,d=d.container.findOne("iframe.cke_wysiwyg_frame");b.baseProto.detach.call(this);this.clearCustomData(this._.expandoNumber); 1180g.getDocumentElement().clearCustomData();CKEDITOR.tools.removeFunction(this._.frameLoadedHandler);d&&(d.clearCustomData(),(g=d.removeCustomData("onResize"))&&g.removeListener(),d.isDetached()||d.remove())}}})})();CKEDITOR.config.disableObjectResizing=!1;CKEDITOR.config.disableNativeTableHandles=!0;CKEDITOR.config.disableNativeSpellChecker=!0;CKEDITOR.config.plugins="dialogui,dialog,a11yhelp,basicstyles,blockquote,notification,button,toolbar,clipboard,codemirror,panelbutton,panel,floatpanel,colorbutton,menu,contextmenu,dialogadvtab,enterkey,listblock,richcombo,font,format,horizontalrule,htmlwriter,lineutils,widgetselection,widget,image2,imagespacingbox,indent,indentlist,indentblock,justify,fakeobjects,link,list,liststyle,magicline,pagebreak,pastefromword,pastetext,pastetools,removeformat,resize,tab,table,tabletools,undo,wysiwygarea"; 1181CKEDITOR.config.skin="moono-lexicon";(function(){var d=function(d,g){var b=CKEDITOR.getUrl("plugins/"+g);d=d.split(",");for(var f=0;f<d.length;f++)CKEDITOR.skin.icons[d[f]]={path:b,offset:-d[++f],bgsize:d[++f]}};CKEDITOR.env.hidpi?d("about,0,,bold,24,,italic,48,,strike,72,,subscript,96,,superscript,120,,underline,144,,bidiltr,168,,bidirtl,192,,blockquote,216,,copy-rtl,240,,copy,264,,cut-rtl,288,,cut,312,,paste-rtl,336,,paste,360,,codesnippet,384,,bgcolor,408,,textcolor,432,,copyformatting,456,,creatediv,480,,docprops-rtl,504,,docprops,528,,easyimagealigncenter,552,,easyimagealignleft,576,,easyimagealignright,600,,easyimagealt,624,,easyimagefull,648,,easyimageside,672,,easyimageupload,696,,embed,720,,embedsemantic,744,,emojipanel,768,,find-rtl,792,,find,816,,replace,840,,flash,864,,button,888,,checkbox,912,,form,936,,hiddenfield,960,,imagebutton,984,,radio,1008,,select-rtl,1032,,select,1056,,textarea-rtl,1080,,textarea,1104,,textfield-rtl,1128,,textfield,1152,,horizontalrule,1176,,iframe,1200,,image,1224,,indent-rtl,1248,,indent,1272,,outdent-rtl,1296,,outdent,1320,,justifyblock,1344,,justifycenter,1368,,justifyleft,1392,,justifyright,1416,,language,1440,,anchor-rtl,1464,,anchor,1488,,link,1512,,unlink,1536,,bulletedlist-rtl,1560,,bulletedlist,1584,,numberedlist-rtl,1608,,numberedlist,1632,,mathjax,1656,,maximize,1680,,newpage-rtl,1704,,newpage,1728,,pagebreak-rtl,1752,,pagebreak,1776,,pastefromword-rtl,1800,,pastefromword,1824,,pastetext-rtl,1848,,pastetext,1872,,placeholder,1896,,preview-rtl,1920,,preview,1944,,print,1968,,removeformat,1992,,save,2016,,scayt,2040,,selectall,2064,,showblocks-rtl,2088,,showblocks,2112,,smiley,2136,,source-rtl,2160,,source,2184,,sourcedialog-rtl,2208,,sourcedialog,2232,,specialchar,2256,,table,2280,,templates-rtl,2304,,templates,2328,,uicolor,2352,,redo-rtl,2376,,redo,2400,,undo-rtl,2424,,undo,2448,,simplebox,4944,auto,spellchecker,2496,", 1182"icons_hidpi.png"):d("about,0,auto,bold,24,auto,italic,48,auto,strike,72,auto,subscript,96,auto,superscript,120,auto,underline,144,auto,bidiltr,168,auto,bidirtl,192,auto,blockquote,216,auto,copy-rtl,240,auto,copy,264,auto,cut-rtl,288,auto,cut,312,auto,paste-rtl,336,auto,paste,360,auto,codesnippet,384,auto,bgcolor,408,auto,textcolor,432,auto,copyformatting,456,auto,creatediv,480,auto,docprops-rtl,504,auto,docprops,528,auto,easyimagealigncenter,552,auto,easyimagealignleft,576,auto,easyimagealignright,600,auto,easyimagealt,624,auto,easyimagefull,648,auto,easyimageside,672,auto,easyimageupload,696,auto,embed,720,auto,embedsemantic,744,auto,emojipanel,768,auto,find-rtl,792,auto,find,816,auto,replace,840,auto,flash,864,auto,button,888,auto,checkbox,912,auto,form,936,auto,hiddenfield,960,auto,imagebutton,984,auto,radio,1008,auto,select-rtl,1032,auto,select,1056,auto,textarea-rtl,1080,auto,textarea,1104,auto,textfield-rtl,1128,auto,textfield,1152,auto,horizontalrule,1176,auto,iframe,1200,auto,image,1224,auto,indent-rtl,1248,auto,indent,1272,auto,outdent-rtl,1296,auto,outdent,1320,auto,justifyblock,1344,auto,justifycenter,1368,auto,justifyleft,1392,auto,justifyright,1416,auto,language,1440,auto,anch
1182or-rtl,1464,auto,anchor,1488,auto,link,1512,auto,unlink,1536,auto,bulletedlist-rtl,1560,auto,bulletedlist,1584,auto,numberedlist-rtl,1608,auto,numberedlist,1632,auto,mathjax,1656,auto,maximize,1680,auto,newpage-rtl,1704,auto,newpage,1728,auto,pagebreak-rtl,1752,auto,pagebreak,1776,auto,pastefromword-rtl,1800,auto,pastefromword,1824,auto,pastetext-rtl,1848,auto,pastetext,1872,auto,placeholder,1896,auto,preview-rtl,1920,auto,preview,1944,auto,print,1968,auto,removeformat,1992,auto,save,2016,auto,scayt,2040,auto,selectall,2064,auto,showblocks-rtl,2088,auto,showblocks,2112,auto,smiley,2136,auto,source-rtl,2160,auto,source,2184,auto,sourcedialog-rtl,2208,auto,sourcedialog,2232,auto,specialchar,2256,auto,table,2280,auto,templates-rtl,2304,auto,templates,2328,auto,uicolor,2352,auto,redo-rtl,2376,auto,redo,2400,auto,undo-rtl,2424,auto,undo,2448,auto,simplebox,2472,auto,spellchecker,2496,auto", 1183"icons.png")})()}})();
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.