vendor: 6,504 bytes, lines 1-17
1/* 2Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. 3For licensing, see LICENSE.md or http://ckeditor.com/license 4*/ 5(function(){if(!window.CKEDITOR||!window.CKEDITOR.dom){window.CKEDITOR||(window.CKEDITOR=function(){var c=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,g={timestamp:"K7C3",version:"DEV",revision:"0",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:c},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var e=document.getElementsByTagName("script"),g=0;g<e.length;g++){var k=e[g].src.match(c);if(k){b=k[1];break}}-1==b.indexOf(":/")&&"//"!=b.slice(0,2)&& 6(b=0===b.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+b:location.href.match(/^[^\?]*\/(?:)/)[0]+b);if(!b)throw'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return b}(),getUrl:function(b){-1==b.indexOf(":/")&&0!==b.indexOf("/")&&(b=this.basePath+b);this.timestamp&&"/"!=b.charAt(b.length-1)&&!/[&?]t=/.test(b)&&(b+=(0<=b.indexOf("?")?"\x26":"?")+"t\x3d"+this.timestamp);return b},domReady:function(){function b(){try{document.addEventListener? 7(document.removeEventListener("DOMContentLoaded",b,!1),c()):document.attachEvent&&"complete"===document.readyState&&(document.detachEvent("onreadystatechange",b),c())}catch(e){}}function c(){for(var b;b=e.shift();)b()}var e=[];return function(c){function d(){try{document.documentElement.doScroll("left")}catch(a){setTimeout(d,1);return}b()}e.push(c);"complete"===document.readyState&&setTimeout(b,1);if(1==e.length)if(document.addEventListener)document.addEventListener("DOMContentLoaded",b,!1),window.addEventListener("load", 8b,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",b);window.attachEvent("onload",b);c=!1;try{c=!window.frameElement}catch(f){}document.documentElement.doScroll&&c&&d()}}}()},e=window.CKEDITOR_GETURL;if(e){var b=g.getUrl;g.getUrl=function(c){return e.call(g,c)||b.call(g,c)}}return g}());CKEDITOR.event||(CKEDITOR.event=function(){},CKEDITOR.event.implementOn=function(c){var g=CKEDITOR.event.prototype,e;for(e in g)null==c[e]&&(c[e]=g[e])},CKEDITOR.event.prototype=function(){function c(b){var c= 9g(this);return c[b]||(c[b]=new e(b))}var g=function(b){b=b.getPrivate&&b.getPrivate()||b._||(b._={});return b.events||(b.events={})},e=function(b){this.name=b;this.listeners=[]};e.prototype={getListenerIndex:function(b){for(var c=0,e=this.listeners;c<e.length;c++)if(e[c].fn==b)return c;return-1}};return{define:function(b,e){var g=c.call(this,b);CKEDITOR.tools.extend(g,e,!0)},on:function(b,e,g,l,k){function d(a,n,d,t){a={name:b,sender:this,editor:a,data:n,listenerData:l,stop:d,cancel:t,removeListener:f}; 10return!1===e.call(g,a)?!1:a.data}function f(){n.removeListener(b,e)}var a=c.call(this,b);if(0>a.getListenerIndex(e)){a=a.listeners;g||(g=this);isNaN(k)&&(k=10);var n=this;d.fn=e;d.priority=k;for(var t=a.length-1;0<=t;t--)if(a[t].priority<=k)return a.splice(t+1,0,d),{removeListener:f};a.unshift(d)}return{removeListener:f}},once:function(){var b=Array.prototype.slice.call(arguments),c=b[1];b[1]=function(b){b.removeListener();return c.apply(this,arguments)};return this.on.apply(this,b)},capture:function(){CKEDITOR.event.useCapture= 111;var b=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return b},fire:function(){var b=0,c=function(){b=1},e=0,l=function(){e=1};return function(k,d,f){var a=g(this)[k];k=b;var n=e;b=e=0;if(a){var t=a.listeners;if(t.length)for(var t=t.slice(0),x,p=0;p<t.length;p++){if(a.errorProof)try{x=t[p].call(this,f,d,c,l)}catch(r){}else x=t[p].call(this,f,d,c,l);!1===x?e=1:"undefined"!=typeof x&&(d=x);if(b||e)break}}d=e?!1:"undefined"==typeof d?!0:d;b=k;e=n;return d}}(),fireOnce:function(b,c,e){c= 12this.fire(b,c,e);delete g(this)[b];return c},removeListener:function(b,c){var e=g(this)[b];if(e){var l=e.getListenerIndex(c);0<=l&&e.listeners.splice(l,1)}},removeAllListeners:function(){var b=g(this),c;for(c in b)delete b[c]},hasListeners:function(b){return(b=g(this)[b])&&0<b.listeners.length}}}());CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(c,g){c in{instanceReady:1,loaded:1}&&(this[c]= 13!0);return CKEDITOR.event.prototype.fire.call(this,c,g,this)},CKEDITOR.editor.prototype.fireOnce=function(c,g){c in{instanceReady:1,loaded:1}&&(this[c]=!0);return CKEDITOR.event.prototype.fireOnce.call(this,c,g,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));CKEDITOR.env||(CKEDITOR.env=function(){var c=navigator.userAgent.toLowerCase(),g=c.match(/edge[ \/](\d+.?\d*)/),e=-1<c.indexOf("trident/"),e=!(!g&&!e),e={ie:e,edge:!!g,webkit:!e&&-1<c.indexOf(" applewebkit/"),air:-1<c.indexOf(" adobeair/"), 14mac:-1<c.indexOf("macintosh"),quirks:"BackCompat"==document.compatMode&&(!document.documentMode||10>document.documentMode),mobile:-1<c.indexOf("mobile"),iOS:/(ipad|iphone|ipod)/.test(c),isCustomDomain:function(){if(!this.ie)return!1;var b=document.domain,c=window.location.hostname;return b!=c&&b!="["+c+"]"},secure:"https:"==location.protocol};e.gecko="Gecko"==navigator.product&&!e.webkit&&!e.ie;e.webkit&&(-1<c.indexOf("chrome")?e.chrome=!0:e.safari=!0);var b=0;e.ie&&(b=g?parseFloat(g[1]):e.quirks|| 15!document.documentMode?parseFloat(c.match(/msie (\d+)/)[1]):document.documentMode,e.ie9Compat=9==b,e.ie8Compat=8==b,e.ie7Compat=7==b,e.ie6Compat=7>b||e.quirks);e.gecko&&(g=c.match(/rv:([\d\.]+)/))&&(g=g[1].split("."),b=1E4*g[0]+100*(g[1]||0)+1*(g[2]||0));e.air&&(b=parseFloat(c.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(b=parseFloat(c.match(/ applewebkit\/(\d+)/)[1]));e.version=b;e.isCompatible=!(e.ie&&7>b)&&!(e.gecko&&4E4>b)&&!(e.webkit&&534>b);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko|| 16e.webkit||e.ie&&10<b;e.needsNbspFiller=e.ie&&11>b;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air");e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}());"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!= 17CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var c=document.createElement("script");c.type="text/javascript";
vendor: 14,499 bytes, lines 17-45
17c.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(c)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(c){(this._.pending||(this._.pending=[])).push(c)};(function(){CKEDITOR.domReady(function(){var c=CKEDITOR.loadFullCore,g=CKEDITOR.loadFullCoreTimeout;c&&(CKEDITOR.status="basic_ready",c&&c._load?c():g&&setTimeout(function(){CKEDITOR.loadFullCore&& 18CKEDITOR.loadFullCore()},1E3*g))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(c,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:c,additionalData:g})};CKEDITOR.error=function(c,g){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:c,additionalData:g})};CKEDITOR.on("log", 19function(c){if(window.console&&window.console.log){var g=console[c.data.type]?c.data.type:"log",e=c.data.errorCode;if(c=c.data.additionalData)console[g]("[CKEDITOR] Error code: "+e+".",c);else console[g]("[CKEDITOR] Error code: "+e+".");console[g]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+e)}},null,null,999);CKEDITOR.dom={};(function(){function c(a,d,f){this._minInterval=a;this._context=f;this._lastOutput=this._scheduledTimer= 200;this._output=CKEDITOR.tools.bind(d,f||{});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 g(a,d,f){c.call(this,a,d,f);this._args=[];var b=this;this.input=CKEDITOR.tools.override(this.input,function(a){return function(){b._args=Array.prototype.slice.call(arguments);a.call(this)}})} 21var e=[],b=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",h=/&/g,m=/>/g,l=/</g,k=/"/g,d=/&(lt|gt|amp|quot|nbsp|shy|#\d{1,5});/g,f={lt:"\x3c",gt:"\x3e",amp:"\x26",quot:'"',nbsp:" ",shy:"Â"},a=function(a,d){return"#"==d[0]?String.fromCharCode(parseInt(d.slice(1),10)):f[d]};CKEDITOR.on("reset",function(){e=[]});CKEDITOR.tools={arrayCompare:function(a,d){if(!a&&!d)return!0;if(!a||!d||a.length!=d.length)return!1;for(var f=0;f<a.length;f++)if(a[f]!=d[f])return!1;return!0}, 22getIndex:function(a,d){for(var f=0;f<a.length;++f)if(d(a[f]))return f;return-1},clone:function(a){var d;if(a&&a instanceof Array){d=[];for(var f=0;f<a.length;f++)d[f]=CKEDITOR.tools.clone(a[f]);return d}if(null===a||"object"!=typeof a||a instanceof String||a instanceof Number||a instanceof Boolean||a instanceof Date||a instanceof RegExp||a.nodeType||a.window===a)return a;d=new a.constructor;for(f in a)d[f]=CKEDITOR.tools.clone(a[f]);return d},capitalize:function(a,d){return a.charAt(0).toUpperCase()+ 23(d?a.slice(1):a.slice(1).toLowerCase())},extend:function(a){var d=arguments.length,f,b;"boolean"==typeof(f=arguments[d-1])?d--:"boolean"==typeof(f=arguments[d-2])&&(b=arguments[d-1],d-=2);for(var c=1;c<d;c++){var e=arguments[c]||{};CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(e),function(d){if(!0===f||null==a[d])if(!b||d in b)a[d]=e[d]})}return a},prototypedCopy:function(a){var d=function(){};d.prototype=a;return new d},copy:function(a){var d={},f;for(f in a)d[f]=a[f];return d},isArray:function(a){return"[object Array]"== 24Object.prototype.toString.call(a)},isEmpty:function(a){for(var d in a)if(a.hasOwnProperty(d))return!1;return!0},cssVendorPrefix:function(a,d,f){if(f)return b+a+":"+d+";"+a+":"+d;f={};f[a]=d;f[b+a]=d;return f},cssStyleToDomStyle:function(){var a=document.createElement("div").style,d="undefined"!=typeof a.cssFloat?"cssFloat":"undefined"!=typeof a.styleFloat?"styleFloat":"float";return function(a){return"float"==a?d:a.replace(/-./g,function(a){return a.substr(1).toUpperCase()})}}(),buildStyleHtml:function(a){a= 25[].concat(a);for(var d,f=[],b=0;b<a.length;b++)if(d=a[b])/@import|[{}]/.test(d)?f.push("\x3cstyle\x3e"+d+"\x3c/style\x3e"):f.push('\x3clink type\x3d"text/css" rel\x3dstylesheet href\x3d"'+d+'"\x3e');return f.join("")},htmlEncode:function(a){return void 0===a||null===a?"":String(a).replace(h,"\x26amp;").replace(m,"\x26gt;").replace(l,"\x26lt;")},htmlDecode:function(n){return n.replace(d,a)},htmlEncodeAttr:function(a){return CKEDITOR.tools.htmlEncode(a).replace(k,"\x26quot;")},htmlDecodeAttr:function(a){return CKEDITOR.tools.htmlDecode(a)}, 26transformPlainTextToHtml:function(a,d){var f=d==CKEDITOR.ENTER_BR,b=this.htmlEncode(a.replace(/\r\n/g,"\n")),b=b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;"),c=d==CKEDITOR.ENTER_P?"p":"div";if(!f){var e=/\n{2}/g;if(e.test(b))var h="\x3c"+c+"\x3e",k="\x3c/"+c+"\x3e",b=h+b.replace(e,function(){return k+h})+k}b=b.replace(/\n/g,"\x3cbr\x3e");f||(b=b.replace(new RegExp("\x3cbr\x3e(?\x3d\x3c/"+c+"\x3e)"),function(a){return CKEDITOR.tools.repeat(a,2)}));b=b.replace(/^ | $/g,"\x26nbsp;");return b=b.replace(/(>|\s) /g, 27function(a,n){return n+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",d=0;8>d;d++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,d){var f=d(a);f.prototype=a.prototype;return f},setTimeout:function(a,d,f,b,c){c||(c=window);f||(f=c);return c.setTimeout(function(){b?a.apply(f,[].concat(b)):a.apply(f)}, 28d||0)},throttle:function(a,d,f){return new this.buffers.throttle(a,d,f)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(d){return d.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(d){return d.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(d){return d.replace(a,"")}}(),indexOf:function(a,d){if("function"==typeof d)for(var f=0,b=a.length;f<b;f++){if(d(a[f]))return f}else{if(a.indexOf)return a.indexOf(d);f=0;for(b=a.length;f< 29b;f++)if(a[f]===d)return f}return-1},search:function(a,d){var f=CKEDITOR.tools.indexOf(a,d);return 0<=f?a[f]:null},bind:function(a,d){var f=Array.prototype.slice.call(arguments,2);return function(){return a.apply(d,f.concat(Array.prototype.slice.call(arguments)))}},createClass:function(a){var d=a.$,f=a.base,b=a.privates||a._,c=a.proto;a=a.statics;!d&&(d=function(){f&&this.base.apply(this,arguments)});if(b)var e=d,d=function(){var a=this._||(this._={}),n;for(n in b){var d=b[n];a[n]="function"==typeof d? 30CKEDITOR.tools.bind(d,this):d}e.apply(this,arguments)};f&&(d.prototype=this.prototypedCopy(f.prototype),d.prototype.constructor=d,d.base=f,d.baseProto=f.prototype,d.prototype.base=function u(){this.base=f.prototype.base;f.apply(this,arguments);this.base=u});c&&this.extend(d.prototype,c,!0);a&&this.extend(d,a,!0);return d},addFunction:function(a,d){return e.push(function(){return a.apply(d||this,arguments)})-1},removeFunction:function(a){e[a]=null},callFunction:function(a){var d=e[a];return d&&d.apply(window, 31Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,d;return function(f){d=CKEDITOR.tools.trim(f+"")+"px";return a.test(d)?d:f||""}}(),convertToPx:function(){var a;return function(d){a||(a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e',CKEDITOR.document),CKEDITOR.document.getBody().append(a));if(!/%$/.test(d)){var f=0>parseFloat(d);f&&(d=d.replace("-",""));a.setStyle("width", 32d);d=a.$.clientWidth;return f?-d:d}return d}}(),repeat:function(a,d){return Array(d+1).join(a)},tryThese:function(){for(var a,d=0,f=arguments.length;d<f;d++){var b=arguments[d];try{a=b();break}catch(c){}}return a},genKey:function(){return Array.prototype.slice.call(arguments).join("-")},defer:function(a){return function(){var d=arguments,f=this;window.setTimeout(function(){a.apply(f,d)},0)}},normalizeCssText:function(a,d){var f=[],b,c=CKEDITOR.tools.parseCssText(a,!0,d);for(b in c)f.push(b+":"+c[b]); 33f.sort();return f.length?f.join(";")+";":""},convertRgbToHex:function(a){return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi,function(a,d,n,f){a=[d,n,f];for(d=0;3>d;d++)a[d]=("0"+parseInt(a[d],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,d,n,f){a=d.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+f})},parseCssText:function(a,d,f){var b={}; 34f&&(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,n,f){d&&(n=n.toLowerCase(),"font-family"==n&&(f=f.replace(/\s*,\s*/g,",")),f=CKEDITOR.tools.trim(f));b[n]=f});return b},writeCssText:function(a,d){var f,b=[];for(f in a)b.push(f+":"+a[f]);d&&b.sort();return b.join("; ")},objectCompare:function(a, 35d,f){var b;if(!a&&!d)return!0;if(!a||!d)return!1;for(b in a)if(a[b]!=d[b])return!1;if(!f)for(b in d)if(a[b]!=d[b])return!1;return!0},objectKeys:function(a){return CKEDITOR.tools.object.keys(a)},convertArrayToObject:function(a,d){var f={};1==arguments.length&&(d=!0);for(var b=0,c=a.length;b<c;++b)f[a[b]]=d;return f},fixDomain:function(){for(var a;;)try{a=window.parent.document.domain;break}catch(d){a=a?a.replace(/.+?(?:\.|$)/,""):document.domain;if(!a)break;document.domain=a}return!!a},eventsBuffer:function(a, 36d,f){return new this.buffers.event(a,d,f)},enableHtml5Elements:function(a,d){for(var f="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=f.length,c;b--;)c=a.createElement(f[b]),d&&a.appendChild(c)},checkIfAnyArrayItemMatches:function(a,d){for(var f=0,b=a.length;f<b;++f)if(a[f].match(d))return!0;return!1},checkIfAnyObjectPropertyMatches:function(a,d){for(var f in a)if(f.match(d))return!0; 37return!1},keystrokeToString:function(a,d){var f=this.keystrokeToArray(a,d);f.display=f.display.join("+");f.aria=f.aria.join("+");return f},keystrokeToArray:function(a,d){var f=d&16711680,b=d&65535,c=CKEDITOR.env.mac,e=[],h=[];f&CKEDITOR.CTRL&&(e.push(c?"â":a[17]),h.push(c?a[224]:a[17]));f&CKEDITOR.ALT&&(e.push(c?"â¥":a[18]),h.push(a[18]));f&CKEDITOR.SHIFT&&(e.push(c?"â§":a[16]),h.push(a[16]));b&&(a[b]?(e.push(a[b]),h.push(a[b])):(e.push(String.fromCharCode(b)),h.push(String.fromCharCode(b))));return{display:e, 38aria:h}},transparentImageData:"data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d",getCookie:function(a){a=a.toLowerCase();for(var d=document.cookie.split(";"),f,b,c=0;c<d.length;c++)if(f=d[c].split("\x3d"),b=decodeURIComponent(CKEDITOR.tools.trim(f[0]).toLowerCase()),b===a)return decodeURIComponent(1<f.length?f[1]:"");return null},setCookie:function(a,d){document.cookie=encodeURIComponent(a)+"\x3d"+encodeURIComponent(d)+";path\x3d/"},getCsrfToken:function(){var a= 39CKEDITOR.tools.getCookie("ckCsrfToken");if(!a||40!=a.length){var a=[],d="";if(window.crypto&&window.crypto.getRandomValues)a=new Uint8Array(40),window.crypto.getRandomValues(a);else for(var f=0;40>f;f++)a.push(Math.floor(256*Math.random()));for(f=0;f<a.length;f++)var b="abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[f]%36),d=d+(.5<Math.random()?b.toUpperCase():b);a=d;CKEDITOR.tools.setCookie("ckCsrfToken",a)}return a},escapeCss:function(a){return a?window.CSS&&CSS.escape?CSS.escape(a):isNaN(parseInt(a.charAt(0), 4010))?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,d){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return a;for(var f=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE,4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],b=0;b<f.length;b++){var c=f[b];if(c[0]===a&&d)return c[1];if(!d&&c[1]===a)return c[0]}},convertHexStringToBytes:function(a){var d= 41[],f=a.length/2,b;for(b=0;b<f;b++)d.push(parseInt(a.substr(2*b,2),16));return d},convertBytesToBase64:function(a){var d="",f=a.length,b;for(b=0;b<f;b+=3){var c=a.slice(b,b+3),e=c.length,h=[],k;if(3>e)for(k=e;3>k;k++)c[k]=0;h[0]=(c[0]&252)>>2;h[1]=(c[0]&3)<<4|c[1]>>4;h[2]=(c[1]&15)<<2|(c[2]&192)>>6;h[3]=c[2]&63;for(k=0;4>k;k++)d=k<=e?d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(h[k]):d+"\x3d"}return d},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7", 42aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B", 43darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520", 44gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA", 45lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA5
455D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD", 46navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE", 47sienna:"#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",yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/, 48_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(a){var d={},f=this._findColor(a);f.length&&(d.color=f[0],CKEDITOR.tools.array.forEach(f,function(d){a=a.replace(d,"")}));if(a=CKEDITOR.tools.trim(a))d.unprocessed=a;return d},margin:function(a){return CKEDITOR.tools.style.parse.sideShorthand(a,function(a){return a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)|| 49["0px"]})},sideShorthand:function(a,d){function f(a){b.top=c[a[0]];b.right=c[a[1]];b.bottom=c[a[2]];b.left=c[a[3]]}var b={},c=d?d(a):a.split(/\s+/);switch(c.length){case 1:f([0,0,0,0]);break;case 2:f([0,1,0,1]);break;case 3:f([0,1,2,1]);break;case 4:f([0,1,2,3])}return b},border:function(a){return CKEDITOR.tools.style.border.fromCssRule(
vendor: 7,484 bytes, lines 49-64
49a)},_findColor:function(a){var d=[],f=CKEDITOR.tools.array,d=d.concat(a.match(this._rgbaRegExp)||[]),d=d.concat(a.match(this._hslaRegExp)||[]);return d=d.concat(f.filter(a.split(/\s+/), 50function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(a,d,f){var b=[];this.forEach(a,function(c,e){d.call(f,c,e,a)&&b.push(c)});return b},find:function(a,d,f){for(var b=a.length,c=0;c<b;){if(d.call(f,a[c],c,a))return a[c];c++}},forEach:function(a,d,f){var b=a.length,c;for(c=0;c<b;c++)d.call(f,a[c],c,a)},map:function(a,d,f){for(var b=[],c=0;c<a.length;c++)b.push(d.call(f,a[c],c,a));return b},reduce:function(a, 51d,f,b){for(var c=0;c<a.length;c++)f=d.call(b,f,a[c],c,a);return f},every:function(a,d,f){if(!a.length)return!0;d=this.filter(a,d,f);return a.length===d.length},some:function(a,d,f){for(var b=0;b<a.length;b++)if(d.call(f,a[b],b,a))return!0;return!1}},object:{DONT_ENUMS:"toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),entries:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a),function(d){return[d,a[d]]})},values:function(a){return CKEDITOR.tools.array.map(CKEDITOR.tools.object.keys(a), 52function(d){return a[d]})},keys:function(a){var d=Object.prototype.hasOwnProperty,f=[],b=CKEDITOR.tools.object.DONT_ENUMS;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(!a||"object"!==typeof a)){d=[];if("string"===typeof a)for(f=0;f<a.length;f++)d.push(String(f));return d}for(var c in a)f.push(c);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)for(c=0;c<b.length;c++)d.call(a,b[c])&&f.push(b[c]);return f},findKey:function(a,d){if("object"!==typeof a)return null;for(var f in a)if(a[f]===d)return f;return null}, 53merge:function(a,d){var f=CKEDITOR.tools,b=f.clone(a),c=f.clone(d);f.array.forEach(f.object.keys(c),function(a){b[a]="object"===typeof c[a]&&"object"===typeof b[a]?f.object.merge(b[a],c[a]):c[a]});return b}},getAbsoluteRectPosition:function(a,d){function f(a){if(a){var d=a.getClientRect();b.top+=d.top;b.left+=d.left;"x"in b&&"y"in b&&(b.x+=d.x,b.y+=d.y);f(a.getWindow().getFrame())}}var b=CKEDITOR.tools.copy(d);f(a.getFrame());var c=CKEDITOR.document.getWindow().getScrollPosition();b.top+=c.y;b.left+= 54c.x;"x"in b&&"y"in b&&(b.y+=c.y,b.x+=c.x);b.right=b.left+b.width;b.bottom=b.top+b.height;return b}};c.prototype={reset:function(){this._lastOutput=0;this._clearTimer()},_reschedule:function(){return!1},_call:function(){this._output()},_clearTimer:function(){this._scheduledTimer&&clearTimeout(this._scheduledTimer);this._scheduledTimer=0}};g.prototype=CKEDITOR.tools.prototypedCopy(c.prototype);g.prototype._reschedule=function(){this._scheduledTimer&&this._clearTimer()};g.prototype._call=function(){this._output.apply(this._context, 55this._args)};CKEDITOR.tools.buffers={};CKEDITOR.tools.buffers.event=c;CKEDITOR.tools.buffers.throttle=g;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,"black"]]},normalize:function(){for(var a in this._.normalizeMap){var d=this[a];d&&(this[a]=CKEDITOR.tools.array.reduce(this._.normalizeMap[a],function(a,d){return a.replace(d[0],d[1])},d))}}},proto:{toString:function(){return CKEDITOR.tools.array.filter([this.width, 56this.style,this.color],function(a){return!!a}).join(" ")}},statics:{fromCssRule:function(a){var d={},f=a.split(/\s+/g);a=CKEDITOR.tools.style.parse._findColor(a);a.length&&(d.color=a[0]);CKEDITOR.tools.array.forEach(f,function(a){d.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,a)?!d.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&(d.width=a):d.style=a});return new CKEDITOR.tools.style.border(d)},splitCssValues:function(a,d){d=d||{};var f=CKEDITOR.tools.array.reduce(["width", 57"style","color"],function(f,b){var c=a["border-"+b]||d[b];f[b]=c?CKEDITOR.tools.style.parse.sideShorthand(c):null;return f},{});return CKEDITOR.tools.array.reduce(["top","right","bottom","left"],function(d,b){var c={},e;for(e in f){var h=a["border-"+b+"-"+e];c[e]=h?h:f[e]&&f[e][b]}d["border-"+b]=new CKEDITOR.tools.style.border(c);return d},{})}}});CKEDITOR.tools.array.indexOf=CKEDITOR.tools.indexOf;CKEDITOR.tools.array.isArray=CKEDITOR.tools.isArray;CKEDITOR.MOUSE_BUTTON_LEFT=0;CKEDITOR.MOUSE_BUTTON_MIDDLE= 581;CKEDITOR.MOUSE_BUTTON_RIGHT=2})();CKEDITOR.dtd=function(){var c=CKEDITOR.tools.extend,g=function(d,a){for(var b=CKEDITOR.tools.clone(d),c=1;c<arguments.length;c++){a=arguments[c];for(var e in a)delete b[e]}return b},e={},b={},h={address:1,article:1,aside:1,blockquote:1,details:1,div:1,dl:1,fieldset:1,figure:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,hr:1,main:1,menu:1,nav:1,ol:1,p:1,pre:1,section:1,table:1,ul:1},m={command:1,link:1,meta:1,noscript:1,script:1,style:1},l={}, 59k={"#":1},d={center:1,dir:1,noframes:1};c(e,{a:1,abbr:1,area:1,audio:1,b:1,bdi:1,bdo:1,br:1,button:1,canvas:1,cite:1,code:1,command:1,datalist:1,del:1,dfn:1,em:1,embed:1,i:1,iframe:1,img:1,input:1,ins:1,kbd:1,keygen:1,label:1,map:1,mark:1,meter:1,noscript:1,object:1,output:1,progress:1,q:1,ruby:1,s:1,samp:1,script:1,select:1,small:1,span:1,strong:1,sub:1,sup:1,textarea:1,time:1,u:1,"var":1,video:1,wbr:1},k,{acronym:1,applet:1,basefont:1,big:1,font:1,isindex:1,strike:1,style:1,tt:1});c(b,h,e,d);g= 60{a:g(e,{a:1,button:1}),abbr:e,address:b,area:l,article:b,aside:b,audio:c({source:1,track:1},b),b:e,base:l,bdi:e,bdo:e,blockquote:b,body:b,br:l,button:g(e,{a:1,button:1}),canvas:e,caption:b,cite:e,code:e,col:l,colgroup:{col:1},command:l,datalist:c({option:1},e),dd:b,del:e,details:c({summary:1},b),dfn:e,div:b,dl:{dt:1,dd:1},dt:b,em:e,embed:l,fieldset:c({legend:1},b),figcaption:b,figure:c({figcaption:1},b),footer:b,form:b,h1:e,h2:e,h3:e,h4:e,h5:e,h6:e,head:c({title:1,base:1},m),header:b,hgroup:{h1:1, 61h2:1,h3:1,h4:1,h5:1,h6:1},hr:l,html:c({head:1,body:1},b,m),i:e,iframe:k,img:l,input:l,ins:e,kbd:e,keygen:l,label:e,legend:e,li:b,link:l,main:b,map:b,mark:e,menu:c({li:1},b),meta:l,meter:g(e,{meter:1}),nav:b,noscript:c({link:1,meta:1,style:1},e),object:c({param:1},e),ol:{li:1},optgroup:{option:1},option:k,output:e,p:e,param:l,pre:e,progress:g(e,{progress:1}),q:e,rp:e,rt:e,ruby:c({rp:1,rt:1},e),s:e,samp:e,script:k,section:b,select:{optgroup:1,option:1},small:e,source:l,span:e,strong:e,style:k,sub:e, 62summary:c({h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},e),sup:e,table:{caption:1,colgroup:1,thead:1,tfoot:1,tbody:1,tr:1},tbody:{tr:1},td:b,textarea:k,tfoot:{tr:1},th:b,thead:{tr:1},time:g(e,{time:1}),title:k,tr:{th:1,td:1},track:l,u:e,ul:{li:1},"var":e,video:c({source:1,track:1},b),wbr:l,acronym:e,applet:c({param:1},b),basefont:l,big:e,center:b,dialog:l,dir:{li:1},font:e,isindex:l,noframes:b,strike:e,tt:e};c(g,{$block:c({audio:1,dd:1,dt:1,figcaption:1,li:1,video:1},h,d),$blockLimit:{article:1,aside:1,audio:1, 63body:1,caption:1,details:1,dir:1,div:1,dl:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1},$cdata:{script:1,style:1},$editable:{address:1,article:1,aside:1,blockquote:1,body:1,details:1,div:1,fieldset:1,figcaption:1,footer:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,header:1,hgroup:1,main:1,nav:1,p:1,pre:1,section:1},$empty:{area:1,base:1,basefont:1,br:1,col:1,command:1,dialog:1,embed:1,hr:1,img:1,input:1,isindex:1, 64keygen:1,link:1,meta:1,param:1,source:1,track:1,wbr:1}
vendor: 15,613 bytes, lines 64-94
64,$inline:e,$list:{dl:1,ol:1,ul:1},$listItem:{dd:1,dt:1,li:1},$nonBodyContent:c({body:1,head:1,html:1},g.head),$nonEditable:{applet:1,audio:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,param:1,script:1,textarea:1,video:1},$object:{applet:1,audio:1,button:1,hr:1,iframe:1,img:1,input:1,object:1,select:1,table:1,textarea:1,video:1},$removeEmpty:{abbr:1,acronym:1,b:1,bdi:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1, 65mark:1,meter:1,output:1,q:1,ruby:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},$transparent:{a:1,audio:1,canvas:1,del:1,ins:1,map:1,noscript:1,object:1,video:1},$intermediate:{caption:1,colgroup:1,dd:1,dt:1,figcaption:1,legend:1,li:1,optgroup:1,option:1,rp:1,rt:1,summary:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}}); 66return g}();CKEDITOR.dom.event=function(c){this.$=c};CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var c=this.getKey();if(this.$.ctrlKey||this.$.metaKey)c+=CKEDITOR.CTRL;this.$.shiftKey&&(c+=CKEDITOR.SHIFT);this.$.altKey&&(c+=CKEDITOR.ALT);return c},preventDefault:function(c){var g=this.$;g.preventDefault?g.preventDefault():g.returnValue=!1;c&&this.stopPropagation()},stopPropagation:function(){var c=this.$;c.stopPropagation?c.stopPropagation(): 67c.cancelBubble=!0},getTarget:function(){var c=this.$.target||this.$.srcElement;return c?new CKEDITOR.dom.node(c):null},getPhase:function(){return this.$.eventPhase||2},getPageOffset:function(){var c=this.getTarget().getDocument().$;return{x:this.$.pageX||this.$.clientX+(c.documentElement.scrollLeft||c.body.scrollLeft),y:this.$.pageY||this.$.clientY+(c.documentElement.scrollTop||c.body.scrollTop)}}};CKEDITOR.CTRL=1114112;CKEDITOR.SHIFT=2228224;CKEDITOR.ALT=4456448;CKEDITOR.EVENT_PHASE_CAPTURING=1; 68CKEDITOR.EVENT_PHASE_AT_TARGET=2;CKEDITOR.EVENT_PHASE_BUBBLING=3;CKEDITOR.dom.domObject=function(c){c&&(this.$=c)};CKEDITOR.dom.domObject.prototype=function(){var c=function(c,e){return function(b){"undefined"!=typeof CKEDITOR&&c.fire(e,new CKEDITOR.dom.event(b))}};return{getPrivate:function(){var c;(c=this.getCustomData("_"))||this.setCustomData("_",c={});return c},on:function(g){var e=this.getCustomData("_cke_nativeListeners");e||(e={},this.setCustomData("_cke_nativeListeners",e));e[g]||(e=e[g]= 69c(this,g),this.$.addEventListener?this.$.addEventListener(g,e,!!CKEDITOR.event.useCapture):this.$.attachEvent&&this.$.attachEvent("on"+g,e));return CKEDITOR.event.prototype.on.apply(this,arguments)},removeListener:function(c){CKEDITOR.event.prototype.removeListener.apply(this,arguments);if(!this.hasListeners(c)){var e=this.getCustomData("_cke_nativeListeners"),b=e&&e[c];b&&(this.$.removeEventListener?this.$.removeEventListener(c,b,!1):this.$.detachEvent&&this.$.detachEvent("on"+c,b),delete e[c])}}, 70removeAllListeners:function(){try{var c=this.getCustomData("_cke_nativeListeners"),e;for(e in c){var b=c[e];this.$.detachEvent?this.$.detachEvent("on"+e,b):this.$.removeEventListener&&this.$.removeEventListener(e,b,!1);delete c[e]}}catch(h){if(!CKEDITOR.env.edge||-2146828218!==h.number)throw h;}CKEDITOR.event.prototype.removeAllListeners.call(this)}}}();(function(c){var g={};CKEDITOR.on("reset",function(){g={}});c.equals=function(c){try{return c&&c.$===this.$}catch(b){return!1}};c.setCustomData=function(c, 71b){var h=this.getUniqueId();(g[h]||(g[h]={}))[c]=b;return this};c.getCustomData=function(c){var b=this.$["data-cke-expando"];return(b=b&&g[b])&&c in b?b[c]:null};c.removeCustomData=function(c){var b=this.$["data-cke-expando"],b=b&&g[b],h,m;b&&(h=b[c],m=c in b,delete b[c]);return m?h:null};c.clearCustomData=function(){this.removeAllListeners();var c=this.getUniqueId();c&&delete g[c]};c.getUniqueId=function(){return this.$["data-cke-expando"]||(this.$["data-cke-expando"]=CKEDITOR.tools.getNextNumber())}; 72CKEDITOR.event.implementOn(c)})(CKEDITOR.dom.domObject.prototype);CKEDITOR.dom.node=function(c){return c?new CKEDITOR.dom[c.nodeType==CKEDITOR.NODE_DOCUMENT?"document":c.nodeType==CKEDITOR.NODE_ELEMENT?"element":c.nodeType==CKEDITOR.NODE_TEXT?"text":c.nodeType==CKEDITOR.NODE_COMMENT?"comment":c.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT?"documentFragment":"domObject"](c):this};CKEDITOR.dom.node.prototype=new CKEDITOR.dom.domObject;CKEDITOR.NODE_ELEMENT=1;CKEDITOR.NODE_DOCUMENT=9;CKEDITOR.NODE_TEXT= 733;CKEDITOR.NODE_COMMENT=8;CKEDITOR.NODE_DOCUMENT_FRAGMENT=11;CKEDITOR.POSITION_IDENTICAL=0;CKEDITOR.POSITION_DISCONNECTED=1;CKEDITOR.POSITION_FOLLOWING=2;CKEDITOR.POSITION_PRECEDING=4;CKEDITOR.POSITION_IS_CONTAINED=8;CKEDITOR.POSITION_CONTAINS=16;CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(c,g){c.append(this,g);return c},clone:function(c,g){function e(b){b["data-cke-expando"]&&(b["data-cke-expando"]=!1);if(b.nodeType==CKEDITOR.NODE_ELEMENT||b.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)if(g|| 74b.nodeType!=CKEDITOR.NODE_ELEMENT||b.removeAttribute("id",!1),c){b=b.childNodes;for(var h=0;h<b.length;h++)e(b[h])}}function b(e){if(e.type==CKEDITOR.NODE_ELEMENT||e.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(e.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h=e.getName();":"==h[0]&&e.renameNode(h.substring(1))}if(c)for(h=0;h<e.getChildCount();h++)b(e.getChild(h))}}var h=this.$.cloneNode(c);e(h);h=new CKEDITOR.dom.node(h);CKEDITOR.env.ie&&9>CKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type== 75CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&b(h);return h},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(c){c.$.parentNode.insertBefore(this.$,c.$.nextSibling);return c},insertBefore:function(c){c.$.parentNode.insertBefore(this.$,c.$);return c},insertBeforeMe:function(c){this.$.parentNode.insertBefore(c.$,this.$);return c},getAddress:function(c){for(var g=[],e=this.getDocument().$.documentElement,b=this;b&&b!=e;){var h=b.getParent(); 76h&&g.unshift(this.getIndex.call(b,c));b=h}return g},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(c){function g(b,c){var e=c?b.getNext():b.getPrevious();return e&&e.type==CKEDITOR.NODE_TEXT?e.isEmpty()?g(e,c):e:null}var e=this,b=-1,h;if(!this.getParent()||c&&e.type==CKEDITOR.NODE_TEXT&&e.isEmpty()&&!g(e)&&!g(e,!0))return-1;do if(!c||e.equals(this)||e.type!=CKEDITOR.NODE_TEXT||!h&&!e.isEmpty())b++,h=e.type==CKEDITOR.NODE_TEXT; 77while(e=e.getPrevious());return b},getNextSourceNode:function(c,g,e){if(e&&!e.call){var b=e;e=function(c){return!c.equals(b)}}c=!c&&this.getFirst&&this.getFirst();var h;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;c=this.getNext()}for(;!c&&(h=(h||this).getParent());){if(e&&!1===e(h,!0))return null;c=h.getNext()}return!c||e&&!1===e(c)?null:g&&g!=c.type?c.getNextSourceNode(!1,g,e):c},getPreviousSourceNode:function(c,g,e){if(e&&!e.call){var b=e;e=function(c){return!c.equals(b)}}c= 78!c&&this.getLast&&this.getLast();var h;if(!c){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;c=this.getPrevious()}for(;!c&&(h=(h||this).getParent());){if(e&&!1===e(h,!0))return null;c=h.getPrevious()}return!c||e&&!1===e(c)?null:g&&c.type!=g?c.getPreviousSourceNode(!1,g,e):c},getPrevious:function(c){var g=this.$,e;do e=(g=g.previousSibling)&&10!=g.nodeType&&new CKEDITOR.dom.node(g);while(e&&c&&!c(e));return e},getNext:function(c){var g=this.$,e;do e=(g=g.nextSibling)&&new CKEDITOR.dom.node(g); 79while(e&&c&&!c(e));return e},getParent:function(c){var g=this.$.parentNode;return g&&(g.nodeType==CKEDITOR.NODE_ELEMENT||c&&g.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(g):null},getParents:function(c){var g=this,e=[];do e[c?"push":"unshift"](g);while(g=g.getParent());return e},getCommonAncestor:function(c){if(c.equals(this))return this;if(c.contains&&c.contains(this))return c;var g=this.contains?this:this.getParent();do if(g.contains(c))return g;while(g=g.getParent());return null}, 80getPosition:function(c){var g=this.$,e=c.$;if(g.compareDocumentPosition)return g.compareDocumentPosition(e);if(g==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&c.type==CKEDITOR.NODE_ELEMENT){if(g.contains){if(g.contains(e))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(e.contains(g))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in g)return 0>g.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:g.sourceIndex< 81e.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}g=this.getAddress();c=c.getAddress();for(var e=Math.min(g.length,c.length),b=0;b<e;b++)if(g[b]!=c[b])return g[b]<c[b]?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING;return g.length<c.length?CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING},getAscendant:function(c,g){var e=this.$,b,h;g||(e=e.parentNode);"function"==typeof c?(h=!0,b=c):(h=!1,b=function(b){b= 82"string"==typeof b.nodeName?b.nodeName.toLowerCase():"";return"string"==typeof c?b==c:b in c});for(;e;){if(b(h?new CKEDITOR.dom.node(e):e))return new CKEDITOR.dom.node(e);try{e=e.parentNode}catch(m){e=null}}return null},hasAscendant:function(c,g){var e=this.$;g||(e=e.parentNode);for(;e;){if(e.nodeName&&e.nodeName.toLowerCase()==c)return!0;e=e.parentNode}return!1},move:function(c,g){c.append(this.remove(),g)},remove:function(c){var g=this.$,e=g.parentNode;if(e){if(c)for(;c=g.firstChild;)e.insertBefore(g.removeChild(c), 83g);e.removeChild(g)}return this},replace:function(c){this.insertBefore(c);c.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var c;this.getFirst&&(c=this.getFirst());){if(c.type==CKEDITOR.NODE_TEXT){var g=CKEDITOR.tools.ltrim(c.getText()),e=c.getLength();if(g)g.length<e&&(c.split(e-g.length),this.$.removeChild(this.$.firstChild));else{c.remove();continue}}break}},rtrim:function(){for(var c;this.getLast&&(c=this.getLast());){if(c.type==CKEDITOR.NODE_TEXT){var g=CKEDITOR.tools.rtrim(c.getText()), 84e=c.getLength();if(g)g.length<e&&(c.split(g.length),this.$.lastChild.parentNode.removeChild(this.$.lastChild));else{c.remove();continue}}break}CKEDITOR.env.needsBrFiller&&(c=this.$.lastChild)&&1==c.type&&"br"==c.nodeName.toLowerCase()&&c.parentNode.removeChild(c)},isReadOnly:function(c){var g=this;this.type!=CKEDITOR.NODE_ELEMENT&&(g=this.getParent());CKEDITOR.env.edge&&g&&g.is("textarea","input")&&(c=!0);if(!c&&g&&"undefined"!=typeof g.$.isContentEditable)return!(g.$.isContentEditable||g.data("cke-editable")); 85for(;g;){if(g.data("cke-editable"))return!1;if(g.hasAttribute("contenteditable"))return"false"==g.getAttribute("contenteditable");g=g.getParent()}return!0}});CKEDITOR.dom.window=function(c){CKEDITOR.dom.domObject.call(this,c)};CKEDITOR.dom.window.prototype=new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype,{focus:function(){this.$.focus()},getViewPaneSize:function(){var c=this.$.document,g="CSS1Compat"==c.compatMode;return{width:(g?c.documentElement.clientWidth:c.body.clientWidth)|| 860,height:(g?c.documentElement.clientHeight:c.body.clientHeight)||0}},getScrollPosition:function(){var c=this.$;if("pageXOffset"in c)return{x:c.pageXOffset||0,y:c.pageYOffset||0};c=c.document;return{x:c.documentElement.scrollLeft||c.body.scrollLeft||0,y:c.documentElement.scrollTop||c.body.scrollTop||0}},getFrame:function(){var c=this.$.frameElement;return c?new CKEDITOR.dom.element.get(c):null}});CKEDITOR.dom.document=function(c){CKEDITOR.dom.domObject.call(this,c)};CKEDITOR.dom.document.prototype= 87new CKEDITOR.dom.domObject;CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype,{type:CKEDITOR.NODE_DOCUMENT,appendStyleSheet:function(c){if(this.$.createStyleSheet)this.$.createStyleSheet(c);else{var g=new CKEDITOR.dom.element("link");g.setAttributes({rel:"stylesheet",type:"text/css",href:c});this.getHead().append(g)}},appendStyleText:function(c){if(this.$.createStyleSheet){var g=this.$.createStyleSheet("");g.cssText=c}else{var e=new CKEDITOR.dom.element("style",this);e.append(new CKEDITOR.dom.text(c, 88this));this.getHead().append(e)}return g||e.$.sheet},createElement:function(c,g){var e=new CKEDITOR.dom.element(c,this);g&&(g.attributes&&e.setAttributes(g.attributes),g.styles&&e.setStyles(g.styles));return e},createText:function(c){return new CKEDITOR.dom.text(c,this)},focus:function(){this.getWindow().focus()},getActive:function(){var c;try{c=this.$.activeElement}catch(g){return null}return new CKEDITOR.dom.element(c)},getById:function(c){return(c=this.$.getElementById(c))?new CKEDITOR.dom.element(c): 89null},getByAddress:function(c,g){for(var e=this.$.documentElement,b=0;e&&b<c.length;b++){var h=c[b];if(g)for(var m=-1,l=0;l<e.childNodes.length;l++){var k=e.childNodes[l];if(!0!==g||3!=k.nodeType||!k.previousSibling||3!=k.previousSibling.nodeType)if(m++,m==h){e=k;break}}else e=e.childNodes[h]}return e?new CKEDITOR.dom.node(e):null},getElementsByTag:function(c,g){CKEDITOR.env.ie&&8>=document.documentMode||!g||(c=g+":"+c);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(c))},getHead:function(){var c= 90this.$.getElementsByTagName("head")[0];return c=c?new CKEDITOR.dom.element(c):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(c){this.$.open("text/html","replace");CKEDITOR.env.ie&&(c=c.replace(/(?:^\s*<!DOCTYPE[^>]*?>)|^/i, 91'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(c);this.$.close()},find:function(c){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(c))},findOne:function(c){return(c=this.$.querySelector(c))?new CKEDITOR.dom.element(c):null},_getHtml5ShivFrag:function(){var c=this.getCustomData("html5ShivFrag");c||(c=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(c,!0),this.setCustomData("html5ShivFrag",c));return c}});CKEDITOR.dom.nodeList= 92function(c){this.$=c};CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(c){return 0>c||c>=this.$.length?null:(c=this.$[c])?new CKEDITOR.dom.node(c):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(c){return new CKEDITOR.dom.node(c)})}};CKEDITOR.dom.element=function(c,g){"string"==typeof c&&(c=(g?g.$:document).createElement(c));CKEDITOR.dom.domObject.call(this,c)};CKEDITOR.dom.element.get=function(c){return(c="string"==typeof c?document.getElementById(c)|| 93document.getElementsByName(c)[0]:c)&&(c.$?c:new CKEDITOR.dom.element(c))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(c,g){var e=new CKEDITOR.dom.element("div",g);e.setHtml(c);return e.getFirst().remove()};CKEDITOR.dom.element.setMarker=function(c,g,e,b){var h=g.getCustomData("list_marker_id")||g.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=g.getCustomData("list_marker_names")||g.setCustomData("list_marker_names", 94{}).getCustomData("list_marker_names");c[h]=g;m[e]=1;return g.setCustomData(e,b)};CKEDITOR.dom.element.clearAllMarkers=function(c){for(var g in c)CKEDITOR.dom.element.clearMarkers(c,c[g],1)};CKEDITOR.dom.element.clearMarkers=function(c,g,e){var b=g.getCustomData("list_marker_names"),h=g.getCustomData("list_marker_id"),m;
vendor: 7,712 bytes, lines 94-109
94for(m in b)g.removeCustomData(m);g.removeCustomData("list_marker_names");e&&(g.removeCustomData("list_marker_id"),delete c[h])};(function(){function c(b,d){return-1<(" "+b+" ").replace(m, 95" ").indexOf(" "+d+" ")}function g(b){var d=!0;b.$.id||(b.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),d=!1);return function(){d||b.removeAttribute("id")}}function e(b,d){var f=CKEDITOR.tools.escapeCss(b.$.id);return"#"+f+" "+d.split(/,\s*/).join(", #"+f+" ")}function b(b){for(var d=0,f=0,a=l[b].length;f<a;f++)d+=parseFloat(this.getComputedStyle(l[b][f])||0,10)||0;return d}var h=document.createElement("_").classList,h="undefined"!==typeof h&&null!==String(h.add).match(/\[Native code\]/gi),m=/[\n\t\r]/g; 96CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_ELEMENT,addClass:h?function(b){this.$.classList.add(b);return this}:function(b){var d=this.$.className;d&&(c(d,b)||(d+=" "+b));this.$.className=d||b;return this},removeClass:h?function(b){var d=this.$;d.classList.remove(b);d.className||d.removeAttribute("class");return this}:function(b){var d=this.getAttribute("class");d&&c(d,b)&&((d=d.replace(new RegExp("(?:^|\\s+)"+b+"(?\x3d\\s|$)"),"").replace(/^\s+/,""))?this.setAttribute("class", 97d):this.removeAttribute("class"));return this},hasClass:function(b){return c(this.$.className,b)},append:function(b,d){"string"==typeof b&&(b=this.getDocument().createElement(b));d?this.$.insertBefore(b.$,this.$.firstChild):this.$.appendChild(b.$);return b},appendHtml:function(b){if(this.$.childNodes.length){var d=new CKEDITOR.dom.element("div",this.getDocument());d.setHtml(b);d.moveChildren(this)}else this.setHtml(b)},appendText:function(b){null!=this.$.text&&CKEDITOR.env.ie&&9>CKEDITOR.env.version? 98this.$.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,d){var f=new CKEDITOR.dom.range(this.getDocument());f.setStartAfter(this);f.setEndAfter(b);var a=f.extractContents(!1,d||!1),c;f.insertNode(this.remove()); 99if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(f=new CKEDITOR.dom.element("div");c=a.getFirst();)c.$.style.backgroundColor&&(c.$.style.backgroundColor=c.$.style.backgroundColor),f.append(c);f.insertAfter(this);f.remove(!0)}else a.insertAfterNode(this)},contains:document.compareDocumentPosition?function(b){return!!(this.$.compareDocumentPosition(b.$)&16)}:function(b){var d=this.$;return b.type!=CKEDITOR.NODE_ELEMENT?d.contains(b.getParent().$):d!=b.$&&d.contains(b.$)},focus:function(){function b(){try{this.$.focus()}catch(d){}} 100return function(d){d?CKEDITOR.tools.setTimeout(b,100,this):b.call(this)}}(),getHtml:function(){var b=this.$.innerHTML;return CKEDITOR.env.ie?b.replace(/<\?[^>]*>/g,""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(!0));return b.innerHTML},getClientRect:function(b){var d=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!d.width&&(d.width=d.right-d.left);!d.height&& 101(d.height=d.bottom-d.top);return b?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),d):d},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(b){try{var d=this.$;if(this.getParent())return d.innerHTML=b;var f=this.getDocument()._getHtml5ShivFrag();f.appendChild(d);d.innerHTML=b;f.removeChild(d);return b}catch(a){this.$.innerHTML="";d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML=b;for(d=d.getChildren();d.count();)this.append(d.getItem(0));return b}}:function(b){return this.$.innerHTML= 102b},setText:function(){var b=document.createElement("p");b.innerHTML="x";b=b.textContent;return function(d){this.$[b?"textContent":"innerText"]=d}}(),getAttribute:function(){var b=function(d){return this.$.getAttribute(d,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d){switch(d){case "class":d="className";break;case "http-equiv":d="httpEquiv";break;case "name":return this.$.name;case "tabindex":return d=this.$.getAttribute(d,2),0!==d&&0===this.$.tabIndex&&(d=null), 103d;case "checked":return d=this.$.attributes.getNamedItem(d),(d.specified?d.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[d];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(d,2)}:b}(),getAttributes:function(b){var d={},f=this.$.attributes,a;b=CKEDITOR.tools.isArray(b)?b:[];for(a=0;a<f.length;a++)-1=== 104CKEDITOR.tools.indexOf(b,f[a].name)&&(d[f[a].name]=f[a].value);return d},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 d=this.getWindow().$.getComputedStyle(this.$,null);return d?d.getPropertyValue(b):""}:function(b){return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(b)]},getDtd:function(){var b= 105CKEDITOR.dtd[this.getName()];this.getDtd=function(){return b};return b},getElementsByTag:CKEDITOR.dom.document.prototype.getElementsByTag,getTabIndex:function(){var b=this.$.tabIndex;return 0!==b||CKEDITOR.dtd.$tabIndex[this.getName()]||0===parseInt(this.getAttribute("tabindex"),10)?b:-1},getText:function(){return this.$.textContent||this.$.innerText||""},getWindow:function(){return this.getDocument().getWindow()},getId:function(){return this.$.id||null},getNameAtt:function(){return this.$.name|| 106null},getName:function(){var b=this.$.nodeName.toLowerCase();if(CKEDITOR.env.ie&&8>=document.documentMode){var d=this.$.scopeName;"HTML"!=d&&(b=d.toLowerCase()+":"+b)}this.getName=function(){return b};return this.getName()},getValue:function(){return this.$.value},getFirst:function(b){var d=this.$.firstChild;(d=d&&new CKEDITOR.dom.node(d))&&b&&!b(d)&&(d=d.getNext(b));return d},getLast:function(b){var d=this.$.lastChild;(d=d&&new CKEDITOR.dom.node(d))&&b&&!b(d)&&(d=d.getPrevious(b));return d},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]}, 107is:function(){var b=this.getName();if("object"==typeof arguments[0])return!!arguments[0][b];for(var d=0;d<arguments.length;d++)if(arguments[d]==b)return!0;return!1},isEditable:function(b){var d=this.getName();return this.isReadOnly()||"none"==this.getComputedStyle("display")||"hidden"==this.getComputedStyle("visibility")||CKEDITOR.dtd.$nonEditable[d]||CKEDITOR.dtd.$empty[d]||this.is("a")&&(this.data("cke-saved-name")||this.hasAttribute("name"))&&!this.getChildCount()?!1:!1!==b?(b=CKEDITOR.dtd[d]|| 108CKEDITOR.dtd.span,!(!b||!b["#"])):!0},isIdentical:function(b){var d=this.clone(0,1);b=b.clone(0,1);d.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(d.$.isEqualNode)return d.$.style.cssText=CKEDITOR.tools.normalizeCssText(d.$.style.cssText),b.$.style.cssText=CKEDITOR.tools.normalizeCssText(b.$.style.cssText),d.$.isEqualNode(b.$);d=d.getOuterHtml();b= 109b.getOuterHtml();if(CKEDITOR.env.ie&&9>CKEDITOR.env.version&&this.is("a")){var f=this.getParent();f.type==CKEDITOR.NODE_ELEMENT&&(f=f.clone(),f.setHtml(d),d=f.getHtml(),f.setHtml(b),b=f.getHtml())}return d==b},isVisible:function(){var b=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"
vendor: 19,580 bytes, lines 109-147
109!=this.getComputedStyle("visibility"),d,f;b&&CKEDITOR.env.webkit&&(d=this.getWindow(),!d.equals(CKEDITOR.document.getWindow())&&(f=d.$.frameElement)&&(b=(new CKEDITOR.dom.element(f)).isVisible()));return!!b},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; 110for(var b=this.getChildren(),d=0,f=b.count();d<f;d++){var a=b.getItem(d);if(a.type!=CKEDITOR.NODE_ELEMENT||!a.data("cke-bookmark"))if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEmptyInlineRemoveable()||a.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(a.getText()))return!1}return!0},hasAttributes:CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(){for(var b=this.$.attributes,d=0;d<b.length;d++){var f=b[d];switch(f.nodeName){case "class":if(this.getAttribute("class"))return!0;case "data-cke-expando":continue; 111default:if(f.specified)return!0}}return!1}:function(){var b=this.$.attributes,d=b.length,f={"data-cke-expando":1,_moz_dirty:1};return 0<d&&(2<d||!f[b[0].nodeName]||2==d&&!f[b[1].nodeName])},hasAttribute:function(){function b(d){var f=this.$.attributes.getNamedItem(d);if("input"==this.getName())switch(d){case "class":return 0<this.$.className.length;case "checked":return!!this.$.checked;case "value":return d=this.getAttribute("type"),"checkbox"==d||"radio"==d?"on"!=this.$.value:!!this.$.value}return f? 112f.specified:!1}return CKEDITOR.env.ie?8>CKEDITOR.env.version?function(d){return"name"==d?!!this.$.name:b.call(this,d)}:b:function(b){return!!this.$.attributes.getNamedItem(b)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(b,d){var f=this.$;b=b.$;if(f!=b){var a;if(d)for(;a=f.lastChild;)b.insertBefore(f.removeChild(a),b.firstChild);else for(;a=f.firstChild;)b.appendChild(f.removeChild(a))}},mergeSiblings:function(){function b(d,f,a){if(f&&f.type==CKEDITOR.NODE_ELEMENT){for(var c= 113[];f.data("cke-bookmark")||f.isEmptyInlineRemoveable();)if(c.push(f),f=a?f.getNext():f.getPrevious(),!f||f.type!=CKEDITOR.NODE_ELEMENT)return;if(d.isIdentical(f)){for(var e=a?d.getLast():d.getFirst();c.length;)c.shift().move(d,!a);f.moveChildren(d,!a);f.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(d){if(!1===d||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))b(this,this.getNext(),!0),b(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", 114visibility:""})},setAttribute:function(){var b=function(b,f){this.$.setAttribute(b,f);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d,f){"class"==d?this.$.className=f:"style"==d?this.$.style.cssText=f:"tabindex"==d?this.$.tabIndex=f:"checked"==d?this.$.checked=f:"contenteditable"==d?b.call(this,"contentEditable",f):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(d,f){if("src"==d&&f.match(/^http:\/\//))try{b.apply(this, 115arguments)}catch(a){}else b.apply(this,arguments);return this}:b}(),setAttributes:function(b){for(var d in b)this.setAttribute(d,b[d]);return this},setValue:function(b){this.$.value=b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){"class"==b?b="className":"tabindex"==b?b="tabIndex":"contenteditable"==b&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var d= 1160;d<b.length;d++)this.removeAttribute(b[d]);else for(d in b=b||this.getAttributes(),b)b.hasOwnProperty(d)&&this.removeAttribute(d)},removeStyle:function(b){var d=this.$.style;if(d.removeProperty||"border"!=b&&"margin"!=b&&"padding"!=b)d.removeProperty?d.removeProperty(b):d.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(b)),this.$.style.cssText||this.removeAttribute("style");else{var f=["top","left","right","bottom"],a;"border"==b&&(a=["color","style","width"]);for(var d=[],c=0;c<f.length;c++)if(a)for(var e= 1170;e<a.length;e++)d.push([b,f[c],a[e]].join("-"));else d.push([b,f[c]].join("-"));for(b=0;b<d.length;b++)this.removeStyle(d[b])}},setStyle:function(b,d){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]=d;return this},setStyles:function(b){for(var d in b)this.setStyle(d,b[d]);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", 118"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var b,d=this.getElementsByTag("*"),f=0,a=d.count();f<a;f++)b=d.getItem(f),b.setAttribute("unselectable","on")}},getPositionedAncestor:function(){for(var b=this;"html"!=b.getName();){if("static"!=b.getComputedStyle("position"))return b;b=b.getParent()}return null},getDocumentPosition:function(b){var d=0,f=0,a=this.getDocument(),c=a.getBody(),e="BackCompat"==a.$.compatMode;if(document.documentElement.getBoundingClientRect&&(CKEDITOR.env.ie? 1198!==CKEDITOR.env.version:1)){var h=this.$.getBoundingClientRect(),g=a.$.documentElement,m=g.clientTop||c.$.clientTop||0,q=g.clientLeft||c.$.clientLeft||0,l=!0;CKEDITOR.env.ie&&(l=a.getDocumentElement().contains(this),a=a.getBody().contains(this),l=e&&a||!e&&l);l&&(CKEDITOR.env.webkit||CKEDITOR.env.ie&&12<=CKEDITOR.env.version?(d=c.$.scrollLeft||g.scrollLeft,f=c.$.scrollTop||g.scrollTop):(f=e?c.$:g,d=f.scrollLeft,f=f.scrollTop),d=h.left+d-q,f=h.top+f-m)}else for(m=this,q=null;m&&"body"!=m.getName()&& 120"html"!=m.getName();){d+=m.$.offsetLeft-m.$.scrollLeft;f+=m.$.offsetTop-m.$.scrollTop;m.equals(this)||(d+=m.$.clientLeft||0,f+=m.$.clientTop||0);for(;q&&!q.equals(m);)d-=q.$.scrollLeft,f-=q.$.scrollTop,q=q.getParent();q=m;m=(h=m.$.offsetParent)?new CKEDITOR.dom.element(h):null}b&&(h=this.getWindow(),m=b.getWindow(),!h.equals(m)&&h.$.frameElement&&(b=(new CKEDITOR.dom.element(h.$.frameElement)).getDocumentPosition(b),d+=b.x,f+=b.y));document.documentElement.getBoundingClientRect||!CKEDITOR.env.gecko|| 121e||(d+=this.$.clientLeft?1:0,f+=this.$.clientTop?1:0);return{x:d,y:f}},scrollIntoView:function(b){var d=this.getParent();if(d){do if((d.$.clientWidth&&d.$.clientWidth<d.$.scrollWidth||d.$.clientHeight&&d.$.clientHeight<d.$.scrollHeight)&&!d.is("body")&&this.scrollIntoParent(d,b,1),d.is("html")){var f=d.getWindow();try{var a=f.$.frameElement;a&&(d=new CKEDITOR.dom.element(a))}catch(c){}}while(d=d.getParent())}},scrollIntoParent:function(b,d,f){var a,c,e,h;function g(a,d){/body|html/.test(b.getName())? 122b.getWindow().$.scrollBy(a,d):(b.$.scrollLeft+=a,b.$.scrollTop+=d)}function m(a,b){var d={x:0,y:0};if(!a.is(l?"body":"html")){var f=a.$.getBoundingClientRect();d.x=f.left;d.y=f.top}f=a.getWindow();f.equals(b)||(f=m(CKEDITOR.dom.element.get(f.$.frameElement),b),d.x+=f.x,d.y+=f.y);return d}function q(a,b){return parseInt(a.getComputedStyle("margin-"+b)||0,10)||0}!b&&(b=this.getWindow());e=b.getDocument();var l="BackCompat"==e.$.compatMode;b instanceof CKEDITOR.dom.window&&(b=l?e.getBody():e.getDocumentElement()); 123CKEDITOR.env.webkit&&(e=this.getEditor(!1))&&(e._.previousScrollTop=null);e=b.getWindow();c=m(this,e);var u=m(b,e),A=this.$.offsetHeight;a=this.$.offsetWidth;var w=b.$.clientHeight,v=b.$.clientWidth;e=c.x-q(this,"left")-u.x||0;h=c.y-q(this,"top")-u.y||0;a=c.x+a+q(this,"right")-(u.x+v)||0;c=c.y+A+q(this,"bottom")-(u.y+w)||0;(0>h||0<c)&&g(0,!0===d?h:!1===d?c:0>h?h:c);f&&(0>e||0<a)&&g(0>e?e:a,0)},setState:function(b,d,f){d=d||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(d+"_on");this.removeClass(d+ 124"_off");this.removeClass(d+"_disabled");f&&this.setAttribute("aria-pressed",!0);f&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(d+"_disabled");this.removeClass(d+"_off");this.removeClass(d+"_on");f&&this.setAttribute("aria-disabled",!0);f&&this.removeAttribute("aria-pressed");break;default:this.addClass(d+"_off"),this.removeClass(d+"_on"),this.removeClass(d+"_disabled"),f&&this.removeAttribute("aria-pressed"),f&&this.removeAttribute("aria-disabled")}}, 125getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(d){b.src=b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,d){var f=this.$.attributes;d=d||{};for(var a=0;a<f.length;a++){var c=f[a],e=c.nodeName.toLowerCase(),h;if(!(e in d))if("checked"==e&&(h=this.getAttribute(e)))b.setAttribute(e,h);else if(!CKEDITOR.env.ie||this.hasAttribute(e))h=this.getAttribute(e),null===h&&(h=c.nodeValue),b.setAttribute(e,h)}""!==this.$.style.cssText&& 126(b.$.style.cssText=this.$.style.cssText)},renameNode:function(b){if(this.getName()!=b){var d=this.getDocument();b=new CKEDITOR.dom.element(b,d);this.copyAttributes(b);this.moveChildren(b);this.getParent(!0)&&this.$.parentNode.replaceChild(b.$,this.$);b.$["data-cke-expando"]=this.$["data-cke-expando"];this.$=b.$;delete this.getName}},getChild:function(){function b(d,f){var a=d.childNodes;if(0<=f&&f<a.length)return a[f]}return function(d){var f=this.$;if(d.slice)for(d=d.slice();0<d.length&&f;)f=b(f, 127d.shift());else f=b(f,d);return f?new CKEDITOR.dom.node(f):null}}(),getChildCount:function(){return this.$.childNodes.length},disableContextMenu:function(){function b(d){return d.type==CKEDITOR.NODE_ELEMENT&&d.hasClass("cke_enable_context_menu")}this.on("contextmenu",function(d){d.data.getTarget().getAscendant(b,!0)||d.data.preventDefault()})},getDirection:function(b){return b?this.getComputedStyle("direction")||this.getDirection()||this.getParent()&&this.getParent().getDirection(1)||this.getDocument().$.dir|| 128"ltr":this.getStyle("direction")||this.getAttribute("dir")},data:function(b,d){b="data-"+b;if(void 0===d)return this.getAttribute(b);!1===d?this.removeAttribute(b):this.setAttribute(b,d);return null},getEditor:function(b){var d=CKEDITOR.instances,f,a,c;b=b||void 0===b;for(f in d)if(a=d[f],a.element.equals(this)&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||!b&&(c=a.editable())&&(c.equals(this)||c.contains(this)))return a;return null},find:function(b){var d=g(this);b=new CKEDITOR.dom.nodeList(this.$.querySelectorAll(e(this, 129b)));d();return b},findOne:function(b){var d=g(this);b=this.$.querySelector(e(this,b));d();return b?new CKEDITOR.dom.element(b):null},forEach:function(b,d,f){if(!(f||d&&this.type!=d))var a=b(this);if(!1!==a){f=this.getChildren();for(var c=0;c<f.count();c++)a=f.getItem(c),a.type==CKEDITOR.NODE_ELEMENT?a.forEach(b,d):d&&a.type!=d||b(a)}},fireEventHandler:function(b,d){var f="on"+b,a=this.$;if(CKEDITOR.env.ie&&9>CKEDITOR.env.version){var c=a.ownerDocument.createEventObject(),e;for(e in d)c[e]=d[e];a.fireEvent(f, 130c)}else a[a[b]?b:f](d)},isDetached:function(){var b=this.getDocument(),d=b.getDocumentElement();return d.equals(this)||d.contains(this)?!CKEDITOR.env.ie||8<CKEDITOR.env.version&&!CKEDITOR.env.quirks?!b.$.defaultView:!1:!0}});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(c,d,f){"number"==typeof d&&(!f||CKEDITOR.env.ie&&CKEDITOR.env.quirks|| 131(d-=b.call(this,c)),this.setStyle(c,d+"px"))};CKEDITOR.dom.element.prototype.getSize=function(c,d){var f=Math.max(this.$["offset"+CKEDITOR.tools.capitalize(c)],this.$["client"+CKEDITOR.tools.capitalize(c)])||0;d&&(f-=b.call(this,c));return f}})();CKEDITOR.dom.documentFragment=function(c){c=c||CKEDITOR.document;this.$=c.type==CKEDITOR.NODE_DOCUMENT?c.$.createDocumentFragment():c};CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype,CKEDITOR.dom.element.prototype,{type:CKEDITOR.NODE_DOCUMENT_FRAGMENT, 132insertAfterNode:function(c){c=c.$;c.parentNode.insertBefore(this.$,c.nextSibling)},getHtml:function(){var c=new CKEDITOR.dom.element("div");this.clone(1,1).appendTo(c);return c.getHtml().replace(/\s*data-cke-expando=".*?"/g,"")}},!0,{append:1,appendBogus:1,clone:1,getFirst:1,getHtml:1,getLast:1,getParent:1,getNext:1,getPrevious:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype, 133CKEDITOR.dom.document.prototype,!0,{find:1,findOne:1});(function(){function c(a,b){var d=this.range;if(this._.end)return null;if(!this._.start){this._.start=1;if(d.collapsed)return this.end(),null;d.optimize()}var f,c=d.startContainer;f=d.endContainer;var e=d.startOffset,n=d.endOffset,h,g=this.guard,v=this.type,m=a?"getPreviousSourceNode":"getNextSourceNode";if(!a&&!this._.guardLTR){var l=f.type==CKEDITOR.NODE_ELEMENT?f:f.getParent(),k=f.type==CKEDITOR.NODE_ELEMENT?f.getChild(n):f.getNext();this._.guardLTR= 134function(a,b){return(!b||!l.equals(a))&&(!k||!a.equals(k))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(d.root))}}if(a&&!this._.guardRTL){var H=c.type==CKEDITOR.NODE_ELEMENT?c:c.getParent(),E=c.type==CKEDITOR.NODE_ELEMENT?e?c.getChild(e-1):null:c.getPrevious();this._.guardRTL=function(a,b){return(!b||!H.equals(a))&&(!E||!a.equals(E))&&(a.type!=CKEDITOR.NODE_ELEMENT||!b||!a.equals(d.root))}}var J=a?this._.guardRTL:this._.guardLTR;h=g?function(a,b){return!1===J(a,b)?!1:g(a,b)}:J;this.current?f=this.current[m](!1, 135v,h):(a?f.type==CKEDITOR.NODE_ELEMENT&&(f=0<n?f.getChild(n-1):!1===h(f,!0)?null:f.getPreviousSourceNode(!0,v,h)):(f=c,f.type==CKEDITOR.NODE_ELEMENT&&((f=f.getChild(e))||(f=!1===h(c,!0)?null:c.getNextSourceNode(!0,v,h)))),f&&!1===h(f)&&(f=null));for(;f&&!this._.end;){this.current=f;if(!this.evaluator||!1!==this.evaluator(f)){if(!b)return f}else if(b&&this.evaluator)return!1;f=f[m](!1,v,h)}this.end();return this.current=null}function g(a){for(var b,d=null;b=c.call(this,a);)d=b;return d}CKEDITOR.dom.walker= 136CKEDITOR.tools.createClass({$:function(a){this.range=a;this._={}},proto:{end:function(){this._.end=1},next:function(){return c.call(this)},previous:function(){return c.call(this,1)},checkForward:function(){return!1!==c.call(this,0,1)},checkBackward:function(){return!1!==c.call(this,1,1)},lastForward:function(){return g.call(this)},lastBackward:function(){return g.call(this,1)},reset:function(){delete this.current;this._={}}}});var e={block:1,"list-item":1,table:1,"table-row-group":1,"table-header-group":1, 137"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=function(a){return"none"!=this.getComputedStyle("float")||this.getComputedStyle("position")in b||!e[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= 138function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,b){function d(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(f){var c,e;c=f&&f.type!=CKEDITOR.NODE_ELEMENT&&(e=f.getParent())&&d(e);c=a?c:c||d(f);return!!(b^c)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(b){var d;b&&b.type==CKEDITOR.NODE_TEXT&&(d=!CKEDITOR.tools.trim(b.getText())||CKEDITOR.env.webkit&&b.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE); 139return!!(a^d)}};CKEDITOR.dom.walker.invisible=function(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.env.webkit?1:0;return function(f){b(f)?f=1:(f.type==CKEDITOR.NODE_TEXT&&(f=f.getParent()),f=f.$.offsetWidth<=d);return!!(a^f)}};CKEDITOR.dom.walker.nodeType=function(a,b){return function(d){return!!(b^d.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function b(a){return!m(a)&&!l(a)}return function(d){var f=CKEDITOR.env.needsBrFiller?d.is&&d.is("br"):d.getText&&h.test(d.getText());f&&(f=d.getParent(), 140d=d.getNext(b),f=f.isBlockBoundary()&&(!d||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()));return!!(a^f)}};CKEDITOR.dom.walker.temp=function(a){return function(b){b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var h=/^[\t\r\n ]*(?: |\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),k=CKEDITOR.dom.walker.temp(),d=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)}; 141CKEDITOR.dom.walker.ignored=function(a){return function(b){b=m(b)||l(b)||k(b);return!!(a^b)}};var f=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(b){for(var d=0,c=b.getChildCount();d<c;++d)if(!f(b.getChild(d)))return!!a;return!a}};var a=CKEDITOR.dom.walker.empty(),n=CKEDITOR.dom.walker.validEmptyBlockContainers=CKEDITOR.tools.extend(function(a){var b={},d;for(d in a)CKEDITOR.dtd[d]["#"]&&(b[d]=1);return b}(CKEDITOR.dtd.$block),{caption:1,td:1,th:1});CKEDITOR.dom.walker.editable= 142function(b){return function(d){d=f(d)?!1:d.type==CKEDITOR.NODE_TEXT||d.type==CKEDITOR.NODE_ELEMENT&&(d.is(CKEDITOR.dtd.$inline)||d.is("hr")||"false"==d.getAttribute("contenteditable")||!CKEDITOR.env.needsBrFiller&&d.is(n)&&a(d))?!0:!1;return!!(b^d)}};CKEDITOR.dom.element.prototype.getBogus=function(){var a=this;do a=a.getPreviousSourceNode();while(d(a));return a&&(CKEDITOR.env.needsBrFiller?a.is&&a.is("br"):a.getText&&h.test(a.getText()))?a:!1}})();CKEDITOR.dom.range=function(c){this.endOffset=this.endContainer= 143this.startOffset=this.startContainer=null;this.collapsed=!0;var g=c instanceof CKEDITOR.dom.document;this.document=g?c:c.getDocument();this.root=g?c.getBody():c};(function(){function c(a){a.collapsed=a.startContainer&&a.endContainer&&a.startContainer.equals(a.endContainer)&&a.startOffset==a.endOffset}function g(a,b,d,f,c){function e(a,b,d,f){var n=d?a.getPrevious():a.getNext();if(f&&m)return n;k||f?b.append(a.clone(!0,c),d):(a.remove(),l&&b.append(a,d));return n}function h(){var a,b,d,f=Math.min(I.length, 144L.length);for(a=0;a<f;a++)if(b=I[a],d=L[a],!b.equals(d))return a;return a-1}function g(){var b=y-1,d=J&&G&&!v.equals(F);b<M-1||b<N-1||d?(d?a.moveToPosition(F,CKEDITOR.POSITION_BEFORE_START):N==b+1&&E?a.moveToPosition(L[b],CKEDITOR.POSITION_BEFORE_END):a.moveToPosition(L[b+1],CKEDITOR.POSITION_BEFORE_START),f&&(b=I[b+1])&&b.type==CKEDITOR.NODE_ELEMENT&&(d=CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e',a.document),d.insertAfter(b), 145b.mergeSiblings(!1),a.moveToBookmark({startNode:d}))):a.collapse(!0)}a.optimizeBookmark();var m=0===b,l=1==b,k=2==b;b=k||l;var v=a.startContainer,F=a.endContainer,B=a.startOffset,C=a.endOffset,H,E,J,G,D,P;if(k&&F.type==CKEDITOR.NODE_TEXT&&(v.equals(F)||v.type===CKEDITOR.NODE_ELEMENT&&v.getFirst().equals(F)))d.append(a.document.createText(F.substring(B,C)));else{F.type==CKEDITOR.NODE_TEXT?k?P=!0:F=F.split(C):0<F.getChildCount()?C>=F.getChildCount()?(F=F.getChild(C-1),E=!0):F=F.getChild(C):G=E=!0;v.type== 146CKEDITOR.NODE_TEXT?k?D=!0:v.split(B):0<v.getChildCount()?0===B?(v=v.getChild(B),H=!0):v=v.getChild(B-1):J=H=!0;for(var I=v.getParents(),L=F.getParents(),y=h(),M=I.length-1,N=L.length-1,O=d,da,S,X,ga=-1,V=y;V<=M;V++){S=I[V];X=S.getNext();for(V!=M||S.equals(L[V])&&M<N?b&&(da=O.append(S.clone(0,c))):H?e(S,O,!1,J):D&&O.append(a.document.createText(S.substring(B)));X;){if(X.equals(L[V])){ga=V;break}X=e(X,O)}O=da}O=d;for(V=y;V<=N;V++)if(d=L[V],X=d.getPrevious(),d.equals(I[V]))b&&(O=O.getChild(0));else{V!= 147N||d.equals(I[V])&&N<M?b&&(da=O.append(d.clone(0,c))):E?e(d,O,!1,G):P&&O.append(a.document.createText(d.substring(0,C)));if(V>ga)for(;X;)X=e(X,O,!0);O=da}k||g()}}
147function e(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),f=CKEDITOR.dom.walker.bogus();return function(c){return d(c)||b(c)?!0:f(c)&&!a?a=!0:c.type==CKEDITOR.NODE_TEXT&&(c.hasAscendant("pre")||CKEDITOR.tools.trim(c.getText()).length)||c.type==CKEDITOR.NODE_ELEMENT&&!c.is(m)?!1:!0}}function b(a){var b=CKEDITOR.dom.walker.whitespaces(), 148d=CKEDITOR.dom.walker.bookmark(1);return function(f){return d(f)||b(f)?!0:!a&&l(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.is(CKEDITOR.dtd.$removeEmpty)}}function h(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&f(a)&&(b=a);return d(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(), 149k=/^[\t\r\n ]*(?: |\xa0)$/,d=CKEDITOR.dom.walker.editable(),f=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer), 150this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||g(this,0,null,a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||g(this,1,d,a,"undefined"==typeof b?!0:b);return d},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&& 151this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function b(a){return a.getAscendant(function(a){var b;if(b=a.data&&a.data("cke-temp"))b=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return b},!0)}var d=this.startContainer,f=this.endContainer,c=this.collapsed,e,h,g,m;e=this.document.createElement("span");e.data("cke-bookmark",1);e.setStyle("display","none");e.setHtml("\x26nbsp;");a&&(g="cke_bm_"+ 152CKEDITOR.tools.getNextNumber(),e.setAttribute("id",g+(c?"C":"S")));c||(h=e.clone(),h.setHtml("\x26nbsp;"),a&&h.setAttribute("id",g+"E"),m=this.clone(),b(f)&&(f=b(f),m.moveToPosition(f,CKEDITOR.POSITION_AFTER_END)),m.collapse(),m.insertNode(h));m=this.clone();b(d)&&(f=b(d),m.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START));m.collapse(!0);m.insertNode(e);h?(this.setStartAfter(e),this.setEndBefore(h)):this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END);
vendor: 17,604 bytes, lines 152-187
152return{startNode:a?g+(c?"C":"S"):e,endNode:a?g+ 153"E":h,serializable:a,collapsed:c}},createBookmark2:function(){function a(a){var b=a.container,f=a.offset,c;c=b;var e=f;c=c.type!=CKEDITOR.NODE_ELEMENT||0===e||e==c.getChildCount()?0:c.getChild(e-1).type==CKEDITOR.NODE_TEXT&&c.getChild(e).type==CKEDITOR.NODE_TEXT;c&&(b=b.getChild(f-1),f=b.getLength());if(b.type==CKEDITOR.NODE_ELEMENT&&0<f){a:{for(c=b;f--;)if(e=c.getChild(f).getIndex(!0),0<=e){f=e;break a}f=-1}f+=1}if(b.type==CKEDITOR.NODE_TEXT){c=b;for(e=0;(c=c.getPrevious())&&c.type==CKEDITOR.NODE_TEXT;)e+= 154c.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE,"").length;c=e;b.isEmpty()?(e=b.getPrevious(d),c?(f=c,b=e?e.getNext():b.getParent().getFirst()):(b=b.getParent(),f=e?e.getIndex(!0)+1:0)):f+=c}a.container=b;a.offset=f}function b(a,d){var f=d.getCustomData("cke-fillingChar");if(f){var c=a.container;f.equals(c)&&(a.offset-=CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length,0>=a.offset&&(a.offset=c.getIndex(),a.container=c.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT, 155!0);return function(d){var f=this.collapsed,c={container:this.startContainer,offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};d&&(a(c),b(c,this.root),f||(a(e),b(e,this.root)));return{start:c.container.getAddress(d),end:f?null:e.container.getAddress(d),startOffset:c.offset,endOffset:e.offset,normalized:d,collapsed:f,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,f=a.end&&this.document.getByAddress(a.end, 156a.normalized);a=a.endOffset;this.setStart(b,d);f?this.setEnd(f,a):this.collapse(!0)}else b=(d=a.serializable)?this.document.getById(a.startNode):a.startNode,a=d?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,d=this.startOffset,f=this.endOffset,c;if(a.type==CKEDITOR.NODE_ELEMENT)if(c=a.getChildCount(),c>d)a=a.getChild(d);else if(1>c)a=a.getPreviousSourceNode(); 157else{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(c=b.getChildCount(),c>f)b=b.getChild(f).getPreviousSourceNode(!0);else if(1>c)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var d=this.startContainer,f=this.endContainer,d=d.equals(f)?a&&d.type==CKEDITOR.NODE_ELEMENT&& 158this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(f);return b&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&& 159a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var d=this.startContainer,f=this.startOffset,c=this.collapsed;if((!a||c)&&d&&d.type==CKEDITOR.NODE_TEXT){if(f)if(f>=d.getLength())f=d.getIndex()+1,d=d.getParent();else{var e=d.split(f),f=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):d.equals(this.endContainer)&& 160(this.endOffset+=1)}else f=d.getIndex(),d=d.getParent();this.setStart(d,f);if(c){this.collapse(!0);return}}d=this.endContainer;f=this.endOffset;b||c||!d||d.type!=CKEDITOR.NODE_TEXT||(f?(f>=d.getLength()||d.split(f),f=d.getIndex()+1):f=d.getIndex(),d=d.getParent(),this.setEnd(d,f))},enlarge:function(a,b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var f=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var c=1;case CKEDITOR.ENLARGE_ELEMENT:var e= 161function(a,b){var d=new CKEDITOR.dom.range(g);d.setStart(a,b);d.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),c;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};c=d.next();){if(c.type!=CKEDITOR.NODE_TEXT)return!1;H=c!=a?c.getText():c.substring(b);if(f.test(H))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),g=this.root,m,l,k,v,F,B=!1,C,H;C=this.startContainer;var E=this.startOffset;C.type==CKEDITOR.NODE_TEXT? 162(E&&(C=!CKEDITOR.tools.trim(C.substring(0,E)).length&&C,B=!!C),C&&((v=C.getPrevious())||(k=C.getParent()))):(E&&(v=C.getChild(E-1)||C.getLast()),v||(k=C));for(k=d(k);k||v;){if(k&&!v){!F&&k.equals(h)&&(F=!0);if(c?k.isBlockBoundary():!g.contains(k))break;B&&"inline"==k.getComputedStyle("display")||(B=!1,F?m=k:this.setStartBefore(k));v=k.getPrevious()}for(;v;)if(C=!1,v.type==CKEDITOR.NODE_COMMENT)v=v.getPrevious();else{if(v.type==CKEDITOR.NODE_TEXT)H=v.getText(),f.test(H)&&(v=null),C=/[\s\ufeff]$/.test(H); 163else if((v.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&v.is("br"))&&!v.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[v.getName()]){H=v.getText();if(f.test(H))v=null;else for(var E=v.$.getElementsByTagName("*"),J=0,G;G=E[J++];)if(!CKEDITOR.dtd.$removeEmpty[G.nodeName.toLowerCase()]){v=null;break}v&&(C=!!H.length)}else v=null;C&&(B?F?m=k:k&&this.setStartBefore(k):B=!0);if(v){C=v.getPrevious();if(!k&&!C){k=v;v=null;break}v=C}else k=null}k&&(k=d(k.getParent()))}C=this.endContainer;E=this.endOffset; 164k=v=null;F=B=!1;C.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(C.substring(E)).length?B=!0:(B=!C.getLength(),E==C.getLength()?(v=C.getNext())||(k=C.getParent()):e(C,E)&&(k=C.getParent())):(v=C.getChild(E))||(k=C);for(;k||v;){if(k&&!v){!F&&k.equals(h)&&(F=!0);if(c?k.isBlockBoundary():!g.contains(k))break;B&&"inline"==k.getComputedStyle("display")||(B=!1,F?l=k:k&&this.setEndAfter(k));v=k.getNext()}for(;v;){C=!1;if(v.type==CKEDITOR.NODE_TEXT)H=v.getText(),e(v,0)||(v=null),C=/^[\s\ufeff]/.test(H);else if(v.type== 165CKEDITOR.NODE_ELEMENT){if((0<v.$.offsetWidth||b&&v.is("br"))&&!v.data("cke-bookmark"))if(B&&CKEDITOR.dtd.$removeEmpty[v.getName()]){H=v.getText();if(f.test(H))v=null;else for(E=v.$.getElementsByTagName("*"),J=0;G=E[J++];)if(!CKEDITOR.dtd.$removeEmpty[G.nodeName.toLowerCase()]){v=null;break}v&&(C=!!H.length)}else v=null}else C=1;C&&B&&(F?l=k:this.setEndAfter(k));if(v){C=v.getNext();if(!k&&!C){k=v;v=null;break}v=C}else k=null}k&&(k=d(k.getParent()))}m&&l&&(h=m.contains(l)?l:m,this.setStartBefore(h), 166this.setEndAfter(h));break;case CKEDITOR.ENLARGE_BLOCK_CONTENTS:case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:k=new CKEDITOR.dom.range(this.root);g=this.root;k.setStartAt(g,CKEDITOR.POSITION_AFTER_START);k.setEnd(this.startContainer,this.startOffset);k=new CKEDITOR.dom.walker(k);var D,P,I=CKEDITOR.dom.walker.blockBoundary(a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?{br:1}:null),L=null,y=function(a){if(a.type==CKEDITOR.NODE_ELEMENT&&"false"==a.getAttribute("contenteditable"))if(L){if(L.equals(a)){L=null;return}}else L= 167a;else if(L)return;var b=I(a);b||(D=a);return b},c=function(a){var b=y(a);!b&&a.is&&a.is("br")&&(P=a);return b};k.guard=y;k=k.lastBackward();D=D||g;this.setStartAt(D,!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 M=CKEDITOR.dom.walker.whitespaces(),N=CKEDITOR.dom.walker.bookmark();k.evaluator=function(a){return!M(a)&&!N(a)};if((k=k.previous())&& 168k.type==CKEDITOR.NODE_ELEMENT&&k.is("br"))break}k=this.clone();k.collapse();k.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);k=new CKEDITOR.dom.walker(k);k.guard=a==CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS?c:y;D=L=P=null;k=k.lastForward();D=D||g;this.setEndAt(D,!k&&this.checkEndOfBlock()||k&&D.contains(k)?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_BEFORE_START);P&&this.setEndAfter(P)}},shrink:function(a,b,d){var f="boolean"===typeof d?d:d&&"boolean"===typeof d.shrinkOnBlockBoundary?d.shrinkOnBlockBoundary: 169!0,c=d&&d.skipBogus;if(!this.collapsed){a=a||CKEDITOR.SHRINK_TEXT;var e=this.clone(),h=this.startContainer,g=this.endContainer,m=this.startOffset,k=this.endOffset,l=d=1;h&&h.type==CKEDITOR.NODE_TEXT&&(m?m>=h.getLength()?e.setStartAfter(h):(e.setStartBefore(h),d=0):e.setStartBefore(h));g&&g.type==CKEDITOR.NODE_TEXT&&(k?k>=g.getLength()?e.setEndAfter(g):(e.setEndAfter(g),l=0):e.setEndBefore(g));var e=new CKEDITOR.dom.walker(e),v=CKEDITOR.dom.walker.bookmark(),F=CKEDITOR.dom.walker.bogus();e.evaluator= 170function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var B;e.guard=function(b,d){if(c&&F(b)||v(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||d&&b.equals(B)||!1===f&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;d||b.type!=CKEDITOR.NODE_ELEMENT||(B=b);return!0};d&&(h=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(h,b?CKEDITOR.POSITION_AFTER_START: 171CKEDITOR.POSITION_BEFORE_START);l&&(e.reset(),(e=e[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(e,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!d&&!l)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,d=b.getChild(this.startOffset);d?a.insertBefore(d):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a, 172b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=b;this.endContainer||(this._setEndContainer(a),this.endOffset=b);c(this)},setEnd:function(a, 173b){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(b=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=b;this.startContainer||(this._setStartContainer(a),this.startOffset=b);c(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, 174b){switch(b){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}c(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, 175a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}c(this)},fixBlock:function(a,b){var d=this.createBookmark(),f=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(f);f.trim();this.insertNode(f);var c=f.getBogus();c&&c.remove();f.appendBogus();this.moveToBookmark(d);return f},splitBlock:function(a,b){var d= 176new CKEDITOR.dom.elementPath(this.startContainer,this.root),f=new CKEDITOR.dom.elementPath(this.endContainer,this.root),c=d.block,e=f.block,h=null;if(!d.blockLimit.equals(f.blockLimit))return null;"br"!=a&&(c||(c=this.fixBlock(!0,a),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,a)));d=c&&this.checkStartOfBlock();f=e&&this.checkEndOfBlock();this.deleteContents();c&&c.equals(e)&&(f?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e, 177CKEDITOR.POSITION_AFTER_END),e=null):d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),c=null):(e=this.splitElement(c,b||!1),c.is("ul","ol")||c.appendBogus()));return{previousBlock:c,nextBlock:e,wasStartOfBlock:d,wasEndOfBlock:f,elementPath:h}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,b||!1),f=a.clone(!1,b||!1);d.appendTo(f);f.insertAfter(a); 178this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return f},removeEmptyBlocksAtEnd:function(){function a(a){return function(f){return b(f)||d(f)||f.type==CKEDITOR.NODE_ELEMENT&&f.isEmptyInlineRemoveable()||a.is("table")&&f.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var d=this.createBookmark(),f=this[b?"endPath":"startPath"](),c=f.block||f.blockLimit,e;c&&!c.equals(f.root)&&!c.getFirst(a(c));)e=c.getParent(),this[b?"setEndAt": 179"setStartAt"](c,CKEDITOR.POSITION_AFTER_END),c.remove(1),c=e;this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,d){var f=d==CKEDITOR.START,c=this.clone();c.collapse(f);c[f?"setStartAt":"setEndAt"](a,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=b(f);return c[f? 180"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,this.root);b=this.clone();b.collapse(!0);b.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(b);a.evaluator=e();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer, 181b=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);a=new CKEDITOR.dom.walker(b);a.evaluator=e();return a.checkForward()},getPreviousNode:function(a,b,d){var f=this.clone();f.collapse(1);f.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(f); 182d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var f=this.clone();f.collapse();f.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(f);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(a,b){for(;a;){if(a.type==CKEDITOR.NODE_ELEMENT){if("false"==a.getAttribute("contentEditable")&&!a.data("cke-editable"))return 0;if(a.is("html")||"true"==a.getAttribute("contentEditable")&&(a.contains(b)||a.equals(b)))break}a=a.getParent()}return 1} 183return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var d=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: 184CKEDITOR.POSITION_BEFORE_START);d=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),d=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var c=a,e=d,h=void 0;c.type==CKEDITOR.NODE_ELEMENT&&c.isEditable(!1)&& 185(h=c[b?"getLast":"getFirst"](f));e||h||(h=c[b?"getPrevious":"getNext"](f));a=h}return!!d},moveToClosestEditablePosition:function(a,b){var d,f=0,c,e,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,h[b?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))f=1;else if(c=d[b?"getNextEditableNode":"getPreviousEditableNode"]())f=1,(e=c.type==CKEDITOR.NODE_ELEMENT)&&c.is(CKEDITOR.dtd.$block)&&"false"==c.getAttribute("contenteditable")? 186(d.setStartAt(c,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(c,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&c.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(c,0),d.collapse()):d.moveToPosition(c,h[b?1:0]);f&&this.moveToRange(d);return!!f},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!= 187CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespace
vendor: 5,143 bytes, lines 187-197
187s(!0);a.evaluator=function(a){return d(a)&&b(a)};var f=a.next();a.reset();return f&&f.equals(a.previous())?f:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed|| 188a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:h(),getPreviousEditableNode:h(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.getTouchedStartNode(),d=this.getTouchedEndNode(),f=b.getAscendant("table",!0),d=d.getAscendant("table",!0);return f&&!this.root.contains(f)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):f&&d&&(f.equals(d)||f.contains(d)||d.contains(f))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a= 189new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,f,c=this.clone();c.optimize();(f=c.startContainer.type==CKEDITOR.NODE_TEXT)?(d=c.startContainer.getText(),b=c.startContainer.split(c.startOffset),a.insertAfter(c.startContainer)):c.insertNode(a);a.scrollIntoView();f&&(c.startContainer.setText(d),b.remove());a.remove()},getClientRects:function(){function a(a,b){var d=CKEDITOR.tools.array.map(a,function(a){return a}),f=new CKEDITOR.dom.range(b.root),c,e, 190h;b.startContainer instanceof CKEDITOR.dom.element&&(e=0===b.startOffset&&b.startContainer.hasAttribute("data-widget"));b.endContainer instanceof CKEDITOR.dom.element&&(h=(h=b.endOffset===(b.endContainer.getChildCount?b.endContainer.getChildCount():b.endContainer.length))&&b.endContainer.hasAttribute("data-widget"));e&&f.setStart(b.startContainer.getParent(),b.startContainer.getIndex());h&&f.setEnd(b.endContainer.getParent(),b.endContainer.getIndex()+1);if(e||h)b=f;f=b.cloneContents().find("[data-cke-widget-id]").toArray(); 191if(f=CKEDITOR.tools.array.map(f,function(a){var d=b.root.editor;a=a.getAttribute("data-cke-widget-id");return d.widgets.instances[a].element}))return f=CKEDITOR.tools.array.map(f,function(a){var b;b=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;c=this.root.getDocument().$.createRange();c.setStart(b.getParent().$,b.getIndex());c.setEnd(b.getParent().$,b.getIndex()+1);b=c.getClientRects();b.widgetRect=a.getClientRect();return b},b),CKEDITOR.tools.array.forEach(f,function(a){function b(c){CKEDITOR.tools.array.forEach(d, 192function(b,e){var h=CKEDITOR.tools.objectCompare(a[c],b);h||(h=CKEDITOR.tools.objectCompare(a.widgetRect,b));h&&(Array.prototype.splice.call(d,e,a.length-c,a.widgetRect),f=!0)});f||(c<d.length-1?b(c+1):d.push(a.widgetRect))}var f;b(0)}),d}function b(a,d,c){var e;d.collapsed?c.startContainer instanceof CKEDITOR.dom.element?(a=c.checkStartOfBlock(),e=new CKEDITOR.dom.text("â"),a?c.startContainer.append(e,!0):0===c.startOffset?e.insertBefore(c.startContainer.getFirst()):(c=c.startContainer.getChildren().getItem(c.startOffset- 1931),e.insertAfter(c)),d.setStart(e.$,0),d.setEnd(e.$,0),a=d.getClientRects(),e.remove()):c.startContainer instanceof CKEDITOR.dom.text&&(""===c.startContainer.getText()?(c.startContainer.setText("â"),a=d.getClientRects(),c.startContainer.setText("")):a=[f(c.createBookmark())]):a=[f(c.createBookmark())];return a}function d(a,b,f){a=CKEDITOR.tools.extend({},a);b&&(a=CKEDITOR.tools.getAbsoluteRectPosition(f.document.getWindow(),a));!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top); 194return a}function f(a){var b=a.startNode;a=a.endNode;var d;b.setText("â");b.removeStyle("display");a?(a.setText("â"),a.removeStyle("display"),d=[b.getClientRect(),a.getClientRect()],a.remove()):d=[b.getClientRect(),b.getClientRect()];b.remove();return{right:Math.max(d[0].right,d[1].right),bottom:Math.max(d[0].bottom,d[1].bottom),left:Math.min(d[0].left,d[1].left),top:Math.min(d[0].top,d[1].top),width:Math.abs(d[0].left-d[1].left),height:Math.max(d[0].bottom,d[1].bottom)-Math.min(d[0].top,d[1].top)}} 195return void 0!==this.document.getSelection?function(f){var c=this.root.getDocument().$.createRange(),e;c.setStart(this.startContainer.$,this.startOffset);c.setEnd(this.endContainer.$,this.endOffset);e=c.getClientRects();e=a(e,this);e.length||(e=b(e,c,this));return CKEDITOR.tools.array.map(e,function(a){return d(a,f,this)},this)}:function(a){return[d(f(this.createBookmark()),a,this)]}}(),_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a, 196b){var d=this.getCommonAncestor(),f=this.getBoundaryNodes(),c=[],e,h,g,m;if(d&&d.find)for(h=d.find(a),e=0;e<h.count();e++)if(d=h.getItem(e),b||!d.isReadOnly())g=d.getPosition(f.startNode)&CKEDITOR.POSITION_FOLLOWING||f.startNode.equals(d),m=d.getPosition(f.endNode)&CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_IS_CONTAINED||f.endNode.equals(d),g&&m&&c.push(d);return c}};CKEDITOR.dom.range.mergeRanges=function(a){return CKEDITOR.tools.array.reduce(a,function(a,b){var d=a[a.length-1],f=!1;b=b.clone(); 197b.enlarge(CKEDITOR.ENLARGE_ELEMENT);if(d){var c=new CKEDITOR.dom.range(b.root),f=new CKEDITOR.dom.walker(c),e=CKEDITOR.dom.walker.whitespace
vendor: 12,510 bytes, lines 197-221
197s();c.setStart(d.endContainer,d.endOffset);c.setEnd(b.startContainer,b.startOffset);for(c=f.next();e(c)||b.endContainer.equals(c);)c=f.next();f=!c}f?d.setEnd(b.endContainer,b.endOffset):a.push(b);return a},[])}})();CKEDITOR.POSITION_AFTER_START=1;CKEDITOR.POSITION_BEFORE_END=2;CKEDITOR.POSITION_BEFORE_START=3;CKEDITOR.POSITION_AFTER_END=4;CKEDITOR.ENLARGE_ELEMENT= 1981;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 c(b){1>arguments.length||(this.range=b,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function g(b){var a=[];b.forEach(function(b){if("true"==b.getAttribute("contenteditable"))return a.push(b),!1},CKEDITOR.NODE_ELEMENT,!0);return a}function e(b,a,d,c){a:{null== 199c&&(c=g(d));for(var h;h=c.shift();)if(h.getDtd().p){c={element:h,remaining:c};break a}c=null}if(!c)return 0;if((h=CKEDITOR.filter.instances[c.element.data("cke-filter")])&&!h.check(a))return e(b,a,d,c.remaining);a=new CKEDITOR.dom.range(c.element);a.selectNodeContents(c.element);a=a.createIterator();a.enlargeBr=b.enlargeBr;a.enforceRealBlocks=b.enforceRealBlocks;a.activeFilter=a.filter=h;b._.nestedEditable={element:c.element,container:d,remaining:c.remaining,iterator:a};return 1}function b(b,a,d){if(!a)return!1; 200b=b.clone();b.collapse(!d);return b.checkBoundaryOfElement(a,d?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(b){return m(b)&&l(b)},d={dd:1,dt:1,li:1};c.prototype={getNextParagraph:function(f){var a,c,g,l,p;f=f||"p";if(this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(f))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;this.activeFilter=this.filter;if(e(this,f, 201this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(f);this._.nestedEditable=null}if(!this.range.root.getDtd()[f])return null;if(!this._.started){var r=this.range.clone();c=r.startPath();var q=r.endPath(),z=!r.collapsed&&b(r,c.block),u=!r.collapsed&&b(r,q.block,1);r.shrink(CKEDITOR.SHRINK_ELEMENT,!0);z&&r.setStartAt(c.block,CKEDITOR.POSITION_BEFORE_END);u&&r.setEndAt(q.block, 202CKEDITOR.POSITION_AFTER_START);c=r.endContainer.hasAscendant("pre",!0)||r.startContainer.hasAscendant("pre",!0);r.enlarge(this.forceBrBreak&&!c||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);r.collapsed||(c=new CKEDITOR.dom.walker(r.clone()),q=CKEDITOR.dom.walker.bookmark(!0,!0),c.evaluator=q,this._.nextNode=c.next(),c=new CKEDITOR.dom.walker(r.clone()),c.evaluator=q,c=c.previous(),this._.lastNode=c.getNextSourceNode(!0,null,r.root),this._.lastNode&&this._.lastNode.type== 203CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&&(q=new CKEDITOR.dom.elementPath(q.endContainer,q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&r.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=r.document.createText(""),this._.lastNode.insertAfter(c)),r=null);this._.started= 2041;c=r}q=this._.nextNode;r=this._.lastNode;for(this._.nextNode=null;q;){var z=0,u=q.hasAscendant("pre"),A=q.type!=CKEDITOR.NODE_ELEMENT,w=0;if(A)q.type==CKEDITOR.NODE_TEXT&&h.test(q.getText())&&(A=0);else{var v=q.getName();if(CKEDITOR.dtd.$block[v]&&"false"==q.getAttribute("contenteditable")){a=q;e(this,f,a);break}else if(q.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){if("br"==v)A=1;else if(!c&&!q.getChildCount()&&"hr"!=v){a=q;g=q.equals(r);break}c&&(c.setEndAt(q,CKEDITOR.POSITION_BEFORE_START), 205"br"!=v&&(this._.nextNode=q));z=1}else{if(q.getFirst()){c||(c=this.range.clone(),c.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}A=1}}A&&!c&&(c=this.range.clone(),c.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));g=(!z||A)&&q.equals(r);if(c&&!z)for(;!q.getNext(k)&&!g;){v=q.getParent();if(v.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){z=1;A=0;g||v.equals(r);c.setEndAt(v,CKEDITOR.POSITION_BEFORE_END);break}q=v;A=1;g=q.equals(r);w=1}A&&c.setEndAt(q,CKEDITOR.POSITION_AFTER_END); 206q=this._getNextSourceNode(q,w,r);if((g=!q)||z&&c)break}if(!a){if(!c)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;a=new CKEDITOR.dom.elementPath(c.startContainer,c.root);q=a.blockLimit;z={div:1,th:1,td:1};a=a.block;!a&&q&&!this.enforceRealBlocks&&z[q.getName()]&&c.checkStartOfBlock()&&c.checkEndOfBlock()&&!q.equals(c.root)?a=q:!a||this.enforceRealBlocks&&a.is(d)?(a=this.range.document.createElement(f),c.extractContents().appendTo(a),a.trim(),c.insertNode(a),l=p=!0): 207"li"!=a.getName()?c.checkStartOfBlock()&&c.checkEndOfBlock()||(a=a.clone(!1),c.extractContents().appendTo(a),a.trim(),p=c.splitBlock(),l=!p.wasStartOfBlock,p=!p.wasEndOfBlock,c.insertNode(a)):g||(this._.nextNode=a.equals(r)?null:this._getNextSourceNode(c.getBoundaryNodes().endNode,1,r))}l&&(l=a.getPrevious())&&l.type==CKEDITOR.NODE_ELEMENT&&("br"==l.getName()?l.remove():l.getLast()&&"br"==l.getLast().$.nodeName.toLowerCase()&&l.getLast().remove());p&&(l=a.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&& 208"br"==l.getName()&&(!CKEDITOR.env.needsBrFiller||l.getPrevious(m)||l.getNext(m))&&l.remove();this._.nextNode||(this._.nextNode=g||a.equals(r)||!r?null:this._getNextSourceNode(a,1,r));return a},_getNextSourceNode:function(b,a,d){function c(a){return!(a.equals(d)||a.equals(e))}var e=this.range.root;for(b=b.getNextSourceNode(a,null,c);!m(b);)b=b.getNextSourceNode(a,null,c);return b}};CKEDITOR.dom.range.prototype.createIterator=function(){return new c(this)}})();CKEDITOR.command=function(c,g){this.uiItems= 209[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&c.focus();return!1===this.fire("exec")?!0:!1!==g.exec.call(this,c,b)};this.refresh=function(b,c){if(!this.readOnly&&b.readOnly)return!0;if(this.context&&!c.isContextFor(this.context)||!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:c})?!0:g.refresh&&!1!==g.refresh.apply(this, 210arguments)};var e;this.checkAllowed=function(b){return b||"boolean"!=typeof e?e=c.activeFilter.checkFeature(this):e};CKEDITOR.tools.extend(this,g,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!g.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)};CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)}, 211setState:function(c){if(this.state==c||c!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=c;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3;CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0, 212language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]};(function(){function c(a,b,d,f,c){var e,h;a=[];for(e in b){h=b[e];h="boolean"== 213typeof h?{}:"function"==typeof h?{match:h}:J(h);"$"!=e.charAt(0)&&(h.elements=e);d&&(h.featureName=d.toLowerCase());var g=h;g.elements=l(g.elements,/\s+/)||null;g.propertiesOnly=g.propertiesOnly||!0===g.elements;var n=/\s*,\s*/,y=void 0;for(y in P){g[y]=l(g[y],n)||null;var q=g,v=I[y],m=l(g[I[y]],n),K=g[y],M=[],k=!0,G=void 0;m?k=!1:m={};for(G in K)"!"==G.charAt(0)&&(G=G.slice(1),M.push(G),m[G]=!0,k=!1);for(;G=M.pop();)K[G]=K["!"+G],delete K["!"+G];q[v]=(k?!1:m)||null}g.match=g.match||null;f.push(h); 214a.push(h)}b=c.elements;c=c.generic;var t;d=0;for(f=a.length;d<f;++d){e=J(a[d]);h=!0===e.classes||!0===e.styles||!0===e.attributes;g=e;y=v=n=void 0;for(n in P)g[n]=z(g[n]);q=!0;for(y in I){n=I[y];v=g[n];m=[];K=void 0;for(K in v)-1<K.indexOf("*")?m.push(new RegExp("^"+K.replace(/\*/g,".*")+"$")):m.push(K);v=m;v.length&&(g[n]=v,q=!1)}g.nothingRequired=q;g.noProperties=!(g.attributes||g.classes||g.styles);if(!0===e.elements||null===e.elements)c[h?"unshift":"push"](e);else for(t in g=e.elements,delete e.elements, 215g)if(b[t])b[t][h?"unshift":"push"](e);else b[t]=[e]}}function g(a,b,d,f){if(!a.match||a.match(b))if(f||k(a,b))if(a.propertiesOnly||(d.valid=!0),d.allAttributes||(d.allAttributes=e(a.attributes,b.attributes,d.validAttributes)),d.allStyles||(d.allStyles=e(a.styles,b.styles,d.validStyles)),!d.allClasses){a=a.classes;b=b.classes;f=d.validClasses;if(a)if(!0===a)a=!0;else{for(var c=0,h=b.length,g;c<h;++c)g=b[c],f[g]||(f[g]=a(g));a=!1}else a=!1;d.allClasses=a}}function e(a,b,d){if(!a)return!1;if(!0===a)return!0; 216for(var f in b)d[f]||(d[f]=a(f));return!1}function b(a,b,d){if(!a.match||a.match(b)){if(a.noProperties)return!1;d.hadInvalidAttribute=h(a.attributes,b.attributes)||d.hadInvalidAttribute;d.hadInvalidStyle=h(a.styles,b.styles)||d.hadInvalidStyle;a=a.classes;b=b.classes;if(a){for(var f=!1,c=!0===a,e=b.length;e--;)if(c||a(b[e]))b.splice(e,1),f=!0;a=f}else a=!1;d.hadInvalidClass=a||d.hadInvalidClass}}function h(a,b){if(!a)return!1;var d=!1,f=!0===a,c;for(c in b)if(f||a(c))delete b[c],d=!0;return d}function m(a, 217b,d){if(a.disabled||a.customConfig&&!d||!b)return!1;a._.cachedChecks={};return!0}function l(a,b){if(!a)return!1;if(!0===a)return a;if("string"==typeof a)return a=G(a),"*"==a?!0:CKEDITOR.tools.convertArrayToObject(a.split(b));if(CKEDITOR.tools.isArray(a))return a.length?CKEDITOR.tools.convertArrayToObject(a):!1;var d={},f=0,c;for(c in a)d[c]=a[c],f++;return f?d:!1}function k(a,b){if(a.nothingRequired)return!0;var f,c,e,h;if(e=a.requiredClasses)for(h=b.classes,f=0;f<e.length;++f)if(c=e[f],"string"== 218typeof c){if(-1==CKEDITOR.tools.indexOf(h,c))return!1}else if(!CKEDITOR.tools.checkIfAnyArrayItemMatches(h,c))return!1;return d(b.styles,a.requiredStyles)&&d(b.attributes,a.requiredAttributes)}function d(a,b){if(!b)return!0;for(var d=0,f;d<b.length;++d)if(f=b[d],"string"==typeof f){if(!(f in a))return!1}else if(!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a,f))return!1;return!0}function f(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, 219d,f,c,e={},h=1;for(a=G(a);b=a.match(L);)(d=b[2])?(f=n(d,"styles"),c=n(d,"attrs"),d=n(d,"classes")):f=c=d=null,e["$"+h++]={elements:b[1],classes:d,styles:f,attributes:c},a=a.slice(b[0].length);return e}function n(a,b){var d=a.match(y[b]);return d?G(d[1]):null}function t(a){var b=a.styleBackup=a.attributes.style,d=a.classBackup=a.attributes["class"];a.styles||(a.styles=CKEDITOR.tools.parseCssText(b||"",1));a.classes||(a.classes=d?d.split(/\s+/):[])}function x(a,d,f,c){var e=0,h;c.toHtml&&(d.name=d.name.replace(M, 220"$1"));if(c.doCallbacks&&a.elementCallbacks){a:{h=a.elementCallbacks;for(var n=0,y=h.length,m;n<y;++n)if(m=h[n](d)){h=m;break a}h=void 0}if(h)return h}if(c.doTransform&&(h=a._.transformations[d.name])){t(d);for(n=0;n<h.length;++n)v(a,d,h[n]);r(d)}if(c.doFilter){a:{n=d.name;y=a._;a=y.allowedRules.elements[n];h=y.allowedRules.generic;n=y.disallowedRules.elements[n];y=y.disallowedRules.generic;m=c.skipRequired;var k={valid:!1,validAttributes:{},validClasses:{},validStyles:{},allAttributes:!1,allClasses:!1, 221allStyles:!1,hadInvalidAttribute:!1,hadInvalidClass:!1,hadInvalidStyle:!1},l,G;if(a||h){t(d);if(n)for(l=0,G=n.length;l<G;++l)if(!1===b(n[l],d,k)){a=null;break a}if(y)for(l=0,G=y.length;l<G;++l)b(y[l],d,k);if(a)for(l=0,G=a.length;l<G;++l)g(a[l],d,k,m);if(h)for(l=0,G=h.length;l<G;++l)g(h[l],d,k,m);a=k}else a=null}if(!a||!a.valid)return f.push(d),1;G=a.validAttributes;
vendor: 10,869 bytes, lines 221-242
221var F=a.validStyles;h=a.validClasses;var n=d.attributes,K=d.styles,y=d.classes;m=d.classBackup;var E=d.styleBackup,u,L,J=[],k=[],z=/^data-cke-/; 222l=!1;delete n.style;delete n["class"];delete d.classBackup;delete d.styleBackup;if(!a.allAttributes)for(u in n)G[u]||(z.test(u)?u==(L=u.replace(/^data-cke-saved-/,""))||G[L]||(delete n[u],l=!0):(delete n[u],l=!0));if(!a.allStyles||a.hadInvalidStyle){for(u in K)a.allStyles||F[u]?J.push(u+":"+K[u]):l=!0;J.length&&(n.style=J.sort().join("; "))}else E&&(n.style=E);if(!a.allClasses||a.hadInvalidClass){for(u=0;u<y.length;++u)(a.allClasses||h[y[u]])&&k.push(y[u]);k.length&&(n["class"]=k.sort().join(" ")); 223m&&k.length<m.split(/\s+/).length&&(l=!0)}else m&&(n["class"]=m);l&&(e=1);if(!c.skipFinalValidation&&!q(d))return f.push(d),1}c.toHtml&&(d.name=d.name.replace(N,"cke:$1"));return e}function p(a){var b=[],d;for(d in a)-1<d.indexOf("*")&&b.push(d.replace(/\*/g,".*"));return b.length?new RegExp("^(?:"+b.join("|")+")$"):null}function r(a){var b=a.attributes,d;delete b.style;delete b["class"];if(d=CKEDITOR.tools.writeCssText(a.styles,!0))b.style=d;a.classes.length&&(b["class"]=a.classes.sort().join(" "))} 224function q(a){switch(a.name){case "a":if(!(a.children.length||a.attributes.name||a.attributes.id))return!1;break;case "img":if(!a.attributes.src)return!1}return!0}function z(a){if(!a)return!1;if(!0===a)return!0;var b=p(a);return function(d){return d in a||b&&d.match(b)}}function u(){return new CKEDITOR.htmlParser.element("br")}function A(a){return a.type==CKEDITOR.NODE_ELEMENT&&("br"==a.name||E.$block[a.name])}function w(a,b,d){var f=a.name;if(E.$empty[f]||!a.children.length)"hr"==f&&"br"==b?a.replaceWith(u()): 225(a.parent&&d.push({check:"it",el:a.parent}),a.remove());else if(E.$block[f]||"tr"==f)if("br"==b)a.previous&&!A(a.previous)&&(b=u(),b.insertBefore(a)),a.next&&!A(a.next)&&(b=u(),b.insertAfter(a)),a.replaceWithChildren();else{var f=a.children,c;b:{c=E[b];for(var e=0,h=f.length,g;e<h;++e)if(g=f[e],g.type==CKEDITOR.NODE_ELEMENT&&!c[g.name]){c=!1;break b}c=!0}if(c)a.name=b,a.attributes={},d.push({check:"parent-down",el:a});else{c=a.parent;for(var e=c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||"body"==c.name, 226n,y,h=f.length;0<h;)g=f[--h],e&&(g.type==CKEDITOR.NODE_TEXT||g.type==CKEDITOR.NODE_ELEMENT&&E.$inline[g.name])?(n||(n=new CKEDITOR.htmlParser.element(b),n.insertAfter(a),d.push({check:"parent-down",el:n})),n.add(g,0)):(n=null,y=E[c.name]||E.span,g.insertAfter(a),c.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||g.type!=CKEDITOR.NODE_ELEMENT||y[g.name]||d.push({check:"el-up",el:g}));a.remove()}}else f in{style:1,script:1}?a.remove():(a.parent&&d.push({check:"it",el:a.parent}),a.replaceWithChildren())}function v(a, 227b,d){var f,c;for(f=0;f<d.length;++f)if(c=d[f],!(c.check&&!a.check(c.check,!1)||c.left&&!c.left(b))){c.right(b,O);break}}function F(a,b){var d=b.getDefinition(),f=d.attributes,c=d.styles,e,h,g,n;if(a.name!=d.element)return!1;for(e in f)if("class"==e)for(d=f[e].split(/\s+/),g=a.classes.join("|");n=d.pop();){if(-1==g.indexOf(n))return!1}else if(a.attributes[e]!=f[e])return!1;for(h in c)if(a.styles[h]!=c[h])return!1;return!0}function B(a,b){var d,f;"string"==typeof a?d=a:a instanceof CKEDITOR.style?f= 228a:(d=a[0],f=a[1]);return[{element:d,left:f,right:function(a,d){d.transform(a,b)}}]}function C(a){return function(b){return F(b,a)}}function H(a){return function(b,d){d[a](b)}}var E=CKEDITOR.dtd,J=CKEDITOR.tools.copy,G=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:{}, 229generic:[]},disallowedRules:{elements:{},generic:[]},transformations:{},cachedTests:{},cachedChecks:{}};CKEDITOR.filter.instances[this.id]=this;var d=this.editor=a instanceof CKEDITOR.editor?a:null;if(d&&!b){this.customConfig=!0;var f=d.config.allowedContent;!0===f?this.disabled=!0:(f||(this.customConfig=!1),this.allow(f,"config",1),this.allow(d.config.extraAllowedContent,"extra",1),this.allow(D[d.enterMode]+" "+D[d.shiftEnterMode],"default",1),this.disallow(d.config.disallowedContent))}else this.customConfig= 230!1,this.allow(b||a,"default",1)};CKEDITOR.filter.instances={};CKEDITOR.filter.prototype={allow:function(b,d,f){if(!m(this,b,f))return!1;var e,h;if("string"==typeof b)b=a(b);else if(b instanceof CKEDITOR.style){if(b.toAllowedContentRules)return this.allow(b.toAllowedContentRules(this.editor),d,f);e=b.getDefinition();b={};f=e.attributes;b[e.element]=e={styles:e.styles,requiredStyles:e.styles&&CKEDITOR.tools.object.keys(e.styles)};f&&(f=J(f),e.classes=f["class"]?f["class"].split(/\s+/):null,e.requiredClasses= 231e.classes,delete f["class"],e.attributes=f,e.requiredAttributes=f&&CKEDITOR.tools.object.keys(f))}else if(CKEDITOR.tools.isArray(b)){for(e=0;e<b.length;++e)h=this.allow(b[e],d,f);return h}c(this,b,d,this.allowedContent,this._.allowedRules);return!0},applyTo:function(a,b,d,f){if(this.disabled)return!1;var c=this,e=[],h=this.editor&&this.editor.config.protectedSource,g,n=!1,y={doFilter:!d,doTransform:!0,doCallbacks:!0,toHtml:b};a.forEach(function(a){if(a.type==CKEDITOR.NODE_ELEMENT){if("off"==a.attributes["data-cke-filter"])return!1; 232if(!b||"span"!=a.name||!~CKEDITOR.tools.object.keys(a.attributes).join("|").indexOf("data-cke-"))if(g=x(c,a,e,y),g&1)n=!0;else if(g&2)return!1}else if(a.type==CKEDITOR.NODE_COMMENT&&a.value.match(/^\{cke_protected\}(?!\{C\})/)){var d;a:{var f=decodeURIComponent(a.value.replace(/^\{cke_protected\}/,""));d=[];var q,v,m;if(h)for(v=0;v<h.length;++v)if((m=f.match(h[v]))&&m[0].length==f.length){d=!0;break a}f=CKEDITOR.htmlParser.fragment.fromHtml(f);1==f.children.length&&(q=f.children[0]).type==CKEDITOR.NODE_ELEMENT&& 233x(c,q,d,y);d=!d.length}d||e.push(a)}},null,!0);e.length&&(n=!0);var v;a=[];f=D[f||(this.editor?this.editor.enterMode:CKEDITOR.ENTER_P)];for(var m;d=e.pop();)d.type==CKEDITOR.NODE_ELEMENT?w(d,f,a):d.remove();for(;v=a.pop();)if(d=v.el,d.parent)switch(m=E[d.parent.name]||E.span,v.check){case "it":E.$removeEmpty[d.name]&&!d.children.length?w(d,f,a):q(d)||w(d,f,a);break;case "el-up":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT||m[d.name]||w(d,f,a);break;case "parent-down":d.parent.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT|| 234m[d.name]||w(d.parent,f,a)}return n},checkFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));return!a.requiredContent||this.check(a.requiredContent)},disable:function(){this.disabled=!0},disallow:function(b){if(!m(this,b,!0))return!1;"string"==typeof b&&(b=a(b));c(this,b,null,this.disallowedContent,this._.disallowedRules);return!0},addContentForms:function(a){if(!this.disabled&&a){var b,d,f=[],c;for(b=0;b<a.length&&!c;++b)d=a[b],("string"==typeof d||d instanceof 235CKEDITOR.style)&&this.check(d)&&(c=d);if(c){for(b=0;b<a.length;++b)f.push(B(a[b],c));this.addTransformations(f)}}},addElementCallback:function(a){this.elementCallbacks||(this.elementCallbacks=[]);this.elementCallbacks.push(a)},addFeature:function(a){if(this.disabled||!a)return!0;a.toFeature&&(a=a.toFeature(this.editor));this.allow(a.allowedContent,a.name);this.addTransformations(a.contentTransformations);this.addContentForms(a.contentForms);return a.requiredContent&&(this.customConfig||this.disallowedContent.length)? 236this.check(a.requiredContent):!0},addTransformations:function(a){var b,d;if(!this.disabled&&a){var f=this._.transformations,c;for(c=0;c<a.length;++c){b=a[c];var e=void 0,h=void 0,g=void 0,n=void 0,y=void 0,q=void 0;d=[];for(h=0;h<b.length;++h)g=b[h],"string"==typeof g?(g=g.split(/\s*:\s*/),n=g[0],y=null,q=g[1]):(n=g.check,y=g.left,q=g.right),e||(e=g,e=e.element?e.element:n?n.match(/^([a-z0-9]+)/i)[0]:e.left.getDefinition().element),y instanceof CKEDITOR.style&&(y=C(y)),d.push({check:n==e?null:n,left:y, 237right:"string"==typeof q?H(q):q});b=e;f[b]||(f[b]=[]);f[b].push(d)}}},check:function(b,d,c){if(this.disabled)return!0;if(CKEDITOR.tools.isArray(b)){for(var e=b.length;e--;)if(this.check(b[e],d,c))return!0;return!1}var h,g;if("string"==typeof b){g=b+"\x3c"+(!1===d?"0":"1")+(c?"1":"0")+"\x3e";if(g in this._.cachedChecks)return this._.cachedChecks[g];h=a(b).$1;var n=h.styles,e=h.classes;h.name=h.elements;h.classes=e=e?e.split(/\s*,\s*/):[];h.styles=f(n);h.attributes=f(h.attributes);h.children=[];e.length&& 238(h.attributes["class"]=e.join(" "));n&&(h.attributes.style=CKEDITOR.tools.writeCssText(h.styles))}else h=b.getDefinition(),n=h.styles,e=h.attributes||{},n&&!CKEDITOR.tools.isEmpty(n)?(n=J(n),e.style=CKEDITOR.tools.writeCssText(n,!0)):n={},h={name:h.element,attributes:e,classes:e["class"]?e["class"].split(/\s+/):[],styles:n,children:[]};var n=CKEDITOR.tools.clone(h),y=[],q;if(!1!==d&&(q=this._.transformations[h.name])){for(e=0;e<q.length;++e)v(this,h,q[e]);r(h)}x(this,n,y,{doFilter:!0,doTransform:!1!== 239d,skipRequired:!c,skipFinalValidation:!c});0<y.length?c=!1:((d=h.attributes["class"])&&(h.attributes["class"]=h.attributes["class"].split(" ").sort().join(" ")),c=CKEDITOR.tools.objectCompare(h.attributes,n.attributes,!0),d&&(h.attributes["class"]=d));"string"==typeof b&&(this._.cachedChecks[g]=c);return c},getAllowedEnterMode:function(){var a=["p","div","br"],b={p:CKEDITOR.ENTER_P,div:CKEDITOR.ENTER_DIV,br:CKEDITOR.ENTER_BR};return function(d,f){var c=a.slice(),e;if(this.check(D[d]))return d;for(f|| 240(c=c.reverse());e=c.pop();)if(this.check(e))return b[e];return CKEDITOR.ENTER_BR}}(),clone:function(){var a=new CKEDITOR.filter,b=CKEDITOR.tools.clone;a.allowedContent=b(this.allowedContent);a._.allowedRules=b(this._.allowedRules);a.disallowedContent=b(this.disallowedContent);a._.disallowedRules=b(this._.disallowedRules);a._.transformations=b(this._.transformations);a.disabled=this.disabled;a.editor=this.editor;return a},destroy:function(){delete CKEDITOR.filter.instances[this.id];delete this._;delete this.allowedContent; 241delete this.disallowedContent}};var P={styles:1,attributes:1,classes:1},I={styles:"requiredStyles",attributes:"requiredAttributes",classes:"requiredClasses"},L=/^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i,y={styles:/{([^}]+)}/,attrs:/\[([^\]]+)\]/,classes:/\(([^\)]+)\)/},M=/^cke:(object|embed|param)$/,N=/^(object|embed|param)$/,O;O=CKEDITOR.filter.transformationsTools={sizeToStyle:function(a){this.lengthToStyle(a,"width");this.lengthToStyle(a, 242"height")},sizeToAttribute:function(a){this.lengthToAttribute(a,"width");this.lengthToAttribute(a,"height")},lengthToStyle:function(a,b,d){d=d||b;if(!(d in a.styles)){var f=a.attributes[b];f&&(/^\d+$/.test(f)&&(f+="px"),a.styles[d]=f)}delete a.attributes[b]},lengthToAttribute:function(a,b,d){d=d||b;if(!(d in a.attributes)){var f=a.styles[b],c=f&&f.match(/^(\d+)(?:\.\d*)?px$/);c?a.attributes[d]=c[1]:"cke-test"==f&&(a.attributes[d]="cke-test")}delete a.styles[b]}
vendor: 10,944 bytes, lines 242-264
242,alignmentToStyle:function(a){if(!("float"in 243a.styles)){var b=a.attributes.align;if("left"==b||"right"==b)a.styles["float"]=b}delete a.attributes.align},alignmentToAttribute:function(a){if(!("align"in a.attributes)){var b=a.styles["float"];if("left"==b||"right"==b)a.attributes.align=b}delete a.styles["float"]},splitBorderShorthand:function(a){if(a.styles.border){var b=CKEDITOR.tools.style.parse.border(a.styles.border);b.color&&(a.styles["border-color"]=b.color);b.style&&(a.styles["border-style"]=b.style);b.width&&(a.styles["border-width"]=b.width); 244delete a.styles.border}},listTypeToStyle:function(a){if(a.attributes.type)switch(a.attributes.type){case "a":a.styles["list-style-type"]="lower-alpha";break;case "A":a.styles["list-style-type"]="upper-alpha";break;case "i":a.styles["list-style-type"]="lower-roman";break;case "I":a.styles["list-style-type"]="upper-roman";break;case "1":a.styles["list-style-type"]="decimal";break;default:a.styles["list-style-type"]=a.attributes.type}},splitMarginShorthand:function(a){function b(f){a.styles["margin-top"]= 245d[f[0]];a.styles["margin-right"]=d[f[1]];a.styles["margin-bottom"]=d[f[2]];a.styles["margin-left"]=d[f[3]]}if(a.styles.margin){var d=a.styles.margin.match(/(\-?[\.\d]+\w+)/g)||["0px"];switch(d.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}delete a.styles.margin}},matchesStyle:F,transform:function(a,b){if("string"==typeof b)a.name=b;else{var d=b.getDefinition(),f=d.styles,c=d.attributes,e,h,g,n;a.name=d.element;for(e in c)if("class"==e)for(d= 246a.classes.join("|"),g=c[e].split(/\s+/);n=g.pop();)-1==d.indexOf(n)&&a.classes.push(n);else a.attributes[e]=c[e];for(h in f)a.styles[h]=f[h]}}}})();(function(){CKEDITOR.focusManager=function(c){if(c.focusManager)return c.focusManager;this.hasFocus=!1;this.currentActive=null;this._={editor:c};return this};CKEDITOR.focusManager._={blurDelay:200};CKEDITOR.focusManager.prototype={focus:function(c){this._.timer&&clearTimeout(this._.timer);c&&(this.currentActive=c);this.hasFocus||this._.locked||((c=CKEDITOR.currentInstance)&& 247c.focusManager.blur(1),this.hasFocus=!0,(c=this._.editor.container)&&c.addClass("cke_focus"),this._.editor.fire("focus"))},lock:function(){this._.locked=1},unlock:function(){delete this._.locked},blur:function(c){function g(){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 e=CKEDITOR.focusManager._.blurDelay;c||!e?g.call(this):this._.timer=CKEDITOR.tools.setTimeout(function(){delete this._.timer; 248g.call(this)},e,this)}},add:function(c,g){var e=c.getCustomData("focusmanager");if(!e||e!=this){e&&e.remove(c);var e="focus",b="blur";g&&(CKEDITOR.env.ie?(e="focusin",b="focusout"):CKEDITOR.event.useCapture=1);var h={blur:function(){c.equals(this.currentActive)&&this.blur()},focus:function(){this.focus(c)}};c.on(e,h.focus,this);c.on(b,h.blur,this);g&&(CKEDITOR.event.useCapture=0);c.setCustomData("focusmanager",this);c.setCustomData("focusmanager_handlers",h)}},remove:function(c){c.removeCustomData("focusmanager"); 249var g=c.removeCustomData("focusmanager_handlers");c.removeListener("blur",g.blur);c.removeListener("focus",g.focus)}}})();CKEDITOR.keystrokeHandler=function(c){if(c.keystrokeHandler)return c.keystrokeHandler;this.keystrokes={};this.blockedKeystrokes={};this._={editor:c};return this};(function(){var c,g=function(b){b=b.data;var e=b.getKeystroke(),g=this.keystrokes[e],l=this._.editor;c=!1===l.fire("key",{keyCode:e,domEvent:b});c||(g&&(c=!1!==l.execCommand(g,{from:"keystrokeHandler"})),c||(c=!!this.blockedKeystrokes[e])); 250c&&b.preventDefault(!0);return!c},e=function(b){c&&(c=!1,b.data.preventDefault(!0))};CKEDITOR.keystrokeHandler.prototype={attach:function(b){b.on("keydown",g,this);if(CKEDITOR.env.gecko&&CKEDITOR.env.mac)b.on("keypress",e,this)}}})();(function(){CKEDITOR.lang={languages:{af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,"en-au":1,"en-ca":1,"en-gb":1,en:1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,"fr-ca":1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1, 251ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,"pt-br":1,pt:1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,"sr-latn":1,sr:1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,"zh-cn":1,zh:1},rtl:{ar:1,fa:1,he:1,ku:1,ug:1},load:function(c,g,e){c&&CKEDITOR.lang.languages[c]||(c=this.detect(g,c));var b=this;g=function(){b[c].dir=b.rtl[c]?"rtl":"ltr";e(c,b[c])};this[c]?g():CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/"+c+".js"),g,this)},detect:function(c,g){var e=this.languages;g=g||navigator.userLanguage||navigator.language|| 252c;var b=g.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),h=b[1],b=b[2];e[h+"-"+b]?h=h+"-"+b:e[h]||(h=null);CKEDITOR.lang.detect=h?function(){return h}:function(b){return b};return h||c}}})();CKEDITOR.scriptLoader=function(){var c={},g={};return{load:function(e,b,h,m){var l="string"==typeof e;l&&(e=[e]);h||(h=CKEDITOR);var k=e.length,d=[],f=[],a=function(a){b&&(l?b.call(h,a):b.call(h,d,f))};if(0===k)a(!0);else{var n=function(b,c){(c?d:f).push(b);0>=--k&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"), 253a(c))},t=function(a,b){c[a]=1;var d=g[a];delete g[a];for(var f=0;f<d.length;f++)d[f](a,b)},x=function(a){if(c[a])n(a,!0);else{var d=g[a]||(g[a]=[]);d.push(n);if(!(1<d.length)){var f=new CKEDITOR.dom.element("script");f.setAttributes({type:"text/javascript",src:a});b&&(CKEDITOR.env.ie&&(8>=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?f.$.onreadystatechange=function(){if("loaded"==f.$.readyState||"complete"==f.$.readyState)f.$.onreadystatechange=null,t(a,!0)}:(f.$.onload=function(){setTimeout(function(){f.$.onload= 254null;f.$.onerror=null;t(a,!0)},0)},f.$.onerror=function(){f.$.onload=null;f.$.onerror=null;t(a,!1)}));f.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var p=0;p<k;p++)x(e[p])}},queue:function(){function c(){var e;(e=b[0])&&this.load(e.scriptUrl,e.callback,CKEDITOR,0)}var b=[];return function(h,g){var l=this;b.push({scriptUrl:h,callback:function(){g&&g.apply(this,arguments);b.shift();c.call(l)}});1==b.length&&c.call(this)}}()}}();CKEDITOR.resourceManager= 255function(c,g){this.basePath=c;this.fileName=g;this.registered={};this.loaded={};this.externals={};this._={waitingList:{}}};CKEDITOR.resourceManager.prototype={add:function(c,g){if(this.registered[c])throw Error('[CKEDITOR.resourceManager.add] The resource name "'+c+'" is already registered.');var e=this.registered[c]=g||{};e.name=c;e.path=this.getPath(c);CKEDITOR.fire(c+CKEDITOR.tools.capitalize(this.fileName)+"Ready",e);return this.get(c)},get:function(c){return this.registered[c]||null},getPath:function(c){var g= 256this.externals[c];return CKEDITOR.getUrl(g&&g.dir||this.basePath+c+"/")},getFilePath:function(c){var g=this.externals[c];return CKEDITOR.getUrl(this.getPath(c)+(g?g.file:this.fileName+".js"))},addExternal:function(c,g,e){e||(g=g.replace(/[^\/]+$/,function(b){e=b;return""}));e=e||this.fileName+".js";c=c.split(",");for(var b=0;b<c.length;b++)this.externals[c[b]]={dir:g,file:e}},load:function(c,g,e){CKEDITOR.tools.isArray(c)||(c=c?[c]:[]);for(var b=this.loaded,h=this.registered,m=[],l={},k={},d=0;d< 257c.length;d++){var f=c[d];if(f)if(b[f]||h[f])k[f]=this.get(f);else{var a=this.getFilePath(f);m.push(a);a in l||(l[a]=[]);l[a].push(f)}}CKEDITOR.scriptLoader.load(m,function(a,d){if(d.length)throw Error('[CKEDITOR.resourceManager.load] Resource name "'+l[d[0]].join(",")+'" was not found at "'+d[0]+'".');for(var f=0;f<a.length;f++)for(var c=l[a[f]],h=0;h<c.length;h++){var q=c[h];k[q]=this.get(q);b[q]=1}g.call(e,k)},this)}};CKEDITOR.plugins=new CKEDITOR.resourceManager("plugins/","plugin");CKEDITOR.plugins.load= 258CKEDITOR.tools.override(CKEDITOR.plugins.load,function(c){var g={};return function(e,b,h){var m={},l=function(e){c.call(this,e,function(d){CKEDITOR.tools.extend(m,d);var f=[],a;for(a in d){var c=d[a],e=c&&c.requires;if(!g[a]){if(c.icons)for(var k=c.icons.split(","),p=k.length;p--;)CKEDITOR.skin.addIcon(k[p],c.path+"icons/"+(CKEDITOR.env.hidpi&&c.hidpi?"hidpi/":"")+k[p]+".png");c.isSupportedEnvironment=c.isSupportedEnvironment||function(){return!0};g[a]=1}if(e)for(e.split&&(e=e.split(",")),c=0;c<e.length;c++)m[e[c]]|| 259f.push(e[c])}if(f.length)l.call(this,f);else{for(a in m)c=m[a],c.onLoad&&!c.onLoad._called&&(!1===c.onLoad()&&delete m[a],c.onLoad._called=1);b&&b.call(h||window,m)}},this)};l.call(this,e)}});CKEDITOR.plugins.setLang=function(c,g,e){var b=this.get(c);c=b.langEntries||(b.langEntries={});b=b.lang||(b.lang=[]);b.split&&(b=b.split(","));-1==CKEDITOR.tools.indexOf(b,g)&&b.push(g);c[g]=e};CKEDITOR.ui=function(c){if(c.ui)return c.ui;this.items={};this.instances={};this.editor=c;this._={handlers:{}};return this}; 260CKEDITOR.ui.prototype={add:function(c,g,e){e.name=c.toLowerCase();var b=this.items[c]={type:g,command:e.command||null,args:Array.prototype.slice.call(arguments,2)};CKEDITOR.tools.extend(b,e)},get:function(c){return this.instances[c]},create:function(c){var g=this.items[c],e=g&&this._.handlers[g.type],b=g&&g.command&&this.editor.getCommand(g.command),e=e&&e.create.apply(this,g.args);this.instances[c]=e;b&&b.uiItems.push(e);e&&!e.type&&(e.type=g.type);return e},addHandler:function(c,g){this._.handlers[c]= 261g},space:function(c){return CKEDITOR.document.getById(this.spaceId(c))},spaceId:function(c){return this.editor.id+"_"+c}};CKEDITOR.event.implementOn(CKEDITOR.ui);(function(){function c(a,d,f){CKEDITOR.event.call(this);a=a&&CKEDITOR.tools.clone(a);if(void 0!==d){if(!(d instanceof CKEDITOR.dom.element))throw Error("Expect element of type CKEDITOR.dom.element.");if(!f)throw Error("One of the element modes must be specified.");if(CKEDITOR.env.ie&&CKEDITOR.env.quirks&&f==CKEDITOR.ELEMENT_MODE_INLINE)throw Error("Inline element mode is not supported on IE quirks."); 262if(!e(d,f))throw Error('The specified element mode is not supported on element: "'+d.getName()+'".');this.element=d;this.elementMode=f;this.name=this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO&&(d.getId()||d.getNameAtt())}else this.elementMode=CKEDITOR.ELEMENT_MODE_NONE;this._={};this.commands={};this.templates={};this.name=this.name||g();this.id=CKEDITOR.tools.getNextId();this.status="unloaded";this.config=CKEDITOR.tools.prototypedCopy(CKEDITOR.config);this.ui=new CKEDITOR.ui(this);this.focusManager= 263new CKEDITOR.focusManager(this);this.keystrokeHandler=new CKEDITOR.keystrokeHandler(this);this.on("readOnly",b);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, 264!0);a.collapse();
vendor: 18,479 bytes, lines 264-299
264this.getSelection().selectRanges([a])}this.focus()}});CKEDITOR.fire("instanceCreated",null,this);CKEDITOR.add(this);CKEDITOR.tools.setTimeout(function(){this.isDestroyed()||this.isDetached()||k(this,a)},0,this)}function g(){do var a="editor"+ ++p;while(CKEDITOR.instances[a]);return a}function e(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, 265b;for(b in a)h(this,a[b])}function h(a,b){b[b.startDisabled?"disable":a.readOnly&&!b.readOnly?"disable":b.modes[a.mode]?"enable":"disable"]()}function m(a,b,d){if(b){var f,c,e=a.commands;for(c in e)f=e[c],(d||f.contextSensitive)&&f.refresh(a,b)}}function l(a){var b=a.config.customConfig;if(!b)return!1;var b=CKEDITOR.getUrl(b),d=r[b]||(r[b]={});d.fn?(d.fn.call(a,a.config),CKEDITOR.getUrl(a.config.customConfig)!=b&&l(a)||a.fireOnce("customConfigLoaded")):CKEDITOR.scriptLoader.queue(b,function(){d.fn= 266CKEDITOR.editorConfig?CKEDITOR.editorConfig:function(){};l(a)});return!0}function k(a,b){a.on("customConfigLoaded",function(){if(b){if(b.on)for(var f in b.on)a.on(f,b.on[f]);CKEDITOR.tools.extend(a.config,b,!0);delete a.config.on}f=a.config;a.readOnly=f.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")|| 267a.element.hasAttribute("readonly"):!1;a.blockless=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?!(a.element.is("textarea")||CKEDITOR.dtd[a.element.getName()].p):!1;a.tabIndex=f.tabIndex||a.element&&a.element.getAttribute("tabindex")||0;a.activeEnterMode=a.enterMode=a.blockless?CKEDITOR.ENTER_BR:f.enterMode;a.activeShiftEnterMode=a.shiftEnterMode=a.blockless?CKEDITOR.ENTER_BR:f.shiftEnterMode;f.skin&&(CKEDITOR.skinName=f.skin);a.fireOnce("configLoaded");a.dataProcessor=new CKEDITOR.htmlDataProcessor(a); 268a.filter=a.activeFilter=new CKEDITOR.filter(a);d(a)});b&&null!=b.customConfig&&(a.config.customConfig=b.customConfig);l(a)||a.fireOnce("customConfigLoaded")}function d(a){CKEDITOR.skin.loadPart("editor",function(){f(a)})}function f(b){CKEDITOR.lang.load(b.config.language,b.config.defaultLanguage,function(d,f){var c=b.config.title;b.langCode=d;b.lang=CKEDITOR.tools.prototypedCopy(f);b.title="string"==typeof c||!1===c?c:[b.lang.editor,b.name].join(", ");b.config.contentsLangDirection||(b.config.contentsLangDirection= 269b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?b.element.getDirection(1):b.lang.dir);b.fire("langLoaded");a(b)})}function a(a){a.getStylesSet(function(b){a.once("loaded",function(){a.fire("stylesSet",{styles:b})},null,null,1);n(a)})}function n(a){function b(a){if(!a)return"";CKEDITOR.tools.isArray(a)&&(a=a.join(","));return a.replace(/\s/g,"")}var d=a.config,f=b(d.plugins),c=b(d.extraPlugins),e=b(d.removePlugins);if(c)var h=new RegExp("(?:^|,)(?:"+c.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(h, 270""),f=f+(","+c);if(e)var g=new RegExp("(?:^|,)(?:"+e.replace(/,/g,"|")+")(?\x3d,|$)","g"),f=f.replace(g,"");CKEDITOR.env.air&&(f+=",adobeair");CKEDITOR.plugins.load(f.split(","),function(b){var f=[],c=[],e=[];a.plugins=CKEDITOR.tools.extend({},a.plugins,b);for(var h in b){var n=b[h],v=n.lang,m=null,k=n.requires,y;CKEDITOR.tools.isArray(k)&&(k=k.join(","));if(k&&(y=k.match(g)))for(;k=y.pop();)CKEDITOR.error("editor-plugin-required",{plugin:k.replace(",",""),requiredBy:h});v&&!a.lang[h]&&(v.split&& 271(v=v.split(",")),0<=CKEDITOR.tools.indexOf(v,a.langCode)?m=a.langCode:(m=a.langCode.replace(/-.*/,""),m=m!=a.langCode&&0<=CKEDITOR.tools.indexOf(v,m)?m:0<=CKEDITOR.tools.indexOf(v,"en")?"en":v[0]),n.langEntries&&n.langEntries[m]?(a.lang[h]=n.langEntries[m],m=null):e.push(CKEDITOR.getUrl(n.path+"lang/"+m+".js")));c.push(m);f.push(n)}CKEDITOR.scriptLoader.load(e,function(){if(!a.isDestroyed()&&!a.isDetached()){for(var b=["beforeInit","init","afterInit"],e=0;e<b.length;e++)for(var h=0;h<f.length;h++){var g= 272f[h];0===e&&c[h]&&g.lang&&g.langEntries&&(a.lang[g.name]=g.langEntries[c[h]]);if(g[b[e]])g[b[e]](a)}a.fireOnce("pluginsLoaded");d.keystrokes&&a.setKeystroke(a.config.keystrokes);for(h=0;h<a.config.blockedKeystrokes.length;h++)a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[h]]=1;a.status="loaded";a.fireOnce("loaded");CKEDITOR.fire("instanceLoaded",null,a)}})})}function t(){var a=this.element;if(a&&this.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO){var b=this.getData();this.config.htmlEncodeOutput&& 273(b=CKEDITOR.tools.htmlEncode(b));a.is("textarea")?a.setValue(b):a.setHtml(b);return!0}return!1}function x(a,b){function d(a){var b=a.startContainer,f=a.endContainer;return b.is&&(b.is("tr")||b.is("td")&&b.equals(f)&&a.endOffset===b.getChildCount())?!0:!1}function f(a){var b=a.startContainer;return b.is("tr")?a.cloneContents():b.clone(!0)}for(var c=new CKEDITOR.dom.documentFragment,e,h,g,n=0;n<a.length;n++){var m=a[n],k=m.startContainer.getAscendant("tr",!0);d(m)?(e||(e=k.getAscendant("table").clone(), 274e.append(k.getAscendant({thead:1,tbody:1,tfoot:1}).clone()),c.append(e),e=e.findOne("thead, tbody, tfoot")),h&&h.equals(k)||(h=k,g=k.clone(),e.append(g)),g.append(f(m))):c.append(m.cloneContents())}return e?c:b.getHtmlFromRange(a[0])}c.prototype=CKEDITOR.editor.prototype;CKEDITOR.editor=c;var p=0,r={};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{plugins:{detectConflict:function(a,b){for(var d=0;d<b.length;d++){var f=b[d];if(this[f])return CKEDITOR.warn("editor-plugin-conflict",{plugin:a,replacedWith:f}), 275!0}return!1}},addCommand:function(a,b){b.name=a.toLowerCase();var d=b instanceof CKEDITOR.command?b:new CKEDITOR.command(this,b);this.mode&&h(this,d);return this.commands[a]=d},_attachToForm:function(){function a(b){d.updateElement();d._.required&&!f.getValue()&&!1===d.fire("required")&&b.data.preventDefault()}function b(a){return!!(a&&a.call&&a.apply)}var d=this,f=d.element,c=new CKEDITOR.dom.element(f.$.form);f.is("textarea")&&c&&(c.on("submit",a),b(c.$.submit)&&(c.$.submit=CKEDITOR.tools.override(c.$.submit, 276function(b){return function(){a();b.apply?b.apply(this):b()}})),d.on("destroy",function(){c.removeListener("submit",a)}))},destroy:function(a){var b=CKEDITOR.filter.instances,d=this;this.fire("beforeDestroy");!a&&t.call(this);this.editable(null);this.filter&&delete this.filter;CKEDITOR.tools.array.forEach(CKEDITOR.tools.object.keys(b),function(a){a=b[a];d===a.editor&&a.destroy()});delete this.activeFilter;this.status="destroyed";this.fire("destroy");this.removeAllListeners();CKEDITOR.remove(this); 277CKEDITOR.fire("instanceDestroyed",null,this)},elementPath:function(a){if(!a){a=this.getSelection();if(!a)return null;a=a.getStartElement()}return a?new CKEDITOR.dom.elementPath(a,this.editable()):null},createRange:function(){var a=this.editable();return a?new CKEDITOR.dom.range(a):null},execCommand:function(a,b){var d=this.getCommand(a),f={name:a,commandData:b||{},command:d};return d&&d.state!=CKEDITOR.TRISTATE_DISABLED&&!1!==this.fire("beforeCommandExec",f)&&(f.returnValue=d.exec(f.commandData), 278!d.async&&!1!==this.fire("afterCommandExec",f))?f.returnValue:!1},getCommand:function(a){return this.commands[a]},getData:function(a){!a&&this.fire("beforeGetData");var b=this._.data;"string"!=typeof b&&(b=(b=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE?b.is("textarea")?b.getValue():b.getHtml():"");b={dataValue:b};!a&&this.fire("getData",b);return b.dataValue},getSnapshot:function(){var a=this.fire("getSnapshot");"string"!=typeof a&&(a=(a=this.element)&&this.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE? 279a.is("textarea")?a.getValue():a.getHtml():"");return a},loadSnapshot:function(a){this.fire("loadSnapshot",a)},setData:function(a,b,d){var f=!0,c=b;b&&"object"==typeof b&&(d=b.internal,c=b.callback,f=!b.noSnapshot);!d&&f&&this.fire("saveSnapshot");if(c||!d)this.once("dataReady",function(a){!d&&f&&this.fire("saveSnapshot");c&&c.call(a.editor)});a={dataValue:a};!d&&this.fire("setData",a);this._.data=a.dataValue;!d&&this.fire("afterSetData",a)},setReadOnly:function(a){a=null==a||a;this.readOnly!=a&&(this.readOnly= 280a,this.keystrokeHandler.blockedKeystrokes[8]=+a,this.editable().setReadOnly(a),this.fire("readOnly"))},insertHtml:function(a,b,d){this.fire("insertHtml",{dataValue:a,mode:b,range:d})},insertText:function(a){this.fire("insertText",a)},insertElement:function(a){this.fire("insertElement",a)},getSelectedHtml:function(a){var b=this.editable(),d=this.getSelection(),d=d&&d.getRanges();if(!b||!d||0===d.length)return null;b=x(d,b);return a?b.getHtml():b},extractSelectedHtml:function(a,b){var d=this.editable(), 281f=this.getSelection().getRanges(),c=new CKEDITOR.dom.documentFragment,e;if(!d||0===f.length)return null;for(e=0;e<f.length;e++)c.append(d.extractHtmlFromRange(f[e],b));b||this.getSelection().selectRanges([f[0]]);return a?c.getHtml():c},focus:function(){this.fire("beforeFocus")},checkDirty:function(){return"ready"==this.status&&this._.previousValue!==this.getSnapshot()},resetDirty:function(){this._.previousValue=this.getSnapshot()},updateElement:function(){return t.call(this)},setKeystroke:function(){for(var a= 282this.keystrokeHandler.keystrokes,b=CKEDITOR.tools.isArray(arguments[0])?arguments[0]:[[].slice.call(arguments,0)],d,f,c=b.length;c--;)d=b[c],f=0,CKEDITOR.tools.isArray(d)&&(f=d[1],d=d[0]),f?a[d]=f:delete a[d]},getCommandKeystroke:function(a,b){var d="string"===typeof a?this.getCommand(a):a,f=[];if(d){var c=CKEDITOR.tools.object.findKey(this.commands,d),e=this.keystrokeHandler.keystrokes;if(d.fakeKeystroke)f.push(d.fakeKeystroke);else for(var h in e)e[h]===c&&f.push(h)}return b?f:f[0]||null},addFeature:function(a){return this.filter.addFeature(a)}, 283setActiveFilter:function(a){a||(a=this.filter);this.activeFilter!==a&&(this.activeFilter=a,this.fire("activeFilterChange"),a===this.filter?this.setActiveEnterMode(null,null):this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode),a.getAllowedEnterMode(this.shiftEnterMode,!0)))},setActiveEnterMode:function(a,b){a=a?this.blockless?CKEDITOR.ENTER_BR:a:this.enterMode;b=b?this.blockless?CKEDITOR.ENTER_BR:b:this.shiftEnterMode;if(this.activeEnterMode!=a||this.activeShiftEnterMode!=b)this.activeEnterMode= 284a,this.activeShiftEnterMode=b,this.fire("activeEnterModeChange")},showNotification:function(a){alert(a)},isDetached:function(){return!!this.container&&this.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", 285{element:a}),null)}})();CKEDITOR.ELEMENT_MODE_NONE=0;CKEDITOR.ELEMENT_MODE_REPLACE=1;CKEDITOR.ELEMENT_MODE_APPENDTO=2;CKEDITOR.ELEMENT_MODE_INLINE=3;CKEDITOR.htmlParser=function(){this._={htmlPartsRegex:/<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}};(function(){var c=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,g={checked:1,compact:1,declare:1,defer:1,disabled:1, 286ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(e){for(var b,h,m=0,l;b=this._.htmlPartsRegex.exec(e);){h=b.index;if(h>m)if(m=e.substring(m,h),l)l.push(m);else this.onText(m);m=this._.htmlPartsRegex.lastIndex;if(h=b[1])if(h=h.toLowerCase(),l&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(h); 287continue}if(l)l.push(b[0]);else if(h=b[3]){if(h=h.toLowerCase(),!/="/.test(h)){var k={},d,f=b[4];b=!!b[5];if(f)for(;d=c.exec(f);){var a=d[1].toLowerCase();d=d[2]||d[3]||d[4]||"";k[a]=!d&&g[a]?a:CKEDITOR.tools.htmlDecodeAttr(d)}this.onTagOpen(h,k,b);!l&&CKEDITOR.dtd.$cdata[h]&&(l=[])}}else if(h=b[2])this.onComment(h)}if(e.length>m)this.onText(e.substring(m,e.length))}}})();CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(c){this._.output.push("\x3c", 288c)},openTagClose:function(c,g){g?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(c,g){"string"==typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g));this._.output.push(" ",c,'\x3d"',g,'"')},closeTag:function(c){this._.output.push("\x3c/",c,"\x3e")},text:function(c){this._.output.push(c)},comment:function(c){this._.output.push("\x3c!--",c,"--\x3e")},write:function(c){this._.output.push(c)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(c){var g=this._.output.join(""); 289c&&this.reset();return g}}});"use strict";(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var c=this.parent.children,g=CKEDITOR.tools.indexOf(c,this),e=this.previous,b=this.next;e&&(e.next=b);b&&(b.previous=e);c.splice(g,1);this.parent=null},replaceWith:function(c){var g=this.parent.children,e=CKEDITOR.tools.indexOf(g,this),b=c.previous=this.previous,h=c.next=this.next;b&&(b.next=c);h&&(h.previous=c);g[e]=c;c.parent=this.parent;this.parent=null}, 290insertAfter:function(c){var g=c.parent.children,e=CKEDITOR.tools.indexOf(g,c),b=c.next;g.splice(e+1,0,this);this.next=c.next;this.previous=c;c.next=this;b&&(b.previous=this);this.parent=c.parent},insertBefore:function(c){var g=c.parent.children,e=CKEDITOR.tools.indexOf(g,c);g.splice(e,0,this);this.next=c;(this.previous=c.previous)&&(c.previous.next=this);c.previous=this;this.parent=c.parent},getAscendant:function(c){var g="function"==typeof c?c:"string"==typeof c?function(b){return b.name==c}:function(b){return b.name in 291c},e=this.parent;for(;e&&e.type==CKEDITOR.NODE_ELEMENT;){if(g(e))return e;e=e.parent}return null},wrapWith:function(c){this.replaceWith(c);c.add(this);return c},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(c){return c||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(c){this.value=c;this._={isBlockLike:!1}};CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(c, 292g){var e=this.value;if(!(e=c.onComment(g,e,this)))return this.remove(),!1;if("string"!=typeof e)return this.replaceWith(e),!1;this.value=e;return!0},writeHtml:function(c,g){g&&this.filter(g);c.comment(this.value)}});"use strict";(function(){CKEDITOR.htmlParser.text=function(c){this.value=c;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(c,g){if(!(this.value=c.onText(g,this.value,this)))return this.remove(), 293!1},writeHtml:function(c,g){g&&this.filter(g);c.text(this.value)}})})();"use strict";(function(){CKEDITOR.htmlParser.cdata=function(c){this.value=c};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(c){c.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}};(function(){function c(b){return b.attributes["data-cke-survive"]? 294!1:"a"==b.name&&b.attributes.href||CKEDITOR.dtd.$removeEmpty[b.name]}var g=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),e={ol:1,ul:1},b=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),h={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,k){function d(a){var b;if(0<q.length)for(var d=0;d<q.length;d++){var c= 295q[d],e=c.name,h=CKEDITOR.dtd[e],g=u.name&&CKEDITOR.dtd[u.name];g&&!g[e]||a&&h&&!h[a]&&CKEDITOR.dtd[a]?e==u.name&&(n(u,u.parent,1),d--):(b||(f(),b=1),c=c.clone(),c.parent=u,u=c,q.splice(d,1),d--)}}function f(){for(;z.length;)n(z.shift(),u)}function a(a){if(a._.isBlockLike&&"pre"!=a.name&&"textarea"!=a.name){var b=a.children.length,d=a.children[b-1],f;d&&d.type==CKEDITOR.NODE_TEXT&&((f=CKEDITOR.tools.rtrim(d.value))?d.value=f:a.children.length=b-1)}}function n(b,d,f){d=d||u||r;var e=u;void 0===b.previous&& 296(t(d,b)&&(u=d,p.onTagOpen(k,{}),b.returnPoint=d=u),a(b),c(b)&&!b.children.length||d.add(b),"pre"==b.name&&(w=!1),"textarea"==b.name&&(A=!1));b.returnPoint?(u=b.returnPoint,delete b.returnPoint):u=f?d:e}function t(a,b){if((a==r||"body"==a.name)&&k&&(!a.name||CKEDITOR.dtd[a.name][k])){var d,f;return(d=b.attributes&&(f=b.attributes["data-cke-real-element-type"])?f:b.name)&&d in CKEDITOR.dtd.$inline&&!(d in CKEDITOR.dtd.head)&&!b.isOrphan||b.type==CKEDITOR.NODE_TEXT}}function x(a,b){return a in CKEDITOR.dtd.$listItem|| 297a in CKEDITOR.dtd.$tableContent?a==b||"dt"==a&&"dd"==b||"dd"==a&&"dt"==b:!1}var p=new CKEDITOR.htmlParser,r=l instanceof CKEDITOR.htmlParser.element?l:"string"==typeof l?new CKEDITOR.htmlParser.element(l):new CKEDITOR.htmlParser.fragment,q=[],z=[],u=r,A="textarea"==r.name,w="pre"==r.name;p.onTagOpen=function(a,h,m,k){h=new CKEDITOR.htmlParser.element(a,h);h.isUnknown&&m&&(h.isEmpty=!0);h.isOptionalClose=k;if(c(h))q.push(h);else{if("pre"==a)w=!0;else{if("br"==a&&w){u.add(new CKEDITOR.htmlParser.text("\n")); 298return}"textarea"==a&&(A=!0)}if("br"==a)z.push(h);else{for(;!(k=(m=u.name)?CKEDITOR.dtd[m]||(u._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b,h.isUnknown||u.isUnknown||k[a]);)if(u.isOptionalClose)p.onTagClose(m);else if(a in e&&m in e)m=u.children,(m=m[m.length-1])&&"li"==m.name||n(m=new CKEDITOR.htmlParser.element("li"),u),!h.returnPoint&&(h.returnPoint=u),u=m;else if(a in CKEDITOR.dtd.$listItem&&!x(a,m))p.onTagOpen("li"==a?"ul":"dl",{},0,1);else if(m in g&&!x(a,m))!h.returnPoint&&(h.returnPoint= 299u),u=u.parent;else if(m in CKEDITOR.dtd.$inline&&q.unshift(u),u.parent)n(u,u.parent,1);else{h.isOrphan=1;break}d(a);f();h.parent=u;h.isEmpty?n(h):u=h}}};p.onTagClose=function(a){for(var b=q.length-1;0<=b;b--)if(a==q[b].name){q.splice(b,1);return}for(var d=[],c=[],e=u;e!=r&&e.name!=a;)e._.isBlockLike||c.unshift(e),d.push(e),e=e.returnPoint||e.parent;if(e!=r){for(b=0;b<d.length;b++){var h=d[b];n(h,h.parent)}u=e;e._.isBlockLike&&f();n(e,e.parent);e==u&&(u=u.parent);q=q.concat(c)}"body"==a&&(k=!1)};p.onText=
vendor: 4,237 bytes, lines 300-308
300function(a){if(!(u._.hasInlineStarted&&!z.length||w||A)&&(a=CKEDITOR.tools.ltrim(a),0===a.length))return;var c=u.name,e=c?CKEDITOR.dtd[c]||(u._.isBlockLike?CKEDITOR.dtd.div:CKEDITOR.dtd.span):b;if(!A&&!e["#"]&&c in g)p.onTagOpen(h[c]||""),p.onText(a);else{f();d();w||A||(a=a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g," "));a=new CKEDITOR.htmlParser.text(a);if(t(u,a))this.onTagOpen(k,{},0,1);u.add(a)}};p.onCDATA=function(a){u.add(new CKEDITOR.htmlParser.cdata(a))};p.onComment=function(a){f();d();u.add(new CKEDITOR.htmlParser.comment(a))}; 301p.parse(m);for(f();u!=r;)n(u,u.parent,1);a(r);return r};CKEDITOR.htmlParser.fragment.prototype={type:CKEDITOR.NODE_DOCUMENT_FRAGMENT,add:function(b,c){isNaN(c)&&(c=this.children.length);var e=0<c?this.children[c-1]:null;if(e){if(b._.isBlockLike&&e.type==CKEDITOR.NODE_TEXT&&(e.value=CKEDITOR.tools.rtrim(e.value),0===e.value.length)){this.children.pop();this.add(b);return}e.next=b}b.previous=e;b.parent=this;this.children.splice(c,0,b);this._.hasInlineStarted||(this._.hasInlineStarted=b.type==CKEDITOR.NODE_TEXT|| 302b.type==CKEDITOR.NODE_ELEMENT&&!b._.isBlockLike)},filter:function(b,c){c=this.getFilterContext(c);b.onRoot(c,this);this.filterChildren(b,!1,c)},filterChildren:function(b,c,e){if(this.childrenFilteredBy!=b.id){e=this.getFilterContext(e);if(c&&!this.parent)b.onRoot(e,this);this.childrenFilteredBy=b.id;for(c=0;c<this.children.length;c++)!1===this.children[c].filter(b,e)&&c--}},writeHtml:function(b,c){c&&this.filter(c);this.writeChildrenHtml(b)},writeChildrenHtml:function(b,c,e){var d=this.getFilterContext(); 303if(e&&!this.parent&&c)c.onRoot(d,this);c&&this.filterChildren(c,!1,d);c=0;e=this.children;for(d=e.length;c<d;c++)e[c].writeHtml(b)},forEach:function(b,c,e){if(!(e||c&&this.type!=c))var d=b(this);if(!1!==d){e=this.children;for(var f=0;f<e.length;f++)d=e[f],d.type==CKEDITOR.NODE_ELEMENT?d.forEach(b,c):c&&d.type!=c||b(d)}},getFilterContext:function(b){return b||{}}}})();"use strict";(function(){function c(){this.rules=[]}function g(e,b,h,g){var l,k;for(l in b)(k=e[l])||(k=e[l]=new c),k.add(b[l],h,g)} 304CKEDITOR.htmlParser.filter=CKEDITOR.tools.createClass({$:function(e){this.id=CKEDITOR.tools.getNextNumber();this.elementNameRules=new c;this.attributeNameRules=new c;this.elementsRules={};this.attributesRules={};this.textRules=new c;this.commentRules=new c;this.rootRules=new c;e&&this.addRules(e,10)},proto:{addRules:function(c,b){var h;"number"==typeof b?h=b:b&&"priority"in b&&(h=b.priority);"number"!=typeof h&&(h=10);"object"!=typeof b&&(b={});c.elementNames&&this.elementNameRules.addMany(c.elementNames, 305h,b);c.attributeNames&&this.attributeNameRules.addMany(c.attributeNames,h,b);c.elements&&g(this.elementsRules,c.elements,h,b);c.attributes&&g(this.attributesRules,c.attributes,h,b);c.text&&this.textRules.add(c.text,h,b);c.comment&&this.commentRules.add(c.comment,h,b);c.root&&this.rootRules.add(c.root,h,b)},applyTo:function(c){c.filter(this)},onElementName:function(c,b){return this.elementNameRules.execOnName(c,b)},onAttributeName:function(c,b){return this.attributeNameRules.execOnName(c,b)},onText:function(c, 306b,h){return this.textRules.exec(c,b,h)},onComment:function(c,b,h){return this.commentRules.exec(c,b,h)},onRoot:function(c,b){return this.rootRules.exec(c,b)},onElement:function(c,b){for(var h=[this.elementsRules["^"],this.elementsRules[b.name],this.elementsRules.$],g,l=0;3>l;l++)if(g=h[l]){g=g.exec(c,b,this);if(!1===g)return null;if(g&&g!=b)return this.onNode(c,g);if(b.parent&&!b.name)break}return b},onNode:function(c,b){var h=b.type;return h==CKEDITOR.NODE_ELEMENT?this.onElement(c,b):h==CKEDITOR.NODE_TEXT? 307new CKEDITOR.htmlParser.text(this.onText(c,b.value,b)):h==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(c,b.value,b)):null},onAttribute:function(c,b,h,g){return(h=this.attributesRules[h])?h.exec(c,g,b,this):g}}});CKEDITOR.htmlParser.filterRulesGroup=c;c.prototype={add:function(c,b,h){this.rules.splice(this.findIndex(b),0,{value:c,priority:b,options:h})},addMany:function(c,b,h){for(var g=[this.findIndex(b),0],l=0,k=c.length;l<k;l++)g.push({value:c[l],priority:b,options:h});this.rules.splice.apply(this.rules, 308g)},findIndex:function(c){for(var b=this.rules,h=b.length-1;0<=h&&c<b[h].priority;)h--;return h+1}
vendor: 19,295 bytes, lines 308-345
308,exec:function(c,b){var h=b instanceof CKEDITOR.htmlParser.node||b instanceof CKEDITOR.htmlParser.fragment,g=Array.prototype.slice.call(arguments,1),l=this.rules,k=l.length,d,f,a,n;for(n=0;n<k;n++)if(h&&(d=b.type,f=b.name),a=l[n],!(c.nonEditable&&!a.options.applyToAll||c.nestedEditable&&a.options.excludeNestedEditable)){a=a.value.apply(null,g);if(!1===a||h&&a&&(a.name!=f||a.type!=d))return a;null!=a&& 309(g[0]=b=a)}return b},execOnName:function(c,b){for(var h=0,g=this.rules,l=g.length,k;b&&h<l;h++)k=g[h],c.nonEditable&&!k.options.applyToAll||c.nestedEditable&&k.options.excludeNestedEditable||(b=b.replace(k.value[0],k.value[1]));return b}}})();(function(){function c(a,d){function f(a){return a||CKEDITOR.env.needsNbspFiller?new CKEDITOR.htmlParser.text("Â "):new CKEDITOR.htmlParser.element("br",{"data-cke-bogus":1})}function c(a,d){return function(c){if(c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var h= 310[],n=e(c),v,M;if(n)for(g(n,1)&&h.push(n);n;)m(n)&&(v=b(n))&&g(v)&&((M=b(v))&&!m(M)?h.push(v):(f(y).insertAfter(v),v.remove())),n=n.previous;for(n=0;n<h.length;n++)h[n].remove();if(h=!a||!1!==("function"==typeof d?d(c):d))y||CKEDITOR.env.needsBrFiller||c.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT?y||CKEDITOR.env.needsBrFiller||!(7<document.documentMode||c.name in CKEDITOR.dtd.tr||c.name in CKEDITOR.dtd.$listItem)?(h=e(c),h=!h||"form"==c.name&&"input"==h.name):h=!1:h=!1;h&&c.add(f(a))}}}function g(a,b){if((!y|| 311CKEDITOR.env.needsBrFiller)&&a.type==CKEDITOR.NODE_ELEMENT&&"br"==a.name&&!a.attributes["data-cke-eol"])return!0;var d;return a.type==CKEDITOR.NODE_TEXT&&(d=a.value.match(u))&&(d.index&&((new CKEDITOR.htmlParser.text(a.value.substring(0,d.index))).insertBefore(a),a.value=d[0]),!CKEDITOR.env.needsBrFiller&&y&&(!b||a.parent.name in v)||!y&&((d=a.previous)&&"br"==d.name||!d||m(d)))?!0:!1}var n={elements:{}},y="html"==d,v=CKEDITOR.tools.extend({},F),M;for(M in v)"#"in w[M]||delete v[M];for(M in v)n.elements[M]= 312c(y,a.config.fillEmptyBlocks);n.root=c(y,!1);n.elements.br=function(a){return function(d){if(d.parent.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var c=d.attributes;if("data-cke-bogus"in c||"data-cke-eol"in c)delete c["data-cke-bogus"];else{for(c=d.next;c&&h(c);)c=c.next;var e=b(d);!c&&m(d.parent)?l(d.parent,f(a)):m(c)&&e&&!m(e)&&f(a).insertBefore(c)}}}}(y);return n}function g(a,b){return a!=CKEDITOR.ENTER_BR&&!1!==b?a==CKEDITOR.ENTER_DIV?"div":"p":!1}function e(a){for(a=a.children[a.children.length-1];a&& 313h(a);)a=a.previous;return a}function b(a){for(a=a.previous;a&&h(a);)a=a.previous;return a}function h(a){return a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(a.value)||a.type==CKEDITOR.NODE_ELEMENT&&a.attributes["data-cke-bookmark"]}function m(a){return a&&(a.type==CKEDITOR.NODE_ELEMENT&&a.name in F||a.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)}function l(a,b){var d=a.children[a.children.length-1];a.children.push(b);b.parent=a;d&&(d.next=b,b.previous=d)}function k(a){a=a.attributes;"false"!=a.contenteditable&& 314(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function d(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function f(a){return a.replace(J,function(a,b,d){return"\x3c"+b+d.replace(G,function(a,b){return D.test(b)&&-1==d.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function a(a,b){return a.replace(b,function(a,b,d){0===a.indexOf("\x3ctextarea")&& 315(a=b+r(d).replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(L,function(a,b){return decodeURIComponent(b)})}function t(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g,function(a){return"\x3c!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function x(a){return CKEDITOR.tools.array.reduce(a.split(""),function(a,b){var d=b.toLowerCase(),c=b.toUpperCase(), 316f=p(d);d!==c&&(f+="|"+p(c));return a+("("+f+")")},"")}function p(a){var b;b=a.charCodeAt(0);var d=b.toString(16);b={htmlCode:"\x26#"+b+";?",hex:"\x26#x0*"+d+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var c in b)b[c]&&(a+="|"+b[c]);return a}function r(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function q(a,b){var d=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a, 317b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function z(a,b){var d=[],c=b.config.protectedSource,f=b._.dataStore||(b._.dataStore={id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,c=[/<script[\s\S]*?(<\/script>|$)/gi,/<noscript[\s\S]*?<\/noscript>/gi,/<meta[\s\S]*?\/?>/gi].concat(c);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var h=0;h<c.length;h++)a=a.replace(c[h],function(a){a= 318a.replace(e,function(a,b,c){return d[c]});return/cke_temp(comment)?/.test(a)?a:"\x3c!--{cke_temp}"+(d.push(a)-1)+"--\x3e"});a=a.replace(e,function(a,b,c){return"\x3c!--"+A+(b?"{C}":"")+encodeURIComponent(d[c]).replace(/--/g,"%2D%2D")+"--\x3e"});a=a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a= 319a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,f){return"\x3c"+d+c+"\x3e"+q(r(f),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var d,e,h=this;this.editor=b;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(B);d.addRules(C,{applyToAll:!0});d.addRules(c(b,"data"),{applyToAll:!0});e.addRules(H);e.addRules(E,{applyToAll:!0});e.addRules(c(b,"html"),{applyToAll:!0}); 320b.on("toHtml",function(d){d=d.data;var c=d.dataValue,e,c=c.replace(y,""),c=z(c,b),c=a(c,I),c=f(c),c=a(c,P),c=c.replace(M,"$1cke:$2"),c=c.replace(O,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"),c=c.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=d.context||b.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",h=1);e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1); 321c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(c=c.replace(/^<pre>|<\/pre>$/gi,""));c=c.replace(N,"$1$2");c=n(c);c=r(c);e=!1===d.fixForBody?!1:g(d.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,d.context,e);e&&(h=c,!h.children.length&&CKEDITOR.dtd[h.name][e]&&(e=new CKEDITOR.htmlParser.element(e),h.add(e)));d.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")}, 322null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,d=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(d);b=d.getHtml(!0);a.dataValue=t(b)},null,null,15);b.on("toDataFormat",function(a){var d=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^<br *\/?>/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,g(a.data.enterMode,b.config.autoParagraph))}, 323null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue,!1,!0)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,c=h.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(!0);d=r(d);d=q(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var f=this.editor,e,h,g,n;b&&"object"==typeof b?(e=b.context,d=b.fixForBody, 324c=b.dontFilter,h=b.filter,g=b.enterMode,n=b.protectedWhitespaces):e=b;e||null===e||(e=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:e,fixForBody:d,dontFilter:c,filter:h||f.filter,enterMode:g||f.enterMode,protectedWhitespaces:n}).dataValue},toDataFormat:function(a,b){var d,c,f;b&&(d=b.context,c=b.filter,f=b.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:c||this.editor.filter,context:d,enterMode:f||this.editor.enterMode}).dataValue}}; 325var u=/(?: |\xa0)$/,A="{cke_protected}",w=CKEDITOR.dtd,v="caption colgroup col thead tfoot tbody".split(" "),F=CKEDITOR.tools.extend({},w.$blockLimit,w.$block),B={elements:{input:k,textarea:k}},C={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]= 326a.attributes.src,delete a.attributes.src}}}},H={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var d=b.attributes.width,b=b.attributes.height;d&&(a.attributes.width=d);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},E={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b= 327a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],c,f=0;f<d.length;f++)c="data-cke-saved-"+d[f],c in b&&delete b[d[f]]}return a},table:function(a){a.children.slice(0).sort(function(a,b){var d,c;a.type==CKEDITOR.NODE_ELEMENT&&b.type==a.type&&(d=CKEDITOR.tools.indexOf(v,a.name),c=CKEDITOR.tools.indexOf(v,b.name));-1<d&&-1<c&&d!=c||(d=a.parent?a.getIndex():-1,c=b.parent?b.getIndex():-1);return d>c?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"== 328a.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);b.value=a.attributes["data-cke-title"]||""},input:d,textarea:d},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g, 329""))||!1}}};CKEDITOR.env.ie&&(E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var J=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,D=/^(href|src|name)$/i,P=/(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,I=/(<textarea(?=[ >])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,L=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,y=new RegExp("("+x("\x3ccke:encoded\x3e")+"(.*?)"+x("\x3c/cke:encoded\x3e")+ 330")|("+x("\x3c")+x("/")+"?"+x("cke:encoded\x3e")+")","gi"),M=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,N=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,O=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi})();"use strict";CKEDITOR.htmlParser.element=function(c,g){this.name=c;this.attributes=g||{};this.children=[];var e=c||"",b=e.match(/^cke:(.*)/);b&&(e=b[1]);e=!!(CKEDITOR.dtd.$nonBodyContent[e]||CKEDITOR.dtd.$block[e]||CKEDITOR.dtd.$listItem[e]||CKEDITOR.dtd.$tableContent[e]|| 331CKEDITOR.dtd.$nonEditable[e]||"br"==e);this.isEmpty=!!CKEDITOR.dtd.$empty[c];this.isUnknown=!CKEDITOR.dtd[c];this._={isBlockLike:e,hasInlineStarted:this.isEmpty||!e}};CKEDITOR.htmlParser.cssStyle=function(c){var g={};((c instanceof CKEDITOR.htmlParser.element?c.attributes.style:c)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,b,h){"font-family"==b&&(h=h.replace(/["']/g,""));g[b.toLowerCase()]=h});return{rules:g,populate:function(c){var b=this.toString();b&& 332(c instanceof CKEDITOR.dom.element?c.setAttribute("style",b):c instanceof CKEDITOR.htmlParser.element?c.attributes.style=b:c.style=b)},toString:function(){var c=[],b;for(b in g)g[b]&&c.push(b,":",g[b],";");return c.join("")}}};(function(){function c(b){return function(c){return c.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof b?c.name==b:c.name in b)}}var g=function(b,c){b=b[0];c=c[0];return b<c?-1:b>c?1:0},e=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, 333{type:CKEDITOR.NODE_ELEMENT,add:e.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(b,c){var e=this,g,k;c=e.getFilterContext(c);if(!e.parent)b.onRoot(c,e);for(;;){g=e.name;if(!(k=b.onElementName(c,g)))return this.remove(),!1;e.name=k;if(!(e=b.onElement(c,e)))return this.remove(),!1;if(e!==this)return this.replaceWith(e),!1;if(e.name==g)break;if(e.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(e),!1;if(!e.name)return this.replaceWithChildren(), 334!1}g=e.attributes;var d,f;for(d in g){for(k=g[d];;)if(f=b.onAttributeName(c,d))if(f!=d)delete g[d],d=f;else break;else{delete g[d];break}f&&(!1===(k=b.onAttribute(c,e,f,k))?delete g[f]:g[f]=k)}e.isEmpty||this.filterChildren(b,!1,c);return!0},filterChildren:e.filterChildren,writeHtml:function(b,c){c&&this.filter(c);var e=this.name,l=[],k=this.attributes,d,f;b.openTag(e,k);for(d in k)l.push([d,k[d]]);b.sortAttributes&&l.sort(g);d=0;for(f=l.length;d<f;d++)k=l[d],b.attribute(k[0],k[1]);b.openTagClose(e, 335this.isEmpty);this.writeChildrenHtml(b);this.isEmpty||b.closeTag(e)},writeChildrenHtml:e.writeChildrenHtml,replaceWithChildren:function(){for(var b=this.children,c=b.length;c;)b[--c].insertAfter(this);this.remove()},forEach:e.forEach,getFirst:function(b){if(!b)return this.children.length?this.children[0]:null;"function"!=typeof b&&(b=c(b));for(var e=0,g=this.children.length;e<g;++e)if(b(this.children[e]))return this.children[e];return null},getHtml:function(){var b=new CKEDITOR.htmlParser.basicWriter; 336this.writeChildrenHtml(b);return b.getHtml()},setHtml:function(b){b=this.children=CKEDITOR.htmlParser.fragment.fromHtml(b).children;for(var c=0,e=b.length;c<e;++c)b[c].parent=this},getOuterHtml:function(){var b=new CKEDITOR.htmlParser.basicWriter;this.writeHtml(b);return b.getHtml()},split:function(b){for(var c=this.children.splice(b,this.children.length-b),e=this.clone(),g=0;g<c.length;++g)c[g].parent=e;e.children=c;c[0]&&(c[0].previous=null);0<b&&(this.children[b-1].next=null);this.parent.add(e, 337this.getIndex()+1);return e},find:function(b,c){void 0===c&&(c=!1);var e=[],g;for(g=0;g<this.children.length;g++){var k=this.children[g];"function"==typeof b&&b(k)?e.push(k):"string"==typeof b&&k.name===b&&e.push(k);c&&k.find&&(e=e.concat(k.find(b,c)))}return e},findOne:function(b,c){var e=null,g=CKEDITOR.tools.array.find(this.children,function(g){var d="function"===typeof b?b(g):g.name===b;if(d||!c)return d;g.children&&g.findOne&&(e=g.findOne(b,!0));return!!e});return e||g||null},addClass:function(b){if(!this.hasClass(b)){var c= 338this.attributes["class"]||"";this.attributes["class"]=c+(c?" ":"")+b}},removeClass:function(b){var c=this.attributes["class"];c&&((c=CKEDITOR.tools.trim(c.replace(new RegExp("(?:\\s+|^)"+b+"(?:\\s+|$)")," ")))?this.attributes["class"]=c:delete this.attributes["class"])},hasClass:function(b){var c=this.attributes["class"];return c?(new RegExp("(?:^|\\s)"+b+"(?\x3d\\s|$)")).test(c):!1},getFilterContext:function(b){var c=[];b||(b={nonEditable:!1,nestedEditable:!1});b.nonEditable||"false"!=this.attributes.contenteditable? 339b.nonEditable&&!b.nestedEditable&&"true"==this.attributes.contenteditable&&c.push("nestedEditable",!0):c.push("nonEditable",!0);if(c.length){b=CKEDITOR.tools.copy(b);for(var e=0;e<c.length;e+=2)b[c[e]]=c[e+1]}return b}},!0)})();(function(){var c=/{([^}]+)}/g;CKEDITOR.template=function(c){this.source="function"===typeof c?c:String(c)};CKEDITOR.template.prototype.output=function(g,e){var b=("function"===typeof this.source?this.source(g):this.source).replace(c,function(b,c){return void 0!==g[c]?g[c]: 340b});return e?e.push(b):b}})();delete CKEDITOR.loadFullCore;CKEDITOR.instances={};CKEDITOR.document=new CKEDITOR.dom.document(document);CKEDITOR.add=function(c){function g(){CKEDITOR.currentInstance==c&&(CKEDITOR.currentInstance=null,CKEDITOR.fire("currentInstance"))}CKEDITOR.instances[c.name]=c;c.on("focus",function(){CKEDITOR.currentInstance!=c&&(CKEDITOR.currentInstance=c,CKEDITOR.fire("currentInstance"))});c.on("blur",g);c.on("destroy",g);CKEDITOR.fire("instance",null,c)};CKEDITOR.remove=function(c){delete CKEDITOR.instances[c.name]}; 341(function(){var c={};CKEDITOR.addTemplate=function(g,e){var b=c[g];if(b)return b;b={name:g,source:e};CKEDITOR.fire("template",b);return c[g]=new CKEDITOR.template(b.source)};CKEDITOR.getTemplate=function(g){return c[g]}})();(function(){var c=[];CKEDITOR.addCss=function(g){c.push(g)};CKEDITOR.getCss=function(){return c.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= 3420;(function(){CKEDITOR.inline=function(c,g){c=CKEDITOR.editor._getEditorElement(c);if(!c)return null;var e=new CKEDITOR.editor(g,c,CKEDITOR.ELEMENT_MODE_INLINE),b=c.is("textarea")?c:null;b?(e.setData(b.getValue(),null,!0),c=CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"'+!!e.readOnly+'" class\x3d"cke_textarea_inline"\x3e'+b.getValue()+"\x3c/div\x3e",CKEDITOR.document),c.insertAfter(b),b.hide(),b.$.form&&e._attachToForm()):e.setData(c.getHtml(),null,!0);e.on("loaded",function(){e.fire("uiReady"); 343e.editable(c);e.container=c;e.ui.contentsElement=c;e.setData(e.getData(1));e.resetDirty();e.fire("contentDom");e.mode="wysiwyg";e.fire("mode");e.status="ready";e.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,e)},null,null,1E4);e.on("destroy",function(){var c=e.container;b&&c&&(c.clearCustomData(),c.remove());b&&b.show();e.element.clearCustomData();delete e.element});return e};CKEDITOR.inlineAll=function(){var c,g,e;for(e in CKEDITOR.dtd.$editable)for(var b=CKEDITOR.document.getElementsByTag(e), 344h=0,m=b.count();h<m;h++)c=b.getItem(h),"true"==c.getAttribute("contenteditable")&&(g={element:c,config:{}},!1!==CKEDITOR.fire("inline",g)&&CKEDITOR.inline(c,g.config))};CKEDITOR.domReady(function(){!CKEDITOR.disableAutoInline&&CKEDITOR.inlineAll()})})();CKEDITOR.replaceClass="ckeditor";(function(){function c(b,c,m,l){b=CKEDITOR.editor._getEditorElement(b);if(!b)return null;var k=new CKEDITOR.editor(c,b,l);l==CKEDITOR.ELEMENT_MODE_REPLACE&&(b.setStyle("visibility","hidden"),k._.required=b.hasAttribute("required"), 345b.removeAttribute("required"));m&&k.setData(m,null,!0);k.on("loaded",function(){k.isDestroyed()||k.isDetached()||(e(k),l==CKEDITOR.ELEMENT_MODE_REPLACE&&k.config.autoUpdateElement&&b.$.form&&k._attachToForm(),k.setMode(k.config.startupMode,function(){k.resetDirty();k.status="ready";
vendor: 7,400 bytes, lines 345-359
345k.fireOnce("instanceReady");CKEDITOR.fire("instanceReady",null,k)}))});k.on("destroy",g);return k}function g(){var b=this.container,c=this.element;b&&(b.clearCustomData(),b.remove());c&&(c.clearCustomData(),this.elementMode== 346CKEDITOR.ELEMENT_MODE_REPLACE&&(c.show(),this._.required&&c.setAttribute("required","required")),delete this.element)}function e(b){var c=b.name,e=b.element,g=b.elementMode,k=b.fire("uiSpace",{space:"top",html:""}).html,d=b.fire("uiSpace",{space:"bottom",html:""}).html,f=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"': 347"")+"\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'),c=CKEDITOR.dom.element.createFromHtml(f.output({id:b.id,name:c,langDir:b.lang.dir,langCode:b.langCode,voiceLabel:b.title,topHtml:k?'\x3cspan id\x3d"'+ 348b.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:d?'\x3cspan id\x3d"'+b.ui.spaceId("bottom")+'" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e'+d+"\x3c/span\x3e":"",outerEl:CKEDITOR.env.ie?"span":"div"}));g==CKEDITOR.ELEMENT_MODE_REPLACE?(e.hide(),c.insertAfter(e)):e.append(c);b.container=c;b.ui.contentsElement=b.ui.space("contents");k&&b.ui.space("top").unselectable(); 349d&&b.ui.space("bottom").unselectable();e=b.config.width;g=b.config.height;e&&c.setStyle("width",CKEDITOR.tools.cssLength(e));g&&b.ui.space("contents").setStyle("height",CKEDITOR.tools.cssLength(g));c.disableContextMenu();CKEDITOR.env.webkit&&c.on("focus",function(){b.focus()});b.fireOnce("uiReady")}CKEDITOR.replace=function(b,e){return c(b,e,null,CKEDITOR.ELEMENT_MODE_REPLACE)};CKEDITOR.appendTo=function(b,e,g){return c(b,e,g,CKEDITOR.ELEMENT_MODE_APPENDTO)};CKEDITOR.replaceAll=function(){for(var b= 350document.getElementsByTagName("textarea"),c=0;c<b.length;c++){var e=null,g=b[c];if(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]&&(e={},!1===arguments[0](g,e)))continue;this.replace(g,e)}}};CKEDITOR.editor.prototype.addMode=function(b,c){(this._.modes||(this._.modes={}))[b]=c};CKEDITOR.editor.prototype.setMode=function(b,c){var e=this,g=this._.modes;if(b!=e.mode&&g&&g[b]){e.fire("beforeSetMode", 351b);if(e.mode){var k=e.checkDirty(),g=e._.previousModeData,d,f=0;e.fire("beforeModeUnload");e.editable(0);e._.previousMode=e.mode;e._.previousModeData=d=e.getData(1);"source"==e.mode&&g==d&&(e.fire("lockSnapshot",{forceUpdate:!0}),f=1);e.ui.space("contents").setHtml("");e.mode=""}else e._.previousModeData=e.getData(1);this._.modes[b](function(){e.mode=b;void 0!==k&&!k&&e.resetDirty();f?e.fire("unlockSnapshot"):"wysiwyg"==b&&e.fire("saveSnapshot");setTimeout(function(){e.isDestroyed()||e.isDetached()|| 352(e.fire("mode"),c&&c.call(e))},0)})}};CKEDITOR.editor.prototype.resize=function(b,c,e,g){var k=this.container,d=this.ui.space("contents"),f=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;g.setSize("width",b,!0);f&&(f.style.width="1%");var a=(g.$.offsetHeight||0)-(d.$.clientHeight||0),k=Math.max(c-(e?0:a),0);c=e?c+a:c;d.setStyle("height",k+"px");f&&(f.style.width= 353"100%");this.fire("resize",{outerHeight:c,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&&CKEDITOR.replaceAll(CKEDITOR.replaceClass)})})();CKEDITOR.config.startupMode="wysiwyg";(function(){function c(a){var d=a.editor,c=a.data.path,f=c.blockLimit,e=a.data.selection,h=e.getRanges()[0],n;if(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller)if(e= 354g(e,c))e.appendBogus(),n=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.edge&&d._.previousActive;l(d,c.block,f)&&h.collapsed&&!h.getCommonAncestor().isReadOnly()&&(c=h.clone(),c.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS),f=new CKEDITOR.dom.walker(c),f.guard=function(a){return!b(a)||a.type==CKEDITOR.NODE_COMMENT||a.isReadOnly()},!f.checkForward()||c.checkStartOfBlock()&&c.checkEndOfBlock())&&(d=h.fixBlock(!0,d.activeEnterMode==CKEDITOR.ENTER_DIV?"div":"p"),CKEDITOR.env.needsBrFiller||(d=d.getFirst(b))&& 355d.type==CKEDITOR.NODE_TEXT&&CKEDITOR.tools.trim(d.getText()).match(/^(?: |\xa0)$/)&&d.remove(),n=1,a.cancel());n&&h.select()}function g(a,d){if(a.isFake)return 0;var c=d.block||d.blockLimit,f=c&&c.getLast(b);if(!(!c||!c.isBlockBoundary()||f&&f.type==CKEDITOR.NODE_ELEMENT&&f.isBlockBoundary()||c.is("pre")||c.getBogus()))return c}function e(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)&&t(a)}function h(a, 356b){return function(d){var c=d.data.$.toElement||d.data.$.fromElement||d.data.$.relatedTarget;(c=c&&c.nodeType==CKEDITOR.NODE_ELEMENT?new CKEDITOR.dom.element(c):null)&&(b.equals(c)||b.contains(c))||a.call(this,d)}}function m(a){function d(a){return function(d,f){f&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(e)&&(c=d);if(!(f||!b(d)||a&&p(d)))return!1}}var c,f=a.getRanges()[0];a=a.root;var e={table:1,ul:1,ol:1,dl:1};if(f.startPath().contains(e)){var h=f.clone();h.collapse(1);h.setStartAt(a,CKEDITOR.POSITION_AFTER_START); 357a=new CKEDITOR.dom.walker(h);a.guard=d();a.checkBackward();if(c)return h=f.clone(),h.collapse(),h.setEndAt(c,CKEDITOR.POSITION_AFTER_END),a=new CKEDITOR.dom.walker(h),a.guard=d(!0),c=!1,a.checkForward(),c}return null}function l(a,b,d){return!1!==a.config.autoParagraph&&a.activeEnterMode!=CKEDITOR.ENTER_BR&&(a.editable().equals(d)&&!b||b&&"true"==b.getAttribute("contenteditable"))}function k(a){return a.activeEnterMode!=CKEDITOR.ENTER_BR&&!1!==a.config.autoParagraph?a.activeEnterMode==CKEDITOR.ENTER_DIV? 358"div":"p":!1}function d(a){a&&a.isEmptyInlineRemoveable()&&a.remove()}function f(a){var b=a.editor;b.getSelection().scrollIntoView();setTimeout(function(){b.fire("saveSnapshot")},0)}function a(a,b,d){var c=a.getCommonAncestor(b);for(b=a=d?b:a;(a=a.getParent())&&!c.equals(a)&&1==a.getChildCount();)b=a;b.remove()}var n,t,x,p,r,q,z,u,A,w;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()}, 359proto:{focus:function(){var a;if(CKEDITOR.env.webkit&&!this.hasFocus&&(a=this.editor._.previousActive||this.getDocument().getActive(),this.contains(a))){a.focus();return}CKEDITOR.env.edge&&14<CKEDITOR.env.version&&!this.hasFocus&&this.getDocument().equals(CKEDITOR.document)&&(this.editor._.previousScrollTop=this.$.scrollTop);try{if(!CKEDITOR.env.ie||CKEDITOR.env.edge&&14<CKEDITOR.env.version||!this.getDocument().equals(CKEDITOR.document))if(CKEDITOR.env.chrome){var b=this.$.scrollTop;
vendor: 4,199 bytes, lines 359-368
359this.$.focus(); 360this.$.scrollTop=b}else this.$.focus();else this.$.setActive()}catch(d){if(!CKEDITOR.env.ie)throw d;}CKEDITOR.env.safari&&!this.isInline()&&(a=CKEDITOR.document.getActive(),a.equals(this.getWindow().getFrame())||this.getWindow().focus())},on:function(a,b){var d=Array.prototype.slice.call(arguments,0);CKEDITOR.env.ie&&/^focus|blur$/.exec(a)&&(a="focus"==a?"focusin":"focusout",b=h(b,this),d[0]=a,d[1]=b);return CKEDITOR.dom.element.prototype.on.apply(this,d)},attachListener:function(a){!this._.listeners&& 361(this._.listeners=[]);var b=Array.prototype.slice.call(arguments,1),b=a.on.apply(a,b);this._.listeners.push(b);return b},clearListeners:function(){var a=this._.listeners;try{for(;a.length;)a.pop().removeListener()}catch(b){}},restoreAttrs:function(){var a=this._.attrChanges,b,d;for(d in a)a.hasOwnProperty(d)&&(b=a[d],null!==b?this.setAttribute(d,b):this.removeAttribute(d))},attachClass:function(a){var b=this.getCustomData("classes");this.hasClass(a)||(!b&&(b=[]),b.push(a),this.setCustomData("classes", 362b),this.addClass(a))},changeAttr:function(a,b){var d=this.getAttribute(a);b!==d&&(!this._.attrChanges&&(this._.attrChanges={}),a in this._.attrChanges||(this._.attrChanges[a]=d),this.setAttribute(a,b))},insertText:function(a){this.editor.focus();this.insertHtml(this.transformPlainTextToHtml(a),"text")},transformPlainTextToHtml:function(a){var b=this.editor.getSelection().getStartElement().hasAscendant("pre",!0)?CKEDITOR.ENTER_BR:this.editor.activeEnterMode;return CKEDITOR.tools.transformPlainTextToHtml(a, 363b)},insertHtml:function(a,b,d){var c=this.editor;c.focus();c.fire("saveSnapshot");d||(d=c.getSelection().getRanges()[0]);q(this,b||"html",a,d);d.select();f(this);this.editor.fire("afterInsertHtml",{})},insertHtmlIntoRange:function(a,b,d){q(this,d||"html",a,b);this.editor.fire("afterInsertHtml",{intoRange:b})},insertElement:function(a,d){var c=this.editor;c.focus();c.fire("saveSnapshot");var e=c.activeEnterMode,c=c.getSelection(),h=a.getName(),h=CKEDITOR.dtd.$block[h];d||(d=c.getRanges()[0]);this.insertElementIntoRange(a, 364d)&&(d.moveToPosition(a,CKEDITOR.POSITION_AFTER_END),h&&((h=a.getNext(function(a){return b(a)&&!p(a)}))&&h.type==CKEDITOR.NODE_ELEMENT&&h.is(CKEDITOR.dtd.$block)?h.getDtd()["#"]?d.moveToElementEditStart(h):d.moveToElementEditEnd(a):h||e==CKEDITOR.ENTER_BR||(h=d.fixBlock(!0,e==CKEDITOR.ENTER_DIV?"div":"p"),d.moveToElementEditStart(h))));c.selectRanges([d]);f(this)},insertElementIntoSelection:function(a){this.insertElement(a)},insertElementIntoRange:function(a,b){var c=this.editor,f=c.config.enterMode, 365e=a.getName(),h=CKEDITOR.dtd.$block[e];if(b.checkReadOnly())return!1;b.deleteContents(1);b.startContainer.type==CKEDITOR.NODE_ELEMENT&&(b.startContainer.is({tr:1,table:1,tbody:1,thead:1,tfoot:1})?z(b):b.startContainer.is(CKEDITOR.dtd.$list)&&u(b));var g,n;if(h)for(;(g=b.getCommonAncestor(0,1))&&(n=CKEDITOR.dtd[g.getName()])&&(!n||!n[e]);)if(g.getName()in CKEDITOR.dtd.span){var h=b.splitElement(g),k=b.createBookmark();d(g);d(h);b.moveToBookmark(k)}else b.checkStartOfBlock()&&b.checkEndOfBlock()?(b.setStartBefore(g), 366b.collapse(!0),g.remove()):b.splitBlock(f==CKEDITOR.ENTER_DIV?"div":"p",c.editable());b.insertNode(a);return!0},setData:function(a,b){b||(a=this.editor.dataProcessor.toHtml(a));this.setHtml(a);this.fixInitialSelection();"unloaded"==this.status&&(this.status="ready");this.editor.fire("dataReady")},getData:function(a){var b=this.getHtml();a||(b=this.editor.dataProcessor.toDataFormat(b));return b},setReadOnly:function(a){this.setAttribute("contenteditable",!a)},detach:function(){this.status="detached"; 367this.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)},fixInitialSelection:function(){function a(){var b=d.getDocument().$,c=b.getSelection(),f;a:if(c.anchorNode&&c.anchorNode==d.$)f=!0;else{if(CKEDITOR.env.webkit&& 368(f=d.getDocument().getActive())&&f.equals(d)&&!c.anchorNode){f=!0;break a}f=void 0}
vendor: 5,161 bytes, lines 368-378
368f&&(f=new CKEDITOR.dom.range(d),f.moveToElementEditStart(d),b=b.createRange(),b.setStart(f.startContainer.$,f.startOffset),b.collapse(!0),c.removeAllRanges(),c.addRange(b))}function b(){var a=d.getDocument().$,c=a.selection,f=d.getDocument().getActive();"None"==c.type&&f.equals(d)&&(c=new CKEDITOR.dom.range(d),a=a.body.createTextRange(),c.moveToElementEditStart(d),c=c.startContainer,c.type!=CKEDITOR.NODE_ELEMENT&&(c= 369c.getParent()),a.moveToElementText(c.$),a.collapse(!0),a.select())}var d=this;if(CKEDITOR.env.ie&&(9>CKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};A.eol.detect(a,this);A.bogus.exclude(a);A.cell.shrink(a);a.fragment=a.range.cloneContents(); 370A.tree.rebuild(a,this);A.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=w,c={range:a,doc:a.document},f=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),f;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);d.table.detectPurge(c);c.bookmark=a.createBookmark();delete c.range;var e=this.editor.createRange();e.moveToPosition(c.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);c.targetBookmark=e.createBookmark();d.list.detectMerge(c,this); 371d.table.detectRanges(c,this);d.block.detectMerge(c,this);c.tableContentsRanges?(d.table.deleteRanges(c),a.moveToBookmark(c.bookmark),c.range=a):(a.moveToBookmark(c.bookmark),c.range=a,a.extractContents(d.detectExtractMerge(c)));a.moveToBookmark(c.targetBookmark);a.optimize();d.fixUneditableRangePosition(a);d.list.merge(c,this);d.table.purge(c,this);d.block.merge(c,this);if(b){d=a.startPath();if(c=a.checkStartOfBlock()&&a.checkEndOfBlock()&&d.block&&!a.root.equals(d.block)){a:{var c=d.block.getElementsByTag("span"), 372e=0,h;if(c)for(;h=c.getItem(e++);)if(!t(h)){c=!0;break a}c=!1}c=!c}c&&(a.moveToPosition(d.block,CKEDITOR.POSITION_BEFORE_START),d.block.remove())}else d.autoParagraph(this.editor,a),x(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return f},setup:function(){var d=this.editor;this.attachListener(d,"beforeGetData",function(){var a=this.getData();this.is("textarea")||!1!==d.config.ignoreEmptyParagraph&&(a=a.replace(r,function(a,b){return b}));d.setData(a,null,1)}, 373this);this.attachListener(d,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(d,"afterSetData",function(){this.setData(d.getData(1))},this);this.attachListener(d,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(d,"beforeFocus",function(){var a=d.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()},this);this.attachListener(d,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(d, 374"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(d,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(d.readOnly);this.attachClass("cke_editable");d.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):d.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&d.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+d.config.contentsLangDirection);d.keystrokeHandler.blockedKeystrokes[8]= 375+d.readOnly;d.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(){d._.previousScrollTop=d.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14<CKEDITOR.env.version){var c=function(){var a=d.editable();null!=d._.previousScrollTop&&a.getDocument().equals(CKEDITOR.document)&&(a.$.scrollTop=d._.previousScrollTop,d._.previousScrollTop=null,this.removeListener("scroll", 376c))};this.on("scroll",c)}d.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,d.once("contentDom",function(){d.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",d.tabIndex);if(!this.is("textarea")){d.document=this.getDocument();d.window=this.getWindow();var f=d.document;this.changeAttr("spellcheck",!d.config.disableNativeSpellChecker);var h=d.config.contentsLangDirection;this.getDirection(1)!=h&&this.changeAttr("dir",h);var g=CKEDITOR.getCss(); 377if(g){var h=f.getHead(),k=h.getCustomData("stylesheet");k?g!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText=g:k.setText(g)):(g=f.appendStyleText(g),g=new CKEDITOR.dom.element(g.ownerNode||g.owningElement),h.setCustomData("stylesheet",g),g.data("cke-temp",1))}h=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref",h+1);this.setCustomData("cke_includeReadonly",!d.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b= 378(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var l={8:1,46:1};
vendor: 36,411 bytes, lines 378-449
378this.attachListener(d,"key",function(a){if(d.readOnly)return!0;var b=a.data.domEvent.getKey(),c;a=d.getSelection();if(0!==a.getRanges().length){if(b in l){var f,e=a.getRanges()[0],h=e.startPath(),g,k,t,b=8==b;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(f=a.getSelectedElement())||(f=m(a))?(d.fire("saveSnapshot"),e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove(), 379e.select(),d.fire("saveSnapshot"),c=1):e.collapsed&&((g=h.block)&&(t=g[b?"getPrevious":"getNext"](n))&&t.type==CKEDITOR.NODE_ELEMENT&&t.is("table")&&e[b?"checkStartOfBlock":"checkEndOfBlock"]()?(d.fire("saveSnapshot"),e[b?"checkEndOfBlock":"checkStartOfBlock"]()&&g.remove(),e["moveToElementEdit"+(b?"End":"Start")](t),e.select(),d.fire("saveSnapshot"),c=1):h.blockLimit&&h.blockLimit.is("td")&&(k=h.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(k,b?CKEDITOR.START:CKEDITOR.END)&&(t=k[b? 380"getPrevious":"getNext"](n))?(d.fire("saveSnapshot"),e["moveToElementEdit"+(b?"End":"Start")](t),e.checkStartOfBlock()&&e.checkEndOfBlock()?t.remove():e.select(),d.fire("saveSnapshot"),c=1):(k=h.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(k,b?CKEDITOR.START:CKEDITOR.END)&&(c=1))}return!c}});d.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(a){a.data.getKeystroke()in l&&!this.getFirst(b)&&(this.appendBogus(),a=d.createRange(),a.moveToPosition(this, 381CKEDITOR.POSITION_AFTER_START),a.select())});this.attachListener(this,"dblclick",function(a){if(d.readOnly)return!1;a={element:a.data.getTarget()};d.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",e);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var b=a.data.getTarget();b.is("img","hr","input","textarea","select")&&!b.isReadOnly()&&(d.getSelection().selectElement(b),b.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&& 382this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&d.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(r,""))){var b=d.createRange();b.moveToElementEditStart(a);b.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}), 383this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(d,"key",function(b){if(d.readOnly)return!0;var c=b.data.domEvent.getKey();if(c in l&&(b=d.getSelection(),0!==b.getRanges().length)){var c=8==c,f=b.getRanges()[0];b=f.startPath();if(f.collapsed)a:{var e=b.block;if(e&&f[c?"checkStartOfBlock":"checkEndOfBlock"]()&&f.moveToClosestEditablePosition(e,!c)&&f.collapsed){if(f.startContainer.type==CKEDITOR.NODE_ELEMENT){var h= 384f.startContainer.getChild(f.startOffset-(c?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){d.fire("saveSnapshot");h.remove();b=!0;break a}}f=f.startPath().block;if(!f||f&&f.contains(e))b=void 0;else{d.fire("saveSnapshot");var g;(g=(c?f:e).getBogus())&&g.remove();g=d.getSelection();h=g.createBookmarks();(c?e:f).moveChildren(c?f:e,!1);b.lastElement.mergeSiblings();a(e,f,!c);g.selectBookmarks(h);b=!0}}else b=!1}else c=f,g=b.block,f=c.endPath().block,g&&f&&!g.equals(f)?(d.fire("saveSnapshot"), 385(e=g.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),f.getParent()&&(f.moveChildren(g,!1),b.lastElement.mergeSiblings(),a(g,f,!0)),c=d.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return;d.getSelection().scrollIntoView();d.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= 386this._&&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 d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable= 387function(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")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable", 388!1))});b.on("selectionChange",function(a){if(!b.readOnly){var d=b.getSelection();d&&!d.isLocked&&(d=b.checkDirty(),b.fire("lockSnapshot"),c(a),b.fire("unlockSnapshot"),!d&&b.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var d=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",d);d&&a.changeAttr("title",d);var c=b.fire("ariaEditorHelpLabel",{}).label;if(c&& 389(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var f=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+f+'" class\x3d"cke_voice_label"\x3e'+c+"\x3c/span\x3e");d.append(c);a.changeAttr("aria-describedby",f)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");n=CKEDITOR.dom.walker.whitespaces(!0);t=CKEDITOR.dom.walker.bookmark(!1,!0);x=CKEDITOR.dom.walker.empty(); 390p=CKEDITOR.dom.walker.bogus();r=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:<br[^>]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;q=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function c(b,d){var f,e,h,g,n=[],k=d.range.startContainer;f=d.range.startPath();for(var k=m[k.getName()],t=0,l=b.getChildren(),q=l.count(),E=-1,J=-1,u=0,p=f.contains(m.$list);t<q;++t)f=l.getItem(t),a(f)?(h=f.getName(),p&&h in CKEDITOR.dtd.$list?n=n.concat(c(f,d)):(g=!!k[h], 391"br"!=h||!f.data("cke-eol")||t&&t!=q-1||(u=(e=t?n[t-1].node:l.getItem(t+1))&&(!a(e)||!e.is("br")),e=e&&a(e)&&m.$block[e.getName()]),-1!=E||g||(E=t),g||(J=t),n.push({isElement:1,isLineBreak:u,isBlock:f.isBlockBoundary(),hasBlockSibling:e,node:f,name:h,allowed:g}),e=u=0)):n.push({isElement:0,node:f,allowed:1});-1<E&&(n[E].firstNotAllowed=1);-1<J&&(n[J].lastNotAllowed=1);return n}function f(b,d){var c=[],e=b.getChildren(),h=e.count(),g,n=0,k=m[d],t=!b.is(m.$inline)||b.is("br");for(t&&c.push(" ");n<h;n++)g= 392e.getItem(n),a(g)&&!g.is(k)?c=c.concat(f(g,d)):c.push(g);t&&c.push(" ");return c}function e(b){return a(b.startContainer)&&b.startContainer.getChild(b.startOffset-1)}function h(b){return b&&a(b)&&(b.is(m.$removeEmpty)||b.is("a")&&!b.isBlockBoundary())}function g(b,d,c,f){var e=b.clone(),h,n;e.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);(h=(new CKEDITOR.dom.walker(e)).next())&&a(h)&&t[h.getName()]&&(n=h.getPrevious())&&a(n)&&!n.getParent().equals(b.startContainer)&&c.contains(n)&&f.contains(h)&&h.isIdentical(n)&& 393(h.moveChildren(n),h.remove(),g(b,d,c,f))}function n(b,d){function c(b,d){if(d.isBlock&&d.isElement&&!d.node.is("br")&&a(b)&&b.is("br"))return b.remove(),1}var f=d.endContainer.getChild(d.endOffset),e=d.endContainer.getChild(d.endOffset-1);f&&c(f,b[b.length-1]);e&&c(e,b[0])&&(d.setEnd(d.endContainer,d.endOffset-1),d.collapse())}var m=CKEDITOR.dtd,t={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,li:1,pre:1,dl:1,blockquote:1},q={p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1},u=CKEDITOR.tools.extend({}, 394m.$inline);delete u.br;return function(t,y,M,N){var p=t.editor,x=!1;"unfiltered_html"==y&&(y="html",x=!0);if(!N.checkReadOnly()){var r=(new CKEDITOR.dom.elementPath(N.startContainer,N.root)).blockLimit||N.root;y={type:y,dontFilter:x,editable:t,editor:p,range:N,blockLimit:r,mergeCandidates:[],zombies:[]};var x=y.range,r=y.mergeCandidates,D="html"===y.type,w,z,A,Z,aa,U;"text"==y.type&&x.shrink(CKEDITOR.SHRINK_ELEMENT,!0,!1)&&(z=CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e", 395x.document),x.insertNode(z),x.setStartAfter(z));A=new CKEDITOR.dom.elementPath(x.startContainer);y.endPath=Z=new CKEDITOR.dom.elementPath(x.endContainer);if(!x.collapsed){w=Z.block||Z.blockLimit;var ca=x.getCommonAncestor();w&&!w.equals(ca)&&!w.contains(ca)&&x.checkEndOfBlock()&&y.zombies.push(w);x.deleteContents()}for(;(aa=e(x))&&a(aa)&&aa.isBlockBoundary()&&A.contains(aa);)x.moveToPosition(aa,CKEDITOR.POSITION_BEFORE_END);g(x,y.blockLimit,A,Z);z&&(x.setEndBefore(z),x.collapse(),z.remove());z=x.startPath(); 396if(w=z.contains(h,!1,1))U=x.splitElement(w),y.inlineStylesRoot=w,y.inlineStylesPeak=z.lastElement;z=x.createBookmark();D&&(d(w),d(U));(w=z.startNode.getPrevious(b))&&a(w)&&h(w)&&r.push(w);(w=z.startNode.getNext(b))&&a(w)&&h(w)&&r.push(w);for(w=z.startNode;(w=w.getParent())&&h(w);)r.push(w);x.moveToBookmark(z);p.enterMode===CKEDITOR.ENTER_DIV&&""===p.getData(!0)&&((p=t.getFirst())&&p.remove(),N.setStartAt(t,CKEDITOR.POSITION_AFTER_START),N.collapse(!0));if(t=M){t=y.range;if("text"==y.type&&y.inlineStylesRoot){N= 397y.inlineStylesPeak;p=N.getDocument().createText("{cke-peak}");for(U=y.inlineStylesRoot.getParent();!N.equals(U);)p=p.appendTo(N.clone()),N=N.getParent();M=p.getOuterHtml().split("{cke-peak}").join(M)}N=y.blockLimit.getName();if(/^\s+|\s+$/.test(M)&&"span"in CKEDITOR.dtd[N]){var W='\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e';M=W+M+W}M=y.editor.dataProcessor.toHtml(M,{context:null,fixForBody:!1,protectedWhitespaces:!!W,dontFilter:y.dontFilter,filter:y.editor.activeFilter,enterMode:y.editor.activeEnterMode}); 398N=t.document.createElement("body");N.setHtml(M);W&&(N.getFirst().remove(),N.getLast().remove());if((W=t.startPath().block)&&(1!=W.getChildCount()||!W.getBogus()))a:{var Q;if(1==N.getChildCount()&&a(Q=N.getFirst())&&Q.is(q)&&!Q.hasAttribute("contenteditable")){W=Q.getElementsByTag("*");t=0;for(U=W.count();t<U;t++)if(p=W.getItem(t),!p.is(u))break a;Q.moveChildren(Q.getParent(1));Q.remove()}}y.dataWrapper=N;t=M}if(t){Q=y.range;t=Q.document;N=y.blockLimit;U=0;var R,W=[],K,T;M=z=0;var Y,p=Q.startContainer; 399aa=y.endPath.elements[0];var ba,x=aa.getPosition(p),r=!!aa.getCommonAncestor(p)&&x!=CKEDITOR.POSITION_IDENTICAL&&!(x&CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED),p=c(y.dataWrapper,y);for(n(p,Q);U<p.length;U++){x=p[U];if(D=x.isLineBreak)D=Q,w=N,Z=A=void 0,x.hasBlockSibling?D=1:(A=D.startContainer.getAscendant(m.$block,1))&&A.is({div:1,p:1})?(Z=A.getPosition(w),Z==CKEDITOR.POSITION_IDENTICAL||Z==CKEDITOR.POSITION_CONTAINS?D=0:(w=D.splitElement(A),D.moveToPosition(w,CKEDITOR.POSITION_AFTER_START), 400D=1)):D=0;if(D)M=0<U;else{D=Q.startPath();!x.isBlock&&l(y.editor,D.block,D.blockLimit)&&(T=k(y.editor))&&(T=t.createElement(T),T.appendBogus(),Q.insertNode(T),CKEDITOR.env.needsBrFiller&&(R=T.getBogus())&&R.remove(),Q.moveToPosition(T,CKEDITOR.POSITION_BEFORE_END));if((D=Q.startPath().block)&&!D.equals(K)){if(R=D.getBogus())R.remove(),W.push(D);K=D}x.firstNotAllowed&&(z=1);if(z&&x.isElement){D=Q.startContainer;for(w=null;D&&!m[D.getName()][x.name];){if(D.equals(N)){D=null;break}w=D;D=D.getParent()}if(D)w&& 401(Y=Q.splitElement(w),y.zombies.push(Y),y.zombies.push(w));else{w=N.getName();ba=!U;D=U==p.length-1;w=f(x.node,w);A=[];Z=w.length;for(var ca=0,ea=void 0,ia=0,ja=-1;ca<Z;ca++)ea=w[ca]," "==ea?(ia||ba&&!ca||(A.push(new CKEDITOR.dom.text(" ")),ja=A.length),ia=1):(A.push(ea),ia=0);D&&ja==A.length&&A.pop();ba=A}}if(ba){for(;D=ba.pop();)Q.insertNode(D);ba=0}else Q.insertNode(x.node);x.lastNotAllowed&&U<p.length-1&&((Y=r?aa:Y)&&Q.setEndAt(Y,CKEDITOR.POSITION_AFTER_START),z=0);Q.collapse()}}1!=p.length?R= 402!1:(R=p[0],R=R.isElement&&"false"==R.node.getAttribute("contenteditable"));R&&(M=!0,D=p[0].node,Q.setStartAt(D,CKEDITOR.POSITION_BEFORE_START),Q.setEndAt(D,CKEDITOR.POSITION_AFTER_END));y.dontMoveCaret=M;y.bogusNeededBlocks=W}R=y.range;var fa;Y=y.bogusNeededBlocks;for(ba=R.createBookmark();K=y.zombies.pop();)K.getParent()&&(T=R.clone(),T.moveToElementEditStart(K),T.removeEmptyBlocksAtEnd());if(Y)for(;K=Y.pop();)CKEDITOR.env.needsBrFiller?K.appendBogus():K.append(R.document.createText("Â "));for(;K= 403y.mergeCandidates.pop();)K.mergeSiblings();R.moveToBookmark(ba);if(!y.dontMoveCaret){for(K=e(R);K&&a(K)&&!K.is(m.$empty);){if(K.isBlockBoundary())R.moveToPosition(K,CKEDITOR.POSITION_BEFORE_END);else{if(h(K)&&K.getHtml().match(/(\s| )$/g)){fa=null;break}fa=R.clone();fa.moveToPosition(K,CKEDITOR.POSITION_BEFORE_END)}K=K.getLast(b)}fa&&R.moveToRange(fa)}}}}();z=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)}; 404b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT};return b}function b(a,d,c){d=a.getDocument().createElement(d);a.append(d,c);return d}function d(a){var b=a.count(),c;for(b;0<b--;)c=a.getItem(b),CKEDITOR.tools.trim(c.getHtml())||(c.appendBogus(),CKEDITOR.env.ie&&9>CKEDITOR.env.version&&c.getChildCount()&&c.getFirst().remove())}return function(c){var f=c.startContainer,e=f.getAscendant("table",1),h=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=c.clone();e.setStart(f,0);e= 405a(e).lastBackward();e||(e=c.clone(),e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),h=!0);e||(e=f);e.is("table")?(c.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=b(e,"tr",h)),e.is("tr")&&(e=b(e,e.getParent().is("thead")?"th":"td",h)),(f=e.getBogus())&&f.remove(),c.moveToPosition(e,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();u=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a, 406b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var d=b.startContainer,c=!1,f;f=b.clone();f.setStart(d,0);f=a(f).lastBackward();f||(f=b.clone(),f.setEndAt(d,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),c=!0);f||(f=d);f.is(CKEDITOR.dtd.$list)?(b.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),f.remove()): 407((d=f.getBogus())&&d.remove(),b.moveToPosition(f,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();A={eol:{detect:function(a,b){var d=a.range,c=d.clone(),f=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,b),h=new CKEDITOR.dom.elementPath(d.endContainer,b);c.collapse(1);f.collapse();e.block&&c.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(d.setStartAfter(e.block),a.prependEolBr=1);h.block&&f.checkBoundaryOfElement(h.block,CKEDITOR.START)&&(d.setEndBefore(h.block), 408a.appendEolBr=1)},fix:function(a,b){var d=b.getDocument(),c;a.appendEolBr&&(c=this.createEolBr(d),a.fragment.append(c));!a.prependEolBr||c&&!c.getPrevious()||a.fragment.append(this.createEolBr(d),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode;!b||!p(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),f=new CKEDITOR.dom.elementPath(c, 409b),e=new CKEDITOR.dom.elementPath(d.startContainer,b),d=new CKEDITOR.dom.elementPath(d.endContainer,b),h;c.type==CKEDITOR.NODE_TEXT&&(c=c.getParent());if(f.blockLimit.is({tr:1,table:1})){var g=f.contains("table").getParent();h=function(a){return!a.equals(g)}}else if(f.block&&f.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!e.equals(d))){var n=f.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(n)}}h||(h=function(a){return!a.equals(f.block)&& 410!a.equals(f.blockLimit)});this.rebuildFragment(a,b,c,h)},rebuildFragment:function(a,b,d,c){for(var f;d&&!d.equals(b)&&c(d);)f=d.clone(0,1),a.fragment.appendTo(f),a.fragment=f,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer,c=a.startOffset,f=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c==f&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};w=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)} 411function b(d,c,f){a(c);a(f,1);for(var e;e=f.getNext();)e.insertAfter(c),c=e;x(d)&&d.remove()}function d(a,b){var c=new CKEDITOR.dom.range(a);c.setStartAfter(b.startNode);c.setEndBefore(b.endNode);return c}return{list:{detectMerge:function(a,b){var c=d(b,a.bookmark),f=c.startPath(),e=c.endPath(),h=f.contains(CKEDITOR.dtd.$list),g=e.contains(CKEDITOR.dtd.$list);a.mergeList=h&&g&&h.getParent().equals(g.getParent())&&!h.equals(g);a.mergeListItems=f.block&&e.block&&f.block.is(CKEDITOR.dtd.$listItem)&& 412e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)c=c.clone(),c.setStartBefore(a.bookmark.startNode),c.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=c.createBookmark()},merge:function(a,d){if(a.mergeListBookmark){var c=a.mergeListBookmark.startNode,f=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(f,d);if(a.mergeList){var g=e.contains(CKEDITOR.dtd.$list),n=h.contains(CKEDITOR.dtd.$list);g.equals(n)||(n.moveChildren(g),n.remove())}a.mergeListItems&& 413(e=e.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$listItem),e.equals(h)||b(h,c,f));c.remove();f.remove()}}},block:{detectMerge:function(a,b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var d=new CKEDITOR.dom.range(b);d.setStartBefore(a.bookmark.startNode);d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var c=a.mergeBlockBookmark.startNode,f=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(c, 414d),h=new CKEDITOR.dom.elementPath(f,d),e=e.block,h=h.block;e&&h&&!e.equals(h)&&b(h,c,f);c.remove();f.remove()}}},table:function(){function a(d){var f=[],e,h=new CKEDITOR.dom.walker(d),g=d.startPath().contains(c),n=d.endPath().contains(c),y={};h.guard=function(a,h){if(a.type==CKEDITOR.NODE_ELEMENT){var k="visited_"+(h?"out":"in");if(a.getCustomData(k))return;CKEDITOR.dom.element.setMarker(y,a,k,1)}if(h&&g&&a.equals(g))e=d.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),f.push(e);else if(!h&&n&& 415a.equals(n))e=d.clone(),e.setStartAt(n,CKEDITOR.POSITION_AFTER_START),f.push(e);else{if(k=!h)k=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!g||b(a,g))&&(!n||b(a,n));if(!k&&(k=h))if(a.is(c))var k=g&&g.getAscendant("table",!0),m=n&&n.getAscendant("table",!0),t=a.getAscendant("table",!0),k=k&&k.contains(t)||m&&m.contains(t);else k=void 0;k&&(e=d.clone(),e.selectNodeContents(a),f.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(y);return f}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+ 416CKEDITOR.POSITION_IS_CONTAINED,f=a.getPosition(d);return f===CKEDITOR.POSITION_IDENTICAL?!1:0===(f&c)}var c={td:1,th:1,caption:1};return{detectPurge:function(a){var b=a.range,d=b.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),f=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++f};d.checkForward();if(1<f){var d=b.startPath().contains("table"),e=b.endPath().contains("table");d&&e&&b.checkBoundaryOfElement(d,CKEDITOR.START)&&b.checkBoundaryOfElement(e, 417CKEDITOR.END)&&(b=a.range.clone(),b.setStartBefore(d),b.setEndAfter(e),a.purgeTableBookmark=b.createBookmark())}},detectRanges:function(f,e){var h=d(e,f.bookmark),g=h.clone(),n,k,y=h.getCommonAncestor();y.is(CKEDITOR.dtd.$tableContent)&&!y.is(c)&&(y=y.getAscendant("table",!0));k=y;y=new CKEDITOR.dom.elementPath(h.startContainer,k);k=new CKEDITOR.dom.elementPath(h.endContainer,k);y=y.contains("table");k=k.contains("table");if(y||k)y&&k&&b(y,k)?(f.tableSurroundingRange=g,g.setStartAt(y,CKEDITOR.POSITION_AFTER_END), 418g.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),g=h.clone(),g.setEndAt(y,CKEDITOR.POSITION_AFTER_END),n=h.clone(),n.setStartAt(k,CKEDITOR.POSITION_BEFORE_START),n=a(g).concat(a(n))):y?k||(f.tableSurroundingRange=g,g.setStartAt(y,CKEDITOR.POSITION_AFTER_END),h.setEndAt(y,CKEDITOR.POSITION_AFTER_END)):(f.tableSurroundingRange=g,g.setEndAt(k,CKEDITOR.POSITION_BEFORE_START),h.setStartAt(k,CKEDITOR.POSITION_AFTER_START)),f.tableContentsRanges=n?n:a(h)},deleteRanges:function(a){for(var b;b=a.tableContentsRanges.pop();)b.extractContents(), 419x(b.startContainer)&&b.startContainer.appendBogus();a.tableSurroundingRange&&a.tableSurroundingRange.extractContents()},purge:function(a){if(a.purgeTableBookmark){var b=a.doc,d=a.range.clone(),b=b.createElement("p");b.insertBefore(a.purgeTableBookmark.startNode);d.moveToBookmark(a.purgeTableBookmark);d.deleteContents();a.range.moveToPosition(b,CKEDITOR.POSITION_AFTER_START)}}}}(),detectExtractMerge:function(a){return!(a.range.startPath().contains(CKEDITOR.dtd.$listItem)&&a.range.endPath().contains(CKEDITOR.dtd.$listItem))}, 420fixUneditableRangePosition:function(a){a.startContainer.getDtd()["#"]||a.moveToClosestEditablePosition(null,!0)},autoParagraph:function(a,b){var d=b.startPath(),c;l(a,d.block,d.blockLimit)&&(c=k(a))&&(c=b.document.createElement(c),c.appendBogus(),b.insertNode(c),b.moveToPosition(c,CKEDITOR.POSITION_AFTER_START))}}}()})();(function(){function c(a){return CKEDITOR.plugins.widget&&CKEDITOR.plugins.widget.isDomWidget(a)}function g(a,b){if(0===a.length||c(a[0].getEnclosedNode()))return!1;var d,f;if((d= 421!b&&1===a.length)&&!(d=a[0].collapsed)){var e=a[0];d=e.startContainer.getAscendant({td:1,th:1},!0);var h=e.endContainer.getAscendant({td:1,th:1},!0);f=CKEDITOR.tools.trim;d&&d.equals(h)&&!d.findOne("td, th, tr, tbody, table")?(e=e.cloneContents(),d=e.getFirst()?f(e.getFirst().getText())!==f(d.getText()):!0):d=!1}if(d)return!1;for(f=0;f<a.length;f++)if(d=a[f]._getTableElement(),!d)return!1;return!0}function e(a){function b(a){a=a.find("td, th");var d=[],c;for(c=0;c<a.count();c++)d.push(a.getItem(c)); 422return d}var d=[],c,f;for(f=0;f<a.length;f++)c=a[f]._getTableElement(),c.is&&c.is({td:1,th:1})?d.push(c):d=d.concat(b(c));return d}function b(a){a=e(a);var b="",d=[],c,f;for(f=0;f<a.length;f++)c&&!c.equals(a[f].getAscendant("tr"))?(b+=d.join("\t")+"\n",c=a[f].getAscendant("tr"),d=[]):0===f&&(c=a[f].getAscendant("tr")),d.push(a[f].getText());return b+=d.join("\t")}function h(a){var d=this.root.editor,c=d.getSelection(1);this.reset();w=!0;c.root.once("selectionchange",function(a){a.cancel()},null,null, 4230);c.selectRanges([a[0]]);c=this._.cache;c.ranges=new CKEDITOR.dom.rangeList(a);c.type=CKEDITOR.SELECTION_TEXT;c.selectedElement=a[0]._getTableElement();c.selectedText=b(a);c.nativeSel=null;this.isFake=1;this.rev=z++;d._.fakeSelection=this;w=!1;this.root.fire("selectionchange")}function m(){var a=this._.fakeSelection,b;if(a){b=this.getSelection(1);var d;if(!(d=!b)&&(d=!b.isHidden())){d=a;var f=b.getRanges(),e=d.getRanges(),h=f.length&&f[0]._getTableElement()&&f[0]._getTableElement().getAscendant("table", 424!0),n=e.length&&e[0]._getTableElement()&&e[0]._getTableElement().getAscendant("table",!0),y=1===f.length&&f[0]._getTableElement()&&f[0]._getTableElement().is("table"),k=1===e.length&&e[0]._getTableElement()&&e[0]._getTableElement().is("table");if(c(d.getSelectedElement()))d=!1;else{var m=1===f.length&&f[0].collapsed,e=g(f,!!CKEDITOR.env.webkit)&&g(e);h=h&&n?h.equals(n)||n.contains(h):!1;h&&(m||e)?(y&&!k&&d.selectRanges(f),d=!0):d=!1}d=!d}d&&(a.reset(),a=0)}if(!a&&(a=b||this.getSelection(1),!a||a.getType()== 425CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(d=this._.selectionPreviousPath&&this._.selectionPreviousPath.blockLimit.equals(b.blockLimit),!CKEDITOR.env.webkit&&!CKEDITOR.env.gecko||d||(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:a,path:b}))}function l(){F=!0;v||(k.call(this),v=CKEDITOR.tools.setTimeout(k,200,this))}function k(){v=null;F&&(CKEDITOR.tools.setTimeout(m, 4260,this),F=!1)}function d(a){return B(a)||a.type==CKEDITOR.NODE_ELEMENT&&!a.is(CKEDITOR.dtd.$empty)?!0:!1}function f(a){function b(d,c){return d&&d.type!=CKEDITOR.NODE_TEXT?a.clone()["moveToElementEdit"+(c?"End":"Start")](d):!1}if(!(a.root instanceof CKEDITOR.editable))return!1;var c=a.startContainer,f=a.getPreviousNode(d,null,c),e=a.getNextNode(d,null,c);return b(f)||b(e,1)||!(f||e||c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()&&c.getBogus())?!0:!1}function a(a){n(a,!1);var b=a.getDocument().createText(u); 427a.setCustomData("cke-fillingChar",b);return b}function n(a,b){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==b){var c=a.getDocument().getSelection().getNative(),f=c&&"None"!=c.type&&c.getRangeAt(0),e=u.length;if(d.getLength()>e&&f&&f.intersectsNode(d.$)){var h=[{node:c.anchorNode,offset:c.anchorOffset},{node:c.focusNode,offset:c.focusOffset}];c.anchorNode==d.$&&c.anchorOffset>e&&(h[0].offset-=e);c.focusNode==d.$&&c.focusOffset>e&&(h[1].offset-=e)}}d.setText(t(d.getText(),1));h&&(d=a.getDocument().$, 428c=d.getSelection(),d=d.createRange(),d.setStart(h[0].node,h[0].offset),d.collapse(!0),c.removeAllRanges(),c.addRange(d),c.extend(h[1].node,h[1].offset))}}function t(a,b){return b?a.replace(A,function(a,b){return b?"Â ":""}):a.replace(u,"")}function x(a,b){var d=b&&CKEDITOR.tools.htmlEncode(b)||"\x26nbsp;",d=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+ 429'"\x3e'+d+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(d);var c=a.getSelection(1),f=a.createRange(),e=c.root.on("selectionchange",function(a){a.cancel()},null,null,0);f.setStartAt(d,CKEDITOR.POSITION_AFTER_START);f.setEndAt(d,CKEDITOR.POSITION_BEFORE_END);c.selectRanges([f]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=d}function p(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var f=a.getSelection().getRanges(), 430e=f[0];1==f.length&&e.collapsed&&(c=e[38>c?"getPreviousEditableNode":"getNextEditableNode"]())&&c.type==CKEDITOR.NODE_ELEMENT&&"false"==c.getAttribute("contenteditable")&&(a.getSelection().fake(c),d.data.preventDefault(),d.cancel())}}}function r(a){for(var b=0;b<a.length;b++){var d=a[b];d.getCommonAncestor().isReadOnly()&&a.splice(b,1);if(!d.collapsed){if(d.startContainer.isReadOnly())for(var c=d.startContainer,f;c&&!((f=c.type==CKEDITOR.NODE_ELEMENT)&&c.is("body")||!c.isReadOnly());)f&&"false"== 431c.getAttribute("contentEditable")&&d.setStartAfter(c),c=c.getParent();c=d.startContainer;f=d.endContainer;var e=d.startOffset,h=d.endOffset,g=d.clone();c&&c.type==CKEDITOR.NODE_TEXT&&(e>=c.getLength()?g.setStartAfter(c):g.setStartBefore(c));f&&f.type==CKEDITOR.NODE_TEXT&&(h?g.setEndAfter(f):g.setEndBefore(f));c=new CKEDITOR.dom.walker(g);c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var f=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);c.getPosition(g.endContainer)& 432CKEDITOR.POSITION_CONTAINS||(f.setStartAfter(c),f.collapsed||a.splice(b+1,0,f));return!0}return!1};c.next()}}return a}var q="function"!=typeof window.getSelection,z=1,u=CKEDITOR.tools.repeat("â",7),A=new RegExp(u+"( )?","g"),w,v,F,B=CKEDITOR.dom.walker.invisible(1),C=function(){function a(b){return function(a){var d=a.editor.createRange();d.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([d]);return!1}}function b(a){return function(b){var d=b.editor,c=d.createRange(), 433f;if(!d.readOnly)return(f=c.moveToClosestEditablePosition(b.selected,a))||(f=c.moveToClosestEditablePosition(b.selected,!a)),f&&d.getSelection().selectRanges([c]),d.fire("saveSnapshot"),b.selected.remove(),f||(c.moveToElementEditablePosition(d.editable()),d.getSelection().selectRanges([c])),d.fire("saveSnapshot"),!1}}var d=a(),c=a(1);return{37:d,38:d,39:c,40:c,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a=d.getSelection();a&&a.removeAllRanges()}var d=a.editor;d.on("contentDom", 434function(){function a(){x=new CKEDITOR.dom.selection(d.getSelection());x.lock()}function b(){e.removeListener("mouseup",b);k.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,d=a.createRange();"None"!=a.type&&d.parentElement()&&d.parentElement().ownerDocument==f.$&&d.select()}function c(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")},!0))&&"false"===a.getAttribute("contenteditable")? 435a:null:null}var f=d.document,e=CKEDITOR.document,h=d.editable(),g=f.getBody(),k=f.getDocumentElement(),t=h.isInline(),u,x;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==u&&(a=d.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$&&(a=d.createRange(),a.moveToElementEditStart(h),a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(u&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){u=d._.previousActive&& 436d._.previousActive.equals(f.getActive());var a=null!=d._.previousScrollTop&&d._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&u&&a&&(h.$.scrollTop=d._.previousScrollTop)}d.unlockSelection(u);u=0},null,null,-1);h.attachListener(h,"mousedown",function(){u=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||t)q?h.attachListener(h,"beforedeactivate",a,null,null,-1):h.attachListener(d,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusout":"blur",function(){var a= 437x&&(x.isFake||2>x.getRanges().length);CKEDITOR.env.gecko&&!t&&a||(d.lockSelection(x),u=1)},null,null,-1),h.attachListener(h,"mousedown",function(){u=0});if(CKEDITOR.env.ie&&!t){var w;h.attachListener(h,"mousedown",function(a){2==a.data.$.button&&((a=d.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(w=d.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&w&&(d.document.$.documentElement.scrollLeft=w.x,d.document.$.documentElement.scrollTop=w.y); 438w=null});if("BackCompat"!=f.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var r,z;k.on("mousedown",function(a){function b(a){a=a.data.$;if(r){var d=g.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(c){}r.setEndPoint(0>z.compareEndPoints("StartToStart",d)?"EndToEnd":"StartToStart",d);r.select()}}function d(){k.removeListener("mousemove",b);e.removeListener("mouseup",d);k.removeListener("mouseup",d);r.select()}a=a.data;if(a.getTarget().is("html")&&a.$.y<k.$.clientHeight&& 439a.$.x<k.$.clientWidth){r=g.$.createTextRange();try{r.moveToPoint(a.$.clientX,a.$.clientY)}catch(c){}z=r.duplicate();k.on("mousemove",b);e.on("mouseup",d);k.on("mouseup",d)}})}if(7<CKEDITOR.env.version&&11>CKEDITOR.env.version)k.on("mousedown",function(a){a.data.getTarget().is("html")&&(e.on("mouseup",b),k.on("mouseup",b))})}}h.attachListener(h,"selectionchange",m,d);h.attachListener(h,"keyup",l,d);h.attachListener(h,"touchstart",l,d);h.attachListener(h,"touchend",l,d);CKEDITOR.env.ie&&h.attachListener(h, 440"keydown",function(a){var b=this.getSelection(1),d=c(b);d&&!d.equals(h)&&(b.selectElement(d),a.data.preventDefault())},d);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){d.forceNextSelectionCheck();d.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var v;h.attachListener(h,"mousedown",function(){v=1});h.attachListener(f.getDocumentElement(),"mouseup",function(){v&&l.call(d);v=0})}else h.attachListener(CKEDITOR.env.ie?h:f.getDocumentElement(), 441"mouseup",l,d);CKEDITOR.env.webkit&&h.attachListener(f,"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:h.hasFocus&&n(h)}},null,null,-1);h.attachListener(h,"keydown",p(d),null,null,-1)});d.on("setData",function(){d.unlockSelection();CKEDITOR.env.webkit&&b()});d.on("contentDomUnload",function(){d.unlockSelection()});if(CKEDITOR.env.ie9Compat)d.on("beforeDestroy",b,null,null,9);d.on("dataReady",function(){delete d._.fakeSelection; 442delete d._.hiddenSelectionContainer;d.selectionChange(1)});d.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=d.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=d.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);d.on("key",function(a){if("wysiwyg"==d.mode){var b=d.getSelection();if(b.isFake){var c=C[a.data.keyCode];if(c)return c({editor:d,selected:b.getSelectedElement(), 443selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):d.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){n(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=t(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=t(a.data.dataValue)}, 444null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:l).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection= 445function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE= 4461;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var d=a instanceof CKEDITOR.dom.element;this.rev=b?b.rev:z++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=d?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var c,f;if(a)if(a.getRangeAt)c= 447(f=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(f.commonAncestorContainer);else{try{f=a.createRange()}catch(e){}c=f&&CKEDITOR.dom.element.get(f.item&&f.item(0)||f.parentElement())}if(!c||c.type!=CKEDITOR.NODE_ELEMENT&&c.type!=CKEDITOR.NODE_TEXT||!this.root.equals(c)&&!this.root.contains(c))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var H= 448{img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:t,_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:u});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q? 449function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var d=this.getNative(),c=d.type;"Text"==c&&(b=CKEDITOR.SELECTION_TEXT);
vendor: 4,257 bytes, lines 449-457
449"Control"==c&&(b=CKEDITOR.SELECTION_ELEMENT);d.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,d=this.getNative();if(!d||!d.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==d.rangeCount){var d=d.getRangeAt(0),c=d.startContainer; 450c==d.endContainer&&1==c.nodeType&&1==d.endOffset-d.startOffset&&H[c.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=q?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()}var b=function(b,d){b=b.duplicate();b.collapse(d);var c=b.parentElement();if(!c.hasChildNodes())return{container:c,offset:0};for(var f=c.children,e,h,g=b.duplicate(),n=0,k=f.length-1,m=-1,t,l;n<=k;)if(m=Math.floor((n+k)/2),e=f[m],g.moveToElementText(e), 451t=g.compareEndPoints("StartToStart",b),0<t)k=m-1;else if(0>t)n=m+1;else return{container:c,offset:a(e)};if(-1==m||m==f.length-1&&0>t){g.moveToElementText(c);g.setEndPoint("StartToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;f=c.childNodes;if(!g)return e=f[f.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:f.length}:{container:e,offset:e.nodeValue.length};for(c=f.length;0<g&&0<c;)h=f[--c],h.nodeType==CKEDITOR.NODE_TEXT&&(l=h,g-=h.nodeValue.length);return{container:l,offset:-g}}g.collapse(0< 452t?!0:!1);g.setEndPoint(0<t?"StartToStart":"EndToStart",b);g=g.text.replace(/(\r\n|\r)/g,"\n").length;if(!g)return{container:c,offset:a(e)+(0<t?0:1)};for(;0<g;)try{h=e[0<t?"previousSibling":"nextSibling"],h.nodeType==CKEDITOR.NODE_TEXT&&(g-=h.nodeValue.length,l=h),e=h}catch(q){return{container:c,offset:a(e)}}return{container:l,offset:0<t?-g:l.nodeValue.length+g}};return function(){var a=this.getNative(),d=a&&a.createRange(),c=this.getType();if(!a)return[];if(c==CKEDITOR.SELECTION_TEXT)return a=new CKEDITOR.dom.range(this.root), 453c=b(d,!0),a.setStart(new CKEDITOR.dom.node(c.container),c.offset),c=b(d),a.setEnd(new CKEDITOR.dom.node(c.container),c.offset),a.endContainer.getPosition(a.startContainer)&CKEDITOR.POSITION_PRECEDING&&a.endOffset<=a.startContainer.getIndex()&&a.collapse(),[a];if(c==CKEDITOR.SELECTION_ELEMENT){for(var c=[],f=0;f<d.length;f++){for(var e=d.item(f),h=e.parentNode,g=0,a=new CKEDITOR.dom.range(this.root);g<h.childNodes.length&&h.childNodes[g]!=e;g++);a.setStart(new CKEDITOR.dom.node(h),g);a.setEnd(new CKEDITOR.dom.node(h), 454g+1);c.push(a)}return c}return[]}}():function(){var a=[],b,d=this.getNative();if(!d)return a;for(var c=0;c<d.rangeCount;c++){var f=d.getRangeAt(c);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 d=this._.cache,c=d.ranges;c||(d.ranges=c=new CKEDITOR.dom.rangeList(a.call(this)));return b?r(new CKEDITOR.dom.rangeList(c.slice())):c}}(),getStartElement:function(){var a= 455this._.cache;if(void 0!==a.startElement)return a.startElement;var b;switch(this.getType()){case CKEDITOR.SELECTION_ELEMENT:return this.getSelectedElement();case CKEDITOR.SELECTION_TEXT:var d=this.getRanges()[0];if(d){if(d.collapsed)b=d.startContainer,b.type!=CKEDITOR.NODE_ELEMENT&&(b=b.getParent());else{for(d.optimize();b=d.startContainer,d.startOffset==(b.getChildCount?b.getChildCount():b.getLength())&&!b.isBlockBoundary();)d.setStartAfter(b);b=d.startContainer;if(b.type!=CKEDITOR.NODE_ELEMENT)return b.getParent(); 456if((b=b.getChild(d.startOffset))&&b.type==CKEDITOR.NODE_ELEMENT)for(d=b.getFirst();d&&d.type==CKEDITOR.NODE_ELEMENT;)b=d,d=d.getFirst();else b=d.startContainer}b=b.$}}return a.startElement=b?new CKEDITOR.dom.element(b):null},getSelectedElement:function(){var a=this._.cache;if(void 0!==a.selectedElement)return a.selectedElement;var b=this,d=CKEDITOR.tools.tryThese(function(){return b.getNative().createRange().item(0)},function(){for(var a=b.getRanges()[0].clone(),d,c,f=2;f&&!((d=a.getEnclosedNode())&& 457d.type==CKEDITOR.NODE_ELEMENT&&H[d.getName()]&&(c=d));f--)a.shrink(CKEDITOR.SHRINK_ELEMENT);return c&&c.$});return a.selectedElement=d?new CKEDITOR.dom.element(d):null},getSelectedText:function(){var a=this._.cache;if(void 0!==a.selectedText)return a.selectedText;
vendor: 10,444 bytes, lines 457-477
457var b=this.getNative(),b=q?"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; 458this.isLocked=1},unlock:function(a){if(this.isLocked){if(a)var b=this.getSelectedElement(),d=this.getRanges(),c=this.isFake;this.isLocked=0;this.reset();a&&(a=b||d[0]&&d[0].getCommonAncestor())&&a.getAscendant("body",1)&&(this.root.editor.plugins.tableselection&&g(d)?h.call(this,d):c?this.fake(b):b&&2>d.length?this.selectElement(b):this.selectRanges(d))}},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; 459var b=a._.hiddenSelectionContainer;if(b){var d=a.checkDirty();a.fire("lockSnapshot");b.remove();a.fire("unlockSnapshot");!d&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=z++},selectElement:function(a){var b=new CKEDITOR.dom.range(this.root);b.setStartBefore(a);b.setEndAfter(a);this.selectRanges([b])},selectRanges:function(b){var d=this.root.editor,c=d&&d._.hiddenSelectionContainer;this.reset();if(c)for(var c=this.root,e,k=0;k<b.length;++k)e= 460b[k],e.endContainer.equals(c)&&(e.endOffset=Math.min(e.endOffset,c.getChildCount()));if(b.length)if(this.isLocked){var m=CKEDITOR.document.getActive();this.unlock();this.selectRanges(b);this.lock();m&&!m.equals(this.root)&&m.focus()}else{var t;a:{var y,l;if(1==b.length&&!(l=b[0]).collapsed&&(t=l.getEnclosedNode())&&t.type==CKEDITOR.NODE_ELEMENT&&(l=l.clone(),l.shrink(CKEDITOR.SHRINK_ELEMENT,!0),(y=l.getEnclosedNode())&&y.type==CKEDITOR.NODE_ELEMENT&&(t=y),"false"==t.getAttribute("contenteditable")))break a; 461t=void 0}if(t)this.fake(t);else if(d&&d.plugins.tableselection&&d.plugins.tableselection.isSupportedEnvironment()&&g(b)&&!w&&!b[0]._getTableElement({table:1}).hasAttribute("data-cke-tableselection-ignored"))h.call(this,b);else{if(q){y=CKEDITOR.dom.walker.whitespaces(!0);t=/\ufeff|\u00a0/;l={table:1,tbody:1,tr:1};1<b.length&&(d=b[b.length-1],b[0].setEnd(d.endContainer,d.endOffset));d=b[0];b=d.collapsed;var u,x,p;if((c=d.getEnclosedNode())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in H&&(!c.is("a")|| 462!c.getText()))try{p=c.$.createControlRange();p.addElement(c.$);p.select();return}catch(r){}if(d.startContainer.type==CKEDITOR.NODE_ELEMENT&&d.startContainer.getName()in l||d.endContainer.type==CKEDITOR.NODE_ELEMENT&&d.endContainer.getName()in l)d.shrink(CKEDITOR.NODE_ELEMENT,!0),b=d.collapsed;p=d.createBookmark();l=p.startNode;b||(m=p.endNode);p=d.document.$.body.createTextRange();p.moveToElementText(l.$);p.moveStart("character",1);m?(t=d.document.$.body.createTextRange(),t.moveToElementText(m.$), 463p.setEndPoint("EndToEnd",t),p.moveEnd("character",-1)):(u=l.getNext(y),x=l.hasAscendant("pre"),u=!(u&&u.getText&&u.getText().match(t))&&(x||!l.hasPrevious()||l.getPrevious().is&&l.getPrevious().is("br")),x=d.document.createElement("span"),x.setHtml("\x26#65279;"),x.insertBefore(l),u&&d.document.createText("").insertBefore(l));d.setStartBefore(l);l.remove();b?(u?(p.moveStart("character",-1),p.select(),d.document.$.selection.clear()):p.select(),d.moveToPosition(x,CKEDITOR.POSITION_BEFORE_START),x.remove()): 464(d.setEndBefore(m),m.remove(),p.select())}else{m=this.getNative();if(!m)return;this.removeAllRanges();for(p=0;p<b.length;p++){if(p<b.length-1&&(u=b[p],x=b[p+1],t=u.clone(),t.setStart(u.endContainer,u.endOffset),t.setEnd(x.startContainer,x.startOffset),!t.collapsed&&(t.shrink(CKEDITOR.NODE_ELEMENT,!0),d=t.getCommonAncestor(),t=t.getEnclosedNode(),d.isReadOnly()||t&&t.isReadOnly()))){x.setStart(u.startContainer,u.startOffset);b.splice(p--,1);continue}d=b[p];x=this.document.$.createRange();d.collapsed&& 465CKEDITOR.env.webkit&&f(d)&&(t=a(this.root),d.insertNode(t),(u=t.getNext())&&!t.getPrevious()&&u.type==CKEDITOR.NODE_ELEMENT&&"br"==u.getName()?(n(this.root),d.moveToPosition(u,CKEDITOR.POSITION_BEFORE_START)):d.moveToPosition(t,CKEDITOR.POSITION_AFTER_END));x.setStart(d.startContainer.$,d.startOffset);try{x.setEnd(d.endContainer.$,d.endOffset)}catch(v){if(0<=v.toString().indexOf("NS_ERROR_ILLEGAL_VALUE"))d.collapse(1),x.setEnd(d.endContainer.$,d.endOffset);else throw v;}m.addRange(x)}}this.reset(); 466this.root.fire("selectionchange")}}},fake:function(a,b){var d=this.root.editor;void 0===b&&a.hasAttribute("aria-label")&&(b=a.getAttribute("aria-label"));this.reset();x(d,b);var c=this._.cache,f=new CKEDITOR.dom.range(this.root);f.setStartBefore(a);f.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(f);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=z++;d._.fakeSelection=this;this.root.fire("selectionchange")},isHidden:function(){var a= 467this.getCommonAncestor();a&&a.type==CKEDITOR.NODE_TEXT&&(a=a.getParent());return!(!a||!a.data("cke-hidden-sel"))},isInTable:function(a){return g(this.getRanges(),a)},isCollapsed:function(){var a=this.getRanges();return 1===a.length&&a[0].collapsed},createBookmarks:function(a){a=this.getRanges().createBookmarks(a);this.isFake&&(a.isFake=1);return a},createBookmarks2:function(a){a=this.getRanges().createBookmarks2(a);this.isFake&&(a.isFake=1);return a},selectBookmarks:function(a){for(var b=[],d,c=0;c< 468a.length;c++){var f=new CKEDITOR.dom.range(this.root);f.moveToBookmark(a[c]);b.push(f)}a.isFake&&(d=g(b)?b[0]._getTableElement():b[0].getEnclosedNode(),d&&d.type==CKEDITOR.NODE_ELEMENT||(CKEDITOR.warn("selection-not-fake"),a.isFake=0));a.isFake&&!g(b)?this.fake(d):this.selectRanges(b);return this},getCommonAncestor:function(){var a=this.getRanges();return a.length?a[0].startContainer.getCommonAncestor(a[a.length-1].endContainer):null},scrollIntoView:function(){this.type!=CKEDITOR.SELECTION_NONE&& 469this.getRanges()[0].scrollIntoView()},removeAllRanges:function(){if(this.getType()!=CKEDITOR.SELECTION_NONE){var a=this.getNative();try{a&&a[q?"empty":"removeAllRanges"]()}catch(b){}this.reset()}}}})();"use strict";CKEDITOR.STYLE_BLOCK=1;CKEDITOR.STYLE_INLINE=2;CKEDITOR.STYLE_OBJECT=3;(function(){function c(a,b){for(var d,c;(a=a.getParent())&&!a.equals(b);)if(a.getAttribute("data-nostyle"))d=a;else if(!c){var f=a.getAttribute("contentEditable");"false"==f?d=a:"true"==f&&(c=1)}return d}function g(a, 470b,d,c){return(a.getPosition(b)|c)==c&&(!d.childRule||d.childRule(a))}function e(a){var b=a.document;if(a.collapsed)b=z(this,b),a.insertNode(b),a.moveToPosition(b,CKEDITOR.POSITION_BEFORE_END);else{var d=this.element,f=this._.definition,n,k=f.ignoreReadonly,m=k||f.includeReadonly;null==m&&(m=a.root.getCustomData("cke_includeReadonly"));var t=CKEDITOR.dtd[d];t||(n=!0,t=CKEDITOR.dtd.span);a.enlarge(CKEDITOR.ENLARGE_INLINE,1);a.trim();var l=a.createBookmark(),q=l.startNode,u=l.endNode,x=q,w;if(!k){var r= 471a.getCommonAncestor(),k=c(q,r),r=c(u,r);k&&(x=k.getNextSourceNode(!0));r&&(u=r)}for(x.getPosition(u)==CKEDITOR.POSITION_FOLLOWING&&(x=0);x;){k=!1;if(x.equals(u))x=null,k=!0;else{var v=x.type==CKEDITOR.NODE_ELEMENT?x.getName():null,r=v&&"false"==x.getAttribute("contentEditable"),A=v&&x.getAttribute("data-nostyle");if(v&&x.data("cke-bookmark")||x.type===CKEDITOR.NODE_COMMENT){x=x.getNextSourceNode(!0);continue}if(r&&m&&CKEDITOR.dtd.$block[v])for(var F=x,B=h(F),K=void 0,T=B.length,Y=0,F=T&&new CKEDITOR.dom.range(F.getDocument());Y< 472T;++Y){var K=B[Y],ba=CKEDITOR.filter.instances[K.data("cke-filter")];if(ba?ba.check(this):1)F.selectNodeContents(K),e.call(this,F)}B=v?!t[v]||A?0:r&&!m?0:g(x,u,f,P):1;if(B)if(K=x.getParent(),B=f,T=d,Y=n,!K||!(K.getDtd()||CKEDITOR.dtd.span)[T]&&!Y||B.parentRule&&!B.parentRule(K))k=!0;else{if(w||v&&CKEDITOR.dtd.$removeEmpty[v]&&(x.getPosition(u)|P)!=P||(w=a.clone(),w.setStartBefore(x)),v=x.type,v==CKEDITOR.NODE_TEXT||r||v==CKEDITOR.NODE_ELEMENT&&!x.getChildCount()){for(var v=x,ea;(k=!v.getNext(G))&& 473(ea=v.getParent(),t[ea.getName()])&&g(ea,q,f,I);)v=ea;w.setEndAfter(v)}}else k=!0;x=x.getNextSourceNode(A||r)}if(k&&w&&!w.collapsed){for(var k=z(this,b),r=k.hasAttributes(),A=w.getCommonAncestor(),v={},B={},K={},T={},C,H,J;k&&A;){if(A.getName()==d){for(C in f.attributes)!T[C]&&(J=A.getAttribute(H))&&(k.getAttribute(C)==J?B[C]=1:T[C]=1);for(H in f.styles)!K[H]&&(J=A.getStyle(H))&&(k.getStyle(H)==J?v[H]=1:K[H]=1)}A=A.getParent()}for(C in B)k.removeAttribute(C);for(H in v)k.removeStyle(H);r&&!k.hasAttributes()&& 474(k=null);k?(w.extractContents().appendTo(k),w.insertNode(k),p.call(this,k),k.mergeSiblings(),CKEDITOR.env.ie||k.$.normalize()):(k=new CKEDITOR.dom.element("span"),w.extractContents().appendTo(k),w.insertNode(k),p.call(this,k),k.remove(!0));w=null}}a.moveToBookmark(l);a.shrink(CKEDITOR.SHRINK_TEXT);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}}function b(a){function b(){for(var a=new CKEDITOR.dom.elementPath(c.getParent()),d=new CKEDITOR.dom.elementPath(m.getParent()),f=null,e=null,h=0;h<a.elements.length;h++){var g= 475a.elements[h];if(g==a.block||g==a.blockLimit)break;t.checkElementRemovable(g,!0)&&(f=g)}for(h=0;h<d.elements.length;h++){g=d.elements[h];if(g==d.block||g==d.blockLimit)break;t.checkElementRemovable(g,!0)&&(e=g)}e&&m.breakParent(e);f&&c.breakParent(f)}a.enlarge(CKEDITOR.ENLARGE_INLINE,1);var d=a.createBookmark(),c=d.startNode,f=this._.definition.alwaysRemoveElement;if(a.collapsed){for(var e=new CKEDITOR.dom.elementPath(c.getParent(),a.root),h,g=0,n;g<e.elements.length&&(n=e.elements[g])&&n!=e.block&& 476n!=e.blockLimit;g++)if(this.checkElementRemovable(n)){var k;!f&&a.collapsed&&(a.checkBoundaryOfElement(n,CKEDITOR.END)||(k=a.checkBoundaryOfElement(n,CKEDITOR.START)))?(h=n,h.match=k?"start":"end"):(n.mergeSiblings(),n.is(this.element)?x.call(this,n):r(n,w(this)[n.getName()]))}if(h){f=c;for(g=0;;g++){n=e.elements[g];if(n.equals(h))break;else if(n.match)continue;else n=n.clone();n.append(f);f=n}f["start"==h.match?"insertBefore":"insertAfter"](h)}}else{var m=d.endNode,t=this;b();for(e=c;!e.equals(m);)h= 477e.getNextSourceNode(),e.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(e)&&(e.getName()==this.element?x.call(this,e):r(e,w(this)[e.getName()]),h.type==CKEDITOR.NODE_ELEMENT&&h.contains(c)&&(b(),h=c.getNext())),e=h}a.moveToBookmark(d);a.shrink(CKEDITOR.NODE_ELEMENT,!0)}function h(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function m(a){var b=a.getEnclosedNode()||a.getCommonAncestor(!1,!0);(a=(new CKEDITOR.dom.elementPath(b,
vendor: 4,168 bytes, lines 478-486
478a.root)).contains(this.element,1))&&!a.isReadOnly()&&u(a,this)}function 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,d=b.attributes;if(d)for(var c in d)a.removeAttribute(c,d[c]);if(b.styles)for(var f in b.styles)b.styles.hasOwnProperty(f)&&a.removeStyle(f)}}function k(a){var b=a.createBookmark(!0),d=a.createIterator();d.enforceRealBlocks=!0;this._.enterMode&&(d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var c, 479e=a.document,h;c=d.getNextParagraph();)!c.isReadOnly()&&(d.activeFilter?d.activeFilter.check(this):1)&&(h=z(this,e,c),f(c,h));a.moveToBookmark(b)}function d(a){var b=a.createBookmark(1),d=a.createIterator();d.enforceRealBlocks=!0;d.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var c,e;c=d.getNextParagraph();)this.checkElementRemovable(c)&&(c.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&c.copyAttributes(e),f(c,e)): 480x.call(this,c));a.moveToBookmark(b)}function f(b,d){var c=!d;c&&(d=b.getDocument().createElement("div"),b.copyAttributes(d));var f=d&&d.is("pre"),e=b.is("pre"),h=!f&&e;if(f&&!e){e=d;(h=b.getBogus())&&h.remove();h=b.getHtml();h=n(h,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");h=h.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+| )/g," ");h=h.replace(/<br\b[^>]*>/gi,"\n");if(CKEDITOR.env.ie){var g=b.getDocument().createElement("div");g.append(e);e.$.outerHTML="\x3cpre\x3e"+ 481h+"\x3c/pre\x3e";e.copyAttributes(g.getFirst());e=g.getFirst().remove()}else e.setHtml(h);d=e}else h?d=t(c?[b.getHtml()]:a(b),d):b.moveChildren(d);d.replace(b);if(f){var c=d,k;(k=c.getPrevious(D))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(f=n(k.getHtml(),/\n$/,"")+"\n\n"+n(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e":c.setHtml(f),k.remove())}else c&&q(d)}function a(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi, 482function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(a,d){b.push(d)});return b}function n(a,b,d){var c="",f="";a=a.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,d){b&&(c=b);d&&(f=d);return""});return c+a.replace(b,d)+f}function t(a,b){var d;1<a.length&&(d=new CKEDITOR.dom.documentFragment(b.getDocument()));for(var c=0;c<a.length;c++){var f=a[c],f=f.replace(/(\r\n|\r)/g,"\n"),f=n(f,/^[ \t]*\n/, 483""),f=n(f,/\n$/,""),f=n(f,/^[ \t]+|[ \t]+$/g,function(a,b){return 1==a.length?"\x26nbsp;":b?" "+CKEDITOR.tools.repeat("\x26nbsp;",a.length-1):CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "}),f=f.replace(/\n/g,"\x3cbr\x3e"),f=f.replace(/[ \t]{2,}/g,function(a){return CKEDITOR.tools.repeat("\x26nbsp;",a.length-1)+" "});if(d){var e=b.clone();e.setHtml(f);d.append(e)}else b.setHtml(f)}return d||b}function x(a,b){var d=this._.definition,c=d.attributes,d=d.styles,f=w(this)[a.getName()],e=CKEDITOR.tools.isEmpty(c)&& 484CKEDITOR.tools.isEmpty(d),h;for(h in c)if("class"!=h&&!this._.definition.fullMatch||a.getAttribute(h)==v(h,c[h]))b&&"data-"==h.slice(0,5)||(e=a.hasAttribute(h),a.removeAttribute(h));for(var g in d)this._.definition.fullMatch&&a.getStyle(g)!=v(g,d[g],!0)||(e=e||!!a.getStyle(g),a.removeStyle(g));r(a,f,C[a.getName()]);e&&(this._.definition.alwaysRemoveElement?q(a,1):!CKEDITOR.dtd.$block[a.getName()]||this._.enterMode==CKEDITOR.ENTER_BR&&!a.hasAttributes()?q(a):a.renameNode(this._.enterMode==CKEDITOR.ENTER_P? 485"p":"div"))}function p(a){for(var b=w(this),d=a.getElementsByTag(this.element),c,f=d.count();0<=--f;)c=d.getItem(f),c.isReadOnly()||x.call(this,c,!0);for(var e in b)if(e!=this.element)for(d=a.getElementsByTag(e),f=d.count()-1;0<=f;f--)c=d.getItem(f),c.isReadOnly()||r(c,b[e])}function r(a,b,d){if(b=b&&b.attributes)for(var c=0;c<b.length;c++){var f=b[c][0],e;if(e=a.getAttribute(f)){var h=b[c][1];(null===h||h.test&&h.test(e)||"string"==typeof h&&e==h)&&a.removeAttribute(f)}}d||q(a)}function q(a,b){if(!a.hasAttributes()|| 486b)if(CKEDITOR.dtd.$block[a.getName()]){var d=a.getPrevious(D),c=a.getNext(D
vendor: 4,205 bytes, lines 486-494
486);!d||d.type!=CKEDITOR.NODE_TEXT&&d.isBlockBoundary({br:1})||a.append("br",1);!c||c.type!=CKEDITOR.NODE_TEXT&&c.isBlockBoundary({br:1})||a.append("br");a.remove(!0)}else d=a.getFirst(),c=a.getLast(),a.remove(!0),d&&(d.type==CKEDITOR.NODE_ELEMENT&&d.mergeSiblings(),c&&!d.equals(c)&&c.type==CKEDITOR.NODE_ELEMENT&&c.mergeSiblings())}function z(a,b,d){var c;c=a.element;"*"==c&&(c="span");c=new CKEDITOR.dom.element(c,b);d&&d.copyAttributes(c); 487c=u(c,a);b.getCustomData("doc_processing_style")&&c.hasAttribute("id")?c.removeAttribute("id"):b.setCustomData("doc_processing_style",1);return c}function u(a,b){var d=b._.definition,c=d.attributes,d=CKEDITOR.style.getStyleText(d);if(c)for(var f in c)a.setAttribute(f,c[f]);d&&a.setAttribute("style",d);a.getDocument().removeCustomData("doc_processing_style");return a}function A(a,b){for(var d in a)a[d]=a[d].replace(J,function(a,d){return b[d]})}function w(a){if(a._.overrides)return a._.overrides;var b= 488a._.overrides={},d=a._.definition.overrides;if(d){CKEDITOR.tools.isArray(d)||(d=[d]);for(var c=0;c<d.length;c++){var f=d[c],e,h;"string"==typeof f?e=f.toLowerCase():(e=f.element?f.element.toLowerCase():a.element,h=f.attributes);f=b[e]||(b[e]={});if(h){var f=f.attributes=f.attributes||[],g;for(g in h)f.push([g.toLowerCase(),h[g]])}}}return b}function v(a,b,d){var c=new CKEDITOR.dom.element("span");c[d?"setStyle":"setAttribute"](a,b);return c[d?"getStyle":"getAttribute"](a)}function F(a,b){function d(a, 489b){return"font-family"==b.toLowerCase()?a.replace(/["']/g,""):a}"string"==typeof a&&(a=CKEDITOR.tools.parseCssText(a));"string"==typeof b&&(b=CKEDITOR.tools.parseCssText(b,!0));for(var c in a)if(!(c in b)||d(b[c],c)!=d(a[c],c)&&"inherit"!=a[c]&&"inherit"!=b[c])return!1;return!0}function B(a,b,d){var c=a.getRanges();b=b?this.removeFromRange:this.applyToRange;for(var f,e=c.createIterator();f=e.getNextRange();)b.call(this,f,d);a.selectRanges(c)}var C={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1, 490pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1},H={a:1,blockquote:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1},E=/\s*(?:;\s*|$)/,J=/#\((.+?)\)/g,G=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); 491var d=a.attributes;d&&d.style&&(a.styles=CKEDITOR.tools.extend({},a.styles,CKEDITOR.tools.parseCssText(d.style)),delete d.style);b&&(a=CKEDITOR.tools.clone(a),A(a.attributes,b),A(a.styles,b));d=this.element=a.element?"string"==typeof a.element?a.element.toLowerCase():a.element:"*";this.type=a.type||(C[d]?CKEDITOR.STYLE_BLOCK:H[d]?CKEDITOR.STYLE_OBJECT:CKEDITOR.STYLE_INLINE);"object"==typeof this.element&&(this.type=CKEDITOR.STYLE_OBJECT);this._={definition:a}};CKEDITOR.style.prototype={apply:function(a){if(a instanceof 492CKEDITOR.dom.document)return B.call(this,a.getSelection());if(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= 493this.type==CKEDITOR.STYLE_INLINE?e:this.type==CKEDITOR.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?d:this.type==CKEDITOR.STYLE_OBJECT?l:null;return this.removeFromRange(a)},applyToObject:function(a){u(a,this)},checkActive:function(a,b){switch(this.type){case CKEDITOR.STYLE_BLOCK:return this.checkElementRemovable(a.block||a.blockLimit,!0,b);case CKEDITOR.STYLE_OBJECT:case CKEDITOR.STYLE_INLINE:for(var d= 494a.elements,c=0,f;c<d.length;c++)if(f=d[c],this.type!=CKEDITOR.STYLE_INLINE||f!=a.block&&f!=a.blockLimit){if(this.t
vendor: 3,915 bytes, lines 494-501
494ype==CKEDITOR.STYLE_OBJECT){var e=f.getName();if(!("string"==typeof this.element?e==this.element:e in this.element))continue}if(this.checkElementRemovable(f,!0,b))return!0}}return!1},checkApplicable:function(a,b,d){b&&b instanceof CKEDITOR.filter&&(d=b);if(d&&!d.check(this))return!1;switch(this.type){case CKEDITOR.STYLE_OBJECT:return!!a.contains(this.element);case CKEDITOR.STYLE_BLOCK:return!!a.blockLimit.getDtd()[this.element]}return!0}, 495checkElementMatch:function(a,b){var d=this._.definition;if(!a||!d.ignoreReadonly&&a.isReadOnly())return!1;var c=a.getName();if("string"==typeof this.element?c==this.element:c in this.element){if(!b&&!a.hasAttributes())return!0;if(c=d._AC)d=c;else{var c={},f=0,e=d.attributes;if(e)for(var h in e)f++,c[h]=e[h];if(h=CKEDITOR.style.getStyleText(d))c.style||f++,c.style=h;c._length=f;d=d._AC=c}if(d._length){for(var g in d)if("_length"!=g)if(c=a.getAttribute(g)||"","style"==g?F(d[g],c):d[g]==c){if(!b)return!0}else if(b)return!1; 496if(b)return!0}else return!0}return!1},checkElementRemovable:function(a,b,d){if(this.checkElementMatch(a,b,d))return!0;if(b=w(this)[a.getName()]){var c;if(!(b=b.attributes))return!0;for(d=0;d<b.length;d++)if(c=b[d][0],c=a.getAttribute(c)){var f=b[d][1];if(null===f)return!0;if("string"==typeof f){if(c==f)return!0}else if(f.test(c))return!0}}return!1},buildPreview:function(a){var b=this._.definition,d=[],c=b.element;"bdo"==c&&(c="span");var d=["\x3c",c],f=b.attributes;if(f)for(var e in f)d.push(" ", 497e,'\x3d"',f[e],'"');(f=CKEDITOR.style.getStyleText(b))&&d.push(' style\x3d"',f,'"');d.push("\x3e",a||b.name,"\x3c/",c,"\x3e");return d.join("")},getDefinition:function(){return this._.definition}};CKEDITOR.style.getStyleText=function(a){var b=a._ST;if(b)return b;var b=a.styles,d=a.attributes&&a.attributes.style||"",c="";d.length&&(d=d.replace(E,";"));for(var f in b){var e=b[f],h=(f+":"+e).replace(E,";");"inherit"==e?c+=h:d+=h}d.length&&(d=CKEDITOR.tools.normalizeCssText(d,!0));return a._ST=d+c};CKEDITOR.style.customHandlers= 498{};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 P=CKEDITOR.POSITION_PRECEDING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED,I=CKEDITOR.POSITION_FOLLOWING|CKEDITOR.POSITION_IDENTICAL|CKEDITOR.POSITION_IS_CONTAINED})();CKEDITOR.styleCommand=function(c, 499g){this.requiredContent=this.allowedContent=this.style=c;CKEDITOR.tools.extend(this,g,!0)};CKEDITOR.styleCommand.prototype.exec=function(c){c.focus();this.state==CKEDITOR.TRISTATE_OFF?c.applyStyle(this.style):this.state==CKEDITOR.TRISTATE_ON&&c.removeStyle(this.style)};CKEDITOR.stylesSet=new CKEDITOR.resourceManager("","stylesSet");CKEDITOR.addStylesSet=CKEDITOR.tools.bind(CKEDITOR.stylesSet.add,CKEDITOR.stylesSet);CKEDITOR.loadStylesSet=function(c,g,e){CKEDITOR.stylesSet.addExternal(c,g,"");CKEDITOR.stylesSet.load(c, 500e)};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{attachStyleStateChange:function(c,g){var e=this._.styleStateChangeCallbacks;e||(e=this._.styleStateChangeCallbacks=[],this.on("selectionChange",function(b){for(var c=0;c<e.length;c++){var g=e[c],l=g.style.checkActive(b.data.path,this)?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF;g.fn.call(this,l)}}));e.push({style:c,fn:g})},applyStyle:function(c){c.apply(this)},removeStyle:function(c){c.remove(this)},getStylesSet:function(c){if(this._.stylesDefinitions)c(this._.stylesDefinitions); 501else{var g=this,e=g.config.stylesCombo_stylesSet||g.config.stylesSet;if(!1===e)c(null);else if(e instanceof Array)g._.stylesDefinitions=e,c(e);else{e||(e="default");var e=e.split(":"),b=e[0];CKEDITOR.stylesSet.addExternal(b,e[1]?e.slice(1).join(":"):CKEDITOR.getUrl("styles.js"),"");CKEDITOR.stylesSet.load(b,function(e){g._.stylesDefinitions=e[b];
501c(g._.stylesDefinitions)})}}}});(function(){if(window.Promise)CKEDITOR.tools.promise=Promise;else{var c=CKEDITOR.getUrl("vendor/promise.js");if("function"=== 502typeof window.define&&window.define.amd&&"function"===typeof window.require)return window.require([c],function(c){CKEDITOR.tools.promise=c});CKEDITOR.scriptLoader.load(c,function(g){if(!g)return CKEDITOR.error("no-vendor-lib",{path:c});if("undefined"!==typeof window.ES6Promise)return CKEDITOR.tools.promise=ES6Promise})}})();(function(){function c(b,c,m){b.once("selectionCheck",function(b){if(!g){var k=b.data.getRanges()[0];m.equals(k)?b.cancel():c.equals(k)&&(e=!0)}},null,null,-1)}var g=!0,e=!1;CKEDITOR.dom.selection.setupEditorOptimization= 503function(b){b.on("selectionCheck",function(b){b.data&&!e&&b.data.optimizeInElementEnds();e=!1});b.on("contentDom",function(){var c=b.editable();c&&(c.attachListener(c,"keydown",function(b){this._.shiftPressed=b.data.$.shiftKey},this),c.attachListener(c,"keyup",function(b){this._.shiftPressed=b.data.$.shiftKey},this))})};CKEDITOR.dom.selection.prototype.optimizeInElementEnds=function(){var b=this.getRanges()[0],e=this.root.editor,m;if(this.root.editor._.shiftPressed||this.isFake||b.isCollapsed||b.startContainer.equals(b.endContainer))m= 504!1;else if(0===b.endOffset)m=!0;else{m=b.startContainer.type===CKEDITOR.NODE_TEXT;var l=b.endContainer.type===CKEDITOR.NODE_TEXT,k=m?b.startContainer.getLength():b.startContainer.getChildCount();m=b.startOffset===k||m^l}m&&(m=b.clone(),b.shrink(CKEDITOR.SHRINK_TEXT,!1,{skipBogus:!0}),g=!1,c(e,b,m),b.select(),g=!0)}})();CKEDITOR.dom.comment=function(c,g){"string"==typeof c&&(c=(g?g.$:document).createComment(c));CKEDITOR.dom.domObject.call(this,c)};CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node; 505CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype,{type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}});"use strict";(function(){var c={},g={},e;for(e in CKEDITOR.dtd.$blockLimit)e in CKEDITOR.dtd.$list||(c[e]=1);for(e in CKEDITOR.dtd.$block)e in CKEDITOR.dtd.$blockLimit||e in CKEDITOR.dtd.$empty||(g[e]=1);CKEDITOR.dom.elementPath=function(b,e){var m=null,l=null,k=[],d=b,f;e=e||b.getDocument().getBody();d||(d=e);do if(d.type==CKEDITOR.NODE_ELEMENT){k.push(d); 506if(!this.lastElement&&(this.lastElement=d,d.is(CKEDITOR.dtd.$object)||"false"==d.getAttribute("contenteditable")))continue;if(d.equals(e))break;if(!l&&(f=d.getName(),"true"==d.getAttribute("contenteditable")?l=d:!m&&g[f]&&(m=d),c[f])){if(f=!m&&"div"==f){a:{f=d.getChildren();for(var a=0,n=f.count();a<n;a++){var t=f.getItem(a);if(t.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$block[t.getName()]){f=!0;break a}}f=!1}f=!f}f?m=d:l=d}}while(d=d.getParent());l||(l=e);this.block=m;this.blockLimit=l;this.root= 507e;this.elements=k}})();CKEDITOR.dom.elementPath.prototype={compare:function(c){var g=this.elements;c=c&&c.elements;if(!c||g.length!=c.length)return!1;for(var e=0;e<g.length;e++)if(!g[e].equals(c[e]))return!1;return!0},contains:function(c,g,e){var b=0,h;"string"==typeof c&&(h=function(b){return b.getName()==c});c instanceof CKEDITOR.dom.element?h=function(b){return b.equals(c)}:CKEDITOR.tools.isArray(c)?h=function(b){return-1<CKEDITOR.tools.indexOf(c,b.getName())}:"function"==typeof c?h=c:"object"== 508typeof c&&(h=function(b){return b.getName()in c});var m=this.elements,l=m.length;g&&(e?b+=1:--l);e&&(m=Array.prototype.slice.call(m,0),m.reverse());for(;b<l;b++)if(h(m[b]))return m[b];return null},isContextFor:function(c){var g;return c in CKEDITOR.dtd.$block?(g=this.contains(CKEDITOR.dtd.$intermediate)||this.root.equals(this.block)&&this.block||this.blockLimit,!!g.getDtd()[c]):!0},direction:function(){return(this.block||this.blockLimit||this.root).getDirection(1)}};CKEDITOR.dom.text=function(c,g){"string"== 509typeof c&&(c=(g?g.$:document).createTextNode(c));this.$=c};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(c){this.$.nodeValue=c},isEmpty:function(c){var g=this.getText();c&&(g=CKEDITOR.tools.trim(g));return!g||g===CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE},split:function(c){var g=this.$.parentNode,e=g.childNodes.length, 510b=this.getLength(),h=this.getDocument(),m=new CKEDITOR.dom.text(this.$.splitText(c),h);g.childNodes.length==e&&(c>=b?(m=h.createText(""),m.insertAfter(this)):(c=h.createText(""),c.insertAfter(m),c.remove()));return m},substring:function(c,g){return"number"!=typeof g?this.$.nodeValue.substr(c):this.$.nodeValue.substring(c,g)}});(function(){function c(c,b,h){var g=c.serializable,l=b[h?"endContainer":"startContainer"],k=h?"endOffset":"startOffset",d=g?b.document.getById(c.startNode):c.startNode;c=g? 511b.document.getById(c.endNode):c.endNode;l.equals(d.getPrevious())?(b.startOffset=b.startOffset-l.getLength()-c.getPrevious().getLength(),l=c.getNext()):l.equals(c.getPrevious())&&(b.startOffset-=l.getLength(),l=c.getNext());l.equals(d.getParent())&&b[k]++;l.equals(c.getParent())&&b[k]++;b[h?"endContainer":"startContainer"]=l;return b}CKEDITOR.dom.rangeList=function(c){if(c instanceof CKEDITOR.dom.rangeList)return c;c?c instanceof CKEDITOR.dom.range&&(c=[c]):c=[];return CKEDITOR.tools.extend(c,g)}; 512var g={createIterator:function(){var c=this,b=CKEDITOR.dom.walker.bookmark(),h=[],g;return{getNextRange:function(l){g=void 0===g?0:g+1;var k=c[g];if(k&&1<c.length){if(!g)for(var d=c.length-1;0<=d;d--)h.unshift(c[d].createBookmark(!0));if(l)for(var f=0;c[g+f+1];){var a=k.document;l=0;d=a.getById(h[f].endNode);for(a=a.getById(h[f+1].startNode);;){d=d.getNextSourceNode(!1);if(a.equals(d))l=1;else if(b(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary())continue;break}if(!l)break;f++}for(k.moveToBookmark(h.shift());f--;)d= 513c[++g],d.moveToBookmark(h.shift()),k.setEnd(d.endContainer,d.endOffset)}return k}}},createBookmarks:function(e){for(var b=[],h,g=0;g<this.length;g++){b.push(h=this[g].createBookmark(e,!0));for(var l=g+1;l<this.length;l++)this[l]=c(h,this[l]),this[l]=c(h,this[l],!0)}return b},createBookmarks2:function(c){for(var b=[],h=0;h<this.length;h++)b.push(this[h].createBookmark2(c));return b},moveToBookmarks:function(c){for(var b=0;b<this.length;b++)this[b].moveToBookmark(c[b])}}})();(function(){function c(){return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1]|| 514"skins/"+CKEDITOR.skinName.split(",")[0]+"/")}function g(b){var a=CKEDITOR.skin["ua_"+b],d=CKEDITOR.env;if(a)for(var a=a.split(",").sort(function(a,b){return a>b?-1:1}),e=0,h;e<a.length;e++)if(h=a[e],d.ie&&(h.replace(/^ie/,"")==d.version||d.quirks&&"iequirks"==h)&&(h="ie"),d[h]){b+="_"+a[e];break}return CKEDITOR.getUrl(c()+b+".css")}function e(b,a){m[b]||(CKEDITOR.document.appendStyleSheet(g(b)),m[b]=1);a&&a()}function b(b){var a=b.getById(l);a||(a=b.getHead().append("style"),a.setAttribute("id", 515l),a.setAttribute("type","text/css"));return a}function h(b,a,d){var c,e,h;if(CKEDITOR.env.webkit)for(a=a.split("}").slice(0,-1),e=0;e<a.length;e++)a[e]=a[e].split("{");for(var g=0;g<b.length;g++)if(CKEDITOR.env.webkit)for(e=0;e<a.length;e++){h=a[e][1];for(c=0;c<d.length;c++)h=h.replace(d[c][0],d[c][1]);b[g].$.sheet.addRule(a[e][0],h)}else{h=a;for(c=0;c<d.length;c++)h=h.replace(d[c][0],d[c][1]);CKEDITOR.env.ie&&11>CKEDITOR.env.version?b[g].$.styleSheet.cssText+=h:b[g].$.innerHTML+=h}}var m={};CKEDITOR.skin= 516{path:c,loadPart:function(b,a){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c()+"skin.js"),function(){e(b,a)}):e(b,a)},getPath:function(b){return CKEDITOR.getUrl(g(b))},icons:{},addIcon:function(b,a,d,c){b=b.toLowerCase();this.icons[b]||(this.icons[b]={path:a,offset:d||0,bgsize:c||"16px"})},getIconStyle:function(b,a,d,c,e){var h;b&&(b=b.toLowerCase(),a&&(h=this.icons[b+"-rtl"]),h||(h=this.icons[b]));b=d||h&&h.path||"";c=c||h&&h.offset;e=e||h&&h.bgsize|| 517"16px";b&&(b=b.replace(/'/g,"\\'"));return b&&"background-image:url('"+CKEDITOR.getUrl(b)+"');background-position:0 "+c+"px;background-size:"+e+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(c){var a=b(CKEDITOR.document);return(this.setUiColor=function(b){this.uiColor=b;var c=CKEDITOR.skin.chameleon,f="",e="";"function"==typeof c&&(f=c(this,"editor"),e=c(this,"panel"));b=[[d,b]];h([a],f,b);h(k,e,b)}).call(this,c)}});var l="cke_ui_color", 518k=[],d=/\$color/g;CKEDITOR.on("instanceLoaded",function(c){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var a=c.editor;c=function(c){c=(c.data[0]||c.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!c.getById("cke_ui_color")){var f=b(c);k.push(f);a.on("destroy",function(){k=CKEDITOR.tools.array.filter(k,function(a){return f!==a})});(c=a.getUiColor())&&h([f],CKEDITOR.skin.chameleon(a,"panel"),[[d,c]])}};a.on("panelShow",c);a.on("menuShow",c);a.config.uiColor&&a.setUiColor(a.config.uiColor)}})})(); 519(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;
vendor: 6,903 bytes, lines 519-529
519left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);c.appendTo(CKEDITOR.document.getHead());try{var g=c.getComputedStyle("border-top-color"),e=c.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!g||g!=e)}catch(b){CKEDITOR.env.hc=!1}c.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); 520CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(c=CKEDITOR._.pending)for(delete CKEDITOR._.pending,g=0;g<c.length;g++)CKEDITOR.editor.prototype.constructor.apply(c[g][0],c[g][1]),CKEDITOR.add(c[g][0])})();CKEDITOR.skin.name="moono";CKEDITOR.skin.ua_editor="ie,iequirks,ie7,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8";CKEDITOR.skin.chameleon=function(){var c=function(){return function(b,c){for(var e=b.match(/[^#]./g),g=0;3>g;g++){var k=g,d;d=parseInt(e[g],16);d=("0"+(0>c?0|d*(1+ 521c):0|d+(255-d)*c).toString(16)).slice(-2);e[k]=d}return"#"+e.join("")}}(),g=function(){var b=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');");return function(c,e){return b.output({from:c,to:e})}}(),e={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), 522panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; 523return function(b,h){var m=b.uiColor,m={id:"."+b.id,defaultBorder:c(m,-.1),defaultGradient:g(c(m,.9),m),lightGradient:g(c(m,1),c(m,.7)),mediumGradient:g(c(m,.8),c(m,.5)),ckeButtonOn:g(c(m,.6),c(m,.7)),ckeResizer:c(m,-.4),ckeToolbarSeparator:c(m,.5),ckeColorauto:c(m,.8),dialogBody:c(m,.7),dialogTabSelected:g("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:c(m,-.6),elementsPathBg:m,menubuttonIcon:c(m,.5),menubuttonIconHover:c(m,.3)};return e[h].output(m).replace(/\[/g,"{").replace(/\]/g, 524"}")}}();CKEDITOR.plugins.add("basicstyles",{init:function(c){var g=0,e=function(e,h,d,f){if(f){f=new CKEDITOR.style(f);var a=b[d];a.unshift(f);c.attachStyleStateChange(f,function(a){!c.readOnly&&c.getCommand(d).setState(a)});c.addCommand(d,new CKEDITOR.styleCommand(f,{contentForms:a}));c.ui.addButton&&c.ui.addButton(e,{label:h,command:d,toolbar:"basicstyles,"+(g+=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"== 525b.styles["font-style"]}]],underline:["u",["span",function(b){return"underline"==b.styles["text-decoration"]}]],strike:["s","strike",["span",function(b){return"line-through"==b.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},h=c.config,m=c.lang.basicstyles;e("Bold",m.bold,"bold",h.coreStyles_bold);e("Italic",m.italic,"italic",h.coreStyles_italic);e("Underline",m.underline,"underline",h.coreStyles_underline);e("Strike",m.strike,"strike",h.coreStyles_strike);e("Subscript",m.subscript, 526"subscript",h.coreStyles_subscript);e("Superscript",m.superscript,"superscript",h.coreStyles_superscript);c.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"}; 527CKEDITOR.config.coreStyles_superscript={element:"sup"};CKEDITOR.plugins.add("dialogui",{onLoad:function(){var c=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var c=[this._],a=1;a<arguments.length;a++)c.push(arguments[a]);c.push(!0);CKEDITOR.tools.extend.apply(CKEDITOR.tools,c);return this._},g={build:function(b,c,a){return new CKEDITOR.ui.dialog.textInput(b,c,a)}},e={build:function(b,c,a){return new CKEDITOR.ui.dialog[c.type](b, 528c,a)}},b={isChanged:function(){return this.getValue()!=this.getInitValue()},reset:function(b){this.setValue(this.getInitValue(),b)},setInitValue:function(){this._.initValue=this.getValue()},resetInitValue:function(){this._.initValue=this._["default"]},getInitValue:function(){return this._.initValue}},h=CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onChange:function(b,c){this._.domOnChangeRegistered||(b.on("load",function(){this.getInputElement().on("change",function(){b.parts.dialog.isVisible()&& 529this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",c)}},!0),m=/^on([A-Z]\w+)/,l=function(b){for(var c in b)(m.test(c)||"title"==c||"type"==c)&&delete b[c];return b},k=function(b){b=b.data.getKeystroke();
vendor: 9,479 bytes, lines 529-547
529b==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,f,a,e){if(!(4>arguments.length)){var h=c.call(this, 530f);h.labelId=CKEDITOR.tools.getNextId()+"_label";this._.children=[];var g={role:f.role||"presentation"};f.includeLabel&&(g["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,f,a,"div",null,g,function(){var a=[],c=f.required?" cke_required":"";"horizontal"!=f.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e",f.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', 531f.controlStyle?' style\x3d"'+f.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,b,f),"\x3c/div\x3e"):(c={type:"hbox",widths:f.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(f.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(f.controlStyle?' style\x3d"'+f.controlStyle+ 532'"':"")+"\x3e"+e.call(this,b,f)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,c,a));return a.join("")})}},textInput:function(b,f,a){if(!(3>arguments.length)){c.call(this,f);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+f.type,id:e,type:f.type};f.validate&&(this.validate=f.validate);f.maxLength&&(h.maxlength=f.maxLength);f.size&&(h.size=f.size);f.inputStyle&&(h.style=f.inputStyle);var g=this,m=!1;b.on("load",function(){g.getInputElement().on("keydown", 533function(a){13==a.data.getKeystroke()&&(m=!0)});g.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&m&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),m=!1);g.bidi&&k.call(g,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,f,a,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',f.type,'" role\x3d"presentation"'];f.width&&a.push('style\x3d"width:'+f.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&& 534(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,f,a){if(!(3>arguments.length)){c.call(this,f);var e=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",g={};f.validate&&(this.validate=f.validate);g.rows=f.rows||5;g.cols=f.cols||20;g["class"]="cke_dialog_ui_input_textarea "+(f["class"]||"");"undefined"!=typeof f.inputStyle&&(g.style=f.inputStyle);f.dir&&(g.dir=f.dir);if(e.bidi)b.on("load", 535function(){e.getInputElement().on("keyup",k)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,f,a,function(){g["aria-labelledby"]=this._.labelId;this._.required&&(g["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],b;for(b in g)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(g[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, 536f,a){if(!(3>arguments.length)){var e=c.call(this,f,{"default":!!f["default"]});f.validate&&(this.validate=f.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,f,a,"span",null,null,function(){var a=CKEDITOR.tools.extend({},f,{id:f.id?f.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],h=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":h};l(a);f["default"]&&(g.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); 537e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,c,"input",null,g);c.push(' \x3clabel id\x3d"',h,'" for\x3d"',g.id,'"'+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(f.label),"\x3c/label\x3e");return c.join("")})}},radio:function(b,f,a){if(!(3>arguments.length)){c.call(this,f);this._["default"]||(this._["default"]=this._.initValue=f.items[0][1]);f.validate&&(this.validate=f.validate);var e=[],h=this;f.role="radiogroup";f.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, 538b,f,a,function(){for(var a=[],c=[],g=(f.id?f.id:CKEDITOR.tools.getNextId())+"_radio",k=0;k<f.items.length;k++){var m=f.items[k],u=void 0!==m[2]?m[2]:m[0],A=void 0!==m[1]?m[1]:m[0],w=CKEDITOR.tools.getNextId()+"_radio_input",v=w+"_label",w=CKEDITOR.tools.extend({},f,{id:w,title:null,type:null},!0),u=CKEDITOR.tools.extend({},w,{title:u},!0),F={type:"radio","class":"cke_dialog_ui_radio_input",name:g,value:A,"aria-labelledby":v},B=[];h._["default"]==A&&(F.checked="checked");l(w);l(u);"undefined"!=typeof w.inputStyle&& 539(w.style=w.inputStyle);w.keyboardFocusable=!0;e.push(new CKEDITOR.ui.dialog.uiElement(b,w,B,"input",null,F));B.push(" ");new CKEDITOR.ui.dialog.uiElement(b,u,B,"label",null,{id:v,"for":F.id},m[0]);a.push(B.join(""))}new CKEDITOR.ui.dialog.hbox(b,e,a,c);return c.join("")});this._.children=e}},button:function(b,f,a){if(arguments.length){"function"==typeof f&&(f=f(b.getParentEditor()));c.call(this,f,{disabled:f.disabled||!1});CKEDITOR.event.implementOn(this);var e=this;b.on("load",function(){var a=this.getElement(); 540(function(){a.on("click",function(a){e.click();a.data.preventDefault()});a.on("keydown",function(a){a.data.getKeystroke()in{32:1}&&(e.click(),a.data.preventDefault())})})();a.unselectable()},this);var h=CKEDITOR.tools.extend({},f);delete h.style;var g=CKEDITOR.tools.getNextId()+"_label";CKEDITOR.ui.dialog.uiElement.call(this,b,h,a,"a",null,{style:f.style,href:"javascript:void(0)",title:f.label,hidefocus:"true","class":f["class"],role:"button","aria-labelledby":g},'\x3cspan id\x3d"'+g+'" class\x3d"cke_dialog_ui_button"\x3e'+ 541CKEDITOR.tools.htmlEncode(f.label)+"\x3c/span\x3e")}},select:function(b,f,a){if(!(3>arguments.length)){var e=c.call(this,f);f.validate&&(this.validate=f.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,f,a,function(){var a=CKEDITOR.tools.extend({},f,{id:f.id?f.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],h=[],g={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_', 542f.type,'" role\x3d"presentation"');f.width&&c.push('style\x3d"width:'+f.width+'" ');c.push("\x3e");void 0!==f.size&&(g.size=f.size);void 0!==f.multiple&&(g.multiple=f.multiple);l(a);for(var k=0,m;k<f.items.length&&(m=f.items[k]);k++)h.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);e.select=new CKEDITOR.ui.dialog.uiElement(b,a,c,"select",null, 543g,h.join(""));c.push("\x3c/div\x3e");return c.join("")})}},file:function(b,f,a){if(!(3>arguments.length)){void 0===f["default"]&&(f["default"]="");var e=CKEDITOR.tools.extend(c.call(this,f),{definition:f,buttons:[]});f.validate&&(this.validate=f.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,f,a,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', 544e.frameId,'" title\x3d"',f.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,f,a){var e=this;if(!(3>arguments.length)){c.call(this,f);f.validate&&(this.validate=f.validate);var h=CKEDITOR.tools.extend({},f),g=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(a){var c= 545f["for"];a=g?g.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(c[0],c[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(f["for"][0],f["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,h,a)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,c=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,a=/\/$/;return function(e,h,g){if(!(3>arguments.length)){var k=[],m=h.html;"\x3c"!=m.charAt(0)&&(m="\x3cspan\x3e"+m+"\x3c/span\x3e");var l=h.focus;if(l){var z=this.focus; 546this.focus=function(){("function"==typeof l?l:z).call(this);this.fire("focus")};h.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,h,k,"span",null,null,"");k=k.join("").match(b);m=m.match(c)||["","",""];a.test(m[1])&&(m[1]=m[1].slice(0,-1),m[2]="/"+m[2]);g.push([m[1]," ",k[1]||"",m[2]].join(""))}}}(),fieldset:function(b,c,a,e,h){var g=h.label;this._={children:c};CKEDITOR.ui.dialog.uiElement.call(this,b,h,e,"fieldset",null,null,function(){var b= 547[];g&&b.push("\x3clegend"+(h.labelStyle?' style\x3d"'+h.labelStyle+'"':"")+"\x3e"+g+"\x3c/legend\x3e");for(var d=0;d<a.length;d++)b.push(a[d]);return b.join("")})}},!0);CKEDITOR.ui.dialog.html.prototype=new CKEDITOR.ui.dialog.uiElement;CKEDITOR.ui.dialog.labeledElement.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{set
vendor: 10,937 bytes, lines 547-568
547Label:function(b){var c=CKEDITOR.document.getById(this._.labelId);1>c.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(c):c.getChild(0).$.nodeValue= 548b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:h},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")}, 549isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,c){this.on("click",function(){c.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, 550focus:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&c.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&(c.$.focus(),c.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var c=b&&b.charAt(0);(c="âª"==c?"ltr":"â«"==c?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(c)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, 551getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var c=this.getDirectionMarker();c&&(b=("ltr"==c?"âª":"â«")+b)}return b},setDirectionMarker:function(b){var c=this.getInputElement();b?c.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&c.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.textarea.prototype= 552new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(b,c,a){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),h=this.getInputElement().$;e.$.text=b;e.$.value=void 0===c||null===c?b:c;void 0===a||null===a?CKEDITOR.env.ie?h.add(e.$):h.add(e.$,null):h.add(e.$,a);return this},remove:function(b){this.getInputElement().$.remove(b); 553return 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,c){this.getInputElement().$.checked=b;!c&&this.fire("change",{value:b})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(b, 554c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return h.onChange.apply(this,arguments);b.on("load",function(){var a=this._.checkbox.getElement();a.on("propertychange",function(b){b=b.data.$;"checked"==b.propertyName&&this.fire("change",{value:a.$.checked})},this)},this);this.on("change",c);return null}},keyboardFocusable:!0},b,!0);CKEDITOR.ui.dialog.radio.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{setValue:function(b,c){for(var a=this._.children,e,h=0;h<a.length&&(e=a[h]);h++)e.getElement().$.checked= 555e.getValue()==b;!c&&this.fire("change",{value:b})},getValue:function(){for(var b=this._.children,c=0;c<b.length;c++)if(b[c].getElement().$.checked)return b[c].getValue();return null},accessKeyUp:function(){var b=this._.children,c;for(c=0;c<b.length;c++)if(b[c].getElement().$.checked){b[c].getElement().focus();return}b[0].getElement().focus()},eventProcessors:{onChange:function(b,c){if(!CKEDITOR.env.ie||8<CKEDITOR.env.version)return h.onChange.apply(this,arguments);b.on("load",function(){for(var a= 556this._.children,b=this,d=0;d<a.length;d++)a[d].getElement().on("propertychange",function(a){a=a.data.$;"checked"==a.propertyName&&this.$.checked&&b.fire("change",{value:this.getAttribute("value")})})},this);this.on("change",c);return null}}},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]): 557this.getElement()},submit:function(){this.getInputElement().getParent().$.submit();return this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(b){var c=/^on([A-Z]\w+)/,a,e=function(a,b,d,c){a.on("formLoaded",function(){a.getInputElement().on(d,c,a)})},h;for(h in b)if(a=h.match(c))this.eventProcessors[h]?this.eventProcessors[h].call(this,this._.dialog,b[h]):e(this,this._.dialog,a[1].toLowerCase(),b[h]);return this},reset:function(){function b(){a.$.open(); 558var d="";e.size&&(d=e.size-(CKEDITOR.env.ie?7:0));var u=c.frameId+"_input";a.$.write(['\x3chtml dir\x3d"'+m+'" 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"'+m+'" lang\x3d"'+l+'" action\x3d"',CKEDITOR.tools.htmlEncode(e.action),'"\x3e\x3clabel id\x3d"',c.labelId,'" for\x3d"',u,'" style\x3d"display:none"\x3e',CKEDITOR.tools.htmlEncode(e.label), 559'\x3c/label\x3e\x3cinput style\x3d"width:100%" id\x3d"',u,'" aria-labelledby\x3d"',c.labelId,'" type\x3d"file" name\x3d"',CKEDITOR.tools.htmlEncode(e.id||"cke_upload"),'" size\x3d"',CKEDITOR.tools.htmlEncode(0<d?d:""),'" /\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("")); 560a.$.close();for(d=0;d<h.length;d++)h[d].enable()}var c=this._,a=CKEDITOR.document.getById(c.frameId).getFrameDocument(),e=c.definition,h=c.buttons,g=this.formLoadedNumber,k=this.formUnloadNumber,m=c.dialog._.editor.lang.dir,l=c.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); 561CKEDITOR.tools.removeFunction(k)}));CKEDITOR.env.gecko?setTimeout(b,500):b()},getValue:function(){return this.getInputElement().$.value||""},setInitValue:function(){this._.initValue=""},eventProcessors:{onChange:function(b,c){this._.domOnChangeRegistered||(this.on("formLoaded",function(){this.getInputElement().on("change",function(){this.fire("change",{value:this.getValue()})},this)},this),this._.domOnChangeRegistered=!0);this.on("change",c)}},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.fileButton.prototype= 562new CKEDITOR.ui.dialog.button;CKEDITOR.ui.dialog.fieldset.prototype=CKEDITOR.tools.clone(CKEDITOR.ui.dialog.hbox.prototype);CKEDITOR.dialog.addUIElement("text",g);CKEDITOR.dialog.addUIElement("password",g);CKEDITOR.dialog.addUIElement("tel",g);CKEDITOR.dialog.addUIElement("textarea",e);CKEDITOR.dialog.addUIElement("checkbox",e);CKEDITOR.dialog.addUIElement("radio",e);CKEDITOR.dialog.addUIElement("button",e);CKEDITOR.dialog.addUIElement("select",e);CKEDITOR.dialog.addUIElement("file",e);CKEDITOR.dialog.addUIElement("fileButton", 563e);CKEDITOR.dialog.addUIElement("html",e);CKEDITOR.dialog.addUIElement("fieldset",{build:function(b,c,a){for(var e=c.children,h,g=[],k=[],m=0;m<e.length&&(h=e[m]);m++){var l=[];g.push(l);k.push(CKEDITOR.dialog._.uiElementBuilders[h.type].build(b,h,l))}return new CKEDITOR.ui.dialog[c.type](b,k,g,a,c)}})}});CKEDITOR.DIALOG_RESIZE_NONE=0;CKEDITOR.DIALOG_RESIZE_WIDTH=1;CKEDITOR.DIALOG_RESIZE_HEIGHT=2;CKEDITOR.DIALOG_RESIZE_BOTH=3;CKEDITOR.DIALOG_STATE_IDLE=1;CKEDITOR.DIALOG_STATE_BUSY=2;(function(){function c(a){a._.tabBarMode= 564!0;a._.tabs[a._.currentTabId][0].focus();a._.currentFocusIndex=-1}function g(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId)+a,d=b-1;d>b-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function e(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;d<b+a;d++)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a]; 565return null}function b(a,b){for(var d=a.$.getElementsByTagName("input"),c=0,f=d.length;c<f;c++){var e=new CKEDITOR.dom.element(d[c]);"text"==e.getAttribute("type").toLowerCase()&&(b?(e.setAttribute("value",e.getCustomData("fake_value")||""),e.removeCustomData("fake_value")):(e.setCustomData("fake_value",e.getAttribute("value")),e.setAttribute("value","")))}}function h(a,b){var d=this.getInputElement();d&&(a?d.removeAttribute("aria-invalid"):d.setAttribute("aria-invalid",!0));a||(this.select?this.select(): 566this.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":""})),d=b.getChild([0,0,0,0,0]),c=d.getChild(0), 567f=d.getChild(1);a.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(d);!CKEDITOR.env.ie||CKEDITOR.env.quirks||CKEDITOR.env.edge||(a="javascript:void(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"}())",CKEDITOR.dom.element.createFromHtml('\x3ciframe frameBorder\x3d"0" class\x3d"cke_iframe_shim" src\x3d"'+a+'" tabIndex\x3d"-1"\x3e\x3c/iframe\x3e').appendTo(d.getParent()));c.unselectable();f.unselectable();return{element:b, 568parts:{dialog:b.getChild(0),title:c,close:f,tabs:d.getChild(2),contents:d.getChild([3,0,0,0]),footer:d.getChild([3,0,1,0])}}}function k(a,b,d){this.element=b;this.focusIndex=d;this.tabIndex=0;this.isFocusable=function(){return!b.getAttribute("disabled")&&b.isVisible()};this.focus=function(){a._.currentFocusIndex=this.focusIndex;this.element.focus()};
568b.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")})} 569function d(a){function b(){a.layout()}var d=CKEDITOR.document.getWindow();d.on("resize",b);a.on("hide",function(){d.removeListener("resize",b)})}function f(b,d){this.dialog=b;for(var c=d.contents,f=0,e;e=c[f];f++)c[f]=e&&new a(b,e);CKEDITOR.tools.extend(this,d)}function a(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function n(a){function b(d){var n=a.getSize(),k=a.parts.dialog.getParent().getClientSize(),m=d.data.$.screenX,l=d.data.$.screenY,t=m-c.x,q=l-c.y;c={x:m,y:l};f.x+=t;f.y+=q;m=f.x+ 570g[3]<h?-g[3]:f.x-g[1]>k.width-n.width-h?k.width-n.width+("rtl"==e.lang.dir?0:g[1]):f.x;n=f.y+g[0]<h?-g[0]:f.y-g[2]>k.height-n.height-h?k.height-n.height+g[2]:f.y;m=Math.floor(m);n=Math.floor(n);a.move(m,n,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=H.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,f=null,e=a.getParentEditor(), 571h=e.config.dialog_magnetDistance,g=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(e){if(!a._.moved){var h=a._.element;h.getFirst().setStyle("position","absolute");h.removeStyle("display");a._.moved=!0;a.layout()}c={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);f=a.getPosition();CKEDITOR.env.ie6Compat&&(h=H.getChild(0).getFrameDocument(),h.on("mousemove",b),h.on("mouseup",d));e.data.preventDefault()}, 572a)}function t(a){function b(d){var l="rtl"==e.lang.dir,t=m.width,q=m.height,K=t+(d.data.$.screenX-k.x)*(l?-1:1)*(a._.moved?1:2),u=q+(d.data.$.screenY-k.y)*(a._.moved?1:2),w=a._.element.getFirst(),w=l&&parseInt(w.getComputedStyle("right"),10),v=a.getPosition();v.x=v.x||0;v.y=v.y||0;v.y+u>n.height&&(u=n.height-v.y);(l?w:v.x)+K>n.width&&(K=n.width-(l?w:v.x));u=Math.floor(u);K=Math.floor(K);if(f==CKEDITOR.DIALOG_RESIZE_WIDTH||f==CKEDITOR.DIALOG_RESIZE_BOTH)t=Math.max(c.minWidth||0,K-h);if(f==CKEDITOR.DIALOG_RESIZE_HEIGHT|| 573f==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(c.minHeight||0,u-g);a.resize(t,q);a._.moved&&x(a,a._.position.x,a._.position.y);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);l&&(l.remove(),l=null);if(CKEDITOR.env.ie6Compat){var a=H.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,f=c.resizable;if(f!=CKEDITOR.DIALOG_RESIZE_NONE){var e= 574a.getParentEditor(),h,g,n,k,m,l,t=CKEDITOR.tools.addFunction(function(c){function f(a){return a.isVisible()}m=a.getSize();var e=a.parts.contents,t=e.$.getElementsByTagName("iframe").length,K=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);t&&(l=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'),e.append(l));g=m.height-a.parts.contents.getFirst(f).getSize("height",K); 575h=m.width-a.parts.contents.getFirst(f).getSize("width",1);k={x:c.screenX,y:c.screenY};n=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(e=H.getChild(0).getFrameDocument(),e.on("mousemove",b),e.on("mouseup",d));c.preventDefault&&c.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'+ 576b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+t+', event )"\x3e'+("ltr"==e.lang.dir?"â¢":"â£")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(t)})}}function x(a,b,d){var c=a.parts.dialog.getParent().getClientSize(),f=a.getSize(),e=a._.viewportRatio,h=Math.max(c.width-f.width,0),c=Math.max(c.height-f.height,0);e.width=h?b/h:e.width;e.height=c?d/c:e.height; 577a._.viewportRatio=e}function p(a){a.data.preventDefault(1)}function r(a){var b=a.config,d=CKEDITOR.skinName||a.config.skin,c=b.dialog_backgroundCoverColor||("moono-lisa"==d?"black":"white"),d=b.dialog_backgroundCoverOpacity,f=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(c,d,f),e=I[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");e?e.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%;", 578CKEDITOR.env.ie6Compat?"":"background-color: "+c,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(c="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+c+";\\'\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( '"+c+"' );document.close();")+"})())"),f.push('" style\x3d"position:absolute;
578left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')), 579f.push("\x3c/div\x3e"),e=CKEDITOR.dom.element.createFromHtml(f.join("")),e.setOpacity(void 0!==d?d:.5),e.on("keydown",p),e.on("keypress",p),e.on("keyup",p),e.appendTo(CKEDITOR.document.getBody()),I[b]=e);a.focusManager.add(e);H=e;CKEDITOR.env.mac&&CKEDITOR.env.webkit||e.focus()}function q(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");H&&(a.focusManager.remove(H),H.hide())}function z(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,c=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode); 580(b=L[(b?"CTRL+":"")+(d?"ALT+":"")+(c?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function u(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,d=a.data.$.altKey,c=a.data.$.shiftKey,f=String.fromCharCode(a.data.$.keyCode);(b=L[(b?"CTRL+":"")+(d?"ALT+":"")+(c?"SHIFT+":"")+f])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function A(a,b,d,c,f){(L[d]||(L[d]=[])).push({uiElement:a, 581dialog:b,key:d,keyup:f||a.accessKeyUp,keydown:c||a.accessKeyDown})}function w(a){for(var b in L){for(var d=L[b],c=d.length-1;0<=c;c--)d[c].dialog!=a&&d[c].uiElement!=a||d.splice(c,1);0===d.length&&delete L[b]}}function v(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function F(){}var B=CKEDITOR.tools.cssLength,C,H,E=!CKEDITOR.env.ie||CKEDITOR.env.edge,J='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(E?"display:flex": 582"")+'" 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"'+(E?"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'; 583CKEDITOR.dialog=function(a,b){function d(){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,c=0;c<b;c++)a[c].focusIndex=c}function k(a){var b=B._.focusList;a=a||0;if(!(1>b.length)){var d=B._.currentFocusIndex;B._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var f=d,e=1<B._.pageCount;do{f+=a;if(e&&!B._.tabBarMode&&(f==b.length||-1==f)){B._.tabBarMode=!0;B._.tabs[B._.currentTabId][0].focus(); 584B._.currentFocusIndex=-1;return}f=(f+b.length)%b.length;if(f==d)break}while(a&&!b[f].isFocusable());b[f].focus();"text"==b[f].type&&b[f].select()}}function q(b){if(B==CKEDITOR.dialog._.currentTop){var d=b.data.getKeystroke(),f="rtl"==a.lang.dir,h=[37,38,39,40];z=r=0;if(9==d||d==CKEDITOR.SHIFT+9)k(d==CKEDITOR.SHIFT+9?-1:1),z=1;else if(d==CKEDITOR.ALT+121&&!B._.tabBarMode&&1<B.getPageCount())c(B),z=1;else if(-1!=CKEDITOR.tools.indexOf(h,d)&&B._.tabBarMode)d=-1!=CKEDITOR.tools.indexOf([f?39:37,38],d)? 585g.call(B):e.call(B),B.selectPage(d),B._.tabs[d][0].focus(),z=1;else if(13!=d&&32!=d||!B._.tabBarMode)if(13==d)d=b.data.getTarget(),d.is("a","button","select","textarea")||d.is("input")&&"button"==d.$.type||((d=this.getButton("ok"))&&CKEDITOR.tools.setTimeout(d.click,0,d),z=1),r=1;else if(27==d)(d=this.getButton("cancel"))?CKEDITOR.tools.setTimeout(d.click,0,d):!1!==this.fire("cancel",{hide:!0}).hide&&this.hide(),r=1;else return;else this.selectPage(this._.currentTabId),this._.tabBarMode=!1,this._.currentFocusIndex= 586-1,k(1),z=1;u(b)}}function u(a){z?a.data.preventDefault(1):r&&a.data.stopPropagation()}var w=CKEDITOR.dialog._.dialogDefinitions[b],x=CKEDITOR.tools.clone(C),v=a.config.dialog_buttonsOrder||"OS",p=a.lang.dir,A={},z,r;("OS"==v&&CKEDITOR.env.mac||"rtl"==v&&"ltr"==p||"ltr"==v&&"rtl"==p)&&x.buttons.reverse();w=CKEDITOR.tools.extend(w(a),x);w=CKEDITOR.tools.clone(w);w=new f(this,w);x=l(a);this._={editor:a,element:x.element,name:b,model:null,contentSize:{
586width:0,height:0},size:{width:0,height:0},contents:{}, 587buttons:{},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"==p?"right":"left"]=0;this.parts.dialog.setStyles(x);CKEDITOR.event.call(this);this.definition=w=CKEDITOR.fire("dialogDefinition", 588{name:b,definition:w,dialog:this},a).definition;if(!("removeDialogTabs"in a._)&&a.config.removeDialogTabs){x=a.config.removeDialogTabs.split(";");for(p=0;p<x.length;p++)if(v=x[p].split(":"),2==v.length){var F=v[0];A[F]||(A[F]=[]);A[F].push(v[1])}a._.removeDialogTabs=A}if(a._.removeDialogTabs&&(A=a._.removeDialogTabs[b]))for(p=0;p<A.length;p++)w.removeContents(A[p]);if(w.onLoad)this.on("load",w.onLoad);if(w.onShow)this.on("show",w.onShow);if(w.onHide)this.on("hide",w.onHide);if(w.onOk)this.on("ok", 589function(b){a.fire("saveSnapshot");setTimeout(function(){a.fire("saveSnapshot")},0);!1===w.onOk.call(this,b)&&(b.data.hide=!1)});this.state=CKEDITOR.DIALOG_STATE_IDLE;if(w.onCancel)this.on("cancel",function(a){!1===w.onCancel.call(this,a)&&(a.data.hide=!1)});var B=this,H=function(a){var b=B._.contents,d=!1,c;for(c in b)for(var f in b[c])if(d=a.call(this,b[c][f]))return};this.on("ok",function(a){H(function(b){if(b.validate){var d=b.validate(this),c="string"==typeof d||!1===d;c&&(a.data.hide=!1,a.stop()); 590h.call(b,!c,"string"==typeof d?d:void 0);return c}})},this,null,0);this.on("cancel",function(b){H(function(d){if(d.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 G=this._.element;a.focusManager.add(G,1);this.on("show",function(){G.on("keydown",q,this);if(CKEDITOR.env.gecko)G.on("keypress", 591u,this)});this.on("hide",function(){G.removeListener("keydown",q);CKEDITOR.env.gecko&&G.removeListener("keypress",u);H(function(a){m.apply(a)})});this.on("iframeAdded",function(a){(new CKEDITOR.dom.document(a.data.iframe.$.contentWindow.document)).on("keydown",q,this,null,0)});this.on("show",function(){d();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- 5921,w.onFocus?(b=w.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);t(this);(new CKEDITOR.dom.text(w.title,CKEDITOR.document)).appendTo(this.parts.title);for(p=0;p<w.contents.length;p++)(A=w.contents[p])&&this.addPage(A);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("_"))), 593c(this),a.data.preventDefault())},this);p=[];A=CKEDITOR.dialog._.uiElementBuilders.hbox.build(this,{type:"hbox",className:"cke_dialog_footer_buttons",widths:[],children:w.buttons},p).getChild();this.parts.footer.setHtml(p.join(""));for(p=0;p<A.length;p++)this._.buttons[A[p].id]=A[p]};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", 594{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 d=this.parts.dialog.getParent().getClientSize().width;this._.position.x=d-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|| 5950}},move:function(a,b,d){var c=this._.element.getFirst(),f="rtl"==this._.editor.lang.dir;CKEDITOR.env.ie&&c.setStyle("zoom","100%");var e=this.parts.dialog.getParent().getClientSize(),h=this.getSize(),g=this._.viewportRatio,n=Math.max(e.width-h.width,0),e=Math.max(e.height-h.height,0);this._.position&&this._.position.x==a&&this._.position.y==b?(a=Math.floor(n*g.width),b=Math.floor(e*g.height)):x(this,a,b);this._.position={x:a,y:b};f&&(a=n-a);b={top:(0<b?b:0)+"px"};b[f?"right":"left"]=(0<a?a:0)+"px"; 596c.setStyles(b);d&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)},show:function(){var a=this._.element,b=this.definition,c=CKEDITOR.document.getBody(),f=this._.editor.config.baseFloatZIndex;a.getParent()&&a.getParent().equals(c)?a.setStyle("display",E?"flex":"block"):a.appendTo(c);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&& 597this.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,r(this._.editor)):(this._.parentDialog=CKEDITOR.dialog._.currentTop,c=this._.parentDialog.getElement().getFirst(),c.$.style.zIndex-= 598Math.floor(f/2),this._.parentDialog.getElement().setStyle("z-index",c.$.style.zIndex),CKEDITOR.dialog._.currentTop=this);a.on("keydown",z);a.on("keyup",u);this._.hasFocus=!1;for(var e in b.contents)if(b.contents[e]){var a=b.contents[e],f=this._.tabs[a.id],c=a.requiredContent,h=0;if(f){for(var g in this._.contents[a.id]){var n=this._.contents[a.id][g];
vendor: 4,899 bytes, lines 598-608
598"hbox"!=n.type&&"vbox"!=n.type&&n.getInputElement()&&(n.requiredContent&&!this._.editor.activeFilter.check(n.requiredContent)?n.disable():(n.enable(), 599h++))}!h||c&&!this._.editor.activeFilter.check(c)?f[0].addClass("cke_dialog_tab_disabled"):f[0].removeClass("cke_dialog_tab_disabled")}}CKEDITOR.tools.setTimeout(function(){this.layout();d(this);this.parts.dialog.setStyle("visibility","");this.fireOnce("load",{});CKEDITOR.ui.fire("ready",this);this.fire("show",{});this._.editor.fire("dialogShow",this);this._.parentDialog||this._.editor.focusManager.lock();this.foreach(function(a){a.setInitValue&&a.setInitValue()})},100,this)},layout:function(){var a= 600this.parts.dialog;if(this._.moved||!E){var b=this.getSize(),d=CKEDITOR.document.getWindow().getViewPaneSize(),c;this._.moved&&this._.position?(c=this._.position.x,b=this._.position.y):(c=(d.width-b.width)/2,b=(d.height-b.height)/2);CKEDITOR.env.ie6Compat||(a.setStyle("position","absolute"),a.removeStyle("margin"));c=Math.floor(c);b=Math.floor(b);this.move(c,b)}},foreach:function(a){for(var b in this._.contents)for(var d in this._.contents[b])a.call(this,this._.contents[b][d]);return this},reset:function(){var a= 601function(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]); 602var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(w(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 q(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-= 60310;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",z);a.removeListener("keyup",u);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],d=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+ 604'"':"",c=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents",children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),f=this._.contents[a.id]={},e=c.getChild(),h=0;c=e.shift();)c.notAllowed||"hbox"==c.type||"vbox"==c.type||h++,f[c.id]=c,"function"==typeof c.getChild&&e.push.apply(e,c.getChild());h||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");b.setStyle("min-height", 605"100%");c=CKEDITOR.env;f="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0<this._.pageCount?" cke_last":"cke_first",d,a.hidden?' style\x3d"display:none"':"",' id\x3d"',f,'"',c.gecko&&!c.hc?"":' href\x3d"javascript:void(0)"',' tabIndex\x3d"-1" hidefocus\x3d"true" role\x3d"tab"\x3e',a.label,"\x3c/a\x3e"].join(""));b.setAttribute("aria-labelledby",f);this._.tabs[a.id]=[d,b];this._.tabIdList.push(a.id);!a.hidden&&this._.pageCount++; 606this._.lastTab=d;this.updateStyle();b.setAttribute("name",a.id);b.appendTo(this.parts.contents);d.unselectable();this.parts.tabs.append(d);a.accessKey&&(A(this,this,"CTRL+"+a.accessKey,F,v),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 d in this._.tabs){var c=this._.tabs[d][0],f=this._.tabs[d][1];d!=a&&(c.removeClass("cke_dialog_tab_selected"), 607f.hide());f.setAttribute("aria-hidden",d!=a)}var e=this._.tabs[a];e[0].addClass("cke_dialog_tab_selected");CKEDITOR.env.ie6Compat||CKEDITOR.env.ie7Compat?(b(e[1]),e[1].show(),setTimeout(function(){b(e[1],1)},0)):e[1].show();this._.currentTabId=a;this._.currentTabIndex=CKEDITOR.tools.indexOf(this._.tabIdList,a)}},updateStyle:function(){this.parts.dialog[(1===this._.pageCount?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(a){var b=this._.tabs[a]&&this._.tabs[a][0];b&&1!=this._.pageCount&& 608b.isVisible()&&(a==this._.currentTabId&&this.selectPage(g.call(this)),b.hide(),this._.pageCount--,this.updateStyle())}
vendor: 6,345 bytes, lines 608-620
608,showPage:function(a){if(a=this._.tabs[a]&&this._.tabs[a][0])a.show(),this._.pageCount++,this.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(a,b){var d=this._.contents[a];return d&&d[b]},getValueOf:function(a,b){return this.getContentElement(a,b).getValue()},setValueOf:function(a,b,d){return this.getContentElement(a, 609b).setValue(d)},getButton:function(a){return this._.buttons[a]},click:function(a){return this._.buttons[a].click()},disableButton:function(a){return this._.buttons[a].disable()},enableButton:function(a){return this._.buttons[a].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(a,b){if("undefined"==typeof b)b=this._.focusList.length, 610this._.focusList.push(new k(this,a,b));else{this._.focusList.splice(b,0,new k(this,a,b));for(var d=b+1;d<this._.focusList.length;d++)this._.focusList[d].focusIndex++}},setState:function(a){if(this.state!=a){this.state=a;if(a==CKEDITOR.DIALOG_STATE_BUSY){if(!this.parts.spinner){var b=this.getParentEditor().lang.dir,d={attributes:{"class":"cke_dialog_spinner"},styles:{"float":"rtl"==b?"right":"left"}};d.styles["margin-"+("rtl"==b?"left":"right")]="8px";this.parts.spinner=CKEDITOR.document.createElement("div", 611d);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); 612a=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,d){a=a.config.removeDialogTabs;return!(a&&a.match(new RegExp("(?:^|;)"+ 613b+":"+d+"(?:$|;)","i")))},okButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"ok",type:"button",label:a.lang.common.ok,"class":"cke_dialog_ui_button_ok",onClick:function(a){a=a.data.dialog;!1!==a.fire("ok",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(d){return a(d,b)},{type:"button"},!0)};return a}(),cancelButton:function(){var a=function(a,b){b=b||{};return CKEDITOR.tools.extend({id:"cancel",type:"button", 614label:a.lang.common.cancel,"class":"cke_dialog_ui_button_cancel",onClick:function(a){a=a.data.dialog;!1!==a.fire("cancel",{hide:!0}).hide&&a.hide()}},b,!0)};a.type="button";a.override=function(b){return CKEDITOR.tools.extend(function(d){return a(d,b)},{type:"button"},!0)};return a}(),addUIElement:function(a,b){this._.uiElementBuilders[a]=b}});CKEDITOR.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};CKEDITOR.event.implementOn(CKEDITOR.dialog);CKEDITOR.event.implementOn(CKEDITOR.dialog.prototype); 615C={resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:600,minHeight:400,buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton]};var G=function(a,b,d){for(var c=0,f;f=a[c];c++)if(f.id==b||d&&f[d]&&(f=G(f[d],b,d)))return f;return null},D=function(a,b,d,c,f){if(d){for(var e=0,h;h=a[e];e++){if(h.id==d)return a.splice(e,0,b),b;if(c&&h[c]&&(h=D(h[c],b,d,c,!0)))return h}if(f)return null}a.push(b);return b},P=function(a,b,d){for(var c=0,f;f=a[c];c++){if(f.id==b)return a.splice(c,1);if(d&&f[d]&&(f=P(f[d], 616b,d)))return f}return null};f.prototype={getContents:function(a){return G(this.contents,a)},getButton:function(a){return G(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){P(this.contents,a)},removeButton:function(a){P(this.buttons,a)}};a.prototype={get:function(a){return G(this.elements,a,"children")},add:function(a,b){return D(this.elements,a,b,"children")},remove:function(a){P(this.elements,a, 617"children")}};var I={},L={};(function(){CKEDITOR.ui.dialog={uiElement:function(a,b,d,c,f,e,h){if(!(4>arguments.length)){var g=(c.call?c(b):c)||"div",n=["\x3c",g," "],k=(f&&f.call?f(b):f)||{},m=(e&&e.call?e(b):e)||{},l=(h&&h.call?h.call(this,a,b):h)||"",t=this.domId=m.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(k.display="none",this.notAllowed=!0);m.id=t;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]= 6181);b.disabled&&(q.cke_disabled=1);for(var u=m["class"]&&m["class"].split?m["class"].split(" "):[],t=0;t<u.length;t++)u[t]&&(q[u[t]]=1);u=[];for(t in q)u.push(t);m["class"]=u.join(" ");b.title&&(m.title=b.title);q=(b.style||"").split(";");b.align&&(u=b.align,k["margin-left"]="left"==u?0:"auto",k["margin-right"]="right"==u?0:"auto");for(t in k)q.push(t+":"+k[t]);b.hidden&&q.push("display:none");for(t=q.length-1;0<=t;t--)""===q[t]&&q.splice(t,1);0<q.length&&(m.style=(m.style?m.style+"; ":"")+q.join("; ")); 619for(t in m)n.push(t+'\x3d"'+CKEDITOR.tools.htmlEncode(m[t])+'" ');n.push("\x3e",l,"\x3c/",g,"\x3e");d.push(n.join(""));(this._||(this._={})).dialog=a;"boolean"==typeof b.isChanged&&(this.isChanged=function(){return b.isChanged});"function"==typeof b.isChanged&&(this.isChanged=b.isChanged);"function"==typeof b.setValue&&(this.setValue=CKEDITOR.tools.override(this.setValue,function(a){return function(d){a.call(this,b.setValue.call(this,d))}}));"function"==typeof b.getValue&&(this.getValue=CKEDITOR.tools.override(this.getValue, 620function(a){return function(){return b.getValue.call(this,a.call(this))}}));CKEDITOR.event.implementOn(this);this.registerEvents(b);this.accessKeyUp&&this.accessKeyDown&&b.accessKey&&A(this,a,"CTRL+"+b.accessKey);var w=this;a.on("load",function(){var b=w.getInputElement();
vendor: 4,336 bytes, lines 620-628
620if(b){var d=w.type in{checkbox:1,ratio:1}&&CKEDITOR.env.ie&&8>CKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;w.fire("focus");d&&this.addClass(d)});b.on("blur",function(){w.fire("blur"); 621d&&this.removeClass(d)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=w.focusIndex}))}},hbox:function(a,b,d,c,f){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,h=f&&f.widths||null,g=f&&f.height||null,n,k={role:"presentation"};f&&f.align&&(k.align=f.align);CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"hbox"},c,"table",{},k,function(){var a= 622['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(n=0;n<d.length;n++){var b="cke_dialog_ui_hbox_child",c=[];0===n&&(b="cke_dialog_ui_hbox_first");n==d.length-1&&(b="cke_dialog_ui_hbox_last");a.push('\x3ctd class\x3d"',b,'" role\x3d"presentation" ');h?h[n]&&c.push("width:"+B(h[n])):c.push("width:"+Math.floor(100/d.length)+"%");g&&c.push("height:"+B(g));f&&void 0!==f.padding&&c.push("padding:"+B(f.padding));CKEDITOR.env.ie&&CKEDITOR.env.quirks&&e[n].align&&c.push("text-align:"+e[n].align); 6230<c.length&&a.push('style\x3d"'+c.join("; ")+'" ');a.push("\x3e",d[n],"\x3c/td\x3e")}a.push("\x3c/tr\x3e\x3c/tbody\x3e");return a.join("")})}},vbox:function(a,b,d,c,f){if(!(3>arguments.length)){this._||(this._={});var e=this._.children=b,h=f&&f.width||null,g=f&&f.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,f||{type:"vbox"},c,"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%;"); 624b.push("width:"+B(h||"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 c=0;c<d.length;c++){var n=[];b.push('\x3ctr\x3e\x3ctd role\x3d"presentation" ');h&&n.push("width:"+B(h||"100%"));g?n.push("height:"+B(g[c])):f&&f.expand&&n.push("height:"+Math.floor(100/d.length)+"%");f&&void 0!==f.padding&&n.push("padding:"+B(f.padding));CKEDITOR.env.ie&& 625CKEDITOR.env.quirks&&e[c].align&&n.push("text-align:"+e[c].align);0<n.length&&b.push('style\x3d"',n.join("; "),'" ');b.push(' class\x3d"cke_dialog_ui_vbox_child"\x3e',d[c],"\x3c/td\x3e\x3c/tr\x3e")}b.push("\x3c/tbody\x3e\x3c/table\x3e");return b.join("")})}}}})();CKEDITOR.ui.dialog.uiElement.prototype={getElement:function(){return CKEDITOR.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(a,b){this.getInputElement().setValue(a); 626!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= 627/^on([A-Z]\w+)/,d,c=function(a,b,d,c){b.on("load",function(){a.getInputElement().on(d,c,a)})},f;for(f in a)if(d=f.match(b))this.eventProcessors[f]?this.eventProcessors[f].call(this,this._.dialog,a[f]):c(this,this._.dialog,d[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(); 628this.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,
629{getChild:function(a){if(1>arguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,d){for(var c=b.children,f,e=[],h=[],g=0;g<c.length&&(f=c[g]);g++){var n=[];e.push(n);h.push(CKEDITOR.dialog._.uiElementBuilders[f.type].build(a,f,n))}return new CKEDITOR.ui.dialog[b.type](a, 630h,e,d,b)}};CKEDITOR.dialog.addUIElement("hbox",a);CKEDITOR.dialog.addUIElement("vbox",a)})();CKEDITOR.dialogCommand=function(a,b){this.dialogName=a;CKEDITOR.tools.extend(this,b,!0)};CKEDITOR.dialogCommand.prototype={exec:function(a){var b=this.tabId;a.openDialog(this.dialogName,function(a){b&&a.selectPage(b)})},canUndo:!1,editorFocus:1};(function(){var a=/^([a]|[^a])+$/,b=/^\d*$/,d=/^\d*(?:\.\d+)?$/,c=/^(((\d*(\.\d+))|(\d*))(px|\%)?)?$/,f=/^(((\d*(\.\d+))|(\d*))(px|em|ex|in|cm|mm|pt|pc|\%)?)?$/i, 631e=/^(\s*[\w-]+\s*:\s*[^:;]+(?:;|$))*$/;CKEDITOR.VALIDATE_OR=1;CKEDITOR.VALIDATE_AND=2;CKEDITOR.dialog.validate={functions:function(){var a=arguments;return function(){var b=this&&this.getValue?this.getValue():a[0],d,c=CKEDITOR.VALIDATE_AND,f=[],e;for(e=0;e<a.length;e++)if("function"==typeof a[e])f.push(a[e]);else break;e<a.length&&"string"==typeof a[e]&&(d=a[e],e++);e<a.length&&"number"==typeof a[e]&&(c=a[e]);var h=c==CKEDITOR.VALIDATE_AND?!0:!1;for(e=0;e<f.length;e++)h=c==CKEDITOR.VALIDATE_AND?h&& 632f[e](b):h||f[e](b);return h?!0:d}},regex:function(a,b){return function(d){d=this&&this.getValue?this.getValue():d;return a.test(d)?!0:b}},notEmpty:function(b){return this.regex(a,b)},integer:function(a){return this.regex(b,a)},number:function(a){return this.regex(d,a)},cssLength:function(a){return this.functions(function(a){return f.test(CKEDITOR.tools.trim(a))},a)},htmlLength:function(a){return this.functions(function(a){return c.test(CKEDITOR.tools.trim(a))},a)},inlineStyle:function(a){return this.functions(function(a){return e.test(CKEDITOR.tools.trim(a))}, 633a)},equals:function(a,b){return this.functions(function(b){return b==a},b)},notEqual:function(a,b){return this.functions(function(b){return b!=a},b)}};CKEDITOR.on("instanceDestroyed",function(a){if(CKEDITOR.tools.isEmpty(CKEDITOR.instances)){for(var b;b=CKEDITOR.dialog._.currentTop;)b.hide();for(var d in I)I[d].remove();I={}}a=a.editor._.storedDialogs;for(var c in a)a[c].destroy()})})();CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{openDialog:function(a,b,d){var c=null,f=CKEDITOR.dialog._.dialogDefinitions[a]; 634null===CKEDITOR.dialog._.currentTop&&r(this);if("function"==typeof f)f=this._.storedDialogs||(this._.storedDialogs={}),c=f[a]||(f[a]=new CKEDITOR.dialog(this,a)),c.setModel(d),b&&b.call(c,c),c.show();else{if("failed"==f)throw q(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"); 635this.openDialog(a,b,d)},this,0,1)}CKEDITOR.skin.loadPart("dialog");if(c)c.once("hide",function(){c.setModel(null)},null,null,999);return c}})})();var ha=!1;CKEDITOR.plugins.add("dialog",{requires:"dialogui",init:function(c){ha||(CKEDITOR.document.appendStyleSheet(this.path+"styles/dialog.css"),ha=!0);c.on("doubleclick",function(g){g.data.dialog&&c.openDialog(g.data.dialog)},null,null,999)}});"use strict";(function(){function c(c,b){CKEDITOR.tools.extend(this,b,{editor:c,id:"cke-"+CKEDITOR.tools.getUniqueId(), 636area:c._.notificationArea});
vendor: 13,251 bytes, lines 636-661
636b.type||(this.type="info");this.element=this._createElement();c.plugins.clipboard&&CKEDITOR.plugins.clipboard.preventDefaultDropOnElement(this.element)}function g(c){var b=this;this.editor=c;this.notifications=[];this.element=this._createElement();this._uiBuffer=CKEDITOR.tools.eventsBuffer(10,this._layout,this);this._changeBuffer=CKEDITOR.tools.eventsBuffer(500,this._layout,this);c.on("destroy",function(){b._removeListeners();b.element.remove()})}CKEDITOR.plugins.add("notification", 637{init:function(c){function b(b){var c=new CKEDITOR.dom.element("div");c.setStyles({position:"fixed","margin-left":"-9999px"});c.setAttributes({"aria-live":"assertive","aria-atomic":"true"});c.setText(b);CKEDITOR.document.getBody().append(c);setTimeout(function(){c.remove()},100)}c._.notificationArea=new g(c);c.showNotification=function(b,g,l){var k,d;"progress"==g?k=l:d=l;b=new CKEDITOR.plugins.notification(c,{message:b,type:g,progress:k,duration:d});b.show();return b};c.on("key",function(h){if(27== 638h.data.keyCode){var g=c._.notificationArea.notifications;g.length&&(b(c.lang.notification.closed),g[g.length-1].hide(),h.cancel())}})}});c.prototype={show:function(){!1!==this.editor.fire("notificationShow",{notification:this})&&(this.area.add(this),this._hideAfterTimeout())},update:function(c){var b=!0;!1===this.editor.fire("notificationUpdate",{notification:this,options:c})&&(b=!1);var h=this.element,g=h.findOne(".cke_notification_message"),l=h.findOne(".cke_notification_progress"),k=c.type;h.removeAttribute("role"); 639c.progress&&"progress"!=this.type&&(k="progress");k&&(h.removeClass(this._getClass()),h.removeAttribute("aria-label"),this.type=k,h.addClass(this._getClass()),h.setAttribute("aria-label",this.type),"progress"!=this.type||l?"progress"!=this.type&&l&&l.remove():(l=this._createProgressElement(),l.insertBefore(g)));void 0!==c.message&&(this.message=c.message,g.setHtml(this.message));void 0!==c.progress&&(this.progress=c.progress,l&&l.setStyle("width",this._getPercentageProgress()));b&&c.important&&(h.setAttribute("role", 640"alert"),this.isVisible()||this.area.add(this));this.duration=c.duration;this._hideAfterTimeout()},hide:function(){!1!==this.editor.fire("notificationHide",{notification:this})&&this.area.remove(this)},isVisible:function(){return 0<=CKEDITOR.tools.indexOf(this.area.notifications,this)},_createElement:function(){var c=this,b,h,g=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}); 641"progress"==this.type&&b.append(this._createProgressElement());h=new CKEDITOR.dom.element("p");h.addClass("cke_notification_message");h.setHtml(this.message);b.append(h);h=CKEDITOR.dom.element.createFromHtml('\x3ca class\x3d"cke_notification_close" href\x3d"javascript:void(0)" title\x3d"'+g+'" role\x3d"button" tabindex\x3d"-1"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e');b.append(h);h.on("click",function(){c.editor.focus();c.hide()});return b},_getClass:function(){return"progress"== 642this.type?"cke_notification_info":"cke_notification_"+this.type},_createProgressElement:function(){var c=new CKEDITOR.dom.element("span");c.addClass("cke_notification_progress");c.setStyle("width",this._getPercentageProgress());return c},_getPercentageProgress:function(){return Math.round(100*(this.progress||0))+"%"},_hideAfterTimeout:function(){var c=this,b;this._hideTimeoutId&&clearTimeout(this._hideTimeoutId);if("number"==typeof this.duration)b=this.duration;else if("info"==this.type||"success"== 643this.type)b="number"==typeof this.editor.config.notification_duration?this.editor.config.notification_duration:5E3;b&&(c._hideTimeoutId=setTimeout(function(){c.hide()},b))}};g.prototype={add:function(c){this.notifications.push(c);this.element.append(c.element);1==this.element.getChildCount()&&(CKEDITOR.document.getBody().append(this.element),this._attachListeners());this._layout()},remove:function(c){var b=CKEDITOR.tools.indexOf(this.notifications,c);0>b||(this.notifications.splice(b,1),c.element.remove(), 644this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var c=this.editor,b=c.config,h=new CKEDITOR.dom.element("div");h.addClass("cke_notifications_area");h.setAttribute("id","cke_notifications_area_"+c.name);h.setStyle("z-index",b.baseFloatZIndex-2);return h},_attachListeners:function(){var c=CKEDITOR.document.getWindow(),b=this.editor;c.on("scroll",this._uiBuffer.input);c.on("resize",this._uiBuffer.input);b.on("change",this._changeBuffer.input); 645b.on("floatingSpaceLayout",this._layout,this,null,20);b.on("blur",this._layout,this,null,20)},_removeListeners:function(){var c=CKEDITOR.document.getWindow(),b=this.editor;c.removeListener("scroll",this._uiBuffer.input);c.removeListener("resize",this._uiBuffer.input);b.removeListener("change",this._changeBuffer.input);b.removeListener("floatingSpaceLayout",this._layout);b.removeListener("blur",this._layout)},_layout:function(){function c(){b.setStyle("left",z(u+g.width-n-t))}var b=this.element,h= 646this.editor,g=h.ui.contentsElement.getClientRect(),l=h.ui.contentsElement.getDocumentPosition(),k,d,f=b.getClientRect(),a,n=this._notificationWidth,t=this._notificationMargin;a=CKEDITOR.document.getWindow();var x=a.getScrollPosition(),p=a.getViewPaneSize(),r=CKEDITOR.document.getBody(),q=r.getDocumentPosition(),z=CKEDITOR.tools.cssLength;n&&t||(a=this.element.getChild(0),n=this._notificationWidth=a.getClientRect().width,t=this._notificationMargin=parseInt(a.getComputedStyle("margin-left"),10)+parseInt(a.getComputedStyle("margin-right"), 64710));h.toolbar&&(k=h.ui.space("top"),d=k.getClientRect());k&&k.isVisible()&&d.bottom>g.top&&d.bottom<g.bottom-f.height?b.setStyles({position:"fixed",top:z(d.bottom)}):0<g.top?b.setStyles({position:"absolute",top:z(l.y)}):l.y+g.height-f.height>x.y?b.setStyles({position:"fixed",top:0}):b.setStyles({position:"absolute",top:z(l.y+g.height-f.height)});var u="fixed"==b.getStyle("position")?g.left:"static"!=r.getComputedStyle("position")?l.x-q.x:l.x;g.width<n+t?l.x+n+t>x.x+p.width?c():b.setStyle("left", 648z(u)):l.x+n+t>x.x+p.width?b.setStyle("left",z(u)):l.x+g.width/2+n/2+t>x.x+p.width?b.setStyle("left",z(u-l.x+x.x+p.width-n-t)):0>g.left+g.width-n-t?c():0>g.left+g.width/2-n/2?b.setStyle("left",z(u-l.x+x.x)):b.setStyle("left",z(u+g.width/2-n/2-t/2))}};CKEDITOR.plugins.notification=c})();(function(){var c='\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}"'; 649CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var g="";CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+g+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ 650'\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',e=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),b=CKEDITOR.addTemplate("button",c);CKEDITOR.plugins.add("button",{beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_BUTTON, 651CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(b){CKEDITOR.tools.extend(this,b,{title:b.label,click:b.click||function(c){c.execCommand(b.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(b){return new CKEDITOR.ui.button(b)}};CKEDITOR.ui.button.prototype={render:function(c,g){function l(){var a=c.mode;a&&(a=this.modes[a]?void 0!==k[a]?k[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=c.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED: 652a,this.setState(a),this.refresh&&this.refresh())}var k=null,d=CKEDITOR.env,f=this._.id=CKEDITOR.tools.getNextId(),a="",n=this.command,t,x,p;this._.editor=c;var r={id:f,button:this,editor:c,focus:function(){CKEDITOR.document.getById(f).focus()},execute:function(){this.button.click(c)},attach:function(a){this.button.attach(a)}},q=CKEDITOR.tools.addFunction(function(a){if(r.onkey)return a=new CKEDITOR.dom.event(a),!1!==r.onkey(r,a.getKeystroke())}),z=CKEDITOR.tools.addFunction(function(a){var b;r.onfocus&& 653(b=!1!==r.onfocus(r,new CKEDITOR.dom.event(a)));return b}),u=0;r.clickFn=t=CKEDITOR.tools.addFunction(function(){u&&(c.unlockSelection(1),u=0);r.execute();d.iOS&&c.focus()});this.modes?(k={},c.on("beforeModeUnload",function(){c.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(k[c.mode]=this._.state)},this),c.on("activeFilterChange",l,this),c.on("mode",l,this),!this.readOnly&&c.on("readOnly",l,this)):n&&(n=c.getCommand(n))&&(n.on("state",function(){this.setState(n.state)},this),a+=n.state==CKEDITOR.TRISTATE_ON? 654"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var A;if(this.directional)c.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),d=b.getFirst();a=a.data;a!=c.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(A,"rtl"==a,this.icon,this.iconOffset))},this);n?(x=c.getCommandKeystroke(n))&&(p=CKEDITOR.tools.keystrokeToString(c.lang.common.keyboard,x)):a+="off";x=this.name||this.command;var w= 655null,v=this.icon;A=x;this.icon&&!/\./.test(this.icon)?(A=this.icon,v=null):(this.icon&&(w=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(w=this.iconHiDpi));w?(CKEDITOR.skin.addIcon(w,w),v=null):w=A;a={id:f,name:x,iconName:A,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:a,ariaDisabled:"disabled"==a?"true":"false",title:this.title+(p?" ("+p.display+")":""),ariaShortcut:p?c.lang.common.keyboardShortcut+" "+p.aria:"",titleJs:d.gecko&&!d.hc?"":(this.title|| 656"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:q,focusFn:z,clickFn:t,style:CKEDITOR.skin.getIconStyle(w,"rtl"==c.lang.dir,v,this.iconOffset),arrowHtml:this.hasArrow?e.output():""};b.output(a,g);if(this.onRender)this.onRender();return r},setState:function(b){if(this._.state==b)return!1;this._.state=b;var c=CKEDITOR.document.getById(this._.id);return c?(c.setState(b,"cke_button"),c.setAttribute("aria-disabled",b==CKEDITOR.TRISTATE_DISABLED), 657this.hasArrow?c.setAttribute("aria-expanded",b==CKEDITOR.TRISTATE_ON):b===CKEDITOR.TRISTATE_ON?c.setAttribute("aria-pressed",!0):c.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(b){if(this._.feature)return this._.feature;var c=this;this.allowedContent||this.requiredContent||!this.command||(c=b.getCommand(this.command)||c);return this._.feature=c}};CKEDITOR.ui.prototype.addButton=function(b,c){this.add(b,CKEDITOR.UI_BUTTON,c)}})();(function(){function c(b){function c(){for(var a= 658e(),d=CKEDITOR.tools.clone(b.config.toolbarGroups)||g(b),f=0;f<d.length;f++){var m=d[f];if("/"!=m){"string"==typeof m&&(m=d[f]={name:m});var r,q=m.groups;if(q)for(var z=0;z<q.length;z++)r=q[z],(r=a[r])&&k(m,r);(r=a[m.name])&&k(m,r)}}return d}function e(){var a={},d,c,f;for(d in b.ui.items)c=b.ui.items[d],f=c.toolbar||"others",f=f.split(","),c=f[0],f=parseInt(f[1]||-1,10),a[c]||(a[c]=[]),a[c].push({name:d,order:f});for(c in a)a[c]=a[c].sort(function(a,b){return a.order==b.order?0:0>b.order?-1:0>a.order? 6591:a.order<b.order?-1:1});return a}function k(a,d){if(d.length){a.items?a.items.push(b.ui.create("-")):a.items=[];for(var c;c=d.shift();)c="string"==typeof c?c:c.name,f&&-1!=CKEDITOR.tools.indexOf(f,c)||(c=b.ui.create(c))&&b.addFeature(c)&&a.items.push(c)}}function d(a){var b=[],d,c,f;for(d=0;d<a.length;++d)c=a[d],f={},"/"==c?b.push(c):CKEDITOR.tools.isArray(c)?(k(f,CKEDITOR.tools.clone(c)),b.push(f)):c.items&&(k(f,CKEDITOR.tools.clone(c.items)),f.name=c.name,b.push(f));return b}var f=b.config.removeButtons, 660f=f&&f.split(","),a=b.config.toolbar;"string"==typeof a&&(a=b.config["toolbar_"+a]);return b.toolbar=a?d(a):c()}function g(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"}, 661"/",{name:"styles"},{name:"colors"},{name:"tools"},{name:"others"},{name:"about"}])}var e=function(){this.toolbars=[];this.focusCommandExecuted=!1};
vendor: 6,106 bytes, lines 661-673
661e.prototype.focus=function(){for(var b=0,c;c=this.toolbars[b++];)for(var e=0,g;g=c.items[e++];)if(g.focus){g.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", 662{requires:"button",init:function(h){var g,l=function(b,c){var f,a="rtl"==h.lang.dir,e=h.config.toolbarGroupCycling,t=a?37:39,a=a?39:37,e=void 0===e||e;switch(c){case 9:case CKEDITOR.SHIFT+9:for(;!f||!f.items.length;)if(f=9==c?(f?f.next:b.toolbar.next)||h.toolbox.toolbars[0]:(f?f.previous:b.toolbar.previous)||h.toolbox.toolbars[h.toolbox.toolbars.length-1],f.items.length)for(b=f.items[g?f.items.length-1:0];b&&!b.focus;)(b=g?b.previous:b.next)||(f=0);b&&b.focus();return!1;case t:f=b;do f=f.next,!f&& 663e&&(f=b.toolbar.items[0]);while(f&&!f.focus);f?f.focus():l(b,9);return!1;case 40:return b.button&&b.button.hasArrow?b.execute():l(b,40==c?t:a),!1;case a:case 38:f=b;do f=f.previous,!f&&e&&(f=b.toolbar.items[b.toolbar.items.length-1]);while(f&&!f.focus);f?f.focus():(g=1,l(b,CKEDITOR.SHIFT+9),g=0);return!1;case 27:return h.focus(),!1;case 13:case 32:return b.execute(),!1}return!0};h.on("uiSpace",function(b){if(b.data.space==h.config.toolbarLocation){b.removeListener();h.toolbox=new e;var d=CKEDITOR.tools.getNextId(), 664f=['\x3cspan id\x3d"',d,'" class\x3d"cke_voice_label"\x3e',h.lang.toolbar.toolbars,"\x3c/span\x3e",'\x3cspan id\x3d"'+h.ui.spaceId("toolbox")+'" class\x3d"cke_toolbox" role\x3d"group" aria-labelledby\x3d"',d,'" onmousedown\x3d"return false;"\x3e'],d=!1!==h.config.toolbarStartupExpanded,a,g;h.config.toolbarCanCollapse&&h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&f.push('\x3cspan class\x3d"cke_toolbox_main"'+(d?"\x3e":' style\x3d"display:none"\x3e'));for(var m=h.toolbox.toolbars,x=c(h),p=x.length, 665r=0;r<p;r++){var q,z=0,u,A=x[r],w="/"!==A&&("/"===x[r+1]||r==p-1),v;if(A)if(a&&(f.push("\x3c/span\x3e"),g=a=0),"/"===A)f.push('\x3cspan class\x3d"cke_toolbar_break"\x3e\x3c/span\x3e');else{v=A.items||A;for(var F=0;F<v.length;F++){var B=v[F],C;if(B){var H=function(a){a=a.render(h,f);E=z.items.push(a)-1;0<E&&(a.previous=z.items[E-1],a.previous.next=a);a.toolbar=z;a.onkey=l;a.onfocus=function(){h.toolbox.focusCommandExecuted||h.focus()}};if(B.type==CKEDITOR.UI_SEPARATOR)g=a&&B;else{C=!1!==B.canGroup; 666if(!z){q=CKEDITOR.tools.getNextId();z={id:q,items:[]};u=A.name&&(h.lang.toolbar.toolbarGroups[A.name]||A.name);f.push('\x3cspan id\x3d"',q,'" class\x3d"cke_toolbar'+(w?' cke_toolbar_last"':'"'),u?' aria-labelledby\x3d"'+q+'_label"':"",' role\x3d"toolbar"\x3e');u&&f.push('\x3cspan id\x3d"',q,'_label" class\x3d"cke_voice_label"\x3e',u,"\x3c/span\x3e");f.push('\x3cspan class\x3d"cke_toolbar_start"\x3e\x3c/span\x3e');var E=m.push(z)-1;0<E&&(z.previous=m[E-1],z.previous.next=z)}C?a||(f.push('\x3cspan class\x3d"cke_toolgroup" role\x3d"presentation"\x3e'), 667a=1):a&&(f.push("\x3c/span\x3e"),a=0);g&&(H(g),g=0);H(B)}}}a&&(f.push("\x3c/span\x3e"),g=a=0);z&&f.push('\x3cspan class\x3d"cke_toolbar_end"\x3e\x3c/span\x3e\x3c/span\x3e')}}h.config.toolbarCanCollapse&&f.push("\x3c/span\x3e");if(h.config.toolbarCanCollapse&&h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var J=CKEDITOR.tools.addFunction(function(){h.execCommand("toolbarCollapse")});h.on("destroy",function(){CKEDITOR.tools.removeFunction(J)});h.addCommand("toolbarCollapse",{readOnly:1,exec:function(a){var b= 668a.ui.space("toolbar_collapser"),c=b.getPrevious(),d=a.ui.space("contents"),f=c.getParent(),e=parseInt(d.$.style.height,10),h=f.$.offsetHeight,g=b.hasClass("cke_toolbox_collapser_min");g?(c.show(),b.removeClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarCollapse)):(c.hide(),b.addClass("cke_toolbox_collapser_min"),b.setAttribute("title",a.lang.toolbar.toolbarExpand));b.getFirst().setText(g?"â²":"â");d.setStyle("height",e-(f.$.offsetHeight-h)+"px");a.fire("resize",{outerHeight:a.container.$.offsetHeight, 669contentsHeight:d.$.offsetHeight,outerWidth:a.container.$.offsetWidth})},modes:{wysiwyg:1,source:1}});h.setKeystroke(CKEDITOR.ALT+(CKEDITOR.env.ie||CKEDITOR.env.webkit?189:109),"toolbarCollapse");f.push('\x3ca title\x3d"'+(d?h.lang.toolbar.toolbarCollapse:h.lang.toolbar.toolbarExpand)+'" id\x3d"'+h.ui.spaceId("toolbar_collapser")+'" tabIndex\x3d"-1" class\x3d"cke_toolbox_collapser');d||f.push(" cke_toolbox_collapser_min");f.push('" onclick\x3d"CKEDITOR.tools.callFunction('+J+')"\x3e','\x3cspan class\x3d"cke_arrow"\x3e\x26#9650;\x3c/span\x3e', 670"\x3c/a\x3e")}f.push("\x3c/span\x3e");b.data.html+=f.join("")}});h.on("destroy",function(){if(this.toolbox){var b,c=0,f,a,e;for(b=this.toolbox.toolbars;c<b.length;c++)for(a=b[c].items,f=0;f<a.length;f++)e=a[f],e.clickFn&&CKEDITOR.tools.removeFunction(e.clickFn),e.keyDownFn&&CKEDITOR.tools.removeFunction(e.keyDownFn)}});h.on("uiReady",function(){var b=h.ui.space("toolbox");b&&h.focusManager.add(b,1)});h.addCommand("toolbarFocus",b);h.setKeystroke(CKEDITOR.ALT+121,"toolbarFocus");h.ui.add("-",CKEDITOR.UI_SEPARATOR, 671{});h.ui.addHandler(CKEDITOR.UI_SEPARATOR,{create:function(){return{render:function(b,c){c.push('\x3cspan class\x3d"cke_toolbar_separator" role\x3d"separator"\x3e\x3c/span\x3e');return{}}}}})}});CKEDITOR.ui.prototype.addToolbarGroup=function(b,c,e){var k=g(this.editor),d=0===c,f={name:b};if(e){if(e=CKEDITOR.tools.search(k,function(a){return a.name==e})){!e.groups&&(e.groups=[]);if(c&&(c=CKEDITOR.tools.indexOf(e.groups,c),0<=c)){e.groups.splice(c+1,0,b);return}d?e.groups.splice(0,0,b):e.groups.push(b); 672return}c=null}c&&(c=CKEDITOR.tools.indexOf(k,function(a){return a.name==c}));d?k.splice(0,0,b):"number"==typeof c?k.splice(c+1,0,f):k.push(b)}})();CKEDITOR.UI_SEPARATOR="separator";CKEDITOR.config.toolbarLocation="top";"use strict";(function(){function c(a,b,c){b.type||(b.type="auto");if(c&&!1===a.fire("beforePaste",b)||!b.dataValue&&b.dataTransfer.isEmpty())return!1;b.dataValue||(b.dataValue="");if(CKEDITOR.env.gecko&&"drop"==b.method&&a.toolbox)a.once("afterPaste",function(){a.toolbox.focus()}); 673return a.fire("paste",b)}
vendor: 24,298 bytes, lines 673-720
673function g(a){function b(){var c=a.editable();if(CKEDITOR.plugins.clipboard.isCustomCopyCutSupported){var d=function(b){a.getSelection().isCollapsed()||(a.readOnly&&"cut"==b.name||C.initPasteDataTransfer(b,a),b.data.preventDefault())};c.on("copy",d);c.on("cut",d);c.on("cut",function(){a.readOnly||a.extractSelectedHtml()},null,null,999)}c.on(C.mainPasteEvent,function(a){"beforepaste"==C.mainPasteEvent&&H||v(a)});"beforepaste"==C.mainPasteEvent&&(c.on("paste",function(a){E|| 674(e(),a.data.preventDefault(),v(a),g("paste"))}),c.on("contextmenu",h,null,null,0),c.on("beforepaste",function(a){!a.data||a.data.$.ctrlKey||a.data.$.shiftKey||h()},null,null,0));c.on("beforecut",function(){!H&&k(a)});var f;c.attachListener(CKEDITOR.env.ie?c:a.document.getDocumentElement(),"mouseup",function(){f=setTimeout(F,0)});a.on("destroy",function(){clearTimeout(f)});c.on("keyup",F)}function d(b){return{type:b,canUndo:"cut"==b,startDisabled:!0,fakeKeystroke:"cut"==b?CKEDITOR.CTRL+88:CKEDITOR.CTRL+ 67567,exec:function(){"cut"==this.type&&k();var b;var c=this.type;if(CKEDITOR.env.ie)b=g(c);else try{b=a.document.$.execCommand(c,!1,null)}catch(d){b=!1}b||a.showNotification(a.lang.clipboard[this.type+"Error"]);return b}}}function f(){return{canUndo:!1,async:!0,fakeKeystroke:CKEDITOR.CTRL+86,exec:function(a,b){function d(b,h){h="undefined"!==typeof h?h:!0;b?(b.method="paste",b.dataTransfer||(b.dataTransfer=C.initPasteDataTransfer()),c(a,b,h)):e&&!a._.forcePasteDialog&&a.showNotification(n,"info",a.config.clipboard_notificationDuration); 676a._.forcePasteDialog=!1;a.fire("afterCommandExec",{name:"paste",command:f,returnValue:!!b})}b="undefined"!==typeof b&&null!==b?b:{};var f=this,e="undefined"!==typeof b.notification?b.notification:!0,h=b.type,g=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,a.getCommandKeystroke(this)),n="string"===typeof e?e:a.lang.clipboard.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+g.aria+'"\x3e'+g.display+"\x3c/kbd\x3e"),g="string"===typeof b?b:b.dataValue;h&&!0!==a.config.forcePasteAsPlainText&& 677"allow-word"!==a.config.forcePasteAsPlainText?a._.nextPasteType=h:delete a._.nextPasteType;"string"===typeof g?d({dataValue:g}):a.getClipboardData(d)}}}function e(){E=1;setTimeout(function(){E=0},100)}function h(){H=1;setTimeout(function(){H=0},10)}function g(b){var c=a.document,d=c.getBody(),f=!1,e=function(){f=!0};d.on(b,e);7<CKEDITOR.env.version?c.$.execCommand(b):c.$.selection.createRange().execCommand(b);d.removeListener(b,e);return f}function k(){if(CKEDITOR.env.ie&&!CKEDITOR.env.quirks){var b= 678a.getSelection(),c,d,f;b.getType()==CKEDITOR.SELECTION_ELEMENT&&(c=b.getSelectedElement())&&(d=b.getRanges()[0],f=a.document.createText(""),f.insertBefore(c),d.setStartBefore(f),d.setEndAfter(c),b.selectRanges([d]),setTimeout(function(){c.getParent()&&(f.remove(),b.selectElement(c))},0))}}function m(b,c){var d=a.document,f=a.editable(),e=function(a){a.cancel()},h;if(!d.getById("cke_pastebin")){var g=a.getSelection(),n=g.createBookmarks();CKEDITOR.env.ie&&g.root.fire("selectionchange");var k=new CKEDITOR.dom.element(!CKEDITOR.env.webkit&& 679!f.is("body")||CKEDITOR.env.ie?"div":"body",d);k.setAttributes({id:"cke_pastebin","data-cke-temp":"1"});var l=0,d=d.getWindow();CKEDITOR.env.webkit?(f.append(k),k.addClass("cke_editable"),f.is("body")||(l="static"!=f.getComputedStyle("position")?f:CKEDITOR.dom.element.get(f.$.offsetParent),l=l.getDocumentPosition().y)):f.getAscendant(CKEDITOR.env.ie?"body":"html",1).append(k);k.setStyles({position:"absolute",top:d.getScrollPosition().y-l+10+"px",width:"1px",height:Math.max(1,d.getViewPaneSize().height- 68020)+"px",overflow:"hidden",margin:0,padding:0});CKEDITOR.env.safari&&k.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","text"));(l=k.getParent().isReadOnly())?(k.setOpacity(0),k.setAttribute("contenteditable",!0)):k.setStyle("ltr"==a.config.contentsLangDirection?"left":"right","-10000px");a.on("selectionChange",e,null,null,0);if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)h=f.once("blur",e,null,null,-100);l&&k.focus();l=new CKEDITOR.dom.range(k);l.selectNodeContents(k);var t=l.select();CKEDITOR.env.ie&& 681(h=f.once("blur",function(){a.lockSelection(t)}));var q=CKEDITOR.document.getWindow().getScrollPosition().y;setTimeout(function(){CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=q);h&&h.removeListener();CKEDITOR.env.ie&&f.focus();g.selectBookmarks(n);k.remove();var b;CKEDITOR.env.webkit&&(b=k.getFirst())&&b.is&&b.hasClass("Apple-style-span")&&(k=b);a.removeListener("selectionChange",e);c(k.getHtml())},0)}}function l(){if("paste"==C.mainPasteEvent)return a.fire("beforePaste",{type:"auto", 682method:"paste"}),!1;a.focus();e();var b=a.focusManager;b.lock();if(a.editable().fire(C.mainPasteEvent)&&!g("paste"))return b.unlock(),!1;b.unlock();return!0}function w(b){if("wysiwyg"==a.mode)switch(b.data.keyCode){case CKEDITOR.CTRL+86:case CKEDITOR.SHIFT+45:b=a.editable();e();"paste"==C.mainPasteEvent&&b.fire("beforepaste");break;case CKEDITOR.CTRL+88:case CKEDITOR.SHIFT+46:a.fire("saveSnapshot"),setTimeout(function(){a.fire("saveSnapshot")},50)}}function v(b){var d={type:"auto",method:"paste", 683dataTransfer:C.initPasteDataTransfer(b)};d.dataTransfer.cacheData();var f=!1!==a.fire("beforePaste",d);f&&C.canClipboardApiBeTrusted(d.dataTransfer,a)?(b.data.preventDefault(),setTimeout(function(){c(a,d)},0)):m(b,function(b){d.dataValue=b.replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/ig,"");f&&c(a,d)})}function F(){if("wysiwyg"==a.mode){var b=B("paste");a.getCommand("cut").setState(B("cut"));a.getCommand("copy").setState(B("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function B(b){var c= 684a.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,H=0,E=0;(function(){a.on("key",w);a.on("contentDom",b);a.on("selectionChange",F);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:B("cut"), 685copy: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",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c, 686d,f,e,h){var g=a.lang.clipboard[d];a.addCommand(d,f);a.ui.addButton&&a.ui.addButton(c,{label:g,command:d,toolbar:"clipboard,"+e});a.addMenuItems&&a.addMenuItem(d,{label:g,command:d,group:"clipboard",order:h})}b("Cut","cut",d("cut"),10,1);b("Copy","copy",d("copy"),20,4);b("Paste","paste",f(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData=function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function f(a){a.removeListener();a.cancel(); 687c({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var e=!1,h="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();e=!0;h=a.data.type},null,null,1E3);a.on("paste",d,null,null,0);!1===l()&&(a.removeListener("paste",d),a._.forcePasteDialog&&e&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",f),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",f);a.data._.committed||c(null)})):c(null))}}function e(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&& 688!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",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +</g,"\x3e\x3c").replace(/<br ?\/>/gi, 689"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1<b.indexOf("\x3cdiv\x3e")&&(b=b.replace(/^(<div>(<br>|)<\/div>)(?!$|(<div>(<br>|)<\/div>))/g,"\x3cbr\x3e").replace(/^(<div>(<br>|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"),b.match(/<div>(<br>|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(<div>(<br>|)<\/div>)+/g,function(a){return c(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div><div>/g,"\x3cbr\x3e"), 690b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^<br><br>$/,"\x3cbr\x3e")),-1<b.indexOf("\x3cbr\x3e\x3cbr\x3e")&&(b="\x3cp\x3e"+b.replace(/(<br>){2,}/g,function(a){return c(a.length/4)})+"\x3c/p\x3e"));return l(a,b)}function h(a){function b(){var a={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!=c&&(a[c]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a, 691"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function m(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p><p>)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e", 692a.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 d(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function d(b,f,e){f.select();c(a,{dataTransfer:e,method:"drop"},1);e.sourceEditor.fire("saveSnapshot");e.sourceEditor.editable().extractHtmlFromRange(b);e.sourceEditor.getSelection().selectRanges([b]);e.sourceEditor.fire("saveSnapshot")} 693function f(d,e){d.select();c(a,{dataTransfer:e,method:"drop"},1);b.resetDragDataTransfer()}function e(b,c,d){var f={$:b.data.$,target:b.data.getTarget()};c&&(f.dragRange=c);d&&(f.dropRange=d);!1===a.fire(b.name,f)&&b.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var g=a.editable(),k=CKEDITOR.plugins.clipboard.getDropTarget(a),m=a.ui.space("top"),l=a.ui.space("bottom");b.preventDefaultDropOnElement(m);b.preventDefaultDropOnElement(l); 694g.attachListener(k,"dragstart",e);g.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);g.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);g.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount=c?h(c.startContainer):null,b.dragEndContainerChildCount=c?h(c.endContainer):null)},null,null,100);g.attachListener(k,"dragend",e);g.attachListener(a,"dragend", 695b.initDragDataTransfer,b,null,1);g.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);g.attachListener(k,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}});g.attachListener(k,"drop",function(c){if(!c.data.$.defaultPrevented&&(c.data.preventDefault(),!a.readOnly)){var d= 696c.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=b.getRangeAtDropPosition(c,a),f=b.dragRange;d&&e(c,f,d)}}},null,null,9999);g.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);g.attachListener(a,"drop",function(c){if(c=c.data){var e=c.dropRange,h=c.dragRange,g=c.dataTransfer;g.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){b.internalDrop(h,e,g,a)},0):g.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(h,e,g):f(e,g)}}, 697null,null,9999)})}var f;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){function c(a){if(!a||r===a.id)return!1;var b=a.getTypes(),b=1===b.length&&"Files"===b[0];a=1===a.getFilesCount();return b&&a}var f,k=h(a);a.config.forcePasteAsPlainText?f="plain-text":a.config.pasteFilter?f=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(f="semantic-content");a.pasteFilter=k.get(f);g(a);d(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js")); 698if(CKEDITOR.env.gecko){var l=["image/png","image/jpeg","image/gif"],r;a.on("paste",function(b){var d=b.data,f=d.dataTransfer;if(!d.dataValue&&"paste"==d.method&&c(f)&&(f=f.getFile(0),-1!=CKEDITOR.tools.indexOf(l,f.type))){var e=new FileReader;e.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+e.result+'" /\x3e';a.fire("paste",b.data)},!1);e.addEventListener("abort",function(){a.fire("paste",b.data)},!1);e.addEventListener("error",function(){a.fire("paste",b.data)},!1);e.readAsDataURL(f); 699r=d.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,c=CKEDITOR.dtd.$block;-1<b.indexOf("Apple-")&&(b=b.replace(/<span class="Apple-converted-space"> <\/span>/gi, 700" "),"html"!=a.data.type&&(b=b.replace(/<span class="Apple-tab-span"[^>]*>([^<]*)<\/span>/gi,function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1<b.indexOf('\x3cbr class\x3d"Apple-interchange-newline"\x3e')&&(a.data.startsWithEOL=1,a.data.preSniffing="html",b=b.replace(/<br class="Apple-interchange-newline">/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var d,f,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&& 701(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)e=f=d;f&&(b=f.getHtml().replace(/<br>$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)><div><br><\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)<br>$/,"$1"));a.data.dataValue=b},null, 702null,3);a.on("paste",function(c){c=c.data;var d=a._.nextPasteType||c.type,f=c.dataValue,h,g=a.config.clipboard_defaultContentType||"html",n=c.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,l=!0===a.config.forcePasteAsPlainText;h="html"==d||"html"==c.preSniffing?"html":e(f);delete a._.nextPasteType;"htmlifiedtext"==h&&(f=b(a.config,f));if("text"==d&&"html"==h)f=m(a,f,k.get("plain-text"));else if(n&&a.pasteFilter&&!c.dontFilter||l)f=m(a,f,a.pasteFilter);c.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+ 703f);c.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==h||"html"==g?"html":"text");c.type=d;c.dataValue=f;delete c.preSniffing;delete c.startsWithEOL;delete c.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null,1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&& 70416>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,c),a._.pasteButtons||(a._.pasteButtons=[]),a._.pasteButtons.push(b))},canClipboardApiBeTrusted:function(a,b){return a.getTransferType(b)!=CKEDITOR.DATA_TRANSFER_EXTERNAL|| 705CKEDITOR.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&&9>CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function f(a,c,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.equals(c)&& 706d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var e=b.startContainer;"number"==typeof d&&"number"==typeof c&&e.type==CKEDITOR.NODE_ELEMENT&&(f(a.startContainer,e,c)||f(a.endContainer,e,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset; 707return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()<d||a.endContainer.getParent().equals(c)&&a.endContainer.getIndex()<d?!0:!1},internalDrop:function(a,b,d,f){var e=CKEDITOR.plugins.clipboard,h=f.editable(),g,k;f.fire("saveSnapshot");f.fire("lockSnapshot",{dontUpdate:1});CKEDITOR.env.ie&&10>CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,b,e.dragStartContainerChildCount,e.dragEndContainerChildCount);(k=this.isDropRangeAffectedByDragRange(a, 708b))||(g=a.createBookmark(!1));e=b.clone().createBookmark(!1);k&&(g=a.createBookmark(!1));a=g.startNode;b=g.endNode;k=e.startNode;b&&a.getPosition(k)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(k)&CKEDITOR.POSITION_FOLLOWING&&k.insertBefore(a);a=f.createRange();a.moveToBookmark(g);h.extractHtmlFromRange(a,1);b=f.createRange();e.startNode.getCommonAncestor(h)||(e=f.getSelection().createBookmarks()[0]);b.moveToBookmark(e);c(f,{dataTransfer:d,method:"drop",range:b},1);f.fire("unlockSnapshot")},getRangeAtDropPosition:function(a, 709b){var c=a.data.$,d=c.clientX,f=c.clientY,e=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,f))c=b.document.$.caretRangeFromPoint(d,f),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8<CKEDITOR.env.version&&e&&b.editable().hasFocus)return e; 710if(document.body.createTextRange){b.focus();c=b.document.getBody().$.createTextRange();try{for(var g=!1,k=0;20>k&&!g;k++){if(!g)try{c.moveToPoint(d,f-k),g=!0}catch(m){}if(!g)try{c.moveToPoint(d,f+k),g=!0}catch(l){}}if(g){var v="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+v+'"\x3eâ\x3c/span\x3e');var F=b.document.getById(v);h.moveToPosition(F,CKEDITOR.POSITION_BEFORE_START);F.remove()}else{var B=b.document.$.elementFromPoint(d,f),C=new CKEDITOR.dom.element(B),H;if(C.equals(b.editable())|| 711"html"==C.getName())return e&&e.startContainer&&!e.startContainer.equals(b.editable())?e:null;H=C.getClientRect();d<H.left?h.setStartAt(C,CKEDITOR.POSITION_AFTER_START):h.setStartAt(C,CKEDITOR.POSITION_BEFORE_END);h.collapse(!0)}}catch(E){return null}}else return null}return h},initDragDataTransfer:function(a,b){var c=a.data.$?a.data.$.dataTransfer:null,d=new this.dataTransfer(c,b);"dragstart"===a.name&&d.storeId();c?this.dragData&&d.id==this.dragData.id?d=this.dragData:this.dragData=d:this.dragData? 712d=this.dragData:this.dragData=d;a.data.dataTransfer=d},resetDragDataTransfer:function(){this.dragData=null},initPasteDataTransfer:function(a,b){if(this.isCustomCopyCutSupported){if(a&&a.data&&a.data.$){var c=a.data.$.clipboardData,d=new this.dataTransfer(c,b);"copy"!==a.name&&"cut"!==a.name||d.storeId();this.copyCutData&&d.id==this.copyCutData.id?(d=this.copyCutData,d.$=c):this.copyCutData=d;return d}return new this.dataTransfer(null,b)}return new this.dataTransfer(CKEDITOR.env.edge&&a&&a.data.$&& 713a.data.$.clipboardData||null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",k)}};f=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,data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"== 714a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(f);this.id||(this.id="Text"==f?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==f||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL=1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype= 715{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(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==c.substring(0,7)&&(c="");if("string"===typeof c)var f=c.indexOf("\x3c/html\x3e"),c=-1!==f?c.substring(0,f+7):c;return c}, 716setData: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"==f&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!==f&&this.setData(f,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor== 717a?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,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c<this.$.types.length;c++)a(this.$.types[c])}else a("Text"),a("URL");d=this._getImageFromClipboard();if(this.$&&this.$.files|| 718d){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&&d&&this._.files.push(d)}}},getFilesCount:function(){return this._.files.length?this._.files.length:this.$&&this.$.files&&this.$.files.length?this.$.files.length:this._getImageFromClipboard()?1:0},getFile:function(a){return this._.files.length?this._.files[a]:this.$&&this.$.files&&this.$.files.length?this.$.files[a]:0===a?this._getImageFromClipboard(): 719void 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"!=f&&(a[f]=0);for(b in a)if(a[b]&&""!==this.getData(b))return!1;return!0},getTypes:function(){return this.$&&this.$.types?[].slice.call(this.$.types):[]},_getImageFromClipboard:function(){var a; 720try{if(this.$&&this.$.items&&this.$.items[0]&&(a=this.$.items[0].getAsFile())&&a.type)return a}catch(b){}}
720,_stripHtml:function(a){if(a&&a.length){a=a.replace(this._.metaRegExp,"");var b=this._.bodyRegExp.exec(a);b&&b.length&&(a=b[1],a=a.replace(this._.fragmentRegExp,""))}return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes= 721[];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;return!a._isCustomMimeTypeSupported}, 722getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType?c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,f=this._dataTransfer.$;try{f.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(e){if(this._isUnsupportedMimeTypeError(e)){c= 723CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(),h=this._getFallbackTypeData();h[a]=d;try{d=this._applyDataComment(c,h),f.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(g){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a= 724this._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&& 725-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= 7261E4;CKEDITOR.plugins.add("panelbutton",{requires:"button",onLoad:function(){function c(c){var e=this._;e.state!=CKEDITOR.TRISTATE_DISABLED&&(this.createPanel(c),e.on?e.panel.hide():e.panel.showBlock(this._.id,this.document.getById(this._.id),4))}CKEDITOR.ui.panelButton=CKEDITOR.tools.createClass({base:CKEDITOR.ui.button,$:function(g){var e=g.panel||{};delete g.panel;this.base(g);this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document;e.block={attributes:e.attributes};e.toolbarRelated=!0; 727this.hasArrow="listbox";this.click=c;this._={panelDefinition:e}},statics:{handler:{create:function(c){return new CKEDITOR.ui.panelButton(c)}}},proto:{createPanel:function(c){var e=this._;if(!e.panel){var b=this._.panelDefinition,h=this._.panelDefinition.block,m=b.parent||CKEDITOR.document.getBody(),l=this._.panel=new CKEDITOR.ui.floatPanel(c,m,b),b=l.addBlock(e.id,h),k=this;l.onShow=function(){k.className&&this.element.addClass(k.className+"_panel");k.setState(CKEDITOR.TRISTATE_ON);e.on=1;k.editorFocus&& 728c.focus();if(k.onOpen)k.onOpen()};l.onHide=function(b){k.className&&this.element.getFirst().removeClass(k.className+"_panel");k.setState(k.modes&&k.modes[c.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);e.on=0;
vendor: 8,401 bytes, lines 728-744
728if(!b&&k.onClose)k.onClose()};l.onEscape=function(){l.hide(1);k.document.getById(e.id).focus()};if(this.onBlock)this.onBlock(l,b);b.onHide=function(){e.on=0;k.setState(CKEDITOR.TRISTATE_OFF)}}}}})},beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_PANELBUTTON,CKEDITOR.ui.panelButton.handler)}}); 729CKEDITOR.UI_PANELBUTTON="panelbutton";(function(){CKEDITOR.plugins.add("panel",{beforeInit:function(b){b.ui.addHandler(CKEDITOR.UI_PANEL,CKEDITOR.ui.panel.handler)}});CKEDITOR.UI_PANEL="panel";CKEDITOR.ui.panel=function(b,c){c&&CKEDITOR.tools.extend(this,c);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)}}; 730var c=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'),g=CKEDITOR.addTemplate("panel-frame",'\x3ciframe id\x3d"{id}" class\x3d"cke_panel_frame" role\x3d"presentation" frameborder\x3d"0" src\x3d"{src}"\x3e\x3c/iframe\x3e'),e=CKEDITOR.addTemplate("panel-frame-inner",'\x3c!DOCTYPE html\x3e\x3chtml class\x3d"cke_panel_container {env}" dir\x3d"{dir}" lang\x3d"{langCode}"\x3e\x3chead\x3e{css}\x3c/head\x3e\x3cbody class\x3d"cke_{dir}" style\x3d"margin:0;padding:0" onload\x3d"{onload}"\x3e\x3c/body\x3e\x3c/html\x3e'); 731CKEDITOR.ui.panel.prototype={render:function(b,h){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= 732!0;if(this.onLoad)this.onLoad()},this));b.write(e.output(CKEDITOR.tools.extend({css:CKEDITOR.tools.buildStyleHtml(this.css),onload:"window.parent.CKEDITOR.tools.callFunction("+c+");"},m)));b.getWindow().$.CKEDITOR=CKEDITOR;b.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(): 733(27==a||a==("rtl"==c?39:37))&&this.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=g.output({id:this.id+"_frame", 734src:l})}l=c.output(m);h&&h.push(l);return l},addBlock:function(b,c){c=this._.blocks[b]=c instanceof CKEDITOR.ui.panel.block?c:new CKEDITOR.ui.panel.block(this.getHolderElement(),c);this._.currentBlock||this.showBlock(b);return c},getBlock:function(b){return this._.blocks[b]},showBlock:function(b){b=this._.blocks[b];var c=this._.currentBlock,e=!this.forceIFrame||CKEDITOR.env.ie?this._.holder:this.document.getById(this.id+"_frame");c&&c.hide();this._.currentBlock=b;CKEDITOR.fire("ariaWidget",e);b._.focusIndex= 735-1;this._.onKeyDown=b.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,c){this.element=b.append(b.getDocument().createElement("div",{attributes:{tabindex:-1,"class":"cke_panel_block"},styles:{display:"none"}}));c&&CKEDITOR.tools.extend(this,c);this.element.setAttributes({role:this.attributes.role||"presentation","aria-label":this.attributes["aria-label"],title:this.attributes.title|| 736this.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 c=function(b){return b.type==CKEDITOR.NODE_ELEMENT&&"none"==b.getStyle("display")},e=this._.getItems(),g,k,d=e.count()-1;0<=d;d--)if(g=e.getItem(d),g.getAscendant(c)||(k=g,this._.focusIndex= 737d),"true"==g.getAttribute("aria-selected")){k=g;this._.focusIndex=d;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,c){var e=this.keys[b];switch(e){case "next":for(var g=this._.focusIndex,e=this._.getItems(), 738k;k=e.getItem(++g);)if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=g;k.focus(!0);break}return k||c?!1:(this._.focusIndex=-1,this.onKeyDown(b,1));case "prev":g=this._.focusIndex;for(e=this._.getItems();0<g&&(k=e.getItem(--g));){if(k.getAttribute("_cke_focus")&&k.$.offsetWidth){this._.focusIndex=g;k.focus(!0);break}k=null}return k||c?!1:(this._.focusIndex=e.count(),this.onKeyDown(b,1));case "click":case "mouseup":return g=this._.focusIndex,(k=0<=g&&this._.getItems().getItem(g))&& 739k.fireEventHandler(e,{button:CKEDITOR.tools.normalizeMouseButton(CKEDITOR.MOUSE_BUTTON_LEFT,!0)}),!1}return!0}}})})();CKEDITOR.plugins.add("floatpanel",{requires:"panel"});(function(){function c(c,b,h,m,l){l=CKEDITOR.tools.genKey(b.getUniqueId(),h.getUniqueId(),c.lang.dir,c.uiColor||"",m.css||"",l||"");var k=g[l];k||(k=g[l]=new CKEDITOR.ui.panel(b,m),k.element=h.append(CKEDITOR.dom.element.createFromHtml(k.render(c),b)),k.element.setStyles({display:"none",position:"absolute"}));return k}var g={}; 740CKEDITOR.ui.floatPanel=CKEDITOR.tools.createClass({$:function(e,b,h,g){function l(){a.hide()}h.forceIFrame=1;h.toolbarRelated&&e.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(b=CKEDITOR.document.getById("cke_"+e.name));var k=b.getDocument();g=c(e,k,b,h,g||0);var d=g.element,f=d.getFirst(),a=this;d.disableContextMenu();this.element=d;this._={editor:e,panel:g,parentElement:b,definition:h,document:k,iframe:f,children:[],dir:e.lang.dir,showBlockParams:null,markFirst:void 0!==h.markFirst?h.markFirst:!0}; 741e.on("mode",l);e.on("resize",l);k.getWindow().on("resize",function(){this.reposition()},this)},proto:{addBlock:function(c,b){return this._.panel.addBlock(c,b)},addListBlock:function(c,b){return this._.panel.addListBlock(c,b)},getBlock:function(c){return this._.panel.getBlock(c)},showBlock:function(c,b,h,g,l,k){var d=this._.panel,f=d.showBlock(c);this._.showBlockParams=[].slice.call(arguments);this.allowBlur(!1);var a=this._.editor.editable();this._.returnFocus=a.hasFocus?a:new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement); 742this._.hideTimeout=0;var n=this.element,a=this._.iframe,a=CKEDITOR.env.ie&&!CKEDITOR.env.edge?a:new CKEDITOR.dom.window(a.$.contentWindow),t=n.getDocument(),x=this._.parentElement.getPositionedAncestor(),p=b.getDocumentPosition(t),t=x?x.getDocumentPosition(t):{x:0,y:0},r="rtl"==this._.dir,q=p.x+(g||0)-t.x,z=p.y+(l||0)-t.y;!r||1!=h&&4!=h?r||2!=h&&3!=h||(q+=b.$.offsetWidth-1):q+=b.$.offsetWidth;if(3==h||4==h)z+=b.$.offsetHeight-1;this._.panel._.offsetParentId=b.getId();n.setStyles({top:z+"px",left:0, 743display:""});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)}, 744this),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,770 bytes, lines 744-753
744d.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(f.autoSize){var b=f.element.getDocument(),b=(CKEDITOR.env.webkit||CKEDITOR.env.edge? 745f.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=f.element.$.scrollHeight;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0<b&&(b+=(a.$.offsetHeight||0)-(a.$.clientHeight||0)+3);a.setStyle("height",b+"px");d._.currentBlock.element.setStyle("display","none").removeStyle("display")}else a.removeStyle("height");r&&(q-=n.$.offsetWidth);n.setStyle("left",q+"px");var b=d.element.getWindow(),a=n.$.getBoundingClientRect(), 746b=b.getViewPaneSize(),c=a.width||a.right-a.left,e=a.height||a.bottom-a.top,h=r?a.right:b.width-a.left,g=r?b.width-a.right:a.left;r?h<c&&(q=g>c?q+c:b.width>c?q-a.left:q-a.right+b.width):h<c&&(q=g>c?q-c:b.width>c?q-a.right+b.width:q-a.left);c=a.top;b.height-a.top<e&&(z=c>e?z-e:b.height>e?z-a.bottom+b.height:z-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")&& 747(q=CKEDITOR.env.ie8Compat?q-2*n.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),m;(m=a.getCustomData("activePanel"))&&m.onHide&&m.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:z+"px",left:q+"px"});n.setOpacity(1);k&&k()},this);d.isLoaded?a():d.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();f.element.focus();CKEDITOR.env.webkit&& 748(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){f.markFirstDisplayed?f.markFirstDisplayed():f._.markFirstDisplayed()},0):f.markFirstDisplayed?f.markFirstDisplayed():f._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var c=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(), 749this.showBlock.apply(this,c))},focus:function(){if(CKEDITOR.env.webkit){var c=CKEDITOR.document.getActive();c&&!c.equals(this._.iframe)&&c.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var c=this._.iframe.getFrameDocument().getActive();c&&c.is("a")&&(this._.lastFocused=c)},hide:function(c){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur(); 750this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(c=c&&this._.returnFocus)CKEDITOR.env.webkit&&c.type&&c.getWindow().$.focus(),c.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(c){var b=this._.panel;void 0!==c&&(b.allowBlur=c);return b.allowBlur},showAsChild:function(c,b,h,g,l,k){if(this._.activeChild!=c||c._.panel._.offsetParentId!=h.getId())this.hideChild(),c.onHide= 751CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=c,this._.focused=!1,c.showBlock(b,h,g,l,k),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){c.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(c){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),c&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var c=CKEDITOR.tools.isEmpty(CKEDITOR.instances), 752b;for(b in g){var h=g[b];c?h.destroy():h.element.hide()}c&&(g={})})})();CKEDITOR.plugins.add("colorbutton",{requires:"panelbutton,floatpanel",init:function(c){function g(b,a,d,g,k){var p=new CKEDITOR.style(m["colorButton_"+a+"Style"]),r=CKEDITOR.tools.getNextId()+"_colorBox",q={type:a},z;k=k||{};c.ui.add(b,CKEDITOR.UI_PANELBUTTON,{label:d,title:d,modes:{wysiwyg:1},editorFocus:0,toolbar:"colors,"+g,allowedContent:p,requiredContent:p,contentTransformations:k.contentTransformations,panel:{css:CKEDITOR.skin.getPath("editor"), 753attributes:{role:"listbox","aria-label":l.panelTitle}},onBlock:function(b,d){z=d;d.autoSize=!0;d.element.addClass("cke_colorblock");d.element.setHtml(e(b,a,r,q));d.element.getDocument().getBody().setStyle("overflow","hidden");CKEDITOR.ui.fire("ready",this);var f=d.keys,h="rtl"==c.lang.dir;f[h?37:39]="next";f[40]="next";f[9]="next";f[h?39:37]="prev";f[38]="prev";
753f[CKEDITOR.SHIFT+9]="prev";f[32]="click"},refresh:function(){c.activeFilter.check(p)||this.setState(CKEDITOR.TRISTATE_DISABLED)},onOpen:function(){var b= 754c.getSelection(),d=b&&b.getStartElement(),f=c.elementPath(d);if(f){d=f.block||f.blockLimit||c.document.getBody();do f=d&&d.getComputedStyle("back"==a?"background-color":"color")||"transparent";while("back"==a&&"transparent"==f&&d&&(d=d.getParent()));f&&"transparent"!=f||(f="#ffffff");!1!==m.colorButton_enableAutomatic&&this._.panel._.iframe.getFrameDocument().getById(r).setStyle("background-color",f);if(d=b&&b.getRanges()[0]){for(var b=new CKEDITOR.dom.walker(d),e=d.collapsed?d.startContainer:b.next(), 755d="";e;){e.type!==CKEDITOR.NODE_ELEMENT&&(e=e.getParent());e=h(e.getComputedStyle("back"==a?"background-color":"color"));d=d||e;if(d!==e){d="";break}e=b.next()}"transparent"==d&&(d="");"fore"==a&&(q.automaticTextColor="#"+h(f));q.selectionColor=d?"#"+d:"";b=d;d=z._.getItems();for(e=0;e<d.count();e++){var g=d.getItem(e);g.removeAttribute("aria-selected");b&&b==h(g.getAttribute("data-value"))&&g.setAttribute("aria-selected",!0)}}return f}}})}function e(d,a,e,h){d=[];var g=m.colorButton_colors.split(","), 756k=m.colorButton_colorsPerRow||6,r=c.plugins.colordialog&&!1!==m.colorButton_enableMore,q=g.length+(r?2:1),z=CKEDITOR.tools.addFunction(function(a,d){function f(a){var e=m["colorButton_"+d+"Style"];c.removeStyle(new CKEDITOR.style(e,{color:"inherit"}));e.childRule="back"==d?function(a){return b(a)}:function(a){return!(a.is("a")||a.getElementsByTag("a").count())||b(a)};c.focus();a&&c.applyStyle(new CKEDITOR.style(e,{color:a}));c.fire("saveSnapshot")}c.focus();c.fire("saveSnapshot");if("?"==a)c.getColorFromDialog(function(a){if(a)return f(a)}, 757null,h);else return f(a&&"#"+a)});!1!==m.colorButton_enableAutomatic&&d.push('\x3ca class\x3d"cke_colorauto" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',l.auto,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(',z,",null,'",a,"');return false;\" href\x3d\"javascript:void('",l.auto,'\')" role\x3d"option" aria-posinset\x3d"1" aria-setsize\x3d"',q,'"\x3e\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+ 758k+'" align\x3d"center"\x3e\x3cspan class\x3d"cke_colorbox" id\x3d"',e,'"\x3e\x3c/span\x3e',l.auto,"\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/a\x3e");d.push('\x3ctable role\x3d"presentation" cellspacing\x3d0 cellpadding\x3d0 width\x3d"100%"\x3e');for(e=0;e<g.length;e++){0===e%k&&d.push("\x3c/tr\x3e\x3ctr\x3e");var u=g[e].split("/"),A=u[0],w=u[1]||A;d.push('\x3ctd\x3e\x3ca class\x3d"cke_colorbox" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',u[1]?A:c.lang.colorbutton.colors[w]||w,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(', 759z,",'",w,"','",a,"'); return false;\" href\x3d\"javascript:void('",w,'\')" data-value\x3d"'+w+'" role\x3d"option" aria-posinset\x3d"',e+2,'" aria-setsize\x3d"',q,'"\x3e\x3cspan class\x3d"cke_colorbox" style\x3d"background-color:#',w,'"\x3e\x3c/span\x3e\x3c/a\x3e\x3c/td\x3e')}r&&d.push('\x3c/tr\x3e\x3ctr\x3e\x3ctd colspan\x3d"'+k+'" align\x3d"center"\x3e\x3ca class\x3d"cke_colormore" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"',l.more,'" draggable\x3d"false" ondragstart\x3d"return false;" onclick\x3d"CKEDITOR.tools.callFunction(', 760z,",'?','",a,"');return false;\" href\x3d\"javascript:void('",l.more,"')\"",' role\x3d"option" aria-posinset\x3d"',q,'" aria-setsize\x3d"',q,'"\x3e',l.more,"\x3c/a\x3e\x3c/td\x3e");d.push("\x3c/tr\x3e\x3c/table\x3e");return d.join("")}function b(b){return"false"==b.getAttribute("contentEditable")||b.getAttribute("data-nostyle")}function h(b){return CKEDITOR.tools.normalizeHex("#"+CKEDITOR.tools.convertRgbToHex(b||"")).replace(/#/g,"")}var m=c.config,l=c.lang.colorbutton;if(!CKEDITOR.env.hc){g("TextColor", 761"fore",l.textColorTitle,10,{contentTransformations:[[{element:"font",check:"span{color}",left:function(b){return!!b.attributes.color},right:function(b){b.name="span";b.attributes.color&&(b.styles.color=b.attributes.color);delete b.attributes.color}}]]});var k={}
761,d=c.config.colorButton_normalizeBackground;if(void 0===d||d)k.contentTransformations=[[{element:"span",left:function(b){var a=CKEDITOR.tools;if("span"!=b.name||!b.styles||!b.styles.background)return!1;b=a.style.parse.background(b.styles.background); 762return b.color&&1===a.object.keys(b).length},right:function(b){var a=(new CKEDITOR.style(c.config.colorButton_backStyle,{color:b.styles.background})).getDefinition();b.name=a.element;b.styles=a.styles;b.attributes=a.attributes||{};return b}}]];g("BGColor","back",l.bgColorTitle,20,k)}}});CKEDITOR.config.colorButton_colors="1ABC9C,2ECC71,3498DB,9B59B6,4E5F70,F1C40F,16A085,27AE60,2980B9,8E44AD,2C3E50,F39C12,E67E22,E74C3C,ECF0F1,95A5A6,DDD,FFF,D35400,C0392B,BDC3C7,7F8C8D,999,000";CKEDITOR.config.colorButton_foreStyle= 763{element:"span",styles:{color:"#(color)"},overrides:[{element:"font",attributes:{color:null}}]};CKEDITOR.config.colorButton_backStyle={element:"span",styles:{"background-color":"#(color)"}};CKEDITOR.plugins.colordialog={requires:"dialog",init:function(c){var g=new CKEDITOR.dialogCommand("colordialog");g.editorFocus=!1;c.addCommand("colordialog",g);CKEDITOR.dialog.add("colordialog",this.path+"dialogs/colordialog.js");c.getColorFromDialog=function(e,b,h){var g,l,k,d;g=function(c){k(this);c="ok"==c.name? 764this.getValueOf("picker","selectedColor"):null;/^[0-9a-f]{3}([0-9a-f]{3})?$/i.test(c)&&(c="#"+c);e.call(b,c)};l=function(b){h&&(b.data=h)};k=function(b){b.removeListener("ok",g);b.removeListener("cancel",g);b.removeListener("show",l)};d=function(b){b.on("ok",g);b.on("cancel",g);b.on("show",l,null,null,5)};c.execCommand("colordialog");if(c._.storedDialogs&&c._.storedDialogs.colordialog)d(c._.storedDialogs.colordialog);else CKEDITOR.on("dialogDefinition",function(b){if("colordialog"==b.data.name){var a= 765b.data.definition;b.removeListener();a.onLoad=CKEDITOR.tools.override(a.onLoad,function(b){return function(){d(this);a.onLoad=b;"function"==typeof b&&b.call(this)}})}})}}};CKEDITOR.plugins.add("colordialog",CKEDITOR.plugins.colordialog);CKEDITOR.plugins.add("divarea",{afterInit:function(c){c.addMode("wysiwyg",function(g){var e=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_wysiwyg_div cke_reset cke_enable_context_menu" hidefocus\x3d"true"\x3e\x3c/div\x3e');c.ui.space("contents").append(e); 766e=c.editable(e);e.detach=CKEDITOR.tools.override(e.detach,function(b){return function(){b.apply(this,arguments);this.remove()}});c.setData(c.getData(1),g);c.fire("contentDom")})}});(function(){function c(c,e){function l(b){b=a.list[b];var d;b.equals(c.editable())||"true"==b.getAttribute("contenteditable")?(d=c.createRange(),d.selectNodeContents(b),d=d.select()):(d=c.getSelection(),d.selectElement(b));CKEDITOR.env.ie&&c.fire("selectionChange",{selection:d,path:new CKEDITOR.dom.elementPath(b)});c.focus()} 767function k(){f&&f.setHtml('\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');delete a.list}var d=c.ui.spaceId("path"),f,a=c._.elementsPath,n=a.idBase;e.html+='\x3cspan id\x3d"'+d+'_label" class\x3d"cke_voice_label"\x3e'+c.lang.elementspath.eleLabel+'\x3c/span\x3e\x3cspan id\x3d"'+d+'" class\x3d"cke_path" role\x3d"group" aria-labelledby\x3d"'+d+'_label"\x3e\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e\x3c/span\x3e';c.on("uiReady",function(){var a=c.ui.space("path");a&&c.focusManager.add(a, 7681)});a.onClick=l;var t=CKEDITOR.tools.addFunction(l),x=CKEDITOR.tools.addFunction(function(b,d){var f=a.idBase,e;d=new CKEDITOR.dom.event(d);e="rtl"==c.lang.dir;switch(d.getKeystroke()){case e?39:37:case 9:return(e=CKEDITOR.document.getById(f+(b+1)))||(e=CKEDITOR.document.getById(f+"0")),e.focus(),!1;case e?37:39:case CKEDITOR.SHIFT+9:return(e=CKEDITOR.document.getById(f+(b-1)))||(e=CKEDITOR.document.getById(f+(a.list.length-1))),e.focus(),!1;case 27:return c.focus(),!1;case 13:case 32:return l(b), 769!1}return!0});c.on("selectionChange",function(e){for(var g=[],k=a.list=[],m=[],l=a.filters,A=!0,w=e.data.path.elements,v=w.length;v--;){var F=w[v],B=0;e=F.data("cke-display-name")?F.data("cke-display-name"):F.data("cke-real-element-type")?F.data("cke-real-element-type"):F.getName();(A=F.hasAttribute("contenteditable")?"true"==F.getAttribute("contenteditable"):A)||F.hasAttribute("contenteditable")||(B=1);for(var C=0;C<l.length;C++){var H=l[C](F,e);if(!1===H){B=1;break}e=H||e}B||(k.unshift(F),m.unshift(e))}k= 770k.length;for(l=0;l<k;l++)e=m[l],A=c.lang.elementspath.eleTitle.replace(/%1/,e),e=b.output({id:n+l,label:A,text:e,jsTitle:"javascript:void('"+e+"')",index:l,keyDownFn:x,click
vendor: 2,182 bytes, lines 770-774
770Fn:t}),g.unshift(e);f||(f=CKEDITOR.document.getById(d));m=f;m.setHtml(g.join("")+'\x3cspan class\x3d"cke_path_empty"\x3e\x26nbsp;\x3c/span\x3e');c.fire("elementsPathUpdate",{space:m})});c.on("readOnly",k);c.on("contentDomUnload",k);c.addCommand("elementsPathFocus",g.toolbarFocus);c.setKeystroke(CKEDITOR.ALT+122,"elementsPathFocus")} 771var g={toolbarFocus:{editorFocus:!1,readOnly:1,exec:function(b){(b=CKEDITOR.document.getById(b._.elementsPath.idBase+"0"))&&b.focus(CKEDITOR.env.ie||CKEDITOR.env.air)}}},e="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(e+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(e+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var b=CKEDITOR.addTemplate("pathItem",'\x3ca id\x3d"{id}" href\x3d"{jsTitle}" tabindex\x3d"-1" class\x3d"cke_path_item" title\x3d"{label}"'+e+' hidefocus\x3d"true" draggable\x3d"false" ondragstart\x3d"return false;" onkeydown\x3d"return CKEDITOR.tools.callFunction({keyDownFn},{index}, event );" onclick\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;" role\x3d"button" aria-label\x3d"{label}"\x3e{text}\x3c/a\x3e'); 772CKEDITOR.plugins.add("elementspath",{init:function(b){b._.elementsPath={idBase:"cke_elementspath_"+CKEDITOR.tools.getNextNumber()+"_",filters:[]};b.on("uiSpace",function(e){"bottom"==e.data.space&&c(b,e.data)})}})})();(function(){function c(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 g(b){b= 773b.getSelection().getRanges(!0);for(var a=b.length-1;0<a;a--)b[a].deleteContents();return b[0]}function e(b){var a=b.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&"true"==a.getAttribute("contenteditable")},!0);if(b.root.equals(a))return b;a=new CKEDITOR.dom.range(a);a.moveToRange(b);return a}CKEDITOR.plugins.add("enterkey",{init:function(b){b.addCommand("enter",{modes:{wysiwyg:1},editorFocus:!1,exec:function(a){c(a)}});b.addCommand("shiftEnter",{modes:{wysiwyg:1},editorFocus:!1, 774exec:function(a){c(a,a.activeShiftEnterMode,1)}});
vendor: 5,144 bytes, lines 774-784
774b.setKeystroke([[13,"enter"],[CKEDITOR.SHIFT+13,"shiftEnter"]])}});var b=CKEDITOR.dom.walker.whitespaces(),h=CKEDITOR.dom.walker.bookmark(),m,l,k,d;CKEDITOR.plugins.enterkey={enterBlock:function(c,a,k,m){function x(a){var b;if(a===CKEDITOR.ENTER_BR||-1===CKEDITOR.tools.indexOf(["td","th"],z.lastElement.getName())||1!==z.lastElement.getChildCount())return!1;a=z.lastElement.getChild(0).clone(!0);(b=a.getBogus())&&b.remove();return a.getText().length? 775!1:!0}if(k=k||g(c)){k=e(k);var p=k.document,r=k.checkStartOfBlock(),q=k.checkEndOfBlock(),z=c.elementPath(k.startContainer),u=z.block,A=a==CKEDITOR.ENTER_DIV?"div":"p",w;if(u&&r&&q){r=u.getParent();if(r.is("li")&&1<r.getChildCount()){p=new CKEDITOR.dom.element("li");w=c.createRange();p.insertAfter(r);u.remove();w.setStart(p,0);c.getSelection().selectRanges([w]);return}if(u.is("li")||u.getParent().is("li")){u.is("li")||(u=u.getParent(),r=u.getParent());w=r.getParent();k=!u.hasPrevious();var v=!u.hasNext(); 776m=c.getSelection();var A=m.createBookmarks(),F=u.getDirection(1),q=u.getAttribute("class"),B=u.getAttribute("style"),C=w.getDirection(1)!=F;c=c.enterMode!=CKEDITOR.ENTER_BR||C||B||q;if(w.is("li"))k||v?(k&&v&&r.remove(),u[v?"insertAfter":"insertBefore"](w)):u.breakParent(w);else{if(c)if(z.block.is("li")?(w=p.createElement(a==CKEDITOR.ENTER_P?"p":"div"),C&&w.setAttribute("dir",F),B&&w.setAttribute("style",B),q&&w.setAttribute("class",q),u.moveChildren(w)):w=z.block,k||v)w[k?"insertBefore":"insertAfter"](r); 777else u.breakParent(r),w.insertAfter(r);else if(u.appendBogus(!0),k||v)for(;p=u[k?"getFirst":"getLast"]();)p[k?"insertBefore":"insertAfter"](r);else for(u.breakParent(r);p=u.getLast();)p.insertAfter(r);u.remove()}m.selectBookmarks(A);return}if(u&&u.getParent().is("blockquote")){u.breakParent(u.getParent());u.getPrevious().getFirst(CKEDITOR.dom.walker.invisible(1))||u.getPrevious().remove();u.getNext().getFirst(CKEDITOR.dom.walker.invisible(1))||u.getNext().remove();k.moveToElementEditStart(u);k.select(); 778return}}else if(u&&u.is("pre")&&!q){l(c,a,k,m);return}if(B=k.splitBlock(A)){c=B.previousBlock;u=B.nextBlock;r=B.wasStartOfBlock;q=B.wasEndOfBlock;u?(v=u.getParent(),v.is("li")&&(u.breakParent(v),u.move(u.getNext(),1))):c&&(v=c.getParent())&&v.is("li")&&(c.breakParent(v),v=c.getNext(),k.moveToElementEditStart(v),c.move(c.getPrevious()));if(r||q)if(x(a))k.moveToElementEditStart(k.getTouchedStartNode());else{if(c){if(c.is("li")||!d.test(c.getName())&&!c.is("pre"))w=c.clone()}else u&&(w=u.clone());w? 779m&&!w.is("li")&&w.renameNode(A):v&&v.is("li")?w=v:(w=p.createElement(A),c&&(F=c.getDirection())&&w.setAttribute("dir",F));if(p=B.elementPath)for(a=0,m=p.elements.length;a<m;a++){A=p.elements[a];if(A.equals(p.block)||A.equals(p.blockLimit))break;CKEDITOR.dtd.$removeEmpty[A.getName()]&&(A=A.clone(),w.moveChildren(A),w.append(A))}w.appendBogus();w.getParent()||k.insertNode(w);w.is("li")&&w.removeAttribute("value");!CKEDITOR.env.ie||!r||q&&c.getChildCount()||(k.moveToElementEditStart(q?c:w),k.select()); 780k.moveToElementEditStart(r&&!q?u:w)}else u.is("li")&&(w=k.clone(),w.selectNodeContents(u),w=new CKEDITOR.dom.walker(w),w.evaluator=function(a){return!(h(a)||b(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in CKEDITOR.dtd.$inline&&!(a.getName()in CKEDITOR.dtd.$empty))},(v=w.next())&&v.type==CKEDITOR.NODE_ELEMENT&&v.is("ul","ol")&&(CKEDITOR.env.needsBrFiller?p.createElement("br"):p.createText(" ")).insertBefore(v)),u&&k.moveToElementEditStart(u);k.select();k.scrollIntoView()}}},enterBr:function(b,a, 781c,e){if(c=c||g(b)){var h=c.document,m=c.checkEndOfBlock(),l=new CKEDITOR.dom.elementPath(b.getSelection().getStartElement()),q=l.block,z=q&&l.block.getName();e||"li"!=z?(!e&&m&&d.test(z)?(m=q.getDirection())?(h=h.createElement("div"),h.setAttribute("dir",m),h.insertAfter(q),c.setStart(h,0)):(h.createElement("br").insertAfter(q),CKEDITOR.env.gecko&&h.createText("").insertAfter(q),c.setStartAt(q.getNext(),CKEDITOR.env.ie?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_START)):(b="pre"==z&&CKEDITOR.env.ie&& 7828>CKEDITOR.env.version?h.createText("\r"):h.createElement("br"),c.deleteContents(),c.insertNode(b),CKEDITOR.env.needsBrFiller?(h.createText("").insertAfter(b),m&&(q||l.blockLimit).appendBogus(),b.getNext().$.nodeValue="",c.setStartAt(b.getNext(),CKEDITOR.POSITION_AFTER_START)):c.setStartAt(b,CKEDITOR.POSITION_AFTER_END)),c.collapse(!0),c.select(),c.scrollIntoView()):k(b,a,c,e)}}};m=CKEDITOR.plugins.enterkey;l=m.enterBr;k=m.enterBlock;d=/^h[1-6]$/})();(function(){function c(c,e){var b={},h=[],m={nbsp:" ", 783shy:"Â",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};c=c.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(c,a){var d=e?"\x26"+a+";":m[a];b[d]=e?m[a]:"\x26"+a+";";h.push(d);return""});c=c.replace(/,$/,"");if(!e&&c){c=c.split(",");var l=document.createElement("div"),k;l.innerHTML="\x26"+c.join(";\x26")+";";k=l.innerHTML;l=null;for(l=0;l<k.length;l++){var d=k.charAt(l);b[d]="\x26"+c[l]+";";h.push(d)}}b.regex=h.join(e?"|":"");return b}CKEDITOR.plugins.add("entities",{afterInit:function(g){function e(a){return d[a]} 784function b(a){return"force"!=h.entities_processNumerical&&l[a]?l[a]:"\x26#"+a.charCo
vendor: 31,498 bytes, lines 784-843
784deAt(0)+";"}var h=g.config;if(g=(g=g.dataProcessor)&&g.htmlFilter){var m=[];!1!==h.basicEntities&&m.push("nbsp,gt,lt,amp");h.entities&&(m.length&&m.push("quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro"), 785h.entities_latin&&m.push("Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml"),h.entities_greek&&m.push("Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv"), 786h.entities_additional&&m.push(h.entities_additional));var l=c(m.join(",")),k=l.regex?"["+l.regex+"]":"a^";delete l.regex;h.entities&&h.entities_processNumerical&&(k="[^ -~]|"+k);var k=new RegExp(k,"g"),d=c("nbsp,gt,lt,amp,shy",!0),f=new RegExp(d.regex,"g");g.addRules({text:function(a){return a.replace(f,e).replace(k,b)}},{applyToAll:!0,excludeNestedEditable:!0})}}})})();CKEDITOR.config.basicEntities=!0;CKEDITOR.config.entities=!0;CKEDITOR.config.entities_latin=!0;CKEDITOR.config.entities_greek=!0; 787CKEDITOR.config.entities_additional="#39";(function(){function c(b){var c=b.config,m=b.fire("uiSpace",{space:"top",html:""}).html,l=function(){function a(b,c,f){d.setStyle(c,e(f));d.setStyle("position",b)}function f(b){var c=m.getDocumentPosition();switch(b){case "top":a("absolute","top",c.y-u-v);break;case "pin":a("fixed","top",B);break;case "bottom":a("absolute","top",c.y+(q.height||q.bottom-q.top)+v)}k=b}var k,m,r,q,z,u,A,w=c.floatSpaceDockedOffsetX||0,v=c.floatSpaceDockedOffsetY||0,F=c.floatSpacePinnedOffsetX|| 7880,B=c.floatSpacePinnedOffsetY||0;return function(a){if(m=b.editable()){var n=a&&"focus"==a.name;n&&d.show();b.fire("floatingSpaceLayout",{show:n});d.removeStyle("left");d.removeStyle("right");r=d.getClientRect();q=m.getClientRect();z=g.getViewPaneSize();u=r.height;A="pageXOffset"in g.$?g.$.pageXOffset:CKEDITOR.document.$.documentElement.scrollLeft;k?(u+v<=q.top?f("top"):u+v>z.height-q.bottom?f("pin"):f("bottom"),a=z.width/2,a=c.floatSpacePreferRight?"right":0<q.left&&q.right<z.width&&q.width>r.width? 789"rtl"==c.contentsLangDirection?"right":"left":a-q.left>q.right-a?"left":"right",r.width>z.width?(a="left",n=0):(n="left"==a?0<q.left?q.left:0:q.right<z.width?z.width-q.right:0,n+r.width>z.width&&(a="left"==a?"right":"left",n=0)),d.setStyle(a,e(("pin"==k?F:w)+n+("pin"==k?0:"left"==a?A:-A)))):(k="pin",f("pin"),l(a))}}}();if(m){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+ 790(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(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':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),d=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:m, 791id:b.id,langDir:b.lang.dir,langCode:b.langCode,name:b.name,style:"display:none;z-index:"+(c.baseFloatZIndex-1),topId:b.ui.spaceId("top"),voiceLabel:b.title}))),f=CKEDITOR.tools.eventsBuffer(500,l),a=CKEDITOR.tools.eventsBuffer(100,l);d.unselectable();d.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});b.on("focus",function(c){l(c);b.on("change",f.input);g.on("scroll",a.input);g.on("resize",a.input)});b.on("blur",function(){d.hide();b.removeListener("change", 792f.input);g.removeListener("scroll",a.input);g.removeListener("resize",a.input)});b.on("destroy",function(){g.removeListener("scroll",a.input);g.removeListener("resize",a.input);d.clearCustomData();d.remove()});b.focusManager.hasFocus&&d.show();b.focusManager.add(d,1)}}var g=CKEDITOR.document.getWindow(),e=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(b){b.on("loaded",function(){c(this)},null,null,20)}})})();CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var c= 793CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),g=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), 794e=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'),b=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(b,c){return this.addBlock(b,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(b,c){c=c||{};var e=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&& 795(e["aria-multiselectable"]=!0);!e.role&&(e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";e[CKEDITOR.SHIFT+9]="prev";e[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(e[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var b=c.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(b); 796delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(b){var c=this.toggle(b);if(this.onClick)this.onClick(b,c)},this));return this._.click}},proto:{add:function(c,e,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[c]=k;var d;d=CKEDITOR.tools.htmlEncodeAttr(c).replace(b,"\\'");c={id:k,val:d,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': 797"",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||c),text:e||c};this._.pendingList.push(g.output(c))},startGroup:function(b){this._.close();var c=CKEDITOR.tools.getNextId();this._.groups[b]=c;this._.pendingHtml.push(e.output({id:c,label:b}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(b){var c=this.isMarked(b);c?this.unmark(b):this.mark(b);return!c},hideGroup:function(b){var c=(b= 798this.element.getDocument().getById(this._.groups[b]))&&b.getNext();b&&(b.setStyle("display","none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(b){this.element.getDocument().getById(this._.items[b]).setStyle("display","none")},showAll:function(){var b=this._.items,c=this._.groups,e=this.element.getDocument(),g;for(g in b)e.getById(b[g]).setStyle("display","");for(var d in c)b=e.getById(c[d]),g=b.getNext(),b.setStyle("display",""),g&&"ul"==g.getName()&&g.setStyle("display", 799"")},mark:function(b){this.multiSelect||this.unmarkAll();b=this._.items[b];var c=this.element.getDocument().getById(b);c.addClass("cke_selected");this.element.getDocument().getById(b+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(c)},markFirstDisplayed:function(){var b=this;this._.markFirstDisplayed(function(){b.multiSelect||b.unmarkAll()})},unmark:function(b){var c=this.element.getDocument();b=this._.items[b];var e=c.getById(b);e.removeClass("cke_selected");c.getById(b+"_option").removeAttribute("aria-selected"); 800this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var b=this._.items,c=this.element.getDocument(),e;for(e in b){var g=b[e];c.getById(g).removeClass("cke_selected");c.getById(g+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(b){return this.element.getDocument().getById(this._.items[b]).hasClass("cke_selected")},focus:function(b){this._.focusIndex=-1;var c=this.element.getElementsByTag("a"),e,g=-1;if(b)for(e=this.element.getDocument().getById(this._.items[b]).getFirst();b= 801c.getItem(++g);){if(b.equals(e)){this._.focusIndex=g;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}});(function(){var c='\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"'+ 802(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"',g="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(c+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(g='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var c=c+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+ 803g+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),e=CKEDITOR.addTemplate("combo",c);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(b){CKEDITOR.tools.extend(this, 804b,{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;b.className="cke_combopanel";b.block={multiSelect:b.multiSelect,attributes:b.attributes};b.toolbarRelated=!0;this._={panelDefinition:b,items:{},listeners:[]}},proto:{renderHtml:function(b){var c=[];this.render(b,c);return c.join("")},render:function(b,c){function g(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a= 805this.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()}}var l=CKEDITOR.env,k="cke_"+this.id,d=CKEDITOR.tools.addFunction(function(c){x&&(b.unlockSelection(1),x=0);a.execute(c)},this),f=this,a={id:k,combo:this,focus:function(){CKEDITOR.document.getById(k).getChild(1).focus()},execute:function(a){var c=f._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(f.createPanel(b), 806c.on)c.panel.hide();else{f.commit();var d=f.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(f.id,new CKEDITOR.dom.element(a),4)}},clickFn:d};this._.listeners.push(b.on("activeFilterChange",g,this));this._.listeners.push(b.on("mode",g,this));this._.listeners.push(b.on("selectionChange",g,this));!this.readOnly&&this._.listeners.push(b.on("readOnly",g,this));var n=CKEDITOR.tools.addFunction(function(b,c){b=new CKEDITOR.dom.event(b);var f=b.getKeystroke();switch(f){case 13:case 32:case 40:CKEDITOR.tools.callFunction(d, 807c);break;default:a.onkey(a,f)}b.preventDefault()}),t=CKEDITOR.tools.addFunction(function(){a.onfocus&&a.onfocus()}),x=0;a.keyDownFn=n;l={id:k,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),keydownFn:n,focusFn:t,clickFn:d};e.output(l,c);if(this.onRender)this.onRender();return a},createPanel:function(b){if(!this._.panel){var c=this._.panelDefinition,e=this._.panelDefinition.block,g=c.parent||CKEDITOR.document.getBody(), 808k="cke_combopanel__"+this.name,d=new CKEDITOR.ui.floatPanel(b,g,c),c=d.addListBlock(this.id,e),f=this;d.onShow=function(){this.element.addClass(k);f.setState(CKEDITOR.TRISTATE_ON);f._.on=1;f.editorFocus&&!b.focusManager.hasFocus&&b.focus();if(f.onOpen)f.onOpen()};d.onHide=function(a){this.element.removeClass(k);f.setState(f.modes&&f.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);f._.on=0;if(!a&&f.onClose)f.onClose()};d.onEscape=function(){d.hide(1)};c.onClick=function(a,b){f.onClick&& 809f.onClick.call(f,a,b);d.hide()};this._.panel=d;this._.list=c;d.getBlock(this.id).onHide=function(){f._.on=0;f.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(b,c){this._.value=b;var e=this.document.getById("cke_"+this.id+"_text");e&&(b||c?e.removeClass("cke_combo_inlinelabel"):(c=this.label,e.addClass("cke_combo_inlinelabel")),e.setText("undefined"!=typeof c?c:b))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(b){this._.list.mark(b)}, 810hideItem:function(b){this._.list.hideItem(b)},hideGroup:function(b){this._.list.hideGroup(b)},showAll:function(){this._.list.showAll()},add:function(b,c,e){this._.items[b]=e||b;this._.list.add(b,c,e)},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 c=this.document.getById("cke_"+this.id);c.setState(b,"cke_combo");b==CKEDITOR.TRISTATE_DISABLED? 811c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled");this._.state=b}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(b){b.removeListener()});this._.listeners=[]}},statics:{handler:{create:function(b){return new CKEDITOR.ui.richCombo(b)}}}}); 812CKEDITOR.ui.prototype.addRichCombo=function(b,c){this.add(b,CKEDITOR.UI_RICHCOMBO,c)}})();(function(){function c(c,b,h,m,l,k,d,f){var a=c.config,n=new CKEDITOR.style(d),t=l.split(";");l=[];for(var x={},p=0;p<t.length;p++){var r=t[p];if(r){var r=r.split("/"),q={},z=t[p]=r[0];q[h]=l[p]=r[1]||z;x[z]=new CKEDITOR.style(d,q);x[z]._.definition.name=z}else t.splice(p--,1)}c.ui.addRichCombo(b,{label:m.label,title:m.panelTitle,toolbar:"styles,"+f,defaultValue:"cke-default",allowedContent:n,requiredContent:n, 813contentTransformations:"span"===d.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, 814delete a.attributes.face)}}]]:null,panel:{css:[CKEDITOR.skin.getPath("editor")].concat(a.contentsCss),multiSelect:!1,attributes:{"aria-label":m.panelTitle}},init:function(){var a;a="("+c.lang.common.optionDefault+")";this.startGroup(m.panelTitle);this.add(this.defaultValue,a,a);for(var b=0;b<t.length;b++)a=t[b],this.add(a,x[a].buildPreview(),a)},onClick:function(a){c.focus();c.fire("saveSnapshot");var b=this.getValue(),d=x[a],f,h,k,n,m;if(b&&a!=b)if(f=x[b],b=c.getSelection().getRanges()[0],b.collapsed){if(h= 815c.elementPath(),k=h.contains(function(a){return f.checkElementRemovable(a)})){n=b.checkBoundaryOfElement(k,CKEDITOR.START);m=b.checkBoundaryOfElement(k,CKEDITOR.END);if(n&&m){for(n=b.createBookmark();h=k.getFirst();)h.insertBefore(k);k.remove();b.moveToBookmark(n)}else n||m?b.moveToPosition(k,n?CKEDITOR.POSITION_BEFORE_START:CKEDITOR.POSITION_AFTER_END):(b.splitElement(k),b.moveToPosition(k,CKEDITOR.POSITION_AFTER_END)),g(b,h.elements.slice(),k);c.getSelection().selectRanges([b])}}else c.removeStyle(f); 816a===this.defaultValue?f&&c.removeStyle(f):c.applyStyle(d);c.fire("saveSnapshot")},onRender:function(){c.on("selectionChange",function(a){var b=this.getValue();a=a.data.path.elements;for(var d=0,f;d<a.length;d++){f=a[d];for(var g in x)if(x[g].checkElementMatch(f,!0,c)){g!=b&&this.setValue(g);return}}this.setValue("",k)},this)},refresh:function(){c.activeFilter.check(n)||this.setState(CKEDITOR.TRISTATE_DISABLED)}})}function g(c,b,h){var m=b.pop();if(m){if(h)return g(c,b,m.equals(h)?null:h);h=m.clone(); 817c.insertNode(h);c.moveToPosition(h,CKEDITOR.POSITION_AFTER_START);g(c,b)}}CKEDITOR.plugins.add("font",{requires:"richcombo",init:function(e){var b=e.config;c(e,"Font","family",e.lang.font,b.font_names,b.font_defaultLabel,b.font_style,30);c(e,"FontSize","size",e.lang.font.fontSize,b.fontSize_sizes,b.fontSize_defaultLabel,b.fontSize_style,40)}})})();CKEDITOR.config.font_names="Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif"; 818CKEDITOR.config.font_defaultLabel="";CKEDITOR.config.font_style={element:"span",styles:{"font-family":"#(family)"},overrides:[{element:"font",attributes:{face:null}}]};CKEDITOR.config.fontSize_sizes="8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px";CKEDITOR.config.fontSize_defaultLabel="";CKEDITOR.config.fontSize_style={element:"span",styles:{"font-size":"#(size)"},overrides:[{element:"font",attributes:{size:null}}]};CKEDITOR.plugins.add("htmlwriter", 819{init:function(c){var g=new CKEDITOR.htmlWriter;g.forceSimpleAmpersand=c.config.forceSimpleAmpersand;g.indentationChars=c.config.dataIndentationChars||"\t";c.dataProcessor.writer=g}});CKEDITOR.htmlWriter=CKEDITOR.tools.createClass({base:CKEDITOR.htmlParser.basicWriter,$:function(){this.base();this.indentationChars="\t";this.selfClosingEnd=" /\x3e";this.lineBreakChars="\n";this.sortAttributes=1;this._.indent=0;this._.indentation="";this._.inPre=0;this._.rules={};var c=CKEDITOR.dtd,g;for(g in CKEDITOR.tools.extend({}, 820c.$nonBodyContent,c.$block,c.$listItem,c.$tableContent))this.setRules(g,{indent:!c[g]["#"],breakBeforeOpen:1,breakBeforeClose:!c[g]["#"],breakAfterClose:1,needsSpace:g in c.$block&&!(g in{li:1,dt:1,dd:1})});this.setRules("br",{breakAfterOpen:1});this.setRules("title",{indent:0,breakAfterOpen:0});this.setRules("style",{indent:0,breakBeforeClose:1});this.setRules("pre",{breakAfterOpen:1,indent:0})},proto:{openTag:function(c){var g=this._.rules[c];this._.afterCloser&&g&&g.needsSpace&&this._.needsSpace&& 821this._.output.push("\n");this._.indent?this.indentation():g&&g.breakBeforeOpen&&(this.lineBreak(),this.indentation());this._.output.push("\x3c",c);this._.afterCloser=0},openTagClose:function(c,g){var e=this._.rules[c];g?(this._.output.push(this.selfClosingEnd),e&&e.breakAfterClose&&(this._.needsSpace=e.needsSpace)):(this._.output.push("\x3e"),e&&e.indent&&(this._.indentation+=this.indentationChars));e&&e.breakAfterOpen&&this.lineBreak();"pre"==c&&(this._.inPre=1)},attribute:function(c,g){"string"== 822typeof g&&(g=CKEDITOR.tools.htmlEncodeAttr(g),this.forceSimpleAmpersand&&(g=g.replace(/&/g,"\x26")));this._.output.push(" ",c,'\x3d"',g,'"')},closeTag:function(c){var g=this._.rules[c];g&&g.indent&&(this._.indentation=this._.indentation.substr(this.indentationChars.length));this._.indent?this.indentation():g&&g.breakBeforeClose&&(this.lineBreak(),this.indentation());this._.output.push("\x3c/",c,"\x3e");"pre"==c&&(this._.inPre=0);g&&g.breakAfterClose&&(this.lineBreak(),this._.needsSpace=g.needsSpace); 823this._.afterCloser=1},text:function(c){this._.indent&&(this.indentation(),!this._.inPre&&(c=CKEDITOR.tools.ltrim(c)));this._.output.push(c)},comment:function(c){this._.indent&&this.indentation();this._.output.push("\x3c!--",c,"--\x3e")},lineBreak:function(){!this._.inPre&&0<this._.output.length&&this._.output.push(this.lineBreakChars);this._.indent=1},indentation:function(){!this._.inPre&&this._.indentation&&this._.output.push(this._.indentation);this._.indent=0},reset:function(){this._.output=[]; 824this._.indent=0;this._.indentation="";this._.afterCloser=0;this._.inPre=0;this._.needsSpace=0},setRules:function(c,g){var e=this._.rules[c];e?CKEDITOR.tools.extend(e,g,!0):this._.rules[c]=g}}});(function(){function c(b,c){var m,l;c.on("refresh",function(b){var c=[g],f;for(f in b.data.states)c.push(b.data.states[f]);this.setState(CKEDITOR.tools.search(c,e)?e:g)},c,null,100);c.on("exec",function(c){m=b.getSelection();l=m.createBookmarks(1);c.data||(c.data={});c.data.done=!1},c,null,0);c.on("exec",function(){b.forceNextSelectionCheck(); 825m.selectBookmarks(l)},c,null,100)}var g=CKEDITOR.TRISTATE_DISABLED,e=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indent",{init:function(b){var e=CKEDITOR.plugins.indent.genericDefinition;c(b,b.addCommand("indent",new e(!0)));c(b,b.addCommand("outdent",new e));b.ui.addButton&&(b.ui.addButton("Indent",{label:b.lang.indent.indent,command:"indent",directional:!0,toolbar:"indent,20"}),b.ui.addButton("Outdent",{label:b.lang.indent.outdent,command:"outdent",directional:!0,toolbar:"indent,10"}));b.on("dirChanged", 826function(c){var e=b.createRange(),g=c.data.node;e.setStartBefore(g);e.setEndAfter(g);for(var d=new CKEDITOR.dom.walker(e),f;f=d.next();)if(f.type==CKEDITOR.NODE_ELEMENT)if(!f.equals(g)&&f.getDirection())e.setStartAfter(f),d=new CKEDITOR.dom.walker(e);else{var a=b.config.indentClasses;if(a)for(var h="ltr"==c.data.dir?["_rtl",""]:["","_rtl"],t=0;t<a.length;t++)f.hasClass(a[t]+h[0])&&(f.removeClass(a[t]+h[0]),f.addClass(a[t]+h[1]));a=f.getStyle("margin-right");h=f.getStyle("margin-left");a?f.setStyle("margin-left", 827a):f.removeStyle("margin-left");h?f.setStyle("margin-right",h):f.removeStyle("margin-right")}})}});CKEDITOR.plugins.indent={genericDefinition:function(b){this.isIndent=!!b;this.startDisabled=!this.isIndent},specificDefinition:function(b,c,e){this.name=c;this.editor=b;this.jobs={};this.enterBr=b.config.enterMode==CKEDITOR.ENTER_BR;this.isIndent=!!e;this.relatedGlobal=e?"indent":"outdent";this.indentKey=e?9:CKEDITOR.SHIFT+9;this.database={}},registerCommands:function(b,c){b.on("pluginsLoaded",function(){for(var b in c)(function(b, 828c){var d=b.getCommand(c.relatedGlobal),f;for(f in c.jobs)d.on("exec",function(a){a.data.done||(b.fire("lockSnapshot"),c.execJob(b,f)&&(a.data.done=!0),b.fire("unlockSnapshot"),CKEDITOR.dom.element.clearAllMarkers(c.database))},this,null,f),d.on("refresh",function(a){a.data.states||(a.data.states={});a.data.states[c.name+"@"+f]=c.refreshJob(b,f,a.data.path)},this,null,f);b.addFeature(c)})(this,c[b])})}};CKEDITOR.plugins.indent.genericDefinition.prototype={context:"p",exec:function(){}};CKEDITOR.plugins.indent.specificDefinition.prototype= 829{execJob:function(b,c){var e=this.jobs[c];if(e.state!=g)return e.exec.call(this,b)},refreshJob:function(b,c,e){c=this.jobs[c];b.activeFilter.checkFeature(this)?c.state=c.refresh.call(this,b,e):c.state=g;return c.state},getContext:function(b){return b.contains(this.context)}}})();(function(){function c(b,c,d){if(!b.getCustomData("indent_processed")){var f=this.editor,a=this.isIndent;if(c){f=b.$.className.match(this.classNameRegex);d=0;f&&(f=f[1],d=CKEDITOR.tools.indexOf(c,f)+1);if(0>(d+=a?1:-1))return; 830d=Math.min(d,c.length);d=Math.max(d,0);b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.classNameRegex,""));0<d&&b.addClass(c[d-1])}else{c=g(b,d);d=parseInt(b.getStyle(c),10);var e=f.config.indentOffset||40;isNaN(d)&&(d=0);d+=(a?1:-1)*e;if(0>d)return;d=Math.max(d,0);d=Math.ceil(d/e)*e;b.setStyle(c,d?d+(f.config.indentUnit||"px"):"");""===b.getAttribute("style")&&b.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,b,"indent_processed",1)}}function g(b,c){return"ltr"== 831(c||b.getComputedStyle("direction"))?"margin-left":"margin-right"}var e=CKEDITOR.dtd.$listItem,b=CKEDITOR.dtd.$list,h=CKEDITOR.TRISTATE_DISABLED,m=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(l){function k(){d.specificDefinition.apply(this,arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:f?null:"margin-left,margin-right",classes:f||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"], 832["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")+(f?"("+f.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var c=b.block||b.blockLimit;if(!c.is(e))var d=c.getAscendant(e),c=d&&b.contains(d)|| 833c;c.is(e)&&(c=c.getParent());if(this.enterBr||this.getContext(b)){if(f){var d=f,c=c.$.className.match(this.classNameRegex),k=this.isIndent,d=c?k?c[1]!=d.slice(-1):!0:k;return d?m:h}return this.isIndent?m:c?CKEDITOR[0>=(parseInt(c.getStyle(g(c)),10)||0)?"TRISTATE_DISABLED":"TRISTATE_OFF"]:h}return h},exec:function(a){var d=a.getSelection(),d=d&&d.getRanges()[0],e;if(e=a.elementPath().contains(b))c.call(this,e,f);else for(d=d.createIterator(),a=a.config.enterMode,d.enforceRealBlocks=!0,d.enlargeBr= 834a!=CKEDITOR.ENTER_BR;e=d.getNextParagraph(a==CKEDITOR.ENTER_P?"p":"div");)e.isReadOnly()||c.call(this,e,f);return!0}}}}var d=CKEDITOR.plugins.indent,f=l.config.indentClasses;d.registerCommands(l,{indentblock:new k(l,"indentblock",!0),outdentblock:new k(l,"outdentblock")});CKEDITOR.tools.extend(k.prototype,d.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:f?new RegExp("(?:^|\\s+)("+f.join("|")+")(?\x3d$|\\s)"):null})}})})(); 835(function(){function c(b){function c(d){for(var g=m.startContainer,l=m.endContainer;g&&!g.getParent().equals(d);)g=g.getParent();for(;l&&!l.getParent().equals(d);)l=l.getParent();if(!g||!l)return!1;for(var p=[],w=!1;!w;)g.equals(l)&&(w=!0),p.push(g),g=g.getNext();if(1>p.length)return!1;g=d.getParents(!0);for(l=0;l<g.length;l++)if(g[l].getName&&h[g[l].getName()]){d=g[l];break}for(var g=f.isIndent?1:-1,l=p[0],p=p[p.length-1],w=CKEDITOR.plugins.list.listToArray(d,a),v=w[p.getCustomData("listarray_index")].indent, 836l=l.getCustomData("listarray_index");l<=p.getCustomData("listarray_index");l++)if(w[l].indent+=g,0<g){for(var r=w[l].parent,x=l-1;0<=x;x--)if(w[x].indent===g){r=w[x].parent;break}w[l].parent=new CKEDITOR.dom.element(r.getName(),r.getDocument())}for(l=p.getCustomData("listarray_index")+1;l<w.length&&w[l].indent>v;l++)w[l].indent+=g;g=CKEDITOR.plugins.list.arrayToList(w,a,null,b.config.enterMode,d.getDirection());if(!f.isIndent){var C;if((C=d.getParent())&&C.is("li"))for(var p=g.listNode.getChildren(), 837H=[],E,l=p.count()-1;0<=l;l--)(E=p.getItem(l))&&E.is&&E.is("li")&&H.push(E)}g&&g.listNode.replace(d);if(H&&H.length)for(l=0;l<H.length;l++){for(E=d=H[l];(E=E.getNext())&&E.is&&E.getName()in h;)CKEDITOR.env.needsNbspFiller&&!d.getFirst(e)&&d.append(m.document.createText("Â ")),d.append(E);d.insertAfter(C)}g&&b.fire("contentDomInvalidated");return!0}for(var f=this,a=this.database,h=this.context,m,l=b.getSelection(),l=(l&&l.getRanges()).createIterator();m=l.getNextRange();){for(var p=m.getCommonAncestor();p&& 838(p.type!=CKEDITOR.NODE_ELEMENT||!h[p.getName()]);){if(b.editable().equals(p)){p=!1;break}p=p.getParent()}p||(p=m.startPath().contains(h))&&m.setEndAt(p,CKEDITOR.POSITION_BEFORE_END);if(!p){var r=m.getEnclosedNode();r&&r.type==CKEDITOR.NODE_ELEMENT&&r.getName()in h&&(m.setStartAt(r,CKEDITOR.POSITION_AFTER_START),m.setEndAt(r,CKEDITOR.POSITION_BEFORE_END),p=r)}p&&m.startContainer.type==CKEDITOR.NODE_ELEMENT&&m.startContainer.getName()in h&&(r=new CKEDITOR.dom.walker(m),r.evaluator=g,m.startContainer= 839r.next());p&&m.endContainer.type==CKEDITOR.NODE_ELEMENT&&m.endContainer.getName()in h&&(r=new CKEDITOR.dom.walker(m),r.evaluator=g,m.endContainer=r.previous());if(p)return c(p)}return 0}function g(b){return b.type==CKEDITOR.NODE_ELEMENT&&b.is("li")}function e(c){return b(c)&&h(c)}var b=CKEDITOR.dom.walker.whitespaces(!0),h=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.TRISTATE_DISABLED,l=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(b){function d(a){f.specificDefinition.apply(this, 840arguments);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, 841b){return!this.getContext(b)||this.isIndent?m:l},exec:CKEDITOR.tools.bind(c,this)}}var f=CKEDITOR.plugins.indent;f.registerCommands(b,{indentlist:new d(b,"indentlist",!0),outdentlist:new d(b,"outdentlist")});CKEDITOR.tools.extend(d.prototype,f.specificDefinition.prototype,{context:{ol:1,ul:1}})}});CKEDITOR.plugins.indentList={};CKEDITOR.plugins.indentList.firstItemInPath=function(b,c,f){var a=c.contains(g);f||(f=c.contains(b));return f&&a&&a.equals(f.getFirst(g))}})();(function(){function c(b,c){c= 842void 0===c||c;var e;if(c)e=b.getComputedStyle("text-align");else{for(;!b.hasAttribute||!b.hasAttribute("align")&&!b.getStyle("text-align");){e=b.getParent();if(!e)break;b=e}e=b.getStyle("text-align")||b.getAttribute("align")||""}e&&(e=e.replace(/(?:-(?:moz|webkit)-)?(?:start|auto)/i,""));!e&&c&&(e="rtl"==b.getComputedStyle("direction")?"right":"left");return e}function g(b,c,e){this.editor=b;this.name=c;this.value=e;this.context="p";c=b.config.justifyClasses;var g=b.config.enterMode==CKEDITOR.ENTER_P? 843"p":"div";
843if(c){switch(e){case "left":this.cssClassName=c[0];break;case "center":this.cssClassName=c[1];break;case "right":this.cssClassName=c[2];break;case "justify":this.cssClassName=c[3]}this.cssClassRegex=new RegExp("(?:^|\\s+)(?:"+c.join("|")+")(?\x3d$|\\s)");this.requiredContent=g+"("+this.cssClassName+")"}else this.requiredContent=g+"{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|| 844null}};b.config.enterMode==CKEDITOR.ENTER_BR&&(this.allowedContent.div=!0)}function e(b){var c=b.editor,e=c.createRange();e.setStartBefore(b.data.node);e.setEndAfter(b.data.node);for(var g=new CKEDITOR.dom.walker(e),k;k=g.next();)if(k.type==CKEDITOR.NODE_ELEMENT)if(!k.equals(b.data.node)&&k.getDirection())e.setStartAfter(k),g=new CKEDITOR.dom.walker(e);else{var d=c.config.justifyClasses;d&&(k.hasClass(d[0])?(k.removeClass(d[0]),k.addClass(d[2])):k.hasClass(d[2])&&(k.removeClass(d[2]),k.addClass(d[0]))); 845d=k.getStyle("text-align");"left"==d?k.setStyle("text-align","right"):"right"==d&&k.setStyle("text-align","left")}}g.prototype={exec:function(b){var e=b.getSelection(),g=b.config.enterMode;if(e){for(var l=e.createBookmarks(),k=e.getRanges(),d=this.cssClassName,f,a,n=b.config.useComputedState,n=void 0===n||n,t=k.length-1;0<=t;t--)for(f=k[t].createIterator(),f.enlargeBr=g!=CKEDITOR.ENTER_BR;a=f.getNextParagraph(g==CKEDITOR.ENTER_P?"p":"div");)if(!a.isReadOnly()){var x=a.getName(),p;p=b.activeFilter.check(x+ 846"{text-align}");if((x=b.activeFilter.check(x+"("+d+")"))||p){a.removeAttribute("align");a.removeStyle("text-align");var r=d&&(a.$.className=CKEDITOR.tools.ltrim(a.$.className.replace(this.cssClassRegex,""))),q=this.state==CKEDITOR.TRISTATE_OFF&&(!n||c(a,!0)!=this.value);d&&x?q?a.addClass(d):r||a.removeAttribute("class"):q&&p&&a.setStyle("text-align",this.value)}}b.focus();b.forceNextSelectionCheck();e.selectBookmarks(l)}},refresh:function(b,e){var g=e.block||e.blockLimit,l=g.getName(),k=g.equals(b.editable()), 847l=this.cssClassName?b.activeFilter.check(l+"("+this.cssClassName+")"):b.activeFilter.check(l+"{text-align}");k&&!CKEDITOR.dtd.$list[e.lastElement.getName()]?this.setState(CKEDITOR.TRISTATE_OFF):!k&&l?this.setState(c(g,this.editor.config.useComputedState)==this.value?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF):this.setState(CKEDITOR.TRISTATE_DISABLED)}};CKEDITOR.plugins.add("justify",{init:function(b){if(!b.blockless){var c=new g(b,"justifyleft","left"),m=new g(b,"justifycenter","center"),l=new g(b, 848"justifyright","right"),k=new g(b,"justifyblock","justify");b.addCommand("justifyleft",c);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",{label:b.lang.common.center,command:"justifycenter",toolbar:"align,20"}),b.ui.addButton("JustifyRight",{label:b.lang.common.alignRight,command:"justifyright",toolbar:"align,30"}), 849b.ui.addButton("JustifyBlock",{label:b.lang.common.justify,command:"justifyblock",toolbar:"align,40"}));b.on("dirChanged",e)}}})})();(function(){function c(a,b,c,d){for(var f=CKEDITOR.plugins.list.listToArray(b.root,c),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}for(var h=b.root.getDocument(),k,l,g=0;g<e.length;g++){var n=e[g].getCustomData("listarray_index"); 850k=f[n].parent;k.is(this.type)||(l=h.createElement(this.type),k.copyAttributes(l,{start:1,type:1}),l.removeStyle("list-style-type"),f[n].parent=l)}c=CKEDITOR.plugins.list.arrayToList(f,c,null,a.config.enterMode);for(var m,f=c.listNode.getChildCount(),g=0;g<f&&(m=c.listNode.getChild(g));g++)m.getName()==this.type&&d.push(m);c.listNode.replace(b.root);a.fire("contentDomInvalidated")}function g(a,b,c){var d=b.contents,f=b.root.getDocument(),e=[];if(1==d.length&&d[0].equals(b.root)){var g=f.createElement("div"); 851d[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],n;n=l.getParent();){if(n.equals(b)){e.push(l);!k&&l.getDirection()&&(k=1);l=l.getDirection(a);null!==h&&(h=h&&h!=l?null:l);break}l=n}if(!(1>e.length)){d=e[e.length-1].getNext();
vendor: 10,814 bytes, lines 851-872
851g=f.createElement(this.type);for(c.push(g);e.length;)c=e.shift(),a=f.createElement("li"), 852l=c,l.is("pre")||p.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 e(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(n=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||n.is&&n.isBlockBoundary({br:1})))a.document.createElement("br")[c? 853"insertBefore":"insertAfter"](l)}for(var f=CKEDITOR.plugins.list.listToArray(b.root,c),e=[],g=0;g<b.contents.length;g++){var h=b.contents[g];(h=h.getAscendant("li",!0))&&!h.getCustomData("list_item_processed")&&(e.push(h),CKEDITOR.dom.element.setMarker(c,h,"list_item_processed",!0))}h=null;for(g=0;g<e.length;g++)h=e[g].getCustomData("listarray_index"),f[h].indent=-1;for(g=h+1;g<f.length;g++)if(f[g].indent>f[g-1].indent+1){e=f[g-1].indent+1-f[g].indent;for(h=f[g].indent;f[g]&&f[g].indent>=h;)f[g].indent+= 854e,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(f,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,n;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 h(a,b,c,d){for(var f,e;f=a[d?"getLast":"getFirst"](r);)(e=f.getDirection(1))!==b.getDirection(1)&&f.setAttribute("dir",e),f.remove(),c?f[d?"insertBefore":"insertAfter"](c):b.append(f,d),c=f}function m(a){function b(c){var d= 855a[c?"getPrevious":"getNext"](t);d&&d.type==CKEDITOR.NODE_ELEMENT&&d.is(a.getName())&&(h(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,c){a.fire("saveSnapshot");c.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=c.extractContents();b.trim(!1,!0);var e=b.createBookmark(),g=new CKEDITOR.dom.elementPath(b.startContainer),k=g.block,g=g.lastElement.getAscendant("li", 8561)||k,l=new CKEDITOR.dom.elementPath(c.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(t))&&x(k)&&k.remove();(k=f.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=b.startContainer.getChild(b.startOffset))?f.insertBefore(k):b.startContainer.append(f);n&&(f=d(n))&&(g.contains(n)?(h(f,n.getParent(),n),f.remove()):g.append(f));for(;c.checkStartOfBlock()&&c.checkEndOfBlock();){l=c.startPath();f= 857l.block;if(!f)break;f.is("li")&&(g=f.getParent(),f.equals(g.getLast(t))&&f.equals(g.getFirst(t))&&(f=g));c.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}c=c.clone();f=a.editable();c.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(c);c.evaluator=function(a){return t(a)&&!x(a)};(c=c.next())&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in CKEDITOR.dtd.$list&&m(c);b.moveToBookmark(e);b.select();a.fire("saveSnapshot")}function d(a){return(a=a.getLast(t))&&a.type==CKEDITOR.NODE_ELEMENT&& 858a.getName()in f?a:null}var f={ol:1,ul:1},a=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),t=function(b){return!(a(b)||n(b))},x=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,b,c,d,e){if(!f[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&&CKEDITOR.plugins.list.listToArray(k,b,c,d+1);if("li"==k.$.nodeName.toLowerCase()){var l={parent:a, 859indent:d,element:k,contents:[]};e?l.grandparent=e:(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 n=0,m=k.getChildCount(),t;n<m;n++)t=k.getChild(n),t.type==CKEDITOR.NODE_ELEMENT&&f[t.getName()]?CKEDITOR.plugins.list.listToArray(t,b,c,d+1,l.grandparent):l.contents.push(t)}}return c},arrayToList:function(a,b,c,d,e){c||(c=0);if(!a||a.length< 860c+1)return null;for(var g,h=a[c].parent.getDocument(),k=new CKEDITOR.dom.documentFragment(h),l=null,m=c,p=Math.max(a[c].indent,0),r=null,x,D,P=d==CKEDITOR.ENTER_P?"p":"div";;){var I=a[m];g=I.grandparent;x=I.element.getDirection(1);if(I.indent==p){l&&a[m].parent.getName()==l.getName()||(l=a[m].parent.clone(!1,1),e&&l.setAttribute("dir",e),k.append(l));r=l.append(I.element.clone(0,1));x!=l.getDirection(1)&&r.setAttribute("dir",x);for(g=0;g<I.contents.length;g++)r.append(I.contents[g].clone(1,1));m++}else if(I.indent== 861Math.max(p,0)+1)I=a[m-1].element.getDirection(1),m=CKEDITOR.plugins.list.arrayToList(a,null,m,d,I!=x?x:null),!r.getChildCount()&&CKEDITOR.env.needsNbspFiller&&7>=h.$.documentMode&&r.append(h.createText("Â ")),r.append(m.listNode),m=m.nextIndex;else if(-1==I.indent&&!c&&g){f[g.getName()]?(r=I.element.clone(!1,!0),x!=g.getDirection(1)&&r.setAttribute("dir",x)):r=new CKEDITOR.dom.documentFragment(h);var l=g.getDirection(1)!=x,L=I.element,y=L.getAttribute("class"),M=L.getAttribute("style"),N=r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&& 862(d!=CKEDITOR.ENTER_BR||l||M||y),O,da=I.contents.length,S;for(g=0;g<da;g++)if(O=I.contents[g],n(O)&&1<da)N?S=O.clone(1,1):r.append(O.clone(1,1));else if(O.type==CKEDITOR.NODE_ELEMENT&&O.isBlockBoundary()){l&&!O.getDirection()&&O.setAttribute("dir",x);D=O;var X=L.getAttribute("style");X&&D.setAttribute("style",X.replace(/([^;])$/,"$1;")+(D.getAttribute("style")||""));y&&O.addClass(y);D=null;S&&(r.append(S),S=null);r.append(O.clone(1,1))}else N?(D||(D=h.createElement(P),r.append(D),l&&D.setAttribute("dir", 863x)),M&&D.setAttribute("style",M),y&&D.setAttribute("class",y),S&&(D.append(S),S=null),D.append(O.clone(1,1))):r.append(O.clone(1,1));S&&((D||r).append(S),S=null);r.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&m!=a.length-1&&(CKEDITOR.env.needsBrFiller&&(x=r.getLast())&&x.type==CKEDITOR.NODE_ELEMENT&&x.is("br")&&x.remove(),(x=r.getLast(t))&&x.type==CKEDITOR.NODE_ELEMENT&&x.is(CKEDITOR.dtd.$block)||r.append(h.createElement("br")));x=r.$.nodeName.toLowerCase();"div"!=x&&"p"!=x||r.appendBogus();k.append(r); 864l=null;m++}else return null;D=null;if(a.length<=m||Math.max(a[m].indent,0)<p)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=e=d=void 0,d=c.getDirection()))){for(e=c.getParent();e&&!(h=e.getDirection());)e=e.getParent();d==h&&c.removeAttribute("dir")}a=a.getNextSourceNode()}return{listNode:k,nextIndex:m}}};var p=/^h[1-6]$/,r=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT);b.prototype={exec:function(a){function b(a){return f[a.root.getName()]&& 865!d(a.root,[CKEDITOR.NODE_COMMENT])}function d(a,b){return CKEDITOR.tools.array.filter(a.getChildren().toArray(),function(a){return-1===CKEDITOR.tools.array.indexOf(b,a.type)}).length}function h(a){var b=!0;if(0===a.getChildCount())return!1;a.forEach(function(a){if(a.type!==CKEDITOR.NODE_COMMENT)return b=!1},null,!0);return b}this.refresh(a,a.elementPath());var k=a.config,l=a.getSelection(),n=l&&l.getRanges();if(this.state==CKEDITOR.TRISTATE_OFF){var r=a.editable();if(r.getFirst(t)){var p=1==n.length&& 866n[0];(k=p&&p.getEnclosedNode())&&k.is&&this.type==k.getName()&&this.setState(CKEDITOR.TRISTATE_ON)}else k.enterMode==CKEDITOR.ENTER_BR?r.appendBogus():n[0].fixBlock(1,k.enterMode==CKEDITOR.ENTER_P?"p":"div"),l.selectRanges(n)}for(var k=l.createBookmarks(!0),r=[],x={},n=n.createIterator(),E=0;(p=n.getNextRange())&&++E;){var J=p.getBoundaryNodes(),G=J.startNode,D=J.endNode;G.type==CKEDITOR.NODE_ELEMENT&&"td"==G.getName()&&p.setStartAt(J.startNode,CKEDITOR.POSITION_AFTER_START);D.type==CKEDITOR.NODE_ELEMENT&& 867"td"==D.getName()&&p.setEndAt(J.endNode,CKEDITOR.POSITION_BEFORE_END);p=p.createIterator();for(p.forceBrBreak=this.state==CKEDITOR.TRISTATE_OFF;J=p.getNextParagraph();)if(!J.getCustomData("list_block")&&!h(J)){CKEDITOR.dom.element.setMarker(x,J,"list_block",1);for(var P=a.elementPath(J),G=P.elements,D=0,P=P.blockLimit,I,L=G.length-1;0<=L&&(I=G[L]);L--)if(f[I.getName()]&&P.contains(I)){P.removeCustomData("list_group_object_"+E);(G=I.getCustomData("list_group_object"))?G.contents.push(J):(G={root:I, 868contents:[J]},r.push(G),CKEDITOR.dom.element.setMarker(x,I,"list_group_object",G));D=1;break}D||(D=P,D.getCustomData("list_group_object_"+E)?D.getCustomData("list_group_object_"+E).contents.push(J):(G={root:D,contents:[J]},CKEDITOR.dom.element.setMarker(x,D,"list_group_object_"+E,G),r.push(G)))}}for(I=[];0<r.length;)G=r.shift(),this.state==CKEDITOR.TRISTATE_OFF?b(G)||(f[G.root.getName()]?c.call(this,a,G,x,I):g.call(this,a,G,I)):this.state==CKEDITOR.TRISTATE_ON&&f[G.root.getName()]&&!b(G)&&e.call(this, 869a,G,x);for(L=0;L<I.length;L++)m(I[L]);CKEDITOR.dom.element.clearAllMarkers(x);l.selectBookmarks(k);a.focus()},refresh:function(a,b){var c=b.contains(f,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||(a.addCommand("numberedlist",new b("numberedlist","ol")),a.addCommand("bulletedlist",new b("bulletedlist","ul")), 870a.ui.addButton&&(a.ui.addButton("NumberedList",{label:a.lang.list.numberedlist,command:"numberedlist",directional:!0,toolbar:"list,10"}),a.ui.addButton("BulletedList",{label:a.lang.list.bulletedlist,command:"bulletedlist",directional:!0,toolbar:"list,20"})),a.on("key",function(b){var c=b.data.domEvent.getKey(),e;if("wysiwyg"==a.mode&&c in{8:1,46:1}){var g=a.getSelection().getRanges()[0],h=g&&g.startPath();if(g&&g.collapsed){var n=8==c,m=a.editable(),r=new CKEDITOR.dom.walker(g.clone());r.evaluator= 871function(a){return t(a)&&!x(a)};r.guard=function(a,b){return!(b&&a.type==CKEDITOR.NODE_ELEMENT&&a.is("table"))};c=g.clone();if(n){var p;(p=h.contains(f))&&g.checkBoundaryOfElement(p,CKEDITOR.START)&&(p=p.getParent())&&p.is("li")&&(p=d(p))?(e=p,p=p.getPrevious(t),c.moveToPosition(p&&x(p)?p:e,CKEDITOR.POSITION_BEFORE_START)):(r.range.setStartAt(m,CKEDITOR.POSITION_AFTER_START),r.range.setEnd(g.startContainer,g.startOffset),(p=r.previous())&&p.type==CKEDITOR.NODE_ELEMENT&&(p.getName()in f||p.is("li"))&& 872(p.is("li")||(r.range.selectNodeContents(p),r.reset(),r.evaluator=l,p=r.previous()),e=p,c.moveToElementEditEnd(e),c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END)));if(e)k(a,c,g),b.cancel();else{var E=h.contains(f);E&&g.checkBoundaryOfElement(E,CKEDITOR.START)&&(e=E.getFirst(t),g.checkBoundaryOfElement(e,CKEDITOR.START)&&(p=E.getPrevious(t),d(e)?p&&(g.moveToElementEditEnd(p),g.select()):a.execCommand("outde
vendor: 12,916 bytes, lines 872-897
872nt"),b.cancel()))}}else if(e=h.contains("li")){if(r.range.setEndAt(m,CKEDITOR.POSITION_BEFORE_END), 873n=(m=e.getLast(t))&&l(m)?m:e,h=0,(p=r.next())&&p.type==CKEDITOR.NODE_ELEMENT&&p.getName()in f&&p.equals(m)?(h=1,p=r.next()):g.checkBoundaryOfElement(n,CKEDITOR.END)&&(h=2),h&&p){g=g.clone();g.moveToElementEditStart(p);if(1==h&&(c.optimize(),!c.startContainer.equals(e))){for(e=c.startContainer;e.is(CKEDITOR.dtd.$inline);)E=e,e=e.getParent();E&&c.moveToPosition(E,CKEDITOR.POSITION_AFTER_END)}2==h&&(c.moveToPosition(c.endPath().block,CKEDITOR.POSITION_BEFORE_END),g.endPath().block&&g.moveToPosition(g.endPath().block, 874CKEDITOR.POSITION_AFTER_START));k(a,c,g);b.cancel()}}else r.range.setEndAt(m,CKEDITOR.POSITION_BEFORE_END),(p=r.next())&&p.type==CKEDITOR.NODE_ELEMENT&&p.is(f)&&(p=p.getFirst(t),h.block&&g.checkStartOfBlock()&&g.checkEndOfBlock()?(h.block.remove(),g.moveToElementEditStart(p),g.select()):d(p)?(g.moveToElementEditStart(p),g.select()):(g=g.clone(),g.moveToElementEditStart(p),k(a,c,g)),b.cancel());setTimeout(function(){a.selectionChange(1)})}}}))}})})();(function(){CKEDITOR.plugins.add("sourcearea",{init:function(g){function e(){var b= 875h&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();b&&this.focus()}if(g.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var b=CKEDITOR.plugins.sourcearea;g.addMode("source",function(b){var h=g.ui.space("contents").getDocument().createElement("textarea");h.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none", 876"text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",g.config.sourceAreaTabSize||4)));h.setAttribute("dir","ltr");h.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");g.ui.space("contents").append(h);h=g.editable(new c(g,h));h.setData(g.getData(1));CKEDITOR.env.ie&&(h.attachListener(g,"resize",e,h),h.attachListener(CKEDITOR.document.getWindow(),"resize",e,h),CKEDITOR.tools.setTimeout(e,0,h));g.fire("ariaWidget",this);b()});g.addCommand("source",b.commands.source); 877g.ui.addButton&&g.ui.addButton("Source",{label:g.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});g.on("mode",function(){g.getCommand("source").setState("source"==g.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var h=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(c){this.setValue(c);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){}, 878insertText:function(){},setReadOnly:function(c){this[(c?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})})();CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"==c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"==c.mode?"wysiwyg":"source")},canUndo:!1}}};"use strict";(function(){function c(b, 879c){return CKEDITOR.tools.array.reduce(c,function(a,b){return b(a)},b)}var g=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],e={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(c){function f(a){e.enabled&&!1!==a.data.command.canUndo&&e.save()}function a(){e.enabled=c.readOnly?!1:"wysiwyg"==c.mode;e.onChange()}var e=c.undoManager=new b(c),h=e.editingHandler=new l(e),k=c.addCommand("undo",{exec:function(){e.undo()&&(c.selectionChange(),this.fire("afterUndo"))},startDisabled:!0, 880canUndo:!1}),m=c.addCommand("redo",{exec:function(){e.redo()&&(c.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});c.setKeystroke([[g[0],"undo"],[g[1],"redo"],[g[2],"redo"]]);e.onChange=function(){k.setState(e.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(e.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};c.on("beforeCommandExec",f);c.on("afterCommandExec",f);c.on("saveSnapshot",function(a){e.save(a.data&&a.data.contentOnly)});c.on("contentDom", 881h.attachListeners,h);c.on("instanceReady",function(){c.fire("saveSnapshot")});c.on("beforeModeUnload",function(){"wysiwyg"==c.mode&&e.save(!0)});c.on("mode",a);c.on("readOnly",a);c.ui.addButton&&(c.ui.addButton("Undo",{label:c.lang.undo.undo,command:"undo",toolbar:"undo,10"}),c.ui.addButton("Redo",{label:c.lang.undo.redo,command:"redo",toolbar:"undo,20"}));c.resetUndo=function(){e.reset();c.fire("saveSnapshot")};c.on("updateSnapshot",function(){e.currentImage&&e.update()});c.on("lockSnapshot",function(a){a= 882a.data;e.lock(a&&a.dontUpdate,a&&a.forceUpdate)});c.on("unlockSnapshot",e.unlock,e)}});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=25;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,f){var a=b.getKeyGroup(c),e=this.strokesRecorded[a]+ 8831;f=f||e>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());f?(e=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[a]=e;this.previousKeyGroup=a},keyGroupChanged:function(c){return b.getKeyGroup(c)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup= 884-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(b,c,a){var e=this.editor;if(this.locked||"ready"!=e.status||"wysiwyg"!=e.mode)return!1;var g=e.editable();if(!g||"ready"!=g.status)return!1;g=this.snapshots;c||(c=new h(e));if(!1===c.contents)return!1;if(this.currentImage)if(c.equalsContent(this.currentImage)){if(b||c.equalsSelection(this.currentImage))return!1}else!1!==a&&e.fire("change");g.splice(this.index+ 8851,g.length-this.index-1);g.length==this.limit&&g.shift();this.index=g.push(c)-1;this.currentImage=c;!1!==a&&this.refreshState();return!0},restoreImage:function(b){var c=this.editor,a;b.bookmarks&&(c.focus(),a=c.getSelection());this.locked={level:999};this.editor.loadSnapshot(b.contents);b.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]; 886this.update();this.refreshState();c.fire("change")},getNextImage:function(b){var c=this.snapshots,a=this.currentImage,e;if(a)if(b)for(e=this.index-1;0<=e;e--){if(b=c[e],!a.equalsContent(b))return b.index=e,b}else for(e=this.index+1;e<c.length;e++)if(b=c[e],!a.equalsContent(b))return b.index=e,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), 887!0}return!1},redo:function(){if(this.redoable()&&(this.save(!0),this.redoable())){var b=this.getNextImage(!1);if(b)return this.restoreImage(b),!0}return!1},update:function(b){if(!this.locked){b||(b=new h(this.editor));for(var c=this.index,a=this.snapshots;0<c&&this.currentImage.equalsContent(a[c-1]);)--c;a.splice(c,this.index-c+1,b);this.index=c;this.currentImage=b}},updateSelection:function(b){if(!this.snapshots.length)return!1;var c=this.snapshots,a=c[c.length-1];return a.equalsContent(b)&&!a.equalsSelection(b)? 888(this.currentImage=c[c.length-1]=b,!0):!1},lock:function(b,c){if(this.locked)this.locked.level++;else if(b)this.locked={level:1};else{var a=null;if(c)a=!0;else{var e=new h(this.editor,!0);this.currentImage&&this.currentImage.equalsContent(e)&&(a=e)}this.locked={update:a,level:1}}},unlock:function(){if(this.locked&&!--this.locked.level){var b=this.locked.update;this.locked=null;if(!0===b)this.update();else if(b){var c=new h(this.editor,!0);b.equalsContent(c)||this.update()}}},addFilterRule:function(b){this._filterRules.push(b)}}; 889b.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 f=b.keyGroups;return e[c]?f.FUNCTIONAL:f.PRINTABLE};b.getOppositeKeyGroup=function(c){var f=b.keyGroups;return c==f.FUNCTIONAL?f.PRINTABLE:f.FUNCTIONAL};b.ieFunctionalKeysBug=function(c){return CKEDITOR.env.ie&&b.getKeyGroup(c)==b.keyGroups.FUNCTIONAL};var h=CKEDITOR.plugins.undo.Image=function(b,f){this.editor= 890b;b.fire("beforeUndoImage");var a=b.getSnapshot();a&&(this.contents=c(a,b.undoManager._filterRules));f||(this.bookmarks=(a=a&&b.getSelection())&&a.createBookmarks2(!0));b.fire("afterUndoImage")},m=/\b(?:href|src|name)="[^"]*?"/gi;h.prototype={equalsContent:function(b){var c=this.contents;b=b.contents;CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)&&(c=c.replace(m,""),b=b.replace(m,""));return c!=b?!1:!0},equalsSelection:function(b){var c=this.bookmarks;b=b.bookmarks;if(c||b){if(!c|| 891!b||c.length!=b.length)return!1;for(var a=0;a<c.length;a++){var e=c[a],g=b[a];if(e.startOffset!=g.startOffset||e.endOffset!=g.endOffset||!CKEDITOR.tools.arrayCompare(e.start,g.start)||!CKEDITOR.tools.arrayCompare(e.end,g.end))return!1}}return!0}};var l=CKEDITOR.plugins.undo.NativeEditingHandler=function(b){this.undoManager=b;this.ignoreInputEvent=!1;this.keyEventsStack=new k;this.lastKeydownImage=null};l.prototype={onKeydown:function(c){var f=c.data.getKey();if(229!==f)if(-1<CKEDITOR.tools.indexOf(g, 892c.data.getKeystroke()))c.data.preventDefault();else if(this.keyEventsStack.cleanUp(c),c=this.undoManager,this.keyEventsStack.getLast(f)||this.keyEventsStack.push(f),this.lastKeydownImage=new h(c.editor),b.isNavigationKey(f)||this.undoManager.keyGroupChanged(f))if(c.strokesRecorded[0]||c.strokesRecorded[1])c.save(!1,this.lastKeydownImage,!1),c.resetType()},onInput:function(){if(this.ignoreInputEvent)this.ignoreInputEvent=!1;else{var b=this.keyEventsStack.getLast();b||(b=this.keyEventsStack.push(0)); 893this.keyEventsStack.increment(b.keyCode);this.keyEventsStack.getTotalInputs()>=this.undoManager.strokesLimit&&(this.undoManager.type(b.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(c){var f=this.undoManager;c=c.data.getKey();var a=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(c);if(!(b.ieFunctionalKeysBug(c)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new h(f.editor,!0))))if(0<a)f.type(c);else if(b.isNavigationKey(c))this.onNavigationKey(!0)}, 894onNavigationKey:function(b){var c=this.undoManager;!b&&c.save(!0,null,!1)||c.updateSelection(new h(c.editor));c.resetType()},ignoreInputEventListener:function(){this.ignoreInputEvent=!0},activateInputEventListener:function(){this.ignoreInputEvent=!1},attachListeners:function(){var c=this.undoManager.editor,f=c.editable(),a=this;f.attachListener(f,"keydown",function(c){a.onKeydown(c);if(b.ieFunctionalKeysBug(c.data.getKey()))a.onInput()},null,null,999);f.attachListener(f,CKEDITOR.env.ie?"keypress": 895"input",a.onInput,a,null,999);f.attachListener(f,"keyup",a.onKeyup,a,null,999);f.attachListener(f,"paste",a.ignoreInputEventListener,a,null,999);f.attachListener(f,"drop",a.ignoreInputEventListener,a,null,999);c.on("afterPaste",a.activateInputEventListener,a,null,999);f.attachListener(f.isInline()?f:c.document.getDocumentElement(),"click",function(){a.onNavigationKey()},null,null,999);f.attachListener(this.undoManager.editor,"blur",function(){a.keyEventsStack.remove(9)},null,null,999)}};var k=CKEDITOR.plugins.undo.KeyEventsStack= 896function(){this.stack=[]};k.prototype={push:function(b){b=this.stack.push({keyCode:b,inputs:0});return this.stack[b-1]},getLastIndex:function(b){if("number"!=typeof b)return this.stack.length-1;for(var c=this.stack.length;c--;)if(this.stack[c].keyCode==b)return c;return-1},getLast:function(b){b=this.getLastIndex(b);return-1!=b?this.stack[b]:null},increment:function(b){this.getLast(b).inputs++},remove:function(b){b=this.getLastIndex(b);-1!=b&&this.stack.splice(b,1)},resetInputs:function(b){if("number"== 897typeof b)this.getLast(b).inputs=0;else for(b=this.stack.length;b--;)this.stack[b].inputs=0},getTotalInputs:function(){for(var b=this.stack.length,c=0;b--;)c+=this.stack[b].inputs;return c},cleanUp:function(b){b=b.data.$;b.ctrlKey||b.metaKey||this.remove(17);b.shiftKey||this.remove(16);b.altKey||this.remove(18)}}})();"use strict";(function(){function c(b,c){CKEDITOR.tools.extend(this,{editor:b,editable:b.editable(),doc:b.document,win:b.
vendor: 22,523 bytes, lines 897-941
897window},c,!0);this.inline=this.editable.isInline();this.inline|| 898(this.frame=this.win.getFrame());this.target=this[this.inline?"editable":"doc"]}function g(b,c){CKEDITOR.tools.extend(this,c,{editor:b},!0)}function e(b,c){var a=b.editable();CKEDITOR.tools.extend(this,{editor:b,editable:a,inline:a.isInline(),doc:b.document,win:b.window,container:CKEDITOR.document.getBody(),winTop:CKEDITOR.document.getWindow()},c,!0);this.hidden={};this.visible={};this.inline||(this.frame=this.win.getFrame());this.queryViewport();var e=CKEDITOR.tools.bind(this.queryViewport,this), 899g=CKEDITOR.tools.bind(this.hideVisible,this),k=CKEDITOR.tools.bind(this.removeAll,this);a.attachListener(this.winTop,"resize",e);a.attachListener(this.winTop,"scroll",e);a.attachListener(this.winTop,"resize",g);a.attachListener(this.win,"scroll",g);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|| 9000>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);a.attachListener(b,"resize",e);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({}, 901h,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},h,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function b(b){var c;if(c=b&&b.type==CKEDITOR.NODE_ELEMENT)c=!(l[b.getComputedStyle("float")]||l[b.getAttribute("align")]);return c&&!k[b.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE= 9021;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;c.prototype={start:function(b){var c=this,a=this.editor,e=this.doc,g,h,k,l,m=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(c.relations={},(h=e.$.elementFromPoint(k,l))&&h.nodeType&&(g=new CKEDITOR.dom.element(h),c.traverseSearch(g),isNaN(k+l)||c.pixelSearch(g,k,l),b&&b(c.relations,k,l)))});this.listener=this.editable.attachListener(this.target,"mousemove",function(a){k=a.data.$.clientX;l=a.data.$.clientY;m.input()}); 903this.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(c){var a=this.editor.createRange();a.moveToPosition(this.relations[c.uid].element,b[c.type]);return a}}(),store:function(){function c(b, 904a,d){var e=b.getUniqueId();e in d?d[e].type|=a:d[e]={element:b,type:a}}return function(f,a){var e;a&CKEDITOR.LINEUTILS_AFTER&&b(e=f.getNext())&&e.isVisible()&&(c(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_AFTER);a&CKEDITOR.LINEUTILS_INSIDE&&b(e=f.getFirst())&&e.isVisible()&&(c(e,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_INSIDE);c(f,a,this.relations)}}(),traverseSearch:function(c){var f,a,e;do if(e=c.$["data-cke-expando"],!(e&&e in this.relations)){if(c.equals(this.editable))break; 905if(b(c))for(f in this.lookups)(a=this.lookups[f](c))&&this.store(c,a)}while((!c||c.type!=CKEDITOR.NODE_ELEMENT||"true"!=c.getAttribute("contenteditable"))&&(c=c.getParent()))},pixelSearch:function(){function c(a,d,e,g,h){for(var k=0,l;h(e);){e+=g;if(25==++k)break;if(l=this.doc.$.elementFromPoint(d,e))if(l==a)k=0;else if(f(a,l)&&(k=0,b(l=new CKEDITOR.dom.element(l))))return l}}var f=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}:function(a,b){return!!(a.compareDocumentPosition(b)& 90616)};return function(a,f,e){var g=this.win.getViewPaneSize().height,h=c.call(this,a.$,f,e,-1,function(a){return 0<a});f=c.call(this,a.$,f,e,1,function(a){return a<g});if(h)for(this.traverseSearch(h);!h.getParent().equals(a);)h=h.getParent();if(f)for(this.traverseSearch(f);!f.getParent().equals(a);)f=f.getParent();for(;h||f;){h&&(h=h.getNext(b));if(!h||h.equals(f))break;this.traverseSearch(h);f&&(f=f.getPrevious(b));if(!f||f.equals(h))break;this.traverseSearch(f)}}}(),greedySearch:function(){this.relations= 907{};for(var c=this.editable.getElementsByTag("*"),f=0,a,e,g;a=c.getItem(f++);)if(!a.equals(this.editable)&&a.type==CKEDITOR.NODE_ELEMENT&&(a.hasAttribute("contenteditable")||!a.isReadOnly())&&b(a)&&a.isVisible())for(g in this.lookups)(e=this.lookups[g](a))&&this.store(a,e);return this.relations}};g.prototype={locate:function(){function c(d,a){var e=d.element[a===CKEDITOR.LINEUTILS_BEFORE?"getPrevious":"getNext"]();return e&&b(e)?(d.siblingRect=e.getClientRect(),a==CKEDITOR.LINEUTILS_BEFORE?(d.siblingRect.bottom+ 908d.elementRect.top)/2:(d.elementRect.bottom+d.siblingRect.top)/2):a==CKEDITOR.LINEUTILS_BEFORE?d.elementRect.top:d.elementRect.bottom}return function(b){var a;this.locations={};for(var e in b)a=b[e],a.elementRect=a.element.getClientRect(),a.type&CKEDITOR.LINEUTILS_BEFORE&&this.store(e,CKEDITOR.LINEUTILS_BEFORE,c(a,CKEDITOR.LINEUTILS_BEFORE)),a.type&CKEDITOR.LINEUTILS_AFTER&&this.store(e,CKEDITOR.LINEUTILS_AFTER,c(a,CKEDITOR.LINEUTILS_AFTER)),a.type&CKEDITOR.LINEUTILS_INSIDE&&this.store(e,CKEDITOR.LINEUTILS_INSIDE, 909(a.elementRect.top+a.elementRect.bottom)/2);return this.locations}}(),sort:function(){var b,c,a,e;return function(g,h){b=this.locations;c=[];for(var k in b)for(var l in b[k])if(a=Math.abs(g-b[k][l]),c.length){for(e=0;e<c.length;e++)if(a<c[e].dist){c.splice(e,0,{uid:+k,type:l,dist:a});break}e==c.length&&c.push({uid:+k,type:l,dist:a})}else c.push({uid:+k,type:l,dist:a});return"undefined"!=typeof h?c.slice(0,h):c}}(),store:function(b,c,a){this.locations[b]||(this.locations[b]={});this.locations[b][c]= 910a}};var h={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};e.prototype={removeAll:function(){for(var b in this.hidden)this.hidden[b].remove(),delete this.hidden[b];for(b in this.visible)this.visible[b].remove(),delete this.visible[b]},hideLine:function(b){var c=b.getUniqueId();b.hide();this.hidden[c]=b;delete this.visible[c]},showLine:function(b){var c= 911b.getUniqueId();b.show();this.visible[c]=b;delete this.hidden[c]},hideVisible:function(){for(var b in this.visible)this.hideLine(this.visible[b])},placeLine:function(b,c){var a,e,g;if(a=this.getStyle(b.uid,b.type)){for(g in this.visible)if(this.visible[g].getCustomData("hash")!==this.hash){e=this.visible[g];break}if(!e)for(g in this.hidden)if(this.hidden[g].getCustomData("hash")!==this.hash){this.showLine(e=this.hidden[g]);break}e||this.showLine(e=this.addLine());e.setCustomData("hash",this.hash); 912this.visible[e.getUniqueId()]=e;e.setStyles(a);c&&c(e)}},getStyle:function(b,c){var a=this.relations[b],e=this.locations[b][c],g={};g.width=a.siblingRect?Math.max(a.siblingRect.width,a.elementRect.width):a.elementRect.width;g.top=this.inline?e+this.winTopScroll.y-this.rect.relativeY:this.rect.top+this.winTopScroll.y+e;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= 913this.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,c){this.relations=b;this.locations=c;this.hash=Math.random()},cleanup:function(){var b,c;for(c in this.visible)b=this.visible[c], 914b.getCustomData("hash")!==this.hash&&this.hideLine(b)},queryViewport:function(){this.winPane=this.win.getViewPaneSize();this.winTopScroll=this.winTop.getScrollPosition();this.winTopPane=this.winTop.getViewPaneSize();this.rect=this.getClientRect(this.inline?this.editable:this.frame)},getClientRect:function(b){b=b.getClientRect();var c=this.container.getDocumentPosition(),a=this.container.getComputedStyle("position");b.relativeX=b.relativeY=0;"static"!=a&&(b.relativeY=c.y,b.relativeX=c.x,b.top-=b.relativeY, 915b.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:c,locator:g,liner:e}})();(function(){function c(c){return c.getName&&!c.hasAttribute("data-cke-temp")}CKEDITOR.plugins.add("widgetselection",{init:function(c){if(CKEDITOR.env.webkit){var e=CKEDITOR.plugins.widgetselection;c.on("contentDom",function(b){b=b.editor;var c=b.editable();c.attachListener(c,"keydown",function(b){b.data.getKeystroke()== 916CKEDITOR.CTRL+65&&CKEDITOR.tools.setTimeout(function(){e.addFillers(c)||e.removeFillers(c)},0)},null,null,-1);b.on("selectionCheck",function(b){e.removeFillers(b.editor.editable())});b.on("paste",function(b){b.data.dataValue=e.cleanPasteData(b.data.dataValue)});"selectall"in b.plugins&&e.addSelectAllIntegration(b)})}}});CKEDITOR.plugins.widgetselection={startFiller:null,endFiller:null,fillerAttribute:"data-cke-filler-webkit",fillerContent:"\x26nbsp;",fillerTagName:"div",addFillers:function(g){var e= 917g.editor;if(!this.isWholeContentSelected(g)&&0<g.getChildCount()){var b=g.getFirst(c),h=g.getLast(c);b&&b.type==CKEDITOR.NODE_ELEMENT&&!b.isEditable()&&(this.startFiller=this.createFiller(),g.append(this.startFiller,1));h&&h.type==CKEDITOR.NODE_ELEMENT&&!h.isEditable()&&(this.endFiller=this.createFiller(!0),g.append(this.endFiller,0));if(this.hasFiller(g))return e=e.createRange(),e.selectNodeContents(g),e.select(),!0}return!1},removeFillers:function(c){if(this.hasFiller(c)&&!this.isWholeContentSelected(c)){var e= 918c.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dstart]"),b=c.findOne(this.fillerTagName+"["+this.fillerAttribute+"\x3dend]");this.startFiller&&e&&this.startFiller.equals(e)?this.removeFiller(this.startFiller,c):this.startFiller=e;this.endFiller&&b&&this.endFiller.equals(b)?this.removeFiller(this.endFiller,c):this.endFiller=b}},cleanPasteData:function(c){c&&c.length&&(c=c.replace(this.createFillerRegex(),"").replace(this.createFillerRegex(!0),""));return c},isWholeContentSelected:function(c){var e= 919c.editor.getSelection().getRanges()[0];return!e||e&&e.collapsed?!1:(e=e.clone(),e.enlarge(CKEDITOR.ENLARGE_ELEMENT),!!(e&&c&&e.startContainer&&e.endContainer&&0===e.startOffset&&e.endOffset===c.getChildCount()&&e.startContainer.equals(c)&&e.endContainer.equals(c)))},hasFiller:function(c){return 0<c.find(this.fillerTagName+"["+this.fillerAttribute+"]").count()},createFiller:function(c){var e=new CKEDITOR.dom.element(this.fillerTagName);e.setHtml(this.fillerContent);e.setAttribute(this.fillerAttribute, 920c?"end":"start");e.setAttribute("data-cke-temp",1);e.setStyles({display:"block",width:0,height:0,padding:0,border:0,margin:0,position:"absolute",top:0,left:"-9999px",opacity:0,overflow:"hidden"});return e},removeFiller:function(c,e){if(c){var b=e.editor,h=e.editor.getSelection().getRanges()[0].startPath(),m=b.createRange(),l,k;h.contains(c)&&(l=c.getHtml(),k=!0);h="start"==c.getAttribute(this.fillerAttribute);c.remove();l&&0<l.length&&l!=this.fillerContent?(e.insertHtmlIntoRange(l,b.getSelection().getRanges()[0]), 921m.setStartAt(e.getChild(e.getChildCount()-1),CKEDITOR.POSITION_BEFORE_END),b.getSelection().selectRanges([m])):k&&(h?m.setStartAt(e.getFirst().getNext(),CKEDITOR.POSITION_AFTER_START):m.setEndAt(e.getLast().getPrevious(),CKEDITOR.POSITION_BEFORE_END),e.editor.getSelection().selectRanges([m]))}},createFillerRegex:function(c){var e=this.createFiller(c).getOuterHtml().replace(/style="[^"]*"/gi,'style\x3d"[^"]*"').replace(/>[^<]*</gi,"\x3e[^\x3c]*\x3c");return new RegExp((c?"":"^")+e+(c?"$":""))},addSelectAllIntegration:function(c){var e= 922this;c.editable().attachListener(c,"beforeCommandExec",function(b){var h=c.editable();"selectAll"==b.data.name&&h&&e.addFillers(h)},null,null,9999)}}})();"use strict";(function(){function c(a){this.editor=a;this.registered={};this.instances={};this.selected=[];this.widgetHoldingFocusedEditable=this.focused=null;this._={nextId:0,upcasts:[],upcastCallbacks:[],filters:{}};H(this);C(this);this.on("checkWidgets",l);this.editor.on("contentDomInvalidated",this.checkWidgets,this);B(this);w(this);v(this); 923A(this);F(this)}function g(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:g.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);M(this,d);this.init&& 924this.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;U(this);this.fire("data",this.data);this.isInited()&&f.editable().contains(this.wrapper)&&(this.ready=!0,this.fire("ready"))}function e(a,b,c){CKEDITOR.dom.element.call(this,b.$);this.editor=a;this._={};b=this.filter=c.filter;CKEDITOR.dtd[this.getName()].p?(this.enterMode=b?b.getAllowedEnterMode(a.enterMode): 925a.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), 926f,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, 927requiredContent:b.requiredContent,contentForms:b.contentForms,contentTransformations:b.contentTransformations})}function h(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, 928b,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,h;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(h=!this.getByElement(f, 929!0)){a:{h=r;for(var l=f;l=l.getParent();)if(h(l)){h=!0;break a}h=!1}h=!h}h&&b.contains(f)&&(f.addClass("cke_widget_new"),c.push(this.initOn(f.getFirst(g.isDomWidgetElement))))}}a&&a.focusInited&&1==c.length&&c[0].focus()}}}function k(a){if("undefined"!=typeof a.attributes&&a.attributes["data-widget"]){var b=d(a),c=f(a),e=!1;b&&b.value&&b.value.match(/^\s/g)&&(b.parent.attributes["data-cke-white-space-first"]=1,b.value=b.value.replace(/^\s/g,"\x26nbsp;"),e=!0);c&&c.value&&c.value.match(/\s$/g)&&(c.parent.attributes["data-cke-white-space-last"]= 9301,c.value=c.value.replace(/\s$/g,"\x26nbsp;"),e=!0);e&&(a.attributes["data-cke-widget-white-space"]=1)}}function d(a){return a.find(function(a){return 3===a.type},!0).shift()}function f(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)); 931return a}function n(a){var b=[],c=a._.upcasts,d=a._.upcastCallbacks;return{toBeWrapped:b,iterator:function(a){var e,f,h,k,l;if("data-cke-widget-wrapper"in a.attributes)return(a=a.getFirst(g.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],h={},f=e[0](a,h))return f instanceof CKEDITOR.htmlParser.element&&(a=f),a.attributes["data-cke-widget-data"]= 932encodeURIComponent(JSON.stringify(h)),a.attributes["data-cke-widget-upcasted"]=1,b.push([a,e[1]]),!1}}}}function t(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 x(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|| 933d.remove();return x(e,b,c)}}a.add(c,b)}function p(a,b){return"boolean"==typeof a.inline?a.inline:!!CKEDITOR.dtd.$inline[b]}function r(a){return a.hasAttribute("data-cke-temp")}function q(a,b,c,d){var 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"), 934b.focusedEditable=null,a.widgetHoldingFocusedEditable=null,e.setActiveFilter(null),e.setActiveEnterMode(null,null));e.fire("unlockSnapshot")}function z(a){a.contextMenu&&a.contextMenu.addListener(function(b){if(b=a.widgets.getByElement(b,!0))return b.fire("contextMenu",{})})}function u(a,b){return CKEDITOR.tools.trim(b)}function A(a){var b=a.editor,c=CKEDITOR.plugins.lineutils;b.on("dragstart",function(c){var d=c.data.target;g.isDomDragHandler(d)&&(d=a.getByElement(d),c.data.dataTransfer.setData("cke/widget-id", 935d.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();""!==e&&f===CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c.cancel():""!==e&&f==CKEDITOR.DATA_TRANSFER_INTERNAL&&(e=a.instances[e])&&(d.setStartBefore(e.wrapper),d.setEndAfter(e.wrapper),c.data.dragRange=d,delete CKEDITOR.plugins.clipboard.dragStartContainerChildCount,delete CKEDITOR.plugins.clipboard.dragEndContainerChildCount,c.data.dataTransfer.setData("text/html", 936e.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)&&!g.isDomNestedEditable(b)&&!a._.draggedWidget.wrapper.contains(b)){var c=g.getNestedEditable(d,b);if(c){b=a._.draggedWidget;if(a.getByElement(c)==b)return;c=CKEDITOR.filter.instances[c.data("cke-filter")];b=b.requiredContent;if(c&&b&&!c.check(b))return}return CKEDITOR.LINEUTILS_BEFORE| 937CKEDITOR.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 w(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?a.getByElement(d):null;f=0;e&&(e.inline&&d.type==CKEDITOR.NODE_ELEMENT&& 938d.hasAttribute("data-cke-widget-drag-handler")?(f=1,a.focused!=e&&b.getSelection().removeAllRanges()):g.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",function(b){var c=a.getByElement(b.data.element);if(c&&!g.getNestedEditable(c.wrapper, 939b.data.element))return c.fire("doubleclick",{element:b.data.element})},null,null,1)}function v(a){a.editor.on("key",function(b){var c=a.focused,d=a.widgetHoldingFocusedEditable,e;c?e=c.fire("key",{keyCode:b.data.keyCode}):d&&(c=b.data.keyCode,b=d.focusedEditable,c==CKEDITOR.CTRL+65?(c=b.getBogus(),d=d.editor.createRange(),d.selectNodeContents(b),c&&d.setEndAt(c,CKEDITOR.POSITION_BEFORE_START),d.select(),e=!1):8==c||46==c?(e=d.editor.getSelection().getRanges(),d=e[0],e=!(1==e.length&&d.collapsed&& 940d.checkBoundaryOfElement(b,CKEDITOR[8==c?"START":"END"]))):e=void 0);return e},null,null,1)}function F(a){function b(d){1>a.selected.length||P(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(){a.fire("checkSelection")}var c=a.editor;c.on("selectionCheck",b);c.on("contentDom",function(){c.editable().attachListener(c,"key",function(){setTimeout(b,10)})});a.on("checkSelection",a.checkSelection, 941a);c.on("selectionChange",function(b){var d=(b=g.getNestedEditable(c.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),e=a.widgetHoldingFocusedEditable;e?e===d&&e.focusedEditable.equals(b)||(q(a,e,null),d&&b&&q(a,d,b)):d&&b&&q(a,d,b)}
941);c.on("dataReady",function(){E(a).commit()});c.on("blur",function(){var b;(b=a.focused)&&m(a,b);(b=a.widgetHoldingFocusedEditable)&&q(a,b,null)})}function C(a){var b=a.editor,c={};b.on("toDataFormat",function(b){var e=CKEDITOR.tools.getNextNumber(), 942h=[];b.data.downcastingSessionId=e;c[e]=h;b.data.dataValue.forEach(function(b){var c=b.attributes,e;if("data-cke-widget-white-space"in c){e=d(b);var k=f(b);e.parent.attributes["data-cke-white-space-first"]&&(e.value=e.value.replace(/^ /g," "));k.parent.attributes["data-cke-white-space-last"]&&(k.value=k.value.replace(/ $/g," "))}if("data-cke-widget-id"in c){if(c=a.instances[c["data-cke-widget-id"]])e=b.getFirst(g.isParserWidgetElement),h.push({wrapper:b,element:e,widget:c,editables:{}}), 943"1"!=e.attributes["data-cke-widget-keep-attr"]&&delete e.attributes["data-widget"]}else if("data-cke-widget-editable"in c)return 0<h.length&&(h[h.length-1].editables[c["data-cke-widget-editable"]]=b),!1},CKEDITOR.NODE_ELEMENT,!0)},null,null,8);b.on("toDataFormat",function(a){if(a.data.downcastingSessionId)for(var b=c[a.data.downcastingSessionId],d,e,f,g,h,k;d=b.shift();){e=d.widget;f=d.element;g=e._.downcastFn&&e._.downcastFn.call(e,f);a.data.widgetsCopy&&e.getClipboardHtml&&(g=CKEDITOR.htmlParser.fragment.fromHtml(e.getClipboardHtml()), 944g=g.children[0]);for(k in d.editables)h=d.editables[k],delete h.attributes.contenteditable,h.setHtml(e.editables[k].getData());g||(g=f);d.wrapper.replaceWith(g)}},null,null,13);b.on("contentDomUnload",function(){a.destroyAll(!0)})}function H(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],h=f.parent;h.type==CKEDITOR.NODE_ELEMENT&&h.attributes["data-cke-widget-wrapper"]&&h.replaceWith(f); 945a.wrapElement(e[0],e[1])}c=b.data.protectedWhitespaces?3==b.data.dataValue.children.length&&g.isParserWidgetWrapper(b.data.dataValue.children[1]):1==b.data.dataValue.children.length&&g.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,h=0,k=c.count();h<k;++h)e=c.getItem(h),f=e.getFirst(g.isDomWidgetElement),f.type==CKEDITOR.NODE_ELEMENT&&f.data("widget")?(f.replace(e),a.wrapElement(f)):e.remove(); 946d=0;a.destroyAll(!0);a.initOnAll()});b.on("loadSnapshot",function(b){/data-cke-widget/.test(b.data)&&(d=1);a.destroyAll(!0)},null,null,9);b.on("paste",function(a){a=a.data;a.dataValue=a.dataValue.replace(W,u);a.range&&(a=g.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}), 947b.fire("unlockSnapshot"))})}function E(a){var b=a.selected,c=[],d=b.slice(0),e=null;return{select:function(a){0>CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&&(g=a.focused)&&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(), 948a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function 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 G(a,b,c){var d=0;b=I(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): 949e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function D(a){a.cancel()}function P(a,b){function c(){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}var d=a.widgets.focused,e,f,g;R.hasCopyBin(a)||(f=new R(a,{beforeDestroy:function(){!b&&d&&d.focus();g&&a.getSelection().selectBookmarks(g);e&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())}, 950afterDestroy:function(){b&&!a.readOnly&&(d?a.widgets.del(d):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}),d||(e=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),g=a.getSelection().createBookmarks(!0)),f.handle(c()))}function I(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function L(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)} 951function y(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function M(a,b){N(a);O(a);da(a);S(a);V(a);Z(a);aa(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();g.getNestedEditable(a,c)||a.inline&&g.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new");a.element.addClass("cke_widget_element");a.on("key",function(b){b= 952b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){P(a.editor,b==CKEDITOR.CTRL+88);return}if(b in Q||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
952)}function O(a){if(a.parts){var b={},c,d;for(d in a.parts)c=a.wrapper.findOne(a.parts[d]),b[d]=c;a.parts= 953b}}function da(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 S(a){if(!0===a.mask)X(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,ga,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()},c)});a.editor.on("mode", 954function(){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 X(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document), 955b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function ga(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(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));this.mask=b;var c=b.$,d=a.$,e= 956!(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 V(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(g.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document), 957c.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),a.wrapper.append(c)); 958a.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",ha,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function ha(a){function b(){var c;for(p.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner, 959g=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,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),p=CKEDITOR.tools.eventsBuffer(50, 960function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;p.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup",b,this))}}function Z(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}})} 961function 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());
961a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function U(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function ca(){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, 962c,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, 963e(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= 964!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, 965checkElement:function(a){return g.isDomWidgetWrapper(a)?(a=a.getFirst(g.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): 966null},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;display: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}'), 967ca())},beforeInit:function(a){void 0!==CKEDITOR.document.$.querySelectorAll&&(a.widgets=new c(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"});z(a);J(a.undoManager)}}});c.prototype={MIN_SELECTION_CHECK_INTERVAL:500,add:function(a,c){var d=this.editor;c=CKEDITOR.tools.prototypedCopy(c);c.name=a; 968c._=c._||{};d.fire("widgetDefinition",c);c.template&&(c.template=new CKEDITOR.template(c.template));b(d,c);h(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)}, 969checkSelection:function(){var a=this.editor.getSelection(),b=a.getSelectedElement(),c=E(this),d;if(b&&(d=this.getByElement(b,!0)))return c.focus(d).select(d).commit();a=a.getRanges()[0];if(!a||a.collapsed)return c.commit();a=new CKEDITOR.dom.walker(a);for(a.evaluator=g.isDomWidgetWrapper;b=a.next();)c.select(this.getByElement(b));c.commit()},checkWidgets:function(a){this.fire("checkWidgets",CKEDITOR.tools.copy(a||{}))}
vendor: 5,459 bytes, lines 969-980
969,del:function(a){if(this.focused===a){var b=a.editor,c=b.createRange(),d;(d=c.moveToClosestEditablePosition(a.wrapper, 970!0))||(d=c.moveToClosestEditablePosition(a.wrapper,!1));d&&b.getSelection().selectRanges([c])}a.wrapper.remove();this.destroy(a,!0)},destroy:function(a,b){this.widgetHoldingFocusedEditable===a&&q(this,a,null,b);a.destroy(b);delete this.instances[a.id];this.fire("instanceDestroyed",a)},destroyAll:function(a,b){var c,d,e=this.instances;if(b&&!a){d=b.find(".cke_widget_wrapper");for(var e=d.count(),f=0;f<e;++f)(c=this.getByElement(d.getItem(f),!0))&&this.destroy(c)}else for(d in e)c=e[d],this.destroy(c, 971a)},finalizeCreation:function(a){(a=a.getFirst())&&g.isDomWidgetWrapper(a)&&(this.editor.insertElement(a),a=this.getByElement(a),a.ready=!0,a.fire("ready"),a.focus())},getByElement:function(){function a(c){return c.is(b)&&c.data("cke-widget-id")}var b={div:1,span:1};return function(b,c){if(!b)return null;var d=a(b);if(!c&&!d){var e=this.editor.editable();do b=b.getParent();while(b&&!b.equals(e)&&!(d=a(b)))}return this.instances[d]||null}}(),initOn:function(a,b,c){b?"string"==typeof b&&(b=this.registered[b]): 972b=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 g(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(g.isDomWidgetElement)))&&b.push(c);return b},onWidget:function(a){var b=Array.prototype.slice.call(arguments);b.shift();for(var c in this.instances){var d= 973this.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;if((c=a.getParent())&&c.type==CKEDITOR.NODE_ELEMENT&&c.data("cke-widget-wrapper"))return c; 974a.hasAttribute("data-cke-widget-keep-attr")||a.data("cke-widget-keep-attr",a.data("widget")?1:0);a.data("widget",b);(e=p(d,a.getName()))&&k(a);c=new CKEDITOR.dom.element(e?"span":"div",a.getDocument());c.setAttributes(t(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"];d=this.registered[b];if(!d)return null;if((c=a.parent)&&c.type==CKEDITOR.NODE_ELEMENT&& 975c.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=p(d,a.name))&&k(a);c=new CKEDITOR.htmlParser.element(e?"span":"div",t(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&&x(d,f,c)}return c},_tests_createEditableFilter:a};CKEDITOR.event.implementOn(c.prototype);g.prototype= 976{addClass:function(a){this.element.addClass(a);this.wrapper.addClass(g.WRAPPER_CLASS_PREFIX+a)},applyStyle:function(a){G(this,a,1)},checkStyleActive:function(a){a=I(a);var b;if(!a)return!1;for(;b=a.pop();)if(!this.hasClass(b))return!1;return!0},destroy:function(a){this.fire("destroy");if(this.editables)for(var b in this.editables)this.destroyEditable(b,a);a||("0"==this.element.data("cke-widget-keep-attr")&&this.element.removeAttribute("data-widget"),this.element.removeAttributes(["data-cke-widget-data", 977"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",y);c.removeListener("blur",L);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!==c&&c.filter===f.filter&&(d=!1)}d&&(c.filter.destroy(),(d=this.repository._.filters[this.name])&& 978delete 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",a)&&(c=a.on("show",function(){a.setupContent(b)}),d=a.on("ok",function(){var c,d=b.on("data", 979function(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();a.setStartBefore(this.wrapper);a.setEndAfter(this.wrapper);return this.editor.editable().getHtmlFromRange(a).getHtml()}, 980hasClass:function(a){return this.element.hasClass(a)},initEditable:function(b,c){var d=this._findOneNotNested(c.selector);return d&&d.is(CKEDITOR.dtd.$editable)?(d=new e(this.editor,d,{filter:a.c
980all(this.repository,this.name,b,c)}),this.editables[b]=d,d.setAttributes({contenteditable:"true","data-cke-widget-editable":b,"data-cke-enter-mode":d.enterMode}),d.filter&&d.data("cke-filter",d.filter.id),d.addClass("cke_widget_editable"),d.removeClass("cke_widget_editable_focused"),c.pathName&&d.data("cke-display-name", 981c.pathName),this.editor.focusManager.add(d),d.on("focus",y,this),CKEDITOR.env.ie&&d.on("blur",L,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(g.isDomWidgetWrapper),this.wrapper.equals(c))return b;return null},isInited:function(){return!(!this.wrapper||!this.inited)},isReady:function(){return this.isInited()&&this.ready},focus:function(){var a=this.editor.getSelection(); 982if(a){var b=this.editor.checkDirty();a.fake(this.wrapper);!b&&this.editor.resetDirty()}this.editor.focus()},removeClass:function(a){this.element.removeClass(a);this.wrapper.removeClass(g.WRAPPER_CLASS_PREFIX+a)},removeStyle:function(a){G(this,a,0)},setData:function(a,b){var c=this.data,d=0;if("string"==typeof a)c[a]!==b&&(c[a]=b,d=1);else{var e=a;for(a in e)c[a]!==e[a]&&(d=1,c[a]=e[a])}d&&this.dataReady&&(U(this),this.fire("data",c));return this},setFocused:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_focused"); 983this.fire(a?"focus":"blur");return this},setSelected:function(a){this.wrapper[a?"addClass":"removeClass"]("cke_widget_selected");this.fire(a?"select":"deselect");return this},updateDragHandlerPosition:function(){var a=this.editor,b=this.element.$,c=this._.dragHandlerOffset,b={x:b.offsetLeft,y:b.offsetTop-15};c&&b.x==c.x&&b.y==c.y||(c=a.checkDirty(),a.fire("lockSnapshot"),this.dragHandlerContainer.setStyles({top:b.y+"px",left:b.x+"px"}),this.dragHandlerContainer.removeStyle("display"),a.fire("unlockSnapshot"), 984!c&&a.resetDirty(),this._.dragHandlerOffset=b)}};CKEDITOR.event.implementOn(g.prototype);g.getNestedEditable=function(a,b){return!b||b.equals(a)?null:g.isDomNestedEditable(b)?b:g.getNestedEditable(a,b.getParent())};g.isDomDragHandler=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-drag-handler")};g.isDomDragHandlerContainer=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasClass("cke_widget_drag_handler_container")};g.isDomNestedEditable=function(a){return a.type== 985CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-editable")};g.isDomWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-widget")};g.isDomWidgetWrapper=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("data-cke-widget-wrapper")};g.isDomWidget=function(a){return a?this.isDomWidgetWrapper(a)||this.isDomWidgetElement(a):!1};g.isParserWidgetElement=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-widget"]};g.isParserWidgetWrapper= 986function(a){return a.type==CKEDITOR.NODE_ELEMENT&&!!a.attributes["data-cke-widget-wrapper"]};g.WRAPPER_CLASS_PREFIX="cke_widget_wrapper_";e.prototype=CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.dom.element.prototype),{setData:function(a){this._.initialSetData||this.editor.widgets.destroyAll(!1,this);this._.initialSetData=!1;a=this.editor.dataProcessor.toHtml(a,{context:this.getName(),filter:this.filter,enterMode:this.enterMode});this.setHtml(a);this.editor.widgets.initOnAll(this)}, 987getData:function(){return this.editor.dataProcessor.toDataFormat(this.getHtml(),{context:this.getName(),filter:this.filter,enterMode:this.enterMode})}});var W=/^(?:<(?:div|span)(?: data-cke-temp="1")?(?: id="cke_copybin")?(?: data-cke-temp="1")?>)?(?:<(?:div|span)(?: style="[^"]+")?>)?<span [^>]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)<span [^>]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i,Q={37:1,38:1,39:1,40:1,8:1,46:1};Q[CKEDITOR.SHIFT+121]=1; 988var R=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?"left":"right","-5000px");this.editor= 989a;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,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout,n,p,q;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3eâ\x3c/span\x3e'+ 990a+'\x3cspan data-cke-copybin-end\x3d"1"\x3eâ\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);n=c.on("selectionChange",D,null,null,0);p=c.widgets.on("checkSelection",D,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();p.removeListener();c.fire("unlockSnapshot");h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!R.getCopyBin(a)}, 991getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=g;g.repository=c;g.nestedEditable=e})();CKEDITOR.config.plugins="basicstyles,dialogui,dialog,notification,button,toolbar,clipboard,panelbutton,panel,floatpanel,colorbutton,colordialog,divarea,elementspath,enterkey,entities,floatingspace,listblock,richcombo,font,htmlwriter,indent,indentblock,indentlist,justify,list,sourcearea,undo,lineutils,widgetselection,widget";CKEDITOR.config.skin="moono";(function(){var c= 992function(c,e){var b=CKEDITOR.getUrl("plugins/"+e);c=c.split(",");for(var h=0;h<c.length;h++)CKEDITOR.skin.icons[c[h]]={path:b,offset:-c[++h],bgsize:c[++h]}};CKEDITOR.env.hidpi?c("bold,0,,italic,24,,strike,48,,subscript,72,,superscript,96,,underline,120,,copy-rtl,144,,copy,168,,cut-rtl,192,,cut,216,,paste-rtl,240,,paste,264,,bgcolor,288,,textcolor,312,,indent-rtl,336,,indent,360,,outdent-rtl,384,,outdent,408,,ipscode,432,,ipsemoticon,456,,ipsgiphy,480,,ipsimage,504,,ipslink,528,,unlink,552,,ipspage,1152,auto,pastetext,600,,ipspreview-rtl,624,,ipspreview,648,,ipsquote,672,,ipsspoiler,696,,justifyblock,720,,justifycenter,744,,justifyleft,768,,justifyright,792,,bulletedlist-rtl,816,,bulletedlist,840,,numberedlist-rtl,864,,numberedlist,888,,removeformat,912,,source-rtl,936,,source,960,,redo-rtl,984,,redo,1008,,undo-rtl,1032,,undo,1056,,simplebox,2160,auto", 993"icons_hidpi.png"):c("bold,0,auto,italic,24,auto,strike,48,auto,subscript,72,auto,superscript,96,auto,underline,120,auto,copy-rtl,144,auto,copy,168,auto,cut-rtl,192,auto,cut,216,auto,paste-rtl,240,auto,paste,264,auto,bgcolor,288,auto,textcolor,312,auto,indent-rtl,336,auto,indent,360,auto,outdent-rtl,384,auto,outdent,408,auto,ipscode,432,auto,ipsemoticon,456,auto,ipsgiphy,480,auto,ipsimage,504,auto,ipslink,528,auto,unlink,552,auto,ipspage,576,auto,pastetext,600,auto,ipspreview-rtl,624,auto,ipspreview,648,auto,ipsquote,672,auto,ipsspoiler,696,auto,justifyblock,720,auto,justifycenter,744,auto,justifyleft,768,auto,justifyright,792,auto,bulletedlist-rtl,816,auto,bulletedlist,840,auto,numberedlist-rtl,864,auto,numberedlist,888,auto,removeformat,912,auto,source-rtl,936,auto,source,960,auto,redo-rtl,984,auto,redo,1008,auto,undo-rtl,1032,auto,undo,1056,auto,simplebox,1080,auto", 994"icons.png")})();CKEDITOR.lang.languages={af:1,ar:1,az:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fo:1,fr:1,"fr-ca":1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,id:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku:1,lt:1,lv:1,mk:1,mn:1,ms:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1}}})();
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.