/* Copyright (c) 2003-2018, 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 f=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,h={timestamp:"I8E8",version:"4.10.1",revision:"59246e973",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:f},status:"unloaded",basePath:function(){var d=window.CKEDITOR_BASEPATH||"";if(!d)for(var k=document.getElementsByTagName("script"),e=0;ea.getListenerIndex(d)){a=a.listeners;e||(e=this);isNaN(b)&&(b=10);var n=this;g.fn=d;g.priority=b;for(var w=a.length-1;0<=w;w--)if(a[w].priority<=b)return a.splice(w+1,0,g),{removeListener:c};a.unshift(g)}return{removeListener:c}},once:function(){var k=Array.prototype.slice.call(arguments),d=k[1];k[1]=function(k){k.removeListener();return d.apply(this, arguments)};return this.on.apply(this,k)},capture:function(){CKEDITOR.event.useCapture=1;var k=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return k},fire:function(){var k=0,d=function(){k=1},e=0,f=function(){e=1};return function(b,g,c){var a=h(this)[b];b=k;var n=e;k=e=0;if(a){var w=a.listeners;if(w.length)for(var w=w.slice(0),v,t=0;tdocument.documentMode),mobile:-1k||e.quirks);e.gecko&&(h=f.match(/rv:([\d\.]+)/))&&(h=h[1].split("."),k=1E4*h[0]+100*(h[1]||0)+1*(h[2]||0));e.air&&(k=parseFloat(f.match(/ adobeair\/(\d+)/)[1]));e.webkit&&(k=parseFloat(f.match(/ applewebkit\/(\d+)/)[1]));e.version=k;e.isCompatible=!(e.ie&&7>k)&&!(e.gecko&&4E4>k)&&!(e.webkit&& 534>k);e.hidpi=2<=window.devicePixelRatio;e.needsBrFiller=e.gecko||e.webkit||e.ie&&10k;e.cssClass="cke_browser_"+(e.ie?"ie":e.gecko?"gecko":e.webkit?"webkit":"unknown");e.quirks&&(e.cssClass+=" cke_browser_quirks");e.ie&&(e.cssClass+=" cke_browser_ie"+(e.quirks?"6 cke_browser_iequirks":e.version));e.air&&(e.cssClass+=" cke_browser_air");e.iOS&&(e.cssClass+=" cke_browser_ios");e.hidpi&&(e.cssClass+=" cke_hidpi");return e}()),"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR); CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var f=document.createElement("script");f.type="text/javascript";f.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(f)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(f){(this._.pending||(this._.pending=[])).push(f)};(function(){CKEDITOR.domReady(function(){var f=CKEDITOR.loadFullCore,h=CKEDITOR.loadFullCoreTimeout;f&&(CKEDITOR.status= "basic_ready",f&&f._load?f():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(f,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:f,additionalData:h})},CKEDITOR.error=function(f,h){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log", {type:"error",errorCode:f,additionalData:h})},CKEDITOR.on("log",function(f){if(window.console&&window.console.log){var h=console[f.data.type]?f.data.type:"log",e=f.data.errorCode;if(f=f.data.additionalData)console[h]("[CKEDITOR] Error code: "+e+".",f);else console[h]("[CKEDITOR] Error code: "+e+".");console[h]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+e)}},null,null,999),CKEDITOR.dom={},function(){var f=[],h=CKEDITOR.env.gecko? "-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",e=/&/g,k=/>/g,d=/|\s) /g,function(a,c){return c+"\x26nbsp;"}).replace(/ (?=<)/g, "\x26nbsp;")},getNextNumber:function(){var c=0;return function(){return++c}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var c="e",a=0;8>a;a++)c+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return c},override:function(c,a){var n=a(c);n.prototype=c.prototype;return n},setTimeout:function(c,a,n,b,g){g||(g=window);n||(n=g);return g.setTimeout(function(){b?c.apply(n,[].concat(b)):c.apply(n)},a||0)},throttle:function(c,a,n){var b,g=0;n=n||{};return{input:function(){function d(){g= (new Date).getTime();b=!1;a.apply(n,e)}var e=Array.prototype.slice.call(arguments);b&&(clearTimeout(b),b=0);var k=(new Date).getTime()-g;kc;c++)a[c]=("0"+parseInt(a[c],10).toString(16)).slice(-2);return"#"+a.join("")})},normalizeHex:function(c){return c.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,c,b,g){a=c.toLowerCase();3==a.length&&(a=a.split(""),a=[a[0],a[0],a[1],a[1],a[2],a[2]].join(""));return"#"+a+g})},parseCssText:function(c,a,b){var g={}; b&&(c=(new CKEDITOR.dom.element("span")).setAttribute("style",c).getAttribute("style")||"");c&&(c=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(c)));if(!c||";"==c)return g;c.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(c,b,n){a&&(b=b.toLowerCase(),"font-family"==b&&(n=n.replace(/\s*,\s*/g,",")),n=CKEDITOR.tools.trim(n));g[b]=n});return g},writeCssText:function(c,a){var b,g=[];for(b in c)g.push(b+":"+c[b]);a&&g.sort();return g.join("; ")},objectCompare:function(c, a,b){var g;if(!c&&!a)return!0;if(!c||!a)return!1;for(g in c)if(c[g]!=a[g])return!1;if(!b)for(g in a)if(c[g]!=a[g])return!1;return!0},objectKeys:function(c){var a=[],b;for(b in c)a.push(b);return a},convertArrayToObject:function(c,a){var b={};1==arguments.length&&(a=!0);for(var g=0,d=c.length;gb;b++)c.push(Math.floor(256*Math.random()));for(b=0;bCKEDITOR.env.version?4===a.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:1===a.button?CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:a.button:!1},convertHexStringToBytes:function(c){var a=[],b=c.length/ 2,g;for(g=0;ge)for(f=e;3>f;f++)d[f]=0;k[0]=(d[0]&252)>>2;k[1]=(d[0]&3)<<4|d[1]>>4;k[2]=(d[1]&15)<<2|(d[2]&192)>>6;k[3]=d[2]&63;for(f=0;4>f;f++)a=f<=e?a+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k[f]):a+"\x3d"}return a},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF", aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",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",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi, _hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(c){var a={},b=this._findColor(c);b.length&&(a.color=b[0],CKEDITOR.tools.array.forEach(b,function(a){c=c.replace(a,"")}));if(c=CKEDITOR.tools.trim(c))a.unprocessed=c;return a},margin:function(c){function a(a){b.top=g[a[0]];b.right=g[a[1]];b.bottom=g[a[2]];b.left=g[a[3]]}var b={},g=c.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(g.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 b},border:function(c){var a={},b=c.split(/\s+/g);c=CKEDITOR.tools.style.parse._findColor(c);c.length&&(a.color=c[0]);CKEDITOR.tools.array.forEach(b,function(c){a.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,c)?!a.width&&CKEDITOR.tools.style.parse._widthRegExp.test(c)&&(a.width=c):a.style=c});return a},_findColor:function(c){var a=[],b=CKEDITOR.tools.array,a=a.concat(c.match(this._rgbaRegExp)||[]),a=a.concat(c.match(this._hslaRegExp)|| []);return a=a.concat(b.filter(c.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}},array:{filter:function(c,a,b){var g=[];this.forEach(c,function(d,e){a.call(b,d,e,c)&&g.push(d)});return g},forEach:function(c,a,b){var g=c.length,d;for(d=0;dCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&k(d);return d},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling}, insertAfter:function(f){f.$.parentNode.insertBefore(this.$,f.$.nextSibling);return f},insertBefore:function(f){f.$.parentNode.insertBefore(this.$,f.$);return f},insertBeforeMe:function(f){this.$.parentNode.insertBefore(f.$,this.$);return f},getAddress:function(f){for(var h=[],e=this.getDocument().$.documentElement,k=this.$;k&&k!=e;){var d=k.parentNode;d&&h.unshift(this.getIndex.call({$:k},f));k=d}return h},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)}, getIndex:function(f){function h(d,b){var g=b?d.nextSibling:d.previousSibling;return g&&g.nodeType==CKEDITOR.NODE_TEXT?e(g)?h(g,b):g:null}function e(d){return!d.nodeValue||d.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var k=this.$,d=-1,l;if(!this.$.parentNode||f&&k.nodeType==CKEDITOR.NODE_TEXT&&e(k)&&!h(k)&&!h(k,!0))return-1;do f&&k!=this.$&&k.nodeType==CKEDITOR.NODE_TEXT&&(l||e(k))||(d++,l=k.nodeType==CKEDITOR.NODE_TEXT);while(k=k.previousSibling);return d},getNextSourceNode:function(f, h,e){if(e&&!e.call){var k=e;e=function(d){return!d.equals(k)}}f=!f&&this.getFirst&&this.getFirst();var d;if(!f){if(this.type==CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;f=this.getNext()}for(;!f&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;f=d.getNext()}return!f||e&&!1===e(f)?null:h&&h!=f.type?f.getNextSourceNode(!1,h,e):f},getPreviousSourceNode:function(f,h,e){if(e&&!e.call){var k=e;e=function(d){return!d.equals(k)}}f=!f&&this.getLast&&this.getLast();var d;if(!f){if(this.type== CKEDITOR.NODE_ELEMENT&&e&&!1===e(this,!0))return null;f=this.getPrevious()}for(;!f&&(d=(d||this).getParent());){if(e&&!1===e(d,!0))return null;f=d.getPrevious()}return!f||e&&!1===e(f)?null:h&&f.type!=h?f.getPreviousSourceNode(!1,h,e):f},getPrevious:function(f){var h=this.$,e;do e=(h=h.previousSibling)&&10!=h.nodeType&&new CKEDITOR.dom.node(h);while(e&&f&&!f(e));return e},getNext:function(f){var h=this.$,e;do e=(h=h.nextSibling)&&new CKEDITOR.dom.node(h);while(e&&f&&!f(e));return e},getParent:function(f){var h= this.$.parentNode;return h&&(h.nodeType==CKEDITOR.NODE_ELEMENT||f&&h.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(h):null},getParents:function(f){var h=this,e=[];do e[f?"push":"unshift"](h);while(h=h.getParent());return e},getCommonAncestor:function(f){if(f.equals(this))return this;if(f.contains&&f.contains(this))return f;var h=this.contains?this:this.getParent();do if(h.contains(f))return h;while(h=h.getParent());return null},getPosition:function(f){var h=this.$,e=f.$;if(h.compareDocumentPosition)return h.compareDocumentPosition(e); if(h==e)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&f.type==CKEDITOR.NODE_ELEMENT){if(h.contains){if(h.contains(e))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(e.contains(h))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in h)return 0>h.sourceIndex||0>e.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:h.sourceIndex=document.documentMode||!h||(f=h+":"+f);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(f))},getHead:function(){var f=this.$.getElementsByTagName("head")[0];return f=f?new CKEDITOR.dom.element(f):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(f){this.$.open("text/html","replace");CKEDITOR.env.ie&&(f=f.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(f);this.$.close()},find:function(f){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(f))}, findOne:function(f){return(f=this.$.querySelector(f))?new CKEDITOR.dom.element(f):null},_getHtml5ShivFrag:function(){var f=this.getCustomData("html5ShivFrag");f||(f=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(f,!0),this.setCustomData("html5ShivFrag",f));return f}}),CKEDITOR.dom.nodeList=function(f){this.$=f},CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(f){return 0>f||f>=this.$.length?null:(f=this.$[f])?new CKEDITOR.dom.node(f):null}, toArray:function(){return CKEDITOR.tools.array.map(this.$,function(f){return new CKEDITOR.dom.node(f)})}},CKEDITOR.dom.element=function(f,h){"string"==typeof f&&(f=(h?h.$:document).createElement(f));CKEDITOR.dom.domObject.call(this,f)},CKEDITOR.dom.element.get=function(f){return(f="string"==typeof f?document.getElementById(f)||document.getElementsByName(f)[0]:f)&&(f.$?f:new CKEDITOR.dom.element(f))},CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node,CKEDITOR.dom.element.createFromHtml=function(f, h){var e=new CKEDITOR.dom.element("div",h);e.setHtml(f);return e.getFirst().remove()},CKEDITOR.dom.element.setMarker=function(f,h,e,k){var d=h.getCustomData("list_marker_id")||h.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),l=h.getCustomData("list_marker_names")||h.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");f[d]=h;l[e]=1;return h.setCustomData(e,k)},CKEDITOR.dom.element.clearAllMarkers=function(f){for(var h in f)CKEDITOR.dom.element.clearMarkers(f, f[h],1)},CKEDITOR.dom.element.clearMarkers=function(f,h,e){var k=h.getCustomData("list_marker_names"),d=h.getCustomData("list_marker_id"),l;for(l in k)h.removeCustomData(l);h.removeCustomData("list_marker_names");e&&(h.removeCustomData("list_marker_id"),delete f[d])},function(){function f(b,g){return-1<(" "+b+" ").replace(l," ").indexOf(" "+g+" ")}function h(b){var g=!0;b.$.id||(b.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),g=!1);return function(){g||b.removeAttribute("id")}}function e(b,g){var c= CKEDITOR.tools.escapeCss(b.$.id);return"#"+c+" "+g.split(/,\s*/).join(", #"+c+" ")}function k(b){for(var g=0,c=0,a=m[b].length;cCKEDITOR.env.version?this.$.text+=b:this.append(new CKEDITOR.dom.text(b))},appendBogus:function(b){if(b||CKEDITOR.env.needsBrFiller){for(b=this.getLast();b&&b.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(b.getText());)b= b.getPrevious();b&&b.is&&b.is("br")||(b=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&b.setAttribute("type","_moz"),this.append(b))}},breakParent:function(b,g){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(b);var a=c.extractContents(!1,g||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=a.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d); c.insertAfter(this);c.remove(!0)}else a.insertAfterNode(this)},contains:document.compareDocumentPosition?function(b){return!!(this.$.compareDocumentPosition(b.$)&16)}:function(b){var g=this.$;return b.type!=CKEDITOR.NODE_ELEMENT?g.contains(b.getParent().$):g!=b.$&&g.contains(b.$)},focus:function(){function b(){try{this.$.focus()}catch(b){}}return function(g){g?CKEDITOR.tools.setTimeout(b,100,this):b.call(this)}}(),getHtml:function(){var b=this.$.innerHTML;return CKEDITOR.env.ie?b.replace(/<\?[^>]*>/g, ""):b},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var b=this.$.ownerDocument.createElement("div");b.appendChild(this.$.cloneNode(!0));return b.innerHTML},getClientRect:function(b){var g=CKEDITOR.tools.extend({},this.$.getBoundingClientRect());!g.width&&(g.width=g.right-g.left);!g.height&&(g.height=g.bottom-g.top);return b?CKEDITOR.tools.getAbsoluteRectPosition(this.getWindow(),g):g},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(b){try{var g= this.$;if(this.getParent())return g.innerHTML=b;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(g);g.innerHTML=b;c.removeChild(g);return b}catch(a){this.$.innerHTML="";g=new CKEDITOR.dom.element("body",this.getDocument());g.$.innerHTML=b;for(g=g.getChildren();g.count();)this.append(g.getItem(0));return b}}:function(b){return this.$.innerHTML=b},setText:function(){var b=document.createElement("p");b.innerHTML="x";b=b.textContent;return function(g){this.$[b?"textContent":"innerText"]=g}}(), getAttribute:function(){var b=function(b){return this.$.getAttribute(b,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){switch(b){case "class":b="className";break;case "http-equiv":b="httpEquiv";break;case "name":return this.$.name;case "tabindex":return b=this.$.getAttribute(b,2),0!==b&&0===this.$.tabIndex&&(b=null),b;case "checked":return b=this.$.attributes.getNamedItem(b),(b.specified?b.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[b]; case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(b,2)}:b}(),getAttributes:function(b){var g={},c=this.$.attributes,a;b=CKEDITOR.tools.isArray(b)?b:[];for(a=0;a=document.documentMode){var g=this.$.scopeName;"HTML"!=g&&(b=g.toLowerCase()+":"+b)}this.getName=function(){return b};return this.getName()},getValue:function(){return this.$.value}, getFirst:function(b){var g=this.$.firstChild;(g=g&&new CKEDITOR.dom.node(g))&&b&&!b(g)&&(g=g.getNext(b));return g},getLast:function(b){var g=this.$.lastChild;(g=g&&new CKEDITOR.dom.node(g))&&b&&!b(g)&&(g=g.getPrevious(b));return g},getStyle:function(b){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(b)]},is:function(){var b=this.getName();if("object"==typeof arguments[0])return!!arguments[0][b];for(var g=0;gCKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(g),g=c.getHtml(),c.setHtml(b),b=c.getHtml())}return g== b},isVisible:function(){var b=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),g,c;b&&CKEDITOR.env.webkit&&(g=this.getWindow(),!g.equals(CKEDITOR.document.getWindow())&&(c=g.$.frameElement)&&(b=(new CKEDITOR.dom.element(c)).isVisible()));return!!b},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1;for(var b=this.getChildren(),g=0,c=b.count();gCKEDITOR.env.version?function(g){return"name"==g?!!this.$.name:b.call(this,g)}:b:function(b){return!!this.$.attributes.getNamedItem(b)}}(), hide:function(){this.setStyle("display","none")},moveChildren:function(b,g){var c=this.$;b=b.$;if(c!=b){var a;if(g)for(;a=c.lastChild;)b.insertBefore(c.removeChild(a),b.firstChild);else for(;a=c.firstChild;)b.appendChild(c.removeChild(a))}},mergeSiblings:function(){function b(b,c,a){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d=[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=a?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var e= a?b.getLast():b.getFirst();d.length;)d.shift().move(b,!a);c.moveChildren(b,!a);c.remove();e&&e.type==CKEDITOR.NODE_ELEMENT&&e.mergeSiblings()}}}return function(g){if(!1===g||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))b(this,this.getNext(),!0),b(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"",visibility:""})},setAttribute:function(){var b=function(b,c){this.$.setAttribute(b,c);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(g, c){"class"==g?this.$.className=c:"style"==g?this.$.style.cssText=c:"tabindex"==g?this.$.tabIndex=c:"checked"==g?this.$.checked=c:"contenteditable"==g?b.call(this,"contentEditable",c):b.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(g,c){if("src"==g&&c.match(/^http:\/\//))try{b.apply(this,arguments)}catch(a){}else b.apply(this,arguments);return this}:b}(),setAttributes:function(b){for(var g in b)this.setAttribute(g,b[g]);return this},setValue:function(b){this.$.value= b;return this},removeAttribute:function(){var b=function(b){this.$.removeAttribute(b)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b){"class"==b?b="className":"tabindex"==b?b="tabIndex":"contenteditable"==b&&(b="contentEditable");this.$.removeAttribute(b)}:b}(),removeAttributes:function(b){if(CKEDITOR.tools.isArray(b))for(var g=0;gCKEDITOR.env.version?(b=Math.round(100*b),this.setStyle("filter",100<=b?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+b+")")):this.setStyle("opacity",b)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var b, g=this.getElementsByTag("*"),c=0,a=g.count();ck||0k?k:d);c&&(0>e||0e?e:a,0)},setState:function(b,g,c){g=g||"cke";switch(b){case CKEDITOR.TRISTATE_ON:this.addClass(g+"_on");this.removeClass(g+"_off");this.removeClass(g+"_disabled");c&&this.setAttribute("aria-pressed", !0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(g+"_disabled");this.removeClass(g+"_off");this.removeClass(g+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(g+"_off"),this.removeClass(g+"_on"),this.removeClass(g+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}},getFrameDocument:function(){var b=this.$;try{b.contentWindow.document}catch(g){b.src= b.src}return b&&new CKEDITOR.dom.document(b.contentWindow.document)},copyAttributes:function(b,g){var c=this.$.attributes;g=g||{};for(var a=0;a=y.getChildCount()?(y=y.getChild(z-1),F=!0):y=y.getChild(z):H=F=!0;u.type==CKEDITOR.NODE_TEXT?l?G=!0:u.split(x):0Z)for(;Y;)Y=e(Y,K,!0);K=U}l||f()}}function e(){var a=!1,c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(g){return b(g)||c(g)?!0:d(g)&&!a?a=!0:g.type==CKEDITOR.NODE_TEXT&&(g.hasAscendant("pre")||CKEDITOR.tools.trim(g.getText()).length)||g.type==CKEDITOR.NODE_ELEMENT&&!g.is(l)?!1:!0}}function k(a){var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(1); return function(d){return b(d)||c(d)?!0:!a&&m(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}}function d(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&c(a)&&(b=a);return g(a)&&!(m(a)&&a.equals(b))})}}var l={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},m=CKEDITOR.dom.walker.bogus(),b=/^[\t\r\n ]*(?: |\xa0)$/, g=CKEDITOR.dom.walker.editable(),c=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 b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||h(this,1,b,a,"undefined"==typeof c?!0:c);return b},createBookmark:function(a){var c,b,d,g,e=this.collapsed;c=this.document.createElement("span");c.data("cke-bookmark",1);c.setStyle("display", "none");c.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),c.setAttribute("id",d+(e?"C":"S")));e||(b=c.clone(),b.setHtml("\x26nbsp;"),a&&b.setAttribute("id",d+"E"),g=this.clone(),g.collapse(),g.insertNode(b));g=this.clone();g.collapse(!0);g.insertNode(c);b?(this.setStartAfter(c),this.setEndBefore(b)):this.moveToPosition(c,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(e?"C":"S"):c,endNode:a?d+"E":b,serializable:a,collapsed:e}},createBookmark2:function(){function a(a){var c= a.container,d=a.offset,g;g=c;var e=d;g=g.type!=CKEDITOR.NODE_ELEMENT||0===e||e==g.getChildCount()?0:g.getChild(e-1).type==CKEDITOR.NODE_TEXT&&g.getChild(e).type==CKEDITOR.NODE_TEXT;g&&(c=c.getChild(d-1),d=c.getLength());if(c.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=g.getIndex(),a.container=g.getParent()))}}var b=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(b){var d=this.collapsed,g={container:this.startContainer, offset:this.startOffset},e={container:this.endContainer,offset:this.endOffset};b&&(a(g),c(g,this.root),d||(a(e),c(e,this.root)));return{start:g.container.getAddress(b),end:d?null:e.container.getAddress(b),startOffset:g.offset,endOffset:e.offset,normalized:b,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var c=this.document.getByAddress(a.start,a.normalized),b=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(c,b);d?this.setEnd(d,a):this.collapse(!0)}else c= (b=a.serializable)?this.document.getById(a.startNode):a.startNode,a=b?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,b=this.startOffset,d=this.endOffset,g;if(a.type==CKEDITOR.NODE_ELEMENT)if(g=a.getChildCount(),g>b)a=a.getChild(b);else if(1>g)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(g=c.getChildCount(),g>d)c=c.getChild(d).getPreviousSourceNode(!0);else if(1>g)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 b=this.startContainer,d=this.endContainer,b=b.equals(d)?a&&b.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?b.getChild(this.startOffset): b:b.getCommonAncestor(d);return c&&!b.is?b.getParent():b},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 b=this.startContainer,d=this.startOffset,g=this.collapsed;if((!a||g)&&b&&b.type==CKEDITOR.NODE_TEXT){if(d)if(d>=b.getLength())d=b.getIndex()+1,b=b.getParent();else{var e=b.split(d),d=b.getIndex()+1,b=b.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(e,this.endOffset-this.startOffset):b.equals(this.endContainer)&&(this.endOffset+=1)}else d=b.getIndex(),b=b.getParent(); this.setStart(b,d);if(g){this.collapse(!0);return}}b=this.endContainer;d=this.endOffset;c||g||!b||b.type!=CKEDITOR.NODE_TEXT||(d?(d>=b.getLength()||b.split(d),d=b.getIndex()+1):d=b.getIndex(),b=b.getParent(),this.setEnd(b,d))},enlarge:function(a,c){function b(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.hasAttribute("contenteditable")?null:a}var d=new RegExp(/[^\s\ufeff]/);switch(a){case CKEDITOR.ENLARGE_INLINE:var g=1;case CKEDITOR.ENLARGE_ELEMENT:var e=function(a,c){var b=new CKEDITOR.dom.range(f); b.setStart(a,c);b.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);var b=new CKEDITOR.dom.walker(b),g;for(b.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};g=b.next();){if(g.type!=CKEDITOR.NODE_TEXT)return!1;I=g!=a?g.getText():g.substring(c);if(d.test(I))return!1}return!0};if(this.collapsed)break;var k=this.getCommonAncestor(),f=this.root,h,m,l,u,y,x=!1,z,I;z=this.startContainer;var F=this.startOffset;z.type==CKEDITOR.NODE_TEXT?(F&&(z=!CKEDITOR.tools.trim(z.substring(0,F)).length&& z,x=!!z),z&&((u=z.getPrevious())||(l=z.getParent()))):(F&&(u=z.getChild(F-1)||z.getLast()),u||(l=z));for(l=b(l);l||u;){if(l&&!u){!y&&l.equals(k)&&(y=!0);if(g?l.isBlockBoundary():!f.contains(l))break;x&&"inline"==l.getComputedStyle("display")||(x=!1,y?h=l:this.setStartBefore(l));u=l.getPrevious()}for(;u;)if(z=!1,u.type==CKEDITOR.NODE_COMMENT)u=u.getPrevious();else{if(u.type==CKEDITOR.NODE_TEXT)I=u.getText(),d.test(I)&&(u=null),z=/[\s\ufeff]$/.test(I);else if((u.$.offsetWidth>(CKEDITOR.env.webkit?1: 0)||c&&u.is("br"))&&!u.data("cke-bookmark"))if(x&&CKEDITOR.dtd.$removeEmpty[u.getName()]){I=u.getText();if(d.test(I))u=null;else for(var F=u.$.getElementsByTagName("*"),E=0,H;H=F[E++];)if(!CKEDITOR.dtd.$removeEmpty[H.nodeName.toLowerCase()]){u=null;break}u&&(z=!!I.length)}else u=null;z&&(x?y?h=l:l&&this.setStartBefore(l):x=!0);if(u){z=u.getPrevious();if(!l&&!z){l=u;u=null;break}u=z}else l=null}l&&(l=b(l.getParent()))}z=this.endContainer;F=this.endOffset;l=u=null;y=x=!1;z.type==CKEDITOR.NODE_TEXT? CKEDITOR.tools.trim(z.substring(F)).length?x=!0:(x=!z.getLength(),F==z.getLength()?(u=z.getNext())||(l=z.getParent()):e(z,F)&&(l=z.getParent())):(u=z.getChild(F))||(l=z);for(;l||u;){if(l&&!u){!y&&l.equals(k)&&(y=!0);if(g?l.isBlockBoundary():!f.contains(l))break;x&&"inline"==l.getComputedStyle("display")||(x=!1,y?m=l:l&&this.setEndAfter(l));u=l.getNext()}for(;u;){z=!1;if(u.type==CKEDITOR.NODE_TEXT)I=u.getText(),e(u,0)||(u=null),z=/^[\s\ufeff]/.test(I);else if(u.type==CKEDITOR.NODE_ELEMENT){if((0=k.getLength()?e.setStartAfter(k):(e.setStartBefore(k),b=0):e.setStartBefore(k));f&&f.type==CKEDITOR.NODE_TEXT&&(l?l>=f.getLength()?e.setEndAfter(f):(e.setEndAfter(f),m=0):e.setEndBefore(f));var e=new CKEDITOR.dom.walker(e),u=CKEDITOR.dom.walker.bookmark(),y=CKEDITOR.dom.walker.bogus();e.evaluator=function(c){return c.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)}; var x;e.guard=function(c,b){if(g&&y(c)||u(c))return!0;if(a==CKEDITOR.SHRINK_ELEMENT&&c.type==CKEDITOR.NODE_TEXT||b&&c.equals(x)||!1===d&&c.type==CKEDITOR.NODE_ELEMENT&&c.isBlockBoundary()||c.type==CKEDITOR.NODE_ELEMENT&&c.hasAttribute("contenteditable"))return!1;b||c.type!=CKEDITOR.NODE_ELEMENT||(x=c);return!0};b&&(k=e[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(k,c?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);m&&(e.reset(),(e=e[a==CKEDITOR.SHRINK_ELEMENT? "lastBackward":"previous"]())&&this.setEndAt(e,c?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_END));return!(!b&&!m)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var c=this.startContainer,b=c.getChild(this.startOffset);b?a.insertBefore(b):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);f(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);f(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)}f(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)}f(this)},fixBlock:function(a,c){var b=this.createBookmark(),d=this.document.createElement(c);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var g=d.getBogus();g&&g.remove();d.appendBogus();this.moveToBookmark(b);return d},splitBlock:function(a,c){var b=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root), g=b.block,e=d.block,k=null;if(!b.blockLimit.equals(d.blockLimit))return null;"br"!=a&&(g||(g=this.fixBlock(!0,a),e=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),e||(e=this.fixBlock(!1,a)));b=g&&this.checkStartOfBlock();d=e&&this.checkEndOfBlock();this.deleteContents();g&&g.equals(e)&&(d?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(e,CKEDITOR.POSITION_AFTER_END),e=null):b?(k=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(g, CKEDITOR.POSITION_BEFORE_START),g=null):(e=this.splitElement(g,c||!1),g.is("ul","ol")||g.appendBogus()));return{previousBlock:g,nextBlock:e,wasStartOfBlock:b,wasEndOfBlock:d,elementPath:k}},splitElement:function(a,c){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var b=this.extractContents(!1,c||!1),d=a.clone(!1,c||!1);b.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(a){return function(d){return c(d)|| b(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.isEmptyInlineRemoveable()||a.is("table")&&d.is("caption")?!1:!0}}var c=CKEDITOR.dom.walker.whitespaces(),b=CKEDITOR.dom.walker.bookmark(!1);return function(c){for(var b=this.createBookmark(),d=this[c?"endPath":"startPath"](),g=d.block||d.blockLimit,e;g&&!g.equals(d.root)&&!g.getFirst(a(g));)e=g.getParent(),this[c?"setEndAt":"setStartAt"](g,CKEDITOR.POSITION_AFTER_END),g.remove(1),g=e;this.moveToBookmark(b)}}(),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 b=c==CKEDITOR.START,d=this.clone();d.collapse(b);d[b?"setStartAt":"setEndAt"](a,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=k(b);return d[b?"checkBackward":"checkForward"]()},checkStartOfBlock:function(){var a=this.startContainer,c=this.startOffset;CKEDITOR.env.ie&&c&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.ltrim(a.substring(0, c)),b.test(a)&&this.trim(0,1));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=e();return a.checkBackward()},checkEndOfBlock:function(){var a=this.endContainer,c=this.endOffset;CKEDITOR.env.ie&&a.type==CKEDITOR.NODE_TEXT&&(a=CKEDITOR.tools.rtrim(a.substring(c)),b.test(a)&&this.trim(1,0));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=e();return a.checkForward()},getPreviousNode:function(a,c,b){var d=this.clone();d.collapse(1);d.setStartAt(b||this.root,CKEDITOR.POSITION_AFTER_START);b=new CKEDITOR.dom.walker(d);b.evaluator=a;b.guard=c;return b.previous()},getNextNode:function(a,c,b){var d=this.clone();d.collapse();d.setEndAt(b||this.root,CKEDITOR.POSITION_BEFORE_END);b=new CKEDITOR.dom.walker(d); b.evaluator=a;b.guard=c;return b.next()},checkReadOnly:function(){function a(a,c){for(;a;){if(a.type==CKEDITOR.NODE_ELEMENT){if("false"==a.getAttribute("contentEditable")&&!a.data("cke-editable"))return 0;if(a.is("html")||"true"==a.getAttribute("contentEditable")&&(a.contains(c)||a.equals(c)))break}a=a.getParent()}return 1}return function(){var c=this.startContainer,b=this.endContainer;return!(a(c,b)&&a(b,c))}}(),moveToElementEditablePosition:function(a,d){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a, d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START),!0;for(var g=0;a;){if(a.type==CKEDITOR.NODE_TEXT){d&&this.endContainer&&this.checkEndOfBlock()&&b.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,d?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);g=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,d?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),g=1;else if(d&&a.is("br")&&this.endContainer&& this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START);else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var e=a,k=g,f=void 0;e.type==CKEDITOR.NODE_ELEMENT&&e.isEditable(!1)&&(f=e[d?"getLast":"getFirst"](c));k||f||(f=e[d?"getPrevious":"getNext"](c));a=f}return!!g},moveToClosestEditablePosition:function(a,c){var b,d=0,g,e,k=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(b=new CKEDITOR.dom.range(this.root), b.moveToPosition(a,k[c?0:1])):b=this.clone();if(a&&!a.is(CKEDITOR.dtd.$block))d=1;else if(g=b[c?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(e=g.type==CKEDITOR.NODE_ELEMENT)&&g.is(CKEDITOR.dtd.$block)&&"false"==g.getAttribute("contenteditable")?(b.setStartAt(g,CKEDITOR.POSITION_BEFORE_START),b.setEndAt(g,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&e&&g.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(b.setEnd(g,0),b.collapse()):b.moveToPosition(g,k[c?1:0]);d&&this.moveToRange(b); return!!d},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),b=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return b(a)&&c(a)};var d=a.next(); a.reset();return d&&d.equals(a.previous())?d: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:d(),getPreviousEditableNode:d(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var c=this.startContainer,b= this.endContainer,d=c.getAscendant("table",!0),g=b.getAscendant("table",!0);return CKEDITOR.env.safari&&d&&b.equals(this.root)?c.getAscendant(a,!0):this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&g&&(d.equals(g)||d.contains(g)||g.contains(d))?c.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),c,b,d,g=this.clone();g.optimize();(d=g.startContainer.type==CKEDITOR.NODE_TEXT)?(b=g.startContainer.getText(), c=g.startContainer.split(g.startOffset),a.insertAfter(g.startContainer)):g.insertNode(a);a.scrollIntoView();d&&(g.startContainer.setText(b),c.remove());a.remove()},getClientRects:function(){function a(a,c){var b=CKEDITOR.tools.array.map(a,function(a){return a}),d=new CKEDITOR.dom.range(c.root),g,e,k;c.startContainer instanceof CKEDITOR.dom.element&&(e=0===c.startOffset&&c.startContainer.hasAttribute("data-widget"));c.endContainer instanceof CKEDITOR.dom.element&&(k=(k=c.endOffset===(c.endContainer.getChildCount? c.endContainer.getChildCount():c.endContainer.length))&&c.endContainer.hasAttribute("data-widget"));e&&d.setStart(c.startContainer.getParent(),c.startContainer.getIndex());k&&d.setEnd(c.endContainer.getParent(),c.endContainer.getIndex()+1);if(e||k)c=d;d=c.cloneContents();d=CKEDITOR.dom.document.prototype.find.call(d,"[data-cke-widget-id]").toArray();if(d=CKEDITOR.tools.array.map(d,function(a){var b=c.root.editor;a=a.getAttribute("data-cke-widget-id");return b.widgets.instances[a].element}))return d= CKEDITOR.tools.array.map(d,function(a){var c;c=a.getParent().hasClass("cke_widget_wrapper")?a.getParent():a;g=this.root.getDocument().$.createRange();g.setStart(c.getParent().$,c.getIndex());g.setEnd(c.getParent().$,c.getIndex()+1);c=g.getClientRects();c.widgetRect=a.getClientRect();return c},c),CKEDITOR.tools.array.forEach(d,function(a){function c(g){CKEDITOR.tools.array.forEach(b,function(c,e){var k=CKEDITOR.tools.objectCompare(a[g],c);k||(k=CKEDITOR.tools.objectCompare(a.widgetRect,c));k&&(Array.prototype.splice.call(b, e,a.length-g,a.widgetRect),d=!0)});d||(garguments.length||(this.range=c,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function h(c){var a=[];c.forEach(function(c){if("true"==c.getAttribute("contenteditable"))return a.push(c),!1},CKEDITOR.NODE_ELEMENT,!0);return a}function e(c,a,b,d){a:{null==d&&(d=h(b));for(var g;g=d.shift();)if(g.getDtd().p){d={element:g,remaining:d};break a}d=null}if(!d)return 0;if((g=CKEDITOR.filter.instances[d.element.data("cke-filter")])&& !g.check(a))return e(c,a,b,d.remaining);a=new CKEDITOR.dom.range(d.element);a.selectNodeContents(d.element);a=a.createIterator();a.enlargeBr=c.enlargeBr;a.enforceRealBlocks=c.enforceRealBlocks;a.activeFilter=a.filter=g;c._.nestedEditable={element:d.element,container:b,remaining:d.remaining,iterator:a};return 1}function k(c,a,b){if(!a)return!1;c=c.clone();c.collapse(!b);return c.checkBoundaryOfElement(a,b?CKEDITOR.START:CKEDITOR.END)}var d=/^[\r\n\t ]+$/,l=CKEDITOR.dom.walker.bookmark(!1,!0),m=CKEDITOR.dom.walker.whitespaces(!0), b=function(c){return l(c)&&m(c)},g={dd:1,dt:1,li:1};f.prototype={getNextParagraph:function(c){var a,f,h,m,t;c=c||"p";if(this._.nestedEditable){if(a=this._.nestedEditable.iterator.getNextParagraph(c))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,a;this.activeFilter=this.filter;if(e(this,c,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(c);this._.nestedEditable= null}if(!this.range.root.getDtd()[c])return null;if(!this._.started){var p=this.range.clone();f=p.startPath();var q=p.endPath(),A=!p.collapsed&&k(p,f.block),r=!p.collapsed&&k(p,q.block,1);p.shrink(CKEDITOR.SHRINK_ELEMENT,!0);A&&p.setStartAt(f.block,CKEDITOR.POSITION_BEFORE_END);r&&p.setEndAt(q.block,CKEDITOR.POSITION_AFTER_START);f=p.endContainer.hasAscendant("pre",!0)||p.startContainer.hasAscendant("pre",!0);p.enlarge(this.forceBrBreak&&!f||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS); p.collapsed||(f=new CKEDITOR.dom.walker(p.clone()),q=CKEDITOR.dom.walker.bookmark(!0,!0),f.evaluator=q,this._.nextNode=f.next(),f=new CKEDITOR.dom.walker(p.clone()),f.evaluator=q,f=f.previous(),this._.lastNode=f.getNextSourceNode(!0,null,p.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(q=this.range.clone(),q.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),q.checkEndOfBlock()&& (q=new CKEDITOR.dom.elementPath(q.endContainer,q.root),this._.lastNode=(q.block||q.blockLimit).getNextSourceNode(!0))),this._.lastNode&&p.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=p.document.createText(""),this._.lastNode.insertAfter(f)),p=null);this._.started=1;f=p}q=this._.nextNode;p=this._.lastNode;for(this._.nextNode=null;q;){var A=0,r=q.hasAscendant("pre"),C=q.type!=CKEDITOR.NODE_ELEMENT,B=0;if(C)q.type==CKEDITOR.NODE_TEXT&&d.test(q.getText())&&(C=0);else{var u=q.getName(); if(CKEDITOR.dtd.$block[u]&&"false"==q.getAttribute("contenteditable")){a=q;e(this,c,a);break}else if(q.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){if("br"==u)C=1;else if(!f&&!q.getChildCount()&&"hr"!=u){a=q;h=q.equals(p);break}f&&(f.setEndAt(q,CKEDITOR.POSITION_BEFORE_START),"br"!=u&&(this._.nextNode=q));A=1}else{if(q.getFirst()){f||(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START));q=q.getFirst();continue}C=1}}C&&!f&&(f=this.range.clone(),f.setStartAt(q,CKEDITOR.POSITION_BEFORE_START)); h=(!A||C)&&q.equals(p);if(f&&!A)for(;!q.getNext(b)&&!h;){u=q.getParent();if(u.isBlockBoundary(this.forceBrBreak&&!r&&{br:1})){A=1;C=0;h||u.equals(p);f.setEndAt(u,CKEDITOR.POSITION_BEFORE_END);break}q=u;C=1;h=q.equals(p);B=1}C&&f.setEndAt(q,CKEDITOR.POSITION_AFTER_END);q=this._getNextSourceNode(q,B,p);if((h=!q)||A&&f)break}if(!a){if(!f)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;a=new CKEDITOR.dom.elementPath(f.startContainer,f.root);q=a.blockLimit;A={div:1,th:1,td:1}; a=a.block;!a&&q&&!this.enforceRealBlocks&&A[q.getName()]&&f.checkStartOfBlock()&&f.checkEndOfBlock()&&!q.equals(f.root)?a=q:!a||this.enforceRealBlocks&&a.is(g)?(a=this.range.document.createElement(c),f.extractContents().appendTo(a),a.trim(),f.insertNode(a),m=t=!0):"li"!=a.getName()?f.checkStartOfBlock()&&f.checkEndOfBlock()||(a=a.clone(!1),f.extractContents().appendTo(a),a.trim(),t=f.splitBlock(),m=!t.wasStartOfBlock,t=!t.wasEndOfBlock,f.insertNode(a)):h||(this._.nextNode=a.equals(p)?null:this._getNextSourceNode(f.getBoundaryNodes().endNode, 1,p))}m&&(m=a.getPrevious())&&m.type==CKEDITOR.NODE_ELEMENT&&("br"==m.getName()?m.remove():m.getLast()&&"br"==m.getLast().$.nodeName.toLowerCase()&&m.getLast().remove());t&&(m=a.getLast())&&m.type==CKEDITOR.NODE_ELEMENT&&"br"==m.getName()&&(!CKEDITOR.env.needsBrFiller||m.getPrevious(l)||m.getNext(l))&&m.remove();this._.nextNode||(this._.nextNode=h||a.equals(p)||!p?null:this._getNextSourceNode(a,1,p));return a},_getNextSourceNode:function(c,a,b){function d(a){return!(a.equals(b)||a.equals(g))}var g= this.range.root;for(c=c.getNextSourceNode(a,null,d);!l(c);)c=c.getNextSourceNode(a,null,d);return c}};CKEDITOR.dom.range.prototype.createIterator=function(){return new f(this)}}(),CKEDITOR.command=function(f,h){this.uiItems=[];this.exec=function(e){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&f.focus();return!1===this.fire("exec")?!0:!1!==h.exec.call(this,f,e)};this.refresh=function(e,d){if(!this.readOnly&&e.readOnly)return!0;if(this.context&&!d.isContextFor(this.context)|| !this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[e.mode]&&this.disable();return!1===this.fire("refresh",{editor:e,path:d})?!0:h.refresh&&!1!==h.refresh.apply(this,arguments)};var e;this.checkAllowed=function(k){return k||"boolean"!=typeof e?e=f.activeFilter.checkFeature(this):e};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(f){if(this.state==f||f!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=f;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 f(a,c,b,d,g){var e,f;a=[];for(e in c){f=c[e];f="boolean"==typeof f?{}:"function"==typeof f?{match:f}:E(f);"$"!=e.charAt(0)&&(f.elements=e);b&&(f.featureName=b.toLowerCase());var k=f;k.elements=m(k.elements,/\s+/)||null;k.propertiesOnly=k.propertiesOnly||!0===k.elements;var h=/\s*,\s*/,n=void 0;for(n in L){k[n]=m(k[n], h)||null;var l=k,q=O[n],u=m(k[O[n]],h),D=k[n],B=[],J=!0,p=void 0;u?J=!1:u={};for(p in D)"!"==p.charAt(0)&&(p=p.slice(1),B.push(p),u[p]=!0,J=!1);for(;p=B.pop();)D[p]=D["!"+p],delete D["!"+p];l[q]=(J?!1:u)||null}k.match=k.match||null;d.push(f);a.push(f)}c=g.elements;g=g.generic;var w;b=0;for(d=a.length;b=--b&&(l&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),a(e))},w=function(a,c){f[a]=1;var b=h[a];delete h[a];for(var d=0;d=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?b.$.onreadystatechange=function(){if("loaded"==b.$.readyState||"complete"==b.$.readyState)b.$.onreadystatechange=null,w(a,!0)}:(b.$.onload=function(){setTimeout(function(){w(a,!0)},0)},b.$.onerror=function(){w(a,!1)}));b.appendTo(CKEDITOR.document.getHead())}}};l&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var t=0;t]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}},function(){var f=/([\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(e){for(var k,d,l=0,m;k=this._.htmlPartsRegex.exec(e);){d=k.index;if(d>l)if(l=e.substring(l,d),m)m.push(l);else this.onText(l);l=this._.htmlPartsRegex.lastIndex;if(d=k[1])if(d=d.toLowerCase(),m&&CKEDITOR.dtd.$cdata[d]&& (this.onCDATA(m.join("")),m=null),!m){this.onTagClose(d);continue}if(m)m.push(k[0]);else if(d=k[3]){if(d=d.toLowerCase(),!/="/.test(d)){var b={},g,c=k[4];k=!!k[5];if(c)for(;g=f.exec(c);){var a=g[1].toLowerCase();g=g[2]||g[3]||g[4]||"";b[a]=!g&&h[a]?a:CKEDITOR.tools.htmlDecodeAttr(g)}this.onTagOpen(d,b,k);!m&&CKEDITOR.dtd.$cdata[d]&&(m=[])}}else if(d=k[2])this.onComment(d)}if(e.length>l)this.onText(e.substring(l,e.length))}}}(),CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._= {output:[]}},proto:{openTag:function(f){this._.output.push("\x3c",f)},openTagClose:function(f,h){h?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(f,h){"string"==typeof h&&(h=CKEDITOR.tools.htmlEncodeAttr(h));this._.output.push(" ",f,'\x3d"',h,'"')},closeTag:function(f){this._.output.push("\x3c/",f,"\x3e")},text:function(f){this._.output.push(f)},comment:function(f){this._.output.push("\x3c!--",f,"--\x3e")},write:function(f){this._.output.push(f)},reset:function(){this._.output= [];this._.indent=!1},getHtml:function(f){var h=this._.output.join("");f&&this.reset();return h}}}),"use strict",function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var f=this.parent.children,h=CKEDITOR.tools.indexOf(f,this),e=this.previous,k=this.next;e&&(e.next=k);k&&(k.previous=e);f.splice(h,1);this.parent=null},replaceWith:function(f){var h=this.parent.children,e=CKEDITOR.tools.indexOf(h,this),k=f.previous=this.previous,d=f.next=this.next;k&&(k.next= f);d&&(d.previous=f);h[e]=f;f.parent=this.parent;this.parent=null},insertAfter:function(f){var h=f.parent.children,e=CKEDITOR.tools.indexOf(h,f),k=f.next;h.splice(e+1,0,this);this.next=f.next;this.previous=f;f.next=this;k&&(k.previous=this);this.parent=f.parent},insertBefore:function(f){var h=f.parent.children,e=CKEDITOR.tools.indexOf(h,f);h.splice(e,0,this);this.next=f;(this.previous=f.previous)&&(f.previous.next=this);f.previous=this;this.parent=f.parent},getAscendant:function(f){var h="function"== typeof f?f:"string"==typeof f?function(e){return e.name==f}:function(e){return e.name in f},e=this.parent;for(;e&&e.type==CKEDITOR.NODE_ELEMENT;){if(h(e))return e;e=e.parent}return null},wrapWith:function(f){this.replaceWith(f);f.add(this);return f},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(f){return f||{}}}}(),"use strict",CKEDITOR.htmlParser.comment=function(f){this.value=f;this._={isBlockLike:!1}},CKEDITOR.htmlParser.comment.prototype= CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(f,h){var e=this.value;if(!(e=f.onComment(h,e,this)))return this.remove(),!1;if("string"!=typeof e)return this.replaceWith(e),!1;this.value=e;return!0},writeHtml:function(f,h){h&&this.filter(h);f.comment(this.value)}}),"use strict",function(){CKEDITOR.htmlParser.text=function(f){this.value=f;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT, filter:function(f,h){if(!(this.value=f.onText(h,this.value,this)))return this.remove(),!1},writeHtml:function(f,h){h&&this.filter(h);f.text(this.value)}})}(),"use strict",function(){CKEDITOR.htmlParser.cdata=function(f){this.value=f};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(f){f.write(this.value)}})}(),"use strict",CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null; this._={isBlockLike:!0,hasInlineStarted:!1}},function(){function f(d){return d.attributes["data-cke-survive"]?!1:"a"==d.name&&d.attributes.href||CKEDITOR.dtd.$removeEmpty[d.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),e={ol:1,ul:1},k=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),d={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"}; CKEDITOR.htmlParser.fragment.fromHtml=function(l,m,b){function g(a){var b;if(0m;m++)if(h=d[m]){h= h.exec(e,f,this);if(!1===h)return null;if(h&&h!=f)return this.onNode(e,h);if(f.parent&&!f.name)break}return f},onNode:function(e,f){var d=f.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(e,f):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(e,f.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(e,f.value)):null},onAttribute:function(e,f,d,h){return(d=this.attributesRules[d])?d.exec(e,h,f,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=f;f.prototype= {add:function(e,f,d){this.rules.splice(this.findIndex(f),0,{value:e,priority:f,options:d})},addMany:function(e,f,d){for(var h=[this.findIndex(f),0],m=0,b=e.length;m/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function n(a){return a.replace(L,function(a,c){return decodeURIComponent(c)})}function w(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, function(a){return"\x3c!--"+A+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function v(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,c){return decodeURIComponent(c)})}function t(a,c){var b=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 b&&b[c]||""})}function p(a,c){var b=[],d=c.config.protectedSource,g=c._.dataStore||(c._.dataStore= {id:1}),e=/<\!--\{cke_temp(comment)?\}(\d*?)--\x3e/g,d=[/|$)/gi,//gi,//gi].concat(d);a=a.replace(/\x3c!--[\s\S]*?--\x3e/g,function(a){return"\x3c!--{cke_tempcomment}"+(b.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,b,d,g){return"\x3c"+b+d+"\x3e"+t(v(g),c)+"\x3c/"+b+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var d, g,e=this;this.editor=b;this.dataFilter=d=new CKEDITOR.htmlParser.filter;this.htmlFilter=g=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;d.addRules(u);d.addRules(y,{applyToAll:!0});d.addRules(f(b,"data"),{applyToAll:!0});g.addRules(x);g.addRules(z,{applyToAll:!0});g.addRules(f(b,"html"),{applyToAll:!0});b.on("toHtml",function(d){d=d.data;var g=d.dataValue,e,g=p(g,b),g=a(g,G),g=c(g),g=a(g,H),g=g.replace(O,"$1cke:$2"),g=g.replace(S,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), g=g.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),g=g.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");e=d.context||b.editable().getName();var f;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==e&&(e="div",g="\x3cpre\x3e"+g+"\x3c/pre\x3e",f=1);e=b.document.createElement(e);e.setHtml("a"+g);g=e.getHtml().substr(1);g=g.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");f&&(g=g.replace(/^
|<\/pre>$/gi,""));g=g.replace(D,"$1$2");g=n(g);g=v(g);e=!1===d.fixForBody?!1:
h(d.enterMode,b.config.autoParagraph);g=CKEDITOR.htmlParser.fragment.fromHtml(g,d.context,e);e&&(f=g,!f.children.length&&CKEDITOR.dtd[f.name][e]&&(e=new CKEDITOR.htmlParser.element(e),f.add(e)));d.dataValue=g},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(e.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var c=a.dataValue,
b=new CKEDITOR.htmlParser.basicWriter;c.writeChildrenHtml(b);c=b.getHtml(!0);a.dataValue=w(c)},null,null,15);b.on("toDataFormat",function(a){var c=a.data.dataValue;a.data.enterMode!=CKEDITOR.ENTER_BR&&(c=c.replace(/^
/i,""));a.data.dataValue=CKEDITOR.htmlParser.fragment.fromHtml(c,a.data.context,h(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(e.htmlFilter,!0)},null,null,10);b.on("toDataFormat",function(a){a.data.filter.applyTo(a.data.dataValue, !1,!0)},null,null,11);b.on("toDataFormat",function(a){var c=a.data.dataValue,d=e.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=v(c);c=t(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,c,b,d){var g=this.editor,e,f,k,h;c&&"object"==typeof c?(e=c.context,b=c.fixForBody,d=c.dontFilter,f=c.filter,k=c.enterMode,h=c.protectedWhitespaces):e=c;e||null===e||(e=g.editable().getName());return g.fire("toHtml",{dataValue:a,context:e,fixForBody:b,dontFilter:d, filter:f||g.filter,enterMode:k||g.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,c){var b,d,g;c&&(b=c.context,d=c.filter,g=c.enterMode);b||null===b||(b=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:b,enterMode:g||this.editor.enterMode}).dataValue}};var q=/(?: |\xa0)$/,A="{cke_protected}",r=CKEDITOR.dtd,C="caption colgroup col thead tfoot tbody".split(" "),B=CKEDITOR.tools.extend({},r.$blockLimit, r.$block),u={elements:{input:b,textarea:b}},y={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}}}},x={elements:{embed:function(a){var c=a.parent;if(c&&"object"==c.name){var b=c.attributes.width,c=c.attributes.height; b&&(a.attributes.width=b);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}}},z={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 b=["name","href","src"],d,g=0;gd?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&&m(a,c=new CKEDITOR.htmlParser.text);c.value=a.attributes["data-cke-title"]||""},input:g,textarea:g},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(z.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g, function(a){return a.toLowerCase()})});var I=/<(a|area|img|input|source)\b([^>]*)>/gi,F=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,E=/^(href|src|name)$/i,H=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,G=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,L=/([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)([\s][^>]*)?>)/gi,D=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,S=/]*?)\/?>(?!\s*<\/cke:\1)/gi}(), "use strict",CKEDITOR.htmlParser.element=function(f,h){this.name=f;this.attributes=h||{};this.children=[];var e=f||"",k=e.match(/^cke:(.*)/);k&&(e=k[1]);e=!!(CKEDITOR.dtd.$nonBodyContent[e]||CKEDITOR.dtd.$block[e]||CKEDITOR.dtd.$listItem[e]||CKEDITOR.dtd.$tableContent[e]||CKEDITOR.dtd.$nonEditable[e]||"br"==e);this.isEmpty=!!CKEDITOR.dtd.$empty[f];this.isUnknown=!CKEDITOR.dtd[f];this._={isBlockLike:e,hasInlineStarted:this.isEmpty||!e}},CKEDITOR.htmlParser.cssStyle=function(f){var h={};((f instanceof CKEDITOR.htmlParser.element?f.attributes.style:f)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(e,f,d){"font-family"==f&&(d=d.replace(/["']/g,""));h[f.toLowerCase()]=d});return{rules:h,populate:function(e){var f=this.toString();f&&(e instanceof CKEDITOR.dom.element?e.setAttribute("style",f):e instanceof CKEDITOR.htmlParser.element?e.attributes.style=f:e.style=f)},toString:function(){var e=[],f;for(f in h)h[f]&&e.push(f,":",h[f],";");return e.join("")}}},function(){function f(e){return function(d){return d.type== CKEDITOR.NODE_ELEMENT&&("string"==typeof e?d.name==e:d.name in e)}}var h=function(e,d){e=e[0];d=d[0];return ed?1:0},e=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:e.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(e,d){var f=this,h,b;d=f.getFilterContext(d);if(d.off)return!0;if(!f.parent)e.onRoot(d,f);for(;;){h=f.name;if(!(b= e.onElementName(d,h)))return this.remove(),!1;f.name=b;if(!(f=e.onElement(d,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 g,c;for(g in h){for(b=h[g];;)if(c=e.onAttributeName(d,g))if(c!=g)delete h[g],g=c;else break;else{delete h[g];break}c&&(!1===(b=e.onAttribute(d,f,c,b))?delete h[c]:h[c]=b)}f.isEmpty||this.filterChildren(e,!1, d);return!0},filterChildren:e.filterChildren,writeHtml:function(e,d){d&&this.filter(d);var f=this.name,m=[],b=this.attributes,g,c;e.openTag(f,b);for(g in b)m.push([g,b[g]]);e.sortAttributes&&m.sort(h);g=0;for(c=m.length;gCKEDITOR.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()};r.eol.detect(a,this);r.bogus.exclude(a);r.cell.shrink(a);a.fragment=a.range.cloneContents();r.tree.rebuild(a,this);r.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,c){var b=C,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(!n(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 b=this.editor;this.attachListener(b,"beforeGetData",function(){var a= this.getData();this.is("textarea")||!1!==b.config.ignoreEmptyParagraph&&(a=a.replace(t,function(a,c){return c}));b.setData(a,null,1)},this);this.attachListener(b,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(b,"afterSetData",function(){this.setData(b.getData(1))},this);this.attachListener(b,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(b,"beforeFocus",function(){var a=b.getSelection();(a=a&&a.getNative())&&"Control"==a.type||this.focus()}, this);this.attachListener(b,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(b,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(b,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(b.readOnly);this.attachClass("cke_editable");b.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"):b.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&b.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO|| this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+b.config.contentsLangDirection);b.keystrokeHandler.blockedKeystrokes[8]=+b.readOnly;b.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(){b._.previousScrollTop=b.editable().$.scrollTop},null,null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?n.$.styleSheet.cssText=h:n.setText(h)):(h=g.appendStyleText(h),h=new CKEDITOR.dom.element(h.ownerNode||h.owningElement),f.setCustomData("stylesheet",h),h.data("cke-temp",1))}f=g.getCustomData("stylesheet_ref")||0;g.setCustomData("stylesheet_ref", f+1);this.setCustomData("cke_includeReadonly",!b.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 m={8:1,46:1};this.attachListener(b,"key",function(c){if(b.readOnly)return!0;var d=c.data.domEvent.getKey(),g;c=b.getSelection();if(0!==c.getRanges().length){if(d in m){var e,f=c.getRanges()[0],h=f.startPath(),k,n,q,d=8==d;CKEDITOR.env.ie&& 11>CKEDITOR.env.version&&(e=c.getSelectedElement())||(e=l(c))?(b.fire("saveSnapshot"),f.moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),e.remove(),f.select(),b.fire("saveSnapshot"),g=1):f.collapsed&&((k=h.block)&&(q=k[d?"getPrevious":"getNext"](a))&&q.type==CKEDITOR.NODE_ELEMENT&&q.is("table")&&f[d?"checkStartOfBlock":"checkEndOfBlock"]()?(b.fire("saveSnapshot"),f[d?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),f["moveToElementEdit"+(d?"End":"Start")](q),f.select(),b.fire("saveSnapshot"), g=1):h.blockLimit&&h.blockLimit.is("td")&&(n=h.blockLimit.getAscendant("table"))&&f.checkBoundaryOfElement(n,d?CKEDITOR.START:CKEDITOR.END)&&(q=n[d?"getPrevious":"getNext"](a))?(b.fire("saveSnapshot"),f["moveToElementEdit"+(d?"End":"Start")](q),f.checkStartOfBlock()&&f.checkEndOfBlock()?q.remove():f.select(),b.fire("saveSnapshot"),g=1):(n=h.contains(["td","th","caption"]))&&f.checkBoundaryOfElement(n,d?CKEDITOR.START:CKEDITOR.END)&&(g=1))}return!g}});b.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&& this.attachListener(this,"keyup",function(a){a.data.getKeystroke()in m&&!this.getFirst(k)&&(this.appendBogus(),a=b.createRange(),a.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),a.select())});this.attachListener(this,"dblclick",function(a){if(b.readOnly)return!1;a={element:a.data.getTarget()};b.fire("doubleclick",a)});CKEDITOR.env.ie&&this.attachListener(this,"click",e);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown",function(a){var c=a.data.getTarget();c.is("img","hr", "input","textarea","select")&&!c.isReadOnly()&&(b.getSelection().selectElement(c),c.is("input","textarea","select")&&a.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(a){(a=a.data.getTarget())&&a.is("img")&&!a.isReadOnly()&&b.getSelection().selectElement(a)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(a){if(2==a.data.$.button&&(a=a.data.getTarget(),!a.getAscendant("table")&&!a.getOuterHtml().replace(t,""))){var c=b.createRange();c.moveToElementEditStart(a); c.select(!0)}});CKEDITOR.env.webkit&&(this.attachListener(this,"click",function(a){a.data.getTarget().is("input","select")&&a.data.preventDefault()}),this.attachListener(this,"mouseup",function(a){a.data.getTarget().is("input","textarea")&&a.data.preventDefault()}));CKEDITOR.env.webkit&&this.attachListener(b,"key",function(a){if(b.readOnly)return!0;var d=a.data.domEvent.getKey();if(d in m&&(a=b.getSelection(),0!==a.getRanges().length)){var d=8==d,g=a.getRanges()[0];a=g.startPath();if(g.collapsed)a:{var e= a.block;if(e&&g[d?"checkStartOfBlock":"checkEndOfBlock"]()&&g.moveToClosestEditablePosition(e,!d)&&g.collapsed){if(g.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=g.startContainer.getChild(g.startOffset-(d?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){b.fire("saveSnapshot");f.remove();a=!0;break a}}g=g.startPath().block;if(!g||g&&g.contains(e))a=void 0;else{b.fire("saveSnapshot");var h;(h=(d?g:e).getBogus())&&h.remove();h=b.getSelection();f=h.createBookmarks();(d?e:g).moveChildren(d? g:e,!1);a.lastElement.mergeSiblings();c(e,g,!d);h.selectBookmarks(f);a=!0}}else a=!1}else d=g,h=a.block,g=d.endPath().block,h&&g&&!h.equals(g)?(b.fire("saveSnapshot"),(e=h.getBogus())&&e.remove(),d.enlarge(CKEDITOR.ENLARGE_INLINE),d.deleteContents(),g.getParent()&&(g.moveChildren(h,!1),a.lastElement.mergeSiblings(),c(h,g,!0)),d=b.getSelection().getRanges()[0],d.collapse(1),d.optimize(),""===d.startContainer.getHtml()&&d.startContainer.appendBogus(),d.select(),a=!0):a=!1;if(!a)return;b.getSelection().scrollIntoView(); b.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var 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())}}this.editor.fire("contentDomUnload"); delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var c=this._.editable;if(c&&a)return 0;arguments.length&&(c=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(c&&c.detach(),null));return 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 b=c.getSelection();b&&!b.isLocked&&(b=c.checkDirty(),c.fire("lockSnapshot"),f(a),c.fire("unlockSnapshot"),!b&&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}");a=CKEDITOR.dom.walker.whitespaces(!0);n=CKEDITOR.dom.walker.bookmark(!1, !0);w=CKEDITOR.dom.walker.empty();v=CKEDITOR.dom.walker.bogus();t=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;p=function(){function a(c){return c.type==CKEDITOR.NODE_ELEMENT}function c(b,d){var g,e,f,h,k=[],l=d.range.startContainer;g=d.range.startPath();for(var l=n[l.getName()],m=0,q=b.getChildren(),p=q.count(),w=-1,t=-1,r=0,F=g.contains(n.$list);mCKEDITOR.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))}}();A=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())}}();r={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||!v(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 k=g.contains(CKEDITOR.dtd.$list).getParent();f=function(a){return!a.equals(k)}}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)}}};C=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 d(a,c){var b=new CKEDITOR.dom.range(a);b.setStartAfter(c.startNode);b.setEndBefore(c.endNode);return b}return{list:{detectMerge:function(a,c){var b=d(c,a.bookmark),g=b.startPath(),e=b.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)b=b.clone(),b.setStartBefore(a.bookmark.startNode),b.setEndAfter(a.bookmark.endNode),a.mergeListBookmark=b.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),k=f.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.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(d){var g=[],e,f=new CKEDITOR.dom.walker(d),h=d.startPath().contains(b),k=d.endPath().contains(b),n={};f.guard=function(a,f){if(a.type==CKEDITOR.NODE_ELEMENT){var l="visited_"+(f?"out":"in");if(a.getCustomData(l))return;CKEDITOR.dom.element.setMarker(n,a,l,1)}if(f&&h&&a.equals(h))e=d.clone(),e.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),g.push(e);else if(!f&&k&&a.equals(k))e=d.clone(),e.setStartAt(k, CKEDITOR.POSITION_AFTER_START),g.push(e);else{if(l=!f)l=a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&(!h||c(a,h))&&(!k||c(a,k));if(!l&&(l=f))if(a.is(b))var l=h&&h.getAscendant("table",!0),m=k&&k.getAscendant("table",!0),q=a.getAscendant("table",!0),l=l&&l.contains(q)||m&&m.contains(q);else l=void 0;l&&(e=d.clone(),e.selectNodeContents(a),g.push(e))}};f.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);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 b={td:1,th:1,caption:1};return{detectPurge:function(a){var c=a.range,d=c.clone();d.enlarge(CKEDITOR.ENLARGE_ELEMENT);var d=new CKEDITOR.dom.walker(d),g=0;d.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(b)&&++g};d.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(w(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 w(a,c){return c?a.replace(C,function(a,c){return c?" ":""}):a.replace(r,"")}function v(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")+'"\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 t(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().getRanges(),e=g[0];1==g.length&& e.collapsed&&(d=e[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),b.data.preventDefault(),b.cancel())}}}function p(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 q="function"!=typeof window.getSelection,A=1,r=CKEDITOR.tools.repeat("​",7),C=new RegExp(r+"( )?","g"),B,u,y,x=CKEDITOR.dom.walker.invisible(1),z=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(){r=new CKEDITOR.dom.selection(b.getSelection()); r.lock()}function c(){e.removeListener("mouseup",c);k.removeListener("mouseup",c);var a=CKEDITOR.document.$.selection,b=a.createRange();"None"!=a.type&&b.parentElement()&&b.parentElement().ownerDocument==g.$&&b.select()}function d(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 g=b.document,e=CKEDITOR.document,f=b.editable(),h=g.getBody(), k=g.getDocumentElement(),w=f.isInline(),p,r;CKEDITOR.env.gecko&&f.attachListener(f,"focus",function(a){a.removeListener();0!==p&&(a=b.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==f.$&&(a=b.createRange(),a.moveToElementEditStart(f),a.select())},null,null,-2);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){p&&CKEDITOR.env.webkit&&(p=b._.previousActive&&b._.previousActive.equals(g.getActive()))&&null!=b._.previousScrollTop&&b._.previousScrollTop!=f.$.scrollTop&&(f.$.scrollTop= b._.previousScrollTop);b.unlockSelection(p);p=0},null,null,-1);f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie||w)q?f.attachListener(f,"beforedeactivate",a,null,null,-1):f.attachListener(b,"selectionCheck",a,null,null,-1),f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusOut":"blur",function(){b.lockSelection(r);p=1},null,null,-1),f.attachListener(f,"mousedown",function(){p=0});if(CKEDITOR.env.ie&&!w){var u;f.attachListener(f,"mousedown",function(a){2==a.data.$.button&&((a=b.document.getSelection())&& a.getType()!=CKEDITOR.SELECTION_NONE||(u=b.window.getScrollPosition()))});f.attachListener(f,"mouseup",function(a){2==a.data.$.button&&u&&(b.document.$.documentElement.scrollLeft=u.x,b.document.$.documentElement.scrollTop=u.y);u=null});if("BackCompat"!=g.$.compatMode){if(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat){var A,v;k.on("mousedown",function(a){function c(a){a=a.data.$;if(A){var b=h.$.createTextRange();try{b.moveToPoint(a.clientX,a.clientY)}catch(d){}A.setEndPoint(0>v.compareEndPoints("StartToStart", b)?"EndToEnd":"StartToStart",b);A.select()}}function b(){k.removeListener("mousemove",c);e.removeListener("mouseup",b);k.removeListener("mouseup",b);A.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)k.on("mousedown",function(a){a.data.getTarget().is("html")&& (e.on("mouseup",c),k.on("mouseup",c))})}}f.attachListener(f,"selectionchange",l,b);f.attachListener(f,"keyup",m,b);CKEDITOR.env.ie&&f.attachListener(f,"keydown",function(a){var c=this.getSelection(1),b=d(c);b&&!b.equals(f)&&(c.selectElement(b),a.data.preventDefault())},b);f.attachListener(f,CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){b.forceNextSelectionCheck();b.selectionChange(1)});if(w&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var B;f.attachListener(f,"mousedown",function(){B=1});f.attachListener(g.getDocumentElement(), "mouseup",function(){B&&m.call(b);B=0})}else f.attachListener(CKEDITOR.env.ie?f:g.getDocumentElement(),"mouseup",m,b);CKEDITOR.env.webkit&&f.attachListener(g,"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:f.hasFocus&&n(f)}},null,null,-1);f.attachListener(f,"keydown",t(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= z[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=w(a.data))}, c,null,20);c.on("toDataFormat",function(a){a.data.dataValue=w(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?l:m).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection||a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE? (!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var 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:A++;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 I={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:w,_createFillingCharSequenceNode:a,FILLING_CHAR_SEQUENCE:r});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel= q?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:q?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&&I[d.childNodes[b.startOffset].nodeName.toLowerCase()]&&(c=CKEDITOR.SELECTION_ELEMENT)}return a.type=c},getRanges:function(){var a=q?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(),k=0, n=g.length-1,l=-1,m,q;k<=n;)if(l=Math.floor((k+n)/2),e=g[l],h.moveToElementText(e),m=h.compareEndPoints("StartToStart",c),0m)k=l+1;else return{container:d,offset:a(e)};if(-1==l||l==g.length-1&&0>m){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;0]*>)[ \t\r\n]*/gi,"$1");f=f.replace(/([ \t\n\r]+| )/g," ");f=f.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=c.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);b=e}else f?b=w(d?[c.getHtml()]:a(c),b):c.moveChildren(b);b.replace(c);if(g){var d=b,k;(k=d.getPrevious(G))&&k.type==CKEDITOR.NODE_ELEMENT&& k.is("pre")&&(g=n(k.getHtml(),/\n$/,"")+"\n\n"+n(d.getHtml(),/^\n/,""),CKEDITOR.env.ie?d.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e":d.setHtml(g),k.remove())}else d&&q(b)}function a(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 w(a,c){var b;1=k?(l=d.createText(""),l.insertAfter(this)):(f=d.createText(""),f.insertAfter(l),f.remove())); return l},substring:function(f,h){return"number"!=typeof h?this.$.nodeValue.substr(f):this.$.nodeValue.substring(f,h)}}),function(){function f(e,f,d){var h=e.serializable,m=f[d?"endContainer":"startContainer"],b=d?"endOffset":"startOffset",g=h?f.document.getById(e.startNode):e.startNode;e=h?f.document.getById(e.endNode):e.endNode;m.equals(g.getPrevious())?(f.startOffset=f.startOffset-m.getLength()-e.getPrevious().getLength(),m=e.getNext()):m.equals(e.getPrevious())&&(f.startOffset-=m.getLength(), m=e.getNext());m.equals(g.getParent())&&f[b]++;m.equals(e.getParent())&&f[b]++;f[d?"endContainer":"startContainer"]=m;return f}CKEDITOR.dom.rangeList=function(e){if(e instanceof CKEDITOR.dom.rangeList)return e;e?e instanceof CKEDITOR.dom.range&&(e=[e]):e=[];return CKEDITOR.tools.extend(e,h)};var h={createIterator:function(){var e=this,f=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(m){h=void 0===h?0:h+1;var b=e[h];if(b&&1c?-1:1}),d=0, g;dCKEDITOR.env.version?c[f].$.styleSheet.cssText+=e:c[f].$.innerHTML+=e}}var l={};CKEDITOR.skin={path:f,loadPart:function(c,a){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(f()+"skin.js"),function(){e(c,a)}):e(c,a)}, getPath:function(c){return CKEDITOR.getUrl(h(c))},icons:{},addIcon:function(c,a,b,d){c=c.toLowerCase();this.icons[c]||(this.icons[c]={path:a,offset:b||0,bgsize:d||"16px"})},getIconStyle:function(c,a,b,d,g){var e;c&&(c=c.toLowerCase(),a&&(e=this.icons[c+"-rtl"]),e||(e=this.icons[c]));c=b||e&&e.path||"";d=d||e&&e.offset;g=g||e&&e.bgsize||"16px";c&&(c=c.replace(/'/g,"\\'"));return c&&"background-image:url('"+CKEDITOR.getUrl(c)+"');background-position:0 "+d+"px;background-size:"+g+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype, {getUiColor:function(){return this.uiColor},setUiColor:function(c){var a=k(CKEDITOR.document);return(this.setUiColor=function(c){this.uiColor=c;var e=CKEDITOR.skin.chameleon,f="",h="";"function"==typeof e&&(f=e(this,"editor"),h=e(this,"panel"));c=[[g,c]];d([a],f,c);d(b,h,c)}).call(this,c)}});var m="cke_ui_color",b=[],g=/\$color/g;CKEDITOR.on("instanceLoaded",function(c){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var a=c.editor;c=function(c){c=(c.data[0]||c.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(); if(!c.getById("cke_ui_color")){c=k(c);b.push(c);var e=a.getUiColor();e&&d([c],CKEDITOR.skin.chameleon(a,"panel"),[[g,e]])}};a.on("panelShow",c);a.on("menuShow",c);a.config.uiColor&&a.setUiColor(a.config.uiColor)}})}(),function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var f=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);f.appendTo(CKEDITOR.document.getHead()); try{var h=f.getComputedStyle("border-top-color"),e=f.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!h||h!=e)}catch(k){CKEDITOR.env.hc=!1}f.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}");CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(f=CKEDITOR._.pending)for(delete CKEDITOR._.pending,h=0;hh;h++){var m=h,b;b=parseInt(d[h],16);b=("0"+(0>f?0|b*(1+f):0|b+(255-b)*f).toString(16)).slice(-2);d[m]=b}return"#"+d.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(e,k){var d=f(e.uiColor,.4),d={id:"."+e.id,defaultBorder:f(d,-.2),toolbarElementsBorder:f(d,-.25),defaultBackground:d,lightBackground:f(d,.8),darkBackground:f(d,-.15),ckeButtonOn:f(d,.4),ckeResizer:f(d,-.4),ckeColorauto:f(d,.8),dialogBody:f(d,.7),dialogTab:f(d,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:f(d,-.6),menubuttonHover:f(d,.1),menubuttonIcon:f(d,.5),menubuttonIconHover:f(d,.3)};return h[k].output(d).replace(/\[/g,"{").replace(/\]/g,"}")}}(), CKEDITOR.plugins.add("dialogui",{onLoad:function(){var f=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var c=[this._],a=1;aarguments.length)){var e=f.call(this,c);e.labelId=CKEDITOR.tools.getNextId()+ "_label";this._.children=[];var h={role:c.role||"presentation"};c.includeLabel&&(h["aria-labelledby"]=e.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,c,a,"div",null,h,function(){var a=[],f=c.required?" cke_required":"";"horizontal"!=c.labelLayout?a.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" ',' id\x3d"'+e.labelId+'"',e.inputId?' for\x3d"'+e.inputId+'"':"",(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",c.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', c.controlStyle?' style\x3d"'+c.controlStyle+'"':"",' role\x3d"presentation"\x3e',d.call(this,b,c),"\x3c/div\x3e"):(f={type:"hbox",widths:c.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+f+'" id\x3d"'+e.labelId+'" for\x3d"'+e.inputId+'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(c.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(c.controlStyle?' style\x3d"'+c.controlStyle+ '"':"")+"\x3e"+d.call(this,b,c)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,f,a));return a.join("")})}},textInput:function(d,c,a){if(!(3>arguments.length)){f.call(this,c);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",h={"class":"cke_dialog_ui_input_"+c.type,id:e,type:c.type};c.validate&&(this.validate=c.validate);c.maxLength&&(h.maxlength=c.maxLength);c.size&&(h.size=c.size);c.inputStyle&&(h.style=c.inputStyle);var k=this,l=!1;d.on("load",function(){k.getInputElement().on("keydown", function(a){13==a.data.getKeystroke()&&(l=!0)});k.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&l&&(d.getButton("ok")&&setTimeout(function(){d.getButton("ok").click()},0),l=!1);k.bidi&&b.call(k,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,d,c,a,function(){var a=['\x3cdiv class\x3d"cke_dialog_ui_input_',c.type,'" role\x3d"presentation"'];c.width&&a.push('style\x3d"width:'+c.width+'" ');a.push("\x3e\x3cinput ");h["aria-labelledby"]=this._.labelId;this._.required&& (h["aria-required"]=this._.required);for(var b in h)a.push(b+'\x3d"'+h[b]+'" ');a.push(" /\x3e\x3c/div\x3e");return a.join("")})}},textarea:function(d,c,a){if(!(3>arguments.length)){f.call(this,c);var e=this,h=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",k={};c.validate&&(this.validate=c.validate);k.rows=c.rows||5;k.cols=c.cols||20;k["class"]="cke_dialog_ui_input_textarea "+(c["class"]||"");"undefined"!=typeof c.inputStyle&&(k.style=c.inputStyle);c.dir&&(k.dir=c.dir);if(e.bidi)d.on("load", function(){e.getInputElement().on("keyup",b)},e);CKEDITOR.ui.dialog.labeledElement.call(this,d,c,a,function(){k["aria-labelledby"]=this._.labelId;this._.required&&(k["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',h,'" '],c;for(c in k)a.push(c+'\x3d"'+CKEDITOR.tools.htmlEncode(k[c])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(e._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, c,a){if(!(3>arguments.length)){var d=f.call(this,c,{"default":!!c["default"]});c.validate&&(this.validate=c.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,c,a,"span",null,null,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],f=CKEDITOR.tools.getNextId()+"_label",h={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":f};m(a);c["default"]&&(h.checked="checked");"undefined"!=typeof a.inputStyle&&(a.style=a.inputStyle); d.checkbox=new CKEDITOR.ui.dialog.uiElement(b,a,e,"input",null,h);e.push(' \x3clabel id\x3d"',f,'" for\x3d"',h.id,'"'+(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(c.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,c,a){if(!(3>arguments.length)){f.call(this,c);this._["default"]||(this._["default"]=this._.initValue=c.items[0][1]);c.validate&&(this.validate=c.validate);var d=[],e=this;c.role="radiogroup";c.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, b,c,a,function(){for(var a=[],f=[],h=(c.id?c.id:CKEDITOR.tools.getNextId())+"_radio",k=0;karguments.length)){var d=f.call(this,c);c.validate&&(this.validate=c.validate);d.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){var a=CKEDITOR.tools.extend({},c,{id:c.id?c.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],f=[],h={id:d.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_', c.type,'" role\x3d"presentation"');c.width&&e.push('style\x3d"width:'+c.width+'" ');e.push("\x3e");void 0!==c.size&&(h.size=c.size);void 0!==c.multiple&&(h.multiple=c.multiple);m(a);for(var k=0,l;karguments.length)){void 0===c["default"]&&(c["default"]="");var d=CKEDITOR.tools.extend(f.call(this,c),{definition:c,buttons:[]});c.validate&&(this.validate=c.validate);b.on("load",function(){CKEDITOR.document.getById(d.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,c,a,function(){d.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"', d.frameId,'" title\x3d"',c.label,'" src\x3d"javascript:void('];a.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");a.push(')"\x3e\x3c/iframe\x3e');return a.join("")})}},fileButton:function(b,c,a){var d=this;if(!(3>arguments.length)){f.call(this,c);c.validate&&(this.validate=c.validate);var e=CKEDITOR.tools.extend({},c),h=e.onClick;e.className=(e.className?e.className+" ":"")+"cke_dialog_ui_button";e.onClick=function(a){var d= c["for"];a=h?h.call(this,a):!1;!1!==a&&("xhr"!==a&&b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(c["for"][0],c["for"][1])._.buttons.push(d)});CKEDITOR.ui.dialog.button.call(this,b,e,a)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,c=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,a=/\/$/;return function(d,e,f){if(!(3>arguments.length)){var h=[],k=e.html;"\x3c"!=k.charAt(0)&&(k="\x3cspan\x3e"+k+"\x3c/span\x3e");var l=e.focus;if(l){var m=this.focus; this.focus=function(){("function"==typeof l?l:m).call(this);this.fire("focus")};e.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,d,e,h,"span",null,null,"");h=h.join("").match(b);k=k.match(c)||["","",""];a.test(k[1])&&(k[1]=k[1].slice(0,-1),k[2]="/"+k[2]);f.push([k[1]," ",h[1]||"",k[2]].join(""))}}}(),fieldset:function(b,c,a,d,e){var f=e.label;this._={children:c};CKEDITOR.ui.dialog.uiElement.call(this,b,e,d,"fieldset",null,null,function(){var c= [];f&&c.push("\x3clegend"+(e.labelStyle?' style\x3d"'+e.labelStyle+'"':"")+"\x3e"+f+"\x3c/legend\x3e");for(var b=0;bc.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(c):c.getChild(0).$.nodeValue= b;return this},getLabel:function(){var b=CKEDITOR.document.getById(this._.labelId);return!b||1>b.getChildCount()?"":b.getChild(0).getText()},eventProcessors:d},!0);CKEDITOR.ui.dialog.button.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.uiElement,{click:function(){return this._.disabled?!1:this.fire("click",{dialog:this._.dialog})},enable:function(){this._.disabled=!1;var b=this.getElement();b&&b.removeClass("cke_disabled")},disable:function(){this._.disabled=!0;this.getElement().addClass("cke_disabled")}, isVisible:function(){return this.getElement().getFirst().isVisible()},isEnabled:function(){return!this._.disabled},eventProcessors:CKEDITOR.tools.extend({},CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors,{onClick:function(b,c){this.on("click",function(){c.apply(this,arguments)})}},!0),accessKeyUp:function(){this.click()},accessKeyDown:function(){this.focus()},keyboardFocusable:!0},!0);CKEDITOR.ui.dialog.textInput.prototype=CKEDITOR.tools.extend(new CKEDITOR.ui.dialog.labeledElement,{getInputElement:function(){return CKEDITOR.document.getById(this._.inputId)}, focus:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&c.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var c=b.getInputElement();c&&(c.$.focus(),c.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var c=b&&b.charAt(0);(c="‪"==c?"ltr":"‫"==c?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(c)}b||(b="");return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply(this,arguments)}, getValue:function(){var b=CKEDITOR.ui.dialog.uiElement.prototype.getValue.call(this);if(this.bidi&&b){var c=this.getDirectionMarker();c&&(b=("ltr"==c?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var c=this.getInputElement();b?c.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&c.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},k,!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(b,c,a){var d=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),e=this.getInputElement().$;d.$.text=b;d.$.value=void 0===c||null===c?b:c;void 0===a||null===a?CKEDITOR.env.ie?e.add(d.$):e.add(d.$,null):e.add(d.$,a);return this},remove:function(b){this.getInputElement().$.remove(b); return this},clear:function(){for(var b=this.getInputElement().$;0b-a;c--)if(this._.tabs[this._.tabIdList[c%a]][0].$.offsetHeight)return this._.tabIdList[c%a];return null}function h(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;cn.width-k.width-f?n.width-k.width+("rtl"==e.lang.dir?0:h[1]):g.x,g.y+h[0]n.height-k.height-f?n.height-k.height+h[2]:g.y,1);c.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mousemove", b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=x.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){d={x:e.data.$.screenX,y:e.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);g=a.getPosition();if(CKEDITOR.env.ie6Compat){var f= x.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",c)}e.data.preventDefault()},a)}function a(a){function b(c){var m="rtl"==e.lang.dir,q=l.width,r=l.height,p=q+(c.data.$.screenX-n.x)*(m?-1:1)*(a._.moved?1:2),u=r+(c.data.$.screenY-n.y)*(a._.moved?1:2),w=a._.element.getFirst(),w=m&&w.getComputedStyle("right"),t=a.getPosition();t.y+u>k.height&&(u=k.height-t.y);(m?w:t.x)+p>k.width&&(p=k.width-(m?w:t.x));if(g==CKEDITOR.DIALOG_RESIZE_WIDTH||g==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(d.minWidth|| 0,p-f);if(g==CKEDITOR.DIALOG_RESIZE_HEIGHT||g==CKEDITOR.DIALOG_RESIZE_BOTH)r=Math.max(d.minHeight||0,u-h);a.resize(q,r);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=x.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,k,n,l,m,q=CKEDITOR.tools.addFunction(function(d){l=a.getSize();var g=a.parts.contents;g.$.getElementsByTagName("iframe").length&&(m=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),g.append(m));h=l.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));f=l.width-a.parts.contents.getSize("width",1);n={x:d.screenX,y:d.screenY};k=CKEDITOR.document.getWindow().getViewPaneSize(); CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(g=x.getChild(0).getFrameDocument(),g.on("mousemove",b),g.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('+q+', event )"\x3e'+("ltr"==e.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});e.on("destroy",function(){CKEDITOR.tools.removeFunction(q)})}}function n(a){a.data.preventDefault(1)}function w(a){var b=CKEDITOR.document.getWindow(),c=a.config,d=CKEDITOR.skinName||a.config.skin,g=c.dialog_backgroundCoverColor||("moono-lisa"==d?"black":"white"),d=c.dialog_backgroundCoverOpacity,e=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(g,d,e),f=y[c];f?f.show(): (e=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",e,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+g,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(g="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+g+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",e.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'),e.push("void((function(){"+encodeURIComponent("document.open();("+ CKEDITOR.tools.fixDomain+")();document.write( '"+g+"' );document.close();")+"})())"),e.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),e.push("\x3c/div\x3e"),f=CKEDITOR.dom.element.createFromHtml(e.join("")),f.setOpacity(void 0!==d?d:.5),f.on("keydown",n),f.on("keypress",n),f.on("keyup",n),f.appendTo(CKEDITOR.document.getBody()),y[c]=f);a.focusManager.add(f);x=f;a=function(){var a=b.getViewPaneSize(); f.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;f.setStyles({left:a.x+"px",top:a.y+"px"});if(c){do a=c.getPosition(),c.move(a.x,a.y);while(c=c._.parentDialog)}};u=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||f.focus();if(CKEDITOR.env.ie6Compat){var k=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){k.prevScrollHandler=window.onscroll||function(){}; window.onscroll=k},0);h()}}function v(a){x&&(a.focusManager.remove(x),a=CKEDITOR.document.getWindow(),x.hide(),a.removeListener("resize",u),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),u=null)}var t=CKEDITOR.tools.cssLength,p='\x3cdiv class\x3d"cke_reset_all {editorId} {editorDialogClass} {hidpi}" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"dialog" aria-labelledby\x3d"cke_dialog_title_{id}"\x3e\x3ctable class\x3d"cke_dialog '+ CKEDITOR.env.cssClass+' cke_{langDir}" style\x3d"position:absolute" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd role\x3d"presentation"\x3e\x3cdiv class\x3d"cke_dialog_body" role\x3d"presentation"\x3e\x3cdiv id\x3d"cke_dialog_title_{id}" class\x3d"cke_dialog_title" role\x3d"presentation"\x3e\x3c/div\x3e\x3ca id\x3d"cke_dialog_close_button_{id}" class\x3d"cke_dialog_close_button" href\x3d"javascript:void(0)" title\x3d"{closeTitle}" role\x3d"button"\x3e\x3cspan class\x3d"cke_label"\x3eX\x3c/span\x3e\x3c/a\x3e\x3cdiv id\x3d"cke_dialog_tabs_{id}" class\x3d"cke_dialog_tabs" role\x3d"tablist"\x3e\x3c/div\x3e\x3ctable class\x3d"cke_dialog_contents" role\x3d"presentation"\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_contents_{id}" class\x3d"cke_dialog_contents_body" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3ctr\x3e\x3ctd id\x3d"cke_dialog_footer_{id}" class\x3d"cke_dialog_footer" role\x3d"presentation"\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/table\x3e\x3c/div\x3e'; CKEDITOR.dialog=function(b,g){function e(){var a=z._.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=z._.currentFocusIndex;z._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var g=c,e=1c.height||b.width+(0c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:d,this._.moved?this._.position.y:g)},foreach:function(a){for(var b in this._.contents)for(var c in this._.contents[b])a.call(this,this._.contents[b][c]);return this},reset:function(){var a=function(a){a.reset&&a.reset(1)};return function(){this.foreach(a);return this}}(), setupContent:function(){var a=arguments;this.foreach(function(b){b.setup&&b.setup.apply(b,a)})},commitContent:function(){var a=arguments;this.foreach(function(b){CKEDITOR.env.ie&&this._.currentFocusIndex==b.focusIndex&&b.getInputElement().$.blur();b.commit&&b.commit.apply(b,a)})},hide:function(){if(this.parts.dialog.isVisible()){this.fire("hide",{});this._.editor.fire("dialogHide",this);this.selectPage(this._.tabIdList[0]);var a=this._.element;a.setStyle("display","none");this.parts.dialog.setStyle("visibility", "hidden");for(H(this);CKEDITOR.dialog._.currentTop!=this;)CKEDITOR.dialog._.currentTop.hide();if(this._.parentDialog){var b=this._.parentDialog.getElement().getFirst();b.setStyle("z-index",parseInt(b.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}else v(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",I);a.removeListener("keyup",F);var c=this._.editor; c.focus();setTimeout(function(){c.focusManager.unlock();CKEDITOR.env.iOS&&c.window.focus()},0)}delete this._.parentDialog;this.foreach(function(a){a.resetInitValue&&a.resetInitValue()});this.setState(CKEDITOR.DIALOG_STATE_IDLE)}},addPage:function(a){if(!a.requiredContent||this._.editor.filter.check(a.requiredContent)){for(var b=[],c=a.label?' title\x3d"'+CKEDITOR.tools.htmlEncode(a.label)+'"':"",d=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents", children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),g=this._.contents[a.id]={},e=d.getChild(),f=0;d=e.shift();)d.notAllowed||"hbox"==d.type||"vbox"==d.type||f++,g[d.id]=d,"function"==typeof d.getChild&&e.push.apply(e,d.getChild());f||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");d=CKEDITOR.env;g="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"', 0arguments.length)){var h=(d.call?d(b):d)||"div",k=["\x3c",h," "],n=(g&&g.call?g(b):g)||{},l=(e&&e.call?e(b):e)||{},m=(f&&f.call?f.call(this,a,b):f)||"",q=this.domId=l.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(n.display="none",this.notAllowed=!0);l.id=q;var p={};b.type&&(p["cke_dialog_ui_"+ b.type]=1);b.className&&(p[b.className]=1);b.disabled&&(p.cke_disabled=1);for(var r=l["class"]&&l["class"].split?l["class"].split(" "):[],q=0;qCKEDITOR.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,k,n={role:"presentation"};g&&g.align&&(n.align=g.align);CKEDITOR.ui.dialog.uiElement.call(this, a,g||{type:"hbox"},d,"table",{},n,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(k=0;karguments.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:"+t(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;hb.$.clientHeight?b.setStyle("overflow-y","hidden"):b.removeStyle("overflow-y"))}var d,l,m,b,g,c=f.config.autoGrow_bottomSpace|| 0,a=void 0!==f.config.autoGrow_minHeight?f.config.autoGrow_minHeight:200,n=f.config.autoGrow_maxHeight||Infinity,w=!f.config.autoGrow_maxHeight;f.addCommand("autogrow",{exec:k,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var v={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},t;for(t in v)f.on(t,function(a){"wysiwyg"==a.editor.mode&&setTimeout(function(){var a=f.getCommand("maximize");!f.window||a&&a.state==CKEDITOR.TRISTATE_ON?d=null:(k(),w||k())},100)});f.on("afterCommandExec", function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&&(a.data.command.state==CKEDITOR.TRISTATE_ON?b.removeStyle("overflow-y"):k())});f.on("contentDom",e);e();f.config.autoGrow_onStartup&&f.editable().isVisible()&&f.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"):f(h)})}})}(),CKEDITOR.plugins.add("basicstyles",{init:function(f){var h= 0,e=function(d,b,g,c){if(c){c=new CKEDITOR.style(c);var a=k[g];a.unshift(c);f.attachStyleStateChange(c,function(a){!f.readOnly&&f.getCommand(g).setState(a)});f.addCommand(g,new CKEDITOR.styleCommand(c,{contentForms:a}));f.ui.addButton&&f.ui.addButton(d,{label:b,command:g,toolbar:"basicstyles,"+(h+=10)})}},k={bold:["strong","b",["span",function(d){d=d.styles["font-weight"];return"bold"==d||700<=+d}]],italic:["em","i",["span",function(d){return"italic"==d.styles["font-style"]}]],underline:["u",["span", function(d){return"underline"==d.styles["text-decoration"]}]],strike:["s","strike",["span",function(d){return"line-through"==d.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},d=f.config,l=f.lang.basicstyles;e("Bold",l.bold,"bold",d.coreStyles_bold);e("Italic",l.italic,"italic",d.coreStyles_italic);e("Underline",l.underline,"underline",d.coreStyles_underline);e("Strike",l.strike,"strike",d.coreStyles_strike);e("Subscript",l.subscript,"subscript",d.coreStyles_subscript);e("Superscript", l.superscript,"superscript",d.coreStyles_superscript);f.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 f={exec:function(f){var e=f.getCommand("blockquote").state,k=f.getSelection(),d=k&&k.getRanges()[0];if(d){var l=k.createBookmarks();if(CKEDITOR.env.ie){var m=l[0].startNode,b=l[0].endNode,g;if(m&&"blockquote"==m.getParent().getName())for(g=m;g=g.getNext();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){m.move(g,!0);break}if(b&&"blockquote"==b.getParent().getName())for(g=b;g=g.getPrevious();)if(g.type==CKEDITOR.NODE_ELEMENT&&g.isBlockBoundary()){b.move(g);break}}var c=d.createIterator(); c.enlargeBr=f.config.enterMode!=CKEDITOR.ENTER_BR;if(e==CKEDITOR.TRISTATE_OFF){for(m=[];e=c.getNextParagraph();)m.push(e);1>m.length&&(e=f.document.createElement(f.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=l.shift(),d.insertNode(e),e.append(new CKEDITOR.dom.text("",f.document)),d.moveToBookmark(b),d.selectNodeContents(e),d.collapse(!0),b=d.createBookmark(),m.push(e),l.unshift(b));g=m[0].getParent();d=[];for(b=0;bf||(this.notifications.splice(f,1),e.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var e=this.editor,f=e.config,d=new CKEDITOR.dom.element("div");d.addClass("cke_notifications_area"); d.setAttribute("id","cke_notifications_area_"+e.name);d.setStyle("z-index",f.baseFloatZIndex-2);return d},_attachListeners:function(){var e=CKEDITOR.document.getWindow(),f=this.editor;e.on("scroll",this._uiBuffer.input);e.on("resize",this._uiBuffer.input);f.on("change",this._changeBuffer.input);f.on("floatingSpaceLayout",this._layout,this,null,20);f.on("blur",this._layout,this,null,20)},_removeListeners:function(){var e=CKEDITOR.document.getWindow(),f=this.editor;e.removeListener("scroll",this._uiBuffer.input); e.removeListener("resize",this._uiBuffer.input);f.removeListener("change",this._changeBuffer.input);f.removeListener("floatingSpaceLayout",this._layout);f.removeListener("blur",this._layout)},_layout:function(){function e(){f.setStyle("left",A(r+h.width-n-w))}var f=this.element,d=this.editor,h=d.ui.contentsElement.getClientRect(),m=d.ui.contentsElement.getDocumentPosition(),b,g,c=f.getClientRect(),a,n=this._notificationWidth,w=this._notificationMargin;a=CKEDITOR.document.getWindow();var v=a.getScrollPosition(), t=a.getViewPaneSize(),p=CKEDITOR.document.getBody(),q=p.getDocumentPosition(),A=CKEDITOR.tools.cssLength;n&&w||(a=this.element.getChild(0),n=this._notificationWidth=a.getClientRect().width,w=this._notificationMargin=parseInt(a.getComputedStyle("margin-left"),10)+parseInt(a.getComputedStyle("margin-right"),10));d.toolbar&&(b=d.ui.space("top"),g=b.getClientRect());b&&b.isVisible()&&g.bottom>h.top&&g.bottomv.y?f.setStyles({position:"fixed",top:0}):f.setStyles({position:"absolute",top:A(m.y+h.height-c.height)});var r="fixed"==f.getStyle("position")?h.left:"static"!=p.getComputedStyle("position")?m.x-q.x:m.x;h.widthv.x+t.width?e():f.setStyle("left",A(r)):m.x+n+w>v.x+t.width?f.setStyle("left",A(r)):m.x+h.width/2+n/2+w>v.x+t.width?f.setStyle("left",A(r-m.x+v.x+t.width-n-w)):0>h.left+h.width-n-w?e():0>h.left+h.width/2-n/2?f.setStyle("left",A(r-m.x+v.x)):f.setStyle("left", A(r+h.width/2-n/2-w/2))}};CKEDITOR.plugins.notification=f}(),function(){var f='\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&&(f+= ' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan class\x3d"cke_button_icon cke_button__{iconName}_icon" style\x3d"{style}"'),f=f+'\x3e\x26nbsp;\x3c/span\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_button_label cke_button__{name}_label" aria-hidden\x3d"false"\x3e{label}\x3c/span\x3e\x3cspan id\x3d"{id}_description" class\x3d"cke_button_label" aria-hidden\x3d"false"\x3e{ariaShortcut}\x3c/span\x3e{arrowHtml}\x3c/a\x3e', h=CKEDITOR.addTemplate("buttonArrow",'\x3cspan class\x3d"cke_button_arrow"\x3e'+(CKEDITOR.env.hc?"\x26#9660;":"")+"\x3c/span\x3e"),e=CKEDITOR.addTemplate("button",f);CKEDITOR.plugins.add("button",{beforeInit:function(e){e.ui.addHandler(CKEDITOR.UI_BUTTON,CKEDITOR.ui.button.handler)}});CKEDITOR.UI_BUTTON="button";CKEDITOR.ui.button=function(e){CKEDITOR.tools.extend(this,e,{title:e.label,click:e.click||function(d){d.execCommand(e.command)}});this._={}};CKEDITOR.ui.button.handler={create:function(e){return new CKEDITOR.ui.button(e)}}; CKEDITOR.ui.button.prototype={render:function(f,d){function l(){var a=f.mode;a&&(a=this.modes[a]?void 0!==m[a]?m[a]:CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,a=f.readOnly&&!this.readOnly?CKEDITOR.TRISTATE_DISABLED:a,this.setState(a),this.refresh&&this.refresh())}var m=null,b=CKEDITOR.env,g=this._.id=CKEDITOR.tools.getNextId(),c="",a=this.command,n,w,v;this._.editor=f;var t={id:g,button:this,editor:f,focus:function(){CKEDITOR.document.getById(g).focus()},execute:function(){this.button.click(f)}, attach:function(a){this.button.attach(a)}},p=CKEDITOR.tools.addFunction(function(a){if(t.onkey)return a=new CKEDITOR.dom.event(a),!1!==t.onkey(t,a.getKeystroke())}),q=CKEDITOR.tools.addFunction(function(a){var b;t.onfocus&&(b=!1!==t.onfocus(t,new CKEDITOR.dom.event(a)));return b}),A=0;t.clickFn=n=CKEDITOR.tools.addFunction(function(){A&&(f.unlockSelection(1),A=0);t.execute();b.iOS&&f.focus()});this.modes?(m={},f.on("beforeModeUnload",function(){f.mode&&this._.state!=CKEDITOR.TRISTATE_DISABLED&&(m[f.mode]= this._.state)},this),f.on("activeFilterChange",l,this),f.on("mode",l,this),!this.readOnly&&f.on("readOnly",l,this)):a&&(a=f.getCommand(a))&&(a.on("state",function(){this.setState(a.state)},this),c+=a.state==CKEDITOR.TRISTATE_ON?"on":a.state==CKEDITOR.TRISTATE_DISABLED?"disabled":"off");var r;if(this.directional)f.on("contentDirChanged",function(a){var b=CKEDITOR.document.getById(this._.id),c=b.getFirst();a=a.data;a!=f.lang.dir?b.addClass("cke_"+a):b.removeClass("cke_ltr").removeClass("cke_rtl");c.setAttribute("style", CKEDITOR.skin.getIconStyle(r,"rtl"==a,this.icon,this.iconOffset))},this);a?(w=f.getCommandKeystroke(a))&&(v=CKEDITOR.tools.keystrokeToString(f.lang.common.keyboard,w)):c+="off";w=this.name||this.command;var C=null,B=this.icon;r=w;this.icon&&!/\./.test(this.icon)?(r=this.icon,B=null):(this.icon&&(C=this.icon),CKEDITOR.env.hidpi&&this.iconHiDpi&&(C=this.iconHiDpi));C?(CKEDITOR.skin.addIcon(C,C),B=null):C=r;c={id:g,name:w,iconName:r,label:this.label,cls:this.className||"",state:c,ariaDisabled:"disabled"== c?"true":"false",title:this.title+(v?" ("+v.display+")":""),ariaShortcut:v?f.lang.common.keyboardShortcut+" "+v.aria:"",titleJs:b.gecko&&!b.hc?"":(this.title||"").replace("'",""),hasArrow:this.hasArrow?"true":"false",keydownFn:p,focusFn:q,clickFn:n,style:CKEDITOR.skin.getIconStyle(C,"rtl"==f.lang.dir,B,this.iconOffset),arrowHtml:this.hasArrow?h.output():""};e.output(c,d);if(this.onRender)this.onRender();return t},setState:function(e){if(this._.state==e)return!1;this._.state=e;var d=CKEDITOR.document.getById(this._.id); return d?(d.setState(e,"cke_button"),e==CKEDITOR.TRISTATE_DISABLED?d.setAttribute("aria-disabled",!0):d.removeAttribute("aria-disabled"),this.hasArrow?(e=e==CKEDITOR.TRISTATE_ON?this._.editor.lang.button.selectedLabel.replace(/%1/g,this.label):this.label,CKEDITOR.document.getById(this._.id+"_label").setText(e)):e==CKEDITOR.TRISTATE_ON?d.setAttribute("aria-pressed",!0):d.removeAttribute("aria-pressed"),!0):!1},getState:function(){return this._.state},toFeature:function(e){if(this._.feature)return this._.feature; var d=this;this.allowedContent||this.requiredContent||!this.command||(d=e.getCommand(this.command)||d);return this._.feature=d}};CKEDITOR.ui.prototype.addButton=function(e,d){this.add(e,CKEDITOR.UI_BUTTON,d)}}(),function(){function f(d){function e(){for(var a=f(),c=CKEDITOR.tools.clone(d.config.toolbarGroups)||h(d),g=0;gb.order?-1:0>a.order?1:a.order]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&f(a,c)})}function y(){if("wysiwyg"==a.mode){var b=x("paste");a.getCommand("cut").setState(x("cut"));a.getCommand("copy").setState(x("copy"));a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function x(b){if(E&&b in{paste:1,cut:1})return CKEDITOR.TRISTATE_DISABLED;if("paste"==b)return CKEDITOR.TRISTATE_OFF;b=a.getSelection();var c=b.getRanges();return b.getType()==CKEDITOR.SELECTION_NONE||1==c.length&&c[0].collapsed?CKEDITOR.TRISTATE_DISABLED: CKEDITOR.TRISTATE_OFF}var z=CKEDITOR.plugins.clipboard,I=0,F=0,E=0;(function(){a.on("key",B);a.on("contentDom",b);a.on("selectionChange",function(a){E=a.data.selection.getRanges()[0].checkReadOnly();y()});if(a.contextMenu){a.contextMenu.addListener(function(a,b){E=b.getRanges()[0].checkReadOnly();return{cut:x("cut"),copy:x("copy"),paste:x("paste")}});var c=null;a.on("menuShow",function(){c&&(c.removeListener(),c=null);var b=a.contextMenu.findItemByCommandName("paste");b&&b.element&&(c=b.element.on("touchend", function(){a._.forcePasteDialog=!0}))})}if(a.ui.addButton)a.once("instanceReady",function(){a._.pasteButtons&&CKEDITOR.tools.array.forEach(a._.pasteButtons,function(b){if(b=a.ui.get(b))if(b=CKEDITOR.document.getById(b._.id))b.on("touchend",function(){a._.forcePasteDialog=!0})})})})();(function(){function b(c,d,g,e,f){var h=a.lang.clipboard[d];a.addCommand(d,g);a.ui.addButton&&a.ui.addButton(c,{label:h,command:d,toolbar:"clipboard,"+e});a.addMenuItems&&a.addMenuItem(d,{label:h,command:d,group:"clipboard", order:f})}b("Cut","cut",c("cut"),10,1);b("Copy","copy",c("copy"),20,4);b("Paste","paste",d(),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 g(a){a.removeListener();a.cancel();c({type:f,dataValue:a.data.dataValue,dataTransfer:a.data.dataTransfer,method:"paste"})}var e=!1,f="auto";c||(c=b,b=null);a.on("beforePaste",function(a){a.removeListener();e=!0;f=a.data.type},null, null,1E3);a.on("paste",d,null,null,0);!1===m()&&(a.removeListener("paste",d),a._.forcePasteDialog&&e&&a.fire("pasteDialog")?(a.on("pasteDialogCommit",g),a.on("dialogHide",function(a){a.removeListener();a.data.removeListener("pasteDialogCommit",g);a.data._.committed||c(null)})):c(null))}}function e(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 k(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 m(a,b)}function d(){function a(){var a= {},b;for(b in CKEDITOR.dtd)"$"!=b.charAt(0)&&"div"!=b&&"span"!=b&&(a[b]=1);return a}var b={};return{get:function(c){return"plain-text"==c?b.plainText||(b.plainText=new CKEDITOR.filter("br")):"semantic-content"==c?((c=b.semanticContent)||(c=new CKEDITOR.filter,c.allow({$1:{elements:a(),attributes:!0,styles:!1,classes:!1}}),c=b.semanticContent=c),c):c?new CKEDITOR.filter(c):null}}}function l(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 m(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 b(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function g(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,d,g){d.select();f(a,{dataTransfer:g, method:"drop"},1);g.sourceEditor.fire("saveSnapshot");g.sourceEditor.editable().extractHtmlFromRange(b);g.sourceEditor.getSelection().selectRanges([b]);g.sourceEditor.fire("saveSnapshot")}function d(c,g){c.select();f(a,{dataTransfer:g,method:"drop"},1);b.resetDragDataTransfer()}function g(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 e(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} var h=a.editable(),k=CKEDITOR.plugins.clipboard.getDropTarget(a),l=a.ui.space("top"),m=a.ui.space("bottom");b.preventDefaultDropOnElement(l);b.preventDefaultDropOnElement(m);h.attachListener(k,"dragstart",g);h.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);h.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);h.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount= c?e(c.startContainer):null,b.dragEndContainerChildCount=c?e(c.endContainer):null)},null,null,100);h.attachListener(k,"dragend",g);h.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);h.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);h.attachListener(k,"dragover",function(a){if(CKEDITOR.env.edge)a.data.preventDefault();else{var b=a.data.getTarget();b&&b.is&&b.is("html")?a.data.preventDefault():CKEDITOR.env.ie&&CKEDITOR.plugins.clipboard.isFileApiSupported&&a.data.$.dataTransfer.types.contains("Files")&& a.data.preventDefault()}});h.attachListener(k,"drop",function(c){if(!c.data.$.defaultPrevented){c.data.preventDefault();var d=c.data.getTarget();if(!d.isReadOnly()||d.type==CKEDITOR.NODE_ELEMENT&&d.is("html")){var d=b.getRangeAtDropPosition(c,a),e=b.dragRange;d&&g(c,e,d)}}},null,null,9999);h.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);h.attachListener(a,"drop",function(g){if(g=g.data){var e=g.dropRange,f=g.dragRange,h=g.dataTransfer;h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL? setTimeout(function(){b.internalDrop(f,e,h,a)},0):h.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,e,h):d(e,h)}},null,null,9999)})}var c;CKEDITOR.plugins.add("clipboard",{requires:"dialog,notification,toolbar",init:function(a){var b,c=d();a.config.forcePasteAsPlainText?b="plain-text":a.config.pasteFilter?b=a.config.pasteFilter:!CKEDITOR.env.webkit||"pasteFilter"in a.config||(b="semantic-content");a.pasteFilter=c.get(b);h(a);g(a);CKEDITOR.dialog.add("paste",CKEDITOR.getUrl(this.path+ "dialogs/paste.js"));if(CKEDITOR.env.gecko){var f=["image/png","image/jpeg","image/gif"],m;a.on("paste",function(b){var c=b.data,d=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&d&&1==d.getFilesCount()&&m!=d.id&&(d=d.getFile(0),-1!=CKEDITOR.tools.indexOf(f,d.type))){var g=new FileReader;g.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+g.result+'" /\x3e';a.fire("paste",b.data)},!1);g.addEventListener("abort",function(){a.fire("paste",b.data)},!1);g.addEventListener("error", function(){a.fire("paste",b.data)},!1);g.readAsDataURL(d);m=c.dataTransfer.id;b.stop()}},null,null,1)}a.on("paste",function(b){b.data.dataTransfer||(b.data.dataTransfer=new CKEDITOR.plugins.clipboard.dataTransfer);if(!b.data.dataValue){var c=b.data.dataTransfer,d=c.getData("text/html");if(d)b.data.dataValue=d,b.data.type="html";else if(d=c.getData("text/plain"))b.data.dataValue=a.editable().transformPlainTextToHtml(d),b.data.type="text"}},null,null,1);a.on("paste",function(a){var b=a.data.dataValue, c=CKEDITOR.dtd.$block;-1 <\/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);a.on("paste",function(b){b=b.data;var d=a._.nextPasteType||b.type,g=b.dataValue,f,h=a.config.clipboard_defaultContentType||"html",m=b.dataTransfer.getTransferType(a)==CKEDITOR.DATA_TRANSFER_EXTERNAL,n=!0===a.config.forcePasteAsPlainText;f="html"==d||"html"==b.preSniffing?"html":e(g);delete a._.nextPasteType;"htmlifiedtext"==f&&(g=k(a.config,g));if("text"==d&&"html"==f)g= l(a,g,c.get("plain-text"));else if(m&&a.pasteFilter&&!b.dontFilter||n)g=l(a,g,a.pasteFilter);b.startsWithEOL&&(g='\x3cbr data-cke-eol\x3d"1"\x3e'+g);b.endsWithEOL&&(g+='\x3cbr data-cke-eol\x3d"1"\x3e');"auto"==d&&(d="html"==f||"html"==h?"html":"text");b.type=d;b.dataValue=g;delete b.preSniffing;delete b.startsWithEOL;delete b.endsWithEOL},null,null,6);a.on("paste",function(b){b=b.data;b.dataValue&&(a.insertHtml(b.dataValue,b.type,b.range),setTimeout(function(){a.fire("afterPaste")},0))},null,null, 1E3);a.on("pasteDialog",function(b){setTimeout(function(){a.openDialog("paste",b.data)},0)})}});CKEDITOR.plugins.clipboard={isCustomCopyCutSupported:(!CKEDITOR.env.ie||16<=CKEDITOR.env.version)&&!CKEDITOR.env.iOS,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 g(a,c,d){var e=a;e.type==CKEDITOR.NODE_TEXT&&(e=a.getParent());if(e.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 e=b.startContainer;"number"==typeof d&&"number"==typeof c&&e.type==CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,e,c)||g(a.endContainer, e,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,b,g.dragStartContainerChildCount, g.dragEndContainerChildCount);(k=this.isDropRangeAffectedByDragRange(a,b))||(h=a.createBookmark(!1));g=b.clone().createBookmark(!1);k&&(h=a.createBookmark(!1));a=h.startNode;b=h.endNode;k=g.startNode;b&&a.getPosition(k)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(k)&CKEDITOR.POSITION_FOLLOWING&&k.insertBefore(a);a=d.createRange();a.moveToBookmark(h);e.extractHtmlFromRange(a,1);b=d.createRange();b.moveToBookmark(g);f(d,{dataTransfer:c,method:"drop",range:b},1);d.fire("unlockSnapshot")},getRangeAtDropPosition:function(a, b){var c=a.data.$,d=c.clientX,g=c.clientY,e=b.getSelection(!0).getRanges()[0],f=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,g))c=b.document.$.caretRangeFromPoint(d,g),f.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),f.collapse(!0);else if(c.rangeParent)f.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset),f.collapse(!0);else{if(CKEDITOR.env.ie&&8k&&!h;k++){if(!h)try{c.moveToPoint(d,g-k),h=!0}catch(l){}if(!h)try{c.moveToPoint(d,g+k),h=!0}catch(m){}}if(h){var u="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+u+'"\x3e​\x3c/span\x3e');var y=b.document.getById(u);f.moveToPosition(y,CKEDITOR.POSITION_BEFORE_START);y.remove()}else{var x=b.document.$.elementFromPoint(d,g),z=new CKEDITOR.dom.element(x),I;if(z.equals(b.editable())|| "html"==z.getName())return e&&e.startContainer&&!e.startContainer.equals(b.editable())?e:null;I=z.getClientRect();d/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/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(c);this.id||(this.id="Text"==c?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==c||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 g=c.indexOf("\x3c/html\x3e"),c=-1!==g?c.substring(0,g+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"==c&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(d){}},storeId:function(){"Text"!==c&&this.setData(c,this.id)},getTransferType:function(a){return this.sourceEditor?this.sourceEditor== a?CKEDITOR.DATA_TRANSFER_INTERNAL:CKEDITOR.DATA_TRANSFER_CROSS_EDITORS:CKEDITOR.DATA_TRANSFER_EXTERNAL},cacheData:function(){function a(a){a=b._.normalizeType(a);var c=b.getData(a);"text/html"==a&&(b._.nativeHtmlCache=b.getData(a,!0),c=b._stripHtml(c));c&&(b._.data[a]=c)}if(this.$){var b=this,c,d;if(CKEDITOR.plugins.clipboard.isCustomDataTypesSupported){if(this.$.types)for(c=0;ce?q+e:d.width>e?q-a.left:q-a.right+d.width):he?q-e:d.width>e?q-a.right+d.width:q-a.left);e=a.top;d.height- a.topf?A-f:d.height>f?A-a.bottom+d.height:A-a.top);CKEDITOR.env.ie&&(d=a=new CKEDITOR.dom.element(n.$.offsetParent),"html"==d.getName()&&(d=d.getDocument().getBody()),"rtl"==d.getComputedStyle("direction")&&(q=CKEDITOR.env.ie8Compat?q-2*n.getDocument().getDocumentElement().$.scrollLeft:q-(a.$.scrollWidth-a.$.clientWidth)));var a=n.getFirst(),l;(l=a.getCustomData("activePanel"))&&l.onHide&&l.onHide.call(this,1);a.setCustomData("activePanel",this);n.setStyles({top:A+"px",left:q+"px"});n.setOpacity(1); b&&b()},this);g.isLoaded?a():g.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();c.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){c.markFirstDisplayed?c.markFirstDisplayed():c._.markFirstDisplayed()},0):c.markFirstDisplayed?c.markFirstDisplayed():c._.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 e=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,e))},focus:function(){if(CKEDITOR.env.webkit){var e=CKEDITOR.document.getActive();e&&!e.equals(this._.iframe)&&e.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var e=this._.iframe.getFrameDocument().getActive();e&&e.is("a")&&(this._.lastFocused= e)},hide:function(e){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(e=e&&this._.returnFocus)CKEDITOR.env.webkit&&e.type&&e.getWindow().$.focus(),e.focus();delete this._.lastFocused;this._.showBlockParams=null;this._.editor.fire("panelHide",this)}},allowBlur:function(e){var f=this._.panel; void 0!==e&&(f.allowBlur=e);return f.allowBlur},showAsChild:function(e,f,d,h,m,b){if(this._.activeChild!=e||e._.panel._.offsetParentId!=d.getId())this.hideChild(),e.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(f,d,h,m,b),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(e){var f= this._.activeChild;f&&(delete f.onHide,delete this._.activeChild,f.hide(),e&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var e=CKEDITOR.tools.isEmpty(CKEDITOR.instances),f;for(f in h){var d=h[f];e?d.destroy():d.element.hide()}e&&(h={})})}(),CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(f){for(var h=f.config.menu_groups.split(","),e=f._.menuGroups={},k=f._.menuItems={},d=0;db.group?1:d.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"{label}" aria-describedby\x3d"{id}_description" aria-haspopup\x3d"{hasPopup}" aria-disabled\x3d"{disabled}" {ariaChecked} draggable\x3d"false"'; 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;"');var h=h+(' onmouseover\x3d"CKEDITOR.tools.callFunction({hoverFn},{index});" onmouseout\x3d"CKEDITOR.tools.callFunction({moveOutFn},{index});" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},{index}); return false;"\x3e'),e=CKEDITOR.addTemplate("menuItem", h+'\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'),k=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'), d=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(d,e){e=this._.definition=e||{};this.id=CKEDITOR.tools.getNextId();this.editor=d;this.items=[];this._.listeners=[];this._.level=e.level||1;var b=CKEDITOR.tools.extend({},e.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),g=b.block.attributes=b.attributes||{};!g.role&&(g.role="menu");this._.panelDefinition= b},_:{onShow:function(){var d=this.editor.getSelection(),e=d&&d.getStartElement(),b=this.editor.elementPath(),g=this._.listeners;this.removeAll();for(var c=0;cCKEDITOR.env.version?f.createText("\r"):f.createElement("br"),d.deleteContents(),d.insertNode(c),CKEDITOR.env.needsBrFiller?(f.createText("").insertAfter(c),k&&(m||l.blockLimit).appendBogus(),c.getNext().$.nodeValue="",d.setStartAt(c.getNext(),CKEDITOR.POSITION_AFTER_START)):d.setStartAt(c,CKEDITOR.POSITION_AFTER_END)),d.collapse(!0),d.select(),d.scrollIntoView()):b(c,a,d,e)}}};l=CKEDITOR.plugins.enterkey; m=l.enterBr;b=l.enterBlock;g=/^h[1-6]$/}(),function(){function f(f,e){var k={},d=[],l={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};f=f.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,a){var g=e?"\x26"+a+";":l[a];k[g]=e?l[a]:"\x26"+a+";";d.push(g);return""});if(!e&&f){f=f.split(",");var m=document.createElement("div"),b;m.innerHTML="\x26"+f.join(";\x26")+";";b=m.innerHTML;m=null;for(m=0;mh&&(h=640);420>e&&(e=420);var d=parseInt((window.screen.height-e)/2,10),l=parseInt((window.screen.width- h)/2,10);k=(k||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+h+",height\x3d"+e+",top\x3d"+d+",left\x3d"+l;var m=window.open("",null,k,!0);if(!m)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(m.moveTo(l,d),m.resizeTo(h,e)),m.focus(),m.location.href=f}catch(b){window.open(f,null,k,!0)}return!0}}),"use strict",function(){function f(d){this.editor=d;this.loaders= []}function h(d,f,h){var b=d.config.fileTools_defaultFileName;this.editor=d;this.lang=d.lang;"string"===typeof f?(this.data=f,this.file=e(this.data),this.loaded=this.total=this.file.size):(this.data=null,this.file=f,this.total=this.file.size,this.loaded=0);h?this.fileName=h:this.file.name?this.fileName=this.file.name:(d=this.file.type.split("/"),b&&(d[0]=b),this.fileName=d.join("."));this.uploaded=0;this.responseData=this.uploadTotal=null;this.status="created";this.abort=function(){this.changeStatus("abort")}} function e(d){var e=d.match(k)[1];d=d.replace(k,"");d=atob(d);var f=[],b,g,c,a;for(b=0;bb.status||299A.height-q.bottom?b("pin"):b("bottom"),a=A.width/2,a=d.floatSpacePreferRight?"right":0p.width?"rtl"==d.contentsLangDirection?"right":"left":a-q.left>q.right-a?"left":"right",p.width>A.width?(a="left",n=0):(n="left"==a?0A.width&&(a="left"==a?"right":"left",n=0)),g.setStyle(a,e(("pin"==c?y:B)+n+("pin"==c?0:"left"==a?C:-C)))):(c="pin",b("pin"),m(a))}}}();if(l){var b=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}"'+(f.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(f.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'),g=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(b.output({content:l, id:f.id,langDir:f.lang.dir,langCode:f.langCode,name:f.name,style:"display:none;z-index:"+(d.baseFloatZIndex-1),topId:f.ui.spaceId("top"),voiceLabel:f.title}))),c=CKEDITOR.tools.eventsBuffer(500,m),a=CKEDITOR.tools.eventsBuffer(100,m);g.unselectable();g.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});f.on("focus",function(b){m(b);f.on("change",c.input);h.on("scroll",a.input);h.on("resize",a.input)});f.on("blur",function(){g.hide();f.removeListener("change", c.input);h.removeListener("scroll",a.input);h.removeListener("resize",a.input)});f.on("destroy",function(){h.removeListener("scroll",a.input);h.removeListener("resize",a.input);g.clearCustomData();g.remove()});f.focusManager.hasFocus&&g.show();f.focusManager.add(g,1)}}var h=CKEDITOR.document.getWindow(),e=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(e){e.on("loaded",function(){f(this)},null,null,20)}})}(),CKEDITOR.plugins.add("listblock",{requires:"panel",onLoad:function(){var f= 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}" href\x3d"javascript:void(\'{val}\')" {onclick}\x3d"CKEDITOR.tools.callFunction({clickFn},\'{val}\'); return false;" role\x3d"option"\x3e{text}\x3c/a\x3e\x3c/li\x3e'),e=CKEDITOR.addTemplate("panel-list-group", '\x3ch1 id\x3d"{id}" class\x3d"cke_panel_grouptitle" role\x3d"presentation" \x3e{label}\x3c/h1\x3e'),k=/\'/g;CKEDITOR.ui.panel.prototype.addListBlock=function(d,e){return this.addBlock(d,new CKEDITOR.ui.listBlock(this.getHolderElement(),e))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(d,e){e=e||{};var f=e.attributes||(e.attributes={});(this.multiSelect=!!e.multiSelect)&&(f["aria-multiselectable"]=!0);!f.role&&(f.role="listbox");this.base.apply(this,arguments); this.element.setAttribute("role",f.role);f=this.keys;f[40]="next";f[9]="next";f[38]="prev";f[CKEDITOR.SHIFT+9]="prev";f[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(f[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var d=f.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(d);delete this._.started}},getClick:function(){this._.click||(this._.click=CKEDITOR.tools.addFunction(function(d){var e= this.toggle(d);if(this.onClick)this.onClick(d,e)},this));return this._.click}},proto:{add:function(d,e,f){var b=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[d]=b;var g;g=CKEDITOR.tools.htmlEncodeAttr(d).replace(k,"\\'");d={id:b,val:g,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(f||d),text:e||d};this._.pendingList.push(h.output(d))},startGroup:function(d){this._.close(); var f=CKEDITOR.tools.getNextId();this._.groups[d]=f;this._.pendingHtml.push(e.output({id:f,label:d}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(d){var e=this.isMarked(d);e?this.unmark(d):this.mark(d);return!e},hideGroup:function(d){var e=(d=this.element.getDocument().getById(this._.groups[d]))&&d.getNext();d&&(d.setStyle("display","none"),e&&"ul"==e.getName()&&e.setStyle("display","none"))},hideItem:function(d){this.element.getDocument().getById(this._.items[d]).setStyle("display", "none")},showAll:function(){var d=this._.items,e=this._.groups,f=this.element.getDocument(),b;for(b in d)f.getById(d[b]).setStyle("display","");for(var g in e)d=f.getById(e[g]),b=d.getNext(),d.setStyle("display",""),b&&"ul"==b.getName()&&b.setStyle("display","")},mark:function(d){this.multiSelect||this.unmarkAll();d=this._.items[d];var e=this.element.getDocument().getById(d);e.addClass("cke_selected");this.element.getDocument().getById(d+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(e)}, markFirstDisplayed:function(){var d=this;this._.markFirstDisplayed(function(){d.multiSelect||d.unmarkAll()})},unmark:function(d){var e=this.element.getDocument();d=this._.items[d];var f=e.getById(d);f.removeClass("cke_selected");e.getById(d+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(f)},unmarkAll:function(){var d=this._.items,e=this.element.getDocument(),f;for(f in d){var b=d[f];e.getById(b).removeClass("cke_selected");e.getById(b+"_option").removeAttribute("aria-selected")}this.onUnmark&& this.onUnmark()},isMarked:function(d){return this.element.getDocument().getById(this._.items[d]).hasClass("cke_selected")},focus:function(d){this._.focusIndex=-1;var e=this.element.getElementsByTag("a"),f,b=-1;if(d)for(f=this.element.getDocument().getById(this._.items[d]).getFirst();d=e.getItem(++b);){if(d.equals(f)){this._.focusIndex=b;break}}else this.element.focus();f&&setTimeout(function(){f.focus()},0)}}})}}),CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(f){f.ui.addHandler(CKEDITOR.UI_RICHCOMBO, CKEDITOR.ui.richCombo.handler)}}),function(){var f='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(CKEDITOR.env.gecko&&!CKEDITOR.env.hc?"":" href\x3d\"javascript:void('{titleJs}')\"")+' hidefocus\x3d"true" role\x3d"button" aria-labelledby\x3d"{id}_label" aria-haspopup\x3d"true"';CKEDITOR.env.gecko&&CKEDITOR.env.mac&& (f+=' onkeypress\x3d"return false;"');CKEDITOR.env.gecko&&(f+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var f=f+(' onkeydown\x3d"return CKEDITOR.tools.callFunction({keydownFn},event,this);" onfocus\x3d"return CKEDITOR.tools.callFunction({focusFn},event);" '+(CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick")+'\x3d"CKEDITOR.tools.callFunction({clickFn},this);return false;"\x3e\x3cspan id\x3d"{id}_text" class\x3d"cke_combo_text cke_combo_inlinelabel"\x3e{label}\x3c/span\x3e\x3cspan class\x3d"cke_combo_open"\x3e\x3cspan class\x3d"cke_combo_arrow"\x3e'+ (CKEDITOR.env.hc?"\x26#9660;":CKEDITOR.env.air?"\x26nbsp;":"")+"\x3c/span\x3e\x3c/span\x3e\x3c/a\x3e\x3c/span\x3e"),h=CKEDITOR.addTemplate("combo",f);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(e){CKEDITOR.tools.extend(this,e,{canGroup:!1,title:e.label,modes:{wysiwyg:1},editorFocus:1});e=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=e.parent&&e.parent.getDocument()||CKEDITOR.document;e.className="cke_combopanel"; e.block={multiSelect:e.multiSelect,attributes:e.attributes};e.toolbarRelated=!0;this._={panelDefinition:e,items:{}}},proto:{renderHtml:function(e){var f=[];this.render(e,f);return f.join("")},render:function(e,f){function d(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var a=this.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;e.readOnly&&!this.readOnly&&(a=CKEDITOR.TRISTATE_DISABLED);this.setState(a);this.setValue("");a!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var l= CKEDITOR.env,m="cke_"+this.id,b=CKEDITOR.tools.addFunction(function(a){w&&(e.unlockSelection(1),w=0);c.execute(a)},this),g=this,c={id:m,combo:this,focus:function(){CKEDITOR.document.getById(m).getChild(1).focus()},execute:function(a){var b=g._;if(b.state!=CKEDITOR.TRISTATE_DISABLED)if(g.createPanel(e),b.on)b.panel.hide();else{g.commit();var c=g.getValue();c?b.list.mark(c):b.list.unmarkAll();b.panel.showBlock(g.id,new CKEDITOR.dom.element(a),4)}},clickFn:b};e.on("activeFilterChange",d,this);e.on("mode", d,this);e.on("selectionChange",d,this);!this.readOnly&&e.on("readOnly",d,this);var a=CKEDITOR.tools.addFunction(function(a,d){a=new CKEDITOR.dom.event(a);var e=a.getKeystroke();switch(e){case 13:case 32:case 40:CKEDITOR.tools.callFunction(b,d);break;default:c.onkey(c,e)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){c.onfocus&&c.onfocus()}),w=0;c.keyDownFn=a;l={id:m,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:l.gecko&&!l.hc?"":(this.title|| "").replace("'",""),keydownFn:a,focusFn:n,clickFn:b};h.output(l,f);if(this.onRender)this.onRender();return c},createPanel:function(e){if(!this._.panel){var f=this._.panelDefinition,d=this._.panelDefinition.block,h=f.parent||CKEDITOR.document.getBody(),m="cke_combopanel__"+this.name,b=new CKEDITOR.ui.floatPanel(e,h,f),f=b.addListBlock(this.id,d),g=this;b.onShow=function(){this.element.addClass(m);g.setState(CKEDITOR.TRISTATE_ON);g._.on=1;g.editorFocus&&!e.focusManager.hasFocus&&e.focus();if(g.onOpen)g.onOpen()}; b.onHide=function(b){this.element.removeClass(m);g.setState(g.modes&&g.modes[e.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);g._.on=0;if(!b&&g.onClose)g.onClose()};b.onEscape=function(){b.hide(1)};f.onClick=function(c,a){g.onClick&&g.onClick.call(g,c,a);b.hide()};this._.panel=b;this._.list=f;b.getBlock(this.id).onHide=function(){g._.on=0;g.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(e,f){this._.value=e;var d=this.document.getById("cke_"+this.id+"_text");d&& (e||f?d.removeClass("cke_combo_inlinelabel"):(f=this.label,d.addClass("cke_combo_inlinelabel")),d.setText("undefined"!=typeof f?f:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,f,d){this._.items[e]=d||e;this._.list.add(e,f,d)},startGroup:function(e){this._.list.startGroup(e)}, commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(e){if(this._.state!=e){var f=this.document.getById("cke_"+this.id);f.setState(e,"cke_combo");e==CKEDITOR.TRISTATE_DISABLED?f.setAttribute("aria-disabled",!0):f.removeAttribute("aria-disabled");this._.state=e}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!= CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(e){return new CKEDITOR.ui.richCombo(e)}}}});CKEDITOR.ui.prototype.addRichCombo=function(e,f){this.add(e,CKEDITOR.UI_RICHCOMBO,f)}}(),CKEDITOR.plugins.add("format",{requires:"richcombo",init:function(f){if(!f.blockless){for(var h=f.config,e=f.lang.format,k=h.format_tags.split(";"),d={},l=0,m=[],b=0;b=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);a.attachListener(b,"resize",e);a.attachListener(b,"mode",h);b.on("destroy",h);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({}, l,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},d,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function k(d){var c;if(c=d&&d.type==CKEDITOR.NODE_ELEMENT)c=!(m[d.getComputedStyle("float")]||m[d.getAttribute("align")]);return c&& !b[d.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;f.prototype={start:function(b){var c=this,a=this.editor,d=this.doc,e,f,h,k,l=CKEDITOR.tools.eventsBuffer(50,function(){a.readOnly||"wysiwyg"!=a.mode||(c.relations={},(f=d.$.elementFromPoint(h,k))&&f.nodeType&&(e=new CKEDITOR.dom.element(f),c.traverseSearch(e),isNaN(h+k)||c.pixelSearch(e,h,k),b&&b(c.relations,h,k)))});this.listener=this.editable.attachListener(this.target, "mousemove",function(a){h=a.data.$.clientX;k=a.data.$.clientY;l.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){l.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var b={};b[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;b[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;b[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(c){var a=this.editor.createRange();a.moveToPosition(this.relations[c.uid].element, b[c.type]);return a}}(),store:function(){function b(c,a,d){var e=c.getUniqueId();e in d?d[e].type|=a:d[e]={element:c,type:a}}return function(c,a){var d;a&CKEDITOR.LINEUTILS_AFTER&&k(d=c.getNext())&&d.isVisible()&&(b(d,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_AFTER);a&CKEDITOR.LINEUTILS_INSIDE&&k(d=c.getFirst())&&d.isVisible()&&(b(d,CKEDITOR.LINEUTILS_BEFORE,this.relations),a^=CKEDITOR.LINEUTILS_INSIDE);b(c,a,this.relations)}}(),traverseSearch:function(b){var c,a,d;do if(d=b.$["data-cke-expando"], !(d&&d in this.relations)){if(b.equals(this.editable))break;if(k(b))for(c in this.lookups)(a=this.lookups[c](b))&&this.store(b,a)}while((!b||b.type!=CKEDITOR.NODE_ELEMENT||"true"!=b.getAttribute("contenteditable"))&&(b=b.getParent()))},pixelSearch:function(){function b(a,d,e,f,g){for(var h=0,l;g(e);){e+=f;if(25==++h)break;if(l=this.doc.$.elementFromPoint(d,e))if(l==a)h=0;else if(c(a,l)&&(h=0,k(l=new CKEDITOR.dom.element(l))))return l}}var c=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,b){return a.contains(b)}: function(a,b){return!!(a.compareDocumentPosition(b)&16)};return function(a,c,d){var e=this.win.getViewPaneSize().height,f=b.call(this,a.$,c,d,-1,function(a){return 0this.rect.bottom)return!1;this.inline? e.left=a.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 l(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 m(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();dCKEDITOR.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)&&l(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 E(a,b,c){var d=0;b=L(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 H(a){a.cancel()}function G(a,b){var c=a.editor,d=c.document,e=CKEDITOR.env.edge&&16<=CKEDITOR.env.version;if(!d.getById("cke_copybin")){var f=!c.blockless&&!CKEDITOR.env.ie||e?"div":"span",e=d.createElement(f),g=d.createElement(f),f=CKEDITOR.env.ie&&9>CKEDITOR.env.version;g.setAttributes({id:"cke_copybin","data-cke-temp":"1"});e.setStyles({position:"absolute",width:"1px",height:"1px", overflow:"hidden"});e.setStyle("ltr"==c.config.contentsLangDirection?"left":"right","-5000px");var h=c.createRange();h.setStartBefore(a.wrapper);h.setEndAfter(a.wrapper);e.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+c.editable().getHtmlFromRange(h).getHtml()+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("saveSnapshot");c.fire("lockSnapshot");g.append(e);c.editable().append(g);var k=c.on("selectionChange",H,null,null,0),l=a.repository.on("checkSelection",H, null,null,0);if(f)var m=d.getDocumentElement().$,q=m.scrollTop;h=c.createRange();h.selectNodeContents(e);h.select();f&&(m.scrollTop=q);setTimeout(function(){b||a.focus();g.remove();k.removeListener();l.removeListener();c.fire("unlockSnapshot");b&&!c.readOnly&&(a.repository.del(a),c.fire("saveSnapshot"))},100)}}function L(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function O(){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 D(){CKEDITOR.env.gecko&&this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function S(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 J(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 R(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)"}),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",K,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart", function(a){a.data.preventDefault(!0)});a.dragHandlerContainer=c}}function K(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 q=c.greedySearch(),r=CKEDITOR.tools.eventsBuffer(50,function(){l=d.locate(q);k=d.sort(m,1);k.length&&(e.prepare(q,l),e.placeLine(k[0]),e.cleanup())});g.addClass("cke_widget_dragging");h.push(g.on("mousemove",function(a){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 U(a){var b,c,d=a.editables;a.editables={};if(a.editables)for(b in d)c=d[b],a.initEditable(b,"string"==typeof c?{selector:c}:c)}function X(a){if(a.mask){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 Y(a){if(a.parts){var b={},c,d;for(d in a.parts)c=a.wrapper.findOne(a.parts[d]), b[d]=c;a.parts=b}}function Z(a,b){M(a);Y(a);U(a);X(a);R(a);S(a);J(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){G(a,b==CKEDITOR.CTRL+88);return}if(b in T||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 M(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function Q(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function N(){function a(){}function b(a,c,d){return d&&this.checkElement(a)?(a=d.widgets.getByElement(a,!0))&&a.checkStyleActive(this):!1}var c={};CKEDITOR.style.addCustomHandler({type:"widget", setup:function(a){this.widget=a.widget;if(this.group="string"==typeof a.group?[a.group]:a.group){a=this.widget;var b;c[a]||(c[a]={});for(var d=0,e=this.group.length;d)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, T={37:1,38:1,39:1,40:1,8:1,46:1};CKEDITOR.plugins.widget=h;h.repository=f;h.nestedEditable=e}(),"use strict",function(){function f(b){function d(){this.deflated||(b.widgets.focused==this.widget&&(this.focused=!0),b.widgets.destroy(this.widget),this.deflated=!0)}function f(){var a=b.editable(),c=b.document;if(this.deflated)this.widget=b.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,a)).block&&(a=c.createElement(b.activeEnterMode== CKEDITOR.ENTER_P?"p":"div"),a.replace(this.widget.wrapper),this.widget.wrapper.move(a)),this.focused&&(this.widget.focus(),delete this.focused),delete this.deflated;else{var d=this.widget,a=g,c=d.wrapper,e=d.data.align,d=d.data.hasCaption;if(a){for(var h=3;h--;)c.removeClass(a[h]);"center"==e?d&&c.addClass(a[1]):"none"!=e&&c.addClass(a[v[e]])}else"center"==e?(d?c.setStyle("text-align","center"):c.removeStyle("text-align"),c.removeStyle("float")):("none"==e?c.removeStyle("float"):c.setStyle("float", e),c.removeStyle("text-align"))}}var g=b.config.image2_alignClasses,k=b.config.image2_captionedClass;return{allowedContent:c(b),requiredContent:"img[src,alt]",features:a(b),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var a=this.features; this.data.hasCaption&&!b.filter.checkFeature(a.caption)&&(this.data.hasCaption=!1);"none"==this.data.align||b.filter.checkFeature(a.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:d,inflate:f});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 c in this.data.classes)this.parts.image.removeClass(c);if(b.filter.checkFeature(a.dimension)){a=this.data;a={width:a.width,height:a.height};c=this.parts.image;for(var e in a)a[e]?c.setAttribute(e,a[e]):c.removeAttribute(e)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var a=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?a.checkHasNaturalRatio(c):!0},e=c.getAscendant("a");e&&this.wrapper.contains(e)&&(this.parts.link=e);d.align||(c=d.hasCaption?this.element:c,g?(c.hasClass(g[0])?d.align="left":c.hasClass(g[2])&&(d.align="right"),d.align?c.removeClass(g[v[d.align]]):d.align="none"):(d.align=c.getStyle("float")||"none",c.removeStyle("float")));b.plugins.link&&this.parts.link&&(d.link=a.getLinkAttributesParser()(b,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);b.filter.checkFeature(this.features.dimension)&&!0!==b.config.image2_disableResizer&&1!=b.readOnly&&l(this);this.shiftState=a.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});this.on("dialog", function(a){a.data.widget=this},this)},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,g).join("|")+")$");return function(){var b=this.repository.parseElementClasses(n(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:h(b),downcast:e(b),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt|| "")+" "+this.pathName)}}}function h(a){var b=k(a),c=a.config.image2_captionedClass;return function(a,e){var f={width:1,height:1},g=a.name,h;if(!a.attributes["data-cke-realelement"]&&(b(a)?("div"==g&&(h=a.getFirst("figure"))&&(a.replaceWith(h),a=h),e.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==g&&a.hasClass(c)?h=a.getFirst("img")||a.getFirst("a").getFirst("img"):d(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var k in f)(f=h.attributes[k])&&f.match(t)&&delete h.attributes[k]; return a}}}function e(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[v[e]]):f["float"]=e),b||CKEDITOR.tools.isEmpty(f)|| (d.style=CKEDITOR.tools.writeCssText(f)));return a}}function k(a){var b=a.config.image2_captionedClass,c=a.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(!d(g))return!1}else if("figure"==g.name){if(!g.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!d(g))return!1;return(c?f.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(f.attributes.style|| "",!0)["text-align"])?!0:!1}}function d(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function l(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(){U=t+m*Z;X=Math.round(U/y)}function k(){X=B-M;U=Math.round(X*y)}var l=a.parts.image,m="right"==a.data.align?-1:1,n=f.data.$.screenX,u=f.data.$.screenY,t=l.$.clientWidth,B=l.$.clientHeight,y=t/B,w=[],v="cke_image_s"+(~m?"e":"w"),K,U,X,Y,Z,M,Q;b.fire("saveSnapshot");g("mousemove", function(a){K=a.data.$;Z=K.screenX-n;M=u-K.screenY;Q=Math.abs(Z/M);1==m?0>=Z?0>=M?h():Q>=y?h():k():0>=M?Q>=y?k():h():k():0>=Z?0>=M?Q>=y?k():h():k():0>=M?h():Q>=y?h():k();15<=U&&15<=X?(l.setAttributes({width:U,height:X}),Y=!0):Y=!1},w);g("mouseup",function(){for(var d;d=w.pop();)d.removeListener();c.removeClass(v);e.removeClass("cke_image_resizing");Y&&(a.setData({width:U,height:X}),b.fire("saveSnapshot"));Y=!1},w);c.addClass(v);e.addClass("cke_image_resizing")});a.on("data",function(){e["right"== a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function m(a){var b=[],c;return function(d){var e=a.getCommand("justify"+d);if(e){b.push(function(){e.refresh(a,a.elementPath())});if(d in{right:1,left:1,center:1})e.on("exec",function(c){var e=g(a);if(e){e.setData("align",d);for(e=b.length;e--;)b[e]();c.cancel()}});e.on("refresh",function(b){var e=g(a),f={right:1,left:1,center:1};e&&(void 0===c&&(c=a.filter.checkFeature(a.widgets.registered.image.features.align)),c?this.setState(e.data.align== d?CKEDITOR.TRISTATE_ON:d in f?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}}function b(a){a.plugins.link&&(CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var c=b.onShow,d=b.onOk;b.onShow=function(){var b=g(a),d=this.getContentElement("info","linkDisplayText").getElement().getParent().getParent();b&&(b.inline?!b.wrapper.getAscendant("a"):1)?(this.setupContent(b.data.link||{}),d.hide()):(d.show(),c.apply(this, arguments))};b.onOk=function(){var b=g(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var c={};this.commitContent(c);b.setData("link",c)}else d.apply(this,arguments)}}}),a.getCommand("unlink").on("exec",function(b){var c=g(a);c&&c.parts.link&&(c.setData("link",null),this.refresh(a,a.elementPath()),b.cancel())}),a.getCommand("unlink").on("refresh",function(b){var c=g(a);c&&(this.setState(c.data.link||c.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())}))} function g(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function c(a){var b=a.config.image2_alignClasses;a={div:{match:k(a)},p:{match:k(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 a(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 w=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),v={left:0,center:1,right:2},t=/^\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_widget_wrapper\x3ea{display:inline-block}")}, init:function(a){if(!a.plugins.detectConflict("image2",["easyimage"])){var b=a.config,c=a.lang.image2,d=f(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;d.pathName=c.pathName;d.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",d);a.ui.addButton&&a.ui.addButton("Image",{label:a.lang.common.image,command:"image",toolbar:"insert,10"});a.contextMenu&&(a.addMenuGroup("image",10),a.addMenuItem("image",{label:c.menu,command:"image", group:"image"}));CKEDITOR.dialog.add("image2",this.path+"dialogs/image2.js")}},afterInit:function(a){var c={left:1,right:1,center:1,block:1},d=m(a),e;for(e in c)d(e);b(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(w.output({captionedClass:f,captionPlaceholder:a.lang.image2.captionPlaceholder}),d),c(g,b.element),e.replace(g.findOne("img")),b.element=g):(e.replace(b.element),b.element=e))},link:function(b,c,e){if(b.changed.link){var f=b.element.is("img")? 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;cm.length)return!1;h=g.getParents(!0);for(l=0;lu;l++)t[l].indent+=h;h=CKEDITOR.plugins.list.arrayToList(t,a,null,b.config.enterMode,g.getDirection());if(!c.isIndent){var z;if((z=g.getParent())&&z.is("li"))for(var m=h.listNode.getChildren(),v=[],F,l=m.count()-1;0<=l;l--)(F=m.getItem(l))&& F.is&&F.is("li")&&v.push(F)}h&&h.listNode.replace(g);if(v&&v.length)for(l=0;le[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 h(a,b){this.name=a;this.context=this.type=b;this.allowedContent=b+" li";this.requiredContent=b}function e(a,b,c,d){for(var e,f;e=a[d?"getLast":"getFirst"](v);)(f=e.getDirection(1))!== b.getDirection(1)&&e.setAttribute("dir",f),e.remove(),c?e[d?"insertBefore":"insertAfter"](c):b.append(e,d)}function k(b){function c(d){var f=b[d?"getPrevious":"getNext"](a);f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is(b.getName())&&(e(b,f,null,!d),b.remove(),b=f)}c();c(1)}function d(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,c,d){b.fire("saveSnapshot");d.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS); var f=d.extractContents();c.trim(!1,!0);var g=c.createBookmark(),h=new CKEDITOR.dom.elementPath(c.startContainer),l=h.block,h=h.lastElement.getAscendant("li",1)||l,u=new CKEDITOR.dom.elementPath(d.startContainer),y=u.contains(CKEDITOR.dtd.$listItem),u=u.contains(CKEDITOR.dtd.$list);l?(l=l.getBogus())&&l.remove():u&&(l=u.getPrevious(a))&&n(l)&&l.remove();(l=f.getLast())&&l.type==CKEDITOR.NODE_ELEMENT&&l.is("br")&&l.remove();(l=c.startContainer.getChild(c.startOffset))?f.insertBefore(l):c.startContainer.append(f); y&&(f=m(y))&&(h.contains(y)?(e(f,y.getParent(),y),f.remove()):h.append(f));for(;d.checkStartOfBlock()&&d.checkEndOfBlock();){u=d.startPath();f=u.block;if(!f)break;f.is("li")&&(h=f.getParent(),f.equals(h.getLast(a))&&f.equals(h.getFirst(a))&&(f=h));d.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START);f.remove()}d=d.clone();f=b.editable();d.setEndAt(f,CKEDITOR.POSITION_BEFORE_END);d=new CKEDITOR.dom.walker(d);d.evaluator=function(b){return a(b)&&!n(b)};(d=d.next())&&d.type==CKEDITOR.NODE_ELEMENT&&d.getName()in CKEDITOR.dtd.$list&&k(d);c.moveToBookmark(g);c.select();b.fire("saveSnapshot")}function m(c){return(c=c.getLast(a))&&c.type==CKEDITOR.NODE_ELEMENT&&c.getName()in b?c:null}var b={ol:1,ul:1},g=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(),a=function(a){return!(g(a)||c(a))},n=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(a,c,d,e,f){if(!b[a.getName()])return[];e||(e=0);d||(d=[]);for(var g=0,h=a.getChildCount();g=l.$.documentMode&&w.append(l.createText(" ")),w.append(x.listNode),x=x.nextIndex;else if(-1==G.indent&&!f&&k){b[k.getName()]?(w=G.element.clone(!1,!0),v!=k.getDirection(1)&&w.setAttribute("dir",v)):w=new CKEDITOR.dom.documentFragment(l); var n=k.getDirection(1)!=v,L=G.element,O=L.getAttribute("class"),D=L.getAttribute("style"),S=w.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(g!=CKEDITOR.ENTER_BR||n||D||O),J,R=G.contents.length,K;for(k=0;kn.length)){v=n[n.length-1].getNext();E=g.createElement(this.type);y.push(E);for(H=y=void 0;n.length;)y=n.shift(),H=g.createElement("li"), G=y,G.is("pre")||w.test(G.getName())||"false"==G.getAttribute("contenteditable")?y.appendTo(H):(y.copyAttributes(H),x&&y.getDirection()&&(H.removeStyle("direction"),H.removeAttribute("dir")),y.moveChildren(H),y.remove()),H.appendTo(E);x&&z&&E.setAttribute("dir",x);v?E.insertBefore(v):E.appendTo(l)}}else this.state==CKEDITOR.TRISTATE_ON&&b[x.root.getName()]&&f.call(this,c,x,m);for(E=0;Eb&&aE.version?" ":X,f=a.hotNode&&a.hotNode.getText()==e&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!b;g(a,function(c){f&& a.hotNode&&a.hotNode.remove();c[b?"insertAfter":"insertBefore"](d);c.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!b});a.lastCmdDirection=!!b});E.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(f){f=f.getSelection().getStartElement();var g;f=f.getAscendant(Q,1);if(!p(a,f)&&f&&!f.equals(a.editable)&&!f.contains(a.editable)){(g=m(f))&&"false"==g.getAttribute("contenteditable")&&(f=g);a.element=f;g=d(a,f,!b);var h;n(g)&&g.is(a.triggers)&& g.is(M)&&(!d(a,g,!b)||(h=d(a,g,!b))&&n(h)&&h.is(a.triggers))?c(g):(h=e(a,f),n(h)&&(d(a,h,!b)?(f=d(a,h,!b))&&n(f)&&f.is(a.triggers)&&c(h):c(h)))}}}()}}function a(a,b){if(!b||b.type!=CKEDITOR.NODE_ELEMENT||!b.$)return!1;var c=a.line;return c.wrap.equals(b)||c.wrap.contains(b)}function n(a){return a&&a.type==CKEDITOR.NODE_ELEMENT&&a.$}function w(a){if(!n(a))return!1;var b;(b=v(a))||(n(a)?(b={left:1,right:1,center:1},b=!(!b[a.getComputedStyle("float")]&&!b[a.getAttribute("align")])):b=!1);return b}function v(a){return!!{absolute:1, fixed:1}[a.getComputedStyle("position")]}function t(a,b){return n(b)?b.is(a.triggers):null}function p(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 q(a,b,c){b=b[c?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(Z)});if(!b)return!1;B(a,b);return c?b.size.top>a.mouse.y:b.size.bottom (b.inInlineMode?e.editable.top+e.editable.height/2:Math.min(e.editable.height,e.pane.height)/2),c=c[g?"getLast":"getFirst"](function(a){return!(ba(a)||ca(a))});if(!c)return null;a(b,c)&&(c=b.line.wrap[g?"getPrevious":"getNext"](function(a){return!(ba(a)||ca(a))}));if(!n(c)||w(c)||!t(b,c))return null;B(b,c);return!g&&0<=c.size.top&&l(d.y,0,c.size.top+f)?(b=b.inInlineMode||0===e.scroll.y?R:U,new h([null,c,O,J,b])):g&&c.size.bottom<=e.pane.height&&l(d.y,c.size.bottom-f,e.pane.height)?(b=b.inInlineMode|| l(c.size.bottom,e.pane.height-f,e.pane.height)?K:U,new h([c,null,D,J,b])):null}function r(a){var b=a.mouse,c=a.view,f=a.triggerOffset,g=e(a);if(!g)return null;B(a,g);var f=Math.min(f,0|g.size.outerHeight/2),k=[],m,r;if(l(b.y,g.size.top-1,g.size.top+f))r=!1;else if(l(b.y,g.size.bottom-f,g.size.bottom+1))r=!0;else return null;if(w(g)||q(a,g,r)||g.getParent().is(Y))return null;var p=d(a,g,!r);if(p){if(p&&p.type==CKEDITOR.NODE_TEXT)return null;if(n(p)){if(w(p)||!t(a,p)||p.getParent().is(Y))return null; k=[p,g][r?"reverse":"concat"]().concat([S,J])}}else g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?(u(a),r&&l(b.y,g.size.bottom-f,c.pane.height)&&l(g.size.bottom,c.pane.height-f,c.pane.height)?m=K:l(b.y,0,g.size.top+f)&&(m=R)):m=U,k=[null,g][r?"reverse":"concat"]().concat([r?D:O,J,m,g.equals(a.editable[r?"getLast":"getFirst"](a.isRelevant))?r?K:R:U]);return 0 in k?new h(k):null}function C(a,b,c,d){for(var e=b.getDocumentPosition(),f={},g={},h={},k={},l=da.length;l--;)f[da[l]]=parseInt(b.getComputedStyle.call(b, "border-"+da[l]+"-width"),10)||0,h[da[l]]=parseInt(b.getComputedStyle.call(b,"padding-"+da[l]),10)||0,g[da[l]]=parseInt(b.getComputedStyle.call(b,"margin-"+da[l]),10)||0;c&&!d||y(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 z({border:f,padding:h,margin:g,ignoreScroll:c},k,!0)}function B(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-N)return null;return z(b.size,C(a,b,c),{date:+new Date},!0)}function u(a,b){a.view.editable=C(a,a.editable,b,!0)}function y(a,b){a.view||(a.view={});var c=a.view;if(!(!b&&c&&c.date>new Date-N)){var d=a.win,c=d.getScrollPosition(),d=d.getViewPaneSize();z(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 x(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+gc.left-d.x&&bc.top-d.y&&aCKEDITOR.env.version, G=CKEDITOR.dtd,L={},O=128,D=64,S=32,J=16,R=4,K=2,U=1,X=" ",Y=G.$listItem,Z=G.$tableContent,M=z({},G.$nonEditable,G.$empty),Q=G.$block,N=100,V="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;",T=V+"border-color:transparent;display:block;border-style:solid;",P="\x3cspan\x3e"+X+"\x3c/span\x3e";L[CKEDITOR.ENTER_BR]="br";L[CKEDITOR.ENTER_P]="p";L[CKEDITOR.ENTER_DIV]="div";h.prototype={set:function(a,b,c){this.properties= a+b+(c||U);return this},is:function(a){return(this.properties&a)==a}};var W=function(){function b(a,c){var d=a.$.elementFromPoint(c.x,c.y);return d&&d.nodeType?new CKEDITOR.dom.element(d):null}return function(c,d,e){if(!c.mouse)return null;var f=c.doc,g=c.line.wrap;e=e||c.mouse;var h=b(f,e);d&&a(c,h)&&(g.hide(),h=b(f,e),g.show());return!h||h.type!=CKEDITOR.NODE_ELEMENT||!h.$||E.ie&&9>E.version&&!c.boundary.equals(h)&&!c.boundary.contains(h)?null:h}}(),ba=CKEDITOR.dom.walker.whitespaces(),ca=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT), aa=function(){function b(a){var d=a.element,e,g,h;if(!n(d)||d.contains(a.editable)||d.isReadOnly())return null;h=x(a,function(a,b){return!b.equals(a)},function(a,b){return W(a,!0,b)},d);e=h.upper;g=h.lower;if(f(a,e,g))return h.set(S,8);if(e&&d.contains(e))for(;!e.getParent().equals(d);)e=e.getParent();else e=d.getFirst(function(b){return c(a,b)});if(g&&d.contains(g))for(;!g.getParent().equals(d);)g=g.getParent();else g=d.getLast(function(b){return c(a,b)});if(!e||!g)return null;B(a,e);B(a,g);if(!l(a.mouse.y, e.size.top,g.size.bottom))return null;for(var d=Number.MAX_VALUE,m,q,u,r;g&&!g.equals(e)&&(q=e.getNext(a.isRelevant));)m=Math.abs(k(a,e,q)-a.mouse.y),m|<\/font>)/,c=/CKEDITOR.env.version),g=b?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",c,a; for(e=k=d=l="";c=f.pop();)a=f.length?",":"",e+=".cke_show_blocks "+c+g+a,d+=".cke_show_blocks.cke_contents_ltr "+c+g+a,l+=".cke_show_blocks.cke_contents_rtl "+c+g+a,k+=".cke_show_blocks "+c+g+"{background-image:url("+CKEDITOR.getUrl(m+"images/block_"+c+".png")+")}";CKEDITOR.addCss((e+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(k,d+"{background-position:top left;padding-left:8px}",l+"{background-position:top right;padding-right:8px}"));b||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 e(){k.refresh(h)}if(!h.blockless){var k=h.addCommand("showblocks",f);k.canUndo=!1;h.config.startupOutlineBlocks&&k.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(){k.state!=CKEDITOR.TRISTATE_DISABLED&&k.refresh(h)});h.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(h.on("focus",e),h.on("blur",e));h.on("contentDom",function(){k.state!=CKEDITOR.TRISTATE_DISABLED&& k.refresh(h)})}}})}(),function(){var f={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(f){this.toggleState();this.refresh(f)},refresh:function(f){if(f.document){var e=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";f.editable()[e]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var f;f=(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(f)},init:function(h){var e=h.addCommand("showborders",f);e.canUndo=!1;!1!==h.config.startupShowBorders&&e.setState(CKEDITOR.TRISTATE_ON);h.on("mode",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)},null,null,100);h.on("contentDom",function(){e.state!=CKEDITOR.TRISTATE_DISABLED&&e.refresh(h)});h.on("removeFormatCleanup",function(e){e=e.data;h.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&e.is("table")&&(!e.hasAttribute("border")|| 0>=parseInt(e.getAttribute("border"),10))&&e.addClass("cke_show_border")})},afterInit:function(f){var e=f.dataProcessor;f=e&&e.dataFilter;e=e&&e.htmlFilter;f&&f.addRules({elements:{table:function(e){e=e.attributes;var d=e["class"],f=parseInt(e.border,10);f&&!(0>=f)||d&&-1!=d.indexOf("cke_show_border")||(e["class"]=(d||"")+" cke_show_border")}}});e&&e.addRules({elements:{table:function(e){e=e.attributes;var d=e["class"];d&&(e["class"]=d.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/, ""))}}})}});CKEDITOR.on("dialogDefinition",function(f){var e=f.data.name;if("table"==e||"tableProperties"==e)if(f=f.data.definition,e=f.getContents("info").get("txtBorder"),e.commit=CKEDITOR.tools.override(e.commit,function(e){return function(d,f){e.apply(this,arguments);var h=parseInt(this.getValue(),10);f[!h||0>=h?"addClass":"removeClass"]("cke_show_border")}}),f=(f=f.getContents("advanced"))&&f.get("advCSSClasses"))f.setup=CKEDITOR.tools.override(f.setup,function(e){return function(){e.apply(this, arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),f.commit=CKEDITOR.tools.override(f.commit,function(e){return function(d,f){e.apply(this,arguments);parseInt(f.getAttribute("border"),10)||f.addClass("cke_show_border")}})})}(),function(){CKEDITOR.plugins.add("sourcearea",{init:function(h){function e(){var e=d&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+ "px");this.show();e&&this.focus()}if(h.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var k=CKEDITOR.plugins.sourcearea;h.addMode("source",function(d){var k=h.ui.space("contents").getDocument().createElement("textarea");k.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)));k.setAttribute("dir","ltr");k.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu"); h.ui.space("contents").append(k);k=h.editable(new f(h,k));k.setData(h.getData(1));CKEDITOR.env.ie&&(k.attachListener(h,"resize",e,k),k.attachListener(CKEDITOR.document.getWindow(),"resize",e,k),CKEDITOR.tools.setTimeout(e,0,k));h.fire("ariaWidget",this);d()});h.addCommand("source",k.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 d=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var f=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(f){this.setValue(f);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()},insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(f){this[(f?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){f.baseProto.detach.call(this);this.clearCustomData(); this.remove()}}})}(),CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(f){"wysiwyg"==f.mode&&f.fire("saveSnapshot");f.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);f.setMode("source"==f.mode?"wysiwyg":"source")},canUndo:!1}}},CKEDITOR.plugins.add("sourcedialog",{requires:"dialog",init:function(f){f.addCommand("sourcedialog",new CKEDITOR.dialogCommand("sourcedialog"));CKEDITOR.dialog.add("sourcedialog",this.path+"dialogs/sourcedialog.js"); f.ui.addButton&&f.ui.addButton("Sourcedialog",{label:f.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,sv:1,th:1,tr:1,tt:1,ug:1,uk:1,vi:1,zh:1,"zh-cn":1}, requires:"dialog",init:function(f){var h=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");f.addCommand("specialchar",{exec:function(){var e=f.langCode,e=h.availableLangs[e]?e:h.availableLangs[e.replace(/-.*/,"")]?e.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(h.path+"dialogs/lang/"+e+".js"),function(){CKEDITOR.tools.extend(f.lang.specialchar,h.langEntries[e]);f.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});f.ui.addButton&&f.ui.addButton("SpecialChar", {label:f.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(f){var h=f.config,e=f.lang.stylescombo,k={},d=[],l=[];f.on("stylesSet",function(e){if(e=e.data.styles){for(var b,g,c,a=0,n=e.length;a=e)for(b=this.getNextSourceNode(f,CKEDITOR.NODE_ELEMENT);b;){if(b.isVisible()&&0===b.getTabIndex()){l=b;break}b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(b=this.getDocument().getBody().getFirst();b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!k)if(!d&&b.equals(this)){if(d=!0,f){if(!(b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;k=1}}else d&&!this.contains(b)&&(k=1);if(b.isVisible()&&!(0>(g=b.getTabIndex()))){if(k&&g==e){l= b;break}g>e&&(!l||!m||g(b=g.getTabIndex())))if(0>=e){if(k&&0===b){l=g;break}b>m&& (l=g,m=b)}else{if(k&&b==e){l=g;break}bm)&&(l=g,m=b)}}l&&l.focus()},CKEDITOR.plugins.add("table",{requires:"dialog",init:function(f){function h(e){return CKEDITOR.tools.extend(e||{},{contextSensitive:1,refresh:function(d,e){this.setState(e.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!f.blockless){var e=f.lang.table;f.addCommand("table",new CKEDITOR.dialogCommand("table",{context:"table",allowedContent:"table{width,height}[align,border,cellpadding,cellspacing,summary];caption tbody thead tfoot;th td tr[scope];"+ (f.plugins.dialogadvtab?"table"+f.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(e){if(e.styles){var d;if(e.styles.border)d=CKEDITOR.tools.style.parse.border(e.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var f=e.styles;f["border-left"]&&f["border-left"]===f["border-right"]&&f["border-right"]===f["border-top"]&& f["border-top"]===f["border-bottom"]&&(d=CKEDITOR.tools.style.parse.border(f["border-top"]))}d&&d.style&&"solid"===d.style&&d.width&&0!==parseFloat(d.width)&&(e.attributes.border=1);"collapse"==e.styles["border-collapse"]&&(e.attributes.cellspacing=0)}}}]]}));f.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",h()));f.addCommand("tableDelete",h({exec:function(e){var d=e.elementPath().contains("table",1);if(d){var f=d.getParent(),h=e.editable();1!=f.getChildCount()||f.is("td", "th")||f.equals(h)||(d=f);e=e.createRange();e.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();e.select()}}}));f.ui.addButton&&f.ui.addButton("Table",{label:e.toolbar,command:"table",toolbar:"insert,30"});CKEDITOR.dialog.add("table",this.path+"dialogs/table.js");CKEDITOR.dialog.add("tableProperties",this.path+"dialogs/table.js");f.addMenuItems&&f.addMenuItems({table:{label:e.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:e.deleteTable,command:"tableDelete",group:"table", order:1}});f.on("doubleclick",function(e){e.data.element.is("table")&&(e.data.dialog="tableProperties")});f.contextMenu&&f.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}}),function(){function f(a,b){function c(a){return b?b.contains(a)&&a.getAscendant("table",!0).equals(b):!0}function d(a){0c)c=e}return c}function l(a,b){for(var c=p(a)?a:f(a),e=c[0].getAscendant("table"),g=d(c,1),c=d(c),h=b?g:c,k=CKEDITOR.tools.buildTableMap(e),e=[],g=[],c=[],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(d.$.parentNode);m.length==a&&(c[0].moveToPosition(d,CKEDITOR.POSITION_AFTER_END),c[0].select(),d.remove());return k}function b(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 g(a){if(a instanceof CKEDITOR.dom.selection){var b= a.getRanges(),d=f(a),e=d[0]&&d[0].getAscendant("table"),h;a:{var k=0;h=d.length-1;for(var l={},m,n;m=d[k++];)CKEDITOR.dom.element.setMarker(l,m,"delete_cell",!0);for(k=0;m=d[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=d[0].getParent();(k=k.getPrevious())?h=k.getLast():(k=d[h].getParent(),h=(k=k.getNext())?k.getChild(0):null)}a.reset();for(a= d.length-1;0<=a;a--)g(d[a]);h?c(h,!0):e&&(b[0].moveToPosition(e,CKEDITOR.POSITION_BEFORE_START),b[0].select(),e.remove())}else a instanceof CKEDITOR.dom.element&&(b=a.getParent(),1==b.getChildCount()?b.remove():a.remove())}function c(a,b){var c=a.getDocument(),d=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&&(d.focus(),c.focus());c=new CKEDITOR.dom.range(c);c["moveToElementEdit"+(b?"End":"Start")](a)||(c.selectNodeContents(a),c.collapse(b?!1:!0));c.select(!0)}function a(a,b,c){a=a[b]; if("undefined"==typeof c)return a;for(b=0;a&&be.length)||(g=b.getCommonAncestor())&&g.type==CKEDITOR.NODE_ELEMENT&&g.is("table"))return!1;var h;b=e[0];g=b.getAscendant("table");var k=CKEDITOR.tools.buildTableMap(g),l=k.length,m=k[0].length,n=b.getParent().$.rowIndex,p=a(k,n,b);if(c){var t;try{var v=parseInt(b.getAttribute("rowspan"),10)||1; h=parseInt(b.getAttribute("colspan"),10)||1;t=k["up"==c?n-v:"down"==c?n+v:n]["left"==c?p-h:"right"==c?p+h:p]}catch(w){return!1}if(!t||b.$==t)return!1;e["up"==c||"left"==c?"unshift":"push"](new CKEDITOR.dom.element(t))}c=b.getDocument();var L=n,v=t=0,O=!d&&new CKEDITOR.dom.documentFragment(c),D=0;for(c=0;c=m?b.removeAttribute("rowSpan"):b.$.rowSpan=t;t>=l?b.removeAttribute("colSpan"):b.$.colSpan=v;d=new CKEDITOR.dom.nodeList(g.$.rows);e=d.count();for(c=e-1;0<=c;c--)g=d.getItem(c),g.$.cells.length||(g.remove(),e++);return b} function w(b,c){var d=f(b);if(1l){e.insertBefore(new CKEDITOR.dom.element(p));break}else p=null;p||g.append(e)}else for(m=n=1,g=e.clone(),g.insertAfter(e),g.append(e=d.clone()), p=a(h,k),l=0;lk);n++){m[l+n]||(m[l+n]=[]);for(var w=0;w=d)break}}return m},function(){function f(b){return CKEDITOR.env.ie?b.$.clientWidth:parseInt(b.getComputedStyle("width"),10)}function h(b,c){var a=b.getComputedStyle("border-"+c+"-width"),d={thin:"0px",medium:"1px",thick:"2px"};0>a.indexOf("px")&&(a=a in d&&"none"!=b.getComputedStyle("border-style")? d[a]:0);return parseInt(a,10)}function e(b){var c=[],a={},d="rtl"==b.getComputedStyle("direction");CKEDITOR.tools.array.forEach(b.$.rows,function(e,f){var k=-1,l=0,m=null;e?(l=new CKEDITOR.dom.element(e),m={height:l.$.offsetHeight,position:l.getDocumentPosition()}):m=void 0;for(var l=m.height,m=m.position,A=0,r=e.cells.length;A=t.x&&a<=t.x+t.width&&c>=t.y&&c<=t.y+t.height))return t= null,A=C=0,p.removeListener("mouseup",l),q.removeListener("mousedown",e),q.removeListener("mousemove",v),p.getBody().setStyle("cursor","auto"),b?q.remove():q.hide(),0;var d=a-Math.round(q.$.offsetWidth/2);if(A){if(d==x||d==z)return 1;d=Math.max(d,x);d=Math.min(d,z);C=d-r}q.setStyle("left",m(d));return 1}}function l(b){var c=b.data.getTarget();if("mouseout"==b.name){if(!c.is("table"))return;for(var a=new CKEDITOR.dom.element(b.data.$.relatedTarget||b.data.$.toElement);a&&a.$&&!a.equals(c)&&!a.is("body");)a= a.getParent();if(!a||a.equals(c))return}c.getAscendant("table",1).removeCustomData("_cke_table_pillars");b.removeListener()}var m=CKEDITOR.tools.cssLength,b=CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks);CKEDITOR.plugins.add("tableresize",{requires:"tabletools",init:function(b){b.on("contentDom",function(){var c,a=b.editable();a.attachListener(a.isInline()?a:b.document,"mousemove",function(a){a=a.data;var f=a.getTarget();if(f.type==CKEDITOR.NODE_ELEMENT){var h=a.getPageOffset().x, m=a.getPageOffset().y;if(c&&c.move(h,m))k(a);else if(f.is("table")||f.getAscendant({thead:1,tbody:1,tfoot:1},1))if(a=f.getAscendant("table",1),b.editable().contains(a)){(f=a.getCustomData("_cke_table_pillars"))||(a.setCustomData("_cke_table_pillars",f=e(a)),a.on("mouseout",l),a.on("mousedown",l));a:{a=f;for(var f=0,p=a.length;f=q.x&&h<=q.x+q.width&&m>=q.y&&m<=q.y+q.height){h=q;break a}}h=null}h&&(!c&&(c=new d(b)),c.attachTo(h))}}})})}})}(),"use strict",function(){var f=[CKEDITOR.CTRL+ 90,CKEDITOR.CTRL+89,CKEDITOR.CTRL+CKEDITOR.SHIFT+90],h={8:1,46:1};CKEDITOR.plugins.add("undo",{init:function(b){function d(b){a.enabled&&!1!==b.data.command.canUndo&&a.save()}function c(){a.enabled=b.readOnly?!1:"wysiwyg"==b.mode;a.onChange()}var a=b.undoManager=new e(b),h=a.editingHandler=new l(a),k=b.addCommand("undo",{exec:function(){a.undo()&&(b.selectionChange(),this.fire("afterUndo"))},startDisabled:!0,canUndo:!1}),m=b.addCommand("redo",{exec:function(){a.redo()&&(b.selectionChange(),this.fire("afterRedo"))}, startDisabled:!0,canUndo:!1});b.setKeystroke([[f[0],"undo"],[f[1],"redo"],[f[2],"redo"]]);a.onChange=function(){k.setState(a.undoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);m.setState(a.redoable()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)};b.on("beforeCommandExec",d);b.on("afterCommandExec",d);b.on("saveSnapshot",function(b){a.save(b.data&&b.data.contentOnly)});b.on("contentDom",h.attachListeners,h);b.on("instanceReady",function(){b.fire("saveSnapshot")});b.on("beforeModeUnload", function(){"wysiwyg"==b.mode&&a.save(!0)});b.on("mode",c);b.on("readOnly",c);b.ui.addButton&&(b.ui.addButton("Undo",{label:b.lang.undo.undo,command:"undo",toolbar:"undo,10"}),b.ui.addButton("Redo",{label:b.lang.undo.redo,command:"redo",toolbar:"undo,20"}));b.resetUndo=function(){a.reset();b.fire("saveSnapshot")};b.on("updateSnapshot",function(){a.currentImage&&a.update()});b.on("lockSnapshot",function(b){b=b.data;a.lock(b&&b.dontUpdate,b&&b.forceUpdate)});b.on("unlockSnapshot",a.unlock,a)}});CKEDITOR.plugins.undo= {};var e=CKEDITOR.plugins.undo.UndoManager=function(b){this.strokesRecorded=[0,0];this.locked=null;this.previousKeyGroup=-1;this.limit=b.config.undoStackSize||20;this.strokesLimit=25;this.editor=b;this.reset()};e.prototype={type:function(b,d){var c=e.getKeyGroup(b),a=this.strokesRecorded[c]+1;d=d||a>=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());d?(a=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]=a;this.previousKeyGroup= c},keyGroupChanged:function(b){return e.getKeyGroup(b)!=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,c){var a=this.editor;if(this.locked||"ready"!=a.status|| "wysiwyg"!=a.mode)return!1;var e=a.editable();if(!e||"ready"!=e.status)return!1;e=this.snapshots;d||(d=new k(a));if(!1===d.contents)return!1;if(this.currentImage)if(d.equalsContent(this.currentImage)){if(b||d.equalsSelection(this.currentImage))return!1}else!1!==c&&a.fire("change");e.splice(this.index+1,e.length-this.index-1);e.length==this.limit&&e.shift();this.index=e.push(d)-1;this.currentImage=d;!1!==c&&this.refreshState();return!0},restoreImage:function(b){var d=this.editor,c;b.bookmarks&&(d.focus(), c=d.getSelection());this.locked={level:999};this.editor.loadSnapshot(b.contents);b.bookmarks?c.selectBookmarks(b.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=b.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();d.fire("change")},getNextImage:function(b){var d=this.snapshots,c=this.currentImage,a;if(c)if(b)for(a=this.index-1;0<=a;a--){if(b=d[a],!c.equalsContent(b))return b.index= a,b}else for(a=this.index+1;a=this.undoManager.strokesLimit&&(this.undoManager.type(b.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(b){var d=this.undoManager; b=b.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(b);if(!(e.ieFunctionalKeysBug(b)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new k(d.editor,!0))))if(0CKEDITOR.env.version&&f.enterMode!=CKEDITOR.ENTER_DIV&&e("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10this.$.offsetHeight){var c=f.createRange();c[33==b?"moveToElementEditStart":"moveToElementEditEnd"](this);c.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(b,"blur",function(){try{b.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(b,"touchend",function(){d.focus()});g=f.document.getElementsByTag("title").getItem(0); g.data("cke-title",g.getText());CKEDITOR.env.ie&&(f.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");f.fire("contentDom");this._.isPendingFocus&&(f.focus(),this._.isPendingFocus=!1);setTimeout(function(){f.fire("dataReady")},0)},0,this)}function h(d){function e(){var b;d.editable().attachListener(d,"selectionChange",function(){var a=d.getSelection().getSelectedElement();a&&(b&&(b.detachEvent("onresizestart",f),b=null),a.$.attachEvent("onresizestart", f),b=a.$)})}function f(b){b.returnValue=!1}if(CKEDITOR.env.gecko)try{var b=d.document.$;b.execCommand("enableObjectResizing",!1,!d.config.disableObjectResizing);b.execCommand("enableInlineTableEditing",!1,!d.config.disableNativeTableHandles)}catch(g){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&d.config.disableObjectResizing&&e(d)}function e(){var d=[];if(8<=CKEDITOR.document.$.documentMode){d.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var e=[],f;for(f in CKEDITOR.dtd.$removeEmpty)e.push("html.CSS1Compat "+ f+"[contenteditable\x3dfalse]");d.push(e.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(d.push("html{height:100% !important}"),d.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));d.push("html{cursor:text;*cursor:auto}");d.push("img,input,textarea{cursor:default}");return d.join("\n")}var k;CKEDITOR.plugins.add("wysiwygarea",{init:function(d){d.config.fullPage&&d.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", requiredContent:"body"});d.addMode("wysiwyg",function(e){function f(a){a&&a.removeListener();d.editable(new k(d,g.$.contentWindow.document.body));d.setData(d.getData(1),e)}var b="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",b=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(b)+"}())":"",g=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+b+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e'); g.setStyles({width:"100%",height:"100%"});g.addClass("cke_wysiwyg_frame").addClass("cke_reset");b=d.ui.space("contents");b.append(g);var c=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(c)g.on("load",f);var a=d.title,h=d.fire("ariaEditorHelpLabel",{}).label;a&&(CKEDITOR.env.ie&&h&&(a+=", "+h),g.setAttribute("title",a));if(h){var a=CKEDITOR.tools.getNextId(),w=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+a+'" class\x3d"cke_voice_label"\x3e'+h+"\x3c/span\x3e");b.append(w,1);g.setAttribute("aria-describedby", a)}d.on("beforeModeUnload",function(a){a.removeListener();w&&w.remove()});g.setAttributes({tabIndex:d.tabIndex,allowTransparency:"true"});!c&&f();d.fire("ariaWidget",g)})}});CKEDITOR.editor.prototype.addContentsCss=function(d){var e=this.config,f=e.contentsCss;CKEDITOR.tools.isArray(f)||(e.contentsCss=f?[f]:[]);e.contentsCss.push(d)};k=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(d){CKEDITOR.tools.setTimeout(f, 0,this,d)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(d,f){var h=this.editor;if(f)this.setHtml(d),this.fixInitialSelection(),h.fire("dataReady");else{this._.isLoadingData=!0;h._.dataStore={id:1};var b=h.config,g=b.fullPage,c=b.docType,a=CKEDITOR.tools.buildStyleHtml(e()).replace(/