/* Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ (function(){window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var b=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"L7CE",version:"4.16.2",revision:"4e64f6721",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:b},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var e=document.getElementsByTagName("script"),f=0;fy.getListenerIndex(e)){y=y.listeners;f||(f=this);isNaN(c)&&(c=10);d.fn=e;d.priority=c;for(var w=y.length-1;0<=w;w--)if(y[w].priority<=c)return y.splice(w+1,0,d),{removeListener:g};y.unshift(d)}return{removeListener:g}},once:function(){var a= Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,e=function(){a=1},h=0,l=function(){h=1};return function(c,d,g){var n=f(this)[c];c=a;var y=h;a=h=0;if(n){var w=n.listeners;if(w.length)for(var w=w.slice(0),p,t=0;tdocument.documentMode),mobile:-1e||f.quirks);f.gecko&&(h=b.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),e=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));f.air&&(e=parseFloat(b.match(/ adobeair\/(\d+)/)[1])); f.webkit&&(e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));f.version=e;f.isCompatible=!(f.ie&&7>e)&&!(f.gecko&&4E4>e)&&!(f.webkit&&534>e);f.hidpi=2<=window.devicePixelRatio;f.needsBrFiller=f.gecko||f.webkit||f.ie&&10e;f.cssClass="cke_browser_"+(f.ie?"ie":f.gecko?"gecko":f.webkit?"webkit":"unknown");f.quirks&&(f.cssClass+=" cke_browser_quirks");f.ie&&(f.cssClass+=" cke_browser_ie"+(f.quirks?"6 cke_browser_iequirks":f.version));f.air&&(f.cssClass+=" cke_browser_air"); f.iOS&&(f.cssClass+=" cke_browser_ios");f.hidpi&&(f.cssClass+=" cke_hidpi");return f}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add= function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;b&&(CKEDITOR.status="basic_ready",b&&b._load?b():h&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*h))})})();CKEDITOR.status="basic_loaded"}(),"use strict",CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(b,h){CKEDITOR.verbosity& CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:b,additionalData:h})},CKEDITOR.error=function(b,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:b,additionalData:h})},CKEDITOR.on("log",function(b){if(window.console&&window.console.log){var h=console[b.data.type]?b.data.type:"log",f=b.data.errorCode;if(b=b.data.additionalData)console[h]("[CKEDITOR] Error code: "+f+".",b);else console[h]("[CKEDITOR] Error code: "+f+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+ f)}},null,null,999),CKEDITOR.dom={},function(){function b(n,g,c){this._minInterval=n;this._context=c;this._lastOutput=this._scheduledTimer=0;this._output=CKEDITOR.tools.bind(g,c||{});var a=this;this.input=function(){function n(){a._lastOutput=(new Date).getTime();a._scheduledTimer=0;a._call()}if(!a._scheduledTimer||!1!==a._reschedule()){var g=(new Date).getTime()-a._lastOutput;g/g,k=/|\s) /g,function(n,g){return g+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var n=0;return function(){return++n}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var n="e",g=0;8>g;g++)n+=Math.floor(65536* (1+Math.random())).toString(16).substring(1);return n},override:function(n,g){var c=g(n);c.prototype=n.prototype;return c},setTimeout:function(n,g,c,a,d){d||(d=window);c||(c=d);return d.setTimeout(function(){a?n.apply(c,[].concat(a)):n.apply(c)},g||0)},throttle:function(n,g,c){return new this.buffers.throttle(n,g,c)},trim:function(){var n=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(n,"")}}(),ltrim:function(){var g=/^[ \t\n\r]+/g;return function(c){return c.replace(g,"")}}(), rtrim:function(){var g=/[ \t\n\r]+$/g;return function(c){return c.replace(g,"")}}(),indexOf:function(g,c){if("function"==typeof c)for(var a=0,d=g.length;aparseFloat(c);a&&(c=c.replace("-",""));g.setStyle("width",c);c=g.$.clientWidth;return a?-c:c}return c}}(),repeat:function(g,c){return Array(c+1).join(g)},tryThese:function(){for(var g,c=0,a=arguments.length;cc;c++)g[c]=("0"+parseInt(g[c],10).toString(16)).slice(-2);return"#"+g.join("")})},normalizeHex:function(g){return g.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(g,c,n,a){g=c.toLowerCase();3==g.length&& (g=g.split(""),g=[g[0],g[0],g[1],g[1],g[2],g[2]].join(""));return"#"+g+a})},_isValidColorFormat:function(g){if(!g)return!1;g=g.replace(/\s+/g,"");return/^[a-z0-9()#%,./]+$/i.test(g)},parseCssText:function(g,c,a){var d={};a&&(g=(new CKEDITOR.dom.element("span")).setAttribute("style",g).getAttribute("style")||"");g&&(g=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(g)));if(!g||";"==g)return d;g.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(g,n,a){c&&(n= n.toLowerCase(),"font-family"==n&&(a=a.replace(/\s*,\s*/g,",")),a=CKEDITOR.tools.trim(a));d[n]=a});return d},writeCssText:function(g,c){var a,d=[];for(a in g)d.push(a+":"+g[a]);c&&d.sort();return d.join("; ")},objectCompare:function(g,c,a){var d;if(!g&&!c)return!0;if(!g||!c)return!1;for(d in g)if(g[d]!=c[d])return!1;if(!a)for(d in c)if(g[d]!=c[d])return!1;return!0},objectKeys:function(g){return CKEDITOR.tools.object.keys(g)},convertArrayToObject:function(g,c){var a={};1==arguments.length&&(c=!0); for(var d=0,b=g.length;da;a++)g.push(Math.floor(256*Math.random()));for(a=0;a=d||0==a&&48<= d&&57>=d||1==a&&48<=d&&57>=d&&45==e?b+("\\"+d.toString(16)+" "):0==a&&1==c&&45==d?b+("\\"+g.charAt(a)):128<=d||45==d||95==d||48<=d&&57>=d||65<=d&&90>=d||97<=d&&122>=d?b+g.charAt(a):b+("\\"+g.charAt(a));g=b}else g="";return g},getMouseButton:function(g){return(g=g&&g.data?g.data.$:g)?CKEDITOR.tools.normalizeMouseButton(g.button):!1},normalizeMouseButton:function(g,c){if(!CKEDITOR.env.ie||9<=CKEDITOR.env.version&&!CKEDITOR.env.ie6Compat)return g;for(var a=[[CKEDITOR.MOUSE_BUTTON_LEFT,1],[CKEDITOR.MOUSE_BUTTON_MIDDLE, 4],[CKEDITOR.MOUSE_BUTTON_RIGHT,2]],d=0;de)for(f=e;3>f;f++)b[f]=0;l[0]=(b[0]&252)>>2;l[1]=(b[0]&3)<<4|b[1]>>4;l[2]=(b[1]&15)<<2|(b[2]&192)>>6;l[3]=b[2]&63;for(f=0;4>f;f++)c=f<=e? c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l[f]):c+"\x3d"}return c},style:{parse:{_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(g){var c={},a=this._findColor(g); a.length&&(c.color=a[0],CKEDITOR.tools.array.forEach(a,function(c){g=g.replace(c,"")}));if(g=CKEDITOR.tools.trim(g))c.unprocessed=g;return c},margin:function(g){return CKEDITOR.tools.style.parse.sideShorthand(g,function(g){return g.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]})},sideShorthand:function(g,c){function a(g){d.top=b[g[0]];d.right=b[g[1]];d.bottom=b[g[2]];d.left=b[g[3]]}var d={},b=c?c(g):g.split(/\s+/);switch(b.length){case 1:a([0,0,0,0]);break;case 2:a([0, 1,0,1]);break;case 3:a([0,1,2,1]);break;case 4:a([0,1,2,3])}return d},border:function(g){return CKEDITOR.tools.style.border.fromCssRule(g)},_findColor:function(g){var c=[],a=CKEDITOR.tools.array,c=c.concat(g.match(this._rgbaRegExp)||[]),c=c.concat(g.match(this._hslaRegExp)||[]);return c=c.concat(a.filter(g.split(/\s+/),function(g){return g.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:g.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(g,c,a){var d=[];this.forEach(g, function(b,e){c.call(a,b,e,g)&&d.push(b)});return d},find:function(g,c,a){for(var d=g.length,b=0;bCKEDITOR.env.version&&(!g||"object"!==typeof g)){c=[];if("string"===typeof g)for(a=0;aCKEDITOR.env.version)for(b=0;bCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type== CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&e(a);return a},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(b){b.$.parentNode.insertBefore(this.$,b.$.nextSibling);return b},insertBefore:function(b){b.$.parentNode.insertBefore(this.$,b.$);return b},insertBeforeMe:function(b){this.$.parentNode.insertBefore(b.$,this.$);return b},getAddress:function(b){for(var h=[],f=this.getDocument().$.documentElement,e=this;e&&e!=f;){var a=e.getParent(); a&&h.unshift(this.getIndex.call(e,b));e=a}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(b){function h(a,b){var e=b?a.getNext():a.getPrevious();return e&&e.type==CKEDITOR.NODE_TEXT?e.isEmpty()?h(e,b):e:null}var f=this,e=-1,a;if(!this.getParent()||b&&f.type==CKEDITOR.NODE_TEXT&&f.isEmpty()&&!h(f)&&!h(f,!0))return-1;do if(!b||f.equals(this)||f.type!=CKEDITOR.NODE_TEXT||!a&&!f.isEmpty())e++,a=f.type==CKEDITOR.NODE_TEXT; while(f=f.getPrevious());return e},getNextSourceNode:function(b,h,f){if(f&&!f.call){var e=f;f=function(a){return!a.equals(e)}}b=!b&&this.getFirst&&this.getFirst();var a;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;b=this.getNext()}for(;!b&&(a=(a||this).getParent());){if(f&&!1===f(a,!0))return null;b=a.getNext()}return!b||f&&!1===f(b)?null:h&&h!=b.type?b.getNextSourceNode(!1,h,f):b},getPreviousSourceNode:function(b,h,f){if(f&&!f.call){var e=f;f=function(a){return!a.equals(e)}}b= !b&&this.getLast&&this.getLast();var a;if(!b){if(this.type==CKEDITOR.NODE_ELEMENT&&f&&!1===f(this,!0))return null;b=this.getPrevious()}for(;!b&&(a=(a||this).getParent());){if(f&&!1===f(a,!0))return null;b=a.getPrevious()}return!b||f&&!1===f(b)?null:h&&b.type!=h?b.getPreviousSourceNode(!1,h,f):b},getPrevious:function(b){var h=this.$,f;do f=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(f&&b&&!b(f));return f},getNext:function(b){var h=this.$,f;do f=(h=h.nextSibling)&&new CKEDITOR.dom.node(h); while(f&&b&&!b(f));return f},getParent:function(b){var h=this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||b&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(b){var h=this,f=[];do f[b?"push":"unshift"](h);while(h=h.getParent());return f},getCommonAncestor:function(b){if(b.equals(this))return this;if(b.contains&&b.contains(this))return b;var h=this.contains?this:this.getParent();do if(h.contains(b))return h;while(h=h.getParent());return null}, getPosition:function(b){var h=this.$,f=b.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(f);if(h==f)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&b.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(f))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(f.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>f.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex< f.sourceIndex?CKEDITOR.POSITION_PRECEDING:CKEDITOR.POSITION_FOLLOWING}h=this.getAddress();b=b.getAddress();for(var f=Math.min(h.length,b.length),e=0;e=document.documentMode||!h||(b=h+":"+b);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b= this.$.getElementsByTagName("head")[0];return b=b?new CKEDITOR.dom.element(b):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(b){this.$.open("text/html","replace");CKEDITOR.env.ie&&(b=b.replace(/(?:^\s*]*?>)|^/i, '$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(b);this.$.close()},find:function(b){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b))},findOne:function(b){return(b=this.$.querySelector(b))?new CKEDITOR.dom.element(b):null},_getHtml5ShivFrag:function(){var b=this.getCustomData("html5ShivFrag");b||(b=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(b,!0),this.setCustomData("html5ShivFrag",b));return b}}),CKEDITOR.dom.nodeList= function(b){this.$=b},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(b){return 0>b||b>=this.$.length?null:(b=this.$[b])?new CKEDITOR.dom.node(b):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(b){return new CKEDITOR.dom.node(b)})}},CKEDITOR.dom.element=function(b,h){"string"==typeof b&&(b=(h?h.$:document).createElement(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.element.get=function(b){return(b="string"==typeof b?document.getElementById(b)|| document.getElementsByName(b)[0]:b)&&(b.$?b:new CKEDITOR.dom.element(b))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(b,h){var f=new CKEDITOR.dom.element("div",h);f.setHtml(b);return f.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(b,h,f,e){var a=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),m=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names", {}).getCustomData("list_marker_names");b[a]=h;m[f]=1;return h.setCustomData(f,e)},CKEDITOR.dom.element.clearAllMarkers=function(b){for(var h in b)CKEDITOR.dom.element.clearMarkers(b,b[h],1)},CKEDITOR.dom.element.clearMarkers=function(b,h,f){var e=h.getCustomData("list_marker_names"),a=h.getCustomData("list_marker_id"),m;for(m in e)h.removeCustomData(m);h.removeCustomData("list_marker_names");f&&(h.removeCustomData("list_marker_id"),delete b[a])},function(){function b(a,c){return-1<(" "+a+" ").replace(m, " ").indexOf(" "+c+" ")}function h(a){var c=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),c=!1);return function(){c||a.removeAttribute("id")}}function f(a,c){var d=CKEDITOR.tools.escapeCss(a.$.id);return"#"+d+" "+c.split(/,\s*/).join(", #"+d+" ")}function e(a){for(var c=0,d=0,g=k[a].length;dCKEDITOR.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,c){var d=new CKEDITOR.dom.range(this.getDocument());d.setStartAfter(this);d.setEndAfter(a);var g=d.extractContents(!1,c||!1),b;d.insertNode(this.remove()); if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(d=new CKEDITOR.dom.element("div");b=g.getFirst();)b.$.style.backgroundColor&&(b.$.style.backgroundColor=b.$.style.backgroundColor),d.append(b);d.insertAfter(this);d.remove(!0)}else g.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var c=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?c.contains(a.getParent().$):c!=a.$&&c.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(c){}} return function(c){c?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(a){var c=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!c.width&&(c.width=c.right-c.left);!c.height&& (c.height=c.bottom-c.top);return a?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),c):c},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var c=this.$;if(this.getParent())return c.innerHTML=a;var d=this.getDocument()._getHtml5ShivFrag();d.appendChild(c);c.innerHTML=a;d.removeChild(c);return a}catch(g){this.$.innerHTML="";c=new CKEDITOR.dom.element("body",this.getDocument());c.$.innerHTML=a;for(c=c.getChildren();c.count();)this.append(c.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(c){this.$[a?"textContent":"innerText"]=c}}(),getAttribute:function(){var a=function(c){return this.$.getAttribute(c,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(c){switch(c){case "class":c="className";break;case "http-equiv":c="httpEquiv";break;case "name":return this.$.name;case "tabindex":return c=this.$.getAttribute(c,2),0!==c&&0===this.$.tabIndex&&(c=null), c;case "checked":return c=this.$.attributes.getNamedItem(c),(c.specified?c.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[c];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(c,2)}:a}(),getAttributes:function(a){var c={},d=this.$.attributes,g;a=CKEDITOR.tools.isArray(a)?a:[];for(g=0;g=document.documentMode){var c=this.$.scopeName;"HTML"!=c&&(a=c.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var c=this.$.firstChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getNext(a));return c},getLast:function(a){var c=this.$.lastChild;(c=c&&new CKEDITOR.dom.node(c))&&a&&!a(c)&&(c=c.getPrevious(a));return c},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 c=0;cCKEDITOR.env.version&&this.is("a")){var d=this.getParent();d.type==CKEDITOR.NODE_ELEMENT&&(d=d.clone(),d.setHtml(c),c=d.getHtml(),d.setHtml(a),a=d.getHtml())}return c==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),c,d;a&&CKEDITOR.env.webkit&&(c=this.getWindow(),!c.equals(CKEDITOR.document.getWindow())&&(d=c.$.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(),c=0,d=a.count();cCKEDITOR.env.version?function(c){return"name"==c?!!this.$.name:a.call(this,c)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,c){var d=this.$;a=a.$;if(d!=a){var g;if(c)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(c,d,g){if(d&&d.type==CKEDITOR.NODE_ELEMENT){for(var b= [];d.data("cke-bookmark")||d.isEmptyInlineRemoveable();)if(b.push(d),d=g?d.getNext():d.getPrevious(),!d||d.type!=CKEDITOR.NODE_ELEMENT)return;if(c.isIdentical(d)){for(var e=g?c.getLast():c.getFirst();b.length;)b.shift().move(c,!g);d.moveChildren(c,!g);d.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(c){if(!1===c||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(c,d){"class"==c?this.$.className=d:"style"==c?this.$.style.cssText=d:"tabindex"==c?this.$.tabIndex=d:"checked"==c?this.$.checked=d:"contenteditable"==c?a.call(this,"contentEditable",d):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(c,d){if("src"==c&&d.match(/^http:\/\//))try{a.apply(this, arguments)}catch(g){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var c in a)this.setAttribute(c,a[c]);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 c= 0;cCKEDITOR.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,c=this.getElementsByTag("*"),d=0,g=c.count();df||0f?f:b);d&&(0>e||0e?e:g,0)},setState:function(a,c,d){c=c||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(c+"_on");this.removeClass(c+ "_off");this.removeClass(c+"_disabled");d&&this.setAttribute("aria-pressed",!0);d&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(c+"_disabled");this.removeClass(c+"_off");this.removeClass(c+"_on");d&&this.setAttribute("aria-disabled",!0);d&&this.removeAttribute("aria-pressed");break;default:this.addClass(c+"_off"),this.removeClass(c+"_on"),this.removeClass(c+"_disabled"),d&&this.removeAttribute("aria-pressed"),d&&this.removeAttribute("aria-disabled")}}, getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(c){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,c){var d=this.$.attributes;c=c||{};for(var g=0;gCKEDITOR.env.version){var b=g.ownerDocument.createEventObject(),e;for(e in c)b[e]=c[e];g.fireEvent(d, b)}else g[g[a]?a:d](c)},isDetached:function(){var a=this.getDocument(),c=a.getDocumentElement();return c.equals(this)||c.contains(this)?!CKEDITOR.env.ie||8=B.getChildCount()?(B=B.getChild(A-1),F=!0):B=B.getChild(A):L=F=!0;v.type== CKEDITOR.NODE_TEXT?q?C=!0:v.split(D):0da)for(;X;)X=f(X,P,!0);P=Y}q||m()}}function f(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!0),b=CKEDITOR.dom.walker.bogus();return function(e){return d(e)||c(e)?!0:b(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 c=CKEDITOR.dom.walker.whitespaces(), d=CKEDITOR.dom.walker.bookmark(1);return function(b){return d(b)||c(b)?!0:!a&&k(b)||b.type==CKEDITOR.NODE_ELEMENT&&b.is(CKEDITOR.dtd.$removeEmpty)}}function a(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&d(a)&&(b=a);return c(a)&&!(k(a)&&a.equals(b))})}}var m={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=CKEDITOR.dom.walker.bogus(), l=/^[\t\r\n ]*(?: |\xa0)$/,c=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 c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,2,c,!1,"undefined"==typeof a?!0:a);return c},deleteContents:function(a){this.collapsed||h(this,0,null,a)},extractContents:function(a,c){var d=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,d,a,"undefined"==typeof c?!0:c);return d},equals:function(a){return this.startOffset===a.startOffset&&this.endOffset===a.endOffset&& this.startContainer.equals(a.startContainer)&&this.endContainer.equals(a.endContainer)},createBookmark:function(a){function c(a){return a.getAscendant(function(a){var g;if(g=a.data&&a.data("cke-temp"))g=-1===CKEDITOR.tools.array.indexOf(["cke_copybin","cke_pastebin"],a.getAttribute("id"));return g},!0)}var d=this.startContainer,b=this.endContainer,e=this.collapsed,f,h,m,k;f=this.document.createElement("span");f.data("cke-bookmark",1);f.setStyle("display","none");f.setHtml("\x26nbsp;");a&&(m="cke_bm_"+ CKEDITOR.tools.getNextNumber(),f.setAttribute("id",m+(e?"C":"S")));e||(h=f.clone(),h.setHtml("\x26nbsp;"),a&&h.setAttribute("id",m+"E"),k=this.clone(),c(b)&&(b=c(b),k.moveToPosition(b,CKEDITOR.POSITION_AFTER_END)),k.collapse(),k.insertNode(h));k=this.clone();c(d)&&(b=c(d),k.moveToPosition(b,CKEDITOR.POSITION_BEFORE_START));k.collapse(!0);k.insertNode(f);h?(this.setStartAfter(f),this.setEndBefore(h)):this.moveToPosition(f,CKEDITOR.POSITION_AFTER_END);return{startNode:a?m+(e?"C":"S"):f,endNode:a?m+ "E":h,serializable:a,collapsed:e}},createBookmark2:function(){function a(g){var c=g.container,b=g.offset,e;e=c;var n=b;e=e.type!=CKEDITOR.NODE_ELEMENT||0===n||n==e.getChildCount()?0:e.getChild(n-1).type==CKEDITOR.NODE_TEXT&&e.getChild(n).type==CKEDITOR.NODE_TEXT;e&&(c=c.getChild(b-1),b=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=b.getIndex(),a.container=b.getParent()))}}var d=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT, !0);return function(d){var b=this.collapsed,e={container:this.startContainer,offset:this.startOffset},f={container:this.endContainer,offset:this.endOffset};d&&(a(e),c(e,this.root),b||(a(f),c(f,this.root)));return{start:e.container.getAddress(d),end:b?null:f.container.getAddress(d),startOffset:e.offset,endOffset:f.offset,normalized:d,collapsed:b,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var c=this.document.getByAddress(a.start,a.normalized),d=a.startOffset,b=a.end&&this.document.getByAddress(a.end, a.normalized);a=a.endOffset;this.setStart(c,d);b?this.setEnd(b,a):this.collapse(!0)}else c=(d=a.serializable)?this.document.getById(a.startNode):a.startNode,a=d?this.document.getById(a.endNode):a.endNode,this.setStartBefore(c),c.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,c=this.endContainer,d=this.startOffset,b=this.endOffset,e;if(a.type==CKEDITOR.NODE_ELEMENT)if(e=a.getChildCount(),e>d)a=a.getChild(d);else if(1>e)a=a.getPreviousSourceNode(); else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(c.type==CKEDITOR.NODE_ELEMENT)if(e=c.getChildCount(),e>b)c=c.getChild(b).getPreviousSourceNode(!0);else if(1>e)c=c.getPreviousSourceNode();else{for(c=c.$;c.lastChild;)c=c.lastChild;c=new CKEDITOR.dom.node(c)}a.getPosition(c)&CKEDITOR.POSITION_FOLLOWING&&(a=c);return{startNode:a,endNode:c}},getCommonAncestor:function(a,c){var d=this.startContainer,b=this.endContainer,d=d.equals(b)?a&&d.type==CKEDITOR.NODE_ELEMENT&& this.startOffset==this.endOffset-1?d.getChild(this.startOffset):d:d.getCommonAncestor(b);return c&&!d.is?d.getParent():d},optimize:function(){var a=this.startContainer,c=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;c=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(c?c>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,c=this.endContainer;a.is&&a.is("span")&& a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);c&&c.is&&c.is("span")&&c.data("cke-bookmark")&&this.setEndAt(c,CKEDITOR.POSITION_AFTER_END)},trim:function(a,c){var d=this.startContainer,b=this.startOffset,e=this.collapsed;if((!a||e)&&d&&d.type==CKEDITOR.NODE_TEXT){if(b)if(b>=d.getLength())b=d.getIndex()+1,d=d.getParent();else{var f=d.split(b),b=d.getIndex()+1,d=d.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(f,this.endOffset-this.startOffset):d.equals(this.endContainer)&& (this.endOffset+=1)}else b=d.getIndex(),d=d.getParent();this.setStart(d,b);if(e){this.collapse(!0);return}}d=this.endContainer;b=this.endOffset;c||e||!d||d.type!=CKEDITOR.NODE_TEXT||(b?(b>=d.getLength()||d.split(b),b=d.getIndex()+1):b=d.getIndex(),d=d.getParent(),this.setEnd(d,b))},enlarge:function(a,c){function d(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var b=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var e=1;case CKEDITOR.ENLARGE_ELEMENT:var f= function(a,g){var c=new CKEDITOR.dom.range(m);c.setStart(a,g);c.setEndAt(m,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c),d;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};d=c.next();){if(d.type!=CKEDITOR.NODE_TEXT)return!1;E=d!=a?d.getText():d.substring(g);if(b.test(E))return!1}return!0};if(this.collapsed)break;var h=this.getCommonAncestor(),m=this.root,k,l,q,v,B,D=!1,A,E;A=this.startContainer;var F=this.startOffset;A.type==CKEDITOR.NODE_TEXT? (F&&(A=!CKEDITOR.tools.trim(A.substring(0,F)).length&&A,D=!!A),A&&((v=A.getPrevious())||(q=A.getParent()))):(F&&(v=A.getChild(F-1)||A.getLast()),v||(q=A));for(q=d(q);q||v;){if(q&&!v){!B&&q.equals(h)&&(B=!0);if(e?q.isBlockBoundary():!m.contains(q))break;D&&"inline"==q.getComputedStyle("display")||(D=!1,B?k=q:this.setStartBefore(q));v=q.getPrevious()}for(;v;)if(A=!1,v.type==CKEDITOR.NODE_COMMENT)v=v.getPrevious();else{if(v.type==CKEDITOR.NODE_TEXT)E=v.getText(),b.test(E)&&(v=null),A=/[\s\ufeff]$/.test(E); else if((v.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||c&&v.is("br"))&&!v.data("cke-bookmark"))if(D&&CKEDITOR.dtd.$removeEmpty[v.getName()]){E=v.getText();if(b.test(E))v=null;else for(var F=v.$.getElementsByTagName("*"),K=0,L;L=F[K++];)if(!CKEDITOR.dtd.$removeEmpty[L.nodeName.toLowerCase()]){v=null;break}v&&(A=!!E.length)}else v=null;A&&(D?B?k=q:q&&this.setStartBefore(q):D=!0);if(v){A=v.getPrevious();if(!q&&!A){q=v;v=null;break}v=A}else q=null}q&&(q=d(q.getParent()))}A=this.endContainer;F=this.endOffset; q=v=null;B=D=!1;A.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(A.substring(F)).length?D=!0:(D=!A.getLength(),F==A.getLength()?(v=A.getNext())||(q=A.getParent()):f(A,F)&&(q=A.getParent())):(v=A.getChild(F))||(q=A);for(;q||v;){if(q&&!v){!B&&q.equals(h)&&(B=!0);if(e?q.isBlockBoundary():!m.contains(q))break;D&&"inline"==q.getComputedStyle("display")||(D=!1,B?l=q:q&&this.setEndAfter(q));v=q.getNext()}for(;v;){A=!1;if(v.type==CKEDITOR.NODE_TEXT)E=v.getText(),f(v,0)||(v=null),A=/^[\s\ufeff]/.test(E);else if(v.type== CKEDITOR.NODE_ELEMENT){if((0=h.getLength()?f.setStartAfter(h):(f.setStartBefore(h),d=0):f.setStartBefore(h));m&&m.type==CKEDITOR.NODE_TEXT&&(l?l>=m.getLength()?f.setEndAfter(m):(f.setEndAfter(m),q=0):f.setEndBefore(m));var f=new CKEDITOR.dom.walker(f),v=CKEDITOR.dom.walker.bookmark(),B=CKEDITOR.dom.walker.bogus();f.evaluator= function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var D;f.guard=function(c,d){if(e&&B(c)||v(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||d&&c.equals(D)||!1===b&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return!1;d||c.type!=CKEDITOR.NODE_ELEMENT||(D=c);return!0};d&&(h=f[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(h,c?CKEDITOR.POSITION_AFTER_START: CKEDITOR.POSITION_BEFORE_START);q&&(f.reset(),(f=f[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(f,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!d&&!q)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var c=this.startContainer,d=c.getChild(this.startOffset);d?a.insertBefore(d):c.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,c){this.setStartAt(a, c);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(a,c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex(),a=a.getParent());this._setStartContainer(a);this.startOffset=c;this.endContainer||(this._setEndContainer(a),this.endOffset=c);b(this)},setEnd:function(a, c){a.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[a.getName()]&&(c=a.getIndex()+1,a=a.getParent());this._setEndContainer(a);this.endOffset=c;this.startContainer||(this._setStartContainer(a),this.startOffset=c);b(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(a, c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setStart(a,a.getLength()):this.setStart(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(a)}b(this)},setEndAt:function(a,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(a,0);break;case CKEDITOR.POSITION_BEFORE_END:a.type==CKEDITOR.NODE_TEXT?this.setEnd(a, a.getLength()):this.setEnd(a,a.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(a);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(a)}b(this)},fixBlock:function(a,c){var d=this.createBookmark(),b=this.document.createElement(c);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(b);b.trim();this.insertNode(b);var e=b.getBogus();e&&e.remove();b.appendBogus();this.moveToBookmark(d);return b},splitBlock:function(a,c){var d= new CKEDITOR.dom.elementPath(this.startContainer,this.root),b=new CKEDITOR.dom.elementPath(this.endContainer,this.root),e=d.block,f=b.block,h=null;if(!d.blockLimit.equals(b.blockLimit))return null;"br"!=a&&(e||(e=this.fixBlock(!0,a),f=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),f||(f=this.fixBlock(!1,a)));d=e&&this.checkStartOfBlock();b=f&&this.checkEndOfBlock();this.deleteContents();e&&e.equals(f)&&(b?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f, CKEDITOR.POSITION_AFTER_END),f=null):d?(h=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e=null):(f=this.splitElement(e,c||!1),e.is("ul","ol")||e.appendBogus()));return{previousBlock:e,nextBlock:f,wasStartOfBlock:d,wasEndOfBlock:b,elementPath:h}},splitElement:function(a,c){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var d=this.extractContents(!1,c||!1),b=a.clone(!1,c||!1);d.appendTo(b);b.insertAfter(a); this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return b},removeEmptyBlocksAtEnd:function(){function a(g){return function(a){return c(a)||d(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()||g.is("table")&&a.is("caption")?!1:!0}}var c=CKEDITOR.dom.walker.whitespaces(),d=CKEDITOR.dom.walker.bookmark(!1);return function(c){for(var d=this.createBookmark(),b=this[c?"endPath":"startPath"](),e=b.block||b.blockLimit,f;e&&!e.equals(b.root)&&!e.getFirst(a(e));)f=e.getParent(),this[c?"setEndAt": "setStartAt"](e,CKEDITOR.POSITION_AFTER_END),e.remove(1),e=f;this.moveToBookmark(d)}}(),startPath:function(){return new CKEDITOR.dom.elementPath(this.startContainer,this.root)},endPath:function(){return new CKEDITOR.dom.elementPath(this.endContainer,this.root)},checkBoundaryOfElement:function(a,c){var d=c==CKEDITOR.START,b=this.clone();b.collapse(d);b[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(b);b.evaluator=e(d);return b[d? "checkBackward":"checkForward"]()},checkStartOfBlock:function(a){var c=this.startContainer,d=this.startOffset;CKEDITOR.env.ie&&d&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.ltrim(c.substring(0,d)),l.test(c)&&this.trim(0,1));a||this.trim();a=new CKEDITOR.dom.elementPath(this.startContainer,this.root);c=this.clone();c.collapse(!0);c.setStartAt(a.block||a.blockLimit,CKEDITOR.POSITION_AFTER_START);a=new CKEDITOR.dom.walker(c);a.evaluator=f();return a.checkBackward()},checkEndOfBlock:function(a){var c= this.endContainer,d=this.endOffset;CKEDITOR.env.ie&&c.type==CKEDITOR.NODE_TEXT&&(c=CKEDITOR.tools.rtrim(c.substring(d)),l.test(c)&&this.trim(1,0));a||this.trim();a=new CKEDITOR.dom.elementPath(this.endContainer,this.root);c=this.clone();c.collapse(!1);c.setEndAt(a.block||a.blockLimit,CKEDITOR.POSITION_BEFORE_END);a=new CKEDITOR.dom.walker(c);a.evaluator=f();return a.checkForward()},getPreviousNode:function(a,c,d){var b=this.clone();b.collapse(1);b.setStartAt(d||this.root,CKEDITOR.POSITION_AFTER_START); d=new CKEDITOR.dom.walker(b);d.evaluator=a;d.guard=c;return d.previous()},getNextNode:function(a,c,d){var b=this.clone();b.collapse();b.setEndAt(d||this.root,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(b);d.evaluator=a;d.guard=c;return d.next()},checkReadOnly:function(){function a(c,g){for(;c;){if(c.type==CKEDITOR.NODE_ELEMENT){if("false"==c.getAttribute("contentEditable")&&!c.data("cke-editable"))return 0;if(c.is("html")||"true"==c.getAttribute("contentEditable")&&(c.contains(g)||c.equals(g)))break}c= c.getParent()}return 1}return function(){var c=this.startContainer,d=this.endContainer;return!(a(c,d)&&a(d,c))}}(),moveToElementEditablePosition:function(a,c){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var b=0;a;){if(a.type==CKEDITOR.NODE_TEXT){c&&this.endContainer&&this.checkEndOfBlock()&&l.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,c?CKEDITOR.POSITION_AFTER_END: CKEDITOR.POSITION_BEFORE_START);b=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),b=1;else if(c&&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,f=b,h=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&& (h=e[c?"getLast":"getFirst"](d));f||h||(h=e[c?"getPrevious":"getNext"](d));a=h}return!!b},moveToClosestEditablePosition:function(a,c){var d,b=0,e,f,h=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(d=new CKEDITOR.dom.range(this.root),d.moveToPosition(a,h[c?0:1])):d=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))b=1;else if(e=d[c?"getNextEditableNode":"getPreviousEditableNode"]())b=1,(f=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&&f&&e.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(d.setEnd(e,0),d.collapse()):d.moveToPosition(e,h[c?1:0]);b&&this.moveToRange(d);return!!b},moveToElementEditStart:function(a){return this.moveToElementEditablePosition(a)},moveToElementEditEnd:function(a){return this.moveToElementEditablePosition(a,!0)},getEnclosedNode:function(){var a=this.clone();a.optimize();if(a.startContainer.type!= CKEDITOR.NODE_ELEMENT||a.endContainer.type!=CKEDITOR.NODE_ELEMENT)return null;var a=new CKEDITOR.dom.walker(a),c=CKEDITOR.dom.walker.bookmark(!1,!0),d=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return d(a)&&c(a)};var b=a.next();a.reset();return b&&b.equals(a.previous())?b: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:a(),getPreviousEditableNode:a(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.getTouchedStartNode(),d=this.getTouchedEndNode(),b=c.getAscendant("table",!0),d=d.getAscendant("table",!0);return b&&!this.root.contains(b)?null:this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):b&&d&&(b.equals(d)||b.contains(d)||d.contains(b))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a= new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,d,b,e=this.clone();e.optimize();(b=e.startContainer.type==CKEDITOR.NODE_TEXT)?(d=e.startContainer.getText(),c=e.startContainer.split(e.startOffset),a.insertAfter(e.startContainer)):e.insertNode(a);a.scrollIntoView();b&&(e.startContainer.setText(d),c.remove());a.remove()},getClientRects:function(){function a(c,d){var g=CKEDITOR.tools.array.map(c,function(a){return a}),b=new CKEDITOR.dom.range(d.root),e,f, n;d.startContainer instanceof CKEDITOR.dom.element&&(f=0===d.startOffset&&d.startContainer.hasAttribute("data-widget"));d.endContainer instanceof CKEDITOR.dom.element&&(n=(n=d.endOffset===(d.endContainer.getChildCount?d.endContainer.getChildCount():d.endContainer.length))&&d.endContainer.hasAttribute("data-widget"));f&&b.setStart(d.startContainer.getParent(),d.startContainer.getIndex());n&&b.setEnd(d.endContainer.getParent(),d.endContainer.getIndex()+1);if(f||n)d=b;b=d.cloneContents().find("[data-cke-widget-id]").toArray(); if(b=CKEDITOR.tools.array.map(b,function(a){var c=d.root.editor;a=a.getAttribute("data-cke-widget-id");return c.widgets.instances[a].element}))return b=CKEDITOR.tools.array.map(b,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;e=this.root.getDocument().$.createRange();e.setStart(c.getParent().$,c.getIndex());e.setEnd(c.getParent().$,c.getIndex()+1);c=e.getClientRects();c.widgetRect=a.getClientRect();return c},d),CKEDITOR.tools.array.forEach(b,function(a){function c(b){CKEDITOR.tools.array.forEach(g, function(c,e){var f=CKEDITOR.tools.objectCompare(a[b],c);f||(f=CKEDITOR.tools.objectCompare(a.widgetRect,c));f&&(Array.prototype.splice.call(g,e,a.length-b,a.widgetRect),d=!0)});d||(barguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function h(a){var c=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return c.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return c}function f(a,c,b,e){a:{null== e&&(e=h(b));for(var m;m=e.shift();)if(m.getDtd().p){e={element:m,remaining:e};break a}e=null}if(!e)return 0;if((m=CKEDITOR.filter.instances[e.element.data("cke-filter")])&&!m.check(c))return f(a,c,b,e.remaining);c=new CKEDITOR.dom.range(e.element);c.selectNodeContents(e.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=m;a._.nestedEditable={element:e.element,container:b,remaining:e.remaining,iterator:c};return 1}function e(a,c,b){if(!c)return!1; a=a.clone();a.collapse(!b);return a.checkBoundaryOfElement(c,b?CKEDITOR.START:CKEDITOR.END)}var a=/^[\r\n\t ]+$/,m=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0),l=function(a){return m(a)&&k(a)},c={dd:1,dt:1,li:1};b.prototype={getNextParagraph:function(d){var g,b,h,k,p;d=d||"p";if(this._.nestedEditable){if(g=this._.nestedEditable.iterator.getNextParagraph(d))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,g;this.activeFilter=this.filter;if(f(this,d, this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(d);this._.nestedEditable=null}if(!this.range.root.getDtd()[d])return null;if(!this._.started){var t=this.range.clone();b=t.startPath();var r=t.endPath(),x=!t.collapsed&&e(t,b.block),u=!t.collapsed&&e(t,r.block,1);t.shrink(CKEDITOR.SHRINK_ELEMENT,!0);x&&t.setStartAt(b.block,CKEDITOR.POSITION_BEFORE_END);u&&t.setEndAt(r.block, CKEDITOR.POSITION_AFTER_START);b=t.endContainer.hasAscendant("pre",!0)||t.startContainer.hasAscendant("pre",!0);t.enlarge(this.forceBrBreak&&!b||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);t.collapsed||(b=new CKEDITOR.dom.walker(t.clone()),r=CKEDITOR.dom.walker.bookmark(!0,!0),b.evaluator=r,this._.nextNode=b.next(),b=new CKEDITOR.dom.walker(t.clone()),b.evaluator=r,b=b.previous(),this._.lastNode=b.getNextSourceNode(!0,null,t.root),this._.lastNode&&this._.lastNode.type== CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(r=this.range.clone(),r.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),r.checkEndOfBlock()&&(r=new CKEDITOR.dom.elementPath(r.endContainer,r.root),this._.lastNode=(r.block||r.blockLimit).getNextSourceNode(!0))),this._.lastNode&&t.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=t.document.createText(""),this._.lastNode.insertAfter(b)),t=null);this._.started= 1;b=t}r=this._.nextNode;t=this._.lastNode;for(this._.nextNode=null;r;){var x=0,u=r.hasAscendant("pre"),z=r.type!=CKEDITOR.NODE_ELEMENT,q=0;if(z)r.type==CKEDITOR.NODE_TEXT&&a.test(r.getText())&&(z=0);else{var v=r.getName();if(CKEDITOR.dtd.$block[v]&&"false"==r.getAttribute("contenteditable")){g=r;f(this,d,g);break}else if(r.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){if("br"==v)z=1;else if(!b&&!r.getChildCount()&&"hr"!=v){g=r;h=r.equals(t);break}b&&(b.setEndAt(r,CKEDITOR.POSITION_BEFORE_START), "br"!=v&&(this._.nextNode=r));x=1}else{if(r.getFirst()){b||(b=this.range.clone(),b.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));r=r.getFirst();continue}z=1}}z&&!b&&(b=this.range.clone(),b.setStartAt(r,CKEDITOR.POSITION_BEFORE_START));h=(!x||z)&&r.equals(t);if(b&&!x)for(;!r.getNext(l)&&!h;){v=r.getParent();if(v.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){x=1;z=0;h||v.equals(t);b.setEndAt(v,CKEDITOR.POSITION_BEFORE_END);break}r=v;z=1;h=r.equals(t);q=1}z&&b.setEndAt(r,CKEDITOR.POSITION_AFTER_END); r=this._getNextSourceNode(r,q,t);if((h=!r)||x&&b)break}if(!g){if(!b)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;g=new CKEDITOR.dom.elementPath(b.startContainer,b.root);r=g.blockLimit;x={div:1,th:1,td:1};g=g.block;!g&&r&&!this.enforceRealBlocks&&x[r.getName()]&&b.checkStartOfBlock()&&b.checkEndOfBlock()&&!r.equals(b.root)?g=r:!g||this.enforceRealBlocks&&g.is(c)?(g=this.range.document.createElement(d),b.extractContents().appendTo(g),g.trim(),b.insertNode(g),k=p=!0): "li"!=g.getName()?b.checkStartOfBlock()&&b.checkEndOfBlock()||(g=g.clone(!1),b.extractContents().appendTo(g),g.trim(),p=b.splitBlock(),k=!p.wasStartOfBlock,p=!p.wasEndOfBlock,b.insertNode(g)):h||(this._.nextNode=g.equals(t)?null:this._getNextSourceNode(b.getBoundaryNodes().endNode,1,t))}k&&(k=g.getPrevious())&&k.type==CKEDITOR.NODE_ELEMENT&&("br"==k.getName()?k.remove():k.getLast()&&"br"==k.getLast().$.nodeName.toLowerCase()&&k.getLast().remove());p&&(k=g.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&& "br"==k.getName()&&(!CKEDITOR.env.needsBrFiller||k.getPrevious(m)||k.getNext(m))&&k.remove();this._.nextNode||(this._.nextNode=h||g.equals(t)||!t?null:this._getNextSourceNode(g,1,t));return g},_getNextSourceNode:function(a,c,b){function e(a){return!(a.equals(b)||a.equals(f))}var f=this.range.root;for(a=a.getNextSourceNode(c,null,e);!m(a);)a=a.getNextSourceNode(c,null,e);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new b(this)}}(),CKEDITOR.command=function(b,h){this.uiItems= [];this.exec=function(e){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&b.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,b,e)};this.refresh=function(b,a){if(!this.readOnly&&b.readOnly)return!0;if(this.context&&!a.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[b.mode]&&this.disable();return!1===this.fire("refresh",{editor:b,path:a})?!0:h.refresh&&!1!==h.refresh.apply(this, arguments)};var f;this.checkAllowed=function(e){return e||"boolean"!=typeof f?f=b.activeFilter.checkFeature(this):f};CKEDITOR.tools.extend(this,h,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!h.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(b){if(this.state==b||b!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=b;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 b(a,c,d,b,g){var e,f;a=[];for(e in c){f=c[e];f="boolean"==typeof f? {}:"function"==typeof f?{match:f}:K(f);"$"!=e.charAt(0)&&(f.elements=e);d&&(f.featureName=d.toLowerCase());var h=f;h.elements=k(h.elements,/\s+/)||null;h.propertiesOnly=h.propertiesOnly||!0===h.elements;var m=/\s*,\s*/,n=void 0;for(n in O){h[n]=k(h[n],m)||null;var r=h,v=I[n],l=k(h[I[n]],m),G=h[n],H=[],t=!0,y=void 0;l?t=!1:l={};for(y in G)"!"==y.charAt(0)&&(y=y.slice(1),H.push(y),l[y]=!0,t=!1);for(;y=H.pop();)G[y]=G["!"+y],delete G["!"+y];r[v]=(t?!1:l)||null}h.match=h.match||null;b.push(f);a.push(f)}c= g.elements;g=g.generic;var u;d=0;for(b=a.length;d=--c&&(m&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),n(b))},w=function(a,c){b[a]=1;var d=h[a];delete h[a];for(var g=0;g=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?d.$.onreadystatechange=function(){if("loaded"==d.$.readyState||"complete"== d.$.readyState)d.$.onreadystatechange=null,w(a,!0)}:(d.$.onload=function(){setTimeout(function(){d.$.onload=null;d.$.onerror=null;w(a,!0)},0)},d.$.onerror=function(){d.$.onload=null;d.$.onerror=null;w(a,!1)}));d.appendTo(CKEDITOR.document.getHead())}}};m&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t]+)>)|(?:!--([\S|\s]*?)--!?>)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}, function(){var b=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,h={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};CKEDITOR.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(f){for(var e,a,m=0,k;e=this._.htmlPartsRegex.exec(f);){a=e.index;if(a>m)if(m=f.substring(m,a),k)k.push(m);else this.onText(m); m=this._.htmlPartsRegex.lastIndex;if(a=e[1])if(a=a.toLowerCase(),k&&CKEDITOR.dtd.$cdata[a]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(a);continue}if(k)k.push(e[0]);else if(a=e[3]){if(a=a.toLowerCase(),!/="/.test(a)){var l={},c,d=e[4];e=!!e[5];if(d)for(;c=b.exec(d);){var g=c[1].toLowerCase();c=c[2]||c[3]||c[4]||"";l[g]=!c&&h[g]?g:CKEDITOR.tools.htmlDecodeAttr(c)}this.onTagOpen(a,l,e);!k&&CKEDITOR.dtd.$cdata[a]&&(k=[])}}else if(a=e[2])this.onComment(a)}if(f.length>m)this.onText(f.substring(m, f.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(b){this._.output.push("\x3c",b)},openTagClose:function(b,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(b,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",b,'\x3d"',h,'"')},closeTag:function(b){this._.output.push("\x3c/",b,"\x3e")},text:function(b){this._.output.push(b)},comment:function(b){this._.output.push("\x3c!--", b,"--\x3e")},write:function(b){this._.output.push(b)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(b){var h=this._.output.join("");b&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var b=this.parent.children,h=CKEDITOR.tools.indexOf(b,this),f=this.previous,e=this.next;f&&(f.next=e);e&&(e.previous=f);b.splice(h,1);this.parent=null},replaceWith:function(b){var h=this.parent.children, f=CKEDITOR.tools.indexOf(h,this),e=b.previous=this.previous,a=b.next=this.next;e&&(e.next=b);a&&(a.previous=b);h[f]=b;b.parent=this.parent;this.parent=null},insertAfter:function(b){var h=b.parent.children,f=CKEDITOR.tools.indexOf(h,b),e=b.next;h.splice(f+1,0,this);this.next=b.next;this.previous=b;b.next=this;e&&(e.previous=this);this.parent=b.parent},insertBefore:function(b){var h=b.parent.children,f=CKEDITOR.tools.indexOf(h,b);h.splice(f,0,this);this.next=b;(this.previous=b.previous)&&(b.previous.next= this);b.previous=this;this.parent=b.parent},getAscendant:function(b){var h="function"==typeof b?b:"string"==typeof b?function(e){return e.name==b}:function(e){return e.name in b},f=this.parent;for(;f&&f.type==CKEDITOR.NODE_ELEMENT;){if(h(f))return f;f=f.parent}return null},wrapWith:function(b){this.replaceWith(b);b.add(this);return b},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(b){return b||{}}}}(),"use strict",CKEDITOR.htmlParser.comment= function(b){this.value=b;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(b,h){var f=this.value;if(!(f=b.onComment(h,f,this)))return this.remove(),!1;if("string"!=typeof f)return this.replaceWith(f),!1;this.value=f;return!0},writeHtml:function(b,h){h&&this.filter(h);b.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(b){this.value=b;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(b,h){if(!(this.value=b.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(b,h){h&&this.filter(h);b.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(b){this.value=b};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(b){b.write(this.value)}})}(),"use strict", CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function b(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var h=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),f={ol:1,ul:1},e=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),a={ul:"li", ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml=function(m,k,l){function c(a){var c;if(0k;k++)if(h=a[k]){h= h.exec(b,e,this);if(!1===h)return null;if(h&&h!=e)return this.onNode(b,h);if(e.parent&&!e.name)break}return e},onNode:function(b,e){var a=e.type;return a==CKEDITOR.NODE_ELEMENT?this.onElement(b,e):a==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(b,e.value,e)):a==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(b,e.value,e)):null},onAttribute:function(b,e,a,h){return(a=this.attributesRules[a])?a.exec(b,h,e,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=b;b.prototype= {add:function(b,e,a){this.rules.splice(this.findIndex(e),0,{value:b,priority:e,options:a})},addMany:function(b,e,a){for(var h=[this.findIndex(e),0],k=0,l=b.length;k/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(I,function(a,c){return decodeURIComponent(c)})}function y(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function(a){return"\x3c!--"+u+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function w(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function p(a,c){var d=c._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)}).replace(/\{cke_protected_(\d+)\}/g,function(a,c){return d&&d[c]||""})}function t(a,c){var d=[],b=c.config.protectedSource,g=c._.dataStore||(c._.dataStore= {id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,b=[/|$)/gi,//gi,//gi].concat(b);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(d.push(a)-1)+"--\x3e"});for(var f=0;f]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,c){g[g.id]=decodeURIComponent(c);return"{cke_protected_"+g.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,d,b,g){return"\x3c"+d+b+"\x3e"+p(w(g),c)+"\x3c/"+d+"\x3e"})}var r;CKEDITOR.htmlDataProcessor=function(a){var c, e,f=this;this.editor=a;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=e=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(B);c.addRules(D,{applyToAll:!0});c.addRules(b(a,"data"),{applyToAll:!0});e.addRules(A);e.addRules(E,{applyToAll:!0});e.addRules(b(a,"html"),{applyToAll:!0});a.on("toHtml",function(c){c=c.data;var b=c.dataValue,e,b=r(b),b=t(b,a),b=g(b,O),b=d(b),b=g(b,C),b=b.replace(M,"$1cke:$2"),b=b.replace(H,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), b=b.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),b=b.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=c.context||a.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",b="\x3cpre\x3e"+b+"\x3c/pre\x3e",f=1);e=a.document.createElement(e);e.setHtml("a"+b);b=e.getHtml().substr(1);b=b.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(b=b.replace(/^
|<\/pre>$/gi,""));b=b.replace(Q,"$1$2");b=n(b);b=w(b);e=!1===c.fixForBody?!1:
h(c.enterMode,a.config.autoParagraph);b=CKEDITOR.htmlParser.fragment.fromHtml(b,c.context,e);e&&(f=b,!f.children.length&&CKEDITOR.dtd[f.name][e]&&(e=new CKEDITOR.htmlParser.element(e),f.add(e)));c.dataValue=b},null,null,5);a.on("toHtml",function(c){c.data.filter.applyTo(c.data.dataValue,!0,c.data.dontFilter,c.data.enterMode)&&a.fire("dataFiltered")},null,null,6);a.on("toHtml",function(a){a.data.dataValue.filterChildren(f.dataFilter,!0)},null,null,10);a.on("toHtml",function(a){a=a.data;var c=a.dataValue,
d=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(d);c=d.getHtml(!0);a.dataValue=y(c)},null,null,15);a.on("toDataFormat",function(c){var d=c.data.dataValue;c.data.enterMode!=CKEDITOR.ENTER_BR&&(d=d.replace(/^
/i,""));c.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(d,c.data.context,h(c.data.enterMode,a.config.autoParagraph))},null,null,5);a.on("toDataFormat",function(a){a.data.dataValue.filterChildren(f.htmlFilter,!0)},null,null,10);a.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, !1,!0)},null,null,11);a.on("toDataFormat",function(c){var d=c.data.dataValue,b=f.writer;b.reset();d.writeChildrenHtml(b);d=b.getHtml(!0);d=w(d);d=p(d,a);c.data.dataValue=d},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,d,b){var g=this.editor,e,f,h,m;c&&"object"==typeof c?(e=c.context,d=c.fixForBody,b=c.dontFilter,f=c.filter,h=c.enterMode,m=c.protectedWhitespaces):e=c;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:d,dontFilter:b, filter:f||g.filter,enterMode:h||g.enterMode,protectedWhitespaces:m}).dataValue},toDataFormat:function(a,c){var d,b,g;c&&(d=c.context,b=c.filter,g=c.enterMode);d||null===d||(d=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:b||this.editor.filter,context:d,enterMode:g||this.editor.enterMode}).dataValue},protectSource:function(a){return t(a,this.editor)},unprotectSource:function(a){return p(a,this.editor)},unprotectRealComments:function(a){return w(a)}};var x= /(?: |\xa0)$/,u="{cke_protected}",z=CKEDITOR.dtd,q="caption colgroup col thead tfoot tbody".split(" "),v=CKEDITOR.tools.extend({},z.$blockLimit,z.$block),B={elements:{input:l,textarea:l}},D={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var c=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===c.indexOf("javascript")||0===c.indexOf("data"))a.attributes["data-cke-pa-src"]= a.attributes.src,delete a.attributes.src}}}},A={elements:{embed:function(a){var c=a.parent;if(c&&"object"==c.name){var d=c.attributes.width,c=c.attributes.height;d&&(a.attributes.width=d);c&&(a.attributes.height=c)}},a:function(a){var c=a.attributes;if(!(a.children.length||c.name||c.id||a.attributes["data-cke-saved-name"]))return!1}}},E={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var c= a.attributes;if(c){if(c["data-cke-temp"])return!1;for(var d=["name","href","src"],b,g=0;gb?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"== a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck;delete a.attributes.contenteditable},style:function(a){var c=a.children[0];c&&c.value&&(c.value=CKEDITOR.tools.trim(c.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var c=a.children[0];!c&&k(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:c,textarea:c},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g, ""))||!1}}};CKEDITOR.env.ie&&(E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g,function(a){return a.toLowerCase()})});var F=/<(a|area|img|input|source)\b([^>]*)>/gi,K=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,L=/^(href|src|name)$/i,C=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,O=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,I=/([^<]*)<\/cke:encoded>/gi,M=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi, Q=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,H=/]*?)\/?>(?!\s*<\/cke:\1)/gi;r=function(){function a(d){return CKEDITOR.tools.array.reduce(d.split(""),function(a,d){var b=d.toLowerCase(),g=d.toUpperCase(),e=c(b);b!==g&&(e+="|"+c(g));return a+("("+e+")")},"")}function c(a){var d;d=a.charCodeAt(0);var b=d.toString(16);d={htmlCode:"\x26#"+d+";?",hex:"\x26#x0*"+b+";?",entity:{"\x3c":"\x26lt;","\x3e":"\x26gt;",":":"\x26colon;"}[a]};for(var g in d)d[g]&&(a+="|"+d[g]);return a}var d= new RegExp("("+a("\x3ccke:encoded\x3e")+"(.*?)"+a("\x3c/cke:encoded\x3e")+")|("+a("\x3c")+a("/")+"?"+a("cke:encoded\x3e")+")","gi"),b=new RegExp("(("+a("{cke_protected")+")(_[0-9]*)?"+a("}")+")","gi");return function(a){return a.replace(d,"").replace(b,"")}}()}(),"use strict",CKEDITOR.htmlParser.element=function(b,h){this.name=b;this.attributes=h||{};this.children=[];var f=b||"",e=f.match(/^cke:(.*)/);e&&(f=e[1]);f=!!(CKEDITOR.dtd.$nonBodyContent[f]||CKEDITOR.dtd.$block[f]||CKEDITOR.dtd.$listItem[f]|| CKEDITOR.dtd.$tableContent[f]||CKEDITOR.dtd.$nonEditable[f]||"br"==f);this.isEmpty=!!CKEDITOR.dtd.$empty[b];this.isUnknown=!CKEDITOR.dtd[b];this._={isBlockLike:f,hasInlineStarted:this.isEmpty||!f}},CKEDITOR.htmlParser.cssStyle=function(b){var h={};((b instanceof CKEDITOR.htmlParser.element?b.attributes.style:b)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(b,e,a){"font-family"==e&&(a=a.replace(/["']/g,""));h[e.toLowerCase()]=a});return{rules:h,populate:function(b){var e= this.toString();e&&(b instanceof CKEDITOR.dom.element?b.setAttribute("style",e):b instanceof CKEDITOR.htmlParser.element?b.attributes.style=e:b.style=e)},toString:function(){var b=[],e;for(e in h)h[e]&&b.push(e,":",h[e],";");return b.join("")}}},function(){function b(b){return function(a){return a.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof b?a.name==b:a.name in b)}}var h=function(b,a){b=b[0];a=a[0];return ba?1:0},f=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:f.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(b,a){var f=this,h,l;a=f.getFilterContext(a);if(!f.parent)b.onRoot(a,f);for(;;){h=f.name;if(!(l=b.onElementName(a,h)))return this.remove(),!1;f.name=l;if(!(f=b.onElement(a,f)))return this.remove(),!1;if(f!==this)return this.replaceWith(f),!1;if(f.name==h)break;if(f.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(f), !1;if(!f.name)return this.replaceWithChildren(),!1}h=f.attributes;var c,d;for(c in h){for(l=h[c];;)if(d=b.onAttributeName(a,c))if(d!=c)delete h[c],c=d;else break;else{delete h[c];break}d&&(!1===(l=b.onAttribute(a,f,d,l))?delete h[d]:h[d]=l)}f.isEmpty||this.filterChildren(b,!1,a);return!0},filterChildren:f.filterChildren,writeHtml:function(b,a){a&&this.filter(a);var f=this.name,k=[],l=this.attributes,c,d;b.openTag(f,l);for(c in l)k.push([c,l[c]]);b.sortAttributes&&k.sort(h);c=0;for(d=k.length;cCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),c());else if(this.hasFocus)this.focus(),a();else this.once("focus",function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document); a={doc:this.getDocument(),range:a.clone()};z.eol.detect(a,this);z.bogus.exclude(a);z.cell.shrink(a);a.fragment=a.range.cloneContents();z.tree.rebuild(a,this);z.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var b=q,d={range:a,doc:a.document},g=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),g;a.enlarge(CKEDITOR.ENLARGE_INLINE,1);b.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var e=this.editor.createRange(); e.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=e.createBookmark();b.list.detectMerge(d,this);b.table.detectRanges(d,this);b.block.detectMerge(d,this);d.tableContentsRanges?(b.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(b.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize();b.fixUneditableRangePosition(a);b.list.merge(d,this);b.table.purge(d,this);b.block.merge(d,this); if(c){b=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&b.block&&!a.root.equals(b.block)){a:{var d=b.block.getElementsByTag("span"),e=0,f;if(d)for(;f=d.getItem(e++);)if(!y(f)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(b.block,CKEDITOR.POSITION_BEFORE_START),b.block.remove())}else b.autoParagraph(this.editor,a),w(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings();return g},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var c= this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(c=c.replace(t,function(a,c){return c}));a.setData(c,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a,"beforeFocus",function(){var c=a.getSelection();(c=c&&c.getNative())&&"Control"==c.type||this.focus()}, this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO|| this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?k.$.styleSheet.cssText=h:k.setText(h)):(h=b.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),d.setCustomData("stylesheet",h),h.data("cke-temp",1))}d=b.getCustomData("stylesheet_ref")||0;b.setCustomData("stylesheet_ref", d+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var c=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");c&&2!=a.$.button&&c.isReadOnly()&&a.preventDefault()});var l={8:1,46:1};this.attachListener(a,"key",function(c){if(a.readOnly)return!0;var b=c.data.domEvent.getKey(),d;c=a.getSelection();if(0!==c.getRanges().length){if(b in l){var g,e=c.getRanges()[0],f=e.startPath(),h,k,r,b=8==b;CKEDITOR.env.ie&& 11>CKEDITOR.env.version&&(g=c.getSelectedElement())||(g=m(c))?(a.fire("saveSnapshot"),e.moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),g.remove(),e.select(),a.fire("saveSnapshot"),d=1):e.collapsed&&((h=f.block)&&(r=h[b?"getPrevious":"getNext"](n))&&r.type==CKEDITOR.NODE_ELEMENT&&r.is("table")&&e[b?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),e[b?"checkEndOfBlock":"checkStartOfBlock"]()&&h.remove(),e["moveToElementEdit"+(b?"End":"Start")](r),e.select(),a.fire("saveSnapshot"), d=1):f.blockLimit&&f.blockLimit.is("td")&&(k=f.blockLimit.getAscendant("table"))&&e.checkBoundaryOfElement(k,b?CKEDITOR.START:CKEDITOR.END)&&(r=k[b?"getPrevious":"getNext"](n))?(a.fire("saveSnapshot"),e["moveToElementEdit"+(b?"End":"Start")](r),e.checkStartOfBlock()&&e.checkEndOfBlock()?r.remove():e.select(),a.fire("saveSnapshot"),d=1):(k=f.contains(["td","th","caption"]))&&e.checkBoundaryOfElement(k,b?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}});a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&& this.attachListener(this,"keyup",function(c){c.data.getKeystroke()in l&&!this.getFirst(e)&&(this.appendBogus(),c=a.createRange(),c.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),c.select())});this.attachListener(this,"dblclick",function(c){if(a.readOnly)return!1;c={element:c.data.getTarget()};a.fire("doubleclick",c)});CKEDITOR.env.ie&&this.attachListener(this,"click",f);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(c){var b=c.data.getTarget();b.is("img","hr", "input","textarea","select")&&!b.isReadOnly()&&(a.getSelection().selectElement(b),b.is("input","textarea","select")&&c.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(c){(c=c.data.getTarget())&&c.is("img")&&!c.isReadOnly()&&a.getSelection().selectElement(c)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(c){if(2==c.data.$.button&&(c=c.data.getTarget(),!c.getAscendant("table")&&!c.getOuterHtml().replace(t,""))){var b=a.createRange();b.moveToElementEditStart(c); b.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(a,"key",function(c){if(a.readOnly)return!0;var b=c.data.domEvent.getKey();if(b in l&&(c=a.getSelection(),0!==c.getRanges().length)){var b=8==b,d=c.getRanges()[0];c=d.startPath();if(d.collapsed)a:{var e= c.block;if(e&&d[b?"checkStartOfBlock":"checkEndOfBlock"](!0)&&d.moveToClosestEditablePosition(e,!b)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(b?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){a.fire("saveSnapshot");f.remove();c=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))c=void 0;else{a.fire("saveSnapshot");var h;(h=(b?d:e).getBogus())&&h.remove();h=a.getSelection();f=h.createBookmarks();(b?e:d).moveChildren(b? d:e,!1);c.lastElement.mergeSiblings();g(e,d,!b);h.selectBookmarks(f);c=!0}}else c=!1}else b=d,h=c.block,d=b.endPath().block,h&&d&&!h.equals(d)?(a.fire("saveSnapshot"),(e=h.getBogus())&&e.remove(),b.enlarge(CKEDITOR.ENLARGE_INLINE),b.deleteContents(),d.getParent()&&(d.moveChildren(h,!1),c.lastElement.mergeSiblings(),g(h,d,!0)),b=a.getSelection().getRanges()[0],b.collapse(1),b.optimize(),""===b.startContainer.getHtml()&&b.startContainer.appendBogus(),b.select(),c=!0):c=!1;if(!c)return;a.getSelection().scrollIntoView(); a.fire("saveSnapshot");return!1}},this,null,100)}},getUniqueId:function(){var a;try{this._.expandoNumber=a=CKEDITOR.dom.domObject.prototype.getUniqueId.call(this)}catch(c){a=this._&&this._.expandoNumber}return a}},_:{cleanCustomData:function(){this.removeClass("cke_editable");this.restoreAttrs();for(var a=this.removeCustomData("classes");a&&a.length;)this.removeClass(a.pop());if(!this.is("textarea")){var a=this.getDocument(),c=a.getHead();if(c.getCustomData("stylesheet")){var b=a.getCustomData("stylesheet_ref"); --b?a.setCustomData("stylesheet_ref",b):(a.removeCustomData("stylesheet_ref"),c.removeCustomData("stylesheet").remove())}}}}});CKEDITOR.editor.prototype.editable=function(a){var c=this._.editable;if(c&&a)return 0;if(!arguments.length)return c;a?c=a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),c=null);return this._.editable=c};CKEDITOR.on("instanceLoaded",function(a){var c=a.editor;c.on("insertElement",function(a){a=a.data;a.type==CKEDITOR.NODE_ELEMENT&&(a.is("input")|| a.is("textarea"))&&("false"!=a.getAttribute("contentEditable")&&a.data("cke-editable",a.hasAttribute("contenteditable")?"true":"1"),a.setAttribute("contentEditable",!1))});c.on("selectionChange",function(a){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),b(a),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var c=a.editor;c.on("mode",function(){var a=c.editable();if(a&&a.isInline()){var b=c.title;a.changeAttr("role", "textbox");a.changeAttr("aria-multiline","true");a.changeAttr("aria-label",b);b&&a.changeAttr("title",b);var d=c.fire("ariaEditorHelpLabel",{}).label;if(d&&(b=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var g=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");b.append(d);a.changeAttr("aria-describedby",g)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"); n=CKEDITOR.dom.walker.whitespaces(!0);y=CKEDITOR.dom.walker.bookmark(!1,!0);w=CKEDITOR.dom.walker.empty();p=CKEDITOR.dom.walker.bogus();t=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;r=function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var g,e,f,h,n=[],k=d.range.startContainer;g=d.range.startPath();for(var k=m[k.getName()],l=0,r=c.getChildren(),t=r.count(),y=-1,u=-1,q=0,x=g.contains(m.$list);l< t;++l)g=r.getItem(l),a(g)?(f=g.getName(),x&&f in CKEDITOR.dtd.$list?n=n.concat(b(g,d)):(h=!!k[f],"br"!=f||!g.data("cke-eol")||l&&l!=t-1||(q=(e=l?n[l-1].node:r.getItem(l+1))&&(!a(e)||!e.is("br")),e=e&&a(e)&&m.$block[e.getName()]),-1!=y||h||(y=l),h||(u=l),n.push({isElement:1,isLineBreak:q,isBlock:g.isBlockBoundary(),hasBlockSibling:e,node:g,name:f,allowed:h}),e=q=0)):n.push({isElement:0,node:g,allowed:1});-1CKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var g=d.startContainer,e=g.getAscendant("table",1),f=!1;b(e.getElementsByTag("td"));b(e.getElementsByTag("th"));e=d.clone();e.setStart(g,0);e=a(e).lastBackward();e||(e=d.clone(),e.setEndAt(g,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),f=!0);e||(e=g);e.is("table")?(d.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),d.collapse(!0),e.remove()):(e.is({tbody:1,thead:1,tfoot:1})&&(e=c(e,"tr",f)),e.is("tr")&& (e=c(e,e.getParent().is("thead")?"th":"td",f)),(g=e.getBogus())&&g.remove(),d.moveToPosition(e,f?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();u=function(){function a(c){c=new CKEDITOR.dom.walker(c);c.guard=function(a,c){if(c)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};c.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is(CKEDITOR.dtd.$listItem)};return c}return function(c){var b=c.startContainer,d=!1,g;g= c.clone();g.setStart(b,0);g=a(g).lastBackward();g||(g=c.clone(),g.setEndAt(b,CKEDITOR.POSITION_BEFORE_END),g=a(g).lastForward(),d=!0);g||(g=b);g.is(CKEDITOR.dtd.$list)?(c.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),c.collapse(!0),g.remove()):((b=g.getBogus())&&b.remove(),c.moveToPosition(g,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),c.select())}}();z={eol:{detect:function(a,c){var b=a.range,d=b.clone(),g=b.clone(),e=new CKEDITOR.dom.elementPath(b.startContainer,c),f=new CKEDITOR.dom.elementPath(b.endContainer, c);d.collapse(1);g.collapse();e.block&&d.checkBoundaryOfElement(e.block,CKEDITOR.END)&&(b.setStartAfter(e.block),a.prependEolBr=1);f.block&&g.checkBoundaryOfElement(f.block,CKEDITOR.START)&&(b.setEndBefore(f.block),a.appendEolBr=1)},fix:function(a,c){var b=c.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(b),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(b),1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}}, bogus:{exclude:function(a){var c=a.range.getBoundaryNodes(),b=c.startNode,c=c.endNode;!c||!p(c)||b&&b.equals(c)||a.range.setEndBefore(c)}},tree:{rebuild:function(a,c){var b=a.range,d=b.getCommonAncestor(),g=new CKEDITOR.dom.elementPath(d,c),e=new CKEDITOR.dom.elementPath(b.startContainer,c),b=new CKEDITOR.dom.elementPath(b.endContainer,c),f;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(g.blockLimit.is({tr:1,table:1})){var h=g.contains("table").getParent();f=function(a){return!a.equals(h)}}else if(g.block&& g.block.is(CKEDITOR.dtd.$listItem)&&(e=e.contains(CKEDITOR.dtd.$list),b=b.contains(CKEDITOR.dtd.$list),!e.equals(b))){var n=g.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(n)}}f||(f=function(a){return!a.equals(g.block)&&!a.equals(g.blockLimit)});this.rebuildFragment(a,c,d,f)},rebuildFragment:function(a,c,b,d){for(var g;b&&!b.equals(c)&&d(b);)g=b.clone(0,1),a.fragment.appendTo(g),a.fragment=g,b=b.getParent()}},cell:{shrink:function(a){a=a.range;var c=a.startContainer,b=a.endContainer, d=a.startOffset,g=a.endOffset;c.type==CKEDITOR.NODE_ELEMENT&&c.equals(b)&&c.is("tr")&&++d==g&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};q=function(){function a(c,b){var d=c.getParent();if(d.is(CKEDITOR.dtd.$inline))c[b?"insertBefore":"insertAfter"](d)}function c(b,d,g){a(d);a(g,1);for(var e;e=g.getNext();)e.insertAfter(d),d=e;w(b)&&b.remove()}function b(a,c){var d=new CKEDITOR.dom.range(a);d.setStartAfter(c.startNode);d.setEndBefore(c.endNode);return d}return{list:{detectMerge:function(a,c){var d=b(c,a.bookmark), g=d.startPath(),e=d.endPath(),f=g.contains(CKEDITOR.dtd.$list),h=e.contains(CKEDITOR.dtd.$list);a.mergeList=f&&h&&f.getParent().equals(h.getParent())&&!f.equals(h);a.mergeListItems=g.block&&e.block&&g.block.is(CKEDITOR.dtd.$listItem)&&e.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=d.createBookmark()},merge:function(a,b){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode, g=a.mergeListBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(g,b);if(a.mergeList){var h=e.contains(CKEDITOR.dtd.$list),n=f.contains(CKEDITOR.dtd.$list);h.equals(n)||(n.moveChildren(h),n.remove())}a.mergeListItems&&(e=e.contains(CKEDITOR.dtd.$listItem),f=f.contains(CKEDITOR.dtd.$listItem),e.equals(f)||c(f,d,g));d.remove();g.remove()}}},block:{detectMerge:function(a,c){if(!a.tableContentsRanges&&!a.mergeListBookmark){var b=new CKEDITOR.dom.range(c);b.setStartBefore(a.bookmark.startNode); b.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=b.createBookmark()}},merge:function(a,b){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,g=a.mergeBlockBookmark.endNode,e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(g,b),e=e.block,f=f.block;e&&f&&!e.equals(f)&&c(f,d,g);d.remove();g.remove()}}},table:function(){function a(b){var g=[],e,f=new CKEDITOR.dom.walker(b),h=b.startPath().contains(d),n=b.endPath().contains(d),m={};f.guard=function(a, f){if(a.type==CKEDITOR.NODE_ELEMENT){var k="visited_"+(f?"out":"in");if(a.getCustomData(k))return;CKEDITOR.dom.element.setMarker(m,a,k,1)}if(f&&h&&a.equals(h))e=b.clone(),e.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!f&&n&&a.equals(n))e=b.clone(),e.setStartAt(n,CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(k=!f)k=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||c(a,h))&&(!n||c(a,n));if(!k&&(k=f))if(a.is(d))var k=h&&h.getAscendant("table",!0),l=n&&n.getAscendant("table",!0),r=a.getAscendant("table", !0),k=k&&k.contains(r)||l&&l.contains(r);else k=void 0;k&&(e=b.clone(),e.selectNodeContents(a),g.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(m);return g}function c(a,b){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,g=a.getPosition(b);return g===CKEDITOR.POSITION_IDENTICAL?!1:0===(g&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,b=c.clone();b.enlarge(CKEDITOR.ENLARGE_ELEMENT);var b=new CKEDITOR.dom.walker(b),g=0;b.evaluator=function(a){a.type== CKEDITOR.NODE_ELEMENT&&a.is(d)&&++g};b.checkForward();if(1e&&g&&g.intersectsNode(b.$)){var f= [{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}];d.anchorNode==b.$&&d.anchorOffset>e&&(f[0].offset-=e);d.focusNode==b.$&&d.focusOffset>e&&(f[1].offset-=e)}}b.setText(y(b.getText(),1));f&&(b=a.getDocument().$,d=b.getSelection(),b=b.createRange(),b.setStart(f[0].node,f[0].offset),b.collapse(!0),d.removeAllRanges(),d.addRange(b),d.extend(f[1].node,f[1].offset))}}function y(a,c){return c?a.replace(z,function(a,c){return c?" ":""}):a.replace(u,"")}function w(a,c){var b= c&&CKEDITOR.tools.htmlEncode(c)||"\x26nbsp;",b=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px;width:0;height:0;overflow:hidden;")+'"\x3e'+b+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(b);var d=a.getSelection(1),g=a.createRange(),e=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);g.setStartAt(b,CKEDITOR.POSITION_AFTER_START); g.setEndAt(b,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([g]);e.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=b}function p(a){var c={37:1,39:1,8:1,46:1};return function(b){var d=b.data.getKeystroke();if(c[d]){var g=a.getSelection(),e=g.getRanges()[0];g.isCollapsed()&&(e=e[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&e.type==CKEDITOR.NODE_ELEMENT&&"false"==e.getAttribute("contenteditable")&&(g=g.getStartElement(),!g.isBlockBoundary()||""!==(void 0===g.$.textContent? g.$.innerText:g.$.textContent)||8!==d&&46!==d||(g.remove(),a.fire("saveSnapshot")),a.getSelection().fake(e),b.data.preventDefault(),b.cancel())}}}function t(a){for(var c=0;c=d.getLength()?h.setStartAfter(d):h.setStartBefore(d));g&&g.type==CKEDITOR.NODE_TEXT&&(f?h.setEndAfter(g):h.setEndBefore(g));d=new CKEDITOR.dom.walker(h);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&&d.isReadOnly()){var g=b.clone();b.setEndBefore(d);b.collapsed&&a.splice(c--,1);d.getPosition(h.endContainer)&CKEDITOR.POSITION_CONTAINS||(g.setStartAfter(d),g.collapsed||a.splice(c+1,0,g));return!0}return!1}; d.next()}}return a}var r="function"!=typeof window.getSelection,x=1,u=CKEDITOR.tools.repeat("​",7),z=new RegExp(u+"( )?","g"),q,v,B,D=CKEDITOR.dom.walker.invisible(1),A=function(){function a(c){return function(a){var b=a.editor.createRange();b.moveToClosestEditablePosition(a.selected,c)&&a.editor.getSelection().selectRanges([b]);return!1}}function c(a){return function(c){var b=c.editor,d=b.createRange(),g;if(!b.readOnly)return(g=d.moveToClosestEditablePosition(c.selected,a))||(g=d.moveToClosestEditablePosition(c.selected, !a)),g&&b.getSelection().selectRanges([d]),b.fire("saveSnapshot"),c.selected.remove(),g||(d.moveToElementEditablePosition(b.editable()),b.getSelection().selectRanges([d])),b.fire("saveSnapshot"),!1}}var b=a(),d=a(1);return{37:b,38:b,39:d,40:d,8:c(),46:c(1)}}();CKEDITOR.on("instanceCreated",function(a){function c(){var a=b.getSelection();a&&a.removeAllRanges()}var b=a.editor;b.on("contentDom",function(){function a(){u=new CKEDITOR.dom.selection(b.getSelection());u.lock()}function c(){f.removeListener("mouseup", c);t.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement()&&b.parentElement().ownerDocument==e.$&&b.select()}function d(a){var c,b;c=(c=this.document.getActive())?"input"===c.getName()||"textarea"===c.getName():!1;c||(c=this.getSelection(1),(b=g(c))&&!b.equals(h)&&(c.selectElement(b),a.data.preventDefault()))}function g(a){a=a.getRanges()[0];return a?(a=a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")}, !0))&&"false"===a.getAttribute("contenteditable")?a:null:null}var e=b.document,f=CKEDITOR.document,h=b.editable(),l=e.getBody(),t=e.getDocumentElement(),y=h.isInline(),q,u;CKEDITOR.env.gecko&&h.attachListener(h,"focus",function(a){a.removeListener();0!==q&&(a=b.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==h.$&&(a=b.createRange(),a.moveToElementEditStart(h),a.select())},null,null,-2);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){if(q&&(CKEDITOR.env.webkit|| CKEDITOR.env.gecko)){q=b._.previousActive&&b._.previousActive.equals(e.getActive());var a=null!=b._.previousScrollTop&&b._.previousScrollTop!=h.$.scrollTop;CKEDITOR.env.webkit&&q&&a&&(h.$.scrollTop=b._.previousScrollTop)}b.unlockSelection(q);q=0},null,null,-1);h.attachListener(h,"mousedown",function(){q=0});if(CKEDITOR.env.ie||CKEDITOR.env.gecko||y)r?h.attachListener(h,"beforedeactivate",a,null,null,-1):h.attachListener(b,"selectionCheck",a,null,null,-1),h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko? "focusout":"blur",function(){var a=u&&(u.isFake||2>u.getRanges().length);CKEDITOR.env.gecko&&!y&&a||(b.lockSelection(u),q=1)},null,null,-1),h.attachListener(h,"mousedown",function(){q=0});if(CKEDITOR.env.ie&&!y){var x;h.attachListener(h,"mousedown",function(a){2==a.data.$.button&&((a=b.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(x=b.window.getScrollPosition()))});h.attachListener(h,"mouseup",function(a){2==a.data.$.button&&x&&(b.document.$.documentElement.scrollLeft=x.x,b.document.$.documentElement.scrollTop= x.y);x=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var v,w;t.on("mousedown",function(a){function c(a){a=a.data.$;if(v){var b=l.$.createTextRange();try{b.moveToPoint(a.clientX,a.clientY)}catch(d){}v.setEndPoint(0>w.compareEndPoints("StartToStart",b)?"EndToEnd":"StartToStart",b);v.select()}}function b(){t.removeListener("mousemove",c);f.removeListener("mouseup",b);t.removeListener("mouseup",b);v.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)t.on("mousedown",function(a){a.data.getTarget().is("html")&&(f.on("mouseup",c),t.on("mouseup",c))})}}h.attachListener(h,"selectionchange",m,b);h.attachListener(h,"keyup",k,b);h.attachListener(h,"touchstart",k,b);h.attachListener(h,"touchend",k,b);CKEDITOR.env.ie&&h.attachListener(h, "keydown",d,b);h.attachListener(h,CKEDITOR.env.webkit||CKEDITOR.env.gecko?"focusin":"focus",function(){b.forceNextSelectionCheck();b.selectionChange(1)});if(y&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var z;h.attachListener(h,"mousedown",function(){z=1});h.attachListener(e.getDocumentElement(),"mouseup",function(){z&&k.call(b);z=0})}else h.attachListener(CKEDITOR.env.ie?h:e.getDocumentElement(),"mouseup",k,b);CKEDITOR.env.webkit&&h.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:h.hasFocus&& n(h)}},null,null,-1);h.attachListener(h,"keydown",p(b),null,null,-1)});b.on("setData",function(){b.unlockSelection();CKEDITOR.env.webkit&&c()});b.on("contentDomUnload",function(){b.unlockSelection()});if(CKEDITOR.env.ie9Compat)b.on("beforeDestroy",c,null,null,9);b.on("dataReady",function(){delete b._.fakeSelection;delete b._.hiddenSelectionContainer;b.selectionChange(1)});b.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),c=b.editable().getLast(a);c&&c.hasAttribute("data-cke-hidden-sel")&& (c.remove(),CKEDITOR.env.gecko&&(a=b.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);b.on("key",function(a){if("wysiwyg"==b.mode){var c=b.getSelection();if(c.isFake){var d=A[a.data.keyCode];if(d)return d({editor:b,selected:c.getSelectedElement(),selection:c,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var c=a.editor;c.on("selectionChange",function(){var a=c.editable(),b=a.getCustomData("cke-fillingChar"); b&&(b.getCustomData("ready")?(n(a),a.editor.fire("selectionCheck")):b.setCustomData("ready",1))},null,null,-1);c.on("beforeSetMode",function(){n(c.editable())},null,null,-1);c.on("getSnapshot",function(a){a.data&&(a.data=y(a.data))},c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=y(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?m:k).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.getSelectedRanges=function(a){var c=this.getSelection();return c&&c.getRanges(a)||[]};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var c=this._.savedSelection;return c? (c.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath};CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT= 3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var c=a;a=a.root}var b=a instanceof CKEDITOR.dom.element;this.rev=c?c.rev:x++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=b?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(c)return CKEDITOR.tools.extend(this._.cache,c._.cache),this.isFake=c.isFake,this.isLocked=c.isLocked,this;a=this.getNative();var d,g;if(a)if(a.getRangeAt)d=(g=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(g.commonAncestorContainer); else{try{g=a.createRange()}catch(e){}d=g&&CKEDITOR.dom.element.get(g.item&&g.item(0)||g.parentElement())}if(!d||d.type!=CKEDITOR.NODE_ELEMENT&&d.type!=CKEDITOR.NODE_TEXT||!this.root.equals(d)&&!this.root.contains(d))this._.cache.type=CKEDITOR.SELECTION_NONE,this._.cache.startElement=null,this._.cache.selectedElement=null,this._.cache.selectedText="",this._.cache.ranges=new CKEDITOR.dom.rangeList;return this};var E={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1, select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1};CKEDITOR.tools.extend(CKEDITOR.dom.selection,{_removeFillingCharSequenceString:y,_createFillingCharSequenceNode:g,FILLING_CHAR_SEQUENCE:u});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=r?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:r?function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_NONE; try{var b=this.getNative(),d=b.type;"Text"==d&&(c=CKEDITOR.SELECTION_TEXT);"Control"==d&&(c=CKEDITOR.SELECTION_ELEMENT);b.createRange().parentElement()&&(c=CKEDITOR.SELECTION_TEXT)}catch(g){}return a.type=c}:function(){var a=this._.cache;if(a.type)return a.type;var c=CKEDITOR.SELECTION_TEXT,b=this.getNative();if(!b||!b.rangeCount)c=CKEDITOR.SELECTION_NONE;else if(1==b.rangeCount){var b=b.getRangeAt(0),d=b.startContainer;d==b.endContainer&&1==d.nodeType&&1==b.endOffset-b.startOffset&&E[d.childNodes[b.startOffset].nodeName.toLowerCase()]&& (c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=r?function(){function a(c){return(new CKEDITOR.dom.node(c)).getIndex()}var c=function(c,b){c=c.duplicate();c.collapse(b);var d=c.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var g=d.children,e,f,h=c.duplicate(),n=0,m=g.length-1,k=-1,l,r;n<=m;)if(k=Math.floor((n+m)/2),e=g[k],h.moveToElementText(e),l=h.compareEndPoints("StartToStart",c),0l)n=k+1;else return{container:d,offset:a(e)}; if(-1==k||k==g.length-1&&0>l){h.moveToElementText(d);h.setEndPoint("StartToStart",c);h=h.text.replace(/(\r\n|\r)/g,"\n").length;g=d.childNodes;if(!h)return e=g[g.length-1],e.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:g.length}:{container:e,offset:e.nodeValue.length};for(d=g.length;0d.length?this.selectElement(b):this.selectRanges(d))}},reset:function(){this._.cache={};this.isFake=0;var a=this.root.editor;if(a&&a._.fakeSelection)if(this.rev==a._.fakeSelection.rev){delete a._.fakeSelection; var c=a._.hiddenSelectionContainer;if(c){var b=a.checkDirty();a.fire("lockSnapshot");c.remove();a.fire("unlockSnapshot");!b&&a.resetDirty()}delete a._.hiddenSelectionContainer}else CKEDITOR.warn("selection-fake-reset");this.rev=x++},selectElement:function(a){var c=new CKEDITOR.dom.range(this.root);c.setStartBefore(a);c.setEndAfter(a);this.selectRanges([c])},selectRanges:function(c){var b=this.root.editor,e=b&&b._.hiddenSelectionContainer;this.reset();if(e)for(var e=this.root,f,m=0;m]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g, " ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(e);e.$.outerHTML="\x3cpre\x3e"+f+"\x3c/pre\x3e";e.copyAttributes(h.getFirst());e=h.getFirst().remove()}else e.setHtml(f);c=e}else f?c=y(b?[a.getHtml()]:g(a),c):a.moveChildren(c);c.replace(a);if(d){var b=c,k;(k=b.getPrevious(C))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=n(k.getHtml(),/\n$/,"")+"\n\n"+n(b.getHtml(),/^\n/,""),CKEDITOR.env.ie?b.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e": b.setHtml(d),k.remove())}else b&&r(c)}function g(a){var c=[];n(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,c,b){return c+"\x3c/pre\x3e"+b+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,b){c.push(b)});return c}function n(a,c,b){var d="",g="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,c,b){c&&(d=c);b&&(g=b);return""});return d+a.replace(c,b)+g}function y(a,c){var b; 1=b&&a<=e}function a(a){a=a.toString(16);return 1==a.length?"0"+a:a}CKEDITOR.tools.color=CKEDITOR.tools.createClass({$:function(a,b){this._.initialColorCode=a;this._.defaultValue=b;this._.parseInput(a)},proto:{getHex:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatHexString(a[0],a[1],a[2])},getHexWithAlpha:function(){if(!this._.isValidColor)return this._.defaultValue; var a=Math.round(this._.alpha*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE);return this._.formatHexString(this._.red,this._.green,this._.blue,a)},getRgb:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha);return this._.formatRgbString("rgb",a[0],a[1],a[2])},getRgba:function(){return this._.isValidColor?this._.formatRgbString("rgba",this._.red,this._.green,this._.blue,this._.alpha):this._.defaultValue},getHsl:function(){if(!this._.isValidColor)return this._.defaultValue; var a=this._.blendAlphaColor(this._.red,this._.green,this._.blue,this._.alpha),a=this._.rgbToHsl(a[0],a[1],a[2]);return this._.formatHslString("hsl",a[0],a[1],a[2])},getHsla:function(){if(!this._.isValidColor)return this._.defaultValue;var a=this._.rgbToHsl(this._.red,this._.green,this._.blue);return this._.formatHslString("hsla",a[0],a[1],a[2],this._.alpha)},getInitialValue:function(){return this._.initialColorCode}},_:{initialColorCode:"",isValidColor:!0,red:0,green:0,blue:0,alpha:1,blendAlphaColor:function(a, b,e,c){return CKEDITOR.tools.array.map([a,b,e],function(a){return Math.round(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-c*(CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE-a))})},formatHexString:function(b,e,f,c){b="#"+a(b)+a(e)+a(f);void 0!==c&&(b+=a(c));return b.toUpperCase()},formatRgbString:function(a,b,e,c,d){b=[b,e,c];void 0!==d&&b.push(d);return a+"("+b.join(",")+")"},formatHslString:function(a,b,e,c,d){return a+"("+b+","+e+"%,"+c+"%"+(void 0!==d?","+d:"")+")"},parseInput:function(a){if("string"!== typeof a)this._.isValidColor=!1;else{a=CKEDITOR.tools.trim(a);var b=this._.matchStringToNamedColor(a);b&&(a=b);var b=this._.extractColorChannelsFromHex(a),e=this._.extractColorChannelsFromRgba(a);a=this._.extractColorChannelsFromHsla(a);(a=b||e||a)?(this._.red=a[0],this._.green=a[1],this._.blue=a[2],this._.alpha=a[3]):this._.isValidColor=!1}},matchStringToNamedColor:function(a){return CKEDITOR.tools.color.namedColors[a.toLowerCase()]||null},extractColorChannelsFromHex:function(a){a.match(CKEDITOR.tools.color.hex3CharsRegExp)&& (a=this._.hex3ToHex6(a));if(!a.match(CKEDITOR.tools.color.hex6CharsRegExp)&&!a.match(CKEDITOR.tools.color.hex8CharsRegExp))return null;a=a.split("");var b=1;a[7]&&a[8]&&(b=parseInt(a[7]+a[8],16),b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,b=Number(b.toFixed(1)));return[parseInt(a[1]+a[2],16),parseInt(a[3]+a[4],16),parseInt(a[5]+a[6],16),b]},extractColorChannelsFromRgba:function(a){var e=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.rgbRegExp);if(!e||(a=0===a.indexOf("rgba"))&&4!== e.length||!a&&3!==e.length)return null;var f=b(e[0],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),c=b(e[1],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),d=b(e[2],CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE),g=1;a&&(g=h(e[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));return this._.areColorChannelsValid(f,c,d,g)?[f,c,d,g]:null},extractColorChannelsFromHsla:function(a){var e=this._.extractColorChannelsByPattern(a,CKEDITOR.tools.color.hslRegExp);if(!e||(a=0===a.indexOf("hsla"))&&4!==e.length||!a&&3!== e.length)return null;var f=b(e[0],CKEDITOR.tools.color.MAX_HUE_CHANNEL_VALUE),c=h(e[1],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),d=h(e[2],CKEDITOR.tools.color.MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE),g=1,f=this._.hslToRgb(f,c,d);a&&(g=h(e[3],CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE));f.push(g);return this._.areColorChannelsValid(f[0],f[1],f[2],f[3])?f:null},hex3ToHex6:function(a){a=a.split("");return"#"+a[1]+a[1]+a[2]+a[2]+a[3]+a[3]},extractColorChannelsByPattern:function(a, b){var e=a.match(b);if(!e)return null;e=e[2].split(",");return e=CKEDITOR.tools.array.map(e,function(a){return CKEDITOR.tools.trim(a)})},areColorChannelsValid:function(a,b,f,c){return e(a,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&e(b,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&e(f,0,CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)&&e(c,0,CKEDITOR.tools.color.MAX_ALPHA_CHANNEL_VALUE)},hslToRgb:function(a,b,e){var c=function(c){var g=(c+a/30)%12;c=b*Math.min(e,1-e);g=Math.min(g-3,9-g,1);g=Math.max(-1, g);return Math.round((e-c*g)*CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE)};return[c(0),c(8),c(4)]},rgbToHsl:function(a,b,e){a/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;b/=CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE;var c=e/CKEDITOR.tools.color.MAX_RGB_CHANNEL_VALUE,d=Math.max(a,b,c),g=Math.min(a,b,c);e=d-g;var f=0;switch(d){case a:f=(b-c)/e%6;break;case b:f=(c-a)/e+2;break;case c:f=(a-b)/e+4}a=0===e?0:60*f;b=(d+g)/2;d=0;1!==b&&0!==b&&(d=e/(1-Math.abs(2*b-1)));a=Math.round(a);d=100*Math.round(d);return[a, d,100*b]}},statics:{MAX_RGB_CHANNEL_VALUE:255,MAX_ALPHA_CHANNEL_VALUE:1,MAX_HUE_CHANNEL_VALUE:360,MAX_SATURATION_LIGHTNESS_CHANNEL_VALUE:1,hex3CharsRegExp:/#([0-9a-f]{3}$)/gim,hex6CharsRegExp:/#([0-9a-f]{6}$)/gim,hex8CharsRegExp:/#([0-9a-f]{8}$)/gim,rgbRegExp:/(rgb[a]?)\(([.,\d\s%]*)\)/i,hslRegExp:/(hsl[a]?)\(([.,\d\s%]*)\)/i,namedColors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD", blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F", darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082", ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6", magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA", palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F", steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"}}});CKEDITOR.tools.style.parse._colors=CKEDITOR.tools.color.namedColors}(),CKEDITOR.dom.comment=function(b,h){"string"==typeof b&&(b=(h?h.$:document).createComment(b));CKEDITOR.dom.domObject.call(this,b)},CKEDITOR.dom.comment.prototype=new CKEDITOR.dom.node,CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype, {type:CKEDITOR.NODE_COMMENT,getOuterHtml:function(){return"\x3c!--"+this.$.nodeValue+"--\x3e"}}),"use strict",function(){var b={},h={},f;for(f in CKEDITOR.dtd.$blockLimit)f in CKEDITOR.dtd.$list||(b[f]=1);for(f in CKEDITOR.dtd.$block)f in CKEDITOR.dtd.$blockLimit||f in CKEDITOR.dtd.$empty||(h[f]=1);CKEDITOR.dom.elementPath=function(e,a){var f=null,k=null,l=[],c=e,d;a=a||e.getDocument().getBody();c||(c=a);do if(c.type==CKEDITOR.NODE_ELEMENT){l.push(c);if(!this.lastElement&&(this.lastElement=c,c.is(CKEDITOR.dtd.$object)|| "false"==c.getAttribute("contenteditable")))continue;if(c.equals(a))break;if(!k&&(d=c.getName(),"true"==c.getAttribute("contenteditable")?k=c:!f&&h[d]&&(f=c),b[d])){if(d=!f&&"div"==d){a:{d=c.getChildren();for(var g=0,n=d.count();g=e?(m=a.createText(""),m.insertAfter(this)):(b=a.createText(""),b.insertAfter(m),b.remove()));return m},substring:function(b,h){return"number"!=typeof h?this.$.nodeValue.substr(b):this.$.nodeValue.substring(b,h)}}),function(){function b(b,e,a){var h=b.serializable,k=e[a?"endContainer":"startContainer"],l=a?"endOffset":"startOffset",c=h?e.document.getById(b.startNode):b.startNode;b=h?e.document.getById(b.endNode):b.endNode;k.equals(c.getPrevious())?(e.startOffset=e.startOffset- k.getLength()-b.getPrevious().getLength(),k=b.getNext()):k.equals(b.getPrevious())&&(e.startOffset-=k.getLength(),k=b.getNext());k.equals(c.getParent())&&e[l]++;k.equals(b.getParent())&&e[l]++;e[a?"endContainer":"startContainer"]=k;return e}CKEDITOR.dom.rangeList=function(b){if(b instanceof CKEDITOR.dom.rangeList)return b;b?b instanceof CKEDITOR.dom.range&&(b=[b]):b=[];return CKEDITOR.tools.extend(b,h)};var h={createIterator:function(){var b=this,e=CKEDITOR.dom.walker.bookmark(),a=[],h;return{getNextRange:function(k){h= void 0===h?0:h+1;var l=b[h];if(l&&1c?-1:1}),f=0,h;fCKEDITOR.env.version?a[k].$.styleSheet.cssText+=h:a[k].$.innerHTML+=h}}var m={};CKEDITOR.skin={path:b,loadPart:function(a,c){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]? CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(b()+"skin.js"),function(){f(a,c)}):f(a,c)},getPath:function(a){return CKEDITOR.getUrl(h(a))},icons:{},addIcon:function(a,c,b,e){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:c,offset:b||0,bgsize:e||"16px"})},getIconStyle:function(a,c,b,e,f){var h;a&&(a=a.toLowerCase(),c&&(h=this.icons[a+"-rtl"]),h||(h=this.icons[a]));a=b||h&&h.path||"";e=e||h&&h.offset;f=f||h&&h.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+ "');background-position:0 "+e+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(b){var g=e(CKEDITOR.document);return(this.setUiColor=function(b){this.uiColor=b;var d=CKEDITOR.skin.chameleon,e="",f="";"function"==typeof d&&(e=d(this,"editor"),f=d(this,"panel"));b=[[c,b]];a([g],e,b);a(l,f,b)}).call(this,b)}});var k="cke_ui_color",l=[],c=/\$color/g;CKEDITOR.on("instanceLoaded",function(b){if(!CKEDITOR.env.ie|| !CKEDITOR.env.quirks){var g=b.editor;b=function(b){b=(b.data[0]||b.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!b.getById("cke_ui_color")){var d=e(b);l.push(d);g.on("destroy",function(){l=CKEDITOR.tools.array.filter(l,function(a){return d!==a})});(b=g.getUiColor())&&a([d],CKEDITOR.skin.chameleon(g,"panel"),[[c,b]])}};g.on("panelShow",b);g.on("menuShow",b);g.config.uiColor&&g.setUiColor(g.config.uiColor)}})}(),function(){var b=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);b.appendTo(CKEDITOR.document.getHead());try{var h=b.getComputedStyle("border-top-color"),f=b.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=f)}catch(e){CKEDITOR.env.hc=!1}b.remove();CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(b=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;hh;h++){var k=h,l;l=parseInt(a[h],16);l=("0"+(0>e?0|l*(1+e):0|l+(255-l)*e).toString(16)).slice(-2);a[k]=l}return"#"+a.join("")}}(),h={editor:new CKEDITOR.template("{id}.cke_chrome [border-color:{defaultBorder};] {id} .cke_top [ background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_bottom [background-color:{defaultBackground};border-top-color:{defaultBorder};] {id} .cke_resizer [border-right-color:{ckeResizer}] {id} .cke_dialog_title [background-color:{defaultBackground};border-bottom-color:{defaultBorder};] {id} .cke_dialog_footer [background-color:{defaultBackground};outline-color:{defaultBorder};] {id} .cke_dialog_tab [background-color:{dialogTab};border-color:{defaultBorder};] {id} .cke_dialog_tab:hover [background-color:{lightBackground};] {id} .cke_dialog_contents [border-top-color:{defaultBorder};] {id} .cke_dialog_tab_selected, {id} .cke_dialog_tab_selected:hover [background:{dialogTabSelected};border-bottom-color:{dialogTabSelectedBorder};] {id} .cke_dialog_body [background:{dialogBody};border-color:{defaultBorder};] {id} a.cke_button_off:hover,{id} a.cke_button_off:focus,{id} a.cke_button_off:active [background-color:{darkBackground};border-color:{toolbarElementsBorder};] {id} .cke_button_on [background-color:{ckeButtonOn};border-color:{toolbarElementsBorder};] {id} .cke_toolbar_separator,{id} .cke_toolgroup a.cke_button:last-child:after,{id} .cke_toolgroup a.cke_button.cke_button_disabled:hover:last-child:after [background-color: {toolbarElementsBorder};border-color: {toolbarElementsBorder};] {id} a.cke_combo_button:hover,{id} a.cke_combo_button:focus,{id} .cke_combo_on a.cke_combo_button [border-color:{toolbarElementsBorder};background-color:{darkBackground};] {id} .cke_combo:after [border-color:{toolbarElementsBorder};] {id} .cke_path_item [color:{elementsPathColor};] {id} a.cke_path_item:hover,{id} a.cke_path_item:focus,{id} a.cke_path_item:active [background-color:{darkBackground};] {id}.cke_panel [border-color:{defaultBorder};] "), panel:new CKEDITOR.template(".cke_panel_grouptitle [background-color:{lightBackground};border-color:{defaultBorder};] .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menubutton:hover,.cke_menubutton:focus,.cke_menubutton:active [background-color:{menubuttonHover};] .cke_menubutton:hover .cke_menubutton_icon, .cke_menubutton:focus .cke_menubutton_icon, .cke_menubutton:active .cke_menubutton_icon [background-color:{menubuttonIconHover};] .cke_menubutton_disabled:hover .cke_menubutton_icon,.cke_menubutton_disabled:focus .cke_menubutton_icon,.cke_menubutton_disabled:active .cke_menubutton_icon [background-color:{menubuttonIcon};] .cke_menuseparator [background-color:{menubuttonIcon};] a:hover.cke_colorbox, a:active.cke_colorbox [border-color:{defaultBorder};] a:hover.cke_colorauto, a:hover.cke_colormore, a:active.cke_colorauto, a:active.cke_colormore [background-color:{ckeColorauto};border-color:{defaultBorder};] ")}; return function(f,e){var a=b(f.uiColor,.4),a={id:"."+f.id,defaultBorder:b(a,-.2),toolbarElementsBorder:b(a,-.25),defaultBackground:a,lightBackground:b(a,.8),darkBackground:b(a,-.15),ckeButtonOn:b(a,.4),ckeResizer:b(a,-.4),ckeColorauto:b(a,.8),dialogBody:b(a,.7),dialogTab:b(a,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-.6),menubuttonHover:b(a,.1),menubuttonIcon:b(a,.5),menubuttonIconHover:b(a,.3)};return h[e].output(a).replace(/\[/g,"{").replace(/\]/g,"}")}}(), CKEDITOR.plugins.add("dialogui",{onLoad:function(){var b=function(a){this._||(this._={});this._["default"]=this._.initValue=a["default"]||"";this._.required=a.required||!1;for(var b=[this._],g=1;garguments.length)){var f=b.call(this,d);f.labelId=CKEDITOR.tools.getNextId()+ "_label";this._.children=[];var h={role:d.role||"presentation"};d.includeLabel&&(h["aria-labelledby"]=f.labelId);CKEDITOR.ui.dialog.uiElement.call(this,a,d,g,"div",null,h,function(){var b=[],g=d.required?" cke_required":"";"horizontal"!=d.labelLayout?b.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" ',' id\x3d"'+f.labelId+'"',f.inputId?' for\x3d"'+f.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,a,d),"\x3c/div\x3e"):(g={type:"hbox",widths:d.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" id\x3d"'+f.labelId+'" for\x3d"'+f.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,a,d)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(a,g,b));return b.join("")})}},textInput:function(a,d,g){if(!(3>arguments.length)){b.call(this,d);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",f={"class":"cke_dialog_ui_input_"+d.type,id:e,type:d.type};d.validate&&(this.validate=d.validate);d.maxLength&&(f.maxlength=d.maxLength);d.size&&(f.size=d.size);d.inputStyle&&(f.style=d.inputStyle);var h=this,k=!1;a.on("load",function(){h.getInputElement().on("keydown", function(a){13==a.data.getKeystroke()&&(k=!0)});h.getInputElement().on("keyup",function(b){13==b.data.getKeystroke()&&k&&(a.getButton("ok")&&setTimeout(function(){a.getButton("ok").click()},0),k=!1);h.bidi&&l.call(h,b)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,a,d,g,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 ");f["aria-labelledby"]=this._.labelId;this._.required&& (f["aria-required"]=this._.required);for(var c in f)a.push(c+'\x3d"'+f[c]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(a,d,g){if(!(3>arguments.length)){b.call(this,d);var e=this,f=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",h={};d.validate&&(this.validate=d.validate);h.rows=d.rows||5;h.cols=d.cols||20;h["class"]="cke_dialog_ui_input_textarea "+(d["class"]||"");"undefined"!=typeof d.inputStyle&&(h.style=d.inputStyle);d.dir&&(h.dir=d.dir);if(e.bidi)a.on("load", function(){e.getInputElement().on("keyup",l)},e);CKEDITOR.ui.dialog.labeledElement.call(this,a,d,g,function(){h["aria-labelledby"]=this._.labelId;this._.required&&(h["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',f,'" '],c;for(c in h)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(h[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(a, d,g){if(!(3>arguments.length)){var e=b.call(this,d,{"default":!!d["default"]});d.validate&&(this.validate=d.validate);CKEDITOR.ui.dialog.uiElement.call(this,a,d,g,"span",null,null,function(){var b=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),g=[],f=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};k(b);d["default"]&&(h.checked="checked");"undefined"!=typeof b.inputStyle&&(b.style=b.inputStyle); e.checkbox=new CKEDITOR.ui.dialog.uiElement(a,b,g,"input",null,h);g.push(' \x3clabel id\x3d"',f,'" for\x3d"',h.id,'"'+(d.labelStyle?' style\x3d"'+d.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(d.label),"\x3c/label\x3e");return g.join("")})}},radio:function(a,d,g){if(!(3>arguments.length)){b.call(this,d);this._["default"]||(this._["default"]=this._.initValue=d.items[0][1]);d.validate&&(this.validate=d.validate);var e=[],f=this;d.role="radiogroup";d.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, a,d,g,function(){for(var b=[],g=[],h=(d.id?d.id:CKEDITOR.tools.getNextId())+"_radio",l=0;larguments.length)){var e=b.call(this,d);d.validate&&(this.validate=d.validate);e.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,a,d,g,function(){var b=CKEDITOR.tools.extend({},d,{id:d.id?d.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),g=[],f=[],h={id:e.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};g.push('\x3cdiv class\x3d"cke_dialog_ui_input_', d.type,'" role\x3d"presentation"');d.width&&g.push('style\x3d"width:'+d.width+'" ');g.push("\x3e");void 0!==d.size&&(h.size=d.size);void 0!==d.multiple&&(h.multiple=d.multiple);k(b);for(var l=0,m;larguments.length)){void 0===d["default"]&&(d["default"]="");var e=CKEDITOR.tools.extend(b.call(this,d),{definition:d,buttons:[]});d.validate&&(this.validate=d.validate);a.on("load",function(){CKEDITOR.document.getById(e.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,a,d,g,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(a,d,g){var e=this;if(!(3>arguments.length)){b.call(this,d);d.validate&&(this.validate=d.validate);var f=CKEDITOR.tools.extend({},d),h=f.onClick;f.className=(f.className?f.className+" ":"")+"cke_dialog_ui_button";f.onClick=function(b){var g= d["for"];b=h?h.call(this,b):!1;!1!==b&&("xhr"!==b&&a.getContentElement(g[0],g[1]).submit(),this.disable())};a.on("load",function(){a.getContentElement(d["for"][0],d["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,a,f,g)}},html:function(){var a=/^\s*<[\w:]+\s+([^>]*)?>/,b=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,g=/\/$/;return function(e,f,h){if(!(3>arguments.length)){var k=[],l=f.html;"\x3c"!=l.charAt(0)&&(l="\x3cspan\x3e"+l+"\x3c/span\x3e");var m=f.focus;if(m){var x=this.focus; this.focus=function(){("function"==typeof m?m:x).call(this);this.fire("focus")};f.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,e,f,k,"span",null,null,"");k=k.join("").match(a);l=l.match(b)||["","",""];g.test(l[1])&&(l[1]=l[1].slice(0,-1),l[2]="/"+l[2]);h.push([l[1]," ",k[1]||"",l[2]].join(""))}}}(),fieldset:function(a,b,g,e,f){var h=f.label;this._={children:b};CKEDITOR.ui.dialog.uiElement.call(this,a,f,e,"fieldset",null,null,function(){var a= [];h&&a.push("\x3clegend"+(f.labelStyle?' style\x3d"'+f.labelStyle+'"':"")+"\x3e"+h+"\x3c/legend\x3e");for(var c=0;cb.getChildCount()?(new CKEDITOR.dom.text(a,CKEDITOR.document)).appendTo(b):b.getChild(0).$.nodeValue= a;return this},getLabel:function(){var a=CKEDITOR.document.getById(this._.labelId);return!a||1>a.getChildCount()?"":a.getChild(0).getText()},eventProcessors:a},!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,g){var e=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),f=this.getInputElement().$;e.$.text=a;e.$.value=void 0===b||null===b?a:b;void 0===g||null===g?CKEDITOR.env.ie?f.add(e.$):f.add(e.$,null):f.add(e.$,g);return this},remove:function(a){this.getInputElement().$.remove(a); return this},clear:function(){for(var a=this.getInputElement().$;0b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function f(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;ck.width-n.width-f?k.width-n.width+("rtl"==e.lang.dir?0:h[1]):g.x;n=g.y+h[0]k.height-n.height-f?k.height-n.height+h[2]:g.y;l=Math.floor(l);n=Math.floor(n);a.move(l,n,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var d=null,g=null,e=a.getParentEditor(), f=e.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof f&&(f=20);a.parts.title.on("mousedown",function(e){if(!a._.moved){var f=a._.element;f.getFirst().setStyle("position","absolute");f.removeStyle("display");a._.moved=!0;a.layout()}d={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);g=a.getPosition();CKEDITOR.env.ie6Compat&&(f=E.getChild(0).getFrameDocument(),f.on("mousemove",b),f.on("mouseup",c));e.data.preventDefault()}, a)}function y(a){function b(c){var m="rtl"==e.lang.dir,r=l.width,t=l.height,q=r+(c.data.$.screenX-k.x)*(m?-1:1)*(a._.moved?1:2),R=t+(c.data.$.screenY-k.y)*(a._.moved?1:2),u=a._.element.getFirst(),u=m&&parseInt(u.getComputedStyle("right"),10),v=a.getPosition();v.x=v.x||0;v.y=v.y||0;v.y+R>n.height&&(R=n.height-v.y);(m?u:v.x)+q>n.width&&(q=n.width-(m?u:v.x));R=Math.floor(R);q=Math.floor(q);if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minWidth||0,q-f);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT|| g==CKEDITOR.DIALOG_RESIZE_BOTH)t=Math.max(d.minHeight||0,R-h);a.resize(r,t);a._.moved&&w(a,a._.position.x,a._.position.y);a._.moved||a.layout();c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);m&&(m.remove(),m=null);if(CKEDITOR.env.ie6Compat){var a=E.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var d=a.definition,g=d.resizable;if(g!=CKEDITOR.DIALOG_RESIZE_NONE){var e= a.getParentEditor(),f,h,n,k,l,m,r=CKEDITOR.tools.addFunction(function(d){function g(a){return a.isVisible()}l=a.getSize();var e=a.parts.contents,r=e.$.getElementsByTagName("iframe").length,t=!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks);r&&(m=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%; left:0; top:0;"\x3e\x3c/div\x3e'),e.append(m));h=l.height-a.parts.contents.getFirst(g).getSize("height",t); f=l.width-a.parts.contents.getFirst(g).getSize("width",1);k={x:d.screenX,y:d.screenY};n=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(e=E.getChild(0).getFrameDocument(),e.on("mousemove",b),e.on("mouseup",c));d.preventDefault&&d.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('+r+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(r)})}}function w(a,b,c){var d=a.parts.dialog.getParent().getClientSize(),g=a.getSize(),e=a._.viewportRatio,f=Math.max(d.width-g.width,0),d=Math.max(d.height-g.height,0);e.width=f?b/f:e.width;e.height=d?c/d:e.height; a._.viewportRatio=e}function p(a){a.data.preventDefault(1)}function t(a){var b=a.config,c=CKEDITOR.skinName||a.config.skin,d=b.dialog_backgroundCoverColor||("moono-lisa"==c?"black":"white"),c=b.dialog_backgroundCoverOpacity,g=b.baseFloatZIndex,b=CKEDITOR.tools.genKey(d,c,g),e=M[b];CKEDITOR.document.getBody().addClass("cke_dialog_open");e?e.show():(g=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",g,"; top: 0px; left: 0px; ","; width: 100%; height: 100%;", CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",g.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),g.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),g.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')), g.push("\x3c/div\x3e"),e=CKEDITOR.dom.element.createFromHtml(g.join("")),e.setOpacity(void 0!==c?c:.5),e.on("keydown",p),e.on("keypress",p),e.on("keyup",p),e.appendTo(CKEDITOR.document.getBody()),M[b]=e);a.focusManager.add(e);E=e;CKEDITOR.env.mac&&CKEDITOR.env.webkit||e.focus()}function r(a){CKEDITOR.document.getBody().removeClass("cke_dialog_open");E&&(a.focusManager.remove(E),E.hide())}function x(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,g=String.fromCharCode(a.data.$.keyCode); (b=Q[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+g])&&b.length&&(b=b[b.length-1],b.keydown&&b.keydown.call(b.uiElement,b.dialog,b.key),a.data.preventDefault())}function u(a){var b=a.data.$.ctrlKey||a.data.$.metaKey,c=a.data.$.altKey,d=a.data.$.shiftKey,g=String.fromCharCode(a.data.$.keyCode);(b=Q[(b?"CTRL+":"")+(c?"ALT+":"")+(d?"SHIFT+":"")+g])&&b.length&&(b=b[b.length-1],b.keyup&&(b.keyup.call(b.uiElement,b.dialog,b.key),a.data.preventDefault()))}function z(a,b,c,d,g){(Q[c]||(Q[c]=[])).push({uiElement:a, dialog:b,key:c,keyup:g||a.accessKeyUp,keydown:d||a.accessKeyDown})}function q(a){for(var b in Q){for(var c=Q[b],d=c.length-1;0<=d;d--)c[d].dialog!=a&&c[d].uiElement!=a||c.splice(d,1);0===c.length&&delete Q[b]}}function v(a,b){a._.accessKeyMap[b]&&a.selectPage(a._.accessKeyMap[b])}function B(){}var D=CKEDITOR.tools.cssLength,A,E,F=!1,K=!CKEDITOR.env.ie||CKEDITOR.env.edge,L='\x3cdiv class\x3d"cke_reset_all cke_dialog_container {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" style\x3d"'+(K? "display:flex":"")+'" 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"'+(K?"margin:auto":"position:absolute")+'" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; CKEDITOR.dialog=function(c,g){function e(){var a=E._.focusList;a.sort(function(a,b){return a.tabIndex!=b.tabIndex?b.tabIndex-a.tabIndex:a.focusIndex-b.focusIndex});for(var b=a.length,c=0;cb.length)){var c=E._.currentFocusIndex;E._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var g=c,e=1arguments.length)){var h=(d.call?d(b):d)||"div",n=["\x3c",h," "],k=(g&&g.call?g(b):g)||{},l=(e&&e.call?e(b):e)||{},m=(f&&f.call?f.call(this,a,b):f)||"",r=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(k.display="none",this.notAllowed=!0);l.id=r;var q={};b.type&&(q["cke_dialog_ui_"+b.type]=1);b.className&&(q[b.className]= 1);b.disabled&&(q.cke_disabled=1);for(var t=l["class"]&&l["class"].split?l["class"].split(" "):[],r=0;rCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;u.fire("focus");c&&this.addClass(c)});b.on("blur",function(){u.fire("blur"); c&&this.removeClass(c)})}});CKEDITOR.tools.extend(this,b);this.keyboardFocusable&&(this.tabIndex=b.tabIndex||0,this.focusIndex=a._.focusList.push(this)-1,this.on("focus",function(){a._.currentFocusIndex=u.focusIndex}))}},hbox:function(a,b,c,d,g){if(!(4>arguments.length)){this._||(this._={});var e=this._.children=b,f=g&&g.widths||null,h=g&&g.height||null,n,k={role:"presentation"};g&&g.align&&(k.align=g.align);CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"hbox"},d,"table",{},k,function(){var a= ['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(n=0;narguments.length)){this._||(this._={});var e=this._.children=b,f=g&&g.width||null,h=g&&g.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,g||{type:"vbox"},d,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" '];b.push('style\x3d"');g&&g.expand&&b.push("height:100%;"); b.push("width:"+D(f||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(g&&g.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var d=0;darguments.length)return this._.children.concat();a.splice||(a=[a]);return 2>a.length?this._.children[a[0]]:this._.children[a[0]]&&this._.children[a[0]].getChild?this._.children[a[0]].getChild(a.slice(1,a.length)):null}},!0);CKEDITOR.ui.dialog.vbox.prototype=new CKEDITOR.ui.dialog.hbox;(function(){var a={build:function(a,b,c){for(var d=b.children,g,e=[],f=[],h=0;hl.$.clientHeight?l.setStyle("overflow-y","hidden"):l.removeStyle("overflow-y"))}var a,m,k,l,c,d=b.config.autoGrow_bottomSpace||0,g=void 0!==b.config.autoGrow_minHeight?b.config.autoGrow_minHeight:200,n=b.config.autoGrow_maxHeight||Infinity,y=!b.config.autoGrow_maxHeight; b.addCommand("autogrow",{exec:e,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var w={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},p;for(p in w)b.on(p,function(c){"wysiwyg"==c.editor.mode&&setTimeout(function(){var c=b.getCommand("maximize");!b.window||c&&c.state==CKEDITOR.TRISTATE_ON?a=null:(e(),y||e())},100)});b.on("afterCommandExec",function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?l.removeStyle("overflow-y"):e())}); b.on("contentDom",f);f();b.config.autoGrow_onStartup&&b.editable().isVisible()&&b.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(h){if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)h.on("instanceReady",function(){h.editable().isInline()?h.ui.space("contents").setStyle("height","auto"):b(h)})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(b){var h=0,f=function(a,f,c,d){if(d){d=new CKEDITOR.style(d);var g=e[c];g.unshift(d);b.attachStyleStateChange(d,function(a){!b.readOnly&& b.getCommand(c).setState(a)});b.addCommand(c,new CKEDITOR.styleCommand(d,{contentForms:g}));b.ui.addButton&&b.ui.addButton(a,{label:f,command:c,toolbar:"basicstyles,"+(h+=10)})}},e={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"==a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"== a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},a=b.config,m=b.lang.basicstyles;f("Bold",m.bold,"bold",a.coreStyles_bold);f("Italic",m.italic,"italic",a.coreStyles_italic);f("Underline",m.underline,"underline",a.coreStyles_underline);f("Strike",m.strike,"strike",a.coreStyles_strike);f("Subscript",m.subscript,"subscript",a.coreStyles_subscript);f("Superscript",m.superscript,"superscript",a.coreStyles_superscript);b.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"], [CKEDITOR.CTRL+85,"underline"]])}}),CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"},CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"},CKEDITOR.config.coreStyles_underline={element:"u"},CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"},CKEDITOR.config.coreStyles_subscript={element:"sub"},CKEDITOR.config.coreStyles_superscript={element:"sup"},function(){var b={exec:function(b){var f=b.getCommand("blockquote").state,e=b.getSelection(),a=e&&e.getRanges()[0]; if(a){var m=e.createBookmarks();if(CKEDITOR.env.ie){var k=m[0].startNode,l=m[0].endNode,c;if(k&&"blockquote"==k.getParent().getName())for(c=k;c=c.getNext();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){k.move(c,!0);break}if(l&&"blockquote"==l.getParent().getName())for(c=l;c=c.getPrevious();)if(c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()){l.move(c);break}}var d=a.createIterator();d.enlargeBr=b.config.enterMode!=CKEDITOR.ENTER_BR;if(f==CKEDITOR.TRISTATE_OFF){for(k=[];f=d.getNextParagraph();)k.push(f); 1>k.length&&(f=b.document.createElement(b.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),l=m.shift(),a.insertNode(f),f.append(new CKEDITOR.dom.text("",b.document)),a.moveToBookmark(l),a.selectNodeContents(f),a.collapse(!0),l=a.createBookmark(),k.push(f),m.unshift(l));c=k[0].getParent();a=[];for(l=0;le||(this.notifications.splice(e,1),b.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,e=b.config,a=new CKEDITOR.dom.element("div");a.addClass("cke_notifications_area");a.setAttribute("id","cke_notifications_area_"+b.name);a.setStyle("z-index",e.baseFloatZIndex- 2);return a},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),e=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input);e.on("change",this._changeBuffer.input);e.on("floatingSpaceLayout",this._layout,this,null,20);e.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),e=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);e.removeListener("change",this._changeBuffer.input); e.removeListener("floatingSpaceLayout",this._layout);e.removeListener("blur",this._layout)},_layout:function(){function b(){e.setStyle("left",x(u+h.width-n-y))}var e=this.element,a=this.editor,h=a.ui.contentsElement.getClientRect(),k=a.ui.contentsElement.getDocumentPosition(),l,c,d=e.getClientRect(),g,n=this._notificationWidth,y=this._notificationMargin;g=CKEDITOR.document.getWindow();var w=g.getScrollPosition(),p=g.getViewPaneSize(),t=CKEDITOR.document.getBody(),r=t.getDocumentPosition(),x=CKEDITOR.tools.cssLength; n&&y||(g=this.element.getChild(0),n=this._notificationWidth=g.getClientRect().width,y=this._notificationMargin=parseInt(g.getComputedStyle("margin-left"),10)+parseInt(g.getComputedStyle("margin-right"),10));a.toolbar&&(l=a.ui.space(a.config.toolbarLocation),c=l.getClientRect());l&&l.isVisible()&&c.bottom>h.top&&c.bottomw.y?e.setStyles({position:"fixed",top:0}): e.setStyles({position:"absolute",top:x(k.y+h.height-d.height)});var u="fixed"==e.getStyle("position")?h.left:"static"!=t.getComputedStyle("position")?k.x-r.x:k.x;h.widthw.x+p.width?b():e.setStyle("left",x(u)):k.x+n+y>w.x+p.width?e.setStyle("left",x(u)):k.x+h.width/2+n/2+y>w.x+p.width?e.setStyle("left",x(u-k.x+w.x+p.width-n-y)):0>h.left+h.width-n-y?b():0>h.left+h.width/2-n/2?e.setStyle("left",x(u-k.x+w.x)):e.setStyle("left",x(u+h.width/2-n/2-y/2))}};CKEDITOR.plugins.notification=b}(), function(){var b='\x3ca id\x3d"{id}" class\x3d"cke_button cke_button__{name} cke_button_{state} {cls}"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' title\x3d"{title}" tabindex\x3d"-1" hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasArrow}" aria-disabled\x3d"{ariaDisabled}"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+= ' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var h="";CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var b=b+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"')+ '\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcutSpace}{ariaShortcut}\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"),e=CKEDITOR.addTemplate("button",b);CKEDITOR.plugins.add("button", {beforeInit:function(a){a.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(a){CKEDITOR.tools.extend(this,a,{title:a.label,click:a.click||function(b){b.execCommand(a.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(a){return new CKEDITOR.ui.button(a)}};CKEDITOR.ui.button.prototype={render:function(a,b){function h(){var b=a.mode;b&&(b=this.modes[b]?void 0!==l[b]?l[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=null,c=CKEDITOR.env,d=this._.id=CKEDITOR.tools.getNextId(),g="",n=this.command,y,w,p;this._.editor=a;var t={id:d,button:this,editor:a,focus:function(){CKEDITOR.document.getById(d).focus()},execute:function(){this.button.click(a)},attach:function(a){this.button.attach(a)}},r=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t,a.getKeystroke())}), x=CKEDITOR.tools.addFunction(function(a){var b;t.onfocus&&(b=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return b}),u=0;t.clickFn=y=CKEDITOR.tools.addFunction(function(){u&&(a.unlockSelection(1),u=0);t.execute();c.iOS&&a.focus()});this.modes?(l={},a.on("beforeModeUnload",function(){a.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(l[a.mode]=this._.state)},this),a.on("activeFilterChange",h,this),a.on("mode",h,this),!this.readOnly&&a.on("readOnly",h,this)):n&&(n=a.getCommand(n))&&(n.on("state",function(){this.setState(n.state)}, this),g+=n.state==CKEDITOR.TRISTATE_ON?"on":n.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var z;if(this.directional)a.on("contentDirChanged",function(b){var c=CKEDITOR.document.getById(this._.id),d=c.getFirst();b=b.data;b!=a.lang.dir?c.addClass("cke_"+b):c.removeClass("cke_ltr").removeClass("cke_rtl");d.setAttribute("style",CKEDITOR.skin.getIconStyle(z,"rtl"==b,this.icon,this.iconOffset))},this);n?(w=a.getCommandKeystroke(n))&&(p=CKEDITOR.tools.keystrokeToString(a.lang.common.keyboard,w)): g+="off";w=this.name||this.command;var q=null,v=this.icon;z=w;this.icon&&!/\./.test(this.icon)?(z=this.icon,v=null):(this.icon&&(q=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(q=this.iconHiDpi));q?(CKEDITOR.skin.addIcon(q,q),v=null):q=z;g={id:d,name:w,iconName:z,label:this.label,cls:(this.hasArrow?"cke_button_expandable ":"")+(this.className||""),state:g,ariaDisabled:"disabled"==g?"true":"false",title:this.title+(p?" ("+p.display+")":""),ariaShortcutSpace:p?"\x26nbsp;":"",ariaShortcut:p?a.lang.common.keyboardShortcut+ " "+p.aria:"",titleJs:c.gecko&&!c.hc?"":(this.title||"").replace("'",""),hasArrow:"string"===typeof this.hasArrow&&this.hasArrow||(this.hasArrow?"true":"false"),keydownFn:r,focusFn:x,clickFn:y,style:CKEDITOR.skin.getIconStyle(q,"rtl"==a.lang.dir,v,this.iconOffset),arrowHtml:this.hasArrow?f.output():""};e.output(g,b);if(this.onRender)this.onRender();return t},setState:function(a){if(this._.state==a)return!1;this._.state=a;var b=CKEDITOR.document.getById(this._.id);return b?(b.setState(a,"cke_button"), b.setAttribute("aria-disabled",a==CKEDITOR.TRISTATE_DISABLED),this.hasArrow?b.setAttribute("aria-expanded",a==CKEDITOR.TRISTATE_ON):a===CKEDITOR.TRISTATE_ON?b.setAttribute("aria-pressed",!0):b.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(a){if(this._.feature)return this._.feature;var b=this;this.allowedContent||this.requiredContent||!this.command||(b=a.getCommand(this.command)||b);return this._.feature=b}};CKEDITOR.ui.prototype.addButton=function(a, b){this.add(a,CKEDITOR.UI_BUTTON,b)}}(),function(){function b(a){function b(){for(var c=e(),d=CKEDITOR.tools.clone(a.config.toolbarGroups)||h(a),g=0;gb.order?-1:0>a.order?1:a.order]+data-cke-bookmark[^<]*?<\/span>/ig,"");e&&b(a,d)})}function B(){if("wysiwyg"==a.mode){var b=D("paste");a.getCommand("cut").setState(D("cut")); a.getCommand("copy").setState(D("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function D(b){var c=a.getSelection(),c=c&&c.getRanges()[0];if((a.readOnly||c&&c.checkReadOnly())&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED:CKEDITOR.TRISTATE_OFF}var A=CKEDITOR.plugins.clipboard,E=0,F=0;(function(){a.on("key", q);a.on("contentDom",c);a.on("selectionChange",B);if(a.contextMenu){a.contextMenu.addListener(function(){return{cut:D("cut"),copy:D("copy"),paste:D("paste")}});var b=null;a.on("menuShow",function(){b&&(b.removeListener(),b=null);var c=a.contextMenu.findItemByCommandName("paste");c&&c.element&&(b=c.element.on("touchend",function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b= CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,d,e,f,h){var n=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:n,command:d,toolbar:"clipboard,"+f});a.addMenuItems&&a.addMenuItem(d,{label:n,command:d,group:"clipboard",order:h})}b("Cut","cut",d("cut"),10,1);b("Copy","copy",d("copy"),20,4);b("Paste","paste",e(),30,8);a._.pasteButtons||(a._.pasteButtons=[]);a._.pasteButtons.push("Paste")})();a.getClipboardData= function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}function e(a){a.removeListener();a.cancel();c({type:h,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var f=!1,h="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();f=!0;h=a.data.type},null,null,1E3);a.on("paste",d,null,null,0);!1===z()&&(a.removeListener("paste",d),a._.forcePasteDialog&&f&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",e),a.on("dialogHide",function(a){a.removeListener(); a.data.removeListener("pasteDialogCommit",e);a.data._.committed||c(null)})):c(null))}}function f(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 c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e", ~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/(?!\u3000)\s+/g," ").replace(/> +/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 c(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 c(a.length/4)})+"\x3c/p\x3e"));return k(a,b)}function a(a){function b(){var a={},c;for(c in CKEDITOR.dtd)"$"!=c.charAt(0)&&"div"!=c&&"span"!= c&&(a[c]=1);return a}var c={};return{get:function(d){return"plain-text"==d?c.plainText||(c.plainText=new CKEDITOR.filter(a,"br")):"semantic-content"==d?((d=c.semanticContent)||(d=new CKEDITOR.filter(a,{}),d.allow({$1:{elements:b(),attributes:!0,styles:!1,classes:!1}}),d=c.semanticContent=d),d):d?new CKEDITOR.filter(a,d):null}}}function m(a,b,c){b=CKEDITOR.htmlParser.fragment.fromHtml(b);var d=new CKEDITOR.htmlParser.basicWriter;c.applyTo(b,!0,!1,a.activeEnterMode);b.writeHtml(d);return d.getHtml()} function k(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 l(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function c(a){var c=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function d(c,e,f){e.select();b(a,{dataTransfer:f,method:"drop"},1);f.sourceEditor.fire("saveSnapshot"); f.sourceEditor.editable().extractHtmlFromRange(c);f.sourceEditor.getSelection().selectRanges([c]);f.sourceEditor.fire("saveSnapshot")}function e(d,f){d.select();b(a,{dataTransfer:f,method:"drop"},1);c.resetDragDataTransfer()}function f(b,c,d){var e={$:b.data.$,target:b.data.getTarget()};c&&(e.dragRange=c);d&&(e.dropRange=d);!1===a.fire(b.name,e)&&b.data.preventDefault()}function h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()}var k=a.editable(),l=CKEDITOR.plugins.clipboard.getDropTarget(a), m=a.ui.space("top"),z=a.ui.space("bottom");c.preventDefaultDropOnElement(m);c.preventDefaultDropOnElement(z);k.attachListener(l,"dragstart",f);k.attachListener(a,"dragstart",c.resetDragDataTransfer,c,null,1);k.attachListener(a,"dragstart",function(b){c.initDragDataTransfer(b,a)},null,null,2);k.attachListener(a,"dragstart",function(){var b=c.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(c.dragStartContainerChildCount=b?h(b.startContainer):null,c.dragEndContainerChildCount= b?h(b.endContainer):null)},null,null,100);k.attachListener(l,"dragend",f);k.attachListener(a,"dragend",c.initDragDataTransfer,c,null,1);k.attachListener(a,"dragend",c.resetDragDataTransfer,c,null,100);k.attachListener(l,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&&a.data.preventDefault()}}); k.attachListener(l,"drop",function(b){if(!b.data.$.defaultPrevented&&(b.data.preventDefault(),!a.readOnly)){var d=b.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=c.getRangeAtDropPosition(b,a),e=c.dragRange;d&&f(b,e,d)}}},null,null,9999);k.attachListener(a,"drop",c.initDragDataTransfer,c,null,1);k.attachListener(a,"drop",function(b){if(b=b.data){var f=b.dropRange,h=b.dragRange,k=b.dataTransfer;k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL?setTimeout(function(){c.internalDrop(h, f,k,a)},0):k.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?d(h,f,k):e(f,k)}},null,null,9999)})}var d;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(b){function d(a){if(!a||t===a.id)return!1;var b=a.getTypes(),b=1===b.length&&"Files"===b[0];a=1===a.getFilesCount();return b&&a}var k,l=a(b);b.config.forcePasteAsPlainText?k="plain-text":b.config.pasteFilter?k=b.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in b.config||(k="semantic-content"); b.pasteFilter=l.get(k);h(b);c(b);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+"dialogs/paste.js"));if(CKEDITOR.env.gecko){var p=["image/png","image/jpeg","image/gif"],t;b.on("paste",function(a){var c=a.data,e=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d(e)&&(e=e.getFile(0),-1!=CKEDITOR.tools.indexOf(p,e.type))){var f=new FileReader;f.addEventListener("load",function(){a.data.dataValue='\x3cimg src\x3d"'+f.result+'" /\x3e';b.fire("paste",a.data)},!1);f.addEventListener("abort",function(){b.fire("paste", a.data)},!1);f.addEventListener("error",function(){b.fire("paste",a.data)},!1);f.readAsDataURL(e);t=c.dataTransfer.id;a.stop()}},null,null,1)}b.on("paste",function(a){a.data.dataTransfer||(a.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!a.data.dataValue){var c=a.data.dataTransfer,d=c.getData("text/html");if(d)a.data.dataValue=d,a.data.type="html";else if(d=c.getData("text/plain"))a.data.dataValue=b.editable().transformPlainTextToHtml(d),a.data.type="text"}},null,null,1);b.on("paste", function(a){var b=a.data.dataValue,c=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 d,g,e=new CKEDITOR.dom.element("div");for(e.setHtml(b);1==e.getChildCount()&&(d=e.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)e=g=d;g&&(b=g.getHtml().replace(/
$/i,""))}CKEDITOR.env.ie?b=b.replace(/^ (?: |\r\n)?<(\w+)/g,function(b,d){return d.toLowerCase()in c?(a.data.preSniffing="html","\x3c"+d):b}):CKEDITOR.env.webkit?b=b.replace(/<\/(\w+)>


<\/div>$/,function(b,d){return d in c?(a.data.endsWithEOL=1,"\x3c/"+d+"\x3e"):b}):CKEDITOR.env.gecko&&(b=b.replace(/(\s)
$/,"$1"));a.data.dataValue=b},null,null,3);b.on("paste",function(a){a=a.data;var c=b._.nextPasteType||a.type,d=a.dataValue,h,k=b.config.clipboard_defaultContentType||"html",n=a.dataTransfer.getTransferType(b)==CKEDITOR.DATA_TRANSFER_EXTERNAL,t=!0===b.config.forcePasteAsPlainText;h="html"==c||"html"==a.preSniffing?"html":f(d);delete b._.nextPasteType;"htmlifiedtext"==h&&(d=e(b.config,d));if("text"==c&&"html"==h)d= m(b,d,l.get("plain-text"));else if(n&&b.pasteFilter&&!a.dontFilter||t)d=m(b,d,b.pasteFilter);a.startsWithEOL&&(d='\x3cbr data-cke-eol\x3d"1"\x3e'+d);a.endsWithEOL&&(d+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==c&&(c="html"==h||"html"==k?"html":"text");a.type=c;a.dataValue=d;delete a.preSniffing;delete a.startsWithEOL;delete a.endsWithEOL},null,null,6);b.on("paste",function(a){a=a.data;a.dataValue&&(b.insertHtml(a.dataValue,a.type,a.range),setTimeout(function(){b.fire("afterPaste")},0))},null,null, 1E3);b.on("pasteDialog",function(a){setTimeout(function(){b.openDialog("paste",a.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:CKEDITOR.env.ie&&16>CKEDITOR.env.version||CKEDITOR.env.iOS&&605>CKEDITOR.env.version?!1:!0,isCustomDataTypesSupported:!CKEDITOR.env.ie||16<=CKEDITOR.env.version,isFileApiSupported:!CKEDITOR.env.ie||9CKEDITOR.env.version||b.isInline()?b:a.document},fixSplitNodesAfterDrop:function(a,b,c,d){function e(a,c,d){var g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var f=b.startContainer;"number"==typeof d&&"number"== typeof c&&f.type==CKEDITOR.NODE_ELEMENT&&(e(a.startContainer,f,c)||e(a.endContainer,f,d))},isDropRangeAffectedByDragRange:function(a,b){var c=b.startContainer,d=b.endOffset;return a.endContainer.equals(c)&&a.endOffset<=d||a.startContainer.getParent().equals(c)&&a.startContainer.getIndex()CKEDITOR.env.version&&this.fixSplitNodesAfterDrop(a,c,f.dragStartContainerChildCount,f.dragEndContainerChildCount);(l=this.isDropRangeAffectedByDragRange(a,c))||(k=a.createBookmark(!1));f=c.clone().createBookmark(!1);l&&(k=a.createBookmark(!1));a=k.startNode;c=k.endNode;l=f.startNode;c&&a.getPosition(l)&CKEDITOR.POSITION_PRECEDING&&c.getPosition(l)&CKEDITOR.POSITION_FOLLOWING&&l.insertBefore(a);a=e.createRange();a.moveToBookmark(k);h.extractHtmlFromRange(a,1);c=e.createRange(); f.startNode.getCommonAncestor(h)||(f=e.getSelection().createBookmarks()[0]);c.moveToBookmark(f);b(e,{dataTransfer:d,method:"drop",range:c},1);e.fire("unlockSnapshot")},getRangeAtDropPosition:function(a,b){var c=a.data.$,d=c.clientX,e=c.clientY,f=b.getSelection(!0).getRanges()[0],h=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,e))c=b.document.$.caretRangeFromPoint(d,e),h.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset), h.collapse(!0);else if(c.rangeParent)h.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),h.collapse(!0);else{if(CKEDITOR.env.ie&&8l&&!k;l++){if(!k)try{c.moveToPoint(d,e-l),k=!0}catch(m){}if(!k)try{c.moveToPoint(d,e+l),k=!0}catch(q){}}if(k){var v="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+v+'"\x3e​\x3c/span\x3e'); var B=b.document.getById(v);h.moveToPosition(B,CKEDITOR.POSITION_BEFORE_START);B.remove()}else{var D=b.document.$.elementFromPoint(d,e),A=new CKEDITOR.dom.element(D),E;if(A.equals(b.editable())||"html"==A.getName())return f&&f.startContainer&&!f.startContainer.equals(b.editable())?f:null;E=A.getClientRect();d/i,fragmentRegExp:/\s*\x3c!--StartFragment--\x3e|\x3c!--EndFragment--\x3e\s*/g, data:{},files:[],nativeHtmlCache:"",normalizeType:function(a){a=a.toLowerCase();return"text"==a||"text/plain"==a?"Text":"url"==a?"URL":a}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(d);this.id||(this.id="Text"==d?"":"cke-"+CKEDITOR.tools.getUniqueId());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,b){a=this._.normalizeType(a);var c="text/html"==a&&b?this._.nativeHtmlCache:this._.data[a];if(void 0===c||null===c||""===c){if(this._.fallbackDataTransfer.isRequired())c=this._.fallbackDataTransfer.getData(a,b);else try{c=this.$.getData(a)||""}catch(d){c=""}"text/html"!=a||b||(c=this._stripHtml(c))}"Text"==a&&CKEDITOR.env.gecko&&this.getFilesCount()&&"file://"== c.substring(0,7)&&(c="");if("string"===typeof c)var e=c.indexOf("\x3c/html\x3e"),c=-1!==e?c.substring(0,e+7):c;return c},setData:function(a,b){a=this._.normalizeType(a);"text/html"==a?(this._.data[a]=this._stripHtml(b),this._.nativeHtmlCache=b):this._.data[a]=b;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported||"URL"==a||"Text"==a)if("Text"==d&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!== d&&this.setData(d,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor==a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(c){c=b._.normalizeType(c);var d=b.getData(c);"text/html"==c&&(b._.nativeHtmlCache=b.getData(c,!0),d=b._stripHtml(d));d&&(b._.data[c]=d)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;c$/gi,"")}a&&a.length&& (a=b(a),a=a.replace(this._.metaRegExp,""),a=a.replace(this._.fragmentRegExp,""));return a}};CKEDITOR.plugins.clipboard.fallbackDataTransfer=function(a){this._dataTransfer=a;this._customDataFallbackType="text/html"};CKEDITOR.plugins.clipboard.fallbackDataTransfer._isCustomMimeTypeSupported=null;CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes=[];CKEDITOR.plugins.clipboard.fallbackDataTransfer.prototype={isRequired:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer,b=this._dataTransfer.$; if(null===a._isCustomMimeTypeSupported)if(b){a._isCustomMimeTypeSupported=!1;if(CKEDITOR.env.edge&&17<=CKEDITOR.env.version)return!0;try{b.setData("cke/mimetypetest","cke test value"),a._isCustomMimeTypeSupported="cke test value"===b.getData("cke/mimetypetest"),b.clearData("cke/mimetypetest")}catch(c){}}else return!1;return!a._isCustomMimeTypeSupported},getData:function(a,b){var c=this._getData(this._customDataFallbackType,!0);if(b)return c;var c=this._extractDataComment(c),d=null,d=a===this._customDataFallbackType? c.content:c.data&&c.data[a]?c.data[a]:this._getData(a,!0);return null!==d?d:""},setData:function(a,b){var c=a===this._customDataFallbackType;c&&(b=this._applyDataComment(b,this._getFallbackTypeData()));var d=b,e=this._dataTransfer.$;try{e.setData(a,d),c&&(this._dataTransfer._.nativeHtmlCache=d)}catch(f){if(this._isUnsupportedMimeTypeError(f)){c=CKEDITOR.plugins.clipboard.fallbackDataTransfer;-1===CKEDITOR.tools.indexOf(c._customTypes,a)&&c._customTypes.push(a);var c=this._getFallbackTypeContent(), h=this._getFallbackTypeData();h[a]=d;try{d=this._applyDataComment(c,h),e.setData(this._customDataFallbackType,d),this._dataTransfer._.nativeHtmlCache=d}catch(k){d=""}}}return d},_getData:function(a,b){var c=this._dataTransfer._.data;if(!b&&c[a])return c[a];try{return this._dataTransfer.$.getData(a)}catch(d){return null}},_getFallbackTypeContent:function(){var a=this._dataTransfer._.data[this._customDataFallbackType];a||(a=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).content); return a},_getFallbackTypeData:function(){var a=CKEDITOR.plugins.clipboard.fallbackDataTransfer._customTypes,b=this._extractDataComment(this._getData(this._customDataFallbackType,!0)).data||{},c=this._dataTransfer._.data;CKEDITOR.tools.array.forEach(a,function(a){void 0!==c[a]?b[a]=c[a]:void 0!==b[a]&&(b[a]=b[a])},this);return b},_isUnsupportedMimeTypeError:function(a){return a.message&&-1!==a.message.search(/element not found/gi)},_extractDataComment:function(a){var b={data:null,content:a||""};if(a&& 16g?r+g:b.width>g?r-a.left:r-a.right+b.width):fg?r-g:b.width>g?r-a.right+b.width:r-a.left);g=a.top;b.height-a.tope?x-e:b.height>e?x-a.bottom+b.height:x-a.top);CKEDITOR.env.ie&&!CKEDITOR.env.edge&&((b=a=n.$.offsetParent&&new CKEDITOR.dom.element(n.$.offsetParent))&&"html"==b.getName()&&(b=b.getDocument().getBody()),b&&"rtl"==b.getComputedStyle("direction")&& (r=CKEDITOR.env.ie8Compat?r-2*n.getDocument().getDocumentElement().$.scrollLeft:r-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),k;(k=a.getCustomData("activePanel"))&&k.onHide&&k.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:x+"px",left:r+"px"});n.setOpacity(1);l&&l()},this);c.isLoaded?a():c.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._.markFirst&&(CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){d.markFirstDisplayed?d.markFirstDisplayed():d._.markFirstDisplayed()},0):d.markFirstDisplayed?d.markFirstDisplayed():d._.markFirstDisplayed());this._.editor.fire("panelShow",this)},0,this)},CKEDITOR.env.air?200:0,this);this.visible=1;this.onShow&&this.onShow.call(this)},reposition:function(){var b=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(), this.showBlock.apply(this,b))},focus:function(){if(CKEDITOR.env.webkit){var b=CKEDITOR.document.getActive();b&&!b.equals(this._.iframe)&&b.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var b=this._.iframe.getFrameDocument().getActive();b&&b.is("a")&&(this._.lastFocused=b)},hide:function(b){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(b=b&&this._.returnFocus)CKEDITOR.env.webkit&&b.type&&b.getWindow().$.focus(),b.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(b){var e=this._.panel;void 0!==b&&(e.allowBlur=b);return e.allowBlur},showAsChild:function(b,e,a,h,k,l){if(this._.activeChild!=b||b._.panel._.offsetParentId!=a.getId())this.hideChild(),b.onHide= CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=b,this._.focused=!1,b.showBlock(e,a,h,k,l),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){b.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(b){var e=this._.activeChild;e&&(delete e.onHide,delete this._.activeChild,e.hide(),b&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var b=CKEDITOR.tools.isEmpty(CKEDITOR.instances), e;for(e in h){var a=h[e];b?a.destroy():a.element.hide()}b&&(h={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(b){for(var h=b.config.menu_groups.split(","),f=b._.menuGroups={},e=b._.menuItems={},a=0;ab.group?1:a.orderb.order?1:0})}var h='\x3cspan class\x3d"cke_menuitem"\x3e\x3ca id\x3d"{id}" class\x3d"cke_menubutton cke_menubutton__{name} cke_menubutton_{state} {cls}" href\x3d"{href}" title\x3d"{title}" tabindex\x3d"-1" _cke_focus\x3d1 hidefocus\x3d"true" role\x3d"{role}" aria-label\x3d"{attrLabel}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"', f="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(h+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(h+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;" ondragstart\x3d"return false;"');CKEDITOR.env.ie&&(f='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" onclick\x3d"'+f+'CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e')+ '\x3cspan class\x3d"cke_menubutton_inner"\x3e\x3cspan class\x3d"cke_menubutton_icon"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{iconStyle}"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"cke_menubutton_label"\x3e{label}\x3c/span\x3e{shortcutHtml}{arrowHtml}\x3c/span\x3e\x3c/a\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_voice_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e\x3c/span\x3e',e=CKEDITOR.addTemplate("menuItem",h),a=CKEDITOR.addTemplate("menuArrow", '\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'),m=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var c=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level- 1,block:{}}),d=c.block.attributes=c.attributes||{};!d.role&&(d.role="menu");this._.panelDefinition=c},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),c=this.editor.elementPath(),d=this._.listeners;this.removeAll();for(var g=0;gCKEDITOR.env.version?k.createText("\r"):k.createElement("br"),e.deleteContents(),e.insertNode(a),CKEDITOR.env.needsBrFiller?(k.createText("").insertAfter(a),m&&(r||t.blockLimit).appendBogus(),a.getNext().$.nodeValue="",e.setStartAt(a.getNext(),CKEDITOR.POSITION_AFTER_START)):e.setStartAt(a,CKEDITOR.POSITION_AFTER_END)),e.collapse(!0),e.select(),e.scrollIntoView()):l(a,b,e,f)}}};m=CKEDITOR.plugins.enterkey;k=m.enterBr;l=m.enterBlock;c=/^h[1-6]$/}(),function(){function b(b,f){var e={},a=[],m={nbsp:" ", shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};b=b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,c){var h=f?"\x26"+c+";":m[c];e[h]=f?m[c]:"\x26"+c+";";a.push(h);return""});b=b.replace(/,$/,"");if(!f&&b){b=b.split(",");var k=document.createElement("div"),l;k.innerHTML="\x26"+b.join(";\x26")+";";l=k.innerHTML;k=null;for(k=0;kh&&(h=640);420>f&&(f=420);var a=parseInt((window.screen.height-f)/2,10),m=parseInt((window.screen.width- h)/2,10);e=(e||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+h+",height\x3d"+f+",top\x3d"+a+",left\x3d"+m;var k=window.open("",null,e,!0);if(!k)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(k.moveTo(m,a),k.resizeTo(h,f)),k.focus(),k.location.href=b}catch(l){window.open(b,null,e,!0)}return!0}}),"use strict",function(){function b(a){this.editor=a;this.loaders= []}function h(a,b,e){var h=a.config.fileTools_defaultFileName;this.editor=a;this.lang=a.lang;"string"===typeof b?(this.data=b,this.file=f(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=b,this.total=this.file.size,this.loaded=0);e?this.fileName=e:this.file.name?this.fileName=this.file.name:(a=this.file.type.split("/"),h&&(a[0]=h),this.fileName=a.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}} function f(a){var b=a.match(e)[1];a=a.replace(e,"");a=atob(a);var f=[],h,c,d,g;for(h=0;hf.status||299x.height-r.bottom?g("pin"):g("bottom"),d=x.width/2,d=a.floatSpacePreferRight?"right":0t.width?"rtl"==a.contentsLangDirection?"right":"left":d-r.left>r.right-d?"left":"right",t.width>x.width?(d="left",n=0):(n="left"==d?0x.width&&(d="left"==d?"right":"left",n=0)),c.setStyle(d,f(("pin"==l?B:q)+n+("pin"==l?0:"left"==d?z:-z)))):(l="pin",g("pin"),k(d))}}}();if(m){var l=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}"'+(b.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(b.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),c=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(l.output({content:m, id:b.id,langDir:b.lang.dir,langCode:b.langCode,name:b.name,style:"display:none;z-index:"+(a.baseFloatZIndex-1),topId:b.ui.spaceId("top"),voiceLabel:b.title}))),d=CKEDITOR.tools.eventsBuffer(500,k),g=CKEDITOR.tools.eventsBuffer(100,k);c.unselectable();c.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});b.on("focus",function(a){k(a);b.on("change",d.input);h.on("scroll",g.input);h.on("resize",g.input)});b.on("blur",function(){c.hide();b.removeListener("change", d.input);h.removeListener("scroll",g.input);h.removeListener("resize",g.input)});b.on("destroy",function(){h.removeListener("scroll",g.input);h.removeListener("resize",g.input);c.clearCustomData();c.remove()});b.focusManager.hasFocus&&c.show();b.focusManager.add(c,1)}}var h=CKEDITOR.document.getWindow(),f=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){b(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var b= CKEDITOR.addTemplate("panel-list",'\x3cul role\x3d"presentation" class\x3d"cke_panel_list"\x3e{items}\x3c/ul\x3e'),h=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" draggable\x3d"false" ondragstart\x3d"return false;" href\x3d"javascript:void(\'{val}\')" onclick\x3d"{onclick}CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'), f=CKEDITOR.addTemplate("panel-list-group",'\x3ch1 id\x3d"{id}" draggable\x3d"false" ondragstart\x3d"return false;" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),e=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var e=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&& (e["aria-multiselectable"]=!0);!e.role&&(e.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",e.role);e=this.keys;e[40]="next";e[9]="next";e[38]="prev";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 a=b.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a); delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,f){var l=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=l;var c;c=CKEDITOR.tools.htmlEncodeAttr(a).replace(e,"\\'");a={id:l,val:c,onclick:CKEDITOR.env.ie?'return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26': "",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(f||a),text:b||a};this._.pendingList.push(h.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(f.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a= this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display","none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,e=this.element.getDocument(),f;for(f in a)e.getById(a[f]).setStyle("display","");for(var c in b)a=e.getById(b[c]),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 b=this.element.getDocument().getById(a);b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var e=b.getById(a);e.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected"); this.onUnmark&&this.onUnmark(e)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(),e;for(e in a){var f=a[e];b.getById(f).removeClass("cke_selected");b.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 b=this.element.getElementsByTag("a"),e,f=-1;if(a)for(e=this.element.getDocument().getById(this._.items[a]).getFirst();a= b.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(b){b.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}),function(){var b='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+ (CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"listbox"',h="";CKEDITOR.env.gecko&&CKEDITOR.env.mac&&(b+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(b+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');CKEDITOR.env.ie&&(h='return false;" onmouseup\x3d"CKEDITOR.tools.getMouseButton(event)\x3d\x3dCKEDITOR.MOUSE_BUTTON_LEFT\x26\x26');var b=b+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" onclick\x3d"'+ h+'CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+(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",b);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(b){CKEDITOR.tools.extend(this, b,{canGroup:!1,title:b.label,modes:{wysiwyg:1},editorFocus:1});b=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=b.parent&&b.parent.getDocument()||CKEDITOR.document;b.className="cke_combopanel";b.block={multiSelect:b.multiSelect,attributes:b.attributes};b.toolbarRelated=!0;this._={panelDefinition:b,items:{},listeners:[]}},proto:{renderHtml:function(b){var a=[];this.render(b,a);return a.join("")},render:function(b,a){function h(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a= this.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;b.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var k=CKEDITOR.env,l,c,d="cke_"+this.id,g=CKEDITOR.tools.addFunction(function(a){c&&(b.unlockSelection(1),c=0);l.execute(a)},this),n=this;l={id:d,combo:this,focus:function(){CKEDITOR.document.getById(d).getChild(1).focus()},execute:function(a){var c=n._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(n.createPanel(b), c.on)c.panel.hide();else{n.commit();var d=n.getValue();d?c.list.mark(d):c.list.unmarkAll();c.panel.showBlock(n.id,new CKEDITOR.dom.element(a),4)}},clickFn:g};this._.listeners.push(b.on("activeFilterChange",h,this));this._.listeners.push(b.on("mode",h,this));this._.listeners.push(b.on("selectionChange",h,this));!this.readOnly&&this._.listeners.push(b.on("readOnly",h,this));var y=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var c=a.getKeystroke();switch(c){case 13:case 32:case 40:CKEDITOR.tools.callFunction(g, b);break;default:l.onkey(l,c)}a.preventDefault()}),w=CKEDITOR.tools.addFunction(function(){l.onfocus&&l.onfocus()});c=0;l.keyDownFn=y;k={id:d,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:k.gecko&&!k.hc?"":(this.title||"").replace("'",""),keydownFn:y,focusFn:w,clickFn:g};f.output(k,a);if(this.onRender)this.onRender();return l},createPanel:function(b){if(!this._.panel){var a=this._.panelDefinition,f=this._.panelDefinition.block,h=a.parent||CKEDITOR.document.getBody(), l="cke_combopanel__"+this.name,c=new CKEDITOR.ui.floatPanel(b,h,a),a=c.addListBlock(this.id,f),d=this;c.onShow=function(){this.element.addClass(l);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&!b.focusManager.hasFocus&&b.focus();if(d.onOpen)d.onOpen()};c.onHide=function(a){this.element.removeClass(l);d.setState(d.modes&&d.modes[b.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!a&&d.onClose)d.onClose()};c.onEscape=function(){c.hide(1)};a.onClick=function(a,b){d.onClick&& d.onClick.call(d,a,b);c.hide()};this._.panel=c;this._.list=a;c.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(b,a){this._.value=b;var f=this.document.getById("cke_"+this.id+"_text");f&&(b||a?f.removeClass("cke_combo_inlinelabel"):(a=this.label,f.addClass("cke_combo_inlinelabel")),f.setText("undefined"!=typeof a?a:b));var f="undefined"!=typeof a?a:b,h=this.label,f=f===h?f:f+", "+h;(h=this.document.getById("cke_"+this.id+"_label"))&& h.setText(f)},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(b){this._.list.mark(b)},hideItem:function(b){this._.list.hideItem(b)},hideGroup:function(b){this._.list.hideGroup(b)},showAll:function(){this._.list.showAll()},add:function(b,a,f){this._.items[b]=f||b;this._.list.add(b,a,f)},startGroup:function(b){this._.list.startGroup(b)},commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this)); this._.committed=1},setState:function(b){if(this._.state!=b){var a=this.document.getById("cke_"+this.id),f=a.getElementsByTag("a").getItem(0);a.setState(b,"cke_combo");b==CKEDITOR.TRISTATE_DISABLED?a.setAttribute("aria-disabled",!0):a.removeAttribute("aria-disabled");f&&f.setAttribute("aria-expanded",b==CKEDITOR.TRISTATE_ON);this._.state=b}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!= CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))},destroy:function(){CKEDITOR.tools.array.forEach(this._.listeners,function(b){b.removeListener()});this._.listeners=[]},select:function(b){if(!CKEDITOR.tools.isEmpty(this._.items))for(var a in this._.items)if(b({value:a,text:this._.items[a]})){this.setValue(a);break}}},statics:{handler:{create:function(b){return new CKEDITOR.ui.richCombo(b)}}}});CKEDITOR.ui.prototype.addRichCombo=function(b,a){this.add(b, CKEDITOR.UI_RICHCOMBO,a)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(b){if(!b.blockless){for(var h=b.config,f=b.lang.format,e=h.format_tags.split(";"),a={},m=0,k=[],l=0;l=this.rect.right||a<=this.rect.top|| a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);e.attachListener(b,"resize",f);e.attachListener(b,"mode",k);b.on("destroy",k);this.lineTpl=(new CKEDITOR.template('\x3cdiv data-cke-lineutils-line\x3d"1" class\x3d"cke_reset_all" style\x3d"{lineStyle}"\x3e\x3cspan style\x3d"{tipLeftStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3cspan style\x3d"{tipRightStyle}"\x3e\x26nbsp;\x3c/span\x3e\x3c/div\x3e')).output({lineStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({}, m,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},a,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},a,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function e(a){var b;if(b=a&&a.type==CKEDITOR.NODE_ELEMENT)b=!(k[a.getComputedStyle("float")]||k[a.getAttribute("align")]);return b&& !l[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;b.prototype={start:function(a){var b=this,e=this.editor,f=this.doc,h,k,l,m,r=CKEDITOR.tools.eventsBuffer(50,function(){e.readOnly||"wysiwyg"!=e.mode||(b.relations={},(k=f.$.elementFromPoint(l,m))&&k.nodeType&&(h=new CKEDITOR.dom.element(k),b.traverseSearch(h),isNaN(l+m)||b.pixelSearch(h,l,m),a&&a(b.relations,l,m)))});this.listener=this.editable.attachListener(this.target, "mousemove",function(a){l=a.data.$.clientX;m=a.data.$.clientY;r.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){r.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(b){var e=this.editor.createRange();e.moveToPosition(this.relations[b.uid].element, a[b.type]);return e}}(),store:function(){function a(b,c,e){var f=b.getUniqueId();f in e?e[f].type|=c:e[f]={element:b,type:c}}return function(b,g){var f;g&CKEDITOR.LINEUTILS_AFTER&&e(f=b.getNext())&&f.isVisible()&&(a(f,CKEDITOR.LINEUTILS_BEFORE,this.relations),g^=CKEDITOR.LINEUTILS_AFTER);g&CKEDITOR.LINEUTILS_INSIDE&&e(f=b.getFirst())&&f.isVisible()&&(a(f,CKEDITOR.LINEUTILS_BEFORE,this.relations),g^=CKEDITOR.LINEUTILS_INSIDE);a(b,g,this.relations)}}(),traverseSearch:function(a){var b,g,f;do if(f=a.$["data-cke-expando"], !(f&&f in this.relations)){if(a.equals(this.editable))break;if(e(a))for(b in this.lookups)(g=this.lookups[b](a))&&this.store(a,g)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(c,f,h,k,l){for(var m=0,r;l(h);){h+=k;if(25==++m)break;if(r=this.doc.$.elementFromPoint(f,h))if(r==c)m=0;else if(b(c,r)&&(m=0,e(r=new CKEDITOR.dom.element(r))))return r}}var b=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}: function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(b,d,f){var h=this.win.getViewPaneSize().height,k=a.call(this,b.$,d,f,-1,function(a){return 0this.rect.bottom)return!1;this.inline? h.left=e.elementRect.left-this.rect.relativeX:(0[^<]*e});0>f&&(f=a._.upcasts.length);a._.upcasts.splice(f,0,[CKEDITOR.tools.bind(b,c),c.name,e])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c, b,f):d(e,b,f))}function m(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function k(a){a=a.data;if("wysiwyg"==this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,g;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var k=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=k.count();d a.selected.length||O(c,"cut"===d.name)}var c=a.editor;c.on("contentDom",function(){var a=c.editable();a.attachListener(a,"copy",b);a.attachListener(a,"cut",b)})}function D(a){function b(){var a=e.getSelection();if(a&&(a=a.getRanges()[0])&&!a.collapsed){var d=c(a.startContainer),f=c(a.endContainer);!d&&f?(a.setEndBefore(f.wrapper),a.select()):d&&!f&&(a.setStartAfter(d.wrapper),a.select())}}function c(a){return a?a.type==CKEDITOR.NODE_TEXT?c(a.getParent()):e.widgets.getByElement(a):null}function d(){a.fire("checkSelection")} var e=a.editor;e.on("selectionCheck",d);e.on("contentDom",function(){e.editable().attachListener(e,"key",function(){setTimeout(d,10)})});if(!CKEDITOR.env.ie)a.on("checkSelection",b);a.on("checkSelection",a.checkSelection,a);e.on("selectionChange",function(b){var c=(b=h.getNestedEditable(e.editable(),b.data.selection.getStartElement()))&&a.getByElement(b),d=a.widgetHoldingFocusedEditable;d?d===c&&d.focusedEditable.equals(b)||(r(a,d,null),c&&b&&r(a,c,b)):c&&b&&r(a,c,b)});e.on("dataReady",function(){F(a).commit()}); e.on("blur",function(){var b;(b=a.focused)&&m(a,b);(b=a.widgetHoldingFocusedEditable)&&r(a,b,null)})}function A(a){var b=a.editor,e={};b.on("toDataFormat",function(b){var f=CKEDITOR.tools.getNextNumber(),g=[];b.data.downcastingSessionId=f;e[f]=g;b.data.dataValue.forEach(function(b){var e=b.attributes,f;if("data-cke-widget-white-space"in e){f=c(b);var k=d(b);f.parent.attributes["data-cke-white-space-first"]&&(f.value=f.value.replace(/^ /g," "));k.parent.attributes["data-cke-white-space-last"]&& (k.value=k.value.replace(/ $/g," "))}if("data-cke-widget-id"in e){if(e=a.instances[e["data-cke-widget-id"]])f=b.getFirst(h.isParserWidgetElement),g.push({wrapper:b,element:f,widget:e,editables:{}}),"1"!=f.attributes["data-cke-widget-keep-attr"]&&delete f.attributes["data-widget"]}else if("data-cke-widget-editable"in e)return 0CKEDITOR.tools.indexOf(b,a)&&c.push(a);a=CKEDITOR.tools.indexOf(d,a);0<=a&&d.splice(a,1);return this},focus:function(a){e=a;return this},commit:function(){var f=a.focused!==e,g,h;a.editor.fire("lockSnapshot");for(f&& (g=a.focused)&&m(a,g);g=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,g),1),g.isInited()&&(h=g.editor.checkDirty(),g.setSelected(!1),!h&&g.editor.resetDirty());f&&e&&(h=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!h&&a.editor.resetDirty());for(;g=c.pop();)b.push(g),g.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function K(a){a&&a.addFilterRule(function(a){return a.replace(/\s*cke_widget_selected/g,"").replace(/\s*cke_widget_focused/g,"")})}function L(a, b,c){var d=0;b=I(b);var e=a.data.classes||{},f;if(b){for(e=CKEDITOR.tools.clone(e);f=b.pop();)c?e[f]||(d=e[f]=1):e[f]&&(delete e[f],d=1);d&&a.setData("classes",e)}}function C(a){a.cancel()}function O(a,b){var c=a.widgets.focused,d,e,f;ga.hasCopyBin(a)||(e=new ga(a,{beforeDestroy:function(){!b&&c&&c.focus();f&&a.getSelection().selectBookmarks(f);d&&CKEDITOR.plugins.widgetselection.addFillers(a.editable())},afterDestroy:function(){b&&!a.readOnly&&(c?a.widgets.del(c):a.extractSelectedHtml(),a.fire("saveSnapshot"))}}), c||(d=CKEDITOR.env.webkit&&CKEDITOR.plugins.widgetselection.isWholeContentSelected(a.editable()),f=a.getSelection().createBookmarks(!0)),e.handle(H(a)))}function I(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function M(){var a=CKEDITOR.document.getActive(),b=this.editor,c=b.editable();(c.isInline()?c:b.document.getWindow().getFrame()).equals(a)&&b.focusManager.focus(c)}function Q(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(), this.editor.selectionChange(1))}function H(a){var b=a.getSelectedHtml(!0);if(a.widgets.focused)return a.widgets.focused.getClipboardHtml();a.once("toDataFormat",function(a){a.data.widgetsCopy=!0},null,null,-1);return a.dataProcessor.toDataFormat(b)}function G(a,b){P(a);Y(a);T(a);X(a);S(a);aa(a);ba(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var c=b.data.getTarget();h.getNestedEditable(a,c)||a.inline&&h.isDomDragHandler(c)||b.data.preventDefault()});a.wrapper.removeClass("cke_widget_new"); a.element.addClass("cke_widget_element");a.on("key",function(b){b=b.data.keyCode;if(13==b)a.edit();else{if(b==CKEDITOR.CTRL+67||b==CKEDITOR.CTRL+88){O(a.editor,b==CKEDITOR.CTRL+88);return}if(b in V||CKEDITOR.CTRL&b||CKEDITOR.ALT&b)return}return!1},null,null,999);a.on("doubleclick",function(b){a.edit()&&b.cancel()});if(b.data)a.on("data",b.data);if(b.edit)a.on("edit",b.edit)}function P(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function Y(a,b){a.partSelectors||(a.partSelectors= a.parts);if(a.parts){var c={},d,e;for(e in a.partSelectors)b||!a.parts[e]||"string"==typeof a.parts[e]?(d=a.wrapper.findOne(a.partSelectors[e]),c[e]=d):c[e]=a.parts[e];a.parts=c}}function T(a){var b=a.editables,c,d;a.editables={};if(a.editables)for(c in b)d=b[c],a.initEditable(c,"string"==typeof d?{selector:d}:d)}function X(a){if(!0===a.mask)da(a);else if(a.mask){var b=new CKEDITOR.tools.buffers.throttle(250,J,a),c=CKEDITOR.env.gecko?300:0,d,e;a.on("focus",function(){b.input();d=a.editor.on("change", b.input);e=a.on("blur",function(){d.removeListener();e.removeListener()})});a.editor.on("instanceReady",function(){setTimeout(function(){b.input()},c)});a.editor.on("mode",function(){setTimeout(function(){b.input()},c)});if(CKEDITOR.env.gecko){var f=a.element.find("img");CKEDITOR.tools.array.forEach(f.toArray(),function(a){a.on("load",function(){b.input()})})}for(var g in a.editables)a.editables[g].on("focus",function(){a.editor.on("change",b.input);e&&e.removeListener()}),a.editables[g].on("blur", function(){a.editor.removeListener("change",b.input)});b.input()}}function da(a){var b=a.wrapper.findOne(".cke_widget_mask");b||(b=new CKEDITOR.dom.element("img",a.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_mask"}),a.wrapper.append(b));a.mask=b}function J(){if(this.wrapper){this.maskPart=this.maskPart||this.mask;var a=this.parts[this.maskPart],b;if(a&&"string"!=typeof a){b=this.wrapper.findOne(".cke_widget_partial_mask");b||(b=new CKEDITOR.dom.element("img", this.editor.document),b.setAttributes({src:CKEDITOR.tools.transparentImageData,"class":"cke_reset cke_widget_partial_mask"}),this.wrapper.append(b));this.mask=b;var c=b.$,d=a.$,e=!(c.offsetTop==d.offsetTop&&c.offsetLeft==d.offsetLeft);if(c.offsetWidth!=d.offsetWidth||c.offsetHeight!=d.offsetHeight||e)c=a.getParent(),d=CKEDITOR.plugins.widget.isDomWidget(c),b.setStyles({top:a.$.offsetTop+(d?0:c.$.offsetTop)+"px",left:a.$.offsetLeft+(d?0:c.$.offsetLeft)+"px",width:a.$.offsetWidth+"px",height:a.$.offsetHeight+ "px"})}}}function S(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(h.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),c.setAttributes({"class":"cke_reset cke_widget_drag_handler_container",style:"background:rgba(220,220,220,0.5);background-image:url("+b.plugins.widget.path+"images/handle.png);display:none;"}),d=new CKEDITOR.dom.element("img",b.document),d.setAttributes({"class":"cke_reset cke_widget_drag_handler","data-cke-widget-drag-handler":"1", src:CKEDITOR.tools.transparentImageData,width:15,title:b.lang.widget.move,height:15,role:"presentation"}),a.inline&&d.setAttribute("draggable","true"),c.append(d),a.wrapper.append(c));a.wrapper.on("dragover",function(a){a.data.preventDefault()});a.wrapper.on("mouseenter",a.updateDragHandlerPosition,a);setTimeout(function(){a.on("data",a.updateDragHandlerPosition,a)},50);if(!a.inline&&(d.on("mousedown",W,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)}); a.dragHandlerContainer=c}}function W(a){function b(){var c;for(r.reset();c=h.pop();)c.removeListener();var d=k;c=a.sender;var e=this.repository.finder,f=this.repository.liner,g=this.editor,l=this.editor.editable();CKEDITOR.tools.isEmpty(f.visible)||(d=e.getRange(d[0]),this.focus(),g.fire("drop",{dropRange:d,target:d.startContainer}));l.removeClass("cke_widget_dragging");f.hideVisible();g.fire("dragend",{target:c})}if(CKEDITOR.tools.getMouseButton(a)===CKEDITOR.MOUSE_BUTTON_LEFT){var c=this.repository.finder, d=this.repository.locator,e=this.repository.liner,f=this.editor,g=f.editable(),h=[],k=[],l,m;this.repository._.draggedWidget=this;var n=c.greedySearch(),r=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(n);k=d.sort(m,1);k.length&&(e.prepare(n,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){m=a.data.$.clientY;r.input()}));f.fire("dragstart",{target:a.sender});h.push(f.document.once("mouseup",b,this));g.isInline()||h.push(CKEDITOR.document.once("mouseup", b,this))}}function aa(a){var b=null;a.on("data",function(){var a=this.data.classes,c;if(b!=a){for(c in b)a&&a[c]||this.removeClass(c);for(c in a)this.addClass(c);b=a}})}function ba(a){a.on("data",function(){if(a.wrapper){var b=this.getLabel?this.getLabel():this.editor.lang.widget.label.replace(/%1/,this.pathName||this.element.getName());a.wrapper.setAttribute("role","region");a.wrapper.setAttribute("aria-label",b)}},null,null,9999)}function ca(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))} function Z(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}function c(a){function b(a,c,d){for(var e=a.length,f=0;f)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, V={37:1,38:1,39:1,40:1,8:1,46:1};V[CKEDITOR.SHIFT+121]=1;var ga=CKEDITOR.tools.createClass({$:function(a,b){this._.createCopyBin(a,b);this._.createListeners(b)},_:{createCopyBin:function(a){var b=a.document,c=CKEDITOR.env.edge&&16<=CKEDITOR.env.version,d=!a.blockless&&!CKEDITOR.env.ie||c?"div":"span",c=b.createElement(d),b=b.createElement(d);b.setAttributes({id:"cke_copybin","data-cke-temp":"1"});c.setStyles({position:"absolute",width:"1px",height:"1px",overflow:"hidden"});c.setStyle("ltr"==a.config.contentsLangDirection? "left":"right","-5000px");this.editor=a;this.copyBin=c;this.container=b},createListeners:function(a){a&&(a.beforeDestroy&&(this.beforeDestroy=a.beforeDestroy),a.afterDestroy&&(this.afterDestroy=a.afterDestroy))}},proto:{handle:function(a){var b=this.copyBin,c=this.editor,d=this.container,e=CKEDITOR.env.ie&&9>CKEDITOR.env.version,f=c.document.getDocumentElement().$,g=c.createRange(),h=this,k=CKEDITOR.env.mac&&CKEDITOR.env.webkit,l=k?100:0,m=window.requestAnimationFrame&&!k?requestAnimationFrame:setTimeout, n,r,q;b.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+a+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("lockSnapshot");d.append(b);c.editable().append(d);n=c.on("selectionChange",C,null,null,0);r=c.widgets.on("checkSelection",C,null,null,0);e&&(q=f.scrollTop);g.selectNodeContents(b);g.select();e&&(f.scrollTop=q);return new CKEDITOR.tools.promise(function(a){m(function(){h.beforeDestroy&&h.beforeDestroy();d.remove();n.removeListener();r.removeListener();c.fire("unlockSnapshot"); h.afterDestroy&&h.afterDestroy();a()},l)})}},statics:{hasCopyBin:function(a){return!!ga.getCopyBin(a)},getCopyBin:function(a){return a.document.getById("cke_copybin")}}});CKEDITOR.plugins.widget=h;h.repository=b;h.nestedEditable=f}(),"use strict",function(){function b(a){function b(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget),this.deflated=!0)}function c(){var b=a.editable(),d=a.document;if(this.deflated)this.widget=a.widgets.initOn(this.element, "image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,b)).block&&(b=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),b.replace(this.widget.wrapper),this.widget.wrapper.move(b)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var f=this.widget,b=e,d=f.wrapper,g=f.data.align,f=f.data.hasCaption;if(b){for(var h=3;h--;)d.removeClass(b[h]);"center"==g?f&&d.addClass(b[1]):"none"!=g&&d.addClass(b[w[g]])}else"center"== g?(f?d.setStyle("text-align","center"):d.removeStyle("text-align"),d.removeStyle("float")):("none"==g?d.removeStyle("float"):d.setStyle("float",g),d.removeStyle("text-align"))}}var e=a.config.image2_alignClasses,k=a.config.image2_captionedClass;return{allowedContent:d(a),requiredContent:"img[src,alt]",features:g(a),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}}, parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var d=this.features;this.data.hasCaption&&!a.filter.checkFeature(d.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||a.filter.checkFeature(d.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:b,inflate:c});this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&& delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var e in this.data.classes)this.parts.image.removeClass(e);if(a.filter.checkFeature(d.dimension)){d=this.data;d={width:d.width,height:d.height};e=this.parts.image;for(var f in d)d[f]?e.setAttribute(f,d[f]):e.removeAttribute(f)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var b=CKEDITOR.plugins.image2, c=this.parts.image,d={hasCaption:!!this.parts.caption,src:c.getAttribute("src"),alt:c.getAttribute("alt")||"",width:c.getAttribute("width")||"",height:c.getAttribute("height")||"",lock:this.ready?b.checkHasNaturalRatio(c):!0},f=c.getAscendant("a");f&&this.wrapper.contains(f)&&(this.parts.link=f);d.align||(c=d.hasCaption?this.element:c,e?(c.hasClass(e[0])?d.align="left":c.hasClass(e[2])&&(d.align="right"),d.align?c.removeClass(e[w[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float"))); a.plugins.link&&this.parts.link&&(d.link=b.getLinkAttributesParser()(a,this.parts.link),(c=d.link.advanced)&&c.advCSSClasses&&(c.advCSSClasses=CKEDITOR.tools.trim(c.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(d.hasCaption?"remove":"add")+"Class"]("cke_image_nocaption");this.setData(d);a.filter.checkFeature(this.features.dimension)&&!0!==a.config.image2_disableResizer&&m(this);this.shiftState=b.stateShifter(this.editor);this.on("contextMenu",function(a){a.data.image=CKEDITOR.TRISTATE_OFF; if(this.parts.link||this.wrapper.getAscendant("a"))a.data.link=a.data.unlink=CKEDITOR.TRISTATE_OFF})},addClass:function(a){n(this).addClass(a)},hasClass:function(a){return n(this).hasClass(a)},removeClass:function(a){n(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+[].concat(k,e).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(a),downcast:f(a),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/, (this.data.alt||"")+" "+this.pathName)}}}function h(b){var c=e(b),d=b.config.image2_captionedClass;return function(b,e){var f={width:1,height:1},g=b.name,h;if(!b.attributes["data-cke-realelement"]&&(c(b)?("div"==g&&(h=b.getFirst("figure"))&&(b.replaceWith(h),b=h),e.align="center",h=b.getFirst("img")||b.getFirst("a").getFirst("img")):"figure"==g&&b.hasClass(d)?h=b.find(function(a){return"img"===a.name&&-1!==CKEDITOR.tools.array.indexOf(["figure","a"],a.parent.name)},!0)[0]:a(b)&&(h="a"==b.name?b.children[0]: b),h)){for(var k in f)(f=h.attributes[k])&&f.match(p)&&delete h.attributes[k];return b}}}function f(a){var b=a.config.image2_alignClasses;return function(a){var c="a"==a.name?a.getFirst():a,d=c.attributes,e=this.data.align;if(!this.inline){var f=a.getFirst("span");f&&f.replaceWith(f.getFirst({img:1,a:1}))}e&&"none"!=e&&(f=CKEDITOR.tools.parseCssText(d.style||""),"center"==e&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):e in{left:1, right:1}&&(b?c.addClass(b[w[e]]):f["float"]=e),b||CKEDITOR.tools.isEmpty(f)||(d.style=CKEDITOR.tools.writeCssText(f)));return a}}function e(b){var c=b.config.image2_captionedClass,d=b.config.image2_alignClasses,e={figure:1,a:1,img:1};return function(f){if(!(f.name in{div:1,p:1}))return!1;var g=f.children;if(1!==g.length)return!1;g=g[0];if(!(g.name in e))return!1;if("p"==f.name){if(!a(g))return!1}else if("figure"==g.name){if(!g.hasClass(c))return!1}else if(b.enterMode==CKEDITOR.ENTER_P||!a(g))return!1; return(d?f.hasClass(d[1]):"center"==CKEDITOR.tools.parseCssText(f.attributes.style||"",!0)["text-align"])?!0:!1}}function a(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function m(a){var b=a.editor,c=b.editable(),d=b.document,e=a.resizer=d.createElement("span");e.addClass("cke_image_resizer");e.setAttribute("title",b.lang.image2.resizer);e.append(new CKEDITOR.dom.text("​",d));if(a.inline)a.wrapper.append(e);else{var f=a.parts.link||a.parts.image,g=f.getParent(), h=d.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(f);h.append(e);a.element.append(h,!0);g.is("span")&&g.remove()}e.on("mousedown",function(f){function g(a,b,c){var e=CKEDITOR.document,f=[];d.equals(e)||f.push(e.on(a,b));f.push(d.on(a,b));if(c)for(a=f.length;a--;)c.push(f.pop())}function h(){T=p+n*J;X=Math.round(T/B)}function k(){X=y-S;T=Math.round(X*B)}var l=a.parts.image,m=function(){var a=b.config.image2_maxSize,c;if(!a)return null;a=CKEDITOR.tools.copy(a);c=CKEDITOR.plugins.image2.getNatural(l); a.width=Math.max("natural"===a.width?c.width:a.width,15);a.height=Math.max("natural"===a.height?c.height:a.height,15);return a}(),n="right"==a.data.align?-1:1,q=f.data.$.screenX,v=f.data.$.screenY,p=l.$.clientWidth,y=l.$.clientHeight,B=p/y,w=[],P="cke_image_s"+(~n?"e":"w"),Y,T,X,da,J,S,W;b.fire("saveSnapshot");g("mousemove",function(a){Y=a.data.$;J=Y.screenX-q;S=v-Y.screenY;W=Math.abs(J/S);1==n?0>=J?0>=S?h():W>=B?h():k():0>=S?W>=B?k():h():k():0>=J?0>=S?W>=B?k():h():k():0>=S?h():W>=B?h():k();a=m&& (T>m.width||X>m.height);15>T||15>X||a||(da={width:T,height:X},l.setAttributes(da))},w);g("mouseup",function(){for(var d;d=w.pop();)d.removeListener();c.removeClass(P);e.removeClass("cke_image_resizing");da&&(a.setData(da),b.fire("saveSnapshot"));da=!1},w);c.addClass(P);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function k(a){var b=[],d;return function(e){var f=a.getCommand("justify"+e);if(f){b.push(function(){f.refresh(a, a.elementPath())});if(e in{right:1,left:1,center:1})f.on("exec",function(d){var f=c(a);if(f){f.setData("align",e);for(f=b.length;f--;)b[f]();d.cancel()}});f.on("refresh",function(b){var f=c(a),g={right:1,left:1,center:1};f&&(void 0===d&&(d=a.filter.checkFeature(a.widgets.registered.image.features.align)),d?this.setState(f.data.align==e?CKEDITOR.TRISTATE_ON:e in g?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function l(a){if(a.plugins.link){var b= CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var d=b.onShow,e=b.onOk;b.onShow=function(){var b=c(a),e=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),e.hide()):(e.show(),d.apply(this,arguments))};b.onOk=function(){var b=c(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var d={};this.commitContent(d);b.setData("link",d)}else e.apply(this, arguments)}}});a.on("destroy",function(){b.removeListener()});a.getCommand("unlink").on("exec",function(b){var d=c(a);d&&d.parts.link&&(d.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())});a.getCommand("unlink").on("refresh",function(b){var d=c(a);d&&(this.setState(d.data.link||d.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}function c(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function d(a){var b=a.config.image2_alignClasses; a={div:{match:e(a)},p:{match:e(a)},img:{attributes:"!src,alt,width,height"},figure:{classes:"!"+a.config.image2_captionedClass},figcaption:!0};b?(a.div.classes=b[1],a.p.classes=a.div.classes,a.img.classes=b[0]+","+b[2],a.figure.classes+=","+a.img.classes):(a.div.styles="text-align",a.p.styles="text-align",a.img.styles="float",a.figure.styles="float,display");return a}function g(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a? "("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}}function n(a){return a.data.hasCaption?a.element:a.parts.image}var y=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),w={left:0,center:1,right:2},p=/^\s*(\d+\%)\s*$/i;CKEDITOR.plugins.add("image2",{requires:"widget,dialog",icons:"image",hidpi:!0,onLoad:function(){CKEDITOR.addCss('.cke_image_nocaption{line-height:0}.cke_editable.cke_image_sw, .cke_editable.cke_image_sw *{cursor:sw-resize !important}.cke_editable.cke_image_se, .cke_editable.cke_image_se *{cursor:se-resize !important}.cke_image_resizer{display:none;position:absolute;width:10px;height:10px;bottom:-5px;right:-5px;background:#000;outline:1px solid #fff;line-height:0;cursor:se-resize;}.cke_image_resizer_wrapper{position:relative;display:inline-block;line-height:0;}.cke_image_resizer.cke_image_resizer_left{right:auto;left:-5px;cursor:sw-resize;}.cke_widget_wrapper:hover .cke_image_resizer,.cke_image_resizer.cke_image_resizing{display:block}.cke_editable[contenteditable\x3d"false"] .cke_image_resizer{display:none;}.cke_widget_wrapper\x3ea{display:inline-block}')}, init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var c=a.config,d=a.lang.image2,e=b(a);c.filebrowserImage2BrowseUrl=c.filebrowserImageBrowseUrl;c.filebrowserImage2UploadUrl=c.filebrowserImageUploadUrl;e.pathName=d.pathName;e.editables.caption.pathName=d.pathNameCaption;a.widgets.add("image",e);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:d.menu,command:"image", group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var b={left:1,right:1,center:1,block:1},c=k(a),d;for(d in b)c(d);l(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,f){var g={};e?g.attributes={"class":e[1]}:g.styles={"text-align":"center"};g=d.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",g);c(g,f);f.move(g);return g}function c(b,d){if(d.getParent()){var e=a.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START); d.remove();g.insertElementIntoRange(b,e)}else b.replace(d)}var d=a.document,e=a.config.image2_alignClasses,f=a.config.image2_captionedClass,g=a.editable(),h=["hasCaption","align","link"],k={align:function(c,d,f){var g=c.element;c.changed.align?c.newData.hasCaption||("center"==f&&(c.deflate(),c.element=b(a,g)),c.changed.hasCaption||"center"!=d||"center"==f||(c.deflate(),d=g.findOne("a,img"),d.replace(g),c.element=d)):"center"==f&&c.changed.hasCaption&&!c.newData.hasCaption&&(c.deflate(),c.element= b(a,g));!e&&g.is("figure")&&("center"==f?g.setStyle("display","inline-block"):g.removeStyle("display"))},hasCaption:function(b,e,g){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),g?(g=CKEDITOR.dom.element.createFromHtml(y.output({captionedClass:f,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(g,b.element),e.replace(g.findOne("img")),b.element=g):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var f=b.element.is("img")? b.element:b.element.findOne("img"),g=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!e||b.element.is("img")&&e,k;h&&b.deflate();e?(c||(k=d.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(f),f.move(k)),e=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,e),CKEDITOR.tools.isEmpty(e.set)||(k||g).setAttributes(e.set),e.removed.length&&(k||g).removeAttributes(e.removed)):(e=g.findOne("img"),e.replace(g),k=e);h&&(b.element=k)}}};return function(a){var b,c; a.changed={};for(c=0;ct.length)return!1;h=c.getParents(!0);for(u=0;uv;u++)q[u].indent+=h;h=CKEDITOR.plugins.list.arrayToList(q,e,null,a.config.enterMode,c.getDirection());if(!d.isIndent){var A;if((A=c.getParent())&&A.is("li"))for(var t=h.listNode.getChildren(),E=[],w,u=t.count()-1;0<=u;u--)(w=t.getItem(u))&& w.is&&w.is("li")&&E.push(w)}h&&h.listNode.replace(c);if(E&&E.length)for(u=0;uf.length)){d=f[f.length-1].getNext();g=e.createElement(this.type);for(c.push(g);f.length;)c=f.shift(),a=e.createElement("li"),l=c,l.is("pre")||p.test(l.getName())||"false"==l.getAttribute("contenteditable")?c.appendTo(a):(c.copyAttributes(a),h&&c.getDirection()&&(a.removeStyle("direction"),a.removeAttribute("dir")),c.moveChildren(a), c.remove()),a.appendTo(g);h&&k&&g.setAttribute("dir",h);d?g.insertBefore(d):g.appendTo(b)}}function f(a,b,c){function d(c){if(!(!(l=k[c?"getFirst":"getLast"]())||l.is&&l.isBlockBoundary()||!(m=b.root[c?"getPrevious":"getNext"](CKEDITOR.dom.walker.invisible(!0)))||m.is&&m.isBlockBoundary({br:1})))a.document.createElement("br")[c?"insertBefore":"insertAfter"](l)}for(var e=CKEDITOR.plugins.list.listToArray(b.root,c),f=[],g=0;ge[g-1].indent+1){f=e[g-1].indent+1-e[g].indent;for(h=e[g].indent;e[g]&&e[g].indent>=h;)e[g].indent+=f,g++;g--}var k=CKEDITOR.plugins.list.arrayToList(e,c,null,a.config.enterMode,b.root.getAttribute("dir")).listNode,l,m;d(!0);d();k.replace(b.root);a.fire("contentDomInvalidated")}function e(a,b){this.name= a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function a(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](t);)(f=e.getDirection(1))!==b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d),c=e}function m(b){function c(d){var e=b[d?"getPrevious":"getNext"](y);e&&e.type==CKEDITOR.NODE_ELEMENT&&e.is(b.getName())&&(a(b,e,null,!d),b.remove(),b=e)}c();c(1)}function k(a){return a.type==CKEDITOR.NODE_ELEMENT&&(a.getName()in CKEDITOR.dtd.$block||a.getName()in CKEDITOR.dtd.$listItem)&&CKEDITOR.dtd[a.getName()]["#"]}function l(b,d,e){b.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var f=e.extractContents();d.trim(!1,!0);var g=d.createBookmark(),h=new CKEDITOR.dom.elementPath(d.startContainer),k=h.block,h=h.lastElement.getAscendant("li",1)||k,l=new CKEDITOR.dom.elementPath(e.startContainer),n=l.contains(CKEDITOR.dtd.$listItem),l=l.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():l&&(k=l.getPrevious(y))&& w(k)&&k.remove();(k=f.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("br")&&k.remove();(k=d.startContainer.getChild(d.startOffset))?f.insertBefore(k):d.startContainer.append(f);n&&(f=c(n))&&(h.contains(n)?(a(f,n.getParent(),n),f.remove()):h.append(f));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){l=e.startPath();f=l.block;if(!f)break;f.is("li")&&(h=f.getParent(),f.equals(h.getLast(y))&&f.equals(h.getFirst(y))&&(f=h));e.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}e=e.clone();f= b.editable();e.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e);e.evaluator=function(a){return y(a)&&!w(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&m(e);d.moveToBookmark(g);d.select();b.fire("saveSnapshot")}function c(a){return(a=a.getLast(y))&&a.type==CKEDITOR.NODE_ELEMENT&&a.getName()in d?a:null}var d={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),n=CKEDITOR.dom.walker.bookmark(),y=function(a){return!(g(a)||n(a))},w=CKEDITOR.dom.walker.bogus(); CKEDITOR.plugins.list={listToArray:function(a,b,c,e,f){if(!d[a.getName()])return[];e||(e=0);c||(c=[]);for(var g=0,h=a.getChildCount();g= h.$.documentMode&&p.append(h.createText(" ")),p.append(m.listNode),m=m.nextIndex;else if(-1==I.indent&&!c&&g){d[g.getName()]?(p=I.element.clone(!1,!0),w!=g.getDirection(1)&&p.setAttribute("dir",w)):p=new CKEDITOR.dom.documentFragment(h);var l=g.getDirection(1)!=w,M=I.element,Q=M.getAttribute("class"),H=M.getAttribute("style"),G=p.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(e!=CKEDITOR.ENTER_BR||l||H||Q),P,Y=I.contents.length,T;for(g=0;gb&&aK.version?" ":T,g=b.hotNode&&b.hotNode.getText()==f&&b.element.equals(b.hotNode)&&b.lastCmdDirection===!!d;c(b,function(c){g&& b.hotNode&&b.hotNode.remove();c[d?"insertAfter":"insertBefore"](a);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!d});b.lastCmdDirection=!!d});K.ie||b.enterMode==CKEDITOR.ENTER_BR||b.hotNode.scrollIntoView();b.line.detach()}return function(c){c=c.getSelection().getStartElement();var g;c=c.getAscendant(S,1);if(!t(b,c)&&c&&!c.equals(b.editable)&&!c.contains(b.editable)){(g=k(c))&&"false"==g.getAttribute("contenteditable")&&(c=g);b.element=c;g=a(b,c,!d);var h;n(g)&&g.is(b.triggers)&& g.is(J)&&(!a(b,g,!d)||(h=a(b,g,!d))&&n(h)&&h.is(b.triggers))?e(g):(h=f(b,c),n(h)&&(a(b,h,!d)?(c=a(b,h,!d))&&n(c)&&c.is(b.triggers)&&e(h):e(h)))}}}()}}function g(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function y(a){if(!n(a))return!1;var b;(b=w(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function w(a){return!!{absolute:1, fixed:1}[a.getComputedStyle("position")]}function p(a,b){return n(b)?b.is(a.triggers):null}function t(a,b){if(!b)return!1;for(var c=b.getParents(1),d=c.length;d--;)for(var e=a.tabuList.length;e--;)if(c[d].hasAttribute(a.tabuList[e]))return!0;return!1}function r(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(da)});if(!b)return!1;q(a,b);return c?b.size.top>a.mouse.y:b.size.bottom (a.inInlineMode?d.editable.top+d.editable.height/2:Math.min(d.editable.height,d.pane.height)/2),b=b[f?"getLast":"getFirst"](function(a){return!(U(a)||V(a))});if(!b)return null;g(a,b)&&(b=a.line.wrap[f?"getPrevious":"getNext"](function(a){return!(U(a)||V(a))}));if(!n(b)||y(b)||!p(a,b))return null;q(a,b);return!f&&0<=b.size.top&&m(c.y,0,b.size.top+e)?(a=a.inInlineMode||0===d.scroll.y?G:Y,new h([null,b,I,H,a])):f&&b.size.bottom<=d.pane.height&&m(c.y,b.size.bottom-e,d.pane.height)?(a=a.inInlineMode|| m(b.size.bottom,d.pane.height-e,d.pane.height)?P:Y,new h([b,null,M,H,a])):null}function u(b){var c=b.mouse,d=b.view,e=b.triggerOffset,g=f(b);if(!g)return null;q(b,g);var e=Math.min(e,0|g.size.outerHeight/2),k=[],l,t;if(m(c.y,g.size.top-1,g.size.top+e))t=!1;else if(m(c.y,g.size.bottom-e,g.size.bottom+1))t=!0;else return null;if(y(g)||r(b,g,t)||g.getParent().is(X))return null;var u=a(b,g,!t);if(u){if(u&&u.type==CKEDITOR.NODE_TEXT)return null;if(n(u)){if(y(u)||!p(b,u)||u.getParent().is(X))return null; k=[u,g][t?"reverse":"concat"]().concat([Q,H])}}else g.equals(b.editable[t?"getLast":"getFirst"](b.isRelevant))?(v(b),t&&m(c.y,g.size.bottom-e,d.pane.height)&&m(g.size.bottom,d.pane.height-e,d.pane.height)?l=P:m(c.y,0,g.size.top+e)&&(l=G)):l=Y,k=[null,g][t?"reverse":"concat"]().concat([t?M:I,H,l,g.equals(b.editable[t?"getLast":"getFirst"](b.isRelevant))?t?P:G:Y]);return 0 in k?new h(k):null}function z(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=N.length;l--;)f[N[l]]=parseInt(b.getComputedStyle.call(b, "border-"+N[l]+"-width"),10)||0,h[N[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+N[l]),10)||0,g[N[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+N[l]),10)||0;c&&!d||B(a,d);k.top=e.y-(c?0:a.view.scroll.y);k.left=e.x-(c?0:a.view.scroll.x);k.outerWidth=b.$.offsetWidth;k.outerHeight=b.$.offsetHeight;k.height=k.outerHeight-(h.top+h.bottom+f.top+f.bottom);k.width=k.outerWidth-(h.left+h.right+f.left+f.right);k.bottom=k.top+k.outerHeight;k.right=k.left+k.outerWidth;a.inInlineMode&&(k.scroll={top:b.$.scrollTop, left:b.$.scrollLeft});return A({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function q(a,b,c){if(!n(b))return b.size=null;if(!b.size)b.size={};else if(b.size.ignoreScroll==c&&b.size.date>new Date-W)return null;return A(b.size,z(a,b,c),{date:+new Date},!0)}function v(a,b){a.view.editable=z(a,a.editable,b,!0)}function B(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-W)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();A(a.view,{scroll:{x:c.x,y:c.y,width:a.doc.$.documentElement.scrollWidth- d.width,height:a.doc.$.documentElement.scrollHeight-d.height},pane:{width:d.width,height:d.height,bottom:d.height+c.y},date:+new Date},!0)}}function D(a,b,c,d){for(var e=d,f=d,g=0,k=!1,l=!1,m=a.view.pane.height,n=a.mouse;n.y+gd.left-e.x&&cd.top-e.y&&aCKEDITOR.env.version, C=CKEDITOR.dtd,O={},I=128,M=64,Q=32,H=16,G=4,P=2,Y=1,T=" ",X=C.$listItem,da=C.$tableContent,J=A({},C.$nonEditable,C.$empty),S=C.$block,W=100,aa="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",ba=aa+"border-color:transparent;display:block;border-style:solid;",ca="\x3cspan\x3e"+T+"\x3c/span\x3e";O[CKEDITOR.ENTER_BR]="br";O[CKEDITOR.ENTER_P]="p";O[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties= a+b+(c||Y);return this},is:function(a){return(this.properties&a)==a}};var Z=function(){function a(b,c){var d=b.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(b,c,d){if(!b.mouse)return null;var e=b.doc,f=b.line.wrap;d=d||b.mouse;var h=a(e,d);c&&g(b,h)&&(f.hide(),h=a(e,d),f.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||K.ie&&9>K.version&&!b.boundary.equals(h)&&!b.boundary.contains(h)?null:h}}(),U=CKEDITOR.dom.walker.whitespaces(),V=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT), ga=function(){function a(d){var f=d.element,g,h,k;if(!n(f)||f.contains(d.editable)||f.isReadOnly())return null;k=D(d,function(a,b){return!b.equals(a)},function(a,b){return Z(a,!0,b)},f);g=k.upper;h=k.lower;if(b(d,g,h))return k.set(Q,8);if(g&&f.contains(g))for(;!g.getParent().equals(f);)g=g.getParent();else g=f.getFirst(function(a){return c(d,a)});if(h&&f.contains(h))for(;!h.getParent().equals(f);)h=h.getParent();else h=f.getLast(function(a){return c(d,a)});if(!g||!h)return null;q(d,g);q(d,h);if(!m(d.mouse.y, g.size.top,h.size.bottom))return null;for(var f=Number.MAX_VALUE,l,r,t,u;h&&!h.equals(g)&&(r=g.getNext(d.isRelevant));)l=Math.abs(e(d,g,r)-d.mouse.y),la.status||304==a.status||0===a.status||1223==a.status))return null;switch(b){case "text":return a.responseText;case "xml":var e=a.responseXML;return new CKEDITOR.xml(e&&e.firstChild?e:a.responseText);case "arraybuffer":return a.response;default:return null}} function f(a,e,f){var l=!!e,c=b();if(!c)return null;l&&"text"!==f&&"xml"!==f&&(c.responseType=f);c.open("GET",a,l);l&&(c.onreadystatechange=function(){4==c.readyState&&(e(h(c,f)),c=null)});c.send(null);return l?"":h(c,f)}function e(a,e,f,l,c){var d=b();if(!d)return null;d.open("POST",a,!0);d.onreadystatechange=function(){4==d.readyState&&(l&&l(h(d,c)),d=null)};d.setRequestHeader("Content-type",f||"application/x-www-form-urlencoded; charset\x3dUTF-8");d.send(e)}return{load:function(a,b,e){return f(a, b,e||"text")},post:function(a,b,f,h){return e(a,b,f,h,"text")},loadXml:function(a,b){return f(a,b,"xml")},loadText:function(a,b){return f(a,b,"text")},loadBinary:function(a,b){return f(a,b,"arraybuffer")}}}()}(),function(){function b(a,b){return CKEDITOR.tools.array.filter(a,function(a){return a.canHandle(b)}).sort(function(a,b){return a.priority===b.priority?0:a.priority-b.priority})}function h(a,b){var c=a.shift();c&&c.handle(b,function(){h(a,b)})}function f(a){var b=CKEDITOR.tools.array.reduce(a, function(a,b){return CKEDITOR.tools.array.isArray(b.filters)?a.concat(b.filters):a},[]);return CKEDITOR.tools.array.filter(b,function(a,d){return CKEDITOR.tools.array.indexOf(b,a)===d})}function e(b,e){var c=0,d,f;if(!CKEDITOR.tools.array.isArray(b)||0===b.length)return!0;d=CKEDITOR.tools.array.filter(b,function(b){return-1===CKEDITOR.tools.array.indexOf(a,b)});if(0=CKEDITOR.env.version;return!(CKEDITOR.env.webkit&&!CKEDITOR.env.chrome)&&!b},init:function(b){if(this.isSupportedEnvironment()){var h=CKEDITOR.plugins.getPath("pastetools"), f=this.path;b.pasteTools.register({priority:100,filters:[CKEDITOR.getUrl(h+"filter/common.js"),CKEDITOR.getUrl(h+"filter/image.js"),CKEDITOR.getUrl(f+"filter/default.js")],canHandle:function(b){b=b.data;return(b=b.dataTransfer.getData("text/html",!0)||b.dataValue)?"libreoffice"===CKEDITOR.plugins.pastetools.getContentGeneratorName(b):!1},handle:function(e,a){var f=e.data,h=f.dataValue||CKEDITOR.plugins.pastetools.getClipboardData(f,"text/html");f.dontFilter=!0;h=CKEDITOR.pasteFilters.image(h,b,CKEDITOR.plugins.pastetools.getClipboardData(f, "text/rtf"));f.dataValue=CKEDITOR.pasteFilters.libreoffice(h,b);!0===b.config.forcePasteAsPlainText&&(f.type="text");a()}})}}})}(),function(){CKEDITOR.plugins.add("pastefromword",{requires:"pastetools",init:function(b){var h=0,f=CKEDITOR.plugins.getPath("pastetools"),e=this.path,a=void 0===b.config.pasteFromWord_inlineImages?!0:b.config.pasteFromWord_inlineImages,f=[CKEDITOR.getUrl(f+"filter/common.js"),CKEDITOR.getUrl(f+"filter/image.js"),CKEDITOR.getUrl(e+"filter/default.js")];b.addCommand("pastefromword", {canUndo:!1,async:!0,exec:function(a,b){h=1;a.execCommand("paste",{type:"html",notification:b&&"undefined"!==typeof b.notification?b.notification:!0})}});CKEDITOR.plugins.clipboard.addPasteButton(b,"PasteFromWord",{label:b.lang.pastefromword.toolbar,command:"pastefromword",toolbar:"clipboard,50"});b.pasteTools.register({filters:b.config.pasteFromWordCleanupFile?[b.config.pasteFromWordCleanupFile]:f,canHandle:function(a){a=CKEDITOR.plugins.pastetools.getClipboardData(a.data,"text/html");var b=CKEDITOR.plugins.pastetools.getContentGeneratorName(a), e=/(class="?Mso|style=["'][^"]*?\bmso\-|w:WordDocument||<\/font>)/,b=b?"microsoft"===b:e.test(a);return a&&(h||b)},handle:function(e,f){var l=e.data,c=CKEDITOR.plugins.pastetools.getClipboardData(l,"text/html"),d=CKEDITOR.plugins.pastetools.getClipboardData(l,"text/rtf"),c={dataValue:c,dataTransfer:{"text/rtf":d}};if(!1!==b.fire("pasteFromWord",c)||h){l.dontFilter=!0;if(h||!b.config.pasteFromWordPromptCleanup||confirm(b.lang.pastefromword.confirmCleanup))c.dataValue=CKEDITOR.cleanWord(c.dataValue, b),CKEDITOR.plugins.clipboard.isCustomDataTypesSupported&&a&&CKEDITOR.pasteFilters.image&&(c.dataValue=CKEDITOR.pasteFilters.image(c.dataValue,b,d)),b.fire("afterPasteFromWord",c),l.dataValue=c.dataValue,!0===b.config.forcePasteAsPlainText?l.type="text":CKEDITOR.plugins.clipboard.isCustomCopyCutSupported||"allow-word"!==b.config.forcePasteAsPlainText||(l.type="html");h=0;f()}}})}})}(),function(){var b={canUndo:!1,async:!0,exec:function(b,f){var e=b.lang,a=CKEDITOR.tools.keystrokeToString(e.common.keyboard, b.getCommandKeystroke(CKEDITOR.env.ie?b.commands.paste:this)),m=f&&"undefined"!==typeof f.notification?f.notification:!f||!f.from||"keystrokeHandler"===f.from&&CKEDITOR.env.ie,e=m&&"string"===typeof m?m:e.pastetext.pasteNotification.replace(/%1/,'\x3ckbd aria-label\x3d"'+a.aria+'"\x3e'+a.display+"\x3c/kbd\x3e");b.execCommand("paste",{type:"text",notification:m?e:!1})}};CKEDITOR.plugins.add("pastetext",{requires:"clipboard",init:function(h){var f=CKEDITOR.env.safari?CKEDITOR.CTRL+CKEDITOR.ALT+CKEDITOR.SHIFT+ 86:CKEDITOR.CTRL+CKEDITOR.SHIFT+86;h.addCommand("pastetext",b);h.setKeystroke(f,"pastetext");CKEDITOR.plugins.clipboard.addPasteButton(h,"PasteText",{label:h.lang.pastetext.button,command:"pastetext",toolbar:"clipboard,40"});if(h.config.forcePasteAsPlainText)h.on("beforePaste",function(b){"html"!=b.data.type&&(b.data.type="text")});h.on("pasteState",function(b){h.getCommand("pastetext").setState(b.data)})}})}(),CKEDITOR.plugins.add("removeformat",{init:function(b){b.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat); b.ui.addButton&&b.ui.addButton("RemoveFormat",{label:b.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}),CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(b){for(var h=b._.removeFormatRegex||(b._.removeFormatRegex=new RegExp("^(?:"+b.config.removeFormatTags.replace(/,/g,"|")+")$","i")),f=b._.removeAttributes||(b._.removeAttributes=b.config.removeFormatAttributes.split(",")),e=CKEDITOR.plugins.removeformat.filter,a=b.getSelection().getRanges(),m=a.createIterator(), k=function(a){return a.type==CKEDITOR.NODE_ELEMENT},l;l=m.getNextRange();){l.enlarge(CKEDITOR.ENLARGE_INLINE);var c=l.createBookmark(),d=c.startNode,g=c.endNode,n=function(a){for(var c=b.elementPath(a),d=c.elements,f=1,g;(g=d[f])&&!g.equals(c.block)&&!g.equals(c.blockLimit);f++)h.test(g.getName())&&e(b,g)&&a.breakParent(g)};n(d);if(g)for(n(g),d=d.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);d&&!d.equals(g);)if(d.isReadOnly()){if(d.getPosition(g)&CKEDITOR.POSITION_CONTAINS)break;d=d.getNext(k)}else n= d.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==d.getName()&&d.data("cke-realelement")||!e(b,d)||(h.test(d.getName())?d.remove(1):(d.removeAttributes(f),b.fire("removeFormatCleanup",d))),d=n;l.moveToBookmark(c)}b.forceNextSelectionCheck();b.getSelection().selectRanges(a)}}},filter:function(b,h){for(var f=b._.removeFormatFilters||[],e=0;eCKEDITOR.env.version),c=l?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",d,g;for(f=e=a=m="";d=b.pop();)g=b.length?",":"",f+=".cke_show_blocks "+d+c+g,a+=".cke_show_blocks.cke_contents_ltr "+d+c+g,m+=".cke_show_blocks.cke_contents_rtl "+d+c+g,e+=".cke_show_blocks "+d+c+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+d+".png")+")}";CKEDITOR.addCss((f+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(e, a+"{background-position:top left;padding-left:8px}",m+"{background-position:top right;padding-right:8px}"));l||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")}, init:function(h){function f(){e.refresh(h)}if(!h.blockless){var e=h.addCommand("showblocks",b);e.canUndo=!1;h.config.startupOutlineBlocks&&e.setState(CKEDITOR.TRISTATE_ON);h.ui.addButton&&h.ui.addButton("ShowBlocks",{label:h.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});h.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)});h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h.on("focus",f),h.on("blur",f));h.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&& e.refresh(h)})}}})}(),function(){var b={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(b){this.toggleState();this.refresh(b)},refresh:function(b){if(b.document){var f=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";b.editable()[f]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var b;b=(CKEDITOR.env.ie6Compat?[".%1 table.%2,",".%1 table.%2 td, .%1 table.%2 th","{","border : #d3d3d3 1px dotted","}"]:".%1 table.%2,;.%1 table.%2 \x3e tr \x3e td, .%1 table.%2 \x3e tr \x3e th,;.%1 table.%2 \x3e tbody \x3e tr \x3e td, .%1 table.%2 \x3e tbody \x3e tr \x3e th,;.%1 table.%2 \x3e thead \x3e tr \x3e td, .%1 table.%2 \x3e thead \x3e tr \x3e th,;.%1 table.%2 \x3e tfoot \x3e tr \x3e td, .%1 table.%2 \x3e tfoot \x3e tr \x3e th;{;border : #d3d3d3 1px dotted;}".split(";")).join("").replace(/%2/g, "cke_show_border").replace(/%1/g,"cke_show_borders ");CKEDITOR.addCss(b)},init:function(h){var f=h.addCommand("showborders",b);f.canUndo=!1;!1!==h.config.startupShowBorders&&f.setState(CKEDITOR.TRISTATE_ON);h.on("mode",function(){f.state!=CKEDITOR.TRISTATE_DISABLED&&f.refresh(h)},null,null,100);h.on("contentDom",function(){f.state!=CKEDITOR.TRISTATE_DISABLED&&f.refresh(h)});h.on("removeFormatCleanup",function(b){b=b.data;h.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&b.is("table")&&(!b.hasAttribute("border")|| 0>=parseInt(b.getAttribute("border"),10))&&b.addClass("cke_show_border")})},afterInit:function(b){var f=b.dataProcessor;b=f&&f.dataFilter;f=f&&f.htmlFilter;b&&b.addRules({elements:{table:function(b){b=b.attributes;var a=b["class"],f=parseInt(b.border,10);f&&!(0>=f)||a&&-1!=a.indexOf("cke_show_border")||(b["class"]=(a||"")+" cke_show_border")}}});f&&f.addRules({elements:{table:function(b){b=b.attributes;var a=b["class"];a&&(b["class"]=a.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/, ""))}}})}});CKEDITOR.on("dialogDefinition",function(b){var f=b.data.name;if("table"==f||"tableProperties"==f)if(b=b.data.definition,f=b.getContents("info").get("txtBorder"),f.commit=CKEDITOR.tools.override(f.commit,function(b){return function(a,f){b.apply(this,arguments);var h=parseInt(this.getValue(),10);f[!h||0>=h?"addClass":"removeClass"]("cke_show_border")}}),b=(b=b.getContents("advanced"))&&b.get("advCSSClasses"))b.setup=CKEDITOR.tools.override(b.setup,function(b){return function(){b.apply(this, arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),b.commit=CKEDITOR.tools.override(b.commit,function(b){return function(a,f){b.apply(this,arguments);parseInt(f.getAttribute("border"),10)||f.addClass("cke_show_border")}})})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(h){function f(){var b=a&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+ "px");this.show();b&&this.focus()}if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var e=CKEDITOR.plugins.sourcearea;h.addMode("source",function(a){var e=h.ui.space("contents").getDocument().createElement("textarea");e.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",h.config.sourceAreaTabSize||4)));e.setAttribute("dir","ltr");e.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu"); h.ui.space("contents").append(e);e=h.editable(new b(h,e));e.setData(h.getData(1));CKEDITOR.env.ie&&(e.attachListener(h,"resize",f,e),e.attachListener(CKEDITOR.document.getWindow(),"resize",f,e),CKEDITOR.tools.setTimeout(f,0,e));h.fire("ariaWidget",this);a()});h.addCommand("source",e.commands.source);h.ui.addButton&&h.ui.addButton("Source",{label:h.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});h.on("mode",function(){h.getCommand("source").setState("source"==h.mode?CKEDITOR.TRISTATE_ON: CKEDITOR.TRISTATE_OFF)});var a=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var b=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(b){this.setValue(b);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(b){this[(b?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){b.baseProto.detach.call(this);this.clearCustomData(); this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(b){"wysiwyg"==b.mode&&b.fire("saveSnapshot");b.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);b.setMode("source"==b.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("sourcedialog",{requires:"dialog",init:function(b){b.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js"); b.ui.addButton&&b.ui.addButton("Sourcedialog",{label:b.lang.sourcedialog.toolbar,command:"sourcedialog",toolbar:"mode,10"})}}),CKEDITOR.plugins.add("specialchar",{availableLangs:{af:1,ar:1,az:1,bg:1,ca:1,cs:1,cy:1,da:1,de:1,"de-ch":1,el:1,en:1,"en-au":1,"en-ca":1,"en-gb":1,eo:1,es:1,"es-mx":1,et:1,eu:1,fa:1,fi:1,fr:1,"fr-ca":1,gl:1,he:1,hr:1,hu:1,id:1,it:1,ja:1,km:1,ko:1,ku:1,lt:1,lv:1,nb:1,nl:1,no:1,oc:1,pl:1,pt:1,"pt-br":1,ro:1,ru:1,si:1,sk:1,sl:1,sq:1,sr:1,"sr-latn":1,sv:1,th:1,tr:1,tt:1,ug:1, uk:1,vi:1,zh:1,"zh-cn":1},requires:"dialog",init:function(b){var h=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");b.addCommand("specialchar",{exec:function(){var f=b.langCode,f=h.availableLangs[f]?f:h.availableLangs[f.replace(/-.*/,"")]?f.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+f+".js"),function(){CKEDITOR.tools.extend(b.lang.specialchar,h.langEntries[f]);b.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});b.ui.addButton&& b.ui.addButton("SpecialChar",{label:b.lang.specialchar.toolbar,command:"specialchar",toolbar:"insert,50"})}}),CKEDITOR.config.specialChars="! \x26quot; # $ % \x26amp; ' ( ) * + - . / 0 1 2 3 4 5 6 7 8 9 : ; \x26lt; \x3d \x26gt; ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x26euro; \x26lsquo; \x26rsquo; \x26ldquo; \x26rdquo; \x26ndash; \x26mdash; \x26iexcl; \x26cent; \x26pound; \x26curren; \x26yen; \x26brvbar; \x26sect; \x26uml; \x26copy; \x26ordf; \x26laquo; \x26not; \x26reg; \x26macr; \x26deg; \x26sup2; \x26sup3; \x26acute; \x26micro; \x26para; \x26middot; \x26cedil; \x26sup1; \x26ordm; \x26raquo; \x26frac14; \x26frac12; \x26frac34; \x26iquest; \x26Agrave; \x26Aacute; \x26Acirc; \x26Atilde; \x26Auml; \x26Aring; \x26AElig; \x26Ccedil; \x26Egrave; \x26Eacute; \x26Ecirc; \x26Euml; \x26Igrave; \x26Iacute; \x26Icirc; \x26Iuml; \x26ETH; \x26Ntilde; \x26Ograve; \x26Oacute; \x26Ocirc; \x26Otilde; \x26Ouml; \x26times; \x26Oslash; \x26Ugrave; \x26Uacute; \x26Ucirc; \x26Uuml; \x26Yacute; \x26THORN; \x26szlig; \x26agrave; \x26aacute; \x26acirc; \x26atilde; \x26auml; \x26aring; \x26aelig; \x26ccedil; \x26egrave; \x26eacute; \x26ecirc; \x26euml; \x26igrave; \x26iacute; \x26icirc; \x26iuml; \x26eth; \x26ntilde; \x26ograve; \x26oacute; \x26ocirc; \x26otilde; \x26ouml; \x26divide; \x26oslash; \x26ugrave; \x26uacute; \x26ucirc; \x26uuml; \x26yacute; \x26thorn; \x26yuml; \x26OElig; \x26oelig; \x26#372; \x26#374 \x26#373 \x26#375; \x26sbquo; \x26#8219; \x26bdquo; \x26hellip; \x26trade; \x26#9658; \x26bull; \x26rarr; \x26rArr; \x26hArr; \x26diams; \x26asymp;".split(" "), function(){CKEDITOR.plugins.add("stylescombo",{requires:"richcombo",init:function(b){var h=b.config,f=b.lang.stylescombo,e={},a=[],m=[];b.on("stylesSet",function(f){if(f=f.data.styles){for(var l,c,d,g=0,n=f.length;g=f)for(l=this.getNextSourceNode(b,CKEDITOR.NODE_ELEMENT);l;){if(l.isVisible()&&0===l.getTabIndex()){m=l;break}l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(l=this.getDocument().getBody().getFirst();l=l.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!e)if(!a&&l.equals(this)){if(a=!0,b){if(!(l=l.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;e=1}}else a&&!this.contains(l)&&(e=1);if(l.isVisible()&&!(0>(c=l.getTabIndex()))){if(e&& c==f){m=l;break}c>f&&(!m||!k||c(l=c.getTabIndex())))if(0>=f){if(e&&0===l){m=c;break}l> k&&(m=c,k=l)}else{if(e&&l==f){m=c;break}lk)&&(m=c,k=l)}}m&&m.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(b){function h(b){return CKEDITOR.tools.extend(b||{},{contextSensitive:1,refresh:function(a,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!b.blockless){var f=b.lang.table;b.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height,border-collapse}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];td{border*,background-color,vertical-align,width,height}[colspan,rowspan];"+ (b.plugins.dialogadvtab?"table"+b.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(b){if(b.styles){var a;if(b.styles.border)a=CKEDITOR.tools.style.parse.border(b.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var f=b.styles;f["border-left"]&&f["border-left"]===f["border-right"]&&f["border-right"]===f["border-top"]&& f["border-top"]===f["border-bottom"]&&(a=CKEDITOR.tools.style.parse.border(f["border-top"]))}a&&a.style&&"solid"===a.style&&a.width&&0!==parseFloat(a.width)&&(b.attributes.border=1);"collapse"==b.styles["border-collapse"]&&(b.attributes.cellspacing=0)}}}]]}));b.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));b.addCommand("tableDelete",h({exec:function(b){var a=b.elementPath().contains("table",1);if(a){var f=a.getParent(),h=b.editable();1!=f.getChildCount()||f.is("td", "th")||f.equals(h)||(a=f);b=b.createRange();b.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);a.remove();b.select()}}}));b.ui.addButton&&b.ui.addButton("Table",{label:f.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");b.addMenuItems&&b.addMenuItems({table:{label:f.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:f.deleteTable,command:"tableDelete",group:"table", order:1}});b.on("doubleclick",function(b){b.data.element.is("table")&&(b.data.dialog="tableProperties")});b.contextMenu&&b.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function b(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){var b=/^(?:td|th)$/;0c)c=f}return c}function m(c,d){for(var e=p(c)?c:b(c),f=e[0].getAscendant("table"),g=a(e,1),e=a(e),h=d?g:e,k=CKEDITOR.tools.buildTableMap(f),f=[],g=[],e=[],l=k.length,m=0;ml?new CKEDITOR.dom.element(h[0][l+1]):k&&-1!==h[0][k-1].cellIndex?new CKEDITOR.dom.element(h[0][k-1]):new CKEDITOR.dom.element(e.$.parentNode);m.length==a&&(d[0].moveToPosition(e,CKEDITOR.POSITION_AFTER_END),d[0].select(),e.remove());return k}function l(a,b){var c=a.getStartElement().getAscendant({td:1,th:1},!0);if(c){var d=c.clone();d.appendBogus();b?d.insertBefore(c):d.insertAfter(c)}}function c(a){if(a instanceof CKEDITOR.dom.selection){var e= a.getRanges(),f=b(a),g=f[0]&&f[0].getAscendant("table"),h;a:{var k=0;h=f.length-1;for(var l={},m,n;m=f[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=f[k++];)if((n=m.getPrevious())&&!n.getCustomData("delete_cell")||(n=m.getNext())&&!n.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(l);h=n;break a}CKEDITOR.dom.element.clearAllMarkers(l);k=f[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=f[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a= f.length-1;0<=a;a--)c(f[a]);h?d(h,!0):g&&(e[0].moveToPosition(g,CKEDITOR.POSITION_BEFORE_START),e[0].select(),g.remove())}else a instanceof CKEDITOR.dom.element&&(e=a.getParent(),1==e.getChildCount()?e.remove():a.remove())}function d(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function g(a,b,c){a=a[b]; if("undefined"==typeof c)return a;for(b=0;a&&be.length)||(f=a.getCommonAncestor())&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("table"))return!1;a=e[0];f=a.getAscendant("table");var h=CKEDITOR.tools.buildTableMap(f),k=h.length,l=h[0].length,m=a.getParent().$.rowIndex,n=g(h,m,a),p;if(c){var w;try{var y=parseInt(a.getAttribute("rowspan"),10)||1;p=parseInt(a.getAttribute("colspan"), 10)||1;w=h["up"==c?m-y:"down"==c?m+y:m]["left"==c?n-p:"right"==c?n+p:n]}catch(L){return!1}if(!w||a.$==w)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(w))}c=a.getDocument();var C=m,y=w=0,O=!d&&new CKEDITOR.dom.documentFragment(c),I=0;for(c=0;c=l?a.removeAttribute("rowSpan"):a.$.rowSpan=w;w>=k?a.removeAttribute("colSpan"):a.$.colSpan=y;d=new CKEDITOR.dom.nodeList(f.$.rows);e=d.count();for(c=e-1;0<=c;c--)f=d.getItem(c),f.$.cells.length||(f.remove(),e++);return a}function y(a,c){var d=b(a);if(1< d.length)return!1;if(c)return!0;var d=d[0],e=d.getParent(),f=e.getAscendant("table"),h=CKEDITOR.tools.buildTableMap(f),k=e.$.rowIndex,l=g(h,k,d),m=d.$.rowSpan,n;if(1l){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||f.append(e)}else for(m=n=1,f=e.clone(),f.insertAfter(e),f.append(e=d.clone()),p=g(h,k),l=0;le);n++){k[m+n]||(k[m+n]=[]);for(var y=0;y=a)break}}return k},function(){function b(a){return CKEDITOR.env.ie?a.$.clientWidth:parseInt(a.getComputedStyle("width"),10)}function h(a,b){var e=a.getComputedStyle("border-"+ b+"-width"),f={thin:"0px",medium:"1px",thick:"2px"};0>e.indexOf("px")&&(e=e in f&&"none"!=a.getComputedStyle("border-style")?f[e]:0);return parseFloat(e)}function f(a){var b=[],e={},f="rtl"===a.getComputedStyle("direction"),k=CKEDITOR.tools.array.zip((new CKEDITOR.dom.nodeList(a.$.rows)).toArray(),CKEDITOR.tools.buildTableMap(a));CKEDITOR.tools.array.forEach(k,function(k){var l=k[0].$;k=k[1];var m=-1,r=0,y=null;l?(r=new CKEDITOR.dom.element(l),y={height:r.$.offsetHeight,position:r.getDocumentPosition()}): y=void 0;for(var l=CKEDITOR.env.ie&&!CKEDITOR.env.edge,u="collapse"===a.getComputedStyle("border-collapse"),r=y.height,y=y.position,z=0;z=p.x&&a<=p.x+p.width&&b>=p.y&&b<=p.y+p.height))return p= null,x=z=0,t.removeListener("mouseup",y),r.removeListener("mousedown",m),r.removeListener("mousemove",w),t.getBody().setStyle("cursor","auto"),l?r.remove():r.hide(),0;var c=a-Math.round(r.$.offsetWidth/2);if(x){if(c==D||c==A)return 1;c=Math.max(c,D);c=Math.min(c,A);z=c-u}r.setStyle("left",k(c));return 1}}function m(a){var b=a.data.getTarget();if("mouseout"==a.name){if(!b.is("table"))return;for(var e=new CKEDITOR.dom.element(a.data.$.relatedTarget||a.data.$.toElement);e&&e.$&&!e.equals(b)&&!e.is("body");)e= e.getParent();if(!e||e.equals(b))return}b.getAscendant("table",1).removeCustomData("_cke_table_pillars");a.removeListener()}var k=CKEDITOR.tools.cssLength,l=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(b){b.on("contentDom",function(){var d,g=b.editable();g.attachListener(g.isInline()?g:b.document,"mousemove",function(g){g=g.data;var h=g.getTarget();if(h.type==CKEDITOR.NODE_ELEMENT){var k=g.getPageOffset().x, l=g.getPageOffset().y;if(d&&d.move(k,l))e(g);else if(h.is("table")||h.getAscendant({thead:1,tbody:1,tfoot:1},1))if(g=h.getAscendant("table",1),b.editable().contains(g)){(h=g.getCustomData("_cke_table_pillars"))||(g.setCustomData("_cke_table_pillars",h=f(g)),g.on("mouseout",m),g.on("mousedown",m));a:{g=h;for(var h=0,t=g.length;h=r.x&&k<=r.x+r.width&&l>=r.y&&l<=r.y+r.height){k=r;break a}}k=null}k&&(!d&&(d=new a(b)),d.attachTo(k))}}})})}})}(),"use strict",function(){function b(a, b){return CKEDITOR.tools.array.reduce(b,function(a,b){return b(a)},a)}var h=[CKEDITOR.CTRL+90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],f={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(a){function b(a){l.enabled&&!1!==a.data.command.canUndo&&l.save()}function f(){l.enabled=a.readOnly?!1:"wysiwyg"==a.mode;l.onChange()}var l=a.undoManager=new e(a),m=l.editingHandler=new k(l),w=a.addCommand("undo",{exec:function(){l.undo()&&(a.selectionChange(),this.fire("afterUndo"))},startDisabled:!0, canUndo:!1}),p=a.addCommand("redo",{exec:function(){l.redo()&&(a.selectionChange(),this.fire("afterRedo"))},startDisabled:!0,canUndo:!1});a.setKeystroke([[h[0],"undo"],[h[1],"redo"],[h[2],"redo"]]);l.onChange=function(){w.setState(l.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);p.setState(l.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};a.on("beforeCommandExec",b);a.on("afterCommandExec",b);a.on("saveSnapshot",function(a){l.save(a.data&&a.data.contentOnly)});a.on("contentDom", m.attachListeners,m);a.on("instanceReady",function(){a.fire("saveSnapshot")});a.on("beforeModeUnload",function(){"wysiwyg"==a.mode&&l.save(!0)});a.on("mode",f);a.on("readOnly",f);a.ui.addButton&&(a.ui.addButton("Undo",{label:a.lang.undo.undo,command:"undo",toolbar:"undo,10"}),a.ui.addButton("Redo",{label:a.lang.undo.redo,command:"redo",toolbar:"undo,20"}));a.resetUndo=function(){l.reset();a.fire("saveSnapshot")};a.on("updateSnapshot",function(){l.currentImage&&l.update()});a.on("lockSnapshot",function(a){a= a.data;l.lock(a&&a.dontUpdate,a&&a.forceUpdate)});a.on("unlockSnapshot",l.unlock,l)}});CKEDITOR.plugins.undo={};var e=CKEDITOR.plugins.undo.UndoManager=function(a){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=a.config.undoStackSize||20;this.strokesLimit=25;this._filterRules=[];this.editor=a;this.reset();CKEDITOR.env.ie&&this.addFilterRule(function(a){return a.replace(/\s+data-cke-expando=".*?"/g,"")})};e.prototype={type:function(a,b){var f=e.getKeyGroup(a),h=this.strokesRecorded[f]+ 1;b=b||h>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());b?(h=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[f]=h;this.previousKeyGroup=f},keyGroupChanged:function(a){return e.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup= -1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(b,d,e){var f=this.editor;if(this.locked||"ready"!=f.status||"wysiwyg"!=f.mode)return!1;var h=f.editable();if(!h||"ready"!=h.status)return!1;h=this.snapshots;d||(d=new a(f));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(b||d.equalsSelection(this.currentImage))return!1}else!1!==e&&f.fire("change");h.splice(this.index+ 1,h.length-this.index-1);h.length==this.limit&&h.shift();this.index=h.push(d)-1;this.currentImage=d;!1!==e&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor,e;a.bookmarks&&(b.focus(),e=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?e.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(e=this.editor.document.getBody().$.createTextRange(),e.collapse(!0),e.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index]; this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,e=this.currentImage,f;if(e)if(a)for(f=this.index-1;0<=f;f--){if(a=b[f],!e.equalsContent(a))return a.index=f,a}else for(f=this.index+1;f=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var d=this.undoManager;b=b.data.getKey();var f=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(e.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new a(d.editor,!0))))if(0CKEDITOR.env.version&&e.enterMode!=CKEDITOR.ENTER_DIV&&b("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&& 10this.$.offsetHeight){var c= e.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(f,"blur",function(){try{f.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(f,"touchend",function(){a.focus()});c=e.document.getElementsByTag("title").getItem(0);c.data("cke-title",c.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 h(a){function b(){var c;a.editable().attachListener(a,"selectionChange",function(){var b=a.getSelection().getSelectedElement();b&&(c&&(c.detachEvent("onresizestart",e),c=null),b.$.attachEvent("onresizestart",e),c=b.$)})}function e(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var f=a.document.$;f.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing); f.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(c){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&b(a)}function f(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var b=[],e;for(e in CKEDITOR.dtd.$removeEmpty)b.push("html.CSS1Compat "+e+"[contenteditable\x3dfalse]");a.push(b.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"), a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var e;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]",requiredContent:"body"});a.addMode("wysiwyg",function(b){function f(d){d&&d.removeListener();a.isDestroyed()||a.isDetached()||(a.editable(new e(a, c.$.contentWindow.document.body)),a.setData(a.getData(1),b))}var h="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",h=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(h)+"}())":"",c=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+h+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e');c.setStyles({width:"100%",height:"100%"});c.addClass("cke_wysiwyg_frame").addClass("cke_reset"); h=a.ui.space("contents");h.append(c);var d=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(d)c.on("load",f);var g=a.title,n=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&n&&(g+=", "+n),c.setAttribute("title",g));if(n){var g=CKEDITOR.tools.getNextId(),y=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+n+"\x3c/span\x3e");h.append(y,1);c.setAttribute("aria-describedby",g)}a.on("beforeModeUnload",function(a){a.removeListener();y&&y.remove()}); c.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!d&&f();a.fire("ariaWidget",c)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var b=this.config,e=b.contentsCss;CKEDITOR.tools.isArray(e)||(b.contentsCss=e?[e]:[]);b.contentsCss.push(a)};e=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(b,0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")}, base:CKEDITOR.editable,proto:{setData:function(a,b){var e=this.editor;if(b)this.setHtml(a),this.fixInitialSelection(),e.fire("dataReady");else{this._.isLoadingData=!0;e._.dataStore={id:1};var h=e.config,c=h.fullPage,d=h.docType,g=CKEDITOR.tools.buildStyleHtml(f()).replace(/