diff --git a/core/assets/vendor/ckeditor/build-config.js b/core/assets/vendor/ckeditor/build-config.js index c4eda91..f61f78d 100644 --- a/core/assets/vendor/ckeditor/build-config.js +++ b/core/assets/vendor/ckeditor/build-config.js @@ -92,6 +92,7 @@ var CKBUILDER_CONFIG = { 'sharedspace' : 1, 'sourcedialog' : 1, 'widget' : 1, - 'image2' : 1 + 'image2' : 1, + 'autogrow' : 1 } }; diff --git a/core/assets/vendor/ckeditor/ckeditor.js b/core/assets/vendor/ckeditor/ckeditor.js index d6afbf0..fc1498f 100644 --- a/core/assets/vendor/ckeditor/ckeditor.js +++ b/core/assets/vendor/ckeditor/ckeditor.js @@ -2,14 +2,14 @@ Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,f={timestamp:"G4JC",version:"4.5.9",revision:"a35abfe",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var e=window.CKEDITOR_BASEPATH||"";if(!e)for(var c=document.getElementsByTagName("script"),f=0;fg.getListenerIndex(h)){g=g.listeners;f||(f=this);isNaN(k)&&(k=10);var n=this;d.fn=h;d.priority=k;for(var v=g.length-1;0<=v;v--)if(g[v].priority<=k)return g.splice(v+1,0,d),{removeListener:b};g.unshift(d)}return{removeListener:b}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this, -arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},m=0,l=function(){m=1};return function(k,d,b){var g=f(this)[k];k=a;var n=m;a=m=0;if(g){var v=g.listeners;if(v.length)for(var v=v.slice(0),u,r=0;rg.getListenerIndex(c)){g=g.listeners;f||(f=this);isNaN(k)&&(k=10);var n=this;b.fn=c;b.priority=k;for(var t=g.length-1;0<=t;t--)if(g[t].priority<=k)return g.splice(t+1,0,b),{removeListener:d};g.unshift(b)}return{removeListener:d}},once:function(){var a=Array.prototype.slice.call(arguments),c=a[1];a[1]=function(a){a.removeListener();return c.apply(this, +arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,c=function(){a=1},m=0,l=function(){m=1};return function(k,b,d){var g=f(this)[k];k=a;var n=m;a=m=0;if(g){var t=g.listeners;if(t.length)for(var t=t.slice(0),v,r=0;rdocument.documentMode),mobile:-1e||c.quirks);c.gecko&&(f=a.match(/rv:([\d\.]+)/))&&(f=f[1].split("."),e=1E4*f[0]+100*(f[1]||0)+1*(f[2]||0));c.air&&(e=parseFloat(a.match(/ adobeair\/(\d+)/)[1]));c.webkit&&(e=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));c.version=e;c.isCompatible=!(c.ie&&7>e)&&!(c.gecko&&4E4>e)&&!(c.webkit&& @@ -17,29 +17,29 @@ function(a,f){a in{instanceReady:1,loaded:1}&&(this[a]=!0);return CKEDITOR.event CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a=CKEDITOR.loadFullCore,f=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status= "basic_ready",a&&a._load?a():f&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*f))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:f})},CKEDITOR.error=function(a,f){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log", {type:"error",errorCode:a,additionalData:f})},CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var f=console[a.data.type]?a.data.type:"log",c=a.data.errorCode;if(a=a.data.additionalData)console[f]("[CKEDITOR] Error code: "+c+".",a);else console[f]("[CKEDITOR] Error code: "+c+".");console[f]("[CKEDITOR] For more information about this error go to http://docs.ckeditor.com/#!/guide/dev_errors-section-"+c)}},null,null,999),CKEDITOR.dom={},function(){var a=[],f=CKEDITOR.env.gecko?"-moz-": -CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",c=/&/g,e=/>/g,h=/|\s) /g,function(g,b){return b+"\x26nbsp;"}).replace(/ (?=<)/g, -"\x26nbsp;")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var b="e",g=0;8>g;g++)b+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return b},override:function(b,g){var d=g(b);d.prototype=b.prototype;return d},setTimeout:function(b,g,d,a,k){k||(k=window);d||(d=k);return k.setTimeout(function(){a?b.apply(d,[].concat(a)):b.apply(d)},g||0)},trim:function(){var b=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; -return function(g){return g.replace(b,"")}}(),ltrim:function(){var b=/^[ \t\n\r]+/g;return function(g){return g.replace(b,"")}}(),rtrim:function(){var b=/[ \t\n\r]+$/g;return function(g){return g.replace(b,"")}}(),indexOf:function(b,g){if("function"==typeof g)for(var d=0,a=b.length;db;b++)g[b]=("0"+parseInt(g[b],10).toString(16)).slice(-2);return"#"+g.join("")})},parseCssText:function(b, -g,d){var a={};d&&(d=new CKEDITOR.dom.element("span"),d.setAttribute("style",b),b=CKEDITOR.tools.convertRgbToHex(d.getAttribute("style")||""));if(!b||";"==b)return a;b.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,d,k){g&&(d=d.toLowerCase(),"font-family"==d&&(k=k.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),k=CKEDITOR.tools.trim(k));a[d]=k});return a},writeCssText:function(b,g){var d,a=[];for(d in b)a.push(d+":"+b[d]);g&&a.sort();return a.join("; ")}, -objectCompare:function(b,g,d){var a;if(!b&&!g)return!0;if(!b||!g)return!1;for(a in b)if(b[a]!=g[a])return!1;if(!d)for(a in g)if(b[a]!=g[a])return!1;return!0},objectKeys:function(b){var g=[],d;for(d in b)g.push(d);return g},convertArrayToObject:function(b,g){var d={};1==arguments.length&&(g=!0);for(var a=0,k=b.length;aa;a++)d.push(Math.floor(256*Math.random()));for(a=0;a/g,h=/|\s) /g,function(g,d){return d+"\x26nbsp;"}).replace(/ (?=<)/g, +"\x26nbsp;")},getNextNumber:function(){var d=0;return function(){return++d}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var d="e",g=0;8>g;g++)d+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return d},override:function(d,g){var b=g(d);b.prototype=d.prototype;return b},setTimeout:function(d,g,b,a,k){k||(k=window);b||(b=k);return k.setTimeout(function(){a?d.apply(b,[].concat(a)):d.apply(b)},g||0)},trim:function(){var d=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; +return function(g){return g.replace(d,"")}}(),ltrim:function(){var d=/^[ \t\n\r]+/g;return function(g){return g.replace(d,"")}}(),rtrim:function(){var d=/[ \t\n\r]+$/g;return function(g){return g.replace(d,"")}}(),indexOf:function(d,g){if("function"==typeof g)for(var b=0,a=d.length;bd;d++)g[d]=("0"+parseInt(g[d],10).toString(16)).slice(-2);return"#"+g.join("")})},parseCssText:function(d, +g,b){var a={};b&&(b=new CKEDITOR.dom.element("span"),b.setAttribute("style",d),d=CKEDITOR.tools.convertRgbToHex(b.getAttribute("style")||""));if(!d||";"==d)return a;d.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(d,b,k){g&&(b=b.toLowerCase(),"font-family"==b&&(k=k.toLowerCase().replace(/["']/g,"").replace(/\s*,\s*/g,",")),k=CKEDITOR.tools.trim(k));a[b]=k});return a},writeCssText:function(d,g){var b,a=[];for(b in d)a.push(b+":"+d[b]);g&&a.sort();return a.join("; ")}, +objectCompare:function(d,g,b){var a;if(!d&&!g)return!0;if(!d||!g)return!1;for(a in d)if(d[a]!=g[a])return!1;if(!b)for(a in g)if(d[a]!=g[a])return!1;return!0},objectKeys:function(d){var g=[],b;for(b in d)g.push(b);return g},convertArrayToObject:function(d,g){var b={};1==arguments.length&&(g=!0);for(var a=0,k=d.length;aa;a++)b.push(Math.floor(256*Math.random()));for(a=0;aCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&e(h);return h},hasPrevious:function(){return!!this.$.previousSibling}, hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var f=[],c=this.getDocument().$.documentElement,e=this.$;e&&e!=c;){var h=e.parentNode;h&&f.unshift(this.getIndex.call({$:e},a));e=h}return f},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument|| -this.$.parentNode.ownerDocument)},getIndex:function(a){function f(a,k){var d=k?a.nextSibling:a.previousSibling;return d&&d.nodeType==CKEDITOR.NODE_TEXT?c(d)?f(d,k):d:null}function c(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var e=this.$,h=-1,m;if(!this.$.parentNode||a&&e.nodeType==CKEDITOR.NODE_TEXT&&c(e)&&!f(e)&&!f(e,!0))return-1;do a&&e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(m||c(e))||(h++,m=e.nodeType==CKEDITOR.NODE_TEXT);while(e=e.previousSibling);return h}, +this.$.parentNode.ownerDocument)},getIndex:function(a){function f(a,k){var b=k?a.nextSibling:a.previousSibling;return b&&b.nodeType==CKEDITOR.NODE_TEXT?c(b)?f(b,k):b:null}function c(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var e=this.$,h=-1,m;if(!this.$.parentNode||a&&e.nodeType==CKEDITOR.NODE_TEXT&&c(e)&&!f(e)&&!f(e,!0))return-1;do a&&e!=this.$&&e.nodeType==CKEDITOR.NODE_TEXT&&(m||c(e))||(h++,m=e.nodeType==CKEDITOR.NODE_TEXT);while(e=e.previousSibling);return h}, getNextSourceNode:function(a,f,c){if(c&&!c.call){var e=c;c=function(a){return!a.equals(e)}}a=!a&&this.getFirst&&this.getFirst();var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getNext()}for(;!a&&(h=(h||this).getParent());){if(c&&!1===c(h,!0))return null;a=h.getNext()}return!a||c&&!1===c(a)?null:f&&f!=a.type?a.getNextSourceNode(!1,f,c):a},getPreviousSourceNode:function(a,f,c){if(c&&!c.call){var e=c;c=function(a){return!a.equals(e)}}a=!a&&this.getLast&&this.getLast(); var h;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&c&&!1===c(this,!0))return null;a=this.getPrevious()}for(;!a&&(h=(h||this).getParent());){if(c&&!1===c(h,!0))return null;a=h.getPrevious()}return!a||c&&!1===c(a)?null:f&&a.type!=f?a.getPreviousSourceNode(!1,f,c):a},getPrevious:function(a){var f=this.$,c;do c=(f=f.previousSibling)&&10!=f.nodeType&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c));return c},getNext:function(a){var f=this.$,c;do c=(f=f.nextSibling)&&new CKEDITOR.dom.node(f);while(c&&a&&!a(c)); return c},getParent:function(a){var f=this.$.parentNode;return f&&(f.nodeType==CKEDITOR.NODE_ELEMENT||a&&f.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(f):null},getParents:function(a){var f=this,c=[];do c[a?"push":"unshift"](f);while(f=f.getParent());return c},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var f=this.contains?this:this.getParent();do if(f.contains(a))return f;while(f=f.getParent());return null},getPosition:function(a){var f= @@ -70,59 +70,59 @@ this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:f ")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}}),CKEDITOR.dom.nodeList=function(a){this.$=a},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length}, getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null}},CKEDITOR.dom.element=function(a,f){"string"==typeof a&&(a=(f?f.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)},CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(a,f){var c= new CKEDITOR.dom.element("div",f);c.setHtml(a);return c.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(a,f,c,e){var h=f.getCustomData("list_marker_id")||f.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=f.getCustomData("list_marker_names")||f.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[h]=f;m[c]=1;return f.setCustomData(c,e)},CKEDITOR.dom.element.clearAllMarkers=function(a){for(var f in a)CKEDITOR.dom.element.clearMarkers(a, -a[f],1)},CKEDITOR.dom.element.clearMarkers=function(a,f,c){var e=f.getCustomData("list_marker_names"),h=f.getCustomData("list_marker_id"),m;for(m in e)f.removeCustomData(m);f.removeCustomData("list_marker_names");c&&(f.removeCustomData("list_marker_id"),delete a[h])},function(){function a(a,d){return-1<(" "+a+" ").replace(m," ").indexOf(" "+d+" ")}function f(a){var d=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),d=!1);return function(){d||a.removeAttribute("id")}}function c(a,d){return"#"+ -a.$.id+" "+d.split(/,\s*/).join(", #"+a.$.id+" ")}function e(a){for(var d=0,b=0,g=l[a].length;bCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&& -a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,d){var b=new CKEDITOR.dom.range(this.getDocument());b.setStartAfter(this);b.setEndAfter(a);var g=b.extractContents(!1,d||!1);b.insertNode(this.remove());g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var d=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?d.contains(a.getParent().$): -d!=a.$&&d.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(d){}}return function(d){d?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({}, -this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var d=this.$;if(this.getParent())return d.innerHTML=a;var b=this.getDocument()._getHtml5ShivFrag();b.appendChild(d);d.innerHTML=a;b.removeChild(d);return a}catch(g){this.$.innerHTML="";d=new CKEDITOR.dom.element("body",this.getDocument());d.$.innerHTML=a;for(d=d.getChildren();d.count();)this.append(d.getItem(0));return a}}: -function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(d){this.$[a?"textContent":"innerText"]=d}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a, -2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var d={},b=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)? -a:[];for(g=0;gCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&& +a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);var g=d.extractContents(!1,b||!1);d.insertNode(this.remove());g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$): +b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({}, +this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(b);b.innerHTML=a;d.removeChild(b);return a}catch(g){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}: +function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a, +2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},d=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)? +a:[];for(g=0;g=document.documentMode){var d=this.$.scopeName;"HTML"!=d&&(a=d.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var d=this.$.firstChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getNext(a));return d},getLast:function(a){var d=this.$.lastChild;(d=d&&new CKEDITOR.dom.node(d))&&a&&!a(d)&&(d=d.getPrevious(a));return d},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, -is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var d=0;dCKEDITOR.env.version&&this.is("a")){var b=this.getParent();b.type==CKEDITOR.NODE_ELEMENT&&(b=b.clone(),b.setHtml(d),d=b.getHtml(),b.setHtml(a),a=b.getHtml())}return d==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),d,b;a&&CKEDITOR.env.webkit&&(d=this.getWindow(),!d.equals(CKEDITOR.document.getWindow())&&(b=d.$.frameElement)&&(a=(new CKEDITOR.dom.element(b)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; -for(var a=this.getChildren(),d=0,b=a.count();dCKEDITOR.env.version?function(d){return"name"==d?!!this.$.name:a.call(this,d)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,d){var b=this.$;a=a.$;if(b!=a){var g;if(d)for(;g=b.lastChild;)a.insertBefore(b.removeChild(g),a.firstChild);else for(;g=b.firstChild;)a.appendChild(b.removeChild(g))}},mergeSiblings:function(){function a(d,b,g){if(b&&b.type==CKEDITOR.NODE_ELEMENT){for(var c= -[];b.data("cke-bookmark")||b.isEmptyInlineRemoveable();)if(c.push(b),b=g?b.getNext():b.getPrevious(),!b||b.type!=CKEDITOR.NODE_ELEMENT)return;if(d.isIdentical(b)){for(var e=g?d.getLast():d.getFirst();c.length;)c.shift().move(d,!g);b.moveChildren(d,!g);b.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(d){if(!1===d||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", -visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(d,b){"class"==d?this.$.className=b:"style"==d?this.$.style.cssText=b:"tabindex"==d?this.$.tabIndex=b:"checked"==d?this.$.checked=b:"contenteditable"==d?a.call(this,"contentEditable",b):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(d,b){if("src"==d&&b.match(/^http:\/\//))try{a.apply(this, -arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var d in a)this.setAttribute(d,a[d]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var d= -0;dCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", -"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,d=this.getElementsByTag("*"),b=0,g=d.count();bh||0h?h:c);b&&(0>e||0e?e:g,0)},setState:function(a,d,b){d=d||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(d+"_on");this.removeClass(d+"_off");this.removeClass(d+"_disabled");b&&this.setAttribute("aria-pressed",!0);b&&this.removeAttribute("aria-disabled"); -break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(d+"_disabled");this.removeClass(d+"_off");this.removeClass(d+"_on");b&&this.setAttribute("aria-disabled",!0);b&&this.removeAttribute("aria-pressed");break;default:this.addClass(d+"_off"),this.removeClass(d+"_on"),this.removeClass(d+"_disabled"),b&&this.removeAttribute("aria-pressed"),b&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(d){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)}, -copyAttributes:function(a,d){var b=this.$.attributes;d=d||{};for(var g=0;g=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, +is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var d=this.getParent();d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(b),b=d.getHtml(),d.setHtml(a),a=d.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,d;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(d=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(d)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; +for(var a=this.getChildren(),b=0,d=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var d=this.$;a=a.$;if(d!=a){var g;if(b)for(;g=d.lastChild;)a.insertBefore(d.removeChild(g),a.firstChild);else for(;g=d.firstChild;)a.appendChild(d.removeChild(g))}},mergeSiblings:function(){function a(b,d,g){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var c= +[];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(c.push(d),d=g?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(d)){for(var e=g?b.getLast():b.getFirst();c.length;)c.shift().move(b,!g);d.moveChildren(b,!g);d.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", +visibility:""})},setAttribute:function(){var a=function(a,d){this.$.setAttribute(a,d);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,d){"class"==b?this.$.className=d:"style"==b?this.$.style.cssText=d:"tabindex"==b?this.$.tabIndex=d:"checked"==b?this.$.checked=d:"contenteditable"==b?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,d){if("src"==b&&d.match(/^http:\/\//))try{a.apply(this, +arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b= +0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", +"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),d=0,g=b.count();dh||0h?h:c);d&&(0>e||0e?e:g,0)},setState:function(a,b,d){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+"_off");this.removeClass(b+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled"); +break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)}, +copyAttributes:function(a,b){var d=this.$.attributes;b=b||{};for(var g=0;g=D.getChildCount()?(D=D.getChild(z-1),G=!0):D=D.getChild(z):J=G=!0;x.type==CKEDITOR.NODE_TEXT?t?I=!0:x.split(A):0S)for(;V;)V=h(V,O,!0);O=U}t||f()}}function c(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0), +this.getComputedStyle("float")||this.getComputedStyle("position")in e||!c[this.getComputedStyle("display")]?!!(this.is(CKEDITOR.dtd.$block)||a&&this.is(a)):!0};CKEDITOR.dom.walker.blockBoundary=function(a){return function(g){return!(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary(a))}};CKEDITOR.dom.walker.listItemBoundary=function(){return this.blockBoundary({br:1})};CKEDITOR.dom.walker.bookmark=function(a,g){function b(a){return a&&a.getName&&"span"==a.getName()&&a.data("cke-bookmark")}return function(d){var c, +e;c=d&&d.type!=CKEDITOR.NODE_ELEMENT&&(e=d.getParent())&&b(e);c=a?c:c||b(d);return!!(g^c)}};CKEDITOR.dom.walker.whitespaces=function(a){return function(g){var b;g&&g.type==CKEDITOR.NODE_TEXT&&(b=!CKEDITOR.tools.trim(g.getText())||CKEDITOR.env.webkit&&g.getText()==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE);return!!(a^b)}};CKEDITOR.dom.walker.invisible=function(a){var g=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.env.webkit?1:0;return function(d){g(d)?d=1:(d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent()), +d=d.$.offsetWidth<=b);return!!(a^d)}};CKEDITOR.dom.walker.nodeType=function(a,g){return function(b){return!!(g^b.type==a)}};CKEDITOR.dom.walker.bogus=function(a){function g(a){return!m(a)&&!l(a)}return function(b){var d=CKEDITOR.env.needsBrFiller?b.is&&b.is("br"):b.getText&&h.test(b.getText());d&&(d=b.getParent(),b=b.getNext(g),d=d.isBlockBoundary()&&(!b||b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()));return!!(a^d)}};CKEDITOR.dom.walker.temp=function(a){return function(g){g.type!=CKEDITOR.NODE_ELEMENT&& +(g=g.getParent());g=g&&g.hasAttribute("data-cke-temp");return!!(a^g)}};var h=/^[\t\r\n ]*(?: |\xa0)$/,m=CKEDITOR.dom.walker.whitespaces(),l=CKEDITOR.dom.walker.bookmark(),k=CKEDITOR.dom.walker.temp(),b=function(a){return l(a)||m(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$inline)&&!a.is(CKEDITOR.dtd.$empty)};CKEDITOR.dom.walker.ignored=function(a){return function(g){g=m(g)||l(g)||k(g);return!!(a^g)}};var d=CKEDITOR.dom.walker.ignored();CKEDITOR.dom.walker.empty=function(a){return function(g){for(var b= +0,c=g.getChildCount();b=D.getChildCount()?(D=D.getChild(z-1),G=!0):D=D.getChild(z):J=G=!0;x.type==CKEDITOR.NODE_TEXT?u?I=!0:x.split(y):0S)for(;V;)V=h(V,O,!0);O=U}u||k()}}function c(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0), c=CKEDITOR.dom.walker.bogus();return function(e){return d(e)||b(e)?!0:c(e)&&!a?a=!0:e.type==CKEDITOR.NODE_TEXT&&(e.hasAscendant("pre")||CKEDITOR.tools.trim(e.getText()).length)||e.type==CKEDITOR.NODE_ELEMENT&&!e.is(m)?!1:!0}}function e(a){var b=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(1);return function(c){return d(c)||b(c)?!0:!a&&l(c)||c.type==CKEDITOR.NODE_ELEMENT&&c.is(CKEDITOR.dtd.$removeEmpty)}}function h(a){return function(){var c;return this[a?"getPreviousNode":"getNextNode"](function(a){!c&& -b(a)&&(c=a);return d(a)&&!(l(a)&&a.equals(c))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?: |\xa0)$/,d=CKEDITOR.dom.walker.editable(),b=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; +d(a)&&(c=a);return b(a)&&!(l(a)&&a.equals(c))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},l=CKEDITOR.dom.walker.bogus(),k=/^[\t\r\n ]*(?: |\xa0)$/,b=CKEDITOR.dom.walker.editable(),d=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a=new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset; a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||f(this,0,null, a)},extractContents:function(a,b){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||f(this,1,d,a,"undefined"==typeof b?!0:b);return d},createBookmark:function(a){var b,d,c,e,h=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(c="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id",c+(h?"C":"S")));h||(d=b.clone(),d.setHtml("\x26nbsp;"),a&&d.setAttribute("id",c+"E"),e=this.clone(),e.collapse(), e.insertNode(d));e=this.clone();e.collapse(!0);e.insertNode(b);d?(this.setStartAfter(b),this.setEndBefore(d)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?c+(h?"C":"S"):b,endNode:a?c+"E":d,serializable:a,collapsed:h}},createBookmark2:function(){function a(g){var b=g.container,c=g.offset,e;e=b;var h=c;e=e.type!=CKEDITOR.NODE_ELEMENT||0===h||h==e.getChildCount()?0:e.getChild(h-1).type==CKEDITOR.NODE_TEXT&&e.getChild(h).type==CKEDITOR.NODE_TEXT;e&&(b=b.getChild(c-1),c=b.getLength()); @@ -133,16 +133,16 @@ this.startContainer,b=this.endContainer,d=this.startOffset,c=this.endOffset,e;if CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var d=this.startContainer,c=this.endContainer,d=d.equals(c)?a&&d.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(c);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")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)},trim:function(a,b){var d=this.startContainer,c=this.startOffset,e=this.collapsed;if((!a||e)&&d&&d.type==CKEDITOR.NODE_TEXT){if(c)if(c>=d.getLength())c= d.getIndex()+1,d=d.getParent();else{var h=d.split(c),c=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):d.equals(this.endContainer)&&(this.endOffset+=1)}else c=d.getIndex(),d=d.getParent();this.setStart(d,c);if(e){this.collapse(!0);return}}d=this.endContainer;c=this.endOffset;b||e||!d||d.type!=CKEDITOR.NODE_TEXT||(c?(c>=d.getLength()||d.split(c),c=d.getIndex()+1):c=d.getIndex(),d=d.getParent(),this.setEnd(d,c))},enlarge:function(a, -b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var d=new CKEDITOR.dom.range(f);d.setStart(a,b);d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),g;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=d.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;C=g!=a?g.getText(): -g.substring(b);if(c.test(C))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),f=this.root,m,l,t,x,D,A=!1,z,C;z=this.startContainer;var G=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(G&&(z=!CKEDITOR.tools.trim(z.substring(0,G)).length&&z,A=!!z),z&&((x=z.getPrevious())||(t=z.getParent()))):(G&&(x=z.getChild(G-1)||z.getLast()),x||(t=z));for(t=d(t);t||x;){if(t&&!x){!D&&t.equals(k)&&(D=!0);if(e?t.isBlockBoundary():!f.contains(t))break;A&&"inline"==t.getComputedStyle("display")|| -(A=!1,D?m=t:this.setStartBefore(t));x=t.getPrevious()}for(;x;)if(z=!1,x.type==CKEDITOR.NODE_COMMENT)x=x.getPrevious();else{if(x.type==CKEDITOR.NODE_TEXT)C=x.getText(),c.test(C)&&(x=null),z=/[\s\ufeff]$/.test(C);else if((x.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&x.is("br"))&&!x.data("cke-bookmark"))if(A&&CKEDITOR.dtd.$removeEmpty[x.getName()]){C=x.getText();if(c.test(C))x=null;else for(var G=x.$.getElementsByTagName("*"),E=0,J;J=G[E++];)if(!CKEDITOR.dtd.$removeEmpty[J.nodeName.toLowerCase()]){x= -null;break}x&&(z=!!C.length)}else x=null;z&&(A?D?m=t:t&&this.setStartBefore(t):A=!0);if(x){z=x.getPrevious();if(!t&&!z){t=x;x=null;break}x=z}else t=null}t&&(t=d(t.getParent()))}z=this.endContainer;G=this.endOffset;t=x=null;D=A=!1;z.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(z.substring(G)).length?A=!0:(A=!z.getLength(),G==z.getLength()?(x=z.getNext())||(t=z.getParent()):h(z,G)&&(t=z.getParent())):(x=z.getChild(G))||(t=z);for(;t||x;){if(t&&!x){!D&&t.equals(k)&&(D=!0);if(e?t.isBlockBoundary():!f.contains(t))break; -A&&"inline"==t.getComputedStyle("display")||(A=!1,D?l=t:t&&this.setEndAfter(t));x=t.getNext()}for(;x;){z=!1;if(x.type==CKEDITOR.NODE_TEXT)C=x.getText(),h(x,0)||(x=null),z=/^[\s\ufeff]/.test(C);else if(x.type==CKEDITOR.NODE_ELEMENT){if((0=e.getLength()?c.setStartAfter(e):(c.setStartBefore(e),m=0):c.setStartBefore(e));h&&h.type==CKEDITOR.NODE_TEXT&&(k?k>=h.getLength()?c.setEndAfter(h):(c.setEndAfter(h),l=0):c.setEndBefore(h));var c=new CKEDITOR.dom.walker(c),t=CKEDITOR.dom.walker.bookmark(); -c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var x;c.guard=function(b,c){if(t(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(x)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(x=b);return!0};m&&(e=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START: +b){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var c=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var d=new CKEDITOR.dom.range(k);d.setStart(a,b);d.setEndAt(k,CKEDITOR.POSITION_BEFORE_END);var d=new CKEDITOR.dom.walker(d),g;for(d.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=d.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;C=g!=a?g.getText(): +g.substring(b);if(c.test(C))return!1}return!0};if(this.collapsed)break;var f=this.getCommonAncestor(),k=this.root,m,l,u,x,D,y=!1,z,C;z=this.startContainer;var G=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(G&&(z=!CKEDITOR.tools.trim(z.substring(0,G)).length&&z,y=!!z),z&&((x=z.getPrevious())||(u=z.getParent()))):(G&&(x=z.getChild(G-1)||z.getLast()),x||(u=z));for(u=d(u);u||x;){if(u&&!x){!D&&u.equals(f)&&(D=!0);if(e?u.isBlockBoundary():!k.contains(u))break;y&&"inline"==u.getComputedStyle("display")|| +(y=!1,D?m=u:this.setStartBefore(u));x=u.getPrevious()}for(;x;)if(z=!1,x.type==CKEDITOR.NODE_COMMENT)x=x.getPrevious();else{if(x.type==CKEDITOR.NODE_TEXT)C=x.getText(),c.test(C)&&(x=null),z=/[\s\ufeff]$/.test(C);else if((x.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&x.is("br"))&&!x.data("cke-bookmark"))if(y&&CKEDITOR.dtd.$removeEmpty[x.getName()]){C=x.getText();if(c.test(C))x=null;else for(var G=x.$.getElementsByTagName("*"),E=0,J;J=G[E++];)if(!CKEDITOR.dtd.$removeEmpty[J.nodeName.toLowerCase()]){x= +null;break}x&&(z=!!C.length)}else x=null;z&&(y?D?m=u:u&&this.setStartBefore(u):y=!0);if(x){z=x.getPrevious();if(!u&&!z){u=x;x=null;break}x=z}else u=null}u&&(u=d(u.getParent()))}z=this.endContainer;G=this.endOffset;u=x=null;D=y=!1;z.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(z.substring(G)).length?y=!0:(y=!z.getLength(),G==z.getLength()?(x=z.getNext())||(u=z.getParent()):h(z,G)&&(u=z.getParent())):(x=z.getChild(G))||(u=z);for(;u||x;){if(u&&!x){!D&&u.equals(f)&&(D=!0);if(e?u.isBlockBoundary():!k.contains(u))break; +y&&"inline"==u.getComputedStyle("display")||(y=!1,D?l=u:u&&this.setEndAfter(u));x=u.getNext()}for(;x;){z=!1;if(x.type==CKEDITOR.NODE_TEXT)C=x.getText(),h(x,0)||(x=null),z=/^[\s\ufeff]/.test(C);else if(x.type==CKEDITOR.NODE_ELEMENT){if((0=e.getLength()?c.setStartAfter(e):(c.setStartBefore(e),m=0):c.setStartBefore(e));h&&h.type==CKEDITOR.NODE_TEXT&&(k?k>=h.getLength()?c.setEndAfter(h):(c.setEndAfter(h),l=0):c.setEndBefore(h));var c=new CKEDITOR.dom.walker(c),u=CKEDITOR.dom.walker.bookmark(); +c.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var x;c.guard=function(b,c){if(u(b))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(x)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(x=b);return!0};m&&(e=c[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(e,b?CKEDITOR.POSITION_AFTER_START: CKEDITOR.POSITION_BEFORE_START);l&&(c.reset(),(c=c[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(c,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!m&&!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, b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=d;this.endContainer||(this._setEndContainer(b),this.endOffset=d);a(this)},setEnd:function(b, d){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(d=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=d;this.startContainer||(this._setStartContainer(b),this.startOffset=d);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b, @@ -155,54 +155,54 @@ this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return c},removeEmptyBlocksAt "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=c();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer, b=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(b)),k.test(a)&&this.trim(1,0));this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);b=this.clone();b.collapse(!1);b.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(b);a.evaluator=c();return a.checkForward()},getPreviousNode:function(a,b,d){var c=this.clone();c.collapse(1);c.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START);d=new CKEDITOR.dom.walker(c); d.evaluator=a;d.guard=b;return d.previous()},getNextNode:function(a,b,d){var c=this.clone();c.collapse();c.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(c);d.evaluator=a;d.guard=b;return d.next()},checkReadOnly:function(){function a(b,d){for(;b;){if(b.type==CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(d)||b.equals(d)))break}b=b.getParent()}return 1} -return function(){var b=this.startContainer,d=this.endContainer;return!(a(b,d)&&a(d,b))}}(),moveToElementEditablePosition:function(a,d){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){d&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END: -CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(d&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,h=c,p=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&& -(p=e[d?"getLast":"getFirst"](b));h||p||(p=e[d?"getPrevious":"getNext"](b));a=p}return!!c},moveToClosestEditablePosition:function(a,b){var d,c=0,e,h,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,f[b?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))c=1;else if(e=d[b?"getNextEditableNode":"getPreviousEditableNode"]())c=1,(h=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")? +return 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 c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&k.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END: +CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,h=c,p=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&& +(p=e[b?"getLast":"getFirst"](d));h||p||(p=e[b?"getPrevious":"getNext"](d));a=p}return!!c},moveToClosestEditablePosition:function(a,b){var d,c=0,e,h,f=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,f[b?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))c=1;else if(e=d[b?"getNextEditableNode":"getPreviousEditableNode"]())c=1,(h=e.type==CKEDITOR.NODE_ELEMENT)&&e.is(CKEDITOR.dtd.$block)&&"false"==e.getAttribute("contenteditable")? (d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.setEndAt(e,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(e,0),d.collapse()):d.moveToPosition(e,f[b?1:0]);c&&this.moveToRange(d);return!!c},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!= CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),b=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&b(a)};var c=a.next();a.reset();return c&&c.equals(a.previous())?c:null},getTouchedStartNode:function(){var a=this.startContainer;return this.collapsed||a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.startOffset)||a},getTouchedEndNode:function(){var a=this.endContainer;return this.collapsed|| a.type!=CKEDITOR.NODE_ELEMENT?a:a.getChild(this.endOffset-1)||a},getNextEditableNode:h(),getPreviousEditableNode:h(1),scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,d,c,e=this.clone();e.optimize();(c=e.startContainer.type==CKEDITOR.NODE_TEXT)?(d=e.startContainer.getText(),b=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();c&&(e.startContainer.setText(d),b.remove()); a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a}}}(),CKEDITOR.POSITION_AFTER_START=1,CKEDITOR.POSITION_BEFORE_END=2,CKEDITOR.POSITION_BEFORE_START=3,CKEDITOR.POSITION_AFTER_END=4,CKEDITOR.ENLARGE_ELEMENT=1,CKEDITOR.ENLARGE_BLOCK_CONTENTS=2,CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS=3,CKEDITOR.ENLARGE_INLINE=4,CKEDITOR.START=1,CKEDITOR.END=2,CKEDITOR.SHRINK_ELEMENT=1,CKEDITOR.SHRINK_TEXT=2,"use strict",function(){function a(a){1>arguments.length|| -(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function f(a){var d=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return d.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return d}function c(a,d,e,h){a:{null==h&&(h=f(e));for(var k;k=h.shift();)if(k.getDtd().p){h={element:k,remaining:h};break a}h=null}if(!h)return 0;if((k=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!k.check(d))return c(a,d,e,h.remaining);d=new CKEDITOR.dom.range(h.element); -d.selectNodeContents(h.element);d=d.createIterator();d.enlargeBr=a.enlargeBr;d.enforceRealBlocks=a.enforceRealBlocks;d.activeFilter=d.filter=k;a._.nestedEditable={element:h.element,container:e,remaining:h.remaining,iterator:d};return 1}function e(a,d,c){if(!d)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(d,c?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return m(a)&&l(a)},d={dd:1,dt:1, -li:1};a.prototype={getNextParagraph:function(a){var g,f,l,u,r;a=a||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null; -if(!this._.started){var p=this.range.clone();f=p.startPath();var q=p.endPath(),w=!p.collapsed&&e(p,f.block),y=!p.collapsed&&e(p,q.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);w&&p.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);y&&p.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);p.collapsed||(f=new CKEDITOR.dom.walker(p.clone()), +(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function f(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function c(a,b,e,h){a:{null==h&&(h=f(e));for(var k;k=h.shift();)if(k.getDtd().p){h={element:k,remaining:h};break a}h=null}if(!h)return 0;if((k=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!k.check(b))return c(a,b,e,h.remaining);b=new CKEDITOR.dom.range(h.element); +b.selectNodeContents(h.element);b=b.createIterator();b.enlargeBr=a.enlargeBr;b.enforceRealBlocks=a.enforceRealBlocks;b.activeFilter=b.filter=k;a._.nestedEditable={element:h.element,container:e,remaining:h.remaining,iterator:b};return 1}function e(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var h=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),l=CKEDITOR.dom.walker.whitespaces(!0),k=function(a){return m(a)&&l(a)},b={dd:1,dt:1, +li:1};a.prototype={getNextParagraph:function(a){var g,f,l,v,r;a=a||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(c(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable=null}if(!this.range.root.getDtd()[a])return null; +if(!this._.started){var p=this.range.clone();f=p.startPath();var q=p.endPath(),w=!p.collapsed&&e(p,f.block),A=!p.collapsed&&e(p,q.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);w&&p.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);A&&p.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);p.collapsed||(f=new CKEDITOR.dom.walker(p.clone()), q=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=q,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(p.clone()),f.evaluator=q,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&&(q=new CKEDITOR.dom.elementPath(q.endContainer, -q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(f)),p=null);this._.started=1;f=p}q=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;q;){var w=0,y=q.hasAscendant("pre"),B=q.type!=CKEDITOR.NODE_ELEMENT,t=0;if(B)q.type==CKEDITOR.NODE_TEXT&&h.test(q.getText())&&(B=0);else{var x=q.getName();if(CKEDITOR.dtd.$block[x]&&"false"==q.getAttribute("contenteditable")){g= -q;c(this,a,g);break}else if(q.isBlockBoundary(this.forceBrBreak&&!y&&{br:1})){if("br"==x)B=1;else if(!f&&!q.getChildCount()&&"hr"!=x){g=q;l=q.equals(p);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=x&&(this._.nextNode=q));w=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}B=1}}B&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));l=(!w||B)&&q.equals(p);if(f&&!w)for(;!q.getNext(k)&&!l;){x= -q.getParent();if(x.isBlockBoundary(this.forceBrBreak&&!y&&{br:1})){w=1;B=0;l||x.equals(p);f.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);break}q=x;B=1;l=q.equals(p);t=1}B&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,t,p);if((l=!q)||w&&f)break}if(!g){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=g.blockLimit;w={div:1,th:1,td:1};g=g.block;!g&&q&&!this.enforceRealBlocks&&w[q.getName()]&& -f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?g=q:!g||this.enforceRealBlocks&&g.is(d)?(g=this.range.document.createElement(a),f.extractContents().appendTo(g),g.trim(),f.insertNode(g),u=r=!0):"li"!=g.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(g=g.clone(!1),f.extractContents().appendTo(g),g.trim(),r=f.splitBlock(),u=!r.wasStartOfBlock,r=!r.wasEndOfBlock,f.insertNode(g)):l||(this._.nextNode=g.equals(p)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,1,p))}u&&(u= -g.getPrevious())&&u.type==CKEDITOR.NODE_ELEMENT&&("br"==u.getName()?u.remove():u.getLast()&&"br"==u.getLast().$.nodeName.toLowerCase()&&u.getLast().remove());r&&(u=g.getLast())&&u.type==CKEDITOR.NODE_ELEMENT&&"br"==u.getName()&&(!CKEDITOR.env.needsBrFiller||u.getPrevious(m)||u.getNext(m))&&u.remove();this._.nextNode||(this._.nextNode=l||g.equals(p)||!p?null:this._getNextSourceNode(g,1,p));return g},_getNextSourceNode:function(a,d,c){function e(a){return!(a.equals(c)||a.equals(h))}var h=this.range.root; -for(a=a.getNextSourceNode(d,null,e);!m(a);)a=a.getNextSourceNode(d,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==f.exec.call(this,a,c)};this.refresh=function(a,c){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!c.isContextFor(this.context)|| +q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(f)),p=null);this._.started=1;f=p}q=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;q;){var w=0,A=q.hasAscendant("pre"),B=q.type!=CKEDITOR.NODE_ELEMENT,u=0;if(B)q.type==CKEDITOR.NODE_TEXT&&h.test(q.getText())&&(B=0);else{var x=q.getName();if(CKEDITOR.dtd.$block[x]&&"false"==q.getAttribute("contenteditable")){g= +q;c(this,a,g);break}else if(q.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){if("br"==x)B=1;else if(!f&&!q.getChildCount()&&"hr"!=x){g=q;l=q.equals(p);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=x&&(this._.nextNode=q));w=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}B=1}}B&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));l=(!w||B)&&q.equals(p);if(f&&!w)for(;!q.getNext(k)&&!l;){x= +q.getParent();if(x.isBlockBoundary(this.forceBrBreak&&!A&&{br:1})){w=1;B=0;l||x.equals(p);f.setEndAt(x,CKEDITOR.POSITION_BEFORE_END);break}q=x;B=1;l=q.equals(p);u=1}B&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,u,p);if((l=!q)||w&&f)break}if(!g){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=g.blockLimit;w={div:1,th:1,td:1};g=g.block;!g&&q&&!this.enforceRealBlocks&&w[q.getName()]&& +f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?g=q:!g||this.enforceRealBlocks&&g.is(b)?(g=this.range.document.createElement(a),f.extractContents().appendTo(g),g.trim(),f.insertNode(g),v=r=!0):"li"!=g.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(g=g.clone(!1),f.extractContents().appendTo(g),g.trim(),r=f.splitBlock(),v=!r.wasStartOfBlock,r=!r.wasEndOfBlock,f.insertNode(g)):l||(this._.nextNode=g.equals(p)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode,1,p))}v&&(v= +g.getPrevious())&&v.type==CKEDITOR.NODE_ELEMENT&&("br"==v.getName()?v.remove():v.getLast()&&"br"==v.getLast().$.nodeName.toLowerCase()&&v.getLast().remove());r&&(v=g.getLast())&&v.type==CKEDITOR.NODE_ELEMENT&&"br"==v.getName()&&(!CKEDITOR.env.needsBrFiller||v.getPrevious(m)||v.getNext(m))&&v.remove();this._.nextNode||(this._.nextNode=l||g.equals(p)||!p?null:this._getNextSourceNode(g,1,p));return g},_getNextSourceNode:function(a,b,c){function e(a){return!(a.equals(c)||a.equals(h))}var h=this.range.root; +for(a=a.getNextSourceNode(b,null,e);!m(a);)a=a.getNextSourceNode(b,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}}(),CKEDITOR.command=function(a,f){this.uiItems=[];this.exec=function(c){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==f.exec.call(this,a,c)};this.refresh=function(a,c){if(!this.readOnly&&a.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[a.mode]&&this.disable();return!1===this.fire("refresh",{editor:a,path:c})?!0:f.refresh&&!1!==f.refresh.apply(this,arguments)};var c;this.checkAllowed=function(e){return e||"boolean"!=typeof c?c=a.activeFilter.checkFeature(this):c};CKEDITOR.tools.extend(this,f,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!f.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)},CKEDITOR.command.prototype= {enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF?this.setState(CKEDITOR.TRISTATE_ON): this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}},CKEDITOR.event.implementOn(CKEDITOR.command.prototype),CKEDITOR.ENTER_P=1,CKEDITOR.ENTER_BR=2,CKEDITOR.ENTER_DIV=3,CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"), -extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]},function(){function a(a,d,b,c,g){var e,h;a=[];for(e in d){h=d[e];h="boolean"==typeof h?{}:"function"==typeof h?{match:h}:E(h);"$"!=e.charAt(0)&&(h.elements=e);b&&(h.featureName=b.toLowerCase());var f=h;f.elements=l(f.elements,/\s+/)||null;f.propertiesOnly=f.propertiesOnly||!0===f.elements;var p=/\s*,\s*/,k=void 0;for(k in N){f[k]=l(f[k], -p)||null;var t=f,m=F[k],n=l(f[F[k]],p),x=f[k],q=[],D=!0,B=void 0;n?D=!1:n={};for(B in x)"!"==B.charAt(0)&&(B=B.slice(1),q.push(B),n[B]=!0,D=!1);for(;B=q.pop();)x[B]=x["!"+B],delete x["!"+B];t[m]=(D?!1:n)||null}f.match=f.match||null;c.push(h);a.push(h)}d=g.elements;g=g.generic;var r;b=0;for(c=a.length;b=--k&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),g(c))},v=function(b,d){a[b]=1;var c=f[b];delete f[b];for(var g=0;gCKEDITOR.env.version?c.$.onreadystatechange=function(){if("loaded"==c.$.readyState||"complete"== -c.$.readyState)c.$.onreadystatechange=null,v(b,!0)}:(c.$.onload=function(){setTimeout(function(){v(b,!0)},0)},c.$.onerror=function(){v(b,!1)}));c.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r=--k&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),g(c))},t=function(b,d){a[b]=1;var c=f[b];delete f[b];for(var g=0;gCKEDITOR.env.version?c.$.onreadystatechange=function(){if("loaded"==c.$.readyState||"complete"== +c.$.readyState)c.$.onreadystatechange=null,t(b,!0)}:(c.$.onload=function(){setTimeout(function(){t(b,!0)},0)},c.$.onerror=function(){t(b,!1)}));c.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var r=0;r]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}, function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,f={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(c){for(var e,h,m=0,l;e=this._.htmlPartsRegex.exec(c);){h=e.index;if(h>m)if(m=c.substring(m,h),l)l.push(m);else this.onText(m); -m=this._.htmlPartsRegex.lastIndex;if(h=e[1])if(h=h.toLowerCase(),l&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(h);continue}if(l)l.push(e[0]);else if(h=e[3]){if(h=h.toLowerCase(),!/="/.test(h)){var k={},d,b=e[4];e=!!e[5];if(b)for(;d=a.exec(b);){var g=d[1].toLowerCase();d=d[2]||d[3]||d[4]||"";k[g]=!d&&f[g]?g:CKEDITOR.tools.htmlDecodeAttr(d)}this.onTagOpen(h,k,e);!l&&CKEDITOR.dtd.$cdata[h]&&(l=[])}}else if(h=e[2])this.onComment(h)}if(c.length>m)this.onText(c.substring(m, +m=this._.htmlPartsRegex.lastIndex;if(h=e[1])if(h=h.toLowerCase(),l&&CKEDITOR.dtd.$cdata[h]&&(this.onCDATA(l.join("")),l=null),!l){this.onTagClose(h);continue}if(l)l.push(e[0]);else if(h=e[3]){if(h=h.toLowerCase(),!/="/.test(h)){var k={},b,d=e[4];e=!!e[5];if(d)for(;b=a.exec(d);){var g=b[1].toLowerCase();b=b[2]||b[3]||b[4]||"";k[g]=!b&&f[g]?g:CKEDITOR.tools.htmlDecodeAttr(b)}this.onTagOpen(h,k,e);!l&&CKEDITOR.dtd.$cdata[h]&&(l=[])}}else if(h=e[2])this.onComment(h)}if(c.length>m)this.onText(c.substring(m, c.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,f){f?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,f){"string"==typeof f&&(f=CKEDITOR.tools.htmlEncodeAttr(f));this._.output.push(" ",a,'\x3d"',f,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--", a,"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var f=this._.output.join("");a&&this.reset();return f}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,f=CKEDITOR.tools.indexOf(a,this),c=this.previous,e=this.next;c&&(c.next=e);e&&(e.previous=c);a.splice(f,1);this.parent=null},replaceWith:function(a){var f=this.parent.children, c=CKEDITOR.tools.indexOf(f,this),e=a.previous=this.previous,h=a.next=this.next;e&&(e.next=a);h&&(h.previous=a);f[c]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var f=a.parent.children,c=CKEDITOR.tools.indexOf(f,a),e=a.next;f.splice(c+1,0,this);this.next=a.next;this.previous=a;a.next=this;e&&(e.previous=this);this.parent=a.parent},insertBefore:function(a){var f=a.parent.children,c=CKEDITOR.tools.indexOf(f,a);f.splice(c,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next= @@ -251,152 +251,152 @@ this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var f="func function(a){this.value=a;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,f){var c=this.value;if(!(c=a.onComment(f,c,this)))return this.remove(),!1;if("string"!=typeof c)return this.replaceWith(c),!1;this.value=c;return!0},writeHtml:function(a,f){f&&this.filter(f);a.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,f){if(!(this.value=a.onText(f,this.value,this)))return this.remove(),!1},writeHtml:function(a,f){f&&this.filter(f);a.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})}(),"use strict", CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var f=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),c={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),h={ul:"li", -ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,l,k){function d(a){var d;if(0l;l++)if(f=h[l]){f= f.exec(a,e,this);if(!1===f)return null;if(f&&f!=e)return this.onNode(a,f);if(e.parent&&!e.name)break}return e},onNode:function(a,e){var h=e.type;return h==CKEDITOR.NODE_ELEMENT?this.onElement(a,e):h==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,e.value)):h==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,e.value)):null},onAttribute:function(a,e,h,f){return(h=this.attributesRules[h])?h.exec(a,f,e,this):f}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype= {add:function(a,e,h){this.rules.splice(this.findIndex(e),0,{value:a,priority:e,options:h})},addMany:function(a,e,h){for(var f=[this.findIndex(e),0],l=0,k=a.length;l/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(N,function(a,b){return decodeURIComponent(b)})}function v(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, -function(a){return"\x3c!--"+w+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function u(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function r(a,b){var d=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function p(a,b){var d=[],c=b.config.protectedSource,g=b._.dataStore||(b._.dataStore= +u||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&&(a["data-cke-editable"]=a.contenteditable?"true":1);a.contenteditable="false"}function b(a){a=a.attributes;switch(a["data-cke-editable"]){case "true":a.contenteditable="true";break;case "1":delete a.contenteditable}}function d(a){return a.replace(C,function(a,b,d){return"\x3c"+b+d.replace(G, +function(a,b){return E.test(b)&&-1==d.indexOf("data-cke-saved-"+b)?" data-cke-saved-"+a+" data-cke-"+CKEDITOR.rnd+"-"+a:a})+"\x3e"})}function g(a,b){return a.replace(b,function(a,b,d){0===a.indexOf("\x3ctextarea")&&(a=b+v(d).replace(//g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(N,function(a,b){return decodeURIComponent(b)})}function t(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, +function(a){return"\x3c!--"+w+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function r(a,b){var d=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return d&&d[b]||""})}function p(a,b){var d=[],c=b.config.protectedSource,g=b._.dataStore||(b._.dataStore= {id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,c=[/|$)/gi,//gi,//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]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){g[g.id]=decodeURIComponent(b);return"{cke_protected_"+g.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,g){return"\x3c"+d+c+"\x3e"+r(u(g),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(d){var c, -e,h=this;this.editor=d;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(x);c.addRules(D,{applyToAll:!0});c.addRules(a(d,"data"),{applyToAll:!0});e.addRules(A);e.addRules(z,{applyToAll:!0});e.addRules(a(d,"html"),{applyToAll:!0});d.on("toHtml",function(a){a=a.data;var c=a.dataValue,e,c=p(c,d),c=g(c,I),c=b(c),c=g(c,J),c=c.replace(F,"$1cke:$2"),c=c.replace(R,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), -c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||d.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=d.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(P,"$1$2");c=n(c);c=u(c);e=!1===a.fixForBody?!1:
-f(a.enterMode,d.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,e);e&&(h=c,!h.children.length&&CKEDITOR.dtd[h.name][e]&&(e=new CKEDITOR.htmlParser.element(e),h.add(e)));a.dataValue=c},null,null,5);d.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&d.fire("dataFiltered")},null,null,6);d.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);d.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=v(b)},null,null,15);d.on("toDataFormat",function(a){var b=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(b=b.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(b,a.data.context,f(a.data.enterMode,d.config.autoParagraph))},null,null,5);d.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.htmlFilter,!0)},null,null,10);d.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, -!1,!0)},null,null,11);d.on("toDataFormat",function(a){var b=a.data.dataValue,c=h.writer;c.reset();b.writeChildrenHtml(c);b=c.getHtml(!0);b=u(b);b=r(b,d);a.data.dataValue=b},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var g=this.editor,e,h,f,k;b&&"object"==typeof b?(e=b.context,d=b.fixForBody,c=b.dontFilter,h=b.filter,f=b.enterMode,k=b.protectedWhitespaces):e=b;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:d,dontFilter:c, -filter:h||g.filter,enterMode:f||g.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var d,c,g;b&&(d=b.context,c=b.filter,g=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:g||this.editor.enterMode}).dataValue}};var q=/(?: |\xa0)$/,w="{cke_protected}",y=CKEDITOR.dtd,B="caption colgroup col thead tfoot tbody".split(" "),t=CKEDITOR.tools.extend({},y.$blockLimit, -y.$block),x={elements:{input:k,textarea:k}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},A={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}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/, +"")+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){g[g.id]=decodeURIComponent(b);return"{cke_protected_"+g.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,c,g){return"\x3c"+d+c+"\x3e"+r(v(g),b)+"\x3c/"+d+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c, +e,h=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(x);c.addRules(D,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});e.addRules(y);e.addRules(z,{applyToAll:!0});e.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,e,c=p(c,b),c=g(c,I),c=d(c),c=g(c,J),c=c.replace(F,"$1cke:$2"),c=c.replace(R,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), +c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=a.context||b.editable().getName();var h;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",h=1);e=b.document.createElement(e);e.setHtml("a"+c);c=e.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");h&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(P,"$1$2");c=n(c);c=v(c);e=!1===a.fixForBody?!1:
+f(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,e);e&&(h=c,!h.children.length&&CKEDITOR.dtd[h.name][e]&&(e=new CKEDITOR.htmlParser.element(e),h.add(e)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(h.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
+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(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,a.data.context,f(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(h.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, +!1,!0)},null,null,11);b.on("toDataFormat",function(a){var d=a.data.dataValue,c=h.writer;c.reset();d.writeChildrenHtml(c);d=c.getHtml(!0);d=v(d);d=r(d,b);a.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,d,c){var g=this.editor,e,h,f,k;b&&"object"==typeof b?(e=b.context,d=b.fixForBody,c=b.dontFilter,h=b.filter,f=b.enterMode,k=b.protectedWhitespaces):e=b;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:d,dontFilter:c, +filter:h||g.filter,enterMode:f||g.enterMode,protectedWhitespaces:k}).dataValue},toDataFormat:function(a,b){var d,c,g;b&&(d=b.context,c=b.filter,g=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:g||this.editor.enterMode}).dataValue}};var q=/(?: |\xa0)$/,w="{cke_protected}",A=CKEDITOR.dtd,B="caption colgroup col thead tfoot tbody".split(" "),u=CKEDITOR.tools.extend({},A.$blockLimit, +A.$block),x={elements:{input:k,textarea:k}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^data-cke-expando$/,""]]},y={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var 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}}},z={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/, ""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var d=["name","href","src"],c,g=0;gc? 1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var 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,""))||!1}}};CKEDITOR.env.ie&&(z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var C=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/^(href|src|name)$/i,J=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, +b.value=a.attributes["data-cke-title"]||""},input:b,textarea:b},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var C=/<(a|area|img|input|source)\b([^>]*)>/gi,G=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/^(href|src|name)$/i,J=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, I=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,N=/([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,P=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,R=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(),"use strict",CKEDITOR.htmlParser.element=function(a,f){this.name=a;this.attributes=f||{};this.children=[];var c=a||"",e=c.match(/^cke:(.*)/);e&&(c=e[1]);c=!!(CKEDITOR.dtd.$nonBodyContent[c]||CKEDITOR.dtd.$block[c]||CKEDITOR.dtd.$listItem[c]|| CKEDITOR.dtd.$tableContent[c]||CKEDITOR.dtd.$nonEditable[c]||"br"==c);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:c,hasInlineStarted:this.isEmpty||!c}},CKEDITOR.htmlParser.cssStyle=function(a){var f={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,e,h){"font-family"==e&&(h=h.replace(/["']/g,""));f[e.toLowerCase()]=h});return{rules:f,populate:function(a){var e= this.toString();e&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",e):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=e:a.style=e)},toString:function(){var a=[],e;for(e in f)f[e]&&a.push(e,":",f[e],";");return a.join("")}}},function(){function a(a){return function(c){return c.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?c.name==a:c.name in a)}}var f=function(a,c){a=a[0];c=c[0];return ac?1:0},c=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:c.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,c){var f=this,l,k;c=f.getFilterContext(c);if(c.off)return!0;if(!f.parent)a.onRoot(c,f);for(;;){l=f.name;if(!(k=a.onElementName(c,l)))return this.remove(),!1;f.name=k;if(!(f=a.onElement(c,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==l)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f), -!1;if(!f.name)return this.replaceWithChildren(),!1}l=f.attributes;var d,b;for(d in l){for(k=l[d];;)if(b=a.onAttributeName(c,d))if(b!=d)delete l[d],d=b;else break;else{delete l[d];break}b&&(!1===(k=a.onAttribute(c,f,b,k))?delete l[b]:l[b]=k)}f.isEmpty||this.filterChildren(a,!1,c);return!0},filterChildren:c.filterChildren,writeHtml:function(a,c){c&&this.filter(c);var m=this.name,l=[],k=this.attributes,d,b;a.openTag(m,k);for(d in k)l.push([d,k[d]]);a.sortAttributes&&l.sort(f);d=0;for(b=l.length;dCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus", -function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};w.eol.detect(a,this);w.bogus.exclude(a);w.cell.shrink(a);a.fragment=a.range.cloneContents();w.tree.rebuild(a,this);w.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=y,c={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE, +function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};w.eol.detect(a,this);w.bogus.exclude(a);w.cell.shrink(a);a.fragment=a.range.cloneContents();w.tree.rebuild(a,this);w.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var d=A,c={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;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);d.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"),e=0,h;if(c)for(;h=c.getItem(e++);)if(!n(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),v(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings(); +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"),e=0,h;if(c)for(;h=c.getItem(e++);)if(!n(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),t(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings(); return g},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(r,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a, "beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"): a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);a.focusManager.add(this);this.equals(CKEDITOR.document.getActive())&&(this.hasFocus=!0,a.once("contentDom", -function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var d=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var h=a.config.contentsLangDirection;this.getDirection(1)!=h&&this.changeAttr("dir",h);var f=CKEDITOR.getCss();if(f){var h=d.getHead(),k=h.getCustomData("stylesheet");k?f!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText= -f:k.setText(f)):(f=d.appendStyleText(f),f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement),h.setCustomData("stylesheet",f),f.data("cke-temp",1))}h=d.getCustomData("stylesheet_ref")||0;d.setCustomData("stylesheet_ref",h+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a, -"key",function(b){if(a.readOnly)return!0;var d=b.data.domEvent.getKey(),c;if(d in n){b=a.getSelection();var e,h=b.getRanges()[0],f=h.startPath(),k,t,l,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=m(b))?(a.fire("saveSnapshot"),h.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),h.select(),a.fire("saveSnapshot"),c=1):h.collapsed&&((k=f.block)&&(l=k[d?"getPrevious":"getNext"](g))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&h[d?"checkStartOfBlock":"checkEndOfBlock"]()? -(a.fire("saveSnapshot"),h[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),h["moveToElementEdit"+(d?"End":"Start")](l),h.select(),a.fire("saveSnapshot"),c=1):f.blockLimit&&f.blockLimit.is("td")&&(t=f.blockLimit.getAscendant("table"))&&h.checkBoundaryOfElement(t,d?CKEDITOR.START:CKEDITOR.END)&&(l=t[d?"getPrevious":"getNext"](g))?(a.fire("saveSnapshot"),h["moveToElementEdit"+(d?"End":"Start")](l),h.checkStartOfBlock()&&h.checkEndOfBlock()?l.remove():h.select(),a.fire("saveSnapshot"),c=1):(t=f.contains(["td", -"th","caption"]))&&h.checkBoundaryOfElement(t,d?CKEDITOR.START:CKEDITOR.END)&&(c=1))}return!c});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in n&&!this.getFirst(e)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this, +function(){a.focusManager.focus(this)},this));this.isInline()&&this.changeAttr("tabindex",a.tabIndex);if(!this.is("textarea")){a.document=this.getDocument();a.window=this.getWindow();var b=a.document;this.changeAttr("spellcheck",!a.config.disableNativeSpellChecker);var h=a.config.contentsLangDirection;this.getDirection(1)!=h&&this.changeAttr("dir",h);var f=CKEDITOR.getCss();if(f){var h=b.getHead(),k=h.getCustomData("stylesheet");k?f!=k.getText()&&(CKEDITOR.env.ie&&9>CKEDITOR.env.version?k.$.styleSheet.cssText= +f:k.setText(f)):(f=b.appendStyleText(f),f=new CKEDITOR.dom.element(f.ownerNode||f.owningElement),h.setCustomData("stylesheet",f),f.data("cke-temp",1))}h=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref",h+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var n={8:1,46:1};this.attachListener(a, +"key",function(b){if(a.readOnly)return!0;var d=b.data.domEvent.getKey(),c;if(d in n){b=a.getSelection();var e,h=b.getRanges()[0],f=h.startPath(),k,u,l,d=8==d;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(e=b.getSelectedElement())||(e=m(b))?(a.fire("saveSnapshot"),h.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),h.select(),a.fire("saveSnapshot"),c=1):h.collapsed&&((k=f.block)&&(l=k[d?"getPrevious":"getNext"](g))&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("table")&&h[d?"checkStartOfBlock":"checkEndOfBlock"]()? +(a.fire("saveSnapshot"),h[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),h["moveToElementEdit"+(d?"End":"Start")](l),h.select(),a.fire("saveSnapshot"),c=1):f.blockLimit&&f.blockLimit.is("td")&&(u=f.blockLimit.getAscendant("table"))&&h.checkBoundaryOfElement(u,d?CKEDITOR.START:CKEDITOR.END)&&(l=u[d?"getPrevious":"getNext"](g))?(a.fire("saveSnapshot"),h["moveToElementEdit"+(d?"End":"Start")](l),h.checkStartOfBlock()&&h.checkEndOfBlock()?l.remove():h.select(),a.fire("saveSnapshot"),c=1):(u=f.contains(["td", +"th","caption"]))&&h.checkBoundaryOfElement(u,d?CKEDITOR.START:CKEDITOR.END)&&(c=1))}return!c});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in n&&!this.getFirst(e)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this, "click",c);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(b){var d=b.data.getTarget();d.is("img","hr","input","textarea","select")&&!d.isReadOnly()&&(a.getSelection().selectElement(d),d.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&& -(b=b.data.getTarget(),!b.getOuterHtml().replace(r,""))){var d=a.createRange();d.moveToElementEditStart(b);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(d){if(a.readOnly)return!0;d=d.data.domEvent.getKey();if(d in n){var c= -8==d,g=a.getSelection().getRanges()[0];d=g.startPath();if(g.collapsed)a:{var e=d.block;if(e&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()&&g.moveToClosestEditablePosition(e,!c)&&g.collapsed){if(g.startContainer.type==CKEDITOR.NODE_ELEMENT){var h=g.startContainer.getChild(g.startOffset-(c?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){a.fire("saveSnapshot");h.remove();d=!0;break a}}g=g.startPath().block;if(!g||g&&g.contains(e))d=void 0;else{a.fire("saveSnapshot");var f;(f=(c?g:e).getBogus())&& -f.remove();f=a.getSelection();h=f.createBookmarks();(c?e:g).moveChildren(c?g:e,!1);d.lastElement.mergeSiblings();b(e,g,!c);f.selectBookmarks(h);d=!0}}else d=!1}else c=g,f=d.block,g=c.endPath().block,f&&g&&!f.equals(g)?(a.fire("saveSnapshot"),(e=f.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),g.getParent()&&(g.moveChildren(f,!1),d.lastElement.mergeSiblings(),b(f,g,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(), -c.select(),d=!0):d=!1;if(!d)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var d=a.getCustomData("stylesheet_ref");--d?a.setCustomData("stylesheet_ref",d):(a.removeCustomData("stylesheet_ref"), +(b=b.data.getTarget(),!b.getOuterHtml().replace(r,""))){var d=a.createRange();d.moveToElementEditStart(b);d.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(b){if(a.readOnly)return!0;b=b.data.domEvent.getKey();if(b in n){var c= +8==b,g=a.getSelection().getRanges()[0];b=g.startPath();if(g.collapsed)a:{var e=b.block;if(e&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()&&g.moveToClosestEditablePosition(e,!c)&&g.collapsed){if(g.startContainer.type==CKEDITOR.NODE_ELEMENT){var h=g.startContainer.getChild(g.startOffset-(c?1:0));if(h&&h.type==CKEDITOR.NODE_ELEMENT&&h.is("hr")){a.fire("saveSnapshot");h.remove();b=!0;break a}}g=g.startPath().block;if(!g||g&&g.contains(e))b=void 0;else{a.fire("saveSnapshot");var f;(f=(c?g:e).getBogus())&& +f.remove();f=a.getSelection();h=f.createBookmarks();(c?e:g).moveChildren(c?g:e,!1);b.lastElement.mergeSiblings();d(e,g,!c);f.selectBookmarks(h);b=!0}}else b=!1}else c=g,f=b.block,g=c.endPath().block,f&&g&&!f.equals(g)?(a.fire("saveSnapshot"),(e=f.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),g.getParent()&&(g.moveChildren(f,!1),b.lastElement.mergeSiblings(),d(f,g,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(), +c.select(),b=!0):b=!1;if(!b)return;a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=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())}}this.editor.fire("contentDomUnload");delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var d=b.editor;d.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")||a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&& a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});d.on("selectionChange",function(b){if(!d.readOnly){var c=d.getSelection();c&&!c.isLocked&&(c=d.checkDirty(),d.fire("lockSnapshot"),a(b),d.fire("unlockSnapshot"),!c&&d.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-label",d);d&&a.changeAttr("title", d);var c=b.fire("ariaEditorHelpLabel",{}).label;if(c&&(d=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var g=CKEDITOR.tools.getNextId(),c=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+c+"\x3c/span\x3e");d.append(c);a.changeAttr("aria-describedby",g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");g=CKEDITOR.dom.walker.whitespaces(!0);n=CKEDITOR.dom.walker.bookmark(!1, -!0);v=CKEDITOR.dom.walker.empty();u=CKEDITOR.dom.walker.bogus();r=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var g,e,h,f,k=[],l=c.range.startContainer;g=c.range.startPath();for(var l=n[l.getName()],p=0,m=d.getChildren(),r=m.count(),q=-1,x=-1,w=0,u=g.contains(n.$list);p]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(d,c){var g,e,h,f,k=[],l=c.range.startContainer;g=c.range.startPath();for(var l=n[l.getName()],p=0,m=d.getChildren(),r=m.count(),q=-1,x=-1,w=0,t=g.contains(n.$list);pCKEDITOR.env.version&&c.getChildCount()&&c.getFirst().remove())}return function(c){var g=c.startContainer,e=g.getAscendant("table",1),h=!1;d(e.getElementsByTag("td"));d(e.getElementsByTag("th"));e=c.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=c.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END), e=a(e).lastForward(),h=!0);e||(e=g);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)),(g=e.getBogus())&&g.remove(),c.moveToPosition(e,h?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();w={eol:{detect:function(a,b){var d=a.range,c=d.clone(),g=d.clone(),e=new CKEDITOR.dom.elementPath(d.startContainer,b),h=new CKEDITOR.dom.elementPath(d.endContainer, b);c.collapse(1);g.collapse();e.block&&c.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(d.setStartAfter(e.block),a.prependEolBr=1);h.block&&g.checkBoundaryOfElement(h.block,CKEDITOR.START)&&(d.setEndBefore(h.block),a.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||!u(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(c,b),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(g.blockLimit.is({tr:1,table:1})){var f=g.contains("table").getParent();h=function(a){return!a.equals(f)}}else if(g.block&& +bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),d=b.startNode,b=b.endNode;!b||!v(b)||d&&d.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var d=a.range,c=d.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(c,b),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(g.blockLimit.is({tr:1,table:1})){var f=g.contains("table").getParent();h=function(a){return!a.equals(f)}}else if(g.block&& g.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),d=d.contains(CKEDITOR.dtd.$list),!e.equals(d))){var k=g.contains(CKEDITOR.dtd.$list).getParent();h=function(a){return!a.equals(k)}}h||(h=function(a){return!a.equals(g.block)&&!a.equals(g.blockLimit)});this.rebuildFragment(a,b,c,h)},rebuildFragment:function(a,b,d,c){for(var g;d&&!d.equals(b)&&c(d);)g=d.clone(0,1),a.fragment.appendTo(g),a.fragment=g,d=d.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,d=a.endContainer, -c=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};y=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,g){a(c);a(g,1);for(var e;e=g.getNext();)e.insertAfter(c),c=e;v(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), +c=a.startOffset,g=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(d)&&b.is("tr")&&++c==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};A=function(){function a(b,d){var c=b.getParent();if(c.is(CKEDITOR.dtd.$inline))b[d?"insertBefore":"insertAfter"](c)}function b(d,c,g){a(c);a(g,1);for(var e;e=g.getNext();)e.insertAfter(c),c=e;t(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), g=c.startPath(),e=c.endPath(),h=g.contains(CKEDITOR.dtd.$list),f=e.contains(CKEDITOR.dtd.$list);a.mergeList=h&&f&&h.getParent().equals(f.getParent())&&!h.equals(f);a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.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, g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(g,d);if(a.mergeList){var f=e.contains(CKEDITOR.dtd.$list),k=h.contains(CKEDITOR.dtd.$list);f.equals(k)||(k.moveChildren(f),k.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$listItem),e.equals(h)||b(h,c,g));c.remove();g.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,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(g,d),e=e.block,h=h.block;e&&h&&!e.equals(h)&&b(h,c,g);c.remove();g.remove()}}},table:function(){function a(d){var g=[],e,h=new CKEDITOR.dom.walker(d),f=d.startPath().contains(c),k=d.endPath().contains(c),n={};h.guard=function(a, -h){if(a.type==CKEDITOR.NODE_ELEMENT){var p="visited_"+(h?"out":"in");if(a.getCustomData(p))return;CKEDITOR.dom.element.setMarker(n,a,p,1)}if(h&&f&&a.equals(f))e=d.clone(),e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!h&&k&&a.equals(k))e=d.clone(),e.setStartAt(k,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(p=!h)p=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!f||b(a,f))&&(!k||b(a,k));p&&(e=d.clone(),e.selectNodeContents(a),g.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(n); +d.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=d.createBookmark()}},merge:function(a,d){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var c=a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(c,d),h=new CKEDITOR.dom.elementPath(g,d),e=e.block,h=h.block;e&&h&&!e.equals(h)&&b(h,c,g);c.remove();g.remove()}}},table:function(){function a(d){var g=[],e,h=new CKEDITOR.dom.walker(d),f=d.startPath().contains(c),k=d.endPath().contains(c),p={};h.guard=function(a, +h){if(a.type==CKEDITOR.NODE_ELEMENT){var n="visited_"+(h?"out":"in");if(a.getCustomData(n))return;CKEDITOR.dom.element.setMarker(p,a,n,1)}if(h&&f&&a.equals(f))e=d.clone(),e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!h&&k&&a.equals(k))e=d.clone(),e.setStartAt(k,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(n=!h)n=a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&(!f||b(a,f))&&(!k||b(a,k));n&&(e=d.clone(),e.selectNodeContents(a),g.push(e))}};h.lastForward();CKEDITOR.dom.element.clearAllMarkers(p); return g}function b(a,d){var c=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(d);return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&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),g=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(c)&&++g};d.checkForward();if(1e&&g&&g.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(k(d.getText(),1));h&&(d=a.getDocument().$,c=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 k(a,b){return b?a.replace(B,function(a,b){return b?" ":""}):a.replace(y,"")}function d(a){var b=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e\x26nbsp;\x3c/div\x3e',a.document);a.fire("lockSnapshot");a.editable().append(b);var d=a.getSelection(1),c=a.createRange(), -g=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);c.setStartAt(b,CKEDITOR.POSITION_AFTER_START);c.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([c]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function b(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var g=a.getSelection().getRanges(),e=g[0];1==g.length&&e.collapsed&&(c=e[38>c?"getPreviousEditableNode":"getNextEditableNode"]())&&c.type==CKEDITOR.NODE_ELEMENT&& +this.getSelection(1),!a||a.getType()==CKEDITOR.SELECTION_NONE))return;this.fire("selectionCheck",a);b=this.elementPath();b.compare(this._.selectionPreviousPath)||(CKEDITOR.env.webkit&&(this._.previousActive=this.document.getActive()),this._.selectionPreviousPath=b,this.fire("selectionChange",{selection:a,path:b}))}function f(){t=!0;n||(c.call(this),n=CKEDITOR.tools.setTimeout(c,200,this))}function c(){n=null;t&&(CKEDITOR.tools.setTimeout(a,0,this),t=!1)}function e(a){return v(a)||a.type==CKEDITOR.NODE_ELEMENT&& +!a.is(CKEDITOR.dtd.$empty)?!0:!1}function h(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 d=a.startContainer,c=a.getPreviousNode(e,null,d),g=a.getNextNode(e,null,d);return b(c)||b(g,1)||!(c||g||d.type==CKEDITOR.NODE_ELEMENT&&d.isBlockBoundary()&&d.getBogus())?!0:!1}function m(a){l(a,!1);var b=a.getDocument().createText(A);a.setCustomData("cke-fillingChar",b);return b}function l(a, +b){var d=a&&a.removeCustomData("cke-fillingChar");if(d){if(!1!==b){var c=a.getDocument().getSelection().getNative(),g=c&&"None"!=c.type&&c.getRangeAt(0),e=A.length;if(d.getLength()>e&&g&&g.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(k(d.getText(),1));h&&(d=a.getDocument().$,c=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 k(a,b){return b?a.replace(B,function(a,b){return b?" ":""}):a.replace(A,"")}function b(a){var b=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e\x26nbsp;\x3c/div\x3e',a.document);a.fire("lockSnapshot");a.editable().append(b);var d=a.getSelection(1),c=a.createRange(), +g=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);c.setStartAt(b,CKEDITOR.POSITION_AFTER_START);c.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([c]);g.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function d(a){var b={37:1,39:1,8:1,46:1};return function(d){var c=d.data.getKeystroke();if(b[c]){var g=a.getSelection().getRanges(),e=g[0];1==g.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 g(a){for(var b=0;b=c.getLength()?f.setStartAfter(c):f.setStartBefore(c));g&&g.type==CKEDITOR.NODE_TEXT&&(h?f.setEndAfter(g):f.setEndBefore(g));c=new CKEDITOR.dom.walker(f);c.evaluator=function(c){if(c.type==CKEDITOR.NODE_ELEMENT&&c.isReadOnly()){var g=d.clone();d.setEndBefore(c);d.collapsed&&a.splice(b--,1);c.getPosition(f.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(c),g.collapsed||a.splice(b+1,0,g));return!0}return!1};c.next()}}return a}var n, -v,u=CKEDITOR.dom.walker.invisible(1),r=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(),g;(g=c.moveToClosestEditablePosition(b.selected,a))||(g=c.moveToClosestEditablePosition(b.selected,!a));g&&d.getSelection().selectRanges([c]);d.fire("saveSnapshot");b.selected.remove();g||(c.moveToElementEditablePosition(d.editable()), -d.getSelection().selectRanges([c]));d.fire("saveSnapshot");return!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(d){function c(){var a=g.getSelection();a&&a.removeAllRanges()}var g=d.editor;g.on("contentDom",function(){function d(){r=new CKEDITOR.dom.selection(g.getSelection());r.lock()}function c(){h.removeListener("mouseup",c);m.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument== -e.$&&b.select()}var e=g.document,h=CKEDITOR.document,k=g.editable(),n=e.getBody(),m=e.getDocumentElement(),t=k.isInline(),F,r;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==F&&(a=g.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=g.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){F&&CKEDITOR.env.webkit&&(F=g._.previousActive&&g._.previousActive.equals(e.getActive())); -g.unlockSelection(F);F=0},null,null,-1);k.attachListener(k,"mousedown",function(){F=0});if(CKEDITOR.env.ie||t)p?k.attachListener(k,"beforedeactivate",d,null,null,-1):k.attachListener(g,"selectionCheck",d,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){g.lockSelection(r);F=1},null,null,-1),k.attachListener(k,"mousedown",function(){F=0});if(CKEDITOR.env.ie&&!t){var q;k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=g.document.getSelection())&&a.getType()!= +t,v=CKEDITOR.dom.walker.invisible(1),r=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(),g;(g=c.moveToClosestEditablePosition(b.selected,a))||(g=c.moveToClosestEditablePosition(b.selected,!a));g&&d.getSelection().selectRanges([c]);d.fire("saveSnapshot");b.selected.remove();g||(c.moveToElementEditablePosition(d.editable()), +d.getSelection().selectRanges([c]));d.fire("saveSnapshot");return!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(b){function c(){var a=g.getSelection();a&&a.removeAllRanges()}var g=b.editor;g.on("contentDom",function(){function b(){r=new CKEDITOR.dom.selection(g.getSelection());r.lock()}function c(){h.removeListener("mouseup",c);m.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement().ownerDocument== +e.$&&b.select()}var e=g.document,h=CKEDITOR.document,k=g.editable(),n=e.getBody(),m=e.getDocumentElement(),u=k.isInline(),F,r;CKEDITOR.env.gecko&&k.attachListener(k,"focus",function(a){a.removeListener();0!==F&&(a=g.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==k.$&&(a=g.createRange(),a.moveToElementEditStart(k),a.select())},null,null,-2);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){F&&CKEDITOR.env.webkit&&(F=g._.previousActive&&g._.previousActive.equals(e.getActive())); +g.unlockSelection(F);F=0},null,null,-1);k.attachListener(k,"mousedown",function(){F=0});if(CKEDITOR.env.ie||u)p?k.attachListener(k,"beforedeactivate",b,null,null,-1):k.attachListener(g,"selectionCheck",b,null,null,-1),k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){g.lockSelection(r);F=1},null,null,-1),k.attachListener(k,"mousedown",function(){F=0});if(CKEDITOR.env.ie&&!u){var q;k.attachListener(k,"mousedown",function(a){2==a.data.$.button&&((a=g.document.getSelection())&&a.getType()!= CKEDITOR.SELECTION_NONE||(q=g.window.getScrollPosition()))});k.attachListener(k,"mouseup",function(a){2==a.data.$.button&&q&&(g.document.$.documentElement.scrollLeft=q.x,g.document.$.documentElement.scrollTop=q.y);q=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)m.on("mousedown",function(a){function b(a){a=a.data.$;if(c){var d=n.$.createTextRange();try{d.moveToPoint(a.clientX,a.clientY)}catch(g){}c.setEndPoint(0>e.compareEndPoints("StartToStart",d)?"EndToEnd": "StartToStart",d);c.select()}}function d(){m.removeListener("mousemove",b);h.removeListener("mouseup",d);m.removeListener("mouseup",d);c.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)m.on("mousedown",function(a){a.data.getTarget().is("html")&& -(h.on("mouseup",c),m.on("mouseup",c))})}}k.attachListener(k,"selectionchange",a,g);k.attachListener(k,"keyup",f,g);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){g.forceNextSelectionCheck();g.selectionChange(1)});if(t&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var w;k.attachListener(k,"mousedown",function(){w=1});k.attachListener(e.getDocumentElement(),"mouseup",function(){w&&f.call(g);w=0})}else k.attachListener(CKEDITOR.env.ie?k:e.getDocumentElement(),"mouseup",f,g);CKEDITOR.env.webkit&& -k.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:l(k)}},null,null,-1);k.attachListener(k,"keydown",b(g),null,null,-1)});g.on("setData",function(){g.unlockSelection();CKEDITOR.env.webkit&&c()});g.on("contentDomUnload",function(){g.unlockSelection()});if(CKEDITOR.env.ie9Compat)g.on("beforeDestroy",c,null,null,9);g.on("dataReady",function(){delete g._.fakeSelection;delete g._.hiddenSelectionContainer;g.selectionChange(1)}); +(h.on("mouseup",c),m.on("mouseup",c))})}}k.attachListener(k,"selectionchange",a,g);k.attachListener(k,"keyup",f,g);k.attachListener(k,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){g.forceNextSelectionCheck();g.selectionChange(1)});if(u&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var w;k.attachListener(k,"mousedown",function(){w=1});k.attachListener(e.getDocumentElement(),"mouseup",function(){w&&f.call(g);w=0})}else k.attachListener(CKEDITOR.env.ie?k:e.getDocumentElement(),"mouseup",f,g);CKEDITOR.env.webkit&& +k.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:l(k)}},null,null,-1);k.attachListener(k,"keydown",d(g),null,null,-1)});g.on("setData",function(){g.unlockSelection();CKEDITOR.env.webkit&&c()});g.on("contentDomUnload",function(){g.unlockSelection()});if(CKEDITOR.env.ie9Compat)g.on("beforeDestroy",c,null,null,9);g.on("dataReady",function(){delete g._.fakeSelection;delete g._.hiddenSelectionContainer;g.selectionChange(1)}); g.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=g.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&&(b.remove(),CKEDITOR.env.gecko&&(a=g.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);g.on("key",function(a){if("wysiwyg"==g.mode){var b=g.getSelection();if(b.isFake){var d=r[a.data.keyCode];if(d)return d({editor:g,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady", function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),d=a.getCustomData("cke-fillingChar");d&&(d.getCustomData("ready")?l(a):d.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){l(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=k(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=k(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(b){(b?a:f).call(this)};CKEDITOR.editor.prototype.getSelection= function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var 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=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;var p="function"!=typeof window.getSelection, q=1;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:q++;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,g;if(a)if(a.getRangeAt)c=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer); else{try{g=a.createRange()}catch(e){}c=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.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 w={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},y=CKEDITOR.tools.repeat("​",7),B=new RegExp(y+"( )?","g");CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:k,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:y});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){var a=this._.cache; +select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1},A=CKEDITOR.tools.repeat("​",7),B=new RegExp(A+"( )?","g");CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:k,_createFillingCharSequenceNode:m,FILLING_CHAR_SEQUENCE:A});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){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);"Control"==c&&(b=CKEDITOR.SELECTION_ELEMENT);d.createRange().parentElement()&&(b=CKEDITOR.SELECTION_TEXT)}catch(g){}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;c==d.endContainer&&1==c.nodeType&& 1==d.endOffset-d.startOffset&&w[c.childNodes[d.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=p?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 g=c.children,e,h,f=b.duplicate(),k=0,n=g.length-1,p=-1,l,m;k<=n;)if(p=Math.floor((k+n)/2),e=g[p],f.moveToElementText(e),l=f.compareEndPoints("StartToStart", b),0l)k=p+1;else return{container:c,offset:a(e)};if(-1==p||p==g.length-1&&0>l){f.moveToElementText(c);f.setEndPoint("StartToStart",b);f=f.text.replace(/(\r\n|\r)/g,"\n").length;g=c.childNodes;if(!f)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:c,offset:g.length}:{container:e,offset:e.nodeValue.length};for(c=g.length;0]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+| )/g," ");h=h.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var f=a.getDocument().createElement("div");f.append(e);e.$.outerHTML="\x3cpre\x3e"+h+"\x3c/pre\x3e";e.copyAttributes(f.getFirst());e=f.getFirst().remove()}else e.setHtml(h);b=e}else h?b=v(d?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(c){var d=b,k;(k=d.getPrevious(J))&& +(e=f,e.match=k?"start":"end"):(f.mergeSiblings(),f.is(this.element)?v.call(this,f):p(f,u(this)[f.getName()]))}if(e){f=c;for(h=0;;h++){k=g.elements[h];if(k.equals(e))break;else if(k.match)continue;else k=k.clone();k.append(f);f=k}f["start"==e.match?"insertBefore":"insertAfter"](e)}}else{var n=d.endNode,l=this;b();for(g=c;!g.equals(n);)e=g.getNextSourceNode(),g.type==CKEDITOR.NODE_ELEMENT&&this.checkElementRemovable(g)&&(g.getName()==this.element?v.call(this,g):p(g,u(this)[g.getName()]),e.type==CKEDITOR.NODE_ELEMENT&& +e.contains(c)&&(b(),e=c.getNext())),g=e}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,a.root)).contains(this.element,1))&&!a.isReadOnly()&&A(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 g in b.styles)b.styles.hasOwnProperty(g)&&a.removeStyle(g)}}function k(a){var b=a.createBookmark(!0),c=a.createIterator();c.enforceRealBlocks=!0;this._.enterMode&&(c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR);for(var g,e=a.document,h;g=c.getNextParagraph();)!g.isReadOnly()&&(c.activeFilter?c.activeFilter.check(this):1)&&(h=w(this,e,g),d(g,h));a.moveToBookmark(b)}function b(a){var b=a.createBookmark(1), +c=a.createIterator();c.enforceRealBlocks=!0;c.enlargeBr=this._.enterMode!=CKEDITOR.ENTER_BR;for(var g,e;g=c.getNextParagraph();)this.checkElementRemovable(g)&&(g.is("pre")?((e=this._.enterMode==CKEDITOR.ENTER_BR?null:a.document.createElement(this._.enterMode==CKEDITOR.ENTER_P?"p":"div"))&&g.copyAttributes(e),d(g,e)):v.call(this,g));a.moveToBookmark(b)}function d(a,b){var d=!b;d&&(b=a.getDocument().createElement("div"),a.copyAttributes(b));var c=b&&b.is("pre"),e=a.is("pre"),h=!c&&e;if(c&&!e){e=b;(h= +a.getBogus())&&h.remove();h=a.getHtml();h=n(h,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,"");h=h.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,"$1");h=h.replace(/([ \t\n\r]+| )/g," ");h=h.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var f=a.getDocument().createElement("div");f.append(e);e.$.outerHTML="\x3cpre\x3e"+h+"\x3c/pre\x3e";e.copyAttributes(f.getFirst());e=f.getFirst().remove()}else e.setHtml(h);b=e}else h?b=t(d?[a.getHtml()]:g(a),b):a.moveChildren(b);b.replace(a);if(c){var d=b,k;(k=d.getPrevious(J))&& k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(c=n(k.getHtml(),/\n$/,"")+"\n\n"+n(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+c+"\x3c/pre\x3e":d.setHtml(c),k.remove())}else d&&q(b)}function g(a){var b=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,d){return b+"\x3c/pre\x3e"+d+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,d){b.push(d)});return b}function n(a,b,d){var c="",g="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi, -function(a,b,d){b&&(c=b);d&&(g=d);return""});return c+a.replace(b,d)+g}function v(a,b){var d;1=e?(m=h.createText(""),m.insertAfter(this)):(a=h.createText(""),a.insertAfter(m),a.remove()));return m},substring:function(a,f){return"number"!=typeof f?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a, -f)}}),function(){function a(a,e,h){var f=a.serializable,l=e[h?"endContainer":"startContainer"],k=h?"endOffset":"startOffset",d=f?e.document.getById(a.startNode):a.startNode;a=f?e.document.getById(a.endNode):a.endNode;l.equals(d.getPrevious())?(e.startOffset=e.startOffset-l.getLength()-a.getPrevious().getLength(),l=a.getNext()):l.equals(a.getPrevious())&&(e.startOffset-=l.getLength(),l=a.getNext());l.equals(d.getParent())&&e[k]++;l.equals(a.getParent())&&e[k]++;e[h?"endContainer":"startContainer"]= -l;return e}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),h=[],f;return{getNextRange:function(l){f=void 0===f?0:f+1;var k=a[f];if(k&&1b?-1:1}),e=0,h;eCKEDITOR.env.version?a[k].$.styleSheet.cssText+=f:a[k].$.innerHTML+=f}}var m={};CKEDITOR.skin={path:a,loadPart:function(b,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){c(b,d)}):c(b,d)},getPath:function(a){return CKEDITOR.getUrl(f(a))},icons:{},addIcon:function(a,d,c,e){a= -a.toLowerCase();this.icons[a]||(this.icons[a]={path:d,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,d,c,e,h){var f;a&&(a=a.toLowerCase(),d&&(f=this.icons[a+"-rtl"]),f||(f=this.icons[a]));a=c||f&&f.path||"";e=e||f&&f.offset;h=h||f&&f.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+h+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var c= -e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var b=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof b&&(e=b(this,"editor"),f=b(this,"panel"));a=[[d,a]];h([c],e,a);h(k,f,a)}).call(this,a)}});var l="cke_ui_color",k=[],d=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var c=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=e(a);k.push(a); -var b=c.getUiColor();b&&h([a],CKEDITOR.skin.chameleon(c,"panel"),[[d,b]])}};c.on("panelShow",a);c.on("menuShow",a);c.config.uiColor&&c.setUiColor(c.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"), +f)}}),function(){function a(a,e,h){var f=a.serializable,l=e[h?"endContainer":"startContainer"],k=h?"endOffset":"startOffset",b=f?e.document.getById(a.startNode):a.startNode;a=f?e.document.getById(a.endNode):a.endNode;l.equals(b.getPrevious())?(e.startOffset=e.startOffset-l.getLength()-a.getPrevious().getLength(),l=a.getNext()):l.equals(a.getPrevious())&&(e.startOffset-=l.getLength(),l=a.getNext());l.equals(b.getParent())&&e[k]++;l.equals(a.getParent())&&e[k]++;e[h?"endContainer":"startContainer"]= +l;return e}CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,f)};var f={createIterator:function(){var a=this,e=CKEDITOR.dom.walker.bookmark(),h=[],f;return{getNextRange:function(l){f=void 0===f?0:f+1;var k=a[f];if(k&&1b?-1:1}),h=0,f;hCKEDITOR.env.version?a[k].$.styleSheet.cssText+=f:a[k].$.innerHTML+=f}}var m={};CKEDITOR.skin={path:a,loadPart:function(b,g){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){c(b,g)}):c(b,g)},getPath:function(a){return CKEDITOR.getUrl(f(a))},icons:{},addIcon:function(a,b,c,e){a= +a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:e||"16px"})},getIconStyle:function(a,b,c,e,h){var f;a&&(a=a.toLowerCase(),b&&(f=this.icons[a+"-rtl"]),f||(f=this.icons[a]));a=c||f&&f.path||"";e=e||f&&f.offset;h=h||f&&f.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+e+"px;background-size:"+h+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var c= +e(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var d=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof d&&(e=d(this,"editor"),f=d(this,"panel"));a=[[b,a]];h([c],e,a);h(k,f,a)}).call(this,a)}});var l="cke_ui_color",k=[],b=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var c=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=e(a);k.push(a); +var d=c.getUiColor();d&&h([a],CKEDITOR.skin.chameleon(c,"panel"),[[b,d]])}};c.on("panelShow",a);c.on("menuShow",a);c.config.uiColor&&c.setUiColor(c.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var f=a.getComputedStyle("border-top-color"), c=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!f||f!=c)}catch(e){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,f=0;fl;l++){var k=l,d;d=parseInt(f[l],16);d=("0"+(0>c?0|d*(1+c):0|d+(255-d)*c).toString(16)).slice(-2);f[k]=d}return"#"+f.join("")}}(),f=function(){var a=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');"); +CKEDITOR.skin.ua_dialog="ie,iequirks,ie7,ie8",CKEDITOR.skin.chameleon=function(){var a=function(){return function(a,c){for(var f=a.match(/[^#]./g),l=0;3>l;l++){var k=l,b;b=parseInt(f[l],16);b=("0"+(0>c?0|b*(1+c):0|b+(255-b)*c).toString(16)).slice(-2);f[k]=b}return"#"+f.join("")}}(),f=function(){var a=new CKEDITOR.template("background:#{to};background-image:linear-gradient(to bottom,{from},{to});filter:progid:DXImageTransform.Microsoft.gradient(gradientType\x3d0,startColorstr\x3d'{from}',endColorstr\x3d'{to}');"); return function(c,f){return a.output({from:c,to:f})}}(),c={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ {defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_bottom [{defaultGradient}border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [{defaultGradient}border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [{defaultGradient}outline-color:{defaultBorder};border-top-color:{defaultBorder};] {id} .cke_dialog_tab [{lightGradient}border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [{mediumGradient}] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} .cke_toolgroup [{lightGradient}border-color:{defaultBorder};] {id} a.cke_button_off:hover, {id} a.cke_button_off:focus, {id} a.cke_button_off:active [{mediumGradient}] {id} .cke_button_on [{ckeButtonOn}] {id} .cke_toolbar_separator [background-color: {ckeToolbarSeparator};] {id} .cke_combo_button [border-color:{defaultBorder};{lightGradient}] {id} a.cke_combo_button:hover, {id} a.cke_combo_button:focus, {id} .cke_combo_on a.cke_combo_button [border-color:{defaultBorder};{mediumGradient}] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover, {id} a.cke_path_item:focus, {id} a.cke_path_item:active [background-color:{elementsPathBg};] {id}.cke_panel [border-color:{defaultBorder};] "), panel:new CKEDITOR.template(".cke_panel_grouptitle [{lightGradient}border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:focus.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:focus.cke_colorauto, a:focus.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; return function(e,h){var m=e.uiColor,m={id:"."+e.id,defaultBorder:a(m,-.1),defaultGradient:f(a(m,.9),m),lightGradient:f(a(m,1),a(m,.7)),mediumGradient:f(a(m,.8),a(m,.5)),ckeButtonOn:f(a(m,.6),a(m,.7)),ckeResizer:a(m,-.4),ckeToolbarSeparator:a(m,.5),ckeColorauto:a(m,.8),dialogBody:a(m,.7),dialogTabSelected:f("#FFFFFF","#FFFFFF"),dialogTabSelectedBorder:"#FFF",elementsPathColor:a(m,-.6),elementsPathBg:m,menubuttonIcon:a(m,.5),menubuttonIconHover:a(m,.3)};return c[h].output(m).replace(/\[/g,"{").replace(/\]/g, -"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],c=1;carguments.length)){var h=a.call(this,b);h.labelId=CKEDITOR.tools.getNextId()+ -"_label";this._.children=[];var f={role:b.role||"presentation"};b.includeLabel&&(f["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,d,b,c,"div",null,f,function(){var a=[],c=b.required?" cke_required":"";"horizontal"!=b.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e",b.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', -b.controlStyle?' style\x3d"'+b.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,d,b),"\x3c/div\x3e"):(c={type:"hbox",widths:b.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(b.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(b.controlStyle?' style\x3d"'+b.controlStyle+ -'"':"")+"\x3e"+e.call(this,d,b)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(d,c,a));return a.join("")})}},textInput:function(d,b,c){if(!(3>arguments.length)){a.call(this,b);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+b.type,id:e,type:b.type};b.validate&&(this.validate=b.validate);b.maxLength&&(h.maxlength=b.maxLength);b.size&&(h.size=b.size);b.inputStyle&&(h.style=b.inputStyle);var f=this,l=!1;d.on("load",function(){f.getInputElement().on("keydown", -function(a){13==a.data.getKeystroke()&&(l=!0)});f.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(d.getButton("ok")&&setTimeout(function(){d.getButton("ok").click()},0),l=!1);f.bidi&&k.call(f,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',b.type,'" role\x3d"presentation"'];b.width&&a.push('style\x3d"width:'+b.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&& -(h["aria-required"]=this._.required);for(var d in h)a.push(d+'\x3d"'+h[d]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(d,b,c){if(!(3>arguments.length)){a.call(this,b);var e=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",f={};b.validate&&(this.validate=b.validate);f.rows=b.rows||5;f.cols=b.cols||20;f["class"]="cke_dialog_ui_input_textarea "+(b["class"]||"");"undefined"!=typeof b.inputStyle&&(f.style=b.inputStyle);b.dir&&(f.dir=b.dir);if(e.bidi)d.on("load", -function(){e.getInputElement().on("keyup",k)},e);CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){f["aria-labelledby"]=this._.labelId;this._.required&&(f["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 f)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(f[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(d, -b,c){if(!(3>arguments.length)){var e=a.call(this,b,{"default":!!b["default"]});b.validate&&(this.validate=b.validate);CKEDITOR.ui.dialog.uiElement.call(this,d,b,c,"span",null,null,function(){var a=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(a);b["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); -e.checkbox=new CKEDITOR.ui.dialog.uiElement(d,a,c,"input",null,h);c.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(b.labelStyle?' style\x3d"'+b.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(b.label),"\x3c/label\x3e");return c.join("")})}},radio:function(d,b,c){if(!(3>arguments.length)){a.call(this,b);this._["default"]||(this._["default"]=this._.initValue=b.items[0][1]);b.validate&&(this.validate=b.validate);var e=[],h=this;b.role="radiogroup";b.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, -d,b,c,function(){for(var a=[],c=[],g=(b.id?b.id:CKEDITOR.tools.getNextId())+"_radio",f=0;farguments.length)){var e=a.call(this,b);b.validate&&(this.validate=b.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){var a=CKEDITOR.tools.extend({},b,{id:b.id?b.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],g=[],h={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_', -b.type,'" role\x3d"presentation"');b.width&&c.push('style\x3d"width:'+b.width+'" ');c.push("\x3e");void 0!==b.size&&(h.size=b.size);void 0!==b.multiple&&(h.multiple=b.multiple);l(a);for(var f=0,k;farguments.length)){void 0===b["default"]&&(b["default"]="");var e=CKEDITOR.tools.extend(a.call(this,b),{definition:b,buttons:[]});b.validate&&(this.validate=b.validate);d.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,d,b,c,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', -e.frameId,'" title\x3d"',b.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(d,b,c){var e=this;if(!(3>arguments.length)){a.call(this,b);b.validate&&(this.validate=b.validate);var h=CKEDITOR.tools.extend({},b),f=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(a){var c= -b["for"];f&&!1===f.call(this,a)||(d.getContentElement(c[0],c[1]).submit(),this.disable())};d.on("load",function(){d.getContentElement(b["for"][0],b["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,d,h,c)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,h,f){if(!(3>arguments.length)){var k=[],p=h.html;"\x3c"!=p.charAt(0)&&(p="\x3cspan\x3e"+p+"\x3c/span\x3e");var l=h.focus;if(l){var m=this.focus;this.focus=function(){("function"== -typeof l?l:m).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(a);p=p.match(b)||["","",""];c.test(p[1])&&(p[1]=p[1].slice(0,-1),p[2]="/"+p[2]);f.push([p[1]," ",k[1]||"",p[2]].join(""))}}}(),fieldset:function(a,b,c,e,h){var f=h.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,h,e,"fieldset",null,null,function(){var a=[];f&&a.push("\x3clegend"+ -(h.labelStyle?' style\x3d"'+h.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;bb.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a= +"}")}}(),CKEDITOR.plugins.add("dialogui",{onLoad:function(){var a=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var d=[this._],c=1;carguments.length)){var h=a.call(this,d);h.labelId=CKEDITOR.tools.getNextId()+ +"_label";this._.children=[];var f={role:d.role||"presentation"};d.includeLabel&&(f["aria-labelledby"]=h.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,d,c,"div",null,f,function(){var a=[],c=d.required?" cke_required":"";"horizontal"!=d.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" ',' id\x3d"'+h.labelId+'"',h.inputId?' for\x3d"'+h.inputId+'"':"",(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",d.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', +d.controlStyle?' style\x3d"'+d.controlStyle+'"':"",' role\x3d"presentation"\x3e',e.call(this,b,d),"\x3c/div\x3e"):(c={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+c+'" id\x3d"'+h.labelId+'" for\x3d"'+h.inputId+'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(d.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(d.controlStyle?' style\x3d"'+d.controlStyle+ +'"':"")+"\x3e"+e.call(this,b,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,c,a));return a.join("")})}},textInput:function(b,d,c){if(!(3>arguments.length)){a.call(this,d);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+d.type,id:e,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(h.maxlength=d.maxLength);d.size&&(h.size=d.size);d.inputStyle&&(h.style=d.inputStyle);var f=this,l=!1;b.on("load",function(){f.getInputElement().on("keydown", +function(a){13==a.data.getKeystroke()&&(l=!0)});f.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),l=!1);f.bidi&&k.call(f,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',d.type,'" role\x3d"presentation"'];d.width&&a.push('style\x3d"width:'+d.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&& +(h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(b,d,c){if(!(3>arguments.length)){a.call(this,d);var e=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",f={};d.validate&&(this.validate=d.validate);f.rows=d.rows||5;f.cols=d.cols||20;f["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(f.style=d.inputStyle);d.dir&&(f.dir=d.dir);if(e.bidi)b.on("load", +function(){e.getInputElement().on("keyup",k)},e);CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){f["aria-labelledby"]=this._.labelId;this._.required&&(f["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 f)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(f[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, +d,c){if(!(3>arguments.length)){var e=a.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,d,c,"span",null,null,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),c=[],g=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":g};l(a);d["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); +e.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,c,"input",null,h);c.push(' \x3clabel id\x3d"',g,'" for\x3d"',h.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return c.join("")})}},radio:function(b,d,c){if(!(3>arguments.length)){a.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var e=[],h=this;d.role="radiogroup";d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, +b,d,c,function(){for(var a=[],c=[],g=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",f=0;farguments.length)){var e=a.call(this,d);d.validate&&(this.validate=d.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){var a=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),c=[],g=[],h={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};c.push('\x3cdiv class\x3d"cke_dialog_ui_input_', +d.type,'" role\x3d"presentation"');d.width&&c.push('style\x3d"width:'+d.width+'" ');c.push("\x3e");void 0!==d.size&&(h.size=d.size);void 0!==d.multiple&&(h.multiple=d.multiple);l(a);for(var f=0,k;farguments.length)){void 0===d["default"]&&(d["default"]="");var e=CKEDITOR.tools.extend(a.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);b.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,d,c,function(){e.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var a=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', +e.frameId,'" title\x3d"',d.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,d,c){var e=this;if(!(3>arguments.length)){a.call(this,d);d.validate&&(this.validate=d.validate);var h=CKEDITOR.tools.extend({},d),f=h.onClick;h.className=(h.className?h.className+" ":"")+"cke_dialog_ui_button";h.onClick=function(a){var c= +d["for"];f&&!1===f.call(this,a)||(b.getContentElement(c[0],c[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(d["for"][0],d["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,h,c)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,d=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,c=/\/$/;return function(e,h,f){if(!(3>arguments.length)){var k=[],p=h.html;"\x3c"!=p.charAt(0)&&(p="\x3cspan\x3e"+p+"\x3c/span\x3e");var l=h.focus;if(l){var m=this.focus;this.focus=function(){("function"== +typeof l?l:m).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(a);p=p.match(d)||["","",""];c.test(p[1])&&(p[1]=p[1].slice(0,-1),p[2]="/"+p[2]);f.push([p[1]," ",k[1]||"",p[2]].join(""))}}}(),fieldset:function(a,d,c,e,h){var f=h.label;this._={children:d};CKEDITOR.ui.dialog.uiElement.call(this,a,h,e,"fieldset",null,null,function(){var a=[];f&&a.push("\x3clegend"+ +(h.labelStyle?' style\x3d"'+h.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;bd.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(d):d.getChild(0).$.nodeValue=a;return this},getLabel:function(){var a= CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:h},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var a=this.getElement();a&&a.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")},isVisible:function(){return this.getElement().getFirst().isVisible()}, -isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(a,b){this.on("click",function(){b.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, -focus:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&b.$.focus()},0)},select:function(){var a=this.selectParentTab();setTimeout(function(){var b=a.getInputElement();b&&(b.$.focus(),b.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(a){if(this.bidi){var b=a&&a.charAt(0);(b="‪"==b?"ltr":"‫"==b?"rtl":null)&&(a=a.slice(1));this.setDirectionMarker(b)}a||(a="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, -getValue:function(){var a=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&a){var b=this.getDirectionMarker();b&&(a=("ltr"==b?"‪":"‫")+a)}return a},setDirectionMarker:function(a){var b=this.getInputElement();a?b.setAttributes({dir:a,"data-cke-dir-marker":a}):this.getDirectionMarker()&&b.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},e,!0);CKEDITOR.ui.dialog.textarea.prototype= -new CKEDITOR.ui.dialog.textInput;CKEDITOR.ui.dialog.select.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return this._.select.getElement()},add:function(a,b,c){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),h=this.getInputElement().$;e.$.text=a;e.$.value=void 0===b||null===b?a:b;void 0===c||null===c?CKEDITOR.env.ie?h.add(e.$):h.add(e.$,null):h.add(e.$,c);return this},remove:function(a){this.getInputElement().$.remove(a); -return this},clear:function(){for(var a=this.getInputElement().$;0b-a;d--)if(this._.tabs[this._.tabIdList[d%a]][0].$.offsetHeight)return this._.tabIdList[d%a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),d=b+1;dn.width-k.width-h?n.width-k.width+("rtl"==e.lang.dir?0:f[1]):g.x,g.y+f[0]n.height-k.height-h?n.height-k.height+f[2]:g.y,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove", -b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=A.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,g=null,e=a.getParentEditor(),h=e.config.dialog_magnetDistance,f=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(e){c={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);g=a.getPosition();if(CKEDITOR.env.ie6Compat){var h= -A.getChild(0).getFrameDocument();h.on("mousemove",b);h.on("mouseup",d)}e.data.preventDefault()},a)}function g(a){function b(d){var p="rtl"==e.lang.dir,m=l.width,q=l.height,r=m+(d.data.$.screenX-n.x)*(p?-1:1)*(a._.moved?1:2),w=q+(d.data.$.screenY-n.y)*(a._.moved?1:2),t=a._.element.getFirst(),t=p&&t.getComputedStyle("right"),u=a.getPosition();u.y+w>k.height&&(w=k.height-u.y);(p?t:u.x)+r>k.width&&(r=k.width-(p?t:u.x));if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)m=Math.max(c.minWidth|| -0,r-h);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(c.minHeight||0,w-f);a.resize(m,q);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);p&&(p.remove(),p=null);if(CKEDITOR.env.ie6Compat){var a=A.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,g=c.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(), +b)})}function b(a,b){this._={dialog:a};CKEDITOR.tools.extend(this,b)}function d(a){function b(d){var k=a.getSize(),n=CKEDITOR.document.getWindow().getViewPaneSize(),l=d.data.$.screenX,p=d.data.$.screenY,m=l-c.x,q=p-c.y;c={x:l,y:p};g.x+=m;g.y+=q;a.move(g.x+f[3]n.width-k.width-h?n.width-k.width+("rtl"==e.lang.dir?0:f[1]):g.x,g.y+f[0]n.height-k.height-h?n.height-k.height+f[2]:g.y,1);d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mousemove", +b);CKEDITOR.document.removeListener("mouseup",d);if(CKEDITOR.env.ie6Compat){var a=y.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",d)}}var c=null,g=null,e=a.getParentEditor(),h=e.config.dialog_magnetDistance,f=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof h&&(h=20);a.parts.title.on("mousedown",function(e){c={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);g=a.getPosition();if(CKEDITOR.env.ie6Compat){var h= +y.getChild(0).getFrameDocument();h.on("mousemove",b);h.on("mouseup",d)}e.data.preventDefault()},a)}function g(a){function b(d){var p="rtl"==e.lang.dir,m=l.width,q=l.height,r=m+(d.data.$.screenX-n.x)*(p?-1:1)*(a._.moved?1:2),w=q+(d.data.$.screenY-n.y)*(a._.moved?1:2),u=a._.element.getFirst(),u=p&&u.getComputedStyle("right"),v=a.getPosition();v.y+w>k.height&&(w=k.height-v.y);(p?u:v.x)+r>k.width&&(r=k.width-(p?u:v.x));if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)m=Math.max(c.minWidth|| +0,r-h);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(c.minHeight||0,w-f);a.resize(m,q);a._.moved||a.layout();d.data.preventDefault()}function d(){CKEDITOR.document.removeListener("mouseup",d);CKEDITOR.document.removeListener("mousemove",b);p&&(p.remove(),p=null);if(CKEDITOR.env.ie6Compat){var a=y.getChild(0).getFrameDocument();a.removeListener("mouseup",d);a.removeListener("mousemove",b)}}var c=a.definition,g=c.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var e=a.getParentEditor(), h,f,k,n,l,p,m=CKEDITOR.tools.addFunction(function(c){l=a.getSize();var g=a.parts.contents;g.$.getElementsByTagName("iframe").length&&(p=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),g.append(p));f=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));h=l.width-a.parts.contents.getSize("width",1);n={x:c.screenX,y:c.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize(); -CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(g=A.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",d));c.preventDefault&&c.preventDefault()});a.on("load",function(){var b="";g==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":g==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+ -'" onmousedown\x3d"CKEDITOR.tools.callFunction('+m+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(m)})}}function n(a){a.data.preventDefault(1)}function v(a){var b=CKEDITOR.document.getWindow(),d=a.config,c=d.dialog_backgroundCoverColor||"white",g=d.dialog_backgroundCoverOpacity,e=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(c,g,e),h=D[d];h?h.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat? +CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",d);CKEDITOR.env.ie6Compat&&(g=y.getChild(0).getFrameDocument(),g.on("mousemove",b),g.on("mouseup",d));c.preventDefault&&c.preventDefault()});a.on("load",function(){var b="";g==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":g==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+b+" cke_resizer_"+e.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(e.lang.common.resize)+ +'" onmousedown\x3d"CKEDITOR.tools.callFunction('+m+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(m)})}}function n(a){a.data.preventDefault(1)}function t(a){var b=CKEDITOR.document.getWindow(),d=a.config,c=d.dialog_backgroundCoverColor||"white",g=d.dialog_backgroundCoverOpacity,e=d.baseFloatZIndex,d=CKEDITOR.tools.genKey(c,g,e),h=D[d];h?h.show():(e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat? "absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+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",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+ -c+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),h=CKEDITOR.dom.element.createFromHtml(e.join("")),h.setOpacity(void 0!==g?g:.5),h.on("keydown",n),h.on("keypress",n),h.on("keyup",n),h.appendTo(CKEDITOR.document.getBody()),D[d]=h);a.focusManager.add(h);A=h;a=function(){var a=b.getViewPaneSize();h.setStyles({width:a.width+"px",height:a.height+ -"px"})};var f=function(){var a=b.getScrollPosition(),d=CKEDITOR.dialog._.currentTop;h.setStyles({left:a.x+"px",top:a.y+"px"});if(d){do a=d.getPosition(),d.move(a.x,a.y);while(d=d._.parentDialog)}};x=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||h.focus();if(CKEDITOR.env.ie6Compat){var k=function(){f();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){};window.onscroll=k},0);f()}}function u(a){A&&(a.focusManager.remove(A), -a=CKEDITOR.document.getWindow(),A.hide(),a.removeListener("resize",x),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),x=null)}var r=CKEDITOR.tools.cssLength,p='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; -CKEDITOR.dialog=function(d,c){function k(){var a=D._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,d=0;db.length)){var d=D._.currentFocusIndex;D._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var g=d,e=1b.length)){var d=D._.currentFocusIndex;D._.tabBarMode&&0>a&&(d=0);try{b[d].getInputElement().$.blur()}catch(c){}var g=d,e=1d.height|| b.width+(0d.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:c,this._.moved?this._.position.y:g)},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=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(),setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})}, commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility","hidden");for(J(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide(); -if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else u(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",C);a.removeListener("keyup",G);var d=this._.editor;d.focus();setTimeout(function(){d.focusManager.unlock();CKEDITOR.env.iOS&&d.window.focus()},0)}delete this._.parentDialog; +if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",C);a.removeListener("keyup",G);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)+'"':"",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),g=this._.contents[a.id]={},e=c.getChild(), h=0;c=e.shift();)c.notAllowed||"hbox"==c.type||"vbox"==c.type||h++,g[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");c=CKEDITOR.env;g="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();d=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"',0arguments.length)){var f=(c.call?c(b):c)||"div", k=["\x3c",f," "],n=(g&&g.call?g(b):g)||{},l=(e&&e.call?e(b):e)||{},p=(h&&h.call?h.call(this,a,b):h)||"",m=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(n.display="none",this.notAllowed=!0);l.id=m;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]=1);b.disabled&&(q.cke_disabled=1);for(var r=l["class"]&&l["class"].split?l["class"].split(" "):[],m=0;ml.length&&(c=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),k=m.shift(),h.insertNode(c),c.append(new CKEDITOR.dom.text("",a.document)),h.moveToBookmark(k),h.selectNodeContents(c),h.collapse(!0),k=h.createBookmark(),l.push(c),m.unshift(k));d=l[0].getParent();h=[];for(k=0;kl.length&&(c=a.document.createElement(a.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),k=m.shift(),h.insertNode(c),c.append(new CKEDITOR.dom.text("",a.document)),h.moveToBookmark(k),h.selectNodeContents(c),h.collapse(!0),k=h.createBookmark(),l.push(c),m.unshift(k));b=l[0].getParent();h=[];for(k=0;k]+data-cke-bookmark[^<]*?<\/span>/ig, -"");e&&a(b,c)})}function D(){if("wysiwyg"==b.mode){var a=A("paste");b.getCommand("cut").setState(A("cut"));b.getCommand("copy").setState(A("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function A(a){if(E&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var z=CKEDITOR.plugins.clipboard, -C=0,G=0,E=0;(function(){b.on("key",t);b.on("contentDom",d);b.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly();D()});b.contextMenu&&b.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:A("cut"),copy:A("copy"),paste:A("paste")}})})();(function(){function a(d,c,e,h,f){var k=b.lang.clipboard[c];b.addCommand(c,e);b.ui.addButton&&b.ui.addButton(d,{label:k,command:c,toolbar:"clipboard,"+h});b.addMenuItems&&b.addMenuItem(c,{label:k,command:c, +"");e&&a(b,c)})}function D(){if("wysiwyg"==b.mode){var a=y("paste");b.getCommand("cut").setState(y("cut"));b.getCommand("copy").setState(y("copy"));b.getCommand("paste").setState(a);b.fire("pasteState",a)}}function y(a){if(E&&a in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==a)return CKEDITOR.TRISTATE_OFF;a=b.getSelection();var d=a.getRanges();return a.getType()==CKEDITOR.SELECTION_NONE||1==d.length&&d[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var z=CKEDITOR.plugins.clipboard, +C=0,G=0,E=0;(function(){b.on("key",u);b.on("contentDom",d);b.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly();D()});b.contextMenu&&b.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:y("cut"),copy:y("copy"),paste:y("paste")}})})();(function(){function a(d,c,e,h,f){var k=b.lang.clipboard[c];b.addCommand(c,e);b.ui.addButton&&b.ui.addButton(d,{label:k,command:c,toolbar:"clipboard,"+h});b.addMenuItems&&b.addMenuItem(c,{label:k,command:c, group:"clipboard",order:f})}a("Cut","cut",c("cut"),10,1);a("Copy","copy",c("copy"),20,4);a("Paste","paste",e(),30,8)})();b.getClipboardData=function(a,d){function c(a){a.removeListener();a.cancel();d(a.data)}function e(a){a.removeListener();a.cancel();n=!0;d({type:k,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}function h(){this.customTitle=a&&a.title}var f=!1,k="auto",n=!1;d||(d=a,a=null);b.on("paste",c,null,null,0);b.on("beforePaste",function(a){a.removeListener(); f=!0;k=a.data.type},null,null,1E3);!1===B()&&(b.removeListener("paste",c),f&&b.fire("pasteDialog",h)?(b.on("pasteDialogCommit",e),b.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",e);setTimeout(function(){n||d(null)},10)})):d(null))}}function c(a){if(CKEDITOR.env.webkit){if(!a.match(/^[^<]*$/g)&&!a.match(/^(
<\/div>|
[^<]*<\/div>)*$/gi))return"html"}else if(CKEDITOR.env.ie){if(!a.match(/^([^<]|)*$/gi)&&!a.match(/^(

([^<]|)*<\/p>|(\r\n))*$/gi))return"html"}else if(CKEDITOR.env.gecko){if(!a.match(/^([^<]|)*$/gi))return"html"}else return"html"; return"htmlifiedtext"}function e(a,b){function d(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
|)<\/div>)(?!$|(

(
|)<\/div>))/g,"\x3cbr\x3e").replace(/^(
(
|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"), b.match(/
(
|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(
(
|)<\/div>)+/g,function(a){return d(a.split("\x3c/div\x3e\x3cdiv\x3e").length+1)})+"\x3c/p\x3e"),b=b.replace(/<\/div>
/g,"\x3cbr\x3e"),b=b.replace(/<\/?div>/g,""));CKEDITOR.env.gecko&&a.enterMode!=CKEDITOR.ENTER_BR&&(CKEDITOR.env.gecko&&(b=b.replace(/^

$/,"\x3cbr\x3e")),-1){2,}/g,function(a){return d(a.length/4)})+"\x3c/p\x3e"));return l(a,b)}function h(){function a(){var b= {},d;for(d in CKEDITOR.dtd)"$"!=d.charAt(0)&&"div"!=d&&"span"!=d&&(b[d]=1);return b}var b={};return{get:function(d){return"plain-text"==d?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==d?((d=b.semanticContent)||(d=new CKEDITOR.filter,d.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),d=b.semanticContent=d),d):d?new CKEDITOR.filter(d):null}}}function m(a,b,d){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var c=new CKEDITOR.htmlParser.basicWriter;d.applyTo(b,!0,!1, -a.activeEnterMode);b.writeHtml(c);return c.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function k(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function d(b){var d=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(d,e,h){e.select();a(b,{dataTransfer:h, +a.activeEnterMode);b.writeHtml(c);return c.getHtml()}function l(a,b){a.enterMode==CKEDITOR.ENTER_BR?b=b.replace(/(<\/p>

)+/g,function(a){return CKEDITOR.tools.repeat("\x3cbr\x3e",a.length/7*2)}).replace(/<\/?p>/g,""):a.enterMode==CKEDITOR.ENTER_DIV&&(b=b.replace(/<(\/)?p>/g,"\x3c$1div\x3e"));return b}function k(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function b(b){var d=CKEDITOR.plugins.clipboard;b.on("contentDom",function(){function c(d,e,h){e.select();a(b,{dataTransfer:h, method:"drop"},1);h.sourceEditor.fire("saveSnapshot");h.sourceEditor.editable().extractHtmlFromRange(d);h.sourceEditor.getSelection().selectRanges([d]);h.sourceEditor.fire("saveSnapshot")}function e(c,h){c.select();a(b,{dataTransfer:h,method:"drop"},1);d.resetDragDataTransfer()}function h(a,d,c){var e={$:a.data.$,target:a.data.getTarget()};d&&(e.dragRange=d);c&&(e.dropRange=c);!1===b.fire(a.name,e)&&a.data.preventDefault()}function f(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} var k=b.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(b),m=b.ui.space("top"),B=b.ui.space("bottom");d.preventDefaultDropOnElement(m);d.preventDefaultDropOnElement(B);k.attachListener(l,"dragstart",h);k.attachListener(b,"dragstart",d.resetDragDataTransfer,d,null,1);k.attachListener(b,"dragstart",function(a){d.initDragDataTransfer(a,b)},null,null,2);k.attachListener(b,"dragstart",function(){var a=d.dragRange=b.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(d.dragStartContainerChildCount= a?f(a.startContainer):null,d.dragEndContainerChildCount=a?f(a.endContainer):null)},null,null,100);k.attachListener(l,"dragend",h);k.attachListener(b,"dragend",d.initDragDataTransfer,d,null,1);k.attachListener(b,"dragend",d.resetDragDataTransfer,d,null,100);k.attachListener(l,"dragover",function(a){var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}); k.attachListener(l,"drop",function(a){if(!a.data.$.defaultPrevented){a.data.preventDefault();var c=a.data.getTarget();if(!c.isReadOnly()||c.type==CKEDITOR.NODE_ELEMENT&&c.is("html")){var c=d.getRangeAtDropPosition(a,b),e=d.dragRange;c&&h(a,e,c)}}},null,null,9999);k.attachListener(b,"drop",d.initDragDataTransfer,d,null,1);k.attachListener(b,"drop",function(a){if(a=a.data){var h=a.dropRange,f=a.dragRange,k=a.dataTransfer;k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){d.internalDrop(f, -h,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,h,k):e(h,k)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var b,k=h();a.config.forcePasteAsPlainText?b="plain-text":a.config.pasteFilter?b=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(b="semantic-content");a.pasteFilter=k.get(b);f(a);d(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));a.on("paste",function(b){b.data.dataTransfer|| +h,k,b)},0):k.getTransferType(b)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,h,k):e(h,k)}},null,null,9999)})}CKEDITOR.plugins.add("clipboard",{requires:"dialog",init:function(a){var d,k=h();a.config.forcePasteAsPlainText?d="plain-text":a.config.pasteFilter?d=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(d="semantic-content");a.pasteFilter=k.get(d);f(a);b(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));a.on("paste",function(b){b.data.dataTransfer|| (b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var d=b.data.dataTransfer,c=d.getData("text/html");if(c)b.data.dataValue=c,b.data.type="html";else if(c=d.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(c),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue,d=CKEDITOR.dtd.$block;-1 <\/span>/gi," "),"html"!=a.data.type&&(b=b.replace(/]*>([^<]*)<\/span>/gi, function(a,b){return b.replace(/\t/g,"\x26nbsp;\x26nbsp; \x26nbsp;")})),-1/,"")),b=b.replace(/(<[^>]+) class="Apple-[^"]*"/gi,"$1"));if(b.match(/^<[^<]+cke_(editable|contents)/i)){var c,g,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(c=e.getFirst())&&c.type==CKEDITOR.NODE_ELEMENT&&(c.hasClass("cke_editable")|| c.hasClass("cke_contents"));)e=g=c;g&&(b=g.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,c){return c.toLowerCase()in d?(a.data.preSniffing="html","\x3c"+c):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,c){return c in d?(a.data.endsWithEOL=1,"\x3c/"+c+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);a.on("paste",function(b){b=b.data;var d=b.type,h=b.dataValue,f,l=a.config.clipboard_defaultContentType|| @@ -615,133 +615,133 @@ b.startContainer.getChild(b.startOffset-1),d=b.startContainer.getChild(b.startOf a.endOffset<=c||a.startContainer.getParent().equals(d)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(b,d,h.dragStartContainerChildCount,h.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(b,d))||(k=b.createBookmark(!1)); h=d.clone().createBookmark(!1);l&&(k=b.createBookmark(!1));b=k.startNode;d=k.endNode;l=h.startNode;d&&b.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&d.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(b);b=e.createRange();b.moveToBookmark(k);f.extractHtmlFromRange(b,1);d=e.createRange();d.moveToBookmark(h);a(e,{dataTransfer:c,method:"drop",range:d},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var d=a.data.$,c=d.clientX,e=d.clientY,h=b.getSelection(!0).getRanges()[0],f= b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint)d=b.document.$.caretRangeFromPoint(c,e),f.setStart(CKEDITOR.dom.node(d.startContainer),d.startOffset),f.collapse(!0);else if(d.rangeParent)f.setStart(CKEDITOR.dom.node(d.rangeParent),d.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8l&& -!k;l++){if(!k)try{d.moveToPoint(c,e-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(c,e+l),k=!0}catch(t){}}if(k){var x="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+x+'"\x3e​\x3c/span\x3e');var D=b.document.getById(x);f.moveToPosition(D,CKEDITOR.POSITION_BEFORE_START);D.remove()}else{var A=b.document.$.elementFromPoint(c,e),z=new CKEDITOR.dom.element(A),C;if(z.equals(b.editable())||"html"==z.getName())return h&&h.startContainer&&!h.startContainer.equals(b.editable())?h:null;C=z.getClientRect(); +!k;l++){if(!k)try{d.moveToPoint(c,e-l),k=!0}catch(m){}if(!k)try{d.moveToPoint(c,e+l),k=!0}catch(u){}}if(k){var x="cke-temp-"+(new Date).getTime();d.pasteHTML('\x3cspan id\x3d"'+x+'"\x3e​\x3c/span\x3e');var D=b.document.getById(x);f.moveToPosition(D,CKEDITOR.POSITION_BEFORE_START);D.remove()}else{var y=b.document.$.elementFromPoint(c,e),z=new CKEDITOR.dom.element(y),C;if(z.equals(b.editable())||"html"==z.getName())return h&&h.startContainer&&!h.startContainer.equals(b.editable())?h:null;C=z.getClientRect(); c/i,bodyRegExp:/([\s\S]*)<\/body>/i, -fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(b);this.id||(this.id="Text"==b?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=b)try{this.$.setData(b,this.id)}catch(c){}d&&(this.sourceEditor=d,this.setData("text/html",d.getSelectedHtml(1)),"Text"==b||this.getData("text/plain")||this.setData("text/plain",d.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL= +a&&a.data&&a.data.$){var d=new this.dataTransfer(a.data.$.clipboardData,b);this.copyCutData&&d.id==this.copyCutData.id?(d=this.copyCutData,d.$=a.data.$.clipboardData):this.copyCutData=d;return d}return new this.dataTransfer(null,b)},preventDefaultDropOnElement:function(a){a&&a.on("dragover",k)}};var d=CKEDITOR.plugins.clipboard.isCustomDataTypesSupported?"cke/id":"Text";CKEDITOR.plugins.clipboard.dataTransfer=function(a,b){a&&(this.$=a);this._={metaRegExp:/^/i,bodyRegExp:/([\s\S]*)<\/body>/i, +fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this.id=this.getData(d);this.id||(this.id="Text"==d?"":"cke-"+CKEDITOR.tools.getUniqueId());if("Text"!=d)try{this.$.setData(d,this.id)}catch(c){}b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==d||this.getData("text/plain")||this.setData("text/plain",b.getSelection().getSelectedText()))};CKEDITOR.DATA_TRANSFER_INTERNAL= 1;CKEDITOR.DATA_TRANSFER_CROSS_EDITORS=2;CKEDITOR.DATA_TRANSFER_EXTERNAL=3;CKEDITOR.plugins.clipboard.dataTransfer.prototype={getData:function(a){a=this._.normalizeType(a);var b=this._.data[a];if(void 0===b||null===b||""===b)try{b=this.$.getData(a)}catch(d){}if(void 0===b||null===b||""===b)b="";"text/html"==a?(b=b.replace(this._.metaRegExp,""),(a=this._.bodyRegExp.exec(b))&&a.length&&(b=a[1],b=b.replace(this._.fragmentRegExp,""))):"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"==b.substring(0, -7)&&(b="");return b},setData:function(a,d){a=this._.normalizeType(a);this._.data[a]=d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==b&&"Text"==a&&(this.id=d);try{this.$.setData(a,d)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(d){d=b._.normalizeType(d);var c=b.getData(d);c&&(b._.data[d]= +7)&&(b="");return b},setData:function(a,b){a=this._.normalizeType(a);this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a){"Text"==d&&"Text"==a&&(this.id=b);try{this.$.setData(a,b)}catch(c){}}},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(d){d=b._.normalizeType(d);var c=b.getData(d);c&&(b._.data[d]= c)}if(this.$){var b=this,d,c;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(d=0;de?q+e:c.width>e?q-a.left:q-a.right+c.width):he?q-e:c.width>e?q-a.right+c.width:q-a.left);e=a.top;c.height-a.topg?w-g:c.height>g?w-a.bottom+c.height:w-a.top);CKEDITOR.env.ie&&(c=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==c.getName()&& -(c=c.getDocument().getBody()),"rtl"==c.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*n.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:w+"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();b.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused|| +CKEDITOR.tools.setTimeout(b,0,this)):b.call(this))},this),g.on("focus",function(){this._.focused=!0;this.hideChild();this.allowBlur(!0)},this),CKEDITOR.env.iOS&&(g.on("touchstart",function(){clearTimeout(this._.hideTimeout)},this),g.on("touchend",function(){this._.hideTimeout=0;this.focus()},this)),CKEDITOR.event.useCapture=!1,this._.blurSet=1);b.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(d.autoSize){var c=d.element.getDocument(),c=(CKEDITOR.env.webkit||CKEDITOR.env.edge?d.element:c.getBody()).$.scrollWidth;CKEDITOR.env.ie&&CKEDITOR.env.quirks&&0e?q+e:c.width>e?q-a.left:q-a.right+c.width):he?q-e:c.width>e?q-a.right+c.width:q-a.left);e=a.top;c.height-a.topg?w-g:c.height>g?w-a.bottom+c.height:w-a.top);CKEDITOR.env.ie&&(c=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==c.getName()&& +(c=c.getDocument().getBody()),"rtl"==c.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*n.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:w+"px",left:q+"px"});n.setOpacity(1);k&&k()},this);b.isLoaded?a():b.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y; +this.focus();d.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused|| this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a=this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(), a.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var e=this._.panel;void 0!==a&&(e.allowBlur=a);return e.allowBlur},showAsChild:function(a,e,h,f,l,k){if(this._.activeChild!=a||a._.panel._.offsetParentId!=h.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(e,h,f,l,k),this.blur(), (CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(a){var e=this._.activeChild;e&&(delete e.onHide,delete this._.activeChild,e.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),e;for(e in f){var h=f[e];a?h.destroy():h.element.hide()}a&&(f={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(a){for(var f=a.config.menu_groups.split(","), c=a._.menuGroups={},e=a._.menuItems={},h=0;hc.group?1:a.orderc.order?1:0})}var f='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1"_cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked}'; CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(f+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),c=CKEDITOR.addTemplate("menuItem",f+'\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e'), e=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,c){c=this._.definition=c||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=c.level||1;var e=CKEDITOR.tools.extend({},c.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),f=e.block.attributes=e.attributes||{};!f.role&&(f.role="menu");this._.panelDefinition= -e},_:{onShow:function(){var a=this.editor.getSelection(),c=a&&a.getStartElement(),e=this.editor.elementPath(),f=this._.listeners;this.removeAll();for(var d=0;dd.width&&(e.resize_minWidth=d.width);e.resize_minHeight>d.height&&(e.resize_minHeight=d.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",c);a.document&&(a.document.on("mousemove",f),a.document.on("mouseup",c));b.preventDefault&&b.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(d){if("bottom"==d.data.space){var c= -"";b&&!g&&(c=" cke_resizer_horizontal");!b&&g&&(c=" cke_resizer_vertical");var e='\x3cspan id\x3d"'+h+'" class\x3d"cke_resizer'+c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?d.data.html+=e:d.data.html=e+d.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var a= +l=l.getWindow().getScrollPosition(),b=e?a.$.clientX:a.$.pageX||l.x+a.$.clientX,d=e?a.$.clientY:a.$.pageY||l.y+a.$.clientY;CKEDITOR.tools.setTimeout(function(){this.open(k,null,b,d)},CKEDITOR.env.ie?200:0,this)}},this);if(CKEDITOR.env.webkit){var c,e=function(){c=0};a.on("keydown",function(a){c=CKEDITOR.env.mac?a.data.$.metaKey:a.data.$.ctrlKey});a.on("keyup",e);a.on("contextmenu",e)}},open:function(a,f,c,e){this.editor.focus();a=a||CKEDITOR.document.getDocumentElement();this.editor.selectionChange(1); +this.show(a,f,c,e)}}})},beforeInit:function(a){var f=a.contextMenu=new CKEDITOR.plugins.contextMenu(a);a.on("contentDom",function(){f.addTarget(a.editable(),!1!==a.config.browserContextMenuOnCtrl)});a.addCommand("contextMenu",{exec:function(){a.contextMenu.open(a.document.getBody())}});a.setKeystroke(CKEDITOR.SHIFT+121,"contextMenu");a.setKeystroke(CKEDITOR.CTRL+CKEDITOR.SHIFT+121,"contextMenu")}}),CKEDITOR.plugins.add("resize",{init:function(a){function f(c){var f=b.width,h=b.height,l=f+(c.data.$.screenX- +k.x)*("rtl"==m?-1:1);c=h+(c.data.$.screenY-k.y);d&&(f=Math.max(e.resize_minWidth,Math.min(l,e.resize_maxWidth)));g&&(h=Math.max(e.resize_minHeight,Math.min(c,e.resize_maxHeight)));a.resize(d?f:null,h)}function c(){CKEDITOR.document.removeListener("mousemove",f);CKEDITOR.document.removeListener("mouseup",c);a.document&&(a.document.removeListener("mousemove",f),a.document.removeListener("mouseup",c))}var e=a.config,h=a.ui.spaceId("resizer"),m=a.element?a.element.getDirection(1):"ltr";!e.resize_dir&& +(e.resize_dir="vertical");void 0===e.resize_maxWidth&&(e.resize_maxWidth=3E3);void 0===e.resize_maxHeight&&(e.resize_maxHeight=3E3);void 0===e.resize_minWidth&&(e.resize_minWidth=750);void 0===e.resize_minHeight&&(e.resize_minHeight=250);if(!1!==e.resize_enabled){var l=null,k,b,d=("both"==e.resize_dir||"horizontal"==e.resize_dir)&&e.resize_minWidth!=e.resize_maxWidth,g=("both"==e.resize_dir||"vertical"==e.resize_dir)&&e.resize_minHeight!=e.resize_maxHeight,n=CKEDITOR.tools.addFunction(function(d){l|| +(l=a.getResizable());b={width:l.$.offsetWidth||0,height:l.$.offsetHeight||0};k={x:d.screenX,y:d.screenY};e.resize_minWidth>b.width&&(e.resize_minWidth=b.width);e.resize_minHeight>b.height&&(e.resize_minHeight=b.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",c);a.document&&(a.document.on("mousemove",f),a.document.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("destroy",function(){CKEDITOR.tools.removeFunction(n)});a.on("uiSpace",function(b){if("bottom"==b.data.space){var c= +"";d&&!g&&(c=" cke_resizer_horizontal");!d&&g&&(c=" cke_resizer_vertical");var e='\x3cspan id\x3d"'+h+'" class\x3d"cke_resizer'+c+" cke_resizer_"+m+'" title\x3d"'+CKEDITOR.tools.htmlEncode(a.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event)"\x3e'+("ltr"==m?"◢":"◣")+"\x3c/span\x3e";"ltr"==m&&"ltr"==c?b.data.html+=e:b.data.html=e+b.data.html}},a,null,100);a.on("maximize",function(b){a.ui.space("resizer")[b.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}}),function(){var a= '\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"'); var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),a=a+'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e{arrowHtml}\x3c/a\x3e', f=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),c=CKEDITOR.addTemplate("button",a);CKEDITOR.plugins.add("button",{beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(c){c.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}}; -CKEDITOR.ui.button.prototype={render:function(a,h){function m(){var b=a.mode;b&&(b=this.modes[b]?void 0!==p[b]?p[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var l=CKEDITOR.env,k=this._.id=CKEDITOR.tools.getNextId(),d="",b=this.command,g;this._.editor=a;var n={id:k,button:this,editor:a,focus:function(){CKEDITOR.document.getById(k).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}}, -v=CKEDITOR.tools.addFunction(function(a){if(n.onkey)return a=new CKEDITOR.dom.event(a),!1!==n.onkey(n,a.getKeystroke())}),u=CKEDITOR.tools.addFunction(function(a){var b;n.onfocus&&(b=!1!==n.onfocus(n,new CKEDITOR.dom.event(a)));return b}),r=0;n.clickFn=g=CKEDITOR.tools.addFunction(function(){r&&(a.unlockSelection(1),r=0);n.execute();l.iOS&&a.focus()});if(this.modes){var p={};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(p[a.mode]=this._.state)},this);a.on("activeFilterChange", -m,this);a.on("mode",m,this);!this.readOnly&&a.on("readOnly",m,this)}else b&&(b=a.getCommand(b))&&(b.on("state",function(){this.setState(b.state)},this),d+=b.state==CKEDITOR.TRISTATE_ON?"on":b.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)a.on("contentDirChanged",function(b){var d=CKEDITOR.document.getById(this._.id),c=d.getFirst();b=b.data;b!=a.lang.dir?d.addClass("cke_"+b):d.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(w, -"rtl"==b,this.icon,this.iconOffset))},this);b||(d+="off");var q=this.name||this.command,w=q;this.icon&&!/\./.test(this.icon)&&(w=this.icon,this.icon=null);d={id:k,name:q,iconName:w,label:this.label,cls:this.className||"",state:d,ariaDisabled:"disabled"==d?"true":"false",title:this.title,titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:v,focusFn:u,clickFn:g,style:CKEDITOR.skin.getIconStyle(w,"rtl"==a.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow? -f.output():""};c.output(d,h);if(this.onRender)this.onRender();return n},setState:function(a){if(this._.state==a)return!1;this._.state=a;var c=CKEDITOR.document.getById(this._.id);return c?(c.setState(a,"cke_button"),a==CKEDITOR.TRISTATE_DISABLED?c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled"),this.hasArrow?(a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(a)):a==CKEDITOR.TRISTATE_ON? +CKEDITOR.ui.button.prototype={render:function(a,h){function m(){var b=a.mode;b&&(b=this.modes[b]?void 0!==p[b]?p[b]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,b=a.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:b,this.setState(b),this.refresh&&this.refresh())}var l=CKEDITOR.env,k=this._.id=CKEDITOR.tools.getNextId(),b="",d=this.command,g;this._.editor=a;var n={id:k,button:this,editor:a,focus:function(){CKEDITOR.document.getById(k).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}}, +t=CKEDITOR.tools.addFunction(function(a){if(n.onkey)return a=new CKEDITOR.dom.event(a),!1!==n.onkey(n,a.getKeystroke())}),v=CKEDITOR.tools.addFunction(function(a){var b;n.onfocus&&(b=!1!==n.onfocus(n,new CKEDITOR.dom.event(a)));return b}),r=0;n.clickFn=g=CKEDITOR.tools.addFunction(function(){r&&(a.unlockSelection(1),r=0);n.execute();l.iOS&&a.focus()});if(this.modes){var p={};a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(p[a.mode]=this._.state)},this);a.on("activeFilterChange", +m,this);a.on("mode",m,this);!this.readOnly&&a.on("readOnly",m,this)}else d&&(d=a.getCommand(d))&&(d.on("state",function(){this.setState(d.state)},this),b+=d.state==CKEDITOR.TRISTATE_ON?"on":d.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");if(this.directional)a.on("contentDirChanged",function(b){var d=CKEDITOR.document.getById(this._.id),c=d.getFirst();b=b.data;b!=a.lang.dir?d.addClass("cke_"+b):d.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style",CKEDITOR.skin.getIconStyle(w, +"rtl"==b,this.icon,this.iconOffset))},this);d||(b+="off");var q=this.name||this.command,w=q;this.icon&&!/\./.test(this.icon)&&(w=this.icon,this.icon=null);b={id:k,name:q,iconName:w,label:this.label,cls:this.className||"",state:b,ariaDisabled:"disabled"==b?"true":"false",title:this.title,titleJs:l.gecko&&!l.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:t,focusFn:v,clickFn:g,style:CKEDITOR.skin.getIconStyle(w,"rtl"==a.lang.dir,this.icon,this.iconOffset),arrowHtml:this.hasArrow? +f.output():""};c.output(b,h);if(this.onRender)this.onRender();return n},setState:function(a){if(this._.state==a)return!1;this._.state=a;var c=CKEDITOR.document.getById(this._.id);return c?(c.setState(a,"cke_button"),a==CKEDITOR.TRISTATE_DISABLED?c.setAttribute("aria-disabled",!0):c.removeAttribute("aria-disabled"),this.hasArrow?(a=a==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(a)):a==CKEDITOR.TRISTATE_ON? c.setAttribute("aria-pressed",!0):c.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var c=this;this.allowedContent||this.requiredContent||!this.command||(c=a.getCommand(this.command)||c);return this._.feature=c}};CKEDITOR.ui.prototype.addButton=function(a,c){this.add(a,CKEDITOR.UI_BUTTON,c)}}(),function(){function a(a){function c(){for(var b=e(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||f(a),g=0;g< -d.length;g++){var m=d[g];if("/"!=m){"string"==typeof m&&(m=d[g]={name:m});var p,q=m.groups;if(q)for(var w=0;wb.order?-1:0>a.order?1:a.orderb.order?-1:0>a.order?1:a.orderCKEDITOR.env.version? -l.createText("\r"):l.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("").insertAfter(a),m&&(q||p.blockLimit).appendBogus(),a.getNext().$.nodeValue="",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):k(a,c,e,h)}}};var m=CKEDITOR.plugins.enterkey,l=m.enterBr,k=m.enterBlock,d=/^h[1-6]$/}(),function(){function a(a,c){var e={},h=[],m={nbsp:" ",shy:"­",gt:"\x3e", -lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,d){var f=c?"\x26"+d+";":m[d];e[f]=c?m[d]:"\x26"+d+";";h.push(f);return""});if(!c&&a){a=a.split(",");var l=document.createElement("div"),k;l.innerHTML="\x26"+a.join(";\x26")+";";k=l.innerHTML;l=null;for(l=0;lCKEDITOR.env.version? +l.createText("\r"):l.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(l.createText("").insertAfter(a),m&&(q||p.blockLimit).appendBogus(),a.getNext().$.nodeValue="",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):k(a,c,e,h)}}};var m=CKEDITOR.plugins.enterkey,l=m.enterBr,k=m.enterBlock,b=/^h[1-6]$/}(),function(){function a(a,c){var e={},h=[],m={nbsp:" ",shy:"­",gt:"\x3e", +lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};a=a.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(a,b){var f=c?"\x26"+b+";":m[b];e[f]=c?m[b]:"\x26"+b+";";h.push(f);return""});if(!c&&a){a=a.split(",");var l=document.createElement("div"),k;l.innerHTML="\x26"+a.join(";\x26")+";";k=l.innerHTML;l=null;for(l=0;lf&&(f=640);420>c&&(c=420);var h=parseInt((window.screen.height-c)/2,10),m=parseInt((window.screen.width- -f)/2,10);e=(e||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+f+",height\x3d"+c+",top\x3d"+h+",left\x3d"+m;var l=window.open("",null,e,!0);if(!l)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(l.moveTo(m,h),l.resizeTo(f,c)),l.focus(),l.location.href=a}catch(k){window.open(a,null,e,!0)}return!0}}),function(){function a(a,b){var c=[];if(b)for(var e in b)c.push(e+ -"\x3d"+encodeURIComponent(b[e]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function f(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function c(){var d=this.getDialog(),b=d.getParentEditor();b._.filebrowserSe=this;var c=b.config["filebrowser"+f(d.getName())+"WindowWidth"]||b.config.filebrowserWindowWidth||"80%",d=b.config["filebrowser"+f(d.getName())+"WindowHeight"]||b.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=b.name;e.CKEditorFuncNum= -b._.filebrowserFn;e.langCode||(e.langCode=b.langCode);e=a(this.filebrowser.url,e);b.popup(e,c,d,b.config.filebrowserWindowFeatures||b.config.fileBrowserWindowFeatures)}function e(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function h(d,b,c){var e=c.params||{};e.CKEditor=d.name;e.CKEditorFuncNum=d._.filebrowserFn;e.langCode|| -(e.langCode=d.langCode);b.action=a(c.url,e);b.filebrowser=c}function m(a,b,g,k){if(k&&k.length)for(var l,u=k.length;u--;)if(l=k[u],"hbox"!=l.type&&"vbox"!=l.type&&"fieldset"!=l.type||m(a,b,g,l.children),l.filebrowser)if("string"==typeof l.filebrowser&&(l.filebrowser={action:"fileButton"==l.type?"QuickUpload":"Browse",target:l.filebrowser}),"Browse"==l.filebrowser.action){var r=l.filebrowser.url;void 0===r&&(r=a.config["filebrowser"+f(b)+"BrowseUrl"],void 0===r&&(r=a.config.filebrowserBrowseUrl)); -r&&(l.onClick=c,l.filebrowser.url=r,l.hidden=!1)}else if("QuickUpload"==l.filebrowser.action&&l["for"]&&(r=l.filebrowser.url,void 0===r&&(r=a.config["filebrowser"+f(b)+"UploadUrl"],void 0===r&&(r=a.config.filebrowserUploadUrl)),r)){var p=l.onClick;l.onClick=function(a){var b=a.sender;if(p&&!1===p.call(b,a))return!1;if(e.call(b,a)){a=b.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement();if(b=new CKEDITOR.dom.element(a.$.form))(a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a): -(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken());return!0}return!1};l.filebrowser.url=r;l.hidden=!1;h(a,g.getContents(l["for"][0]).get(l["for"][1]),l.filebrowser)}}function l(a,b,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var e=0;ew.height-q.bottom?g("pin"):g("bottom"),b=w.width/2,b=h.floatSpacePreferRight?"right":0p.width?"rtl"==h.contentsLangDirection?"right":"left":b-q.left>q.right-b?"left":"right",p.width>w.width?(b="left",n=0):(n="left"==b?0w.width&&(b="left"==b? -"right":"left",n=0)),d.setStyle(b,c(("pin"==k?D:t)+n+("pin"==k?0:"left"==b?B:-B)))):(k="pin",g("pin"),l(b))}}}();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"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e': -" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),d=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:m,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(h.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),b=CKEDITOR.tools.eventsBuffer(500,l),g=CKEDITOR.tools.eventsBuffer(100,l);d.unselectable();d.on("mousedown", -function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(d){l(d);a.on("change",b.input);f.on("scroll",g.input);f.on("resize",g.input)});a.on("blur",function(){d.hide();a.removeListener("change",b.input);f.removeListener("scroll",g.input);f.removeListener("resize",g.input)});a.on("destroy",function(){f.removeListener("scroll",g.input);f.removeListener("resize",g.input);d.clearCustomData();d.remove()});a.focusManager.hasFocus&&d.show();a.focusManager.add(d, +f)/2,10);e=(e||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+f+",height\x3d"+c+",top\x3d"+h+",left\x3d"+m;var l=window.open("",null,e,!0);if(!l)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(l.moveTo(m,h),l.resizeTo(f,c)),l.focus(),l.location.href=a}catch(k){window.open(a,null,e,!0)}return!0}}),function(){function a(a,d){var c=[];if(d)for(var e in d)c.push(e+ +"\x3d"+encodeURIComponent(d[e]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+c.join("\x26")}function f(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function c(){var b=this.getDialog(),d=b.getParentEditor();d._.filebrowserSe=this;var c=d.config["filebrowser"+f(b.getName())+"WindowWidth"]||d.config.filebrowserWindowWidth||"80%",b=d.config["filebrowser"+f(b.getName())+"WindowHeight"]||d.config.filebrowserWindowHeight||"70%",e=this.filebrowser.params||{};e.CKEditor=d.name;e.CKEditorFuncNum= +d._.filebrowserFn;e.langCode||(e.langCode=d.langCode);e=a(this.filebrowser.url,e);d.popup(e,c,b,d.config.filebrowserWindowFeatures||d.config.fileBrowserWindowFeatures)}function e(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function h(b,d,c){var e=c.params||{};e.CKEditor=b.name;e.CKEditorFuncNum=b._.filebrowserFn;e.langCode|| +(e.langCode=b.langCode);d.action=a(c.url,e);d.filebrowser=c}function m(a,d,g,k){if(k&&k.length)for(var l,v=k.length;v--;)if(l=k[v],"hbox"!=l.type&&"vbox"!=l.type&&"fieldset"!=l.type||m(a,d,g,l.children),l.filebrowser)if("string"==typeof l.filebrowser&&(l.filebrowser={action:"fileButton"==l.type?"QuickUpload":"Browse",target:l.filebrowser}),"Browse"==l.filebrowser.action){var r=l.filebrowser.url;void 0===r&&(r=a.config["filebrowser"+f(d)+"BrowseUrl"],void 0===r&&(r=a.config.filebrowserBrowseUrl)); +r&&(l.onClick=c,l.filebrowser.url=r,l.hidden=!1)}else if("QuickUpload"==l.filebrowser.action&&l["for"]&&(r=l.filebrowser.url,void 0===r&&(r=a.config["filebrowser"+f(d)+"UploadUrl"],void 0===r&&(r=a.config.filebrowserUploadUrl)),r)){var p=l.onClick;l.onClick=function(a){var b=a.sender;if(p&&!1===p.call(b,a))return!1;if(e.call(b,a)){a=b.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement();if(b=new CKEDITOR.dom.element(a.$.form))(a=b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a): +(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken());return!0}return!1};l.filebrowser.url=r;l.hidden=!1;h(a,g.getContents(l["for"][0]).get(l["for"][1]),l.filebrowser)}}function l(a,d,c){if(-1!==c.indexOf(";")){c=c.split(";");for(var e=0;ew.height-q.bottom?g("pin"):g("bottom"),d=w.width/2,d=h.floatSpacePreferRight?"right":0p.width?"rtl"==h.contentsLangDirection?"right":"left":d-q.left>q.right-d?"left":"right",p.width>w.width?(d="left",n=0):(n="left"==d?0w.width&&(d="left"==d? +"right":"left",n=0)),b.setStyle(d,c(("pin"==k?D:u)+n+("pin"==k?0:"left"==d?B:-B)))):(k="pin",g("pin"),l(d))}}}();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"'+(CKEDITOR.env.gecko?" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e': +" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:m,id:a.id,langDir:a.lang.dir,langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(h.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),d=CKEDITOR.tools.eventsBuffer(500,l),g=CKEDITOR.tools.eventsBuffer(100,l);b.unselectable();b.on("mousedown", +function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){l(b);a.on("change",d.input);f.on("scroll",g.input);f.on("resize",g.input)});a.on("blur",function(){b.hide();a.removeListener("change",d.input);f.removeListener("scroll",g.input);f.removeListener("resize",g.input)});a.on("destroy",function(){f.removeListener("scroll",g.input);f.removeListener("resize",g.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b, 1)}}var f=CKEDITOR.document.getWindow(),c=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(c){c.on("loaded",function(){a(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var a=CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),f=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" href\x3d"javascript:void(\'{val}\')" {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), c=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),e=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,c){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),c))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,c){c=c||{};var e=c.attributes||(c.attributes={});(this.multiSelect=!!c.multiSelect)&&(e["aria-multiselectable"]=!0);!e.role&& (e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";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 c=a.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(c);delete this._.started}},getClick:function(){this._.click|| -(this._.click=CKEDITOR.tools.addFunction(function(a){var c=this.toggle(a);if(this.onClick)this.onClick(a,c)},this));return this._.click}},proto:{add:function(a,c,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=k;var d;d=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:k,val:d,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||a),text:c||a}; +(this._.click=CKEDITOR.tools.addFunction(function(a){var c=this.toggle(a);if(this.onClick)this.onClick(a,c)},this));return this._.click}},proto:{add:function(a,c,l){var k=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=k;var b;b=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:k,val:b,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(l||a),text:c||a}; this._.pendingList.push(f.output(a))},startGroup:function(a){this._.close();var e=CKEDITOR.tools.getNextId();this._.groups[a]=e;this._.pendingHtml.push(c.output({id:e,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var c=this.isMarked(a);c?this.unmark(a):this.mark(a);return!c},hideGroup:function(a){var c=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display", -"none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,c=this._.groups,e=this.element.getDocument(),f;for(f in a)e.getById(a[f]).setStyle("display","");for(var d in c)a=e.getById(c[d]),f=a.getNext(),a.setStyle("display",""),f&&"ul"==f.getName()&&f.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var c=this.element.getDocument().getById(a); +"none"),c&&"ul"==c.getName()&&c.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,c=this._.groups,e=this.element.getDocument(),f;for(f in a)e.getById(a[f]).setStyle("display","");for(var b in c)a=e.getById(c[b]),f=a.getNext(),a.setStyle("display",""),f&&"ul"==f.getName()&&f.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var c=this.element.getDocument().getById(a); c.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(c)},unmark:function(a){var c=this.element.getDocument();a=this._.items[a];var e=c.getById(a);e.removeClass("cke_selected");c.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var a=this._.items,c=this.element.getDocument(),e;for(e in a){var f=a[e];c.getById(f).removeClass("cke_selected");c.getById(f+"_option").removeAttribute("aria-selected")}this.onUnmark&& this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var c=this.element.getElementsByTag("a"),e,f=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a=c.getItem(++f);){if(a.equals(e)){this._.focusIndex=f;break}}else this.element.focus();e&&setTimeout(function(){e.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_RICHCOMBO, CKEDITOR.ui.richCombo.handler)}}),function(){var a='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&& (a+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(a+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var a=a+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+ (CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),f=CKEDITOR.addTemplate("combo",a);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel"; a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var e=[];this.render(a,e);return e.join("")},render:function(a,e){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var m= -CKEDITOR.env,l="cke_"+this.id,k=CKEDITOR.tools.addFunction(function(d){v&&(a.unlockSelection(1),v=0);b.execute(d)},this),d=this,b={id:l,combo:this,focus:function(){CKEDITOR.document.getById(l).getChild(1).focus()},execute:function(b){var e=d._;if(e.state!=CKEDITOR.TRISTATE_DISABLED)if(d.createPanel(a),e.on)e.panel.hide();else{d.commit();var g=d.getValue();g?e.list.mark(g):e.list.unmarkAll();e.panel.showBlock(d.id,new CKEDITOR.dom.element(b),4)}},clickFn:k};a.on("activeFilterChange",h,this);a.on("mode", -h,this);a.on("selectionChange",h,this);!this.readOnly&&a.on("readOnly",h,this);var g=CKEDITOR.tools.addFunction(function(d,e){d=new CKEDITOR.dom.event(d);var g=d.getKeystroke();if(40==g)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(g){case 13:case 32:case 40:CKEDITOR.tools.callFunction(k,e);break;default:b.onkey(b,g)}d.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){b.onfocus&&b.onfocus()}),v=0;b.keyDownFn=g;m={id:l,name:this.name||this.command,label:this.label, -title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:g,focusFn:n,clickFn:k};f.output(m,e);if(this.onRender)this.onRender();return b},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,f=this._.panelDefinition.block,m=e.parent||CKEDITOR.document.getBody(),l="cke_combopanel__"+this.name,k=new CKEDITOR.ui.floatPanel(a,m,e),d=k.addListBlock(this.id,f),b=this;k.onShow=function(){this.element.addClass(l);b.setState(CKEDITOR.TRISTATE_ON); -b._.on=1;b.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(b.onOpen)b.onOpen();a.once("panelShow",function(){d.focus(!d.multiSelect&&b.getValue())})};k.onHide=function(d){this.element.removeClass(l);b.setState(b.modes&&b.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);b._.on=0;if(!d&&b.onClose)b.onClose()};k.onEscape=function(){k.hide(1)};d.onClick=function(a,d){b.onClick&&b.onClick.call(b,a,d);k.hide()};this._.panel=k;this._.list=d;k.getBlock(this.id).onHide=function(){b._.on= -0;b.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var f=this.document.getById("cke_"+this.id+"_text");f&&(a||e?f.removeClass("cke_combo_inlinelabel"):(e=this.label,f.addClass("cke_combo_inlinelabel")),f.setText("undefined"!=typeof e?e:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)}, +CKEDITOR.env,l="cke_"+this.id,k=CKEDITOR.tools.addFunction(function(b){t&&(a.unlockSelection(1),t=0);d.execute(b)},this),b=this,d={id:l,combo:this,focus:function(){CKEDITOR.document.getById(l).getChild(1).focus()},execute:function(d){var e=b._;if(e.state!=CKEDITOR.TRISTATE_DISABLED)if(b.createPanel(a),e.on)e.panel.hide();else{b.commit();var f=b.getValue();f?e.list.mark(f):e.list.unmarkAll();e.panel.showBlock(b.id,new CKEDITOR.dom.element(d),4)}},clickFn:k};a.on("activeFilterChange",h,this);a.on("mode", +h,this);a.on("selectionChange",h,this);!this.readOnly&&a.on("readOnly",h,this);var g=CKEDITOR.tools.addFunction(function(b,e){b=new CKEDITOR.dom.event(b);var f=b.getKeystroke();if(40==f)a.once("panelShow",function(a){a.data._.panel._.currentBlock.onKeyDown(40)});switch(f){case 13:case 32:case 40:CKEDITOR.tools.callFunction(k,e);break;default:d.onkey(d,f)}b.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){d.onfocus&&d.onfocus()}),t=0;d.keyDownFn=g;m={id:l,name:this.name||this.command,label:this.label, +title:this.title,cls:this.className||"",titleJs:m.gecko&&!m.hc?"":(this.title||"").replace("'",""),keydownFn:g,focusFn:n,clickFn:k};f.output(m,e);if(this.onRender)this.onRender();return d},createPanel:function(a){if(!this._.panel){var e=this._.panelDefinition,f=this._.panelDefinition.block,m=e.parent||CKEDITOR.document.getBody(),l="cke_combopanel__"+this.name,k=new CKEDITOR.ui.floatPanel(a,m,e),b=k.addListBlock(this.id,f),d=this;k.onShow=function(){this.element.addClass(l);d.setState(CKEDITOR.TRISTATE_ON); +d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen();a.once("panelShow",function(){b.focus(!b.multiSelect&&d.getValue())})};k.onHide=function(b){this.element.removeClass(l);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};k.onEscape=function(){k.hide(1)};b.onClick=function(a,b){d.onClick&&d.onClick.call(d,a,b);k.hide()};this._.panel=k;this._.list=b;k.getBlock(this.id).onHide=function(){d._.on= +0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,e){this._.value=a;var f=this.document.getById("cke_"+this.id+"_text");f&&(a||e?f.removeClass("cke_combo_inlinelabel"):(e=this.label,f.addClass("cke_combo_inlinelabel")),f.setText("undefined"!=typeof e?e:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)}, showAll:function(){this._.list.showAll()},add:function(a,e,f){this._.items[a]=f||a;this._.list.add(a,e,f)},startGroup:function(a){this._.list.startGroup(a)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var e=this.document.getById("cke_"+this.id);e.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?e.setAttribute("aria-disabled",!0):e.removeAttribute("aria-disabled");this._.state= a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!=CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,e){this.add(a,CKEDITOR.UI_RICHCOMBO,e)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(a){if(!a.blockless){for(var f= -a.config,c=a.lang.format,e=f.format_tags.split(";"),h={},m=0,l=[],k=0;kthis.$.offsetHeight){var d=e.createRange();d[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&& -this.attachListener(k,"blur",function(){try{k.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(k,"touchend",function(){a.focus()});d=e.document.getElementsByTag("title").getItem(0);d.data("cke-title",d.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)}, -0,this)}function f(a){function c(){var b;a.editable().attachListener(a,"selectionChange",function(){var d=a.getSelection().getSelectedElement();d&&(b&&(b.detachEvent("onresizestart",e),b=null),d.$.attachEvent("onresizestart",e),b=d.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var f=a.document.$;f.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);f.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(d){}else CKEDITOR.env.ie&&11> +this.attachListener(k,"blur",function(){try{k.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(k,"touchend",function(){a.focus()});b=e.document.getElementsByTag("title").getItem(0);b.data("cke-title",b.getText());CKEDITOR.env.ie&&(e.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");e.fire("contentDom");this._.isPendingFocus&&(e.focus(),this._.isPendingFocus=!1);setTimeout(function(){e.fire("dataReady")},0)}, +0,this)}function f(a){function c(){var b;a.editable().attachListener(a,"selectionChange",function(){var c=a.getSelection().getSelectedElement();c&&(b&&(b.detachEvent("onresizestart",e),b=null),c.$.attachEvent("onresizestart",e),b=c.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var f=a.document.$;f.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);f.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(b){}else CKEDITOR.env.ie&&11> CKEDITOR.env.version&&a.config.disableObjectResizing&&c(a)}function c(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var c=[],e;for(e in CKEDITOR.dtd.$removeEmpty)c.push("html.CSS1Compat "+e+"[contenteditable\x3dfalse]");a.push(c.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")); -a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(c){function f(b){b&&b.removeListener();a.editable(new e(a,d.$.contentWindow.document.body));a.setData(a.getData(1),c)}var k="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+ -")();":"")+"document.close();",k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(k)+"}())":"",d=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+k+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');d.setStyles({width:"100%",height:"100%"});d.addClass("cke_wysiwyg_frame").addClass("cke_reset");k=a.ui.space("contents");k.append(d);var b=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(b)d.on("load",f);var g=a.title, -n=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&n&&(g+=", "+n),d.setAttribute("title",g));if(n){var g=CKEDITOR.tools.getNextId(),v=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+n+"\x3c/span\x3e");k.append(v,1);d.setAttribute("aria-describedby",g)}a.on("beforeModeUnload",function(a){a.removeListener();v&&v.remove()});d.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!b&&f();a.fire("ariaWidget",d)})}});CKEDITOR.editor.prototype.addContentsCss= +a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(c){function f(d){d&&d.removeListener();a.editable(new e(a,b.$.contentWindow.document.body));a.setData(a.getData(1),c)}var k="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+ +")();":"")+"document.close();",k=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(k)+"}())":"",b=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+k+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');b.setStyles({width:"100%",height:"100%"});b.addClass("cke_wysiwyg_frame").addClass("cke_reset");k=a.ui.space("contents");k.append(b);var d=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(d)b.on("load",f);var g=a.title, +n=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&n&&(g+=", "+n),b.setAttribute("title",g));if(n){var g=CKEDITOR.tools.getNextId(),t=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+n+"\x3c/span\x3e");k.append(t,1);b.setAttribute("aria-describedby",g)}a.on("beforeModeUnload",function(a){a.removeListener();t&&t.remove()});b.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&f();a.fire("ariaWidget",b)})}});CKEDITOR.editor.prototype.addContentsCss= function(a){var c=this.config,e=c.contentsCss;CKEDITOR.tools.isArray(e)||(c.contentsCss=e?[e]:[]);c.contentsCss.push(a)};var e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(c){CKEDITOR.tools.setTimeout(a,0,this,c)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,e){var f=this.editor;if(e)this.setHtml(a),this.fixInitialSelection(),f.fire("dataReady"); -else{this._.isLoadingData=!0;f._.dataStore={id:1};var k=f.config,d=k.fullPage,b=k.docType,g=CKEDITOR.tools.buildStyleHtml(c()).replace(/