From 32ca633fe10e047ef4892e1d9846fd6340b5b2e8 Mon Sep 17 00:00:00 2001 From: dramspro Date: Wed, 30 Mar 2022 23:02:16 +0300 Subject: [PATCH 01/22] MODX3 support (dont break in MODX2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaceв missing in MODX3 variable for its hardcoded value --- manager/assets/components/ckeditor/modx.htmleditor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manager/assets/components/ckeditor/modx.htmleditor.js b/manager/assets/components/ckeditor/modx.htmleditor.js index 1970f7c..f119b08 100755 --- a/manager/assets/components/ckeditor/modx.htmleditor.js +++ b/manager/assets/components/ckeditor/modx.htmleditor.js @@ -83,7 +83,7 @@ function getOption(key, type, defaultValue) { function getFileBrowseUrl() { var url = MODx.config['manager_url'] + 'index.php'; - var query = {a: MODx.action['browser'], source: MODx.config['default_media_source']}; + var query = {a: 'browser', source: MODx.config['default_media_source']}; return url + '?' + Ext.urlEncode(query); } @@ -447,4 +447,4 @@ MODx.unloadTVRTE = function() { }); }; -})(); \ No newline at end of file +})(); From 7e7558690db364ad3878ae08396815b8b7b2b9c3 Mon Sep 17 00:00:00 2001 From: dimasites Date: Mon, 27 Feb 2023 20:16:16 +0300 Subject: [PATCH 02/22] Update readme.md Added fresh MODX-version screenshots --- readme.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index bb86ab1..f659d70 100644 --- a/readme.md +++ b/readme.md @@ -1,2 +1,9 @@ -CKEditor plugin for MODx Revolution. -CKEditor core built with online builder (http://ckeditor.com/builder) with build-config: modx-ckeditor\manager\assets\components\ckeditor\ckeditor\build-config.js \ No newline at end of file +#CKEditor plugin for MODX Revolution 2.x and 3.x + +![MODX CKEditor github header icon](https://user-images.githubusercontent.com/5102558/221632707-733ad96a-9c23-4683-a2d8-87383303a1c9.png) + +![CKEditor-MODX3-screenshot-2023-02-24](https://user-images.githubusercontent.com/5102558/221632117-4e3c9a4e-218f-48f2-bc9c-98e772dedc9f.png) + +![CKEditor-MODX3-screenshot-2023-02-27](https://user-images.githubusercontent.com/5102558/221632122-973d91ea-5457-4612-af85-f8a52f13e83a.png) + +CKEditor core built with online builder (http://ckeditor.com/builder) with build-config: modx-ckeditor\manager\assets\components\ckeditor\ckeditor\build-config.js From 24fa812e5f8bdf8d279c55bef70963f3d1f9df83 Mon Sep 17 00:00:00 2001 From: Dmitry Kasatkin Date: Mon, 17 Apr 2023 15:00:19 +0300 Subject: [PATCH 03/22] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BD=D1=83=D0=BB=20=D0=BE=D1=80=D0=B8=D0=B3=D0=B8=D0=BD=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20min-=D1=84=D0=B0=D0=B9=D0=BB?= =?UTF-8?q?=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Перед изменениями (cherry picked from commit 1028e3fa5229bdf1514f42bfaa6151e4dc438304) --- .../components/ckeditor/ckeditor/ckeditor.js | 24027 +++++++++++++++- .../components/ckeditor/ckeditor/lang/bg.js | 706 +- .../components/ckeditor/ckeditor/lang/cs.js | 703 +- .../components/ckeditor/ckeditor/lang/da.js | 694 +- .../components/ckeditor/ckeditor/lang/de.js | 698 +- .../components/ckeditor/ckeditor/lang/en.js | 698 +- .../components/ckeditor/ckeditor/lang/es.js | 703 +- .../components/ckeditor/ckeditor/lang/et.js | 694 +- .../components/ckeditor/ckeditor/lang/fi.js | 703 +- .../components/ckeditor/ckeditor/lang/fr.js | 704 +- .../components/ckeditor/ckeditor/lang/he.js | 694 +- .../components/ckeditor/ckeditor/lang/id.js | 698 +- .../components/ckeditor/ckeditor/lang/it.js | 701 +- .../components/ckeditor/ckeditor/lang/ja.js | 678 +- .../components/ckeditor/ckeditor/lang/nl.js | 698 +- .../components/ckeditor/ckeditor/lang/pl.js | 698 +- .../components/ckeditor/ckeditor/lang/pt.js | 706 +- .../components/ckeditor/ckeditor/lang/ro.js | 710 +- .../components/ckeditor/ckeditor/lang/ru.js | 701 +- .../components/ckeditor/ckeditor/lang/sv.js | 703 +- .../components/ckeditor/ckeditor/lang/th.js | 698 +- .../ckeditor/ckeditor/lang/zh-cn.js | 664 +- .../components/ckeditor/ckeditor/lang/zh.js | 677 +- .../ckeditor/plugins/link/dialogs/link.js | 550 +- .../ckeditor/skins/moono-lisa/dialog.css | 746 +- 25 files changed, 39280 insertions(+), 1372 deletions(-) diff --git a/manager/assets/components/ckeditor/ckeditor/ckeditor.js b/manager/assets/components/ckeditor/ckeditor/ckeditor.js index d3ec768..2df7ea9 100644 --- a/manager/assets/components/ckeditor/ckeditor/ckeditor.js +++ b/manager/assets/components/ckeditor/ckeditor/ckeditor.js @@ -2,1331 +2,22708 @@ Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ -(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var a=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,d={timestamp:"HBDD",version:"4.8.0",revision:"230f715",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:a},status:"unloaded",basePath:function(){var b=window.CKEDITOR_BASEPATH||"";if(!b)for(var c=document.getElementsByTagName("script"),d=0;de.getListenerIndex(d)){e=e.listeners;h||(h=this);isNaN(g)&&(g=10);var y=this;m.fn=d;m.priority=g;for(var x=e.length-1;0<=x;x--)if(e[x].priority<=g)return e.splice(x+1,0,m),{removeListener:r};e.unshift(m)}return{removeListener:r}}, -once:function(){var a=Array.prototype.slice.call(arguments),b=a[1];a[1]=function(a){a.removeListener();return b.apply(this,arguments)};return this.on.apply(this,a)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},h=0,k=function(){h=1};return function(g,m,r){var e=d(this)[g];g=a;var y=h;a=h=0;if(e){var x=e.listeners;if(x.length)for(var x=x.slice(0),B,D=0;Ddocument.documentMode),mobile:-1c||b.quirks);b.gecko&&(d=a.match(/rv:([\d\.]+)/))&&(d=d[1].split("."),c=1E4*d[0]+100*(d[1]||0)+1*(d[2]||0));b.air&&(c=parseFloat(a.match(/ adobeair\/(\d+)/)[1])); -b.webkit&&(c=parseFloat(a.match(/ applewebkit\/(\d+)/)[1]));b.version=c;b.isCompatible=!(b.ie&&7>c)&&!(b.gecko&&4E4>c)&&!(b.webkit&&534>c);b.hidpi=2<=window.devicePixelRatio;b.needsBrFiller=b.gecko||b.webkit||b.ie&&10c;b.cssClass="cke_browser_"+(b.ie?"ie":b.gecko?"gecko":b.webkit?"webkit":"unknown");b.quirks&&(b.cssClass+=" cke_browser_quirks");b.ie&&(b.cssClass+=" cke_browser_ie"+(b.quirks?"6 cke_browser_iequirks":b.version));b.air&&(b.cssClass+=" cke_browser_air"); -b.iOS&&(b.cssClass+=" cke_browser_ios");b.hidpi&&(b.cssClass+=" cke_hidpi");return b}()); -"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 a=document.createElement("script");a.type="text/javascript";a.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(a)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(a){(this._.pending||(this._.pending=[])).push(a)};(function(){CKEDITOR.domReady(function(){var a= -CKEDITOR.loadFullCore,d=CKEDITOR.loadFullCoreTimeout;a&&(CKEDITOR.status="basic_ready",a&&a._load?a():d&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},1E3*d))})})();CKEDITOR.status="basic_loaded"}();"use strict";CKEDITOR.VERBOSITY_WARN=1;CKEDITOR.VERBOSITY_ERROR=2;CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR;CKEDITOR.warn=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:a,additionalData:d})}; -CKEDITOR.error=function(a,d){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:a,additionalData:d})}; -CKEDITOR.on("log",function(a){if(window.console&&window.console.log){var d=console[a.data.type]?a.data.type:"log",b=a.data.errorCode;if(a=a.data.additionalData)console[d]("[CKEDITOR] Error code: "+b+".",a);else console[d]("[CKEDITOR] Error code: "+b+".");console[d]("[CKEDITOR] For more information about this error go to https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_errors-section-"+b)}},null,null,999);CKEDITOR.dom={}; -(function(){var a=[],d=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.ie?"-ms-":"",b=/&/g,c=/>/g,f=/|\s) /g, -function(a,e){return e+"\x26nbsp;"}).replace(/ (?=<)/g,"\x26nbsp;")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var a="e",e=0;8>e;e++)a+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return a},override:function(a,e){var b=e(a);b.prototype=a.prototype;return b},setTimeout:function(a,e,b,c,g){g||(g=window);b||(b=g);return g.setTimeout(function(){c?a.apply(b,[].concat(c)):a.apply(b)}, -e||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(e){return e.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;return function(e){return e.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(e){return e.replace(a,"")}}(),indexOf:function(a,e){if("function"==typeof e)for(var b=0,c=a.length;bb;b++)a[b]=("0"+parseInt(a[b],10).toString(16)).slice(-2); -return"#"+a.join("")})},normalizeHex:function(a){return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,function(a,b,c,g){a=b.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(a,e,b){var c={};b&&(a=(new CKEDITOR.dom.element("span")).setAttribute("style",a).getAttribute("style")||"");a&&(a=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a)));if(!a||";"==a)return c;a.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, -function(a,b,g){e&&(b=b.toLowerCase(),"font-family"==b&&(g=g.replace(/\s*,\s*/g,",")),g=CKEDITOR.tools.trim(g));c[b]=g});return c},writeCssText:function(a,e){var b,c=[];for(b in a)c.push(b+":"+a[b]);e&&c.sort();return c.join("; ")},objectCompare:function(a,e,b){var c;if(!a&&!e)return!0;if(!a||!e)return!1;for(c in a)if(a[c]!=e[c])return!1;if(!b)for(c in e)if(a[c]!=e[c])return!1;return!0},objectKeys:function(a){var e=[],b;for(b in a)e.push(b);return e},convertArrayToObject:function(a,e){var b={};1== -arguments.length&&(e=!0);for(var c=0,g=a.length;cc;c++)a.push(Math.floor(256*Math.random()));for(c=0;cCKEDITOR.env.version?4===b.button?CKEDITOR.MOUSE_BUTTON_MIDDLE:1===b.button?CKEDITOR.MOUSE_BUTTON_LEFT:CKEDITOR.MOUSE_BUTTON_RIGHT:b.button:!1},convertHexStringToBytes:function(a){var b=[],c=a.length/2,g;for(g=0;gm)for(p=m;3>p;p++)d[p]=0;f[0]=(d[0]&252)>>2;f[1]=(d[0]&3)<<4|d[1]>>4;f[2]=(d[1]&15)<<2|(d[2]&192)>> -6;f[3]=d[2]&63;for(p=0;4>p;p++)b=p<=m?b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f[p]):b+"\x3d"}return b},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(a){var b={},c=this._findColor(a);c.length&&(b.color=c[0],CKEDITOR.tools.array.forEach(c, -function(b){a=a.replace(b,"")}));if(a=CKEDITOR.tools.trim(a))b.unprocessed=a;return b},margin:function(a){function b(a){c.top=g[a[0]];c.right=g[a[1]];c.bottom=g[a[2]];c.left=g[a[3]]}var c={},g=a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g)||["0px"];switch(g.length){case 1:b([0,0,0,0]);break;case 2:b([0,1,0,1]);break;case 3:b([0,1,2,1]);break;case 4:b([0,1,2,3])}return c},border:function(a){var b={};a=a.split(/\s+/);CKEDITOR.tools.array.forEach(a,function(a){if(!b.color){var c=CKEDITOR.tools.style.parse._findColor(a); -if(c.length){b.color=c[0];return}}b.style||-1===CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle,a)?!b.width&&CKEDITOR.tools.style.parse._widthRegExp.test(a)&&(b.width=a):b.style=a});return b},_findColor:function(a){var b=[],c=CKEDITOR.tools.array,b=b.concat(a.match(this._rgbaRegExp)||[]),b=b.concat(a.match(this._hslaRegExp)||[]);return b=b.concat(c.filter(a.split(/\s+/),function(a){return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)?!0:a.toLowerCase()in CKEDITOR.tools.style.parse._colors}))}}}, -array:{filter:function(a,b,c){var g=[];this.forEach(a,function(d,m){b.call(c,d,m,a)&&g.push(d)});return g},forEach:function(a,b,c){var g=a.length,d;for(d=0;dCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&c(f);return f},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$, -a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var d=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var f=c.parentNode;f&&d.unshift(this.getIndex.call({$:c},a));c=f}return d},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){function d(a,c){var m=c?a.nextSibling:a.previousSibling;return m&&m.nodeType==CKEDITOR.NODE_TEXT?b(m)?d(m, -c):m:null}function b(a){return!a.nodeValue||a.nodeValue==CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE}var c=this.$,f=-1,h;if(!this.$.parentNode||a&&c.nodeType==CKEDITOR.NODE_TEXT&&b(c)&&!d(c)&&!d(c,!0))return-1;do a&&c!=this.$&&c.nodeType==CKEDITOR.NODE_TEXT&&(h||b(c))||(f++,h=c.nodeType==CKEDITOR.NODE_TEXT);while(c=c.previousSibling);return f},getNextSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getFirst&&this.getFirst();var f;if(!a){if(this.type== -CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getNext()}for(;!a&&(f=(f||this).getParent());){if(b&&!1===b(f,!0))return null;a=f.getNext()}return!a||b&&!1===b(a)?null:d&&d!=a.type?a.getNextSourceNode(!1,d,b):a},getPreviousSourceNode:function(a,d,b){if(b&&!b.call){var c=b;b=function(a){return!a.equals(c)}}a=!a&&this.getLast&&this.getLast();var f;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&!1===b(this,!0))return null;a=this.getPrevious()}for(;!a&&(f=(f||this).getParent());){if(b&&!1=== -b(f,!0))return null;a=f.getPrevious()}return!a||b&&!1===b(a)?null:d&&a.type!=d?a.getPreviousSourceNode(!1,d,b):a},getPrevious:function(a){var d=this.$,b;do b=(d=d.previousSibling)&&10!=d.nodeType&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getNext:function(a){var d=this.$,b;do b=(d=d.nextSibling)&&new CKEDITOR.dom.node(d);while(b&&a&&!a(b));return b},getParent:function(a){var d=this.$.parentNode;return d&&(d.nodeType==CKEDITOR.NODE_ELEMENT||a&&d.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)? -new CKEDITOR.dom.node(d):null},getParents:function(a){var d=this,b=[];do b[a?"push":"unshift"](d);while(d=d.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;if(a.contains&&a.contains(this))return a;var d=this.contains?this:this.getParent();do if(d.contains(a))return d;while(d=d.getParent());return null},getPosition:function(a){var d=this.$,b=a.$;if(d.compareDocumentPosition)return d.compareDocumentPosition(b);if(d==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type== -CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(d.contains){if(d.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(d))return CKEDITOR.POSITION_IS_CONTAINED+CKEDITOR.POSITION_FOLLOWING}if("sourceIndex"in d)return 0>d.sourceIndex||0>b.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:d.sourceIndex=document.documentMode||!d||(a=d+":"+a);return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a))},getHead:function(){var a=this.$.getElementsByTagName("head")[0]; -return a=a?new CKEDITOR.dom.element(a):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(a){this.$.open("text/html","replace");CKEDITOR.env.ie&&(a=a.replace(/(?:^\s*]*?>)|^/i,'$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e('+ -CKEDITOR.tools.fixDomain+")();\x3c/script\x3e"));this.$.write(a);this.$.close()},find:function(a){return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a))},findOne:function(a){return(a=this.$.querySelector(a))?new CKEDITOR.dom.element(a):null},_getHtml5ShivFrag:function(){var a=this.getCustomData("html5ShivFrag");a||(a=this.$.createDocumentFragment(),CKEDITOR.tools.enableHtml5Elements(a,!0),this.setCustomData("html5ShivFrag",a));return a}});CKEDITOR.dom.nodeList=function(a){this.$=a}; -CKEDITOR.dom.nodeList.prototype={count:function(){return this.$.length},getItem:function(a){return 0>a||a>=this.$.length?null:(a=this.$[a])?new CKEDITOR.dom.node(a):null},toArray:function(){return CKEDITOR.tools.array.map(this.$,function(a){return new CKEDITOR.dom.node(a)})}};CKEDITOR.dom.element=function(a,d){"string"==typeof a&&(a=(d?d.$:document).createElement(a));CKEDITOR.dom.domObject.call(this,a)}; -CKEDITOR.dom.element.get=function(a){return(a="string"==typeof a?document.getElementById(a)||document.getElementsByName(a)[0]:a)&&(a.$?a:new CKEDITOR.dom.element(a))};CKEDITOR.dom.element.prototype=new CKEDITOR.dom.node;CKEDITOR.dom.element.createFromHtml=function(a,d){var b=new CKEDITOR.dom.element("div",d);b.setHtml(a);return b.getFirst().remove()}; -CKEDITOR.dom.element.setMarker=function(a,d,b,c){var f=d.getCustomData("list_marker_id")||d.setCustomData("list_marker_id",CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"),h=d.getCustomData("list_marker_names")||d.setCustomData("list_marker_names",{}).getCustomData("list_marker_names");a[f]=d;h[b]=1;return d.setCustomData(b,c)};CKEDITOR.dom.element.clearAllMarkers=function(a){for(var d in a)CKEDITOR.dom.element.clearMarkers(a,a[d],1)}; -CKEDITOR.dom.element.clearMarkers=function(a,d,b){var c=d.getCustomData("list_marker_names"),f=d.getCustomData("list_marker_id"),h;for(h in c)d.removeCustomData(h);d.removeCustomData("list_marker_names");b&&(d.removeCustomData("list_marker_id"),delete a[f])}; -(function(){function a(a,b){return-1<(" "+a+" ").replace(h," ").indexOf(" "+b+" ")}function d(a){var b=!0;a.$.id||(a.$.id="cke_tmp_"+CKEDITOR.tools.getNextNumber(),b=!1);return function(){b||a.removeAttribute("id")}}function b(a,b){var c=CKEDITOR.tools.escapeCss(a.$.id);return"#"+c+" "+b.split(/,\s*/).join(", #"+c+" ")}function c(a){for(var b=0,c=0,e=k[a].length;cCKEDITOR.env.version?this.$.text+=a:this.append(new CKEDITOR.dom.text(a))},appendBogus:function(a){if(a||CKEDITOR.env.needsBrFiller){for(a=this.getLast();a&&a.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.rtrim(a.getText());)a=a.getPrevious();a&&a.is&&a.is("br")||(a=this.getDocument().createElement("br"),CKEDITOR.env.gecko&&a.setAttribute("type","_moz"),this.append(a))}},breakParent:function(a,b){var c=new CKEDITOR.dom.range(this.getDocument());c.setStartAfter(this);c.setEndAfter(a); -var e=c.extractContents(!1,b||!1),d;c.insertNode(this.remove());if(CKEDITOR.env.ie&&!CKEDITOR.env.edge){for(c=new CKEDITOR.dom.element("div");d=e.getFirst();)d.$.style.backgroundColor&&(d.$.style.backgroundColor=d.$.style.backgroundColor),c.append(d);c.insertAfter(this);c.remove(!0)}else e.insertAfterNode(this)},contains:document.compareDocumentPosition?function(a){return!!(this.$.compareDocumentPosition(a.$)&16)}:function(a){var b=this.$;return a.type!=CKEDITOR.NODE_ELEMENT?b.contains(a.getParent().$): -b!=a.$&&b.contains(a.$)},focus:function(){function a(){try{this.$.focus()}catch(b){}}return function(b){b?CKEDITOR.tools.setTimeout(a,100,this):a.call(this)}}(),getHtml:function(){var a=this.$.innerHTML;return CKEDITOR.env.ie?a.replace(/<\?[^>]*>/g,""):a},getOuterHtml:function(){if(this.$.outerHTML)return this.$.outerHTML.replace(/<\?[^>]*>/,"");var a=this.$.ownerDocument.createElement("div");a.appendChild(this.$.cloneNode(!0));return a.innerHTML},getClientRect:function(){var a=CKEDITOR.tools.extend({}, -this.$.getBoundingClientRect());!a.width&&(a.width=a.right-a.left);!a.height&&(a.height=a.bottom-a.top);return a},setHtml:CKEDITOR.env.ie&&9>CKEDITOR.env.version?function(a){try{var b=this.$;if(this.getParent())return b.innerHTML=a;var c=this.getDocument()._getHtml5ShivFrag();c.appendChild(b);b.innerHTML=a;c.removeChild(b);return a}catch(e){this.$.innerHTML="";b=new CKEDITOR.dom.element("body",this.getDocument());b.$.innerHTML=a;for(b=b.getChildren();b.count();)this.append(b.getItem(0));return a}}: -function(a){return this.$.innerHTML=a},setText:function(){var a=document.createElement("p");a.innerHTML="x";a=a.textContent;return function(b){this.$[a?"textContent":"innerText"]=b}}(),getAttribute:function(){var a=function(a){return this.$.getAttribute(a,2)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){switch(a){case "class":a="className";break;case "http-equiv":a="httpEquiv";break;case "name":return this.$.name;case "tabindex":return a=this.$.getAttribute(a, -2),0!==a&&0===this.$.tabIndex&&(a=null),a;case "checked":return a=this.$.attributes.getNamedItem(a),(a.specified?a.nodeValue:this.$.checked)?"checked":null;case "hspace":case "value":return this.$[a];case "style":return this.$.style.cssText;case "contenteditable":case "contentEditable":return this.$.attributes.getNamedItem("contentEditable").specified?this.$.getAttribute("contentEditable"):null}return this.$.getAttribute(a,2)}:a}(),getAttributes:function(a){var b={},c=this.$.attributes,e;a=CKEDITOR.tools.isArray(a)? -a:[];for(e=0;e=document.documentMode){var b=this.$.scopeName;"HTML"!=b&&(a=b.toLowerCase()+":"+a)}this.getName=function(){return a};return this.getName()},getValue:function(){return this.$.value},getFirst:function(a){var b=this.$.firstChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getNext(a));return b},getLast:function(a){var b=this.$.lastChild;(b=b&&new CKEDITOR.dom.node(b))&&a&&!a(b)&&(b=b.getPrevious(a));return b},getStyle:function(a){return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]}, -is:function(){var a=this.getName();if("object"==typeof arguments[0])return!!arguments[0][a];for(var b=0;bCKEDITOR.env.version&&this.is("a")){var c=this.getParent();c.type==CKEDITOR.NODE_ELEMENT&&(c=c.clone(),c.setHtml(b),b=c.getHtml(),c.setHtml(a),a=c.getHtml())}return b==a},isVisible:function(){var a=(this.$.offsetHeight||this.$.offsetWidth)&&"hidden"!=this.getComputedStyle("visibility"),b,c;a&&CKEDITOR.env.webkit&&(b=this.getWindow(),!b.equals(CKEDITOR.document.getWindow())&&(c=b.$.frameElement)&&(a=(new CKEDITOR.dom.element(c)).isVisible()));return!!a},isEmptyInlineRemoveable:function(){if(!CKEDITOR.dtd.$removeEmpty[this.getName()])return!1; -for(var a=this.getChildren(),b=0,c=a.count();bCKEDITOR.env.version?function(b){return"name"==b?!!this.$.name:a.call(this,b)}:a:function(a){return!!this.$.attributes.getNamedItem(a)}}(),hide:function(){this.setStyle("display","none")},moveChildren:function(a,b){var c=this.$;a=a.$;if(c!=a){var e;if(b)for(;e=c.lastChild;)a.insertBefore(c.removeChild(e),a.firstChild);else for(;e=c.firstChild;)a.appendChild(c.removeChild(e))}},mergeSiblings:function(){function a(b,c,e){if(c&&c.type==CKEDITOR.NODE_ELEMENT){for(var d= -[];c.data("cke-bookmark")||c.isEmptyInlineRemoveable();)if(d.push(c),c=e?c.getNext():c.getPrevious(),!c||c.type!=CKEDITOR.NODE_ELEMENT)return;if(b.isIdentical(c)){for(var g=e?b.getLast():b.getFirst();d.length;)d.shift().move(b,!e);c.moveChildren(b,!e);c.remove();g&&g.type==CKEDITOR.NODE_ELEMENT&&g.mergeSiblings()}}}return function(b){if(!1===b||CKEDITOR.dtd.$removeEmpty[this.getName()]||this.is("a"))a(this,this.getNext(),!0),a(this,this.getPrevious())}}(),show:function(){this.setStyles({display:"", -visibility:""})},setAttribute:function(){var a=function(a,b){this.$.setAttribute(a,b);return this};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(b,c){"class"==b?this.$.className=c:"style"==b?this.$.style.cssText=c:"tabindex"==b?this.$.tabIndex=c:"checked"==b?this.$.checked=c:"contenteditable"==b?a.call(this,"contentEditable",c):a.apply(this,arguments);return this}:CKEDITOR.env.ie8Compat&&CKEDITOR.env.secure?function(b,c){if("src"==b&&c.match(/^http:\/\//))try{a.apply(this, -arguments)}catch(e){}else a.apply(this,arguments);return this}:a}(),setAttributes:function(a){for(var b in a)this.setAttribute(b,a[b]);return this},setValue:function(a){this.$.value=a;return this},removeAttribute:function(){var a=function(a){this.$.removeAttribute(a)};return CKEDITOR.env.ie&&(CKEDITOR.env.ie7Compat||CKEDITOR.env.quirks)?function(a){"class"==a?a="className":"tabindex"==a?a="tabIndex":"contenteditable"==a&&(a="contentEditable");this.$.removeAttribute(a)}:a}(),removeAttributes:function(a){if(CKEDITOR.tools.isArray(a))for(var b= -0;bCKEDITOR.env.version?(a=Math.round(100*a),this.setStyle("filter",100<=a?"":"progid:DXImageTransform.Microsoft.Alpha(opacity\x3d"+a+")")):this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", -"none"));if(CKEDITOR.env.ie){this.setAttribute("unselectable","on");for(var a,b=this.getElementsByTag("*"),c=0,e=b.count();cf||0f?f:d);c&&(0>x||0x?x:e,0)},setState:function(a,b,c){b=b||"cke";switch(a){case CKEDITOR.TRISTATE_ON:this.addClass(b+"_on");this.removeClass(b+ -"_off");this.removeClass(b+"_disabled");c&&this.setAttribute("aria-pressed",!0);c&&this.removeAttribute("aria-disabled");break;case CKEDITOR.TRISTATE_DISABLED:this.addClass(b+"_disabled");this.removeClass(b+"_off");this.removeClass(b+"_on");c&&this.setAttribute("aria-disabled",!0);c&&this.removeAttribute("aria-pressed");break;default:this.addClass(b+"_off"),this.removeClass(b+"_on"),this.removeClass(b+"_disabled"),c&&this.removeAttribute("aria-pressed"),c&&this.removeAttribute("aria-disabled")}}, -getFrameDocument:function(){var a=this.$;try{a.contentWindow.document}catch(b){a.src=a.src}return a&&new CKEDITOR.dom.document(a.contentWindow.document)},copyAttributes:function(a,b){var c=this.$.attributes;b=b||{};for(var e=0;e=F.getChildCount()?(F=F.getChild(E-1),t=!0):F=F.getChild(E):z=t=!0;q.type==CKEDITOR.NODE_TEXT?l?H=!0:q.split(L):0da)for(;V;)V=h(V,G,!0);G=I}l||g()}} -function b(){var a=!1,b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!0),d=CKEDITOR.dom.walker.bogus();return function(f){return c(f)||b(f)?!0:d(f)&&!a?a=!0:f.type==CKEDITOR.NODE_TEXT&&(f.hasAscendant("pre")||CKEDITOR.tools.trim(f.getText()).length)||f.type==CKEDITOR.NODE_ELEMENT&&!f.is(h)?!1:!0}}function c(a){var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(1);return function(d){return c(d)||b(d)?!0:!a&&k(d)||d.type==CKEDITOR.NODE_ELEMENT&&d.is(CKEDITOR.dtd.$removeEmpty)}} -function f(a){return function(){var b;return this[a?"getPreviousNode":"getNextNode"](function(a){!b&&r(a)&&(b=a);return m(a)&&!(k(a)&&a.equals(b))})}}var h={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,"var":1},k=CKEDITOR.dom.walker.bogus(),g=/^[\t\r\n ]*(?: |\xa0)$/,m=CKEDITOR.dom.walker.editable(),r=CKEDITOR.dom.walker.ignored(!0);CKEDITOR.dom.range.prototype={clone:function(){var a= -new CKEDITOR.dom.range(this.root);a._setStartContainer(this.startContainer);a.startOffset=this.startOffset;a._setEndContainer(this.endContainer);a.endOffset=this.endOffset;a.collapsed=this.collapsed;return a},collapse:function(a){a?(this._setEndContainer(this.startContainer),this.endOffset=this.startOffset):(this._setStartContainer(this.endContainer),this.startOffset=this.endOffset);this.collapsed=!0},cloneContents:function(a){var b=new CKEDITOR.dom.documentFragment(this.document);this.collapsed|| -d(this,2,b,!1,"undefined"==typeof a?!0:a);return b},deleteContents:function(a){this.collapsed||d(this,0,null,a)},extractContents:function(a,b){var c=new CKEDITOR.dom.documentFragment(this.document);this.collapsed||d(this,1,c,a,"undefined"==typeof b?!0:b);return c},createBookmark:function(a){var b,c,d,f,h=this.collapsed;b=this.document.createElement("span");b.data("cke-bookmark",1);b.setStyle("display","none");b.setHtml("\x26nbsp;");a&&(d="cke_bm_"+CKEDITOR.tools.getNextNumber(),b.setAttribute("id", -d+(h?"C":"S")));h||(c=b.clone(),c.setHtml("\x26nbsp;"),a&&c.setAttribute("id",d+"E"),f=this.clone(),f.collapse(),f.insertNode(c));f=this.clone();f.collapse(!0);f.insertNode(b);c?(this.setStartAfter(b),this.setEndBefore(c)):this.moveToPosition(b,CKEDITOR.POSITION_AFTER_END);return{startNode:a?d+(h?"C":"S"):b,endNode:a?d+"E":c,serializable:a,collapsed:h}},createBookmark2:function(){function a(b){var e=b.container,d=b.offset,p;p=e;var f=d;p=p.type!=CKEDITOR.NODE_ELEMENT||0===f||f==p.getChildCount()? -0:p.getChild(f-1).type==CKEDITOR.NODE_TEXT&&p.getChild(f).type==CKEDITOR.NODE_TEXT;p&&(e=e.getChild(d-1),d=e.getLength());if(e.type==CKEDITOR.NODE_ELEMENT&&0=a.offset&&(a.offset=d.getIndex(),a.container=d.getParent()))}}var c=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT,!0);return function(c){var d=this.collapsed,f={container:this.startContainer,offset:this.startOffset},p={container:this.endContainer,offset:this.endOffset};c&&(a(f), -b(f,this.root),d||(a(p),b(p,this.root)));return{start:f.container.getAddress(c),end:d?null:p.container.getAddress(c),startOffset:f.offset,endOffset:p.offset,normalized:c,collapsed:d,is2:!0}}}(),moveToBookmark:function(a){if(a.is2){var b=this.document.getByAddress(a.start,a.normalized),c=a.startOffset,d=a.end&&this.document.getByAddress(a.end,a.normalized);a=a.endOffset;this.setStart(b,c);d?this.setEnd(d,a):this.collapse(!0)}else b=(c=a.serializable)?this.document.getById(a.startNode):a.startNode, -a=c?this.document.getById(a.endNode):a.endNode,this.setStartBefore(b),b.remove(),a?(this.setEndBefore(a),a.remove()):this.collapse(!0)},getBoundaryNodes:function(){var a=this.startContainer,b=this.endContainer,c=this.startOffset,d=this.endOffset,f;if(a.type==CKEDITOR.NODE_ELEMENT)if(f=a.getChildCount(),f>c)a=a.getChild(c);else if(1>f)a=a.getPreviousSourceNode();else{for(a=a.$;a.lastChild;)a=a.lastChild;a=new CKEDITOR.dom.node(a);a=a.getNextSourceNode()||a}if(b.type==CKEDITOR.NODE_ELEMENT)if(f=b.getChildCount(), -f>d)b=b.getChild(d).getPreviousSourceNode(!0);else if(1>f)b=b.getPreviousSourceNode();else{for(b=b.$;b.lastChild;)b=b.lastChild;b=new CKEDITOR.dom.node(b)}a.getPosition(b)&CKEDITOR.POSITION_FOLLOWING&&(a=b);return{startNode:a,endNode:b}},getCommonAncestor:function(a,b){var c=this.startContainer,d=this.endContainer,c=c.equals(d)?a&&c.type==CKEDITOR.NODE_ELEMENT&&this.startOffset==this.endOffset-1?c.getChild(this.startOffset):c:c.getCommonAncestor(d);return b&&!c.is?c.getParent():c},optimize:function(){var a= -this.startContainer,b=this.startOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setStartAfter(a):this.setStartBefore(a));a=this.endContainer;b=this.endOffset;a.type!=CKEDITOR.NODE_ELEMENT&&(b?b>=a.getLength()&&this.setEndAfter(a):this.setEndBefore(a))},optimizeBookmark:function(){var a=this.startContainer,b=this.endContainer;a.is&&a.is("span")&&a.data("cke-bookmark")&&this.setStartAt(a,CKEDITOR.POSITION_BEFORE_START);b&&b.is&&b.is("span")&&b.data("cke-bookmark")&&this.setEndAt(b,CKEDITOR.POSITION_AFTER_END)}, -trim:function(a,b){var c=this.startContainer,d=this.startOffset,f=this.collapsed;if((!a||f)&&c&&c.type==CKEDITOR.NODE_TEXT){if(d)if(d>=c.getLength())d=c.getIndex()+1,c=c.getParent();else{var h=c.split(d),d=c.getIndex()+1,c=c.getParent();this.startContainer.equals(this.endContainer)?this.setEnd(h,this.endOffset-this.startOffset):c.equals(this.endContainer)&&(this.endOffset+=1)}else d=c.getIndex(),c=c.getParent();this.setStart(c,d);if(f){this.collapse(!0);return}}c=this.endContainer;d=this.endOffset; -b||f||!c||c.type!=CKEDITOR.NODE_TEXT||(d?(d>=c.getLength()||c.split(d),d=c.getIndex()+1):d=c.getIndex(),c=c.getParent(),this.setEnd(c,d))},enlarge:function(a,b){function c(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 f=1;case CKEDITOR.ENLARGE_ELEMENT:var h=function(a,b){var c=new CKEDITOR.dom.range(g);c.setStart(a,b);c.setEndAt(g,CKEDITOR.POSITION_BEFORE_END);var c=new CKEDITOR.dom.walker(c), -e;for(c.guard=function(a){return!(a.type==CKEDITOR.NODE_ELEMENT&&a.isBlockBoundary())};e=c.next();){if(e.type!=CKEDITOR.NODE_TEXT)return!1;M=e!=a?e.getText():e.substring(b);if(d.test(M))return!1}return!0};if(this.collapsed)break;var p=this.getCommonAncestor(),g=this.root,k,r,l,q,F,L=!1,E,M;E=this.startContainer;var t=this.startOffset;E.type==CKEDITOR.NODE_TEXT?(t&&(E=!CKEDITOR.tools.trim(E.substring(0,t)).length&&E,L=!!E),E&&((q=E.getPrevious())||(l=E.getParent()))):(t&&(q=E.getChild(t-1)||E.getLast()), -q||(l=E));for(l=c(l);l||q;){if(l&&!q){!F&&l.equals(p)&&(F=!0);if(f?l.isBlockBoundary():!g.contains(l))break;L&&"inline"==l.getComputedStyle("display")||(L=!1,F?k=l:this.setStartBefore(l));q=l.getPrevious()}for(;q;)if(E=!1,q.type==CKEDITOR.NODE_COMMENT)q=q.getPrevious();else{if(q.type==CKEDITOR.NODE_TEXT)M=q.getText(),d.test(M)&&(q=null),E=/[\s\ufeff]$/.test(M);else if((q.$.offsetWidth>(CKEDITOR.env.webkit?1:0)||b&&q.is("br"))&&!q.data("cke-bookmark"))if(L&&CKEDITOR.dtd.$removeEmpty[q.getName()]){M= -q.getText();if(d.test(M))q=null;else for(var t=q.$.getElementsByTagName("*"),C=0,z;z=t[C++];)if(!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]){q=null;break}q&&(E=!!M.length)}else q=null;E&&(L?F?k=l:l&&this.setStartBefore(l):L=!0);if(q){E=q.getPrevious();if(!l&&!E){l=q;q=null;break}q=E}else l=null}l&&(l=c(l.getParent()))}E=this.endContainer;t=this.endOffset;l=q=null;F=L=!1;E.type==CKEDITOR.NODE_TEXT?CKEDITOR.tools.trim(E.substring(t)).length?L=!0:(L=!E.getLength(),t==E.getLength()?(q=E.getNext())|| -(l=E.getParent()):h(E,t)&&(l=E.getParent())):(q=E.getChild(t))||(l=E);for(;l||q;){if(l&&!q){!F&&l.equals(p)&&(F=!0);if(f?l.isBlockBoundary():!g.contains(l))break;L&&"inline"==l.getComputedStyle("display")||(L=!1,F?r=l:l&&this.setEndAfter(l));q=l.getNext()}for(;q;){E=!1;if(q.type==CKEDITOR.NODE_TEXT)M=q.getText(),h(q,0)||(q=null),E=/^[\s\ufeff]/.test(M);else if(q.type==CKEDITOR.NODE_ELEMENT){if((0=p.getLength()?h.setStartAfter(p):(h.setStartBefore(p),c=0):h.setStartBefore(p));g&&g.type==CKEDITOR.NODE_TEXT&&(r?r>=g.getLength()?h.setEndAfter(g):(h.setEndAfter(g),l=0):h.setEndBefore(g));var h=new CKEDITOR.dom.walker(h),q=CKEDITOR.dom.walker.bookmark(),F=CKEDITOR.dom.walker.bogus();h.evaluator=function(b){return b.type==(a==CKEDITOR.SHRINK_ELEMENT?CKEDITOR.NODE_ELEMENT:CKEDITOR.NODE_TEXT)};var L;h.guard=function(b,c){if(f&&F(b)||q(b))return!0; -if(a==CKEDITOR.SHRINK_ELEMENT&&b.type==CKEDITOR.NODE_TEXT||c&&b.equals(L)||!1===d&&b.type==CKEDITOR.NODE_ELEMENT&&b.isBlockBoundary()||b.type==CKEDITOR.NODE_ELEMENT&&b.hasAttribute("contenteditable"))return!1;c||b.type!=CKEDITOR.NODE_ELEMENT||(L=b);return!0};c&&(p=h[a==CKEDITOR.SHRINK_ELEMENT?"lastForward":"next"]())&&this.setStartAt(p,b?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_START);l&&(h.reset(),(h=h[a==CKEDITOR.SHRINK_ELEMENT?"lastBackward":"previous"]())&&this.setEndAt(h,b?CKEDITOR.POSITION_BEFORE_END: -CKEDITOR.POSITION_AFTER_END));return!(!c&&!l)}},insertNode:function(a){this.optimizeBookmark();this.trim(!1,!0);var b=this.startContainer,c=b.getChild(this.startOffset);c?a.insertBefore(c):b.append(a);a.getParent()&&a.getParent().equals(this.endContainer)&&this.endOffset++;this.setStartBefore(a)},moveToPosition:function(a,b){this.setStartAt(a,b);this.collapse(!0)},moveToRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},selectNodeContents:function(a){this.setStart(a, -0);this.setEnd(a,a.type==CKEDITOR.NODE_TEXT?a.getLength():a.getChildCount())},setStart:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex(),b=b.getParent());this._setStartContainer(b);this.startOffset=c;this.endContainer||(this._setEndContainer(b),this.endOffset=c);a(this)},setEnd:function(b,c){b.type==CKEDITOR.NODE_ELEMENT&&CKEDITOR.dtd.$empty[b.getName()]&&(c=b.getIndex()+1,b=b.getParent());this._setEndContainer(b);this.endOffset=c;this.startContainer|| -(this._setStartContainer(b),this.startOffset=c);a(this)},setStartAfter:function(a){this.setStart(a.getParent(),a.getIndex()+1)},setStartBefore:function(a){this.setStart(a.getParent(),a.getIndex())},setEndAfter:function(a){this.setEnd(a.getParent(),a.getIndex()+1)},setEndBefore:function(a){this.setEnd(a.getParent(),a.getIndex())},setStartAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setStart(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setStart(b, -b.getLength()):this.setStart(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setStartBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setStartAfter(b)}a(this)},setEndAt:function(b,c){switch(c){case CKEDITOR.POSITION_AFTER_START:this.setEnd(b,0);break;case CKEDITOR.POSITION_BEFORE_END:b.type==CKEDITOR.NODE_TEXT?this.setEnd(b,b.getLength()):this.setEnd(b,b.getChildCount());break;case CKEDITOR.POSITION_BEFORE_START:this.setEndBefore(b);break;case CKEDITOR.POSITION_AFTER_END:this.setEndAfter(b)}a(this)}, -fixBlock:function(a,b){var c=this.createBookmark(),d=this.document.createElement(b);this.collapse(a);this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS);this.extractContents().appendTo(d);d.trim();this.insertNode(d);var f=d.getBogus();f&&f.remove();d.appendBogus();this.moveToBookmark(c);return d},splitBlock:function(a,b){var c=new CKEDITOR.dom.elementPath(this.startContainer,this.root),d=new CKEDITOR.dom.elementPath(this.endContainer,this.root),f=c.block,h=d.block,p=null;if(!c.blockLimit.equals(d.blockLimit))return null; -"br"!=a&&(f||(f=this.fixBlock(!0,a),h=(new CKEDITOR.dom.elementPath(this.endContainer,this.root)).block),h||(h=this.fixBlock(!1,a)));c=f&&this.checkStartOfBlock();d=h&&this.checkEndOfBlock();this.deleteContents();f&&f.equals(h)&&(d?(p=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(h,CKEDITOR.POSITION_AFTER_END),h=null):c?(p=new CKEDITOR.dom.elementPath(this.startContainer,this.root),this.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f=null):(h=this.splitElement(f, -b||!1),f.is("ul","ol")||f.appendBogus()));return{previousBlock:f,nextBlock:h,wasStartOfBlock:c,wasEndOfBlock:d,elementPath:p}},splitElement:function(a,b){if(!this.collapsed)return null;this.setEndAt(a,CKEDITOR.POSITION_BEFORE_END);var c=this.extractContents(!1,b||!1),d=a.clone(!1,b||!1);c.appendTo(d);d.insertAfter(a);this.moveToPosition(a,CKEDITOR.POSITION_AFTER_END);return d},removeEmptyBlocksAtEnd:function(){function a(d){return function(a){return b(a)||c(a)||a.type==CKEDITOR.NODE_ELEMENT&&a.isEmptyInlineRemoveable()|| -d.is("table")&&a.is("caption")?!1:!0}}var b=CKEDITOR.dom.walker.whitespaces(),c=CKEDITOR.dom.walker.bookmark(!1);return function(b){for(var c=this.createBookmark(),d=this[b?"endPath":"startPath"](),f=d.block||d.blockLimit,h;f&&!f.equals(d.root)&&!f.getFirst(a(f));)h=f.getParent(),this[b?"setEndAt":"setStartAt"](f,CKEDITOR.POSITION_AFTER_END),f.remove(1),f=h;this.moveToBookmark(c)}}(),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,b){var d=b==CKEDITOR.START,f=this.clone();f.collapse(d);f[d?"setStartAt":"setEndAt"](a,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END);f=new CKEDITOR.dom.walker(f);f.evaluator=c(d);return f[d?"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)),g.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=b();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)),g.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=b();return a.checkForward()},getPreviousNode:function(a,b,c){var d=this.clone();d.collapse(1);d.setStartAt(c||this.root,CKEDITOR.POSITION_AFTER_START);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.previous()},getNextNode:function(a,b,c){var d=this.clone();d.collapse();d.setEndAt(c||this.root,CKEDITOR.POSITION_BEFORE_END);c=new CKEDITOR.dom.walker(d);c.evaluator=a;c.guard=b;return c.next()},checkReadOnly:function(){function a(b,c){for(;b;){if(b.type== -CKEDITOR.NODE_ELEMENT){if("false"==b.getAttribute("contentEditable")&&!b.data("cke-editable"))return 0;if(b.is("html")||"true"==b.getAttribute("contentEditable")&&(b.contains(c)||b.equals(c)))break}b=b.getParent()}return 1}return function(){var b=this.startContainer,c=this.endContainer;return!(a(b,c)&&a(c,b))}}(),moveToElementEditablePosition:function(a,b){if(a.type==CKEDITOR.NODE_ELEMENT&&!a.isEditable(!1))return this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START), -!0;for(var c=0;a;){if(a.type==CKEDITOR.NODE_TEXT){b&&this.endContainer&&this.checkEndOfBlock()&&g.test(a.getText())?this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START):this.moveToPosition(a,b?CKEDITOR.POSITION_AFTER_END:CKEDITOR.POSITION_BEFORE_START);c=1;break}if(a.type==CKEDITOR.NODE_ELEMENT)if(a.isEditable())this.moveToPosition(a,b?CKEDITOR.POSITION_BEFORE_END:CKEDITOR.POSITION_AFTER_START),c=1;else if(b&&a.is("br")&&this.endContainer&&this.checkEndOfBlock())this.moveToPosition(a,CKEDITOR.POSITION_BEFORE_START); -else if("false"==a.getAttribute("contenteditable")&&a.is(CKEDITOR.dtd.$block))return this.setStartBefore(a),this.setEndAfter(a),!0;var d=a,f=c,h=void 0;d.type==CKEDITOR.NODE_ELEMENT&&d.isEditable(!1)&&(h=d[b?"getLast":"getFirst"](r));f||h||(h=d[b?"getPrevious":"getNext"](r));a=h}return!!c},moveToClosestEditablePosition:function(a,b){var c,d=0,f,h,p=[CKEDITOR.POSITION_AFTER_END,CKEDITOR.POSITION_BEFORE_START];a?(c=new CKEDITOR.dom.range(this.root),c.moveToPosition(a,p[b?0:1])):c=this.clone();if(a&& -!a.is(CKEDITOR.dtd.$block))d=1;else if(f=c[b?"getNextEditableNode":"getPreviousEditableNode"]())d=1,(h=f.type==CKEDITOR.NODE_ELEMENT)&&f.is(CKEDITOR.dtd.$block)&&"false"==f.getAttribute("contenteditable")?(c.setStartAt(f,CKEDITOR.POSITION_BEFORE_START),c.setEndAt(f,CKEDITOR.POSITION_AFTER_END)):!CKEDITOR.env.needsBrFiller&&h&&f.is(CKEDITOR.dom.walker.validEmptyBlockContainers)?(c.setEnd(f,0),c.collapse()):c.moveToPosition(f,p[b?1:0]);d&&this.moveToRange(c);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),b=CKEDITOR.dom.walker.bookmark(!1,!0),c=CKEDITOR.dom.walker.whitespaces(!0);a.evaluator=function(a){return c(a)&&b(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:f(),getPreviousEditableNode:f(1),_getTableElement:function(a){a=a||{td:1,th:1,tr:1,tbody:1,thead:1,tfoot:1,table:1};var b=this.startContainer,c=this.endContainer,d=b.getAscendant("table",!0),f=c.getAscendant("table",!0);return CKEDITOR.env.safari&&d&&c.equals(this.root)? -b.getAscendant(a,!0):this.getEnclosedNode()?this.getEnclosedNode().getAscendant(a,!0):d&&f&&(d.equals(f)||d.contains(f)||f.contains(d))?b.getAscendant(a,!0):null},scrollIntoView:function(){var a=new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e",this.document),b,c,d,f=this.clone();f.optimize();(d=f.startContainer.type==CKEDITOR.NODE_TEXT)?(c=f.startContainer.getText(),b=f.startContainer.split(f.startOffset),a.insertAfter(f.startContainer)):f.insertNode(a);a.scrollIntoView(); -d&&(f.startContainer.setText(c),b.remove());a.remove()},_setStartContainer:function(a){this.startContainer=a},_setEndContainer:function(a){this.endContainer=a},_find:function(a,b){var c=this.getCommonAncestor(),d=this.getBoundaryNodes(),f=[],h,p,g,k;if(c&&c.find)for(p=c.find(a),h=0;harguments.length||(this.range=a,this.forceBrBreak=0,this.enlargeBr=1,this.enforceRealBlocks=0,this._||(this._={}))}function d(a){var b=[];a.forEach(function(a){if("true"==a.getAttribute("contenteditable"))return b.push(a),!1},CKEDITOR.NODE_ELEMENT,!0);return b}function b(a,c,f,h){a:{null==h&&(h=d(f));for(var g;g=h.shift();)if(g.getDtd().p){h={element:g,remaining:h};break a}h=null}if(!h)return 0;if((g=CKEDITOR.filter.instances[h.element.data("cke-filter")])&&!g.check(c))return b(a, -c,f,h.remaining);c=new CKEDITOR.dom.range(h.element);c.selectNodeContents(h.element);c=c.createIterator();c.enlargeBr=a.enlargeBr;c.enforceRealBlocks=a.enforceRealBlocks;c.activeFilter=c.filter=g;a._.nestedEditable={element:h.element,container:f,remaining:h.remaining,iterator:c};return 1}function c(a,b,c){if(!b)return!1;a=a.clone();a.collapse(!c);return a.checkBoundaryOfElement(b,c?CKEDITOR.START:CKEDITOR.END)}var f=/^[\r\n\t ]+$/,h=CKEDITOR.dom.walker.bookmark(!1,!0),k=CKEDITOR.dom.walker.whitespaces(!0), -g=function(a){return h(a)&&k(a)},m={dd:1,dt:1,li:1};a.prototype={getNextParagraph:function(a){var d,k,x,B,D;a=a||"p";if(this._.nestedEditable){if(d=this._.nestedEditable.iterator.getNextParagraph(a))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,d;this.activeFilter=this.filter;if(b(this,a,this._.nestedEditable.container,this._.nestedEditable.remaining))return this.activeFilter=this._.nestedEditable.iterator.activeFilter,this._.nestedEditable.iterator.getNextParagraph(a);this._.nestedEditable= -null}if(!this.range.root.getDtd()[a])return null;if(!this._.started){var w=this.range.clone();k=w.startPath();var p=w.endPath(),J=!w.collapsed&&c(w,k.block),u=!w.collapsed&&c(w,p.block,1);w.shrink(CKEDITOR.SHRINK_ELEMENT,!0);J&&w.setStartAt(k.block,CKEDITOR.POSITION_BEFORE_END);u&&w.setEndAt(p.block,CKEDITOR.POSITION_AFTER_START);k=w.endContainer.hasAscendant("pre",!0)||w.startContainer.hasAscendant("pre",!0);w.enlarge(this.forceBrBreak&&!k||!this.enlargeBr?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS); -w.collapsed||(k=new CKEDITOR.dom.walker(w.clone()),p=CKEDITOR.dom.walker.bookmark(!0,!0),k.evaluator=p,this._.nextNode=k.next(),k=new CKEDITOR.dom.walker(w.clone()),k.evaluator=p,k=k.previous(),this._.lastNode=k.getNextSourceNode(!0,null,w.root),this._.lastNode&&this._.lastNode.type==CKEDITOR.NODE_TEXT&&!CKEDITOR.tools.trim(this._.lastNode.getText())&&this._.lastNode.getParent().isBlockBoundary()&&(p=this.range.clone(),p.moveToPosition(this._.lastNode,CKEDITOR.POSITION_AFTER_END),p.checkEndOfBlock()&& -(p=new CKEDITOR.dom.elementPath(p.endContainer,p.root),this._.lastNode=(p.block||p.blockLimit).getNextSourceNode(!0))),this._.lastNode&&w.root.contains(this._.lastNode)||(this._.lastNode=this._.docEndMarker=w.document.createText(""),this._.lastNode.insertAfter(k)),w=null);this._.started=1;k=w}p=this._.nextNode;w=this._.lastNode;for(this._.nextNode=null;p;){var J=0,u=p.hasAscendant("pre"),K=p.type!=CKEDITOR.NODE_ELEMENT,l=0;if(K)p.type==CKEDITOR.NODE_TEXT&&f.test(p.getText())&&(K=0);else{var q=p.getName(); -if(CKEDITOR.dtd.$block[q]&&"false"==p.getAttribute("contenteditable")){d=p;b(this,a,d);break}else if(p.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){if("br"==q)K=1;else if(!k&&!p.getChildCount()&&"hr"!=q){d=p;x=p.equals(w);break}k&&(k.setEndAt(p,CKEDITOR.POSITION_BEFORE_START),"br"!=q&&(this._.nextNode=p));J=1}else{if(p.getFirst()){k||(k=this.range.clone(),k.setStartAt(p,CKEDITOR.POSITION_BEFORE_START));p=p.getFirst();continue}K=1}}K&&!k&&(k=this.range.clone(),k.setStartAt(p,CKEDITOR.POSITION_BEFORE_START)); -x=(!J||K)&&p.equals(w);if(k&&!J)for(;!p.getNext(g)&&!x;){q=p.getParent();if(q.isBlockBoundary(this.forceBrBreak&&!u&&{br:1})){J=1;K=0;x||q.equals(w);k.setEndAt(q,CKEDITOR.POSITION_BEFORE_END);break}p=q;K=1;x=p.equals(w);l=1}K&&k.setEndAt(p,CKEDITOR.POSITION_AFTER_END);p=this._getNextSourceNode(p,l,w);if((x=!p)||J&&k)break}if(!d){if(!k)return this._.docEndMarker&&this._.docEndMarker.remove(),this._.nextNode=null;d=new CKEDITOR.dom.elementPath(k.startContainer,k.root);p=d.blockLimit;J={div:1,th:1,td:1}; -d=d.block;!d&&p&&!this.enforceRealBlocks&&J[p.getName()]&&k.checkStartOfBlock()&&k.checkEndOfBlock()&&!p.equals(k.root)?d=p:!d||this.enforceRealBlocks&&d.is(m)?(d=this.range.document.createElement(a),k.extractContents().appendTo(d),d.trim(),k.insertNode(d),B=D=!0):"li"!=d.getName()?k.checkStartOfBlock()&&k.checkEndOfBlock()||(d=d.clone(!1),k.extractContents().appendTo(d),d.trim(),D=k.splitBlock(),B=!D.wasStartOfBlock,D=!D.wasEndOfBlock,k.insertNode(d)):x||(this._.nextNode=d.equals(w)?null:this._getNextSourceNode(k.getBoundaryNodes().endNode, -1,w))}B&&(B=d.getPrevious())&&B.type==CKEDITOR.NODE_ELEMENT&&("br"==B.getName()?B.remove():B.getLast()&&"br"==B.getLast().$.nodeName.toLowerCase()&&B.getLast().remove());D&&(B=d.getLast())&&B.type==CKEDITOR.NODE_ELEMENT&&"br"==B.getName()&&(!CKEDITOR.env.needsBrFiller||B.getPrevious(h)||B.getNext(h))&&B.remove();this._.nextNode||(this._.nextNode=x||d.equals(w)||!w?null:this._getNextSourceNode(d,1,w));return d},_getNextSourceNode:function(a,b,c){function d(a){return!(a.equals(c)||a.equals(f))}var f= -this.range.root;for(a=a.getNextSourceNode(b,null,d);!h(a);)a=a.getNextSourceNode(b,null,d);return a}};CKEDITOR.dom.range.prototype.createIterator=function(){return new a(this)}})(); -CKEDITOR.command=function(a,d){this.uiItems=[];this.exec=function(b){if(this.state==CKEDITOR.TRISTATE_DISABLED||!this.checkAllowed())return!1;this.editorFocus&&a.focus();return!1===this.fire("exec")?!0:!1!==d.exec.call(this,a,b)};this.refresh=function(a,b){if(!this.readOnly&&a.readOnly)return!0;if(this.context&&!b.isContextFor(this.context)||!this.checkAllowed(!0))return this.disable(),!0;this.startDisabled||this.enable();this.modes&&!this.modes[a.mode]&&this.disable();return!1===this.fire("refresh", -{editor:a,path:b})?!0:d.refresh&&!1!==d.refresh.apply(this,arguments)};var b;this.checkAllowed=function(c){return c||"boolean"!=typeof b?b=a.activeFilter.checkFeature(this):b};CKEDITOR.tools.extend(this,d,{modes:{wysiwyg:1},editorFocus:1,contextSensitive:!!d.context,state:CKEDITOR.TRISTATE_DISABLED});CKEDITOR.event.call(this)}; -CKEDITOR.command.prototype={enable:function(){this.state==CKEDITOR.TRISTATE_DISABLED&&this.checkAllowed()&&this.setState(this.preserveState&&"undefined"!=typeof this.previousState?this.previousState:CKEDITOR.TRISTATE_OFF)},disable:function(){this.setState(CKEDITOR.TRISTATE_DISABLED)},setState:function(a){if(this.state==a||a!=CKEDITOR.TRISTATE_DISABLED&&!this.checkAllowed())return!1;this.previousState=this.state;this.state=a;this.fire("state");return!0},toggleState:function(){this.state==CKEDITOR.TRISTATE_OFF? -this.setState(CKEDITOR.TRISTATE_ON):this.state==CKEDITOR.TRISTATE_ON&&this.setState(CKEDITOR.TRISTATE_OFF)}};CKEDITOR.event.implementOn(CKEDITOR.command.prototype);CKEDITOR.ENTER_P=1;CKEDITOR.ENTER_BR=2;CKEDITOR.ENTER_DIV=3; -CKEDITOR.config={customConfig:"config.js",autoUpdateElement:!0,language:"",defaultLanguage:"en",contentsLangDirection:"",enterMode:CKEDITOR.ENTER_P,forceEnterMode:!1,shiftEnterMode:CKEDITOR.ENTER_BR,docType:"\x3c!DOCTYPE html\x3e",bodyId:"",bodyClass:"",fullPage:!1,height:200,contentsCss:CKEDITOR.getUrl("contents.css"),extraPlugins:"",removePlugins:"",protectedSource:[],tabIndex:0,width:"",baseFloatZIndex:1E4,blockedKeystrokes:[CKEDITOR.CTRL+66,CKEDITOR.CTRL+73,CKEDITOR.CTRL+85]}; -(function(){function a(a,b,c,d,f){var e,v;a=[];for(e in b){v=b[e];v="boolean"==typeof v?{}:"function"==typeof v?{match:v}:C(v);"$"!=e.charAt(0)&&(v.elements=e);c&&(v.featureName=c.toLowerCase());var l=v;l.elements=k(l.elements,/\s+/)||null;l.propertiesOnly=l.propertiesOnly||!0===l.elements;var n=/\s*,\s*/,p=void 0;for(p in P){l[p]=k(l[p],n)||null;var h=l,q=O[p],t=k(l[O[p]],n),A=l[p],z=[],g=!0,H=void 0;t?g=!1:t={};for(H in A)"!"==H.charAt(0)&&(H=H.slice(1),z.push(H),t[H]=!0,g=!1);for(;H=z.pop();)A[H]= -A["!"+H],delete A["!"+H];h[q]=(g?!1:t)||null}l.match=l.match||null;d.push(v);a.push(v)}b=f.elements;f=f.generic;var F;c=0;for(d=a.length;c=--g&&(h&&CKEDITOR.document.getDocumentElement().removeStyle("cursor"),e(b))},x=function(b,c){a[b]=1;var f=d[b];delete d[b];for(var e=0;e=CKEDITOR.env.version||CKEDITOR.env.ie9Compat)?e.$.onreadystatechange=function(){if("loaded"==e.$.readyState||"complete"==e.$.readyState)e.$.onreadystatechange=null,x(b,!0)}:(e.$.onload=function(){setTimeout(function(){x(b,!0)},0)},e.$.onerror=function(){x(b,!1)}));e.appendTo(CKEDITOR.document.getHead())}}};h&&CKEDITOR.document.getDocumentElement().setStyle("cursor","wait");for(var D=0;D]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g}}; -(function(){var a=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,d={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(b){for(var c,f,h=0,k;c=this._.htmlPartsRegex.exec(b);){f=c.index;if(f>h)if(h=b.substring(h,f),k)k.push(h);else this.onText(h); -h=this._.htmlPartsRegex.lastIndex;if(f=c[1])if(f=f.toLowerCase(),k&&CKEDITOR.dtd.$cdata[f]&&(this.onCDATA(k.join("")),k=null),!k){this.onTagClose(f);continue}if(k)k.push(c[0]);else if(f=c[3]){if(f=f.toLowerCase(),!/="/.test(f)){var g={},m,r=c[4];c=!!c[5];if(r)for(;m=a.exec(r);){var e=m[1].toLowerCase();m=m[2]||m[3]||m[4]||"";g[e]=!m&&d[e]?e:CKEDITOR.tools.htmlDecodeAttr(m)}this.onTagOpen(f,g,c);!k&&CKEDITOR.dtd.$cdata[f]&&(k=[])}}else if(f=c[2])this.onComment(f)}if(b.length>h)this.onText(b.substring(h, -b.length))}}})(); -CKEDITOR.htmlParser.basicWriter=CKEDITOR.tools.createClass({$:function(){this._={output:[]}},proto:{openTag:function(a){this._.output.push("\x3c",a)},openTagClose:function(a,d){d?this._.output.push(" /\x3e"):this._.output.push("\x3e")},attribute:function(a,d){"string"==typeof d&&(d=CKEDITOR.tools.htmlEncodeAttr(d));this._.output.push(" ",a,'\x3d"',d,'"')},closeTag:function(a){this._.output.push("\x3c/",a,"\x3e")},text:function(a){this._.output.push(a)},comment:function(a){this._.output.push("\x3c!--",a, -"--\x3e")},write:function(a){this._.output.push(a)},reset:function(){this._.output=[];this._.indent=!1},getHtml:function(a){var d=this._.output.join("");a&&this.reset();return d}}});"use strict"; -(function(){CKEDITOR.htmlParser.node=function(){};CKEDITOR.htmlParser.node.prototype={remove:function(){var a=this.parent.children,d=CKEDITOR.tools.indexOf(a,this),b=this.previous,c=this.next;b&&(b.next=c);c&&(c.previous=b);a.splice(d,1);this.parent=null},replaceWith:function(a){var d=this.parent.children,b=CKEDITOR.tools.indexOf(d,this),c=a.previous=this.previous,f=a.next=this.next;c&&(c.next=a);f&&(f.previous=a);d[b]=a;a.parent=this.parent;this.parent=null},insertAfter:function(a){var d=a.parent.children, -b=CKEDITOR.tools.indexOf(d,a),c=a.next;d.splice(b+1,0,this);this.next=a.next;this.previous=a;a.next=this;c&&(c.previous=this);this.parent=a.parent},insertBefore:function(a){var d=a.parent.children,b=CKEDITOR.tools.indexOf(d,a);d.splice(b,0,this);this.next=a;(this.previous=a.previous)&&(a.previous.next=this);a.previous=this;this.parent=a.parent},getAscendant:function(a){var d="function"==typeof a?a:"string"==typeof a?function(b){return b.name==a}:function(b){return b.name in a},b=this.parent;for(;b&& -b.type==CKEDITOR.NODE_ELEMENT;){if(d(b))return b;b=b.parent}return null},wrapWith:function(a){this.replaceWith(a);a.add(this);return a},getIndex:function(){return CKEDITOR.tools.indexOf(this.parent.children,this)},getFilterContext:function(a){return a||{}}}})();"use strict";CKEDITOR.htmlParser.comment=function(a){this.value=a;this._={isBlockLike:!1}}; -CKEDITOR.htmlParser.comment.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_COMMENT,filter:function(a,d){var b=this.value;if(!(b=a.onComment(d,b,this)))return this.remove(),!1;if("string"!=typeof b)return this.replaceWith(b),!1;this.value=b;return!0},writeHtml:function(a,d){d&&this.filter(d);a.comment(this.value)}});"use strict"; -(function(){CKEDITOR.htmlParser.text=function(a){this.value=a;this._={isBlockLike:!1}};CKEDITOR.htmlParser.text.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(a,d){if(!(this.value=a.onText(d,this.value,this)))return this.remove(),!1},writeHtml:function(a,d){d&&this.filter(d);a.text(this.value)}})})();"use strict"; -(function(){CKEDITOR.htmlParser.cdata=function(a){this.value=a};CKEDITOR.htmlParser.cdata.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_TEXT,filter:function(){},writeHtml:function(a){a.write(this.value)}})})();"use strict";CKEDITOR.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:!0,hasInlineStarted:!1}}; -(function(){function a(a){return a.attributes["data-cke-survive"]?!1:"a"==a.name&&a.attributes.href||CKEDITOR.dtd.$removeEmpty[a.name]}var d=CKEDITOR.tools.extend({table:1,ul:1,ol:1,dl:1},CKEDITOR.dtd.table,CKEDITOR.dtd.ul,CKEDITOR.dtd.ol,CKEDITOR.dtd.dl),b={ol:1,ul:1},c=CKEDITOR.tools.extend({},{html:1},CKEDITOR.dtd.html,CKEDITOR.dtd.body,CKEDITOR.dtd.head,{style:1,script:1}),f={ul:"li",ol:"li",dl:"dd",table:"tbody",tbody:"tr",thead:"tr",tfoot:"tr",tr:"td"};CKEDITOR.htmlParser.fragment.fromHtml= -function(h,k,g){function m(a){var b;if(0k;k++)if(h=d[k]){h=h.exec(a,c,this);if(!1===h)return null;if(h&&h!=c)return this.onNode(a,h);if(c.parent&&!c.name)break}return c}, -onNode:function(a,c){var d=c.type;return d==CKEDITOR.NODE_ELEMENT?this.onElement(a,c):d==CKEDITOR.NODE_TEXT?new CKEDITOR.htmlParser.text(this.onText(a,c.value)):d==CKEDITOR.NODE_COMMENT?new CKEDITOR.htmlParser.comment(this.onComment(a,c.value)):null},onAttribute:function(a,c,d,h){return(d=this.attributesRules[d])?d.exec(a,h,c,this):h}}});CKEDITOR.htmlParser.filterRulesGroup=a;a.prototype={add:function(a,c,d){this.rules.splice(this.findIndex(c),0,{value:a,priority:c,options:d})},addMany:function(a, -c,d){for(var h=[this.findIndex(c),0],k=0,g=a.length;k/g,"\x26gt;")+"\x3c/textarea\x3e");return"\x3ccke:encoded\x3e"+encodeURIComponent(a)+"\x3c/cke:encoded\x3e"})}function y(a){return a.replace(P,function(a,b){return decodeURIComponent(b)})}function x(a){return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, -function(a){return"\x3c!--"+J+"{C}"+encodeURIComponent(a).replace(/--/g,"%2D%2D")+"--\x3e"})}function B(a){return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)})}function D(a,b){var c=b._.dataStore;return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g,function(a,b){return decodeURIComponent(b)}).replace(/\{cke_protected_(\d+)\}/g,function(a,b){return c&&c[b]||""})}function w(a,b){var c=[],d=b.config.protectedSource,f=b._.dataStore||(b._.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}"+(c.push(a)-1)+"--\x3e"});for(var l=0;l]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g,function(a){return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g,function(a,b){f[f.id]=decodeURIComponent(b);return"{cke_protected_"+f.id++ +"}"})});return a=a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g,function(a,c,d,f){return"\x3c"+c+d+"\x3e"+D(B(f),b)+"\x3c/"+c+"\x3e"})}CKEDITOR.htmlDataProcessor=function(b){var c, -f,l=this;this.editor=b;this.dataFilter=c=new CKEDITOR.htmlParser.filter;this.htmlFilter=f=new CKEDITOR.htmlParser.filter;this.writer=new CKEDITOR.htmlParser.basicWriter;c.addRules(q);c.addRules(F,{applyToAll:!0});c.addRules(a(b,"data"),{applyToAll:!0});f.addRules(L);f.addRules(E,{applyToAll:!0});f.addRules(a(b,"html"),{applyToAll:!0});b.on("toHtml",function(a){a=a.data;var c=a.dataValue,f,c=w(c,b),c=e(c,H),c=r(c),c=e(c,z),c=c.replace(O,"$1cke:$2"),c=c.replace(N,"\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), -c=c.replace(/(]*>)(\r\n|\n)/g,"$1$2$2"),c=c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi,"$1data-cke-"+CKEDITOR.rnd+"-$2");f=a.context||b.editable().getName();var l;CKEDITOR.env.ie&&9>CKEDITOR.env.version&&"pre"==f&&(f="div",c="\x3cpre\x3e"+c+"\x3c/pre\x3e",l=1);f=b.document.createElement(f);f.setHtml("a"+c);c=f.getHtml().substr(1);c=c.replace(new RegExp("data-cke-"+CKEDITOR.rnd+"-","ig"),"");l&&(c=c.replace(/^
|<\/pre>$/gi,""));c=c.replace(n,"$1$2");c=y(c);c=B(c);f=!1===a.fixForBody?!1:
-d(a.enterMode,b.config.autoParagraph);c=CKEDITOR.htmlParser.fragment.fromHtml(c,a.context,f);f&&(l=c,!l.children.length&&CKEDITOR.dtd[l.name][f]&&(f=new CKEDITOR.htmlParser.element(f),l.add(f)));a.dataValue=c},null,null,5);b.on("toHtml",function(a){a.data.filter.applyTo(a.data.dataValue,!0,a.data.dontFilter,a.data.enterMode)&&b.fire("dataFiltered")},null,null,6);b.on("toHtml",function(a){a.data.dataValue.filterChildren(l.dataFilter,!0)},null,null,10);b.on("toHtml",function(a){a=a.data;var b=a.dataValue,
-c=new CKEDITOR.htmlParser.basicWriter;b.writeChildrenHtml(c);b=c.getHtml(!0);a.dataValue=x(b)},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,d(a.data.enterMode,b.config.autoParagraph))},null,null,5);b.on("toDataFormat",function(a){a.data.dataValue.filterChildren(l.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=l.writer;d.reset();c.writeChildrenHtml(d);c=d.getHtml(!0);c=B(c);c=D(c,b);a.data.dataValue=c},null,null,15)};CKEDITOR.htmlDataProcessor.prototype={toHtml:function(a,b,c,d){var f=this.editor,e,l,n,h;b&&"object"==typeof b?(e=b.context,c=b.fixForBody,d=b.dontFilter,l=b.filter,n=b.enterMode,h=b.protectedWhitespaces):e=b;e||null===e||(e=f.editable().getName());return f.fire("toHtml",{dataValue:a,context:e,fixForBody:c,dontFilter:d, -filter:l||f.filter,enterMode:n||f.enterMode,protectedWhitespaces:h}).dataValue},toDataFormat:function(a,b){var c,d,f;b&&(c=b.context,d=b.filter,f=b.enterMode);c||null===c||(c=this.editor.editable().getName());return this.editor.fire("toDataFormat",{dataValue:a,filter:d||this.editor.filter,context:c,enterMode:f||this.editor.enterMode}).dataValue}};var p=/(?: |\xa0)$/,J="{cke_protected}",u=CKEDITOR.dtd,K="caption colgroup col thead tfoot tbody".split(" "),l=CKEDITOR.tools.extend({},u.$blockLimit, -u.$block),q={elements:{input:g,textarea:g}},F={attributeNames:[[/^on/,"data-cke-pa-on"],[/^srcdoc/,"data-cke-pa-srcdoc"],[/^data-cke-expando$/,""]],elements:{iframe:function(a){if(a.attributes&&a.attributes.src){var b=a.attributes.src.toLowerCase().replace(/[^a-z]/gi,"");if(0===b.indexOf("javascript")||0===b.indexOf("data"))a.attributes["data-cke-pa-src"]=a.attributes.src,delete a.attributes.src}}}},L={elements:{embed:function(a){var b=a.parent;if(b&&"object"==b.name){var c=b.attributes.width,b=b.attributes.height; -c&&(a.attributes.width=c);b&&(a.attributes.height=b)}},a:function(a){var b=a.attributes;if(!(a.children.length||b.name||b.id||a.attributes["data-cke-saved-name"]))return!1}}},E={elementNames:[[/^cke:/,""],[/^\?xml:namespace$/,""]],attributeNames:[[/^data-cke-(saved|pa)-/,""],[/^data-cke-.*/,""],["hidefocus",""]],elements:{$:function(a){var b=a.attributes;if(b){if(b["data-cke-temp"])return!1;for(var c=["name","href","src"],d,f=0;fd?1:-1})},param:function(a){a.children=[];a.isEmpty=!0;return a},span:function(a){"Apple-style-span"==a.attributes["class"]&&delete a.name},html:function(a){delete a.attributes.contenteditable;delete a.attributes["class"]},body:function(a){delete a.attributes.spellcheck; -delete a.attributes.contenteditable},style:function(a){var b=a.children[0];b&&b.value&&(b.value=CKEDITOR.tools.trim(b.value));a.attributes.type||(a.attributes.type="text/css")},title:function(a){var b=a.children[0];!b&&k(a,b=new CKEDITOR.htmlParser.text);b.value=a.attributes["data-cke-title"]||""},input:m,textarea:m},attributes:{"class":function(a){return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g,""))||!1}}};CKEDITOR.env.ie&&(E.attributes.style=function(a){return a.replace(/(^|;)([^\:]+)/g, -function(a){return a.toLowerCase()})});var M=/<(a|area|img|input|source)\b([^>]*)>/gi,t=/([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,C=/^(href|src|name)$/i,z=/(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,H=/(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi,P=/([^<]*)<\/cke:encoded>/gi,O=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,n=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,N=/]*?)\/?>(?!\s*<\/cke:\1)/gi})(); -"use strict";CKEDITOR.htmlParser.element=function(a,d){this.name=a;this.attributes=d||{};this.children=[];var b=a||"",c=b.match(/^cke:(.*)/);c&&(b=c[1]);b=!!(CKEDITOR.dtd.$nonBodyContent[b]||CKEDITOR.dtd.$block[b]||CKEDITOR.dtd.$listItem[b]||CKEDITOR.dtd.$tableContent[b]||CKEDITOR.dtd.$nonEditable[b]||"br"==b);this.isEmpty=!!CKEDITOR.dtd.$empty[a];this.isUnknown=!CKEDITOR.dtd[a];this._={isBlockLike:b,hasInlineStarted:this.isEmpty||!b}}; -CKEDITOR.htmlParser.cssStyle=function(a){var d={};((a instanceof CKEDITOR.htmlParser.element?a.attributes.style:a)||"").replace(/"/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(a,c,f){"font-family"==c&&(f=f.replace(/["']/g,""));d[c.toLowerCase()]=f});return{rules:d,populate:function(a){var c=this.toString();c&&(a instanceof CKEDITOR.dom.element?a.setAttribute("style",c):a instanceof CKEDITOR.htmlParser.element?a.attributes.style=c:a.style=c)},toString:function(){var a=[],c; -for(c in d)d[c]&&a.push(c,":",d[c],";");return a.join("")}}}; -(function(){function a(a){return function(b){return b.type==CKEDITOR.NODE_ELEMENT&&("string"==typeof a?b.name==a:b.name in a)}}var d=function(a,b){a=a[0];b=b[0];return ab?1:0},b=CKEDITOR.htmlParser.fragment.prototype;CKEDITOR.htmlParser.element.prototype=CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node,{type:CKEDITOR.NODE_ELEMENT,add:b.add,clone:function(){return new CKEDITOR.htmlParser.element(this.name,this.attributes)},filter:function(a,b){var d=this,k,g;b=d.getFilterContext(b);if(b.off)return!0; -if(!d.parent)a.onRoot(b,d);for(;;){k=d.name;if(!(g=a.onElementName(b,k)))return this.remove(),!1;d.name=g;if(!(d=a.onElement(b,d)))return this.remove(),!1;if(d!==this)return this.replaceWith(d),!1;if(d.name==k)break;if(d.type!=CKEDITOR.NODE_ELEMENT)return this.replaceWith(d),!1;if(!d.name)return this.replaceWithChildren(),!1}k=d.attributes;var m,r;for(m in k){for(g=k[m];;)if(r=a.onAttributeName(b,m))if(r!=m)delete k[m],m=r;else break;else{delete k[m];break}r&&(!1===(g=a.onAttribute(b,d,r,g))?delete k[r]: -k[r]=g)}d.isEmpty||this.filterChildren(a,!1,b);return!0},filterChildren:b.filterChildren,writeHtml:function(a,b){b&&this.filter(b);var h=this.name,k=[],g=this.attributes,m,r;a.openTag(h,g);for(m in g)k.push([m,g[m]]);a.sortAttributes&&k.sort(d);m=0;for(r=k.length;mCKEDITOR.env.version||CKEDITOR.env.quirks))this.hasFocus&&(this.focus(),b());else if(this.hasFocus)this.focus(),a();else this.once("focus", -function(){a()},null,null,-999)},getHtmlFromRange:function(a){if(a.collapsed)return new CKEDITOR.dom.documentFragment(a.document);a={doc:this.getDocument(),range:a.clone()};u.eol.detect(a,this);u.bogus.exclude(a);u.cell.shrink(a);a.fragment=a.range.cloneContents();u.tree.rebuild(a,this);u.eol.fix(a,this);return new CKEDITOR.dom.documentFragment(a.fragment.$)},extractHtmlFromRange:function(a,b){var c=K,d={range:a,doc:a.document},e=this.getHtmlFromRange(a);if(a.collapsed)return a.optimize(),e;a.enlarge(CKEDITOR.ENLARGE_INLINE, -1);c.table.detectPurge(d);d.bookmark=a.createBookmark();delete d.range;var f=this.editor.createRange();f.moveToPosition(d.bookmark.startNode,CKEDITOR.POSITION_BEFORE_START);d.targetBookmark=f.createBookmark();c.list.detectMerge(d,this);c.table.detectRanges(d,this);c.block.detectMerge(d,this);d.tableContentsRanges?(c.table.deleteRanges(d),a.moveToBookmark(d.bookmark),d.range=a):(a.moveToBookmark(d.bookmark),d.range=a,a.extractContents(c.detectExtractMerge(d)));a.moveToBookmark(d.targetBookmark);a.optimize(); -c.fixUneditableRangePosition(a);c.list.merge(d,this);c.table.purge(d,this);c.block.merge(d,this);if(b){c=a.startPath();if(d=a.checkStartOfBlock()&&a.checkEndOfBlock()&&c.block&&!a.root.equals(c.block)){a:{var d=c.block.getElementsByTag("span"),f=0,t;if(d)for(;t=d.getItem(f++);)if(!y(t)){d=!0;break a}d=!1}d=!d}d&&(a.moveToPosition(c.block,CKEDITOR.POSITION_BEFORE_START),c.block.remove())}else c.autoParagraph(this.editor,a),x(a.startContainer)&&a.startContainer.appendBogus();a.startContainer.mergeSiblings(); -return e},setup:function(){var a=this.editor;this.attachListener(a,"beforeGetData",function(){var b=this.getData();this.is("textarea")||!1!==a.config.ignoreEmptyParagraph&&(b=b.replace(D,function(a,b){return b}));a.setData(b,null,1)},this);this.attachListener(a,"getSnapshot",function(a){a.data=this.getData(1)},this);this.attachListener(a,"afterSetData",function(){this.setData(a.getData(1))},this);this.attachListener(a,"loadSnapshot",function(a){this.setData(a.data,1)},this);this.attachListener(a, -"beforeFocus",function(){var b=a.getSelection();(b=b&&b.getNative())&&"Control"==b.type||this.focus()},this);this.attachListener(a,"insertHtml",function(a){this.insertHtml(a.data.dataValue,a.data.mode,a.data.range)},this);this.attachListener(a,"insertElement",function(a){this.insertElement(a.data)},this);this.attachListener(a,"insertText",function(a){this.insertText(a.data)},this);this.setReadOnly(a.readOnly);this.attachClass("cke_editable");a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?this.attachClass("cke_editable_inline"): -a.elementMode!=CKEDITOR.ELEMENT_MODE_REPLACE&&a.elementMode!=CKEDITOR.ELEMENT_MODE_APPENDTO||this.attachClass("cke_editable_themed");this.attachClass("cke_contents_"+a.config.contentsLangDirection);a.keystrokeHandler.blockedKeystrokes[8]=+a.readOnly;a.keystrokeHandler.attach(this);this.on("blur",function(){this.hasFocus=!1},null,null,-1);this.on("focus",function(){this.hasFocus=!0},null,null,-1);if(CKEDITOR.env.webkit)this.on("scroll",function(){a._.previousScrollTop=a.editable().$.scrollTop},null, -null,-1);if(CKEDITOR.env.edge&&14CKEDITOR.env.version?p.$.styleSheet.cssText=k:p.setText(k)):(k=f.appendStyleText(k),k=new CKEDITOR.dom.element(k.ownerNode||k.owningElement),g.setCustomData("stylesheet", -k),k.data("cke-temp",1))}g=f.getCustomData("stylesheet_ref")||0;f.setCustomData("stylesheet_ref",g+1);this.setCustomData("cke_includeReadonly",!a.config.disableReadonlyStyling);this.attachListener(this,"click",function(a){a=a.data;var b=(new CKEDITOR.dom.elementPath(a.getTarget(),this)).contains("a");b&&2!=a.$.button&&b.isReadOnly()&&a.preventDefault()});var t={8:1,46:1};this.attachListener(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey(),d;b=a.getSelection();if(0!==b.getRanges().length){if(c in -t){var f,g=b.getRanges()[0],n=g.startPath(),k,v,A,c=8==c;CKEDITOR.env.ie&&11>CKEDITOR.env.version&&(f=b.getSelectedElement())||(f=h(b))?(a.fire("saveSnapshot"),g.moveToPosition(f,CKEDITOR.POSITION_BEFORE_START),f.remove(),g.select(),a.fire("saveSnapshot"),d=1):g.collapsed&&((k=n.block)&&(A=k[c?"getPrevious":"getNext"](e))&&A.type==CKEDITOR.NODE_ELEMENT&&A.is("table")&&g[c?"checkStartOfBlock":"checkEndOfBlock"]()?(a.fire("saveSnapshot"),g[c?"checkEndOfBlock":"checkStartOfBlock"]()&&k.remove(),g["moveToElementEdit"+ -(c?"End":"Start")](A),g.select(),a.fire("saveSnapshot"),d=1):n.blockLimit&&n.blockLimit.is("td")&&(v=n.blockLimit.getAscendant("table"))&&g.checkBoundaryOfElement(v,c?CKEDITOR.START:CKEDITOR.END)&&(A=v[c?"getPrevious":"getNext"](e))?(a.fire("saveSnapshot"),g["moveToElementEdit"+(c?"End":"Start")](A),g.checkStartOfBlock()&&g.checkEndOfBlock()?A.remove():g.select(),a.fire("saveSnapshot"),d=1):(v=n.contains(["td","th","caption"]))&&g.checkBoundaryOfElement(v,c?CKEDITOR.START:CKEDITOR.END)&&(d=1))}return!d}}); -a.blockless&&CKEDITOR.env.ie&&CKEDITOR.env.needsBrFiller&&this.attachListener(this,"keyup",function(b){b.data.getKeystroke()in t&&!this.getFirst(c)&&(this.appendBogus(),b=a.createRange(),b.moveToPosition(this,CKEDITOR.POSITION_AFTER_START),b.select())});this.attachListener(this,"dblclick",function(b){if(a.readOnly)return!1;b={element:b.data.getTarget()};a.fire("doubleclick",b)});CKEDITOR.env.ie&&this.attachListener(this,"click",b);CKEDITOR.env.ie&&!CKEDITOR.env.edge||this.attachListener(this,"mousedown", -function(b){var c=b.data.getTarget();c.is("img","hr","input","textarea","select")&&!c.isReadOnly()&&(a.getSelection().selectElement(c),c.is("input","textarea","select")&&b.data.preventDefault())});CKEDITOR.env.edge&&this.attachListener(this,"mouseup",function(b){(b=b.data.getTarget())&&b.is("img")&&a.getSelection().selectElement(b)});CKEDITOR.env.gecko&&this.attachListener(this,"mouseup",function(b){if(2==b.data.$.button&&(b=b.data.getTarget(),!b.getOuterHtml().replace(D,""))){var c=a.createRange(); -c.moveToElementEditStart(b);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(a,"key",function(b){if(a.readOnly)return!0;var c=b.data.domEvent.getKey();if(c in t&&(b=a.getSelection(),0!==b.getRanges().length)){var c=8==c,d=b.getRanges()[0];b=d.startPath(); -if(d.collapsed)a:{var e=b.block;if(e&&d[c?"checkStartOfBlock":"checkEndOfBlock"]()&&d.moveToClosestEditablePosition(e,!c)&&d.collapsed){if(d.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=d.startContainer.getChild(d.startOffset-(c?1:0));if(f&&f.type==CKEDITOR.NODE_ELEMENT&&f.is("hr")){a.fire("saveSnapshot");f.remove();b=!0;break a}}d=d.startPath().block;if(!d||d&&d.contains(e))b=void 0;else{a.fire("saveSnapshot");var n;(n=(c?d:e).getBogus())&&n.remove();n=a.getSelection();f=n.createBookmarks(); -(c?e:d).moveChildren(c?d:e,!1);b.lastElement.mergeSiblings();r(e,d,!c);n.selectBookmarks(f);b=!0}}else b=!1}else c=d,n=b.block,d=c.endPath().block,n&&d&&!n.equals(d)?(a.fire("saveSnapshot"),(e=n.getBogus())&&e.remove(),c.enlarge(CKEDITOR.ENLARGE_INLINE),c.deleteContents(),d.getParent()&&(d.moveChildren(n,!1),b.lastElement.mergeSiblings(),r(n,d,!0)),c=a.getSelection().getRanges()[0],c.collapse(1),c.optimize(),""===c.startContainer.getHtml()&&c.startContainer.appendBogus(),c.select(),b=!0):b=!1;if(!b)return; -a.getSelection().scrollIntoView();a.fire("saveSnapshot");return!1}},this,null,100)}}},_:{detach:function(){this.editor.setData(this.editor.getData(),0,1);this.clearListeners();this.restoreAttrs();var a;if(a=this.removeCustomData("classes"))for(;a.length;)this.removeClass(a.pop());if(!this.is("textarea")){a=this.getDocument();var b=a.getHead();if(b.getCustomData("stylesheet")){var c=a.getCustomData("stylesheet_ref");--c?a.setCustomData("stylesheet_ref",c):(a.removeCustomData("stylesheet_ref"),b.removeCustomData("stylesheet").remove())}}this.editor.fire("contentDomUnload"); -delete this.editor}}});CKEDITOR.editor.prototype.editable=function(a){var b=this._.editable;if(b&&a)return 0;arguments.length&&(b=this._.editable=a?a instanceof CKEDITOR.editable?a:new CKEDITOR.editable(this,a):(b&&b.detach(),null));return b};CKEDITOR.on("instanceLoaded",function(b){var c=b.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(b){if(!c.readOnly){var d=c.getSelection();d&&!d.isLocked&&(d=c.checkDirty(),c.fire("lockSnapshot"),a(b),c.fire("unlockSnapshot"),!d&&c.resetDirty())}})});CKEDITOR.on("instanceCreated",function(a){var b=a.editor;b.on("mode",function(){var a=b.editable();if(a&&a.isInline()){var c=b.title;a.changeAttr("role","textbox");a.changeAttr("aria-label",c);c&&a.changeAttr("title",c);var d=b.fire("ariaEditorHelpLabel",{}).label; -if(d&&(c=this.ui.space(this.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?"top":"contents"))){var e=CKEDITOR.tools.getNextId(),d=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+e+'" class\x3d"cke_voice_label"\x3e'+d+"\x3c/span\x3e");c.append(d);a.changeAttr("aria-describedby",e)}}})});CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}");e=CKEDITOR.dom.walker.whitespaces(!0);y=CKEDITOR.dom.walker.bookmark(!1,!0);x=CKEDITOR.dom.walker.empty(); -B=CKEDITOR.dom.walker.bogus();D=/(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi;w=function(){function a(b){return b.type==CKEDITOR.NODE_ELEMENT}function b(c,d){var e,f,t,g,h=[],k=d.range.startContainer;e=d.range.startPath();for(var k=C[k.getName()],z=0,H=c.getChildren(),p=H.count(),m=-1,r=-1,P=0,E=e.contains(C.$list);zCKEDITOR.env.version&&d.getChildCount()&&d.getFirst().remove())}return function(d){var e=d.startContainer,f=e.getAscendant("table",1),t=!1;c(f.getElementsByTag("td"));c(f.getElementsByTag("th"));f=d.clone();f.setStart(e,0);f=a(f).lastBackward();f||(f=d.clone(),f.setEndAt(e,CKEDITOR.POSITION_BEFORE_END),f=a(f).lastForward(),t=!0);f||(f=e);f.is("table")?(d.setStartAt(f,CKEDITOR.POSITION_BEFORE_START), -d.collapse(!0),f.remove()):(f.is({tbody:1,thead:1,tfoot:1})&&(f=b(f,"tr",t)),f.is("tr")&&(f=b(f,f.getParent().is("thead")?"th":"td",t)),(e=f.getBogus())&&e.remove(),d.moveToPosition(f,t?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END))}}();J=function(){function a(b){b=new CKEDITOR.dom.walker(b);b.guard=function(a,b){if(b)return!1;if(a.type==CKEDITOR.NODE_ELEMENT)return a.is(CKEDITOR.dtd.$list)||a.is(CKEDITOR.dtd.$listItem)};b.evaluator=function(a){return a.type==CKEDITOR.NODE_ELEMENT&& -a.is(CKEDITOR.dtd.$listItem)};return b}return function(b){var c=b.startContainer,d=!1,e;e=b.clone();e.setStart(c,0);e=a(e).lastBackward();e||(e=b.clone(),e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END),e=a(e).lastForward(),d=!0);e||(e=c);e.is(CKEDITOR.dtd.$list)?(b.setStartAt(e,CKEDITOR.POSITION_BEFORE_START),b.collapse(!0),e.remove()):((c=e.getBogus())&&c.remove(),b.moveToPosition(e,d?CKEDITOR.POSITION_AFTER_START:CKEDITOR.POSITION_BEFORE_END),b.select())}}();u={eol:{detect:function(a,b){var c=a.range, -d=c.clone(),e=c.clone(),f=new CKEDITOR.dom.elementPath(c.startContainer,b),t=new CKEDITOR.dom.elementPath(c.endContainer,b);d.collapse(1);e.collapse();f.block&&d.checkBoundaryOfElement(f.block,CKEDITOR.END)&&(c.setStartAfter(f.block),a.prependEolBr=1);t.block&&e.checkBoundaryOfElement(t.block,CKEDITOR.START)&&(c.setEndBefore(t.block),a.appendEolBr=1)},fix:function(a,b){var c=b.getDocument(),d;a.appendEolBr&&(d=this.createEolBr(c),a.fragment.append(d));!a.prependEolBr||d&&!d.getPrevious()||a.fragment.append(this.createEolBr(c), -1)},createEolBr:function(a){return a.createElement("br",{attributes:{"data-cke-eol":1}})}},bogus:{exclude:function(a){var b=a.range.getBoundaryNodes(),c=b.startNode,b=b.endNode;!b||!B(b)||c&&c.equals(b)||a.range.setEndBefore(b)}},tree:{rebuild:function(a,b){var c=a.range,d=c.getCommonAncestor(),e=new CKEDITOR.dom.elementPath(d,b),f=new CKEDITOR.dom.elementPath(c.startContainer,b),c=new CKEDITOR.dom.elementPath(c.endContainer,b),t;d.type==CKEDITOR.NODE_TEXT&&(d=d.getParent());if(e.blockLimit.is({tr:1, -table:1})){var g=e.contains("table").getParent();t=function(a){return!a.equals(g)}}else if(e.block&&e.block.is(CKEDITOR.dtd.$listItem)&&(f=f.contains(CKEDITOR.dtd.$list),c=c.contains(CKEDITOR.dtd.$list),!f.equals(c))){var h=e.contains(CKEDITOR.dtd.$list).getParent();t=function(a){return!a.equals(h)}}t||(t=function(a){return!a.equals(e.block)&&!a.equals(e.blockLimit)});this.rebuildFragment(a,b,d,t)},rebuildFragment:function(a,b,c,d){for(var e;c&&!c.equals(b)&&d(c);)e=c.clone(0,1),a.fragment.appendTo(e), -a.fragment=e,c=c.getParent()}},cell:{shrink:function(a){a=a.range;var b=a.startContainer,c=a.endContainer,d=a.startOffset,e=a.endOffset;b.type==CKEDITOR.NODE_ELEMENT&&b.equals(c)&&b.is("tr")&&++d==e&&a.shrink(CKEDITOR.SHRINK_TEXT)}}};K=function(){function a(b,c){var d=b.getParent();if(d.is(CKEDITOR.dtd.$inline))b[c?"insertBefore":"insertAfter"](d)}function b(c,d,e){a(d);a(e,1);for(var f;f=e.getNext();)f.insertAfter(d),d=f;x(c)&&c.remove()}function c(a,b){var d=new CKEDITOR.dom.range(a);d.setStartAfter(b.startNode); -d.setEndBefore(b.endNode);return d}return{list:{detectMerge:function(a,b){var d=c(b,a.bookmark),e=d.startPath(),f=d.endPath(),g=e.contains(CKEDITOR.dtd.$list),h=f.contains(CKEDITOR.dtd.$list);a.mergeList=g&&h&&g.getParent().equals(h.getParent())&&!g.equals(h);a.mergeListItems=e.block&&f.block&&e.block.is(CKEDITOR.dtd.$listItem)&&f.block.is(CKEDITOR.dtd.$listItem);if(a.mergeList||a.mergeListItems)d=d.clone(),d.setStartBefore(a.bookmark.startNode),d.setEndAfter(a.bookmark.endNode),a.mergeListBookmark= -d.createBookmark()},merge:function(a,c){if(a.mergeListBookmark){var d=a.mergeListBookmark.startNode,e=a.mergeListBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(e,c);if(a.mergeList){var h=f.contains(CKEDITOR.dtd.$list),k=g.contains(CKEDITOR.dtd.$list);h.equals(k)||(k.moveChildren(h),k.remove())}a.mergeListItems&&(f=f.contains(CKEDITOR.dtd.$listItem),g=g.contains(CKEDITOR.dtd.$listItem),f.equals(g)||b(g,d,e));d.remove();e.remove()}}},block:{detectMerge:function(a, -b){if(!a.tableContentsRanges&&!a.mergeListBookmark){var c=new CKEDITOR.dom.range(b);c.setStartBefore(a.bookmark.startNode);c.setEndAfter(a.bookmark.endNode);a.mergeBlockBookmark=c.createBookmark()}},merge:function(a,c){if(a.mergeBlockBookmark&&!a.purgeTableBookmark){var d=a.mergeBlockBookmark.startNode,e=a.mergeBlockBookmark.endNode,f=new CKEDITOR.dom.elementPath(d,c),g=new CKEDITOR.dom.elementPath(e,c),f=f.block,g=g.block;f&&g&&!f.equals(g)&&b(g,d,e);d.remove();e.remove()}}},table:function(){function a(c){var e= -[],f,g=new CKEDITOR.dom.walker(c),h=c.startPath().contains(d),k=c.endPath().contains(d),n={};g.guard=function(a,g){if(a.type==CKEDITOR.NODE_ELEMENT){var A="visited_"+(g?"out":"in");if(a.getCustomData(A))return;CKEDITOR.dom.element.setMarker(n,a,A,1)}if(g&&h&&a.equals(h))f=c.clone(),f.setEndAt(h,CKEDITOR.POSITION_BEFORE_END),e.push(f);else if(!g&&k&&a.equals(k))f=c.clone(),f.setStartAt(k,CKEDITOR.POSITION_AFTER_START),e.push(f);else{if(A=!g)A=a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&(!h||b(a,h))&&(!k|| -b(a,k));if(!A&&(A=g))if(a.is(d))var A=h&&h.getAscendant("table",!0),l=k&&k.getAscendant("table",!0),H=a.getAscendant("table",!0),A=A&&A.contains(H)||l&&l.contains(H);else A=void 0;A&&(f=c.clone(),f.selectNodeContents(a),e.push(f))}};g.lastForward();CKEDITOR.dom.element.clearAllMarkers(n);return e}function b(a,c){var d=CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_IS_CONTAINED,e=a.getPosition(c);return e===CKEDITOR.POSITION_IDENTICAL?!1:0===(e&d)}var d={td:1,th:1,caption:1};return{detectPurge:function(a){var b= -a.range,c=b.clone();c.enlarge(CKEDITOR.ENLARGE_ELEMENT);var c=new CKEDITOR.dom.walker(c),e=0;c.evaluator=function(a){a.type==CKEDITOR.NODE_ELEMENT&&a.is(d)&&++e};c.checkForward();if(1f&&e&&e.intersectsNode(c.$)){var n=[{node:d.anchorNode,offset:d.anchorOffset},{node:d.focusNode,offset:d.focusOffset}]; -d.anchorNode==c.$&&d.anchorOffset>f&&(n[0].offset-=f);d.focusNode==c.$&&d.focusOffset>f&&(n[1].offset-=f)}}c.setText(x(c.getText(),1));n&&(c=a.getDocument().$,d=c.getSelection(),c=c.createRange(),c.setStart(n[0].node,n[0].offset),c.collapse(!0),d.removeAllRanges(),d.addRange(c),d.extend(n[1].node,n[1].offset))}}function x(a,b){return b?a.replace(K,function(a,b){return b?" ":""}):a.replace(u,"")}function B(a,b){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"'+ -(CKEDITOR.env.ie&&14>CKEDITOR.env.version?"display:none":"position:fixed;top:0;left:-1000px")+'"\x3e'+(b||"\x26nbsp;")+"\x3c/div\x3e",a.document);a.fire("lockSnapshot");a.editable().append(c);var d=a.getSelection(1),e=a.createRange(),f=d.root.on("selectionchange",function(a){a.cancel()},null,null,0);e.setStartAt(c,CKEDITOR.POSITION_AFTER_START);e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);d.selectRanges([e]);f.removeListener();a.fire("unlockSnapshot");a._.hiddenSelectionContainer=c}function D(a){var b= -{37:1,39:1,8:1,46:1};return function(c){var d=c.data.getKeystroke();if(b[d]){var e=a.getSelection().getRanges(),f=e[0];1==e.length&&f.collapsed&&(d=f[38>d?"getPreviousEditableNode":"getNextEditableNode"]())&&d.type==CKEDITOR.NODE_ELEMENT&&"false"==d.getAttribute("contenteditable")&&(a.getSelection().fake(d),c.data.preventDefault(),c.cancel())}}}function w(a){for(var b=0;b=d.getLength()?g.setStartAfter(d):g.setStartBefore(d));e&&e.type==CKEDITOR.NODE_TEXT&&(n?g.setEndAfter(e):g.setEndBefore(e));d=new CKEDITOR.dom.walker(g);d.evaluator=function(d){if(d.type==CKEDITOR.NODE_ELEMENT&& -d.isReadOnly()){var e=c.clone();c.setEndBefore(d);c.collapsed&&a.splice(b--,1);d.getPosition(g.endContainer)&CKEDITOR.POSITION_CONTAINS||(e.setStartAfter(d),e.collapsed||a.splice(b+1,0,e));return!0}return!1};d.next()}}return a}var p="function"!=typeof window.getSelection,J=1,u=CKEDITOR.tools.repeat("​",7),K=new RegExp(u+"( )?","g"),l,q,F,L=CKEDITOR.dom.walker.invisible(1),E=function(){function a(b){return function(a){var c=a.editor.createRange();c.moveToClosestEditablePosition(a.selected,b)&&a.editor.getSelection().selectRanges([c]); -return!1}}function b(a){return function(b){var c=b.editor,d=c.createRange(),e;(e=d.moveToClosestEditablePosition(b.selected,a))||(e=d.moveToClosestEditablePosition(b.selected,!a));e&&c.getSelection().selectRanges([d]);c.fire("saveSnapshot");b.selected.remove();e||(d.moveToElementEditablePosition(c.editable()),c.getSelection().selectRanges([d]));c.fire("saveSnapshot");return!1}}var c=a(),d=a(1);return{37:c,38:c,39:d,40:d,8:b(),46:b(1)}}();CKEDITOR.on("instanceCreated",function(a){function b(){var a= -c.getSelection();a&&a.removeAllRanges()}var c=a.editor;c.on("contentDom",function(){function a(){r=new CKEDITOR.dom.selection(c.getSelection());r.lock()}function b(){f.removeListener("mouseup",b);t.removeListener("mouseup",b);var a=CKEDITOR.document.$.selection,c=a.createRange();"None"!=a.type&&c.parentElement()&&c.parentElement().ownerDocument==e.$&&c.select()}function d(a){if(CKEDITOR.env.ie){var b=(a=a.getRanges()[0])?a.startContainer.getAscendant(function(a){return a.type==CKEDITOR.NODE_ELEMENT&& -("false"==a.getAttribute("contenteditable")||"true"==a.getAttribute("contenteditable"))},!0):null;return a&&"false"==b.getAttribute("contenteditable")&&b}}var e=c.document,f=CKEDITOR.document,g=c.editable(),l=e.getBody(),t=e.getDocumentElement(),C=g.isInline(),m,r;CKEDITOR.env.gecko&&g.attachListener(g,"focus",function(a){a.removeListener();0!==m&&(a=c.getSelection().getNative())&&a.isCollapsed&&a.anchorNode==g.$&&(a=c.createRange(),a.moveToElementEditStart(g),a.select())},null,null,-2);g.attachListener(g, -CKEDITOR.env.webkit?"DOMFocusIn":"focus",function(){m&&CKEDITOR.env.webkit&&(m=c._.previousActive&&c._.previousActive.equals(e.getActive()))&&null!=c._.previousScrollTop&&c._.previousScrollTop!=g.$.scrollTop&&(g.$.scrollTop=c._.previousScrollTop);c.unlockSelection(m);m=0},null,null,-1);g.attachListener(g,"mousedown",function(){m=0});if(CKEDITOR.env.ie||C)p?g.attachListener(g,"beforedeactivate",a,null,null,-1):g.attachListener(c,"selectionCheck",a,null,null,-1),g.attachListener(g,CKEDITOR.env.webkit? -"DOMFocusOut":"blur",function(){c.lockSelection(r);m=1},null,null,-1),g.attachListener(g,"mousedown",function(){m=0});if(CKEDITOR.env.ie&&!C){var x;g.attachListener(g,"mousedown",function(a){2==a.data.$.button&&((a=c.document.getSelection())&&a.getType()!=CKEDITOR.SELECTION_NONE||(x=c.window.getScrollPosition()))});g.attachListener(g,"mouseup",function(a){2==a.data.$.button&&x&&(c.document.$.documentElement.scrollLeft=x.x,c.document.$.documentElement.scrollTop=x.y);x=null});if("BackCompat"!=e.$.compatMode){if(CKEDITOR.env.ie7Compat|| -CKEDITOR.env.ie6Compat){var q,u;t.on("mousedown",function(a){function b(a){a=a.data.$;if(q){var c=l.$.createTextRange();try{c.moveToPoint(a.clientX,a.clientY)}catch(d){}q.setEndPoint(0>u.compareEndPoints("StartToStart",c)?"EndToEnd":"StartToStart",c);q.select()}}function c(){t.removeListener("mousemove",b);f.removeListener("mouseup",c);t.removeListener("mouseup",c);q.select()}a=a.data;if(a.getTarget().is("html")&&a.$.yCKEDITOR.env.version)t.on("mousedown",function(a){a.data.getTarget().is("html")&&(f.on("mouseup",b),t.on("mouseup",b))})}}g.attachListener(g,"selectionchange",h,c);g.attachListener(g,"keyup",k,c);g.attachListener(g,"keydown",function(a){var b=this.getSelection(1);d(b)&&(b.selectElement(d(b)),a.data.preventDefault())},c);g.attachListener(g,CKEDITOR.env.webkit?"DOMFocusIn": -"focus",function(){c.forceNextSelectionCheck();c.selectionChange(1)});if(C&&(CKEDITOR.env.webkit||CKEDITOR.env.gecko)){var w;g.attachListener(g,"mousedown",function(){w=1});g.attachListener(e.getDocumentElement(),"mouseup",function(){w&&k.call(c);w=0})}else g.attachListener(CKEDITOR.env.ie?g:e.getDocumentElement(),"mouseup",k,c);CKEDITOR.env.webkit&&g.attachListener(e,"keydown",function(a){switch(a.data.getKey()){case 13:case 33:case 34:case 35:case 36:case 37:case 39:case 8:case 45:case 46:g.hasFocus&& -y(g)}},null,null,-1);g.attachListener(g,"keydown",D(c),null,null,-1)});c.on("setData",function(){c.unlockSelection();CKEDITOR.env.webkit&&b()});c.on("contentDomUnload",function(){c.unlockSelection()});if(CKEDITOR.env.ie9Compat)c.on("beforeDestroy",b,null,null,9);c.on("dataReady",function(){delete c._.fakeSelection;delete c._.hiddenSelectionContainer;c.selectionChange(1)});c.on("loadSnapshot",function(){var a=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT),b=c.editable().getLast(a);b&&b.hasAttribute("data-cke-hidden-sel")&& -(b.remove(),CKEDITOR.env.gecko&&(a=c.editable().getFirst(a))&&a.is("br")&&a.getAttribute("_moz_editor_bogus_node")&&a.remove())},null,null,100);c.on("key",function(a){if("wysiwyg"==c.mode){var b=c.getSelection();if(b.isFake){var d=E[a.data.keyCode];if(d)return d({editor:c,selected:b.getSelectedElement(),selection:b,keyEvent:a})}}})});if(CKEDITOR.env.webkit)CKEDITOR.on("instanceReady",function(a){var b=a.editor;b.on("selectionChange",function(){var a=b.editable(),c=a.getCustomData("cke-fillingChar"); -c&&(c.getCustomData("ready")?(y(a),a.editor.fire("selectionCheck")):c.setCustomData("ready",1))},null,null,-1);b.on("beforeSetMode",function(){y(b.editable())},null,null,-1);b.on("getSnapshot",function(a){a.data&&(a.data=x(a.data))},b,null,20);b.on("toDataFormat",function(a){a.data.dataValue=x(a.data.dataValue)},null,null,0)});CKEDITOR.editor.prototype.selectionChange=function(a){(a?h:k).call(this)};CKEDITOR.editor.prototype.getSelection=function(a){return!this._.savedSelection&&!this._.fakeSelection|| -a?(a=this.editable())&&"wysiwyg"==this.mode?new CKEDITOR.dom.selection(a):null:this._.savedSelection||this._.fakeSelection};CKEDITOR.editor.prototype.lockSelection=function(a){a=a||this.getSelection(1);return a.getType()!=CKEDITOR.SELECTION_NONE?(!a.isLocked&&a.lock(),this._.savedSelection=a,!0):!1};CKEDITOR.editor.prototype.unlockSelection=function(a){var b=this._.savedSelection;return b?(b.unlock(a),delete this._.savedSelection,!0):!1};CKEDITOR.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath}; -CKEDITOR.dom.document.prototype.getSelection=function(){return new CKEDITOR.dom.selection(this)};CKEDITOR.dom.range.prototype.select=function(){var a=this.root instanceof CKEDITOR.editable?this.root.editor.getSelection():new CKEDITOR.dom.selection(this.root);a.selectRanges([this]);return a};CKEDITOR.SELECTION_NONE=1;CKEDITOR.SELECTION_TEXT=2;CKEDITOR.SELECTION_ELEMENT=3;CKEDITOR.dom.selection=function(a){if(a instanceof CKEDITOR.dom.selection){var b=a;a=a.root}var c=a instanceof CKEDITOR.dom.element; -this.rev=b?b.rev:J++;this.document=a instanceof CKEDITOR.dom.document?a:a.getDocument();this.root=c?a:this.document.getBody();this.isLocked=0;this._={cache:{}};if(b)return CKEDITOR.tools.extend(this._.cache,b._.cache),this.isFake=b.isFake,this.isLocked=b.isLocked,this;a=this.getNative();var d,e;if(a)if(a.getRangeAt)d=(e=a.rangeCount&&a.getRangeAt(0))&&new CKEDITOR.dom.node(e.commonAncestorContainer);else{try{e=a.createRange()}catch(f){}d=e&&CKEDITOR.dom.element.get(e.item&&e.item(0)||e.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 M={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:x, -_createFillingCharSequenceNode:e,FILLING_CHAR_SEQUENCE:u});CKEDITOR.dom.selection.prototype={getNative:function(){return void 0!==this._.cache.nativeSel?this._.cache.nativeSel:this._.cache.nativeSel=p?this.document.$.selection:this.document.getWindow().$.getSelection()},getType:p?function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_NONE;try{var c=this.getNative(),d=c.type;"Text"==d&&(b=CKEDITOR.SELECTION_TEXT);"Control"==d&&(b=CKEDITOR.SELECTION_ELEMENT);c.createRange().parentElement()&& -(b=CKEDITOR.SELECTION_TEXT)}catch(e){}return a.type=b}:function(){var a=this._.cache;if(a.type)return a.type;var b=CKEDITOR.SELECTION_TEXT,c=this.getNative();if(!c||!c.rangeCount)b=CKEDITOR.SELECTION_NONE;else if(1==c.rangeCount){var c=c.getRangeAt(0),d=c.startContainer;d==c.endContainer&&1==d.nodeType&&1==c.endOffset-c.startOffset&&M[d.childNodes[c.startOffset].nodeName.toLowerCase()]&&(b=CKEDITOR.SELECTION_ELEMENT)}return a.type=b},getRanges:function(){var a=p?function(){function a(b){return(new CKEDITOR.dom.node(b)).getIndex()} -var b=function(b,c){b=b.duplicate();b.collapse(c);var d=b.parentElement();if(!d.hasChildNodes())return{container:d,offset:0};for(var e=d.children,f,g,h=b.duplicate(),k=0,l=e.length-1,t=-1,m,p;k<=l;)if(t=Math.floor((k+l)/2),f=e[t],h.moveToElementText(f),m=h.compareEndPoints("StartToStart",b),0m)k=t+1;else return{container:d,offset:a(f)};if(-1==t||t==e.length-1&&0>m){h.moveToElementText(d);h.setEndPoint("StartToStart",b);h=h.text.replace(/(\r\n|\r)/g,"\n").length;e=d.childNodes;if(!h)return f= -e[e.length-1],f.nodeType!=CKEDITOR.NODE_TEXT?{container:d,offset:e.length}:{container:f,offset:f.nodeValue.length};for(d=e.length;0]*>)[ \t\r\n]*/gi,"$1");g=g.replace(/([ \t\n\r]+| )/g, -" ");g=g.replace(/]*>/gi,"\n");if(CKEDITOR.env.ie){var h=a.getDocument().createElement("div");h.append(f);f.$.outerHTML="\x3cpre\x3e"+g+"\x3c/pre\x3e";f.copyAttributes(h.getFirst());f=h.getFirst().remove()}else f.setHtml(g);b=f}else g?b=x(c?[a.getHtml()]:e(a),b):a.moveChildren(b);b.replace(a);if(d){var c=b,k;(k=c.getPrevious(H))&&k.type==CKEDITOR.NODE_ELEMENT&&k.is("pre")&&(d=y(k.getHtml(),/\n$/,"")+"\n\n"+y(c.getHtml(),/^\n/,""),CKEDITOR.env.ie?c.$.outerHTML="\x3cpre\x3e"+d+"\x3c/pre\x3e": -c.setHtml(d),k.remove())}else c&&p(b)}function e(a){var b=[];y(a.getOuterHtml(),/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,function(a,b,c){return b+"\x3c/pre\x3e"+c+"\x3cpre\x3e"}).replace(/([\s\S]*?)<\/pre>/gi,function(a,c){b.push(c)});return b}function y(a,b,c){var d="",e="";a=a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(a,b,c){b&&(d=b);c&&(e=c);return""});return d+a.replace(b,c)+e}function x(a,b){var c; -1=c?(h=f.createText(""),h.insertAfter(this)):(a=f.createText(""),a.insertAfter(h),a.remove()));return h},substring:function(a, -d){return"number"!=typeof d?this.$.nodeValue.substr(a):this.$.nodeValue.substring(a,d)}}); -(function(){function a(a,c,d){var h=a.serializable,k=c[d?"endContainer":"startContainer"],g=d?"endOffset":"startOffset",m=h?c.document.getById(a.startNode):a.startNode;a=h?c.document.getById(a.endNode):a.endNode;k.equals(m.getPrevious())?(c.startOffset=c.startOffset-k.getLength()-a.getPrevious().getLength(),k=a.getNext()):k.equals(a.getPrevious())&&(c.startOffset-=k.getLength(),k=a.getNext());k.equals(m.getParent())&&c[g]++;k.equals(a.getParent())&&c[g]++;c[d?"endContainer":"startContainer"]=k;return c} -CKEDITOR.dom.rangeList=function(a){if(a instanceof CKEDITOR.dom.rangeList)return a;a?a instanceof CKEDITOR.dom.range&&(a=[a]):a=[];return CKEDITOR.tools.extend(a,d)};var d={createIterator:function(){var a=this,c=CKEDITOR.dom.walker.bookmark(),d=[],h;return{getNextRange:function(k){h=void 0===h?0:h+1;var g=a[h];if(g&&1b?-1:1}),f=0,g;fCKEDITOR.env.version? -a[h].$.styleSheet.cssText+=g:a[h].$.innerHTML+=g}}var h={};CKEDITOR.skin={path:a,loadPart:function(c,d){CKEDITOR.skin.name!=CKEDITOR.skinName.split(",")[0]?CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a()+"skin.js"),function(){b(c,d)}):b(c,d)},getPath:function(a){return CKEDITOR.getUrl(d(a))},icons:{},addIcon:function(a,b,c,d){a=a.toLowerCase();this.icons[a]||(this.icons[a]={path:b,offset:c||0,bgsize:d||"16px"})},getIconStyle:function(a,b,c,d,f){var g;a&&(a=a.toLowerCase(),b&&(g=this.icons[a+"-rtl"]), -g||(g=this.icons[a]));a=c||g&&g.path||"";d=d||g&&g.offset;f=f||g&&g.bgsize||"16px";a&&(a=a.replace(/'/g,"\\'"));return a&&"background-image:url('"+CKEDITOR.getUrl(a)+"');background-position:0 "+d+"px;background-size:"+f+";"}};CKEDITOR.tools.extend(CKEDITOR.editor.prototype,{getUiColor:function(){return this.uiColor},setUiColor:function(a){var b=c(CKEDITOR.document);return(this.setUiColor=function(a){this.uiColor=a;var c=CKEDITOR.skin.chameleon,d="",h="";"function"==typeof c&&(d=c(this,"editor"),h= -c(this,"panel"));a=[[m,a]];f([b],d,a);f(g,h,a)}).call(this,a)}});var k="cke_ui_color",g=[],m=/\$color/g;CKEDITOR.on("instanceLoaded",function(a){if(!CKEDITOR.env.ie||!CKEDITOR.env.quirks){var b=a.editor;a=function(a){a=(a.data[0]||a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument();if(!a.getById("cke_ui_color")){a=c(a);g.push(a);var d=b.getUiColor();d&&f([a],CKEDITOR.skin.chameleon(b,"panel"),[[m,d]])}};b.on("panelShow",a);b.on("menuShow",a);b.config.uiColor&&b.setUiColor(b.config.uiColor)}})})(); -(function(){if(CKEDITOR.env.webkit)CKEDITOR.env.hc=!1;else{var a=CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e',CKEDITOR.document);a.appendTo(CKEDITOR.document.getHead());try{var d=a.getComputedStyle("border-top-color"),b=a.getComputedStyle("border-right-color");CKEDITOR.env.hc=!(!d||d!=b)}catch(c){CKEDITOR.env.hc=!1}a.remove()}CKEDITOR.env.hc&&(CKEDITOR.env.cssClass+=" cke_hc");CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); -CKEDITOR.status="loaded";CKEDITOR.fireOnce("loaded");if(a=CKEDITOR._.pending)for(delete CKEDITOR._.pending,d=0;d e.getListenerIndex(d)) { + e = e.listeners; + h || (h = this); + isNaN(g) && (g = 10); + var y = this; + m.fn = d; + m.priority = g; + for (var x = e.length - 1; 0 <= x; x--) if (e[x].priority <= g) return e.splice(x + 1, 0, m), {removeListener: r}; + e.unshift(m) + } + return {removeListener: r} + }, + once: function () { + var a = Array.prototype.slice.call(arguments), b = a[1]; + a[1] = function (a) { + a.removeListener(); + return b.apply(this, arguments) + }; + return this.on.apply(this, a) + }, capture: function () { + CKEDITOR.event.useCapture = 1; + var a = this.on.apply(this, arguments); + CKEDITOR.event.useCapture = 0; + return a + }, fire: function () { + var a = 0, b = function () { + a = 1 + }, h = 0, k = function () { + h = 1 + }; + return function (g, m, r) { + var e = d(this)[g]; + g = a; + var y = h; + a = h = 0; + if (e) { + var x = e.listeners; + if (x.length) for (var x = x.slice(0), B, D = 0; D < x.length; D++) { + if (e.errorProof) try { + B = + x[D].call(this, r, m, b, k) + } catch (w) { + } else B = x[D].call(this, r, m, b, k); + !1 === B ? h = 1 : "undefined" != typeof B && (m = B); + if (a || h) break + } + } + m = h ? !1 : "undefined" == typeof m ? !0 : m; + a = g; + h = y; + return m + } + }(), fireOnce: function (a, b, h) { + b = this.fire(a, b, h); + delete d(this)[a]; + return b + }, removeListener: function (a, b) { + var h = d(this)[a]; + if (h) { + var k = h.getListenerIndex(b); + 0 <= k && h.listeners.splice(k, 1) + } + }, removeAllListeners: function () { + var a = d(this), b; + for (b in a) delete a[b] + }, hasListeners: function (a) { + return (a = d(this)[a]) && 0 < a.listeners.length + } + } + }()); + CKEDITOR.editor || (CKEDITOR.editor = function () { + CKEDITOR._.pending.push([this, arguments]); + CKEDITOR.event.call(this) + }, CKEDITOR.editor.prototype.fire = function (a, d) { + a in {instanceReady: 1, loaded: 1} && (this[a] = !0); + return CKEDITOR.event.prototype.fire.call(this, a, d, this) + }, CKEDITOR.editor.prototype.fireOnce = function (a, d) { + a in {instanceReady: 1, loaded: 1} && (this[a] = !0); + return CKEDITOR.event.prototype.fireOnce.call(this, a, d, this) + }, CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); + CKEDITOR.env || (CKEDITOR.env = function () { + var a = navigator.userAgent.toLowerCase(), d = a.match(/edge[ \/](\d+.?\d*)/), b = -1 < a.indexOf("trident/"), + b = !(!d && !b), b = { + ie: b, + edge: !!d, + webkit: !b && -1 < a.indexOf(" applewebkit/"), + air: -1 < a.indexOf(" adobeair/"), + mac: -1 < a.indexOf("macintosh"), + quirks: "BackCompat" == document.compatMode && (!document.documentMode || 10 > document.documentMode), + mobile: -1 < a.indexOf("mobile"), + iOS: /(ipad|iphone|ipod)/.test(a), + isCustomDomain: function () { + if (!this.ie) return !1; + var a = document.domain, b = window.location.hostname; + return a != b && a != "[" + b + "]" + }, + secure: "https:" == location.protocol + }; + b.gecko = "Gecko" == navigator.product && !b.webkit && !b.ie; + b.webkit && (-1 < a.indexOf("chrome") ? b.chrome = !0 : b.safari = !0); + var c = 0; + b.ie && (c = d ? parseFloat(d[1]) : b.quirks || !document.documentMode ? parseFloat(a.match(/msie (\d+)/)[1]) : document.documentMode, b.ie9Compat = 9 == c, b.ie8Compat = 8 == c, b.ie7Compat = 7 == c, b.ie6Compat = 7 > c || b.quirks); + b.gecko && (d = a.match(/rv:([\d\.]+)/)) && (d = d[1].split("."), c = 1E4 * d[0] + 100 * (d[1] || 0) + 1 * (d[2] || 0)); + b.air && (c = parseFloat(a.match(/ adobeair\/(\d+)/)[1])); + b.webkit && (c = parseFloat(a.match(/ applewebkit\/(\d+)/)[1])); + b.version = c; + b.isCompatible = !(b.ie && 7 > c) && !(b.gecko && 4E4 > c) && !(b.webkit && 534 > c); + b.hidpi = 2 <= window.devicePixelRatio; + b.needsBrFiller = b.gecko || b.webkit || b.ie && 10 < c; + b.needsNbspFiller = b.ie && 11 > c; + b.cssClass = "cke_browser_" + (b.ie ? "ie" : b.gecko ? "gecko" : b.webkit ? "webkit" : "unknown"); + b.quirks && (b.cssClass += " cke_browser_quirks"); + b.ie && (b.cssClass += " cke_browser_ie" + (b.quirks ? "6 cke_browser_iequirks" : b.version)); + b.air && (b.cssClass += " cke_browser_air"); + b.iOS && (b.cssClass += " cke_browser_ios"); + b.hidpi && (b.cssClass += " cke_hidpi"); + return b + }()); + "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 a = document.createElement("script"); + a.type = "text/javascript"; + a.src = CKEDITOR.basePath + "ckeditor.js"; + document.getElementsByTagName("head")[0].appendChild(a) + } + }; + CKEDITOR.loadFullCoreTimeout = 0; + CKEDITOR.add = function (a) { + (this._.pending || (this._.pending = [])).push(a) + }; + (function () { + CKEDITOR.domReady(function () { + var a = + CKEDITOR.loadFullCore, d = CKEDITOR.loadFullCoreTimeout; + a && (CKEDITOR.status = "basic_ready", a && a._load ? a() : d && setTimeout(function () { + CKEDITOR.loadFullCore && CKEDITOR.loadFullCore() + }, 1E3 * d)) + }) + })(); + CKEDITOR.status = "basic_loaded" + }(); + "use strict"; + CKEDITOR.VERBOSITY_WARN = 1; + CKEDITOR.VERBOSITY_ERROR = 2; + CKEDITOR.verbosity = CKEDITOR.VERBOSITY_WARN | CKEDITOR.VERBOSITY_ERROR; + CKEDITOR.warn = function (a, d) { + CKEDITOR.verbosity & CKEDITOR.VERBOSITY_WARN && CKEDITOR.fire("log", { + type: "warn", + errorCode: a, + additionalData: d + }) + }; + CKEDITOR.error = function (a, d) { + CKEDITOR.verbosity & CKEDITOR.VERBOSITY_ERROR && CKEDITOR.fire("log", { + type: "error", + errorCode: a, + additionalData: d + }) + }; + CKEDITOR.on("log", function (a) { + if (window.console && window.console.log) { + var d = console[a.data.type] ? a.data.type : "log", b = a.data.errorCode; + if (a = a.data.additionalData) console[d]("[CKEDITOR] Error code: " + b + ".", a); else console[d]("[CKEDITOR] Error code: " + b + "."); + console[d]("[CKEDITOR] For more information about this error go to https://docs.ckeditor.com/ckeditor4/docs/#!/guide/dev_errors-section-" + b) + } + }, null, null, 999); + CKEDITOR.dom = {}; + (function () { + var a = [], d = CKEDITOR.env.gecko ? "-moz-" : CKEDITOR.env.webkit ? "-webkit-" : CKEDITOR.env.ie ? "-ms-" : "", + b = /&/g, c = />/g, f = /|\s) /g, + function (a, e) { + return e + "\x26nbsp;" + }).replace(/ (?=<)/g, "\x26nbsp;") + }, + getNextNumber: function () { + var a = 0; + return function () { + return ++a + } + }(), + getNextId: function () { + return "cke_" + this.getNextNumber() + }, + getUniqueId: function () { + for (var a = "e", e = 0; 8 > e; e++) a += Math.floor(65536 * (1 + Math.random())).toString(16).substring(1); + return a + }, + override: function (a, e) { + var b = e(a); + b.prototype = a.prototype; + return b + }, + setTimeout: function (a, e, b, c, g) { + g || (g = window); + b || (b = g); + return g.setTimeout(function () { + c ? a.apply(b, [].concat(c)) : a.apply(b) + }, + e || 0) + }, + trim: function () { + var a = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; + return function (e) { + return e.replace(a, "") + } + }(), + ltrim: function () { + var a = /^[ \t\n\r]+/g; + return function (e) { + return e.replace(a, "") + } + }(), + rtrim: function () { + var a = /[ \t\n\r]+$/g; + return function (e) { + return e.replace(a, "") + } + }(), + indexOf: function (a, e) { + if ("function" == typeof e) for (var b = 0, c = a.length; b < c; b++) { + if (e(a[b])) return b + } else { + if (a.indexOf) return a.indexOf(e); + b = 0; + for (c = a.length; b < c; b++) if (a[b] === e) return b + } + return -1 + }, + search: function (a, e) { + var b = CKEDITOR.tools.indexOf(a, + e); + return 0 <= b ? a[b] : null + }, + bind: function (a, e) { + return function () { + return a.apply(e, arguments) + } + }, + createClass: function (a) { + var e = a.$, b = a.base, c = a.privates || a._, g = a.proto; + a = a.statics; + !e && (e = function () { + b && this.base.apply(this, arguments) + }); + if (c) var d = e, e = function () { + var a = this._ || (this._ = {}), e; + for (e in c) { + var b = c[e]; + a[e] = "function" == typeof b ? CKEDITOR.tools.bind(b, this) : b + } + d.apply(this, arguments) + }; + b && (e.prototype = this.prototypedCopy(b.prototype), e.prototype.constructor = e, e.base = b, e.baseProto = b.prototype, e.prototype.base = + function () { + this.base = b.prototype.base; + b.apply(this, arguments); + this.base = arguments.callee + }); + g && this.extend(e.prototype, g, !0); + a && this.extend(e, a, !0); + return e + }, + addFunction: function (b, e) { + return a.push(function () { + return b.apply(e || this, arguments) + }) - 1 + }, + removeFunction: function (b) { + a[b] = null + }, + callFunction: function (b) { + var e = a[b]; + return e && e.apply(window, Array.prototype.slice.call(arguments, 1)) + }, + cssLength: function () { + var a = /^-?\d+\.?\d*px$/, e; + return function (b) { + e = CKEDITOR.tools.trim(b + "") + "px"; + return a.test(e) ? + e : b || "" + } + }(), + convertToPx: function () { + var a; + return function (e) { + a || (a = CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"position:absolute;left:-9999px;top:-9999px;margin:0px;padding:0px;border:0px;"\x3e\x3c/div\x3e', CKEDITOR.document), CKEDITOR.document.getBody().append(a)); + return /%$/.test(e) ? e : (a.setStyle("width", e), a.$.clientWidth) + } + }(), + repeat: function (a, e) { + return Array(e + 1).join(a) + }, + tryThese: function () { + for (var a, e = 0, b = arguments.length; e < b; e++) { + var c = arguments[e]; + try { + a = c(); + break + } catch (g) { + } + } + return a + }, + genKey: function () { + return Array.prototype.slice.call(arguments).join("-") + }, + defer: function (a) { + return function () { + var e = arguments, b = this; + window.setTimeout(function () { + a.apply(b, e) + }, 0) + } + }, + normalizeCssText: function (a, e) { + var b = [], c, g = CKEDITOR.tools.parseCssText(a, !0, e); + for (c in g) b.push(c + ":" + g[c]); + b.sort(); + return b.length ? b.join(";") + ";" : "" + }, + convertRgbToHex: function (a) { + return a.replace(/(?:rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\))/gi, function (a, b, c, g) { + a = [b, c, g]; + for (b = 0; 3 > b; b++) a[b] = ("0" + parseInt(a[b], 10).toString(16)).slice(-2); + return "#" + a.join("") + }) + }, + normalizeHex: function (a) { + return a.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi, function (a, b, c, g) { + a = b.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 (a, e, b) { + var c = {}; + b && (a = (new CKEDITOR.dom.element("span")).setAttribute("style", a).getAttribute("style") || ""); + a && (a = CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(a))); + if (!a || ";" == a) return c; + a.replace(/"/g, '"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g, + function (a, b, g) { + e && (b = b.toLowerCase(), "font-family" == b && (g = g.replace(/\s*,\s*/g, ",")), g = CKEDITOR.tools.trim(g)); + c[b] = g + }); + return c + }, + writeCssText: function (a, e) { + var b, c = []; + for (b in a) c.push(b + ":" + a[b]); + e && c.sort(); + return c.join("; ") + }, + objectCompare: function (a, e, b) { + var c; + if (!a && !e) return !0; + if (!a || !e) return !1; + for (c in a) if (a[c] != e[c]) return !1; + if (!b) for (c in e) if (a[c] != e[c]) return !1; + return !0 + }, + objectKeys: function (a) { + var e = [], b; + for (b in a) e.push(b); + return e + }, + convertArrayToObject: function (a, e) { + var b = {}; + 1 == + arguments.length && (e = !0); + for (var c = 0, g = a.length; c < g; ++c) b[a[c]] = e; + return b + }, + fixDomain: function () { + for (var a; ;) try { + a = window.parent.document.domain; + break + } catch (e) { + a = a ? a.replace(/.+?(?:\.|$)/, "") : document.domain; + if (!a) break; + document.domain = a + } + return !!a + }, + eventsBuffer: function (a, e, b) { + function c() { + d = (new Date).getTime(); + g = !1; + b ? e.call(b) : e() + } + + var g, d = 0; + return { + input: function () { + if (!g) { + var e = (new Date).getTime() - d; + e < a ? g = setTimeout(c, a - e) : c() + } + }, reset: function () { + g && clearTimeout(g); + g = d = 0 + } + } + }, + enableHtml5Elements: function (a, + e) { + for (var b = "abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video".split(" "), c = b.length, g; c--;) g = a.createElement(b[c]), e && a.appendChild(g) + }, + checkIfAnyArrayItemMatches: function (a, e) { + for (var b = 0, c = a.length; b < c; ++b) if (a[b].match(e)) return !0; + return !1 + }, + checkIfAnyObjectPropertyMatches: function (a, e) { + for (var b in a) if (b.match(e)) return !0; + return !1 + }, + keystrokeToString: function (a, e) { + var b = this.keystrokeToArray(a, + e); + b.display = b.display.join("+"); + b.aria = b.aria.join("+"); + return b + }, + keystrokeToArray: function (a, e) { + var b = e & 16711680, c = e & 65535, g = CKEDITOR.env.mac, d = [], m = []; + b & CKEDITOR.CTRL && (d.push(g ? "⌘" : a[17]), m.push(g ? a[224] : a[17])); + b & CKEDITOR.ALT && (d.push(g ? "⌥" : a[18]), m.push(a[18])); + b & CKEDITOR.SHIFT && (d.push(g ? "⇧" : a[16]), m.push(a[16])); + c && (a[c] ? (d.push(a[c]), m.push(a[c])) : (d.push(String.fromCharCode(c)), m.push(String.fromCharCode(c)))); + return {display: d, aria: m} + }, + transparentImageData: "data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw\x3d\x3d", + getCookie: function (a) { + a = a.toLowerCase(); + for (var e = document.cookie.split(";"), b, c, g = 0; g < e.length; g++) if (b = e[g].split("\x3d"), c = decodeURIComponent(CKEDITOR.tools.trim(b[0]).toLowerCase()), c === a) return decodeURIComponent(1 < b.length ? b[1] : ""); + return null + }, + setCookie: function (a, b) { + document.cookie = encodeURIComponent(a) + "\x3d" + encodeURIComponent(b) + ";path\x3d/" + }, + getCsrfToken: function () { + var a = CKEDITOR.tools.getCookie("ckCsrfToken"); + if (!a || 40 != a.length) { + var a = [], b = ""; + if (window.crypto && window.crypto.getRandomValues) a = + new Uint8Array(40), window.crypto.getRandomValues(a); else for (var c = 0; 40 > c; c++) a.push(Math.floor(256 * Math.random())); + for (c = 0; c < a.length; c++) var g = "abcdefghijklmnopqrstuvwxyz0123456789".charAt(a[c] % 36), b = b + (.5 < Math.random() ? g.toUpperCase() : g); + a = b; + CKEDITOR.tools.setCookie("ckCsrfToken", a) + } + return a + }, + escapeCss: function (a) { + return a ? window.CSS && CSS.escape ? CSS.escape(a) : isNaN(parseInt(a.charAt(0), 10)) ? a : "\\3" + a.charAt(0) + " " + a.substring(1, a.length) : "" + }, + getMouseButton: function (a) { + var b = (a = a.data) && a.$; + return a && + b ? CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? 4 === b.button ? CKEDITOR.MOUSE_BUTTON_MIDDLE : 1 === b.button ? CKEDITOR.MOUSE_BUTTON_LEFT : CKEDITOR.MOUSE_BUTTON_RIGHT : b.button : !1 + }, + convertHexStringToBytes: function (a) { + var b = [], c = a.length / 2, g; + for (g = 0; g < c; g++) b.push(parseInt(a.substr(2 * g, 2), 16)); + return b + }, + convertBytesToBase64: function (a) { + var b = "", c = a.length, g; + for (g = 0; g < c; g += 3) { + var d = a.slice(g, g + 3), m = d.length, f = [], p; + if (3 > m) for (p = m; 3 > p; p++) d[p] = 0; + f[0] = (d[0] & 252) >> 2; + f[1] = (d[0] & 3) << 4 | d[1] >> 4; + f[2] = (d[1] & 15) << 2 | (d[2] & 192) >> + 6; + f[3] = d[2] & 63; + for (p = 0; 4 > p; p++) b = p <= m ? b + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f[p]) : b + "\x3d" + } + return b + }, + 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 (a) { + var b = {}, c = this._findColor(a); + c.length && (b.color = c[0], CKEDITOR.tools.array.forEach(c, + function (b) { + a = a.replace(b, "") + })); + if (a = CKEDITOR.tools.trim(a)) b.unprocessed = a; + return b + }, + margin: function (a) { + function b(a) { + c.top = g[a[0]]; + c.right = g[a[1]]; + c.bottom = g[a[2]]; + c.left = g[a[3]] + } + + var c = {}, g = a.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset)/g) || ["0px"]; + switch (g.length) { + case 1: + b([0, 0, 0, 0]); + break; + case 2: + b([0, 1, 0, 1]); + break; + case 3: + b([0, 1, 2, 1]); + break; + case 4: + b([0, 1, 2, 3]) + } + return c + }, + border: function (a) { + var b = {}; + a = a.split(/\s+/); + CKEDITOR.tools.array.forEach(a, function (a) { + if (!b.color) { + var c = CKEDITOR.tools.style.parse._findColor(a); + if (c.length) { + b.color = c[0]; + return + } + } + b.style || -1 === CKEDITOR.tools.indexOf(CKEDITOR.tools.style.parse._borderStyle, a) ? !b.width && CKEDITOR.tools.style.parse._widthRegExp.test(a) && (b.width = a) : b.style = a + }); + return b + }, + _findColor: function (a) { + var b = [], c = CKEDITOR.tools.array, b = b.concat(a.match(this._rgbaRegExp) || []), + b = b.concat(a.match(this._hslaRegExp) || []); + return b = b.concat(c.filter(a.split(/\s+/), function (a) { + return a.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi) ? !0 : a.toLowerCase() in CKEDITOR.tools.style.parse._colors + })) + } + } + }, + array: { + filter: function (a, b, c) { + var g = []; + this.forEach(a, function (d, m) { + b.call(c, d, m, a) && g.push(d) + }); + return g + }, forEach: function (a, b, c) { + var g = a.length, d; + for (d = 0; d < g; d++) b.call(c, a[d], d, a) + }, map: function (a, b, c) { + for (var g = [], d = 0; d < a.length; d++) g.push(b.call(c, a[d], d, a)); + return g + }, reduce: function (a, b, c, g) { + for (var d = 0; d < a.length; d++) c = b.call(g, c, a[d], d, a); + return c + }, every: function (a, b, c) { + if (!a.length) return !0; + b = this.filter(a, b, c); + return a.length === b.length + } + }, + object: { + findKey: function (a, b) { + if ("object" !== typeof a) return null; + for (var c in a) if (a[c] === b) return c; + return null + }, merge: function (a, b) { + var c = CKEDITOR.tools, g = c.clone(a), d = c.clone(b); + c.array.forEach(c.objectKeys(d), function (a) { + g[a] = "object" === typeof d[a] && "object" === typeof g[a] ? c.object.merge(g[a], d[a]) : d[a] + }); + return g + } + } + }; + CKEDITOR.tools.array.indexOf = CKEDITOR.tools.indexOf; + CKEDITOR.tools.array.isArray = CKEDITOR.tools.isArray; + CKEDITOR.MOUSE_BUTTON_LEFT = 0; + CKEDITOR.MOUSE_BUTTON_MIDDLE = 1; + CKEDITOR.MOUSE_BUTTON_RIGHT = 2 + })(); + CKEDITOR.dtd = function () { + var a = CKEDITOR.tools.extend, d = function (a, b) { + for (var c = CKEDITOR.tools.clone(a), g = 1; g < arguments.length; g++) { + b = arguments[g]; + for (var d in b) delete c[d] + } + return c + }, b = {}, c = {}, f = { + address: 1, + article: 1, + aside: 1, + blockquote: 1, + details: 1, + div: 1, + dl: 1, + fieldset: 1, + figure: 1, + footer: 1, + form: 1, + h1: 1, + h2: 1, + h3: 1, + h4: 1, + h5: 1, + h6: 1, + header: 1, + hgroup: 1, + hr: 1, + main: 1, + menu: 1, + nav: 1, + ol: 1, + p: 1, + pre: 1, + section: 1, + table: 1, + ul: 1 + }, h = {command: 1, link: 1, meta: 1, noscript: 1, script: 1, style: 1}, k = {}, g = {"#": 1}, + m = {center: 1, dir: 1, noframes: 1}; + a(b, { + a: 1, + abbr: 1, + area: 1, + audio: 1, + b: 1, + bdi: 1, + bdo: 1, + br: 1, + button: 1, + canvas: 1, + cite: 1, + code: 1, + command: 1, + datalist: 1, + del: 1, + dfn: 1, + em: 1, + embed: 1, + i: 1, + iframe: 1, + img: 1, + input: 1, + ins: 1, + kbd: 1, + keygen: 1, + label: 1, + map: 1, + mark: 1, + meter: 1, + noscript: 1, + object: 1, + output: 1, + progress: 1, + q: 1, + ruby: 1, + s: 1, + samp: 1, + script: 1, + select: 1, + small: 1, + span: 1, + strong: 1, + sub: 1, + sup: 1, + textarea: 1, + time: 1, + u: 1, + "var": 1, + video: 1, + wbr: 1 + }, g, {acronym: 1, applet: 1, basefont: 1, big: 1, font: 1, isindex: 1, strike: 1, style: 1, tt: 1}); + a(c, f, b, m); + d = { + a: d(b, {a: 1, button: 1}), + abbr: b, + address: c, + area: k, + article: c, + aside: c, + audio: a({source: 1, track: 1}, c), + b: b, + base: k, + bdi: b, + bdo: b, + blockquote: c, + body: c, + br: k, + button: d(b, {a: 1, button: 1}), + canvas: b, + caption: c, + cite: b, + code: b, + col: k, + colgroup: {col: 1}, + command: k, + datalist: a({option: 1}, b), + dd: c, + del: b, + details: a({summary: 1}, c), + dfn: b, + div: c, + dl: {dt: 1, dd: 1}, + dt: c, + em: b, + embed: k, + fieldset: a({legend: 1}, c), + figcaption: c, + figure: a({figcaption: 1}, c), + footer: c, + form: c, + h1: b, + h2: b, + h3: b, + h4: b, + h5: b, + h6: b, + head: a({title: 1, base: 1}, h), + header: c, + hgroup: {h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1}, + hr: k, + html: a({ + head: 1, + body: 1 + }, c, h), + i: b, + iframe: g, + img: k, + input: k, + ins: b, + kbd: b, + keygen: k, + label: b, + legend: b, + li: c, + link: k, + main: c, + map: c, + mark: b, + menu: a({li: 1}, c), + meta: k, + meter: d(b, {meter: 1}), + nav: c, + noscript: a({link: 1, meta: 1, style: 1}, b), + object: a({param: 1}, b), + ol: {li: 1}, + optgroup: {option: 1}, + option: g, + output: b, + p: b, + param: k, + pre: b, + progress: d(b, {progress: 1}), + q: b, + rp: b, + rt: b, + ruby: a({rp: 1, rt: 1}, b), + s: b, + samp: b, + script: g, + section: c, + select: {optgroup: 1, option: 1}, + small: b, + source: k, + span: b, + strong: b, + style: g, + sub: b, + summary: a({h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1}, b), + sup: b, + table: {caption: 1, colgroup: 1, thead: 1, tfoot: 1, tbody: 1, tr: 1}, + tbody: {tr: 1}, + td: c, + textarea: g, + tfoot: {tr: 1}, + th: c, + thead: {tr: 1}, + time: d(b, {time: 1}), + title: g, + tr: {th: 1, td: 1}, + track: k, + u: b, + ul: {li: 1}, + "var": b, + video: a({source: 1, track: 1}, c), + wbr: k, + acronym: b, + applet: a({param: 1}, c), + basefont: k, + big: b, + center: c, + dialog: k, + dir: {li: 1}, + font: b, + isindex: k, + noframes: c, + strike: b, + tt: b + }; + a(d, { + $block: a({audio: 1, dd: 1, dt: 1, figcaption: 1, li: 1, video: 1}, f, m), + $blockLimit: { + article: 1, + aside: 1, + audio: 1, + body: 1, + caption: 1, + details: 1, + dir: 1, + div: 1, + dl: 1, + fieldset: 1, + figcaption: 1, + figure: 1, + footer: 1, + form: 1, + header: 1, + hgroup: 1, + main: 1, + menu: 1, + nav: 1, + ol: 1, + section: 1, + table: 1, + td: 1, + th: 1, + tr: 1, + ul: 1, + video: 1 + }, + $cdata: {script: 1, style: 1}, + $editable: { + address: 1, + article: 1, + aside: 1, + blockquote: 1, + body: 1, + details: 1, + div: 1, + fieldset: 1, + figcaption: 1, + footer: 1, + form: 1, + h1: 1, + h2: 1, + h3: 1, + h4: 1, + h5: 1, + h6: 1, + header: 1, + hgroup: 1, + main: 1, + nav: 1, + p: 1, + pre: 1, + section: 1 + }, + $empty: { + area: 1, + base: 1, + basefont: 1, + br: 1, + col: 1, + command: 1, + dialog: 1, + embed: 1, + hr: 1, + img: 1, + input: 1, + isindex: 1, + keygen: 1, + link: 1, + meta: 1, + param: 1, + source: 1, + track: 1, + wbr: 1 + }, + $inline: b, + $list: {dl: 1, ol: 1, ul: 1}, + $listItem: {dd: 1, dt: 1, li: 1}, + $nonBodyContent: a({body: 1, head: 1, html: 1}, d.head), + $nonEditable: { + applet: 1, + audio: 1, + button: 1, + embed: 1, + iframe: 1, + map: 1, + object: 1, + option: 1, + param: 1, + script: 1, + textarea: 1, + video: 1 + }, + $object: { + applet: 1, + audio: 1, + button: 1, + hr: 1, + iframe: 1, + img: 1, + input: 1, + object: 1, + select: 1, + table: 1, + textarea: 1, + video: 1 + }, + $removeEmpty: { + abbr: 1, + acronym: 1, + b: 1, + bdi: 1, + bdo: 1, + big: 1, + cite: 1, + code: 1, + del: 1, + dfn: 1, + em: 1, + font: 1, + i: 1, + ins: 1, + label: 1, + kbd: 1, + mark: 1, + meter: 1, + output: 1, + q: 1, + ruby: 1, + s: 1, + samp: 1, + small: 1, + span: 1, + strike: 1, + strong: 1, + sub: 1, + sup: 1, + time: 1, + tt: 1, + u: 1, + "var": 1 + }, + $tabIndex: {a: 1, area: 1, button: 1, input: 1, object: 1, select: 1, textarea: 1}, + $tableContent: {caption: 1, col: 1, colgroup: 1, tbody: 1, td: 1, tfoot: 1, th: 1, thead: 1, tr: 1}, + $transparent: {a: 1, audio: 1, canvas: 1, del: 1, ins: 1, map: 1, noscript: 1, object: 1, video: 1}, + $intermediate: { + caption: 1, + colgroup: 1, + dd: 1, + dt: 1, + figcaption: 1, + legend: 1, + li: 1, + optgroup: 1, + option: 1, + rp: 1, + rt: 1, + summary: 1, + tbody: 1, + td: 1, + tfoot: 1, + th: 1, + thead: 1, + tr: 1 + } + }); + return d + }(); + CKEDITOR.dom.event = function (a) { + this.$ = a + }; + CKEDITOR.dom.event.prototype = { + getKey: function () { + return this.$.keyCode || this.$.which + }, getKeystroke: function () { + var a = this.getKey(); + if (this.$.ctrlKey || this.$.metaKey) a += CKEDITOR.CTRL; + this.$.shiftKey && (a += CKEDITOR.SHIFT); + this.$.altKey && (a += CKEDITOR.ALT); + return a + }, preventDefault: function (a) { + var d = this.$; + d.preventDefault ? d.preventDefault() : d.returnValue = !1; + a && this.stopPropagation() + }, stopPropagation: function () { + var a = this.$; + a.stopPropagation ? a.stopPropagation() : a.cancelBubble = !0 + }, getTarget: function () { + var a = + this.$.target || this.$.srcElement; + return a ? new CKEDITOR.dom.node(a) : null + }, getPhase: function () { + return this.$.eventPhase || 2 + }, getPageOffset: function () { + var a = this.getTarget().getDocument().$; + return { + x: this.$.pageX || this.$.clientX + (a.documentElement.scrollLeft || a.body.scrollLeft), + y: this.$.pageY || this.$.clientY + (a.documentElement.scrollTop || a.body.scrollTop) + } + } + }; + CKEDITOR.CTRL = 1114112; + CKEDITOR.SHIFT = 2228224; + CKEDITOR.ALT = 4456448; + CKEDITOR.EVENT_PHASE_CAPTURING = 1; + CKEDITOR.EVENT_PHASE_AT_TARGET = 2; + CKEDITOR.EVENT_PHASE_BUBBLING = 3; + CKEDITOR.dom.domObject = function (a) { + a && (this.$ = a) + }; + CKEDITOR.dom.domObject.prototype = function () { + var a = function (a, b) { + return function (c) { + "undefined" != typeof CKEDITOR && a.fire(b, new CKEDITOR.dom.event(c)) + } + }; + return { + getPrivate: function () { + var a; + (a = this.getCustomData("_")) || this.setCustomData("_", a = {}); + return a + }, on: function (d) { + var b = this.getCustomData("_cke_nativeListeners"); + b || (b = {}, this.setCustomData("_cke_nativeListeners", b)); + b[d] || (b = b[d] = a(this, d), this.$.addEventListener ? this.$.addEventListener(d, b, !!CKEDITOR.event.useCapture) : this.$.attachEvent && this.$.attachEvent("on" + + d, b)); + return CKEDITOR.event.prototype.on.apply(this, arguments) + }, removeListener: function (a) { + CKEDITOR.event.prototype.removeListener.apply(this, arguments); + if (!this.hasListeners(a)) { + var b = this.getCustomData("_cke_nativeListeners"), c = b && b[a]; + c && (this.$.removeEventListener ? this.$.removeEventListener(a, c, !1) : this.$.detachEvent && this.$.detachEvent("on" + a, c), delete b[a]) + } + }, removeAllListeners: function () { + var a = this.getCustomData("_cke_nativeListeners"), b; + for (b in a) { + var c = a[b]; + this.$.detachEvent ? this.$.detachEvent("on" + + b, c) : this.$.removeEventListener && this.$.removeEventListener(b, c, !1); + delete a[b] + } + CKEDITOR.event.prototype.removeAllListeners.call(this) + } + } + }(); + (function (a) { + var d = {}; + CKEDITOR.on("reset", function () { + d = {} + }); + a.equals = function (a) { + try { + return a && a.$ === this.$ + } catch (c) { + return !1 + } + }; + a.setCustomData = function (a, c) { + var f = this.getUniqueId(); + (d[f] || (d[f] = {}))[a] = c; + return this + }; + a.getCustomData = function (a) { + var c = this.$["data-cke-expando"]; + return (c = c && d[c]) && a in c ? c[a] : null + }; + a.removeCustomData = function (a) { + var c = this.$["data-cke-expando"], c = c && d[c], f, h; + c && (f = c[a], h = a in c, delete c[a]); + return h ? f : null + }; + a.clearCustomData = function () { + this.removeAllListeners(); + var a = + this.$["data-cke-expando"]; + a && delete d[a] + }; + a.getUniqueId = function () { + return this.$["data-cke-expando"] || (this.$["data-cke-expando"] = CKEDITOR.tools.getNextNumber()) + }; + CKEDITOR.event.implementOn(a) + })(CKEDITOR.dom.domObject.prototype); + CKEDITOR.dom.node = function (a) { + return a ? new CKEDITOR.dom[a.nodeType == CKEDITOR.NODE_DOCUMENT ? "document" : a.nodeType == CKEDITOR.NODE_ELEMENT ? "element" : a.nodeType == CKEDITOR.NODE_TEXT ? "text" : a.nodeType == CKEDITOR.NODE_COMMENT ? "comment" : a.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT ? "documentFragment" : "domObject"](a) : this + }; + CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject; + CKEDITOR.NODE_ELEMENT = 1; + CKEDITOR.NODE_DOCUMENT = 9; + CKEDITOR.NODE_TEXT = 3; + CKEDITOR.NODE_COMMENT = 8; + CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11; + CKEDITOR.POSITION_IDENTICAL = 0; + CKEDITOR.POSITION_DISCONNECTED = 1; + CKEDITOR.POSITION_FOLLOWING = 2; + CKEDITOR.POSITION_PRECEDING = 4; + CKEDITOR.POSITION_IS_CONTAINED = 8; + CKEDITOR.POSITION_CONTAINS = 16; + CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype, { + appendTo: function (a, d) { + a.append(this, d); + return a + }, clone: function (a, d) { + function b(c) { + c["data-cke-expando"] && (c["data-cke-expando"] = !1); + if (c.nodeType == CKEDITOR.NODE_ELEMENT || c.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT) if (d || c.nodeType != CKEDITOR.NODE_ELEMENT || c.removeAttribute("id", !1), a) { + c = c.childNodes; + for (var f = 0; f < c.length; f++) b(c[f]) + } + } + + function c(b) { + if (b.type == CKEDITOR.NODE_ELEMENT || b.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) { + if (b.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) { + var d = + b.getName(); + ":" == d[0] && b.renameNode(d.substring(1)) + } + if (a) for (d = 0; d < b.getChildCount(); d++) c(b.getChild(d)) + } + } + + var f = this.$.cloneNode(a); + b(f); + f = new CKEDITOR.dom.node(f); + CKEDITOR.env.ie && 9 > CKEDITOR.env.version && (this.type == CKEDITOR.NODE_ELEMENT || this.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) && c(f); + return f + }, hasPrevious: function () { + return !!this.$.previousSibling + }, hasNext: function () { + return !!this.$.nextSibling + }, insertAfter: function (a) { + a.$.parentNode.insertBefore(this.$, a.$.nextSibling); + return a + }, insertBefore: function (a) { + a.$.parentNode.insertBefore(this.$, + a.$); + return a + }, insertBeforeMe: function (a) { + this.$.parentNode.insertBefore(a.$, this.$); + return a + }, getAddress: function (a) { + for (var d = [], b = this.getDocument().$.documentElement, c = this.$; c && c != b;) { + var f = c.parentNode; + f && d.unshift(this.getIndex.call({$: c}, a)); + c = f + } + return d + }, getDocument: function () { + return new CKEDITOR.dom.document(this.$.ownerDocument || this.$.parentNode.ownerDocument) + }, getIndex: function (a) { + function d(a, c) { + var m = c ? a.nextSibling : a.previousSibling; + return m && m.nodeType == CKEDITOR.NODE_TEXT ? b(m) ? d(m, + c) : m : null + } + + function b(a) { + return !a.nodeValue || a.nodeValue == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE + } + + var c = this.$, f = -1, h; + if (!this.$.parentNode || a && c.nodeType == CKEDITOR.NODE_TEXT && b(c) && !d(c) && !d(c, !0)) return -1; + do a && c != this.$ && c.nodeType == CKEDITOR.NODE_TEXT && (h || b(c)) || (f++, h = c.nodeType == CKEDITOR.NODE_TEXT); while (c = c.previousSibling); + return f + }, getNextSourceNode: function (a, d, b) { + if (b && !b.call) { + var c = b; + b = function (a) { + return !a.equals(c) + } + } + a = !a && this.getFirst && this.getFirst(); + var f; + if (!a) { + if (this.type == + CKEDITOR.NODE_ELEMENT && b && !1 === b(this, !0)) return null; + a = this.getNext() + } + for (; !a && (f = (f || this).getParent());) { + if (b && !1 === b(f, !0)) return null; + a = f.getNext() + } + return !a || b && !1 === b(a) ? null : d && d != a.type ? a.getNextSourceNode(!1, d, b) : a + }, getPreviousSourceNode: function (a, d, b) { + if (b && !b.call) { + var c = b; + b = function (a) { + return !a.equals(c) + } + } + a = !a && this.getLast && this.getLast(); + var f; + if (!a) { + if (this.type == CKEDITOR.NODE_ELEMENT && b && !1 === b(this, !0)) return null; + a = this.getPrevious() + } + for (; !a && (f = (f || this).getParent());) { + if (b && !1 === + b(f, !0)) return null; + a = f.getPrevious() + } + return !a || b && !1 === b(a) ? null : d && a.type != d ? a.getPreviousSourceNode(!1, d, b) : a + }, getPrevious: function (a) { + var d = this.$, b; + do b = (d = d.previousSibling) && 10 != d.nodeType && new CKEDITOR.dom.node(d); while (b && a && !a(b)); + return b + }, getNext: function (a) { + var d = this.$, b; + do b = (d = d.nextSibling) && new CKEDITOR.dom.node(d); while (b && a && !a(b)); + return b + }, getParent: function (a) { + var d = this.$.parentNode; + return d && (d.nodeType == CKEDITOR.NODE_ELEMENT || a && d.nodeType == CKEDITOR.NODE_DOCUMENT_FRAGMENT) ? + new CKEDITOR.dom.node(d) : null + }, getParents: function (a) { + var d = this, b = []; + do b[a ? "push" : "unshift"](d); while (d = d.getParent()); + return b + }, getCommonAncestor: function (a) { + if (a.equals(this)) return this; + if (a.contains && a.contains(this)) return a; + var d = this.contains ? this : this.getParent(); + do if (d.contains(a)) return d; while (d = d.getParent()); + return null + }, getPosition: function (a) { + var d = this.$, b = a.$; + if (d.compareDocumentPosition) return d.compareDocumentPosition(b); + if (d == b) return CKEDITOR.POSITION_IDENTICAL; + if (this.type == + CKEDITOR.NODE_ELEMENT && a.type == CKEDITOR.NODE_ELEMENT) { + if (d.contains) { + if (d.contains(b)) return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING; + if (b.contains(d)) return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING + } + if ("sourceIndex" in d) return 0 > d.sourceIndex || 0 > b.sourceIndex ? CKEDITOR.POSITION_DISCONNECTED : d.sourceIndex < b.sourceIndex ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING + } + d = this.getAddress(); + a = a.getAddress(); + for (var b = Math.min(d.length, a.length), c = 0; c < b; c++) if (d[c] != + a[c]) return d[c] < a[c] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; + return d.length < a.length ? CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING + }, getAscendant: function (a, d) { + var b = this.$, c, f; + d || (b = b.parentNode); + "function" == typeof a ? (f = !0, c = a) : (f = !1, c = function (b) { + b = "string" == typeof b.nodeName ? b.nodeName.toLowerCase() : ""; + return "string" == typeof a ? b == a : b in a + }); + for (; b;) { + if (c(f ? new CKEDITOR.dom.node(b) : b)) return new CKEDITOR.dom.node(b); + try { + b = b.parentNode + } catch (h) { + b = null + } + } + return null + }, hasAscendant: function (a, d) { + var b = this.$; + d || (b = b.parentNode); + for (; b;) { + if (b.nodeName && b.nodeName.toLowerCase() == a) return !0; + b = b.parentNode + } + return !1 + }, move: function (a, d) { + a.append(this.remove(), d) + }, remove: function (a) { + var d = this.$, b = d.parentNode; + if (b) { + if (a) for (; a = d.firstChild;) b.insertBefore(d.removeChild(a), d); + b.removeChild(d) + } + return this + }, replace: function (a) { + this.insertBefore(a); + a.remove() + }, trim: function () { + this.ltrim(); + this.rtrim() + }, ltrim: function () { + for (var a; this.getFirst && + (a = this.getFirst());) { + if (a.type == CKEDITOR.NODE_TEXT) { + var d = CKEDITOR.tools.ltrim(a.getText()), b = a.getLength(); + if (d) d.length < b && (a.split(b - d.length), this.$.removeChild(this.$.firstChild)); else { + a.remove(); + continue + } + } + break + } + }, rtrim: function () { + for (var a; this.getLast && (a = this.getLast());) { + if (a.type == CKEDITOR.NODE_TEXT) { + var d = CKEDITOR.tools.rtrim(a.getText()), b = a.getLength(); + if (d) d.length < b && (a.split(d.length), this.$.lastChild.parentNode.removeChild(this.$.lastChild)); else { + a.remove(); + continue + } + } + break + } + CKEDITOR.env.needsBrFiller && + (a = this.$.lastChild) && 1 == a.type && "br" == a.nodeName.toLowerCase() && a.parentNode.removeChild(a) + }, isReadOnly: function (a) { + var d = this; + this.type != CKEDITOR.NODE_ELEMENT && (d = this.getParent()); + CKEDITOR.env.edge && d && d.is("textarea", "input") && (a = !0); + if (!a && d && "undefined" != typeof d.$.isContentEditable) return !(d.$.isContentEditable || d.data("cke-editable")); + for (; d;) { + if (d.data("cke-editable")) return !1; + if (d.hasAttribute("contenteditable")) return "false" == d.getAttribute("contenteditable"); + d = d.getParent() + } + return !0 + } + }); + CKEDITOR.dom.window = function (a) { + CKEDITOR.dom.domObject.call(this, a) + }; + CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject; + CKEDITOR.tools.extend(CKEDITOR.dom.window.prototype, { + focus: function () { + this.$.focus() + }, getViewPaneSize: function () { + var a = this.$.document, d = "CSS1Compat" == a.compatMode; + return { + width: (d ? a.documentElement.clientWidth : a.body.clientWidth) || 0, + height: (d ? a.documentElement.clientHeight : a.body.clientHeight) || 0 + } + }, getScrollPosition: function () { + var a = this.$; + if ("pageXOffset" in a) return {x: a.pageXOffset || 0, y: a.pageYOffset || 0}; + a = a.document; + return { + x: a.documentElement.scrollLeft || a.body.scrollLeft || 0, y: a.documentElement.scrollTop || + a.body.scrollTop || 0 + } + }, getFrame: function () { + var a = this.$.frameElement; + return a ? new CKEDITOR.dom.element.get(a) : null + } + }); + CKEDITOR.dom.document = function (a) { + CKEDITOR.dom.domObject.call(this, a) + }; + CKEDITOR.dom.document.prototype = new CKEDITOR.dom.domObject; + CKEDITOR.tools.extend(CKEDITOR.dom.document.prototype, { + type: CKEDITOR.NODE_DOCUMENT, appendStyleSheet: function (a) { + if (this.$.createStyleSheet) this.$.createStyleSheet(a); else { + var d = new CKEDITOR.dom.element("link"); + d.setAttributes({rel: "stylesheet", type: "text/css", href: a}); + this.getHead().append(d) + } + }, appendStyleText: function (a) { + if (this.$.createStyleSheet) { + var d = this.$.createStyleSheet(""); + d.cssText = a + } else { + var b = new CKEDITOR.dom.element("style", this); + b.append(new CKEDITOR.dom.text(a, this)); + this.getHead().append(b) + } + return d || + b.$.sheet + }, createElement: function (a, d) { + var b = new CKEDITOR.dom.element(a, this); + d && (d.attributes && b.setAttributes(d.attributes), d.styles && b.setStyles(d.styles)); + return b + }, createText: function (a) { + return new CKEDITOR.dom.text(a, this) + }, focus: function () { + this.getWindow().focus() + }, getActive: function () { + var a; + try { + a = this.$.activeElement + } catch (d) { + return null + } + return new CKEDITOR.dom.element(a) + }, getById: function (a) { + return (a = this.$.getElementById(a)) ? new CKEDITOR.dom.element(a) : null + }, getByAddress: function (a, d) { + for (var b = + this.$.documentElement, c = 0; b && c < a.length; c++) { + var f = a[c]; + if (d) for (var h = -1, k = 0; k < b.childNodes.length; k++) { + var g = b.childNodes[k]; + if (!0 !== d || 3 != g.nodeType || !g.previousSibling || 3 != g.previousSibling.nodeType) if (h++, h == f) { + b = g; + break + } + } else b = b.childNodes[f] + } + return b ? new CKEDITOR.dom.node(b) : null + }, getElementsByTag: function (a, d) { + CKEDITOR.env.ie && 8 >= document.documentMode || !d || (a = d + ":" + a); + return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(a)) + }, getHead: function () { + var a = this.$.getElementsByTagName("head")[0]; + return a = a ? new CKEDITOR.dom.element(a) : 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 (a) { + this.$.open("text/html", "replace"); + CKEDITOR.env.ie && (a = a.replace(/(?:^\s*]*?>)|^/i, '$\x26\n\x3cscript data-cke-temp\x3d"1"\x3e(' + + CKEDITOR.tools.fixDomain + ")();\x3c/script\x3e")); + this.$.write(a); + this.$.close() + }, find: function (a) { + return new CKEDITOR.dom.nodeList(this.$.querySelectorAll(a)) + }, findOne: function (a) { + return (a = this.$.querySelector(a)) ? new CKEDITOR.dom.element(a) : null + }, _getHtml5ShivFrag: function () { + var a = this.getCustomData("html5ShivFrag"); + a || (a = this.$.createDocumentFragment(), CKEDITOR.tools.enableHtml5Elements(a, !0), this.setCustomData("html5ShivFrag", a)); + return a + } + }); + CKEDITOR.dom.nodeList = function (a) { + this.$ = a + }; + CKEDITOR.dom.nodeList.prototype = { + count: function () { + return this.$.length + }, getItem: function (a) { + return 0 > a || a >= this.$.length ? null : (a = this.$[a]) ? new CKEDITOR.dom.node(a) : null + }, toArray: function () { + return CKEDITOR.tools.array.map(this.$, function (a) { + return new CKEDITOR.dom.node(a) + }) + } + }; + CKEDITOR.dom.element = function (a, d) { + "string" == typeof a && (a = (d ? d.$ : document).createElement(a)); + CKEDITOR.dom.domObject.call(this, a) + }; + CKEDITOR.dom.element.get = function (a) { + return (a = "string" == typeof a ? document.getElementById(a) || document.getElementsByName(a)[0] : a) && (a.$ ? a : new CKEDITOR.dom.element(a)) + }; + CKEDITOR.dom.element.prototype = new CKEDITOR.dom.node; + CKEDITOR.dom.element.createFromHtml = function (a, d) { + var b = new CKEDITOR.dom.element("div", d); + b.setHtml(a); + return b.getFirst().remove() + }; + CKEDITOR.dom.element.setMarker = function (a, d, b, c) { + var f = d.getCustomData("list_marker_id") || d.setCustomData("list_marker_id", CKEDITOR.tools.getNextNumber()).getCustomData("list_marker_id"), + h = d.getCustomData("list_marker_names") || d.setCustomData("list_marker_names", {}).getCustomData("list_marker_names"); + a[f] = d; + h[b] = 1; + return d.setCustomData(b, c) + }; + CKEDITOR.dom.element.clearAllMarkers = function (a) { + for (var d in a) CKEDITOR.dom.element.clearMarkers(a, a[d], 1) + }; + CKEDITOR.dom.element.clearMarkers = function (a, d, b) { + var c = d.getCustomData("list_marker_names"), f = d.getCustomData("list_marker_id"), h; + for (h in c) d.removeCustomData(h); + d.removeCustomData("list_marker_names"); + b && (d.removeCustomData("list_marker_id"), delete a[f]) + }; + (function () { + function a(a, b) { + return -1 < (" " + a + " ").replace(h, " ").indexOf(" " + b + " ") + } + + function d(a) { + var b = !0; + a.$.id || (a.$.id = "cke_tmp_" + CKEDITOR.tools.getNextNumber(), b = !1); + return function () { + b || a.removeAttribute("id") + } + } + + function b(a, b) { + var c = CKEDITOR.tools.escapeCss(a.$.id); + return "#" + c + " " + b.split(/,\s*/).join(", #" + c + " ") + } + + function c(a) { + for (var b = 0, c = 0, e = k[a].length; c < e; c++) b += parseFloat(this.getComputedStyle(k[a][c]) || 0, 10) || 0; + return b + } + + var f = document.createElement("_").classList, f = "undefined" !== typeof f && + null !== String(f.add).match(/\[Native code\]/gi), h = /[\n\t\r]/g; + CKEDITOR.tools.extend(CKEDITOR.dom.element.prototype, { + type: CKEDITOR.NODE_ELEMENT, addClass: f ? function (a) { + this.$.classList.add(a); + return this + } : function (b) { + var c = this.$.className; + c && (a(c, b) || (c += " " + b)); + this.$.className = c || b; + return this + }, removeClass: f ? function (a) { + var b = this.$; + b.classList.remove(a); + b.className || b.removeAttribute("class"); + return this + } : function (b) { + var c = this.getAttribute("class"); + c && a(c, b) && ((c = c.replace(new RegExp("(?:^|\\s+)" + + b + "(?\x3d\\s|$)"), "").replace(/^\s+/, "")) ? this.setAttribute("class", c) : this.removeAttribute("class")); + return this + }, hasClass: function (b) { + return a(this.$.className, b) + }, append: function (a, b) { + "string" == typeof a && (a = this.getDocument().createElement(a)); + b ? this.$.insertBefore(a.$, this.$.firstChild) : this.$.appendChild(a.$); + return a + }, appendHtml: function (a) { + if (this.$.childNodes.length) { + var b = new CKEDITOR.dom.element("div", this.getDocument()); + b.setHtml(a); + b.moveChildren(this) + } else this.setHtml(a) + }, appendText: function (a) { + null != + this.$.text && CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? this.$.text += a : this.append(new CKEDITOR.dom.text(a)) + }, appendBogus: function (a) { + if (a || CKEDITOR.env.needsBrFiller) { + for (a = this.getLast(); a && a.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim(a.getText());) a = a.getPrevious(); + a && a.is && a.is("br") || (a = this.getDocument().createElement("br"), CKEDITOR.env.gecko && a.setAttribute("type", "_moz"), this.append(a)) + } + }, breakParent: function (a, b) { + var c = new CKEDITOR.dom.range(this.getDocument()); + c.setStartAfter(this); + c.setEndAfter(a); + var e = c.extractContents(!1, b || !1), d; + c.insertNode(this.remove()); + if (CKEDITOR.env.ie && !CKEDITOR.env.edge) { + for (c = new CKEDITOR.dom.element("div"); d = e.getFirst();) d.$.style.backgroundColor && (d.$.style.backgroundColor = d.$.style.backgroundColor), c.append(d); + c.insertAfter(this); + c.remove(!0) + } else e.insertAfterNode(this) + }, contains: document.compareDocumentPosition ? function (a) { + return !!(this.$.compareDocumentPosition(a.$) & 16) + } : function (a) { + var b = this.$; + return a.type != CKEDITOR.NODE_ELEMENT ? b.contains(a.getParent().$) : + b != a.$ && b.contains(a.$) + }, focus: function () { + function a() { + try { + this.$.focus() + } catch (b) { + } + } + + return function (b) { + b ? CKEDITOR.tools.setTimeout(a, 100, this) : a.call(this) + } + }(), getHtml: function () { + var a = this.$.innerHTML; + return CKEDITOR.env.ie ? a.replace(/<\?[^>]*>/g, "") : a + }, getOuterHtml: function () { + if (this.$.outerHTML) return this.$.outerHTML.replace(/<\?[^>]*>/, ""); + var a = this.$.ownerDocument.createElement("div"); + a.appendChild(this.$.cloneNode(!0)); + return a.innerHTML + }, getClientRect: function () { + var a = CKEDITOR.tools.extend({}, + this.$.getBoundingClientRect()); + !a.width && (a.width = a.right - a.left); + !a.height && (a.height = a.bottom - a.top); + return a + }, setHtml: CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? function (a) { + try { + var b = this.$; + if (this.getParent()) return b.innerHTML = a; + var c = this.getDocument()._getHtml5ShivFrag(); + c.appendChild(b); + b.innerHTML = a; + c.removeChild(b); + return a + } catch (e) { + this.$.innerHTML = ""; + b = new CKEDITOR.dom.element("body", this.getDocument()); + b.$.innerHTML = a; + for (b = b.getChildren(); b.count();) this.append(b.getItem(0)); + return a + } + } : + function (a) { + return this.$.innerHTML = a + }, setText: function () { + var a = document.createElement("p"); + a.innerHTML = "x"; + a = a.textContent; + return function (b) { + this.$[a ? "textContent" : "innerText"] = b + } + }(), getAttribute: function () { + var a = function (a) { + return this.$.getAttribute(a, 2) + }; + return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function (a) { + switch (a) { + case "class": + a = "className"; + break; + case "http-equiv": + a = "httpEquiv"; + break; + case "name": + return this.$.name; + case "tabindex": + return a = this.$.getAttribute(a, + 2), 0 !== a && 0 === this.$.tabIndex && (a = null), a; + case "checked": + return a = this.$.attributes.getNamedItem(a), (a.specified ? a.nodeValue : this.$.checked) ? "checked" : null; + case "hspace": + case "value": + return this.$[a]; + case "style": + return this.$.style.cssText; + case "contenteditable": + case "contentEditable": + return this.$.attributes.getNamedItem("contentEditable").specified ? this.$.getAttribute("contentEditable") : null + } + return this.$.getAttribute(a, 2) + } : a + }(), getAttributes: function (a) { + var b = {}, c = this.$.attributes, e; + a = CKEDITOR.tools.isArray(a) ? + a : []; + for (e = 0; e < c.length; e++) -1 === CKEDITOR.tools.indexOf(a, c[e].name) && (b[c[e].name] = c[e].value); + return b + }, getChildren: function () { + return new CKEDITOR.dom.nodeList(this.$.childNodes) + }, getComputedStyle: document.defaultView && document.defaultView.getComputedStyle ? function (a) { + var b = this.getWindow().$.getComputedStyle(this.$, null); + return b ? b.getPropertyValue(a) : "" + } : function (a) { + return this.$.currentStyle[CKEDITOR.tools.cssStyleToDomStyle(a)] + }, getDtd: function () { + var a = CKEDITOR.dtd[this.getName()]; + this.getDtd = + function () { + return a + }; + return a + }, getElementsByTag: CKEDITOR.dom.document.prototype.getElementsByTag, getTabIndex: function () { + var a = this.$.tabIndex; + return 0 !== a || CKEDITOR.dtd.$tabIndex[this.getName()] || 0 === parseInt(this.getAttribute("tabindex"), 10) ? a : -1 + }, getText: function () { + return this.$.textContent || this.$.innerText || "" + }, getWindow: function () { + return this.getDocument().getWindow() + }, getId: function () { + return this.$.id || null + }, getNameAtt: function () { + return this.$.name || null + }, getName: function () { + var a = this.$.nodeName.toLowerCase(); + if (CKEDITOR.env.ie && 8 >= document.documentMode) { + var b = this.$.scopeName; + "HTML" != b && (a = b.toLowerCase() + ":" + a) + } + this.getName = function () { + return a + }; + return this.getName() + }, getValue: function () { + return this.$.value + }, getFirst: function (a) { + var b = this.$.firstChild; + (b = b && new CKEDITOR.dom.node(b)) && a && !a(b) && (b = b.getNext(a)); + return b + }, getLast: function (a) { + var b = this.$.lastChild; + (b = b && new CKEDITOR.dom.node(b)) && a && !a(b) && (b = b.getPrevious(a)); + return b + }, getStyle: function (a) { + return this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)] + }, + is: function () { + var a = this.getName(); + if ("object" == typeof arguments[0]) return !!arguments[0][a]; + for (var b = 0; b < arguments.length; b++) if (arguments[b] == a) return !0; + return !1 + }, isEditable: function (a) { + var b = this.getName(); + return this.isReadOnly() || "none" == this.getComputedStyle("display") || "hidden" == this.getComputedStyle("visibility") || CKEDITOR.dtd.$nonEditable[b] || CKEDITOR.dtd.$empty[b] || this.is("a") && (this.data("cke-saved-name") || this.hasAttribute("name")) && !this.getChildCount() ? !1 : !1 !== a ? (a = CKEDITOR.dtd[b] || + CKEDITOR.dtd.span, !(!a || !a["#"])) : !0 + }, isIdentical: function (a) { + var b = this.clone(0, 1); + a = a.clone(0, 1); + b.removeAttributes(["_moz_dirty", "data-cke-expando", "data-cke-saved-href", "data-cke-saved-name"]); + a.removeAttributes(["_moz_dirty", "data-cke-expando", "data-cke-saved-href", "data-cke-saved-name"]); + if (b.$.isEqualNode) return b.$.style.cssText = CKEDITOR.tools.normalizeCssText(b.$.style.cssText), a.$.style.cssText = CKEDITOR.tools.normalizeCssText(a.$.style.cssText), b.$.isEqualNode(a.$); + b = b.getOuterHtml(); + a = + a.getOuterHtml(); + if (CKEDITOR.env.ie && 9 > CKEDITOR.env.version && this.is("a")) { + var c = this.getParent(); + c.type == CKEDITOR.NODE_ELEMENT && (c = c.clone(), c.setHtml(b), b = c.getHtml(), c.setHtml(a), a = c.getHtml()) + } + return b == a + }, isVisible: function () { + var a = (this.$.offsetHeight || this.$.offsetWidth) && "hidden" != this.getComputedStyle("visibility"), + b, c; + a && CKEDITOR.env.webkit && (b = this.getWindow(), !b.equals(CKEDITOR.document.getWindow()) && (c = b.$.frameElement) && (a = (new CKEDITOR.dom.element(c)).isVisible())); + return !!a + }, isEmptyInlineRemoveable: function () { + if (!CKEDITOR.dtd.$removeEmpty[this.getName()]) return !1; + for (var a = this.getChildren(), b = 0, c = a.count(); b < c; b++) { + var e = a.getItem(b); + if (e.type != CKEDITOR.NODE_ELEMENT || !e.data("cke-bookmark")) if (e.type == CKEDITOR.NODE_ELEMENT && !e.isEmptyInlineRemoveable() || e.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim(e.getText())) return !1 + } + return !0 + }, hasAttributes: CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function () { + for (var a = this.$.attributes, b = 0; b < a.length; b++) { + var c = a[b]; + switch (c.nodeName) { + case "class": + if (this.getAttribute("class")) return !0; + case "data-cke-expando": + continue; + default: + if (c.specified) return !0 + } + } + return !1 + } : function () { + var a = this.$.attributes, b = a.length, c = {"data-cke-expando": 1, _moz_dirty: 1}; + return 0 < b && (2 < b || !c[a[0].nodeName] || 2 == b && !c[a[1].nodeName]) + }, hasAttribute: function () { + function a(b) { + var c = this.$.attributes.getNamedItem(b); + if ("input" == this.getName()) switch (b) { + case "class": + return 0 < this.$.className.length; + case "checked": + return !!this.$.checked; + case "value": + return b = this.getAttribute("type"), "checkbox" == b || "radio" == b ? "on" != this.$.value : !!this.$.value + } + return c ? + c.specified : !1 + } + + return CKEDITOR.env.ie ? 8 > CKEDITOR.env.version ? function (b) { + return "name" == b ? !!this.$.name : a.call(this, b) + } : a : function (a) { + return !!this.$.attributes.getNamedItem(a) + } + }(), hide: function () { + this.setStyle("display", "none") + }, moveChildren: function (a, b) { + var c = this.$; + a = a.$; + if (c != a) { + var e; + if (b) for (; e = c.lastChild;) a.insertBefore(c.removeChild(e), a.firstChild); else for (; e = c.firstChild;) a.appendChild(c.removeChild(e)) + } + }, mergeSiblings: function () { + function a(b, c, e) { + if (c && c.type == CKEDITOR.NODE_ELEMENT) { + for (var d = + []; c.data("cke-bookmark") || c.isEmptyInlineRemoveable();) if (d.push(c), c = e ? c.getNext() : c.getPrevious(), !c || c.type != CKEDITOR.NODE_ELEMENT) return; + if (b.isIdentical(c)) { + for (var g = e ? b.getLast() : b.getFirst(); d.length;) d.shift().move(b, !e); + c.moveChildren(b, !e); + c.remove(); + g && g.type == CKEDITOR.NODE_ELEMENT && g.mergeSiblings() + } + } + } + + return function (b) { + if (!1 === b || CKEDITOR.dtd.$removeEmpty[this.getName()] || this.is("a")) a(this, this.getNext(), !0), a(this, this.getPrevious()) + } + }(), show: function () { + this.setStyles({ + display: "", + visibility: "" + }) + }, setAttribute: function () { + var a = function (a, b) { + this.$.setAttribute(a, b); + return this + }; + return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function (b, c) { + "class" == b ? this.$.className = c : "style" == b ? this.$.style.cssText = c : "tabindex" == b ? this.$.tabIndex = c : "checked" == b ? this.$.checked = c : "contenteditable" == b ? a.call(this, "contentEditable", c) : a.apply(this, arguments); + return this + } : CKEDITOR.env.ie8Compat && CKEDITOR.env.secure ? function (b, c) { + if ("src" == b && c.match(/^http:\/\//)) try { + a.apply(this, + arguments) + } catch (e) { + } else a.apply(this, arguments); + return this + } : a + }(), setAttributes: function (a) { + for (var b in a) this.setAttribute(b, a[b]); + return this + }, setValue: function (a) { + this.$.value = a; + return this + }, removeAttribute: function () { + var a = function (a) { + this.$.removeAttribute(a) + }; + return CKEDITOR.env.ie && (CKEDITOR.env.ie7Compat || CKEDITOR.env.quirks) ? function (a) { + "class" == a ? a = "className" : "tabindex" == a ? a = "tabIndex" : "contenteditable" == a && (a = "contentEditable"); + this.$.removeAttribute(a) + } : a + }(), removeAttributes: function (a) { + if (CKEDITOR.tools.isArray(a)) for (var b = + 0; b < a.length; b++) this.removeAttribute(a[b]); else for (b in a = a || this.getAttributes(), a) a.hasOwnProperty(b) && this.removeAttribute(b) + }, removeStyle: function (a) { + var b = this.$.style; + if (b.removeProperty || "border" != a && "margin" != a && "padding" != a) b.removeProperty ? b.removeProperty(a) : b.removeAttribute(CKEDITOR.tools.cssStyleToDomStyle(a)), this.$.style.cssText || this.removeAttribute("style"); else { + var c = ["top", "left", "right", "bottom"], e; + "border" == a && (e = ["color", "style", "width"]); + for (var b = [], d = 0; d < c.length; d++) if (e) for (var x = + 0; x < e.length; x++) b.push([a, c[d], e[x]].join("-")); else b.push([a, c[d]].join("-")); + for (a = 0; a < b.length; a++) this.removeStyle(b[a]) + } + }, setStyle: function (a, b) { + this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)] = b; + return this + }, setStyles: function (a) { + for (var b in a) this.setStyle(b, a[b]); + return this + }, setOpacity: function (a) { + CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? (a = Math.round(100 * a), this.setStyle("filter", 100 <= a ? "" : "progid:DXImageTransform.Microsoft.Alpha(opacity\x3d" + a + ")")) : this.setStyle("opacity", a) + }, unselectable: function () { + this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select", + "none")); + if (CKEDITOR.env.ie) { + this.setAttribute("unselectable", "on"); + for (var a, b = this.getElementsByTag("*"), c = 0, e = b.count(); c < e; c++) a = b.getItem(c), a.setAttribute("unselectable", "on") + } + }, getPositionedAncestor: function () { + for (var a = this; "html" != a.getName();) { + if ("static" != a.getComputedStyle("position")) return a; + a = a.getParent() + } + return null + }, getDocumentPosition: function (a) { + var b = 0, c = 0, e = this.getDocument(), d = e.getBody(), x = "BackCompat" == e.$.compatMode; + if (document.documentElement.getBoundingClientRect && (CKEDITOR.env.ie ? + 8 !== CKEDITOR.env.version : 1)) { + var f = this.$.getBoundingClientRect(), h = e.$.documentElement, + w = h.clientTop || d.$.clientTop || 0, p = h.clientLeft || d.$.clientLeft || 0, k = !0; + CKEDITOR.env.ie && (k = e.getDocumentElement().contains(this), e = e.getBody().contains(this), k = x && e || !x && k); + k && (CKEDITOR.env.webkit || CKEDITOR.env.ie && 12 <= CKEDITOR.env.version ? (b = d.$.scrollLeft || h.scrollLeft, c = d.$.scrollTop || h.scrollTop) : (c = x ? d.$ : h, b = c.scrollLeft, c = c.scrollTop), b = f.left + b - p, c = f.top + c - w) + } else for (w = this, p = null; w && "body" != w.getName() && + "html" != w.getName();) { + b += w.$.offsetLeft - w.$.scrollLeft; + c += w.$.offsetTop - w.$.scrollTop; + w.equals(this) || (b += w.$.clientLeft || 0, c += w.$.clientTop || 0); + for (; p && !p.equals(w);) b -= p.$.scrollLeft, c -= p.$.scrollTop, p = p.getParent(); + p = w; + w = (f = w.$.offsetParent) ? new CKEDITOR.dom.element(f) : null + } + a && (f = this.getWindow(), w = a.getWindow(), !f.equals(w) && f.$.frameElement && (a = (new CKEDITOR.dom.element(f.$.frameElement)).getDocumentPosition(a), b += a.x, c += a.y)); + document.documentElement.getBoundingClientRect || !CKEDITOR.env.gecko || + x || (b += this.$.clientLeft ? 1 : 0, c += this.$.clientTop ? 1 : 0); + return {x: b, y: c} + }, scrollIntoView: function (a) { + var b = this.getParent(); + if (b) { + do if ((b.$.clientWidth && b.$.clientWidth < b.$.scrollWidth || b.$.clientHeight && b.$.clientHeight < b.$.scrollHeight) && !b.is("body") && this.scrollIntoParent(b, a, 1), b.is("html")) { + var c = b.getWindow(); + try { + var e = c.$.frameElement; + e && (b = new CKEDITOR.dom.element(e)) + } catch (d) { + } + } while (b = b.getParent()) + } + }, scrollIntoParent: function (a, b, c) { + var e, d, x, f; + + function h(b, c) { + /body|html/.test(a.getName()) ? + a.getWindow().$.scrollBy(b, c) : (a.$.scrollLeft += b, a.$.scrollTop += c) + } + + function w(a, b) { + var c = {x: 0, y: 0}; + if (!a.is(k ? "body" : "html")) { + var e = a.$.getBoundingClientRect(); + c.x = e.left; + c.y = e.top + } + e = a.getWindow(); + e.equals(b) || (e = w(CKEDITOR.dom.element.get(e.$.frameElement), b), c.x += e.x, c.y += e.y); + return c + } + + function p(a, b) { + return parseInt(a.getComputedStyle("margin-" + b) || 0, 10) || 0 + } + + !a && (a = this.getWindow()); + x = a.getDocument(); + var k = "BackCompat" == x.$.compatMode; + a instanceof CKEDITOR.dom.window && (a = k ? x.getBody() : x.getDocumentElement()); + CKEDITOR.env.webkit && (x = this.getEditor(!1)) && (x._.previousScrollTop = null); + x = a.getWindow(); + d = w(this, x); + var u = w(a, x), K = this.$.offsetHeight; + e = this.$.offsetWidth; + var l = a.$.clientHeight, q = a.$.clientWidth; + x = d.x - p(this, "left") - u.x || 0; + f = d.y - p(this, "top") - u.y || 0; + e = d.x + e + p(this, "right") - (u.x + q) || 0; + d = d.y + K + p(this, "bottom") - (u.y + l) || 0; + (0 > f || 0 < d) && h(0, !0 === b ? f : !1 === b ? d : 0 > f ? f : d); + c && (0 > x || 0 < e) && h(0 > x ? x : e, 0) + }, setState: function (a, b, c) { + b = b || "cke"; + switch (a) { + case CKEDITOR.TRISTATE_ON: + this.addClass(b + "_on"); + this.removeClass(b + + "_off"); + this.removeClass(b + "_disabled"); + c && this.setAttribute("aria-pressed", !0); + c && this.removeAttribute("aria-disabled"); + break; + case CKEDITOR.TRISTATE_DISABLED: + this.addClass(b + "_disabled"); + this.removeClass(b + "_off"); + this.removeClass(b + "_on"); + c && this.setAttribute("aria-disabled", !0); + c && this.removeAttribute("aria-pressed"); + break; + default: + this.addClass(b + "_off"), this.removeClass(b + "_on"), this.removeClass(b + "_disabled"), c && this.removeAttribute("aria-pressed"), c && this.removeAttribute("aria-disabled") + } + }, + getFrameDocument: function () { + var a = this.$; + try { + a.contentWindow.document + } catch (b) { + a.src = a.src + } + return a && new CKEDITOR.dom.document(a.contentWindow.document) + }, copyAttributes: function (a, b) { + var c = this.$.attributes; + b = b || {}; + for (var e = 0; e < c.length; e++) { + var d = c[e], x = d.nodeName.toLowerCase(), f; + if (!(x in b)) if ("checked" == x && (f = this.getAttribute(x))) a.setAttribute(x, f); else if (!CKEDITOR.env.ie || this.hasAttribute(x)) f = this.getAttribute(x), null === f && (f = d.nodeValue), a.setAttribute(x, f) + } + "" !== this.$.style.cssText && + (a.$.style.cssText = this.$.style.cssText) + }, renameNode: function (a) { + if (this.getName() != a) { + var b = this.getDocument(); + a = new CKEDITOR.dom.element(a, b); + this.copyAttributes(a); + this.moveChildren(a); + this.getParent(!0) && this.$.parentNode.replaceChild(a.$, this.$); + a.$["data-cke-expando"] = this.$["data-cke-expando"]; + this.$ = a.$; + delete this.getName + } + }, getChild: function () { + function a(b, c) { + var e = b.childNodes; + if (0 <= c && c < e.length) return e[c] + } + + return function (b) { + var c = this.$; + if (b.slice) for (b = b.slice(); 0 < b.length && c;) c = a(c, + b.shift()); else c = a(c, b); + return c ? new CKEDITOR.dom.node(c) : null + } + }(), getChildCount: function () { + return this.$.childNodes.length + }, disableContextMenu: function () { + function a(b) { + return b.type == CKEDITOR.NODE_ELEMENT && b.hasClass("cke_enable_context_menu") + } + + this.on("contextmenu", function (b) { + b.data.getTarget().getAscendant(a, !0) || b.data.preventDefault() + }) + }, getDirection: function (a) { + return a ? this.getComputedStyle("direction") || this.getDirection() || this.getParent() && this.getParent().getDirection(1) || this.getDocument().$.dir || + "ltr" : this.getStyle("direction") || this.getAttribute("dir") + }, data: function (a, b) { + a = "data-" + a; + if (void 0 === b) return this.getAttribute(a); + !1 === b ? this.removeAttribute(a) : this.setAttribute(a, b); + return null + }, getEditor: function (a) { + var b = CKEDITOR.instances, c, e, d; + a = a || void 0 === a; + for (c in b) if (e = b[c], e.element.equals(this) && e.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO || !a && (d = e.editable()) && (d.equals(this) || d.contains(this))) return e; + return null + }, find: function (a) { + var c = d(this); + a = new CKEDITOR.dom.nodeList(this.$.querySelectorAll(b(this, + a))); + c(); + return a + }, findOne: function (a) { + var c = d(this); + a = this.$.querySelector(b(this, a)); + c(); + return a ? new CKEDITOR.dom.element(a) : null + }, forEach: function (a, b, c) { + if (!(c || b && this.type != b)) var e = a(this); + if (!1 !== e) { + c = this.getChildren(); + for (var d = 0; d < c.count(); d++) e = c.getItem(d), e.type == CKEDITOR.NODE_ELEMENT ? e.forEach(a, b) : b && e.type != b || a(e) + } + } + }); + var k = { + width: ["border-left-width", "border-right-width", "padding-left", "padding-right"], + height: ["border-top-width", "border-bottom-width", "padding-top", "padding-bottom"] + }; + CKEDITOR.dom.element.prototype.setSize = function (a, b, d) { + "number" == typeof b && (!d || CKEDITOR.env.ie && CKEDITOR.env.quirks || (b -= c.call(this, a)), this.setStyle(a, b + "px")) + }; + CKEDITOR.dom.element.prototype.getSize = function (a, b) { + var d = Math.max(this.$["offset" + CKEDITOR.tools.capitalize(a)], this.$["client" + CKEDITOR.tools.capitalize(a)]) || 0; + b && (d -= c.call(this, a)); + return d + } + })(); + CKEDITOR.dom.documentFragment = function (a) { + a = a || CKEDITOR.document; + this.$ = a.type == CKEDITOR.NODE_DOCUMENT ? a.$.createDocumentFragment() : a + }; + CKEDITOR.tools.extend(CKEDITOR.dom.documentFragment.prototype, CKEDITOR.dom.element.prototype, { + type: CKEDITOR.NODE_DOCUMENT_FRAGMENT, + insertAfterNode: function (a) { + a = a.$; + a.parentNode.insertBefore(this.$, a.nextSibling) + }, + getHtml: function () { + var a = new CKEDITOR.dom.element("div"); + this.clone(1, 1).appendTo(a); + return a.getHtml().replace(/\s*data-cke-expando=".*?"/g, "") + } + }, !0, { + append: 1, + appendBogus: 1, + clone: 1, + getFirst: 1, + getHtml: 1, + getLast: 1, + getParent: 1, + getNext: 1, + getPrevious: 1, + appendTo: 1, + moveChildren: 1, + insertBefore: 1, + insertAfterNode: 1, + replace: 1, + trim: 1, + type: 1, + ltrim: 1, + rtrim: 1, + getDocument: 1, + getChildCount: 1, + getChild: 1, + getChildren: 1 + }); + (function () { + function a(a, b) { + var c = this.range; + if (this._.end) return null; + if (!this._.start) { + this._.start = 1; + if (c.collapsed) return this.end(), null; + c.optimize() + } + var e, d = c.startContainer; + e = c.endContainer; + var f = c.startOffset, y = c.endOffset, h, l = this.guard, q = this.type, + F = a ? "getPreviousSourceNode" : "getNextSourceNode"; + if (!a && !this._.guardLTR) { + var g = e.type == CKEDITOR.NODE_ELEMENT ? e : e.getParent(), + k = e.type == CKEDITOR.NODE_ELEMENT ? e.getChild(y) : e.getNext(); + this._.guardLTR = function (a, b) { + return (!b || !g.equals(a)) && (!k || + !a.equals(k)) && (a.type != CKEDITOR.NODE_ELEMENT || !b || !a.equals(c.root)) + } + } + if (a && !this._.guardRTL) { + var M = d.type == CKEDITOR.NODE_ELEMENT ? d : d.getParent(), + t = d.type == CKEDITOR.NODE_ELEMENT ? f ? d.getChild(f - 1) : null : d.getPrevious(); + this._.guardRTL = function (a, b) { + return (!b || !M.equals(a)) && (!t || !a.equals(t)) && (a.type != CKEDITOR.NODE_ELEMENT || !b || !a.equals(c.root)) + } + } + var C = a ? this._.guardRTL : this._.guardLTR; + h = l ? function (a, b) { + return !1 === C(a, b) ? !1 : l(a, b) + } : C; + this.current ? e = this.current[F](!1, q, h) : (a ? e.type == CKEDITOR.NODE_ELEMENT && + (e = 0 < y ? e.getChild(y - 1) : !1 === h(e, !0) ? null : e.getPreviousSourceNode(!0, q, h)) : (e = d, e.type == CKEDITOR.NODE_ELEMENT && ((e = e.getChild(f)) || (e = !1 === h(d, !0) ? null : d.getNextSourceNode(!0, q, h)))), e && !1 === h(e) && (e = null)); + for (; e && !this._.end;) { + this.current = e; + if (!this.evaluator || !1 !== this.evaluator(e)) { + if (!b) return e + } else if (b && this.evaluator) return !1; + e = e[F](!1, q, h) + } + this.end(); + return this.current = null + } + + function d(b) { + for (var c, e = null; c = a.call(this, b);) e = c; + return e + } + + CKEDITOR.dom.walker = CKEDITOR.tools.createClass({ + $: function (a) { + this.range = + a; + this._ = {} + }, proto: { + end: function () { + this._.end = 1 + }, next: function () { + return a.call(this) + }, previous: function () { + return a.call(this, 1) + }, checkForward: function () { + return !1 !== a.call(this, 0, 1) + }, checkBackward: function () { + return !1 !== a.call(this, 1, 1) + }, lastForward: function () { + return d.call(this) + }, lastBackward: function () { + return d.call(this, 1) + }, reset: function () { + delete this.current; + this._ = {} + } + } + }); + var b = { + block: 1, + "list-item": 1, + table: 1, + "table-row-group": 1, + "table-header-group": 1, + "table-footer-group": 1, + "table-row": 1, + "table-column-group": 1, + "table-column": 1, + "table-cell": 1, + "table-caption": 1 + }, c = {absolute: 1, fixed: 1}; + CKEDITOR.dom.element.prototype.isBlockBoundary = function (a) { + return "none" != this.getComputedStyle("float") || this.getComputedStyle("position") in c || !b[this.getComputedStyle("display")] ? !!(this.is(CKEDITOR.dtd.$block) || a && this.is(a)) : !0 + }; + CKEDITOR.dom.walker.blockBoundary = function (a) { + return function (b) { + return !(b.type == CKEDITOR.NODE_ELEMENT && b.isBlockBoundary(a)) + } + }; + CKEDITOR.dom.walker.listItemBoundary = function () { + return this.blockBoundary({br: 1}) + }; + CKEDITOR.dom.walker.bookmark = function (a, b) { + function c(a) { + return a && a.getName && "span" == a.getName() && a.data("cke-bookmark") + } + + return function (e) { + var d, f; + d = e && e.type != CKEDITOR.NODE_ELEMENT && (f = e.getParent()) && c(f); + d = a ? d : d || c(e); + return !!(b ^ d) + } + }; + CKEDITOR.dom.walker.whitespaces = function (a) { + return function (b) { + var c; + b && b.type == CKEDITOR.NODE_TEXT && (c = !CKEDITOR.tools.trim(b.getText()) || CKEDITOR.env.webkit && b.getText() == CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE); + return !!(a ^ c) + } + }; + CKEDITOR.dom.walker.invisible = + function (a) { + var b = CKEDITOR.dom.walker.whitespaces(), c = CKEDITOR.env.webkit ? 1 : 0; + return function (e) { + b(e) ? e = 1 : (e.type == CKEDITOR.NODE_TEXT && (e = e.getParent()), e = e.$.offsetWidth <= c); + return !!(a ^ e) + } + }; + CKEDITOR.dom.walker.nodeType = function (a, b) { + return function (c) { + return !!(b ^ c.type == a) + } + }; + CKEDITOR.dom.walker.bogus = function (a) { + function b(a) { + return !h(a) && !k(a) + } + + return function (c) { + var e = CKEDITOR.env.needsBrFiller ? c.is && c.is("br") : c.getText && f.test(c.getText()); + e && (e = c.getParent(), c = c.getNext(b), e = e.isBlockBoundary() && + (!c || c.type == CKEDITOR.NODE_ELEMENT && c.isBlockBoundary())); + return !!(a ^ e) + } + }; + CKEDITOR.dom.walker.temp = function (a) { + return function (b) { + b.type != CKEDITOR.NODE_ELEMENT && (b = b.getParent()); + b = b && b.hasAttribute("data-cke-temp"); + return !!(a ^ b) + } + }; + var f = /^[\t\r\n ]*(?: |\xa0)$/, h = CKEDITOR.dom.walker.whitespaces(), + k = CKEDITOR.dom.walker.bookmark(), g = CKEDITOR.dom.walker.temp(), m = function (a) { + return k(a) || h(a) || a.type == CKEDITOR.NODE_ELEMENT && a.is(CKEDITOR.dtd.$inline) && !a.is(CKEDITOR.dtd.$empty) + }; + CKEDITOR.dom.walker.ignored = + function (a) { + return function (b) { + b = h(b) || k(b) || g(b); + return !!(a ^ b) + } + }; + var r = CKEDITOR.dom.walker.ignored(); + CKEDITOR.dom.walker.empty = function (a) { + return function (b) { + for (var c = 0, e = b.getChildCount(); c < e; ++c) if (!r(b.getChild(c))) return !!a; + return !a + } + }; + var e = CKEDITOR.dom.walker.empty(), + y = CKEDITOR.dom.walker.validEmptyBlockContainers = CKEDITOR.tools.extend(function (a) { + var b = {}, c; + for (c in a) CKEDITOR.dtd[c]["#"] && (b[c] = 1); + return b + }(CKEDITOR.dtd.$block), {caption: 1, td: 1, th: 1}); + CKEDITOR.dom.walker.editable = function (a) { + return function (b) { + b = + r(b) ? !1 : b.type == CKEDITOR.NODE_TEXT || b.type == CKEDITOR.NODE_ELEMENT && (b.is(CKEDITOR.dtd.$inline) || b.is("hr") || "false" == b.getAttribute("contenteditable") || !CKEDITOR.env.needsBrFiller && b.is(y) && e(b)) ? !0 : !1; + return !!(a ^ b) + } + }; + CKEDITOR.dom.element.prototype.getBogus = function () { + var a = this; + do a = a.getPreviousSourceNode(); while (m(a)); + return a && (CKEDITOR.env.needsBrFiller ? a.is && a.is("br") : a.getText && f.test(a.getText())) ? a : !1 + } + })(); + CKEDITOR.dom.range = function (a) { + this.endOffset = this.endContainer = this.startOffset = this.startContainer = null; + this.collapsed = !0; + var d = a instanceof CKEDITOR.dom.document; + this.document = d ? a : a.getDocument(); + this.root = d ? a.getBody() : a + }; + (function () { + function a(a) { + a.collapsed = a.startContainer && a.endContainer && a.startContainer.equals(a.endContainer) && a.startOffset == a.endOffset + } + + function d(a, b, c, d, f) { + function h(a, b, c, e) { + var d = c ? a.getPrevious() : a.getNext(); + if (e && k) return d; + l || e ? b.append(a.clone(!0, f), c) : (a.remove(), r && b.append(a, c)); + return d + } + + function p() { + var a, b, c, e = Math.min(O.length, n.length); + for (a = 0; a < e; a++) if (b = O[a], c = n[a], !b.equals(c)) return a; + return a - 1 + } + + function g() { + var b = N - 1, c = C && z && !q.equals(F); + b < v - 1 || b < A - 1 || c ? (c ? a.moveToPosition(F, + CKEDITOR.POSITION_BEFORE_START) : A == b + 1 && t ? a.moveToPosition(n[b], CKEDITOR.POSITION_BEFORE_END) : a.moveToPosition(n[b + 1], CKEDITOR.POSITION_BEFORE_START), d && (b = O[b + 1]) && b.type == CKEDITOR.NODE_ELEMENT && (c = CKEDITOR.dom.element.createFromHtml('\x3cspan data-cke-bookmark\x3d"1" style\x3d"display:none"\x3e\x26nbsp;\x3c/span\x3e', a.document), c.insertAfter(b), b.mergeSiblings(!1), a.moveToBookmark({startNode: c}))) : a.collapse(!0) + } + + a.optimizeBookmark(); + var k = 0 === b, r = 1 == b, l = 2 == b; + b = l || r; + var q = a.startContainer, F = a.endContainer, + L = a.startOffset, E = a.endOffset, M, t, C, z, H, P; + if (l && F.type == CKEDITOR.NODE_TEXT && (q.equals(F) || q.type === CKEDITOR.NODE_ELEMENT && q.getFirst().equals(F))) c.append(a.document.createText(F.substring(L, E))); else { + F.type == CKEDITOR.NODE_TEXT ? l ? P = !0 : F = F.split(E) : 0 < F.getChildCount() ? E >= F.getChildCount() ? (F = F.getChild(E - 1), t = !0) : F = F.getChild(E) : z = t = !0; + q.type == CKEDITOR.NODE_TEXT ? l ? H = !0 : q.split(L) : 0 < q.getChildCount() ? 0 === L ? (q = q.getChild(L), M = !0) : q = q.getChild(L - 1) : C = M = !0; + for (var O = q.getParents(), n = F.getParents(), N = p(), + v = O.length - 1, A = n.length - 1, G = c, I, X, V, da = -1, Q = N; Q <= v; Q++) { + X = O[Q]; + V = X.getNext(); + for (Q != v || X.equals(n[Q]) && v < A ? b && (I = G.append(X.clone(0, f))) : M ? h(X, G, !1, C) : H && G.append(a.document.createText(X.substring(L))); V;) { + if (V.equals(n[Q])) { + da = Q; + break + } + V = h(V, G) + } + G = I + } + G = c; + for (Q = N; Q <= A; Q++) if (c = n[Q], V = c.getPrevious(), c.equals(O[Q])) b && (G = G.getChild(0)); else { + Q != A || c.equals(O[Q]) && A < v ? b && (I = G.append(c.clone(0, f))) : t ? h(c, G, !1, z) : P && G.append(a.document.createText(c.substring(0, E))); + if (Q > da) for (; V;) V = h(V, G, !0); + G = I + } + l || g() + } + } + + function b() { + var a = !1, b = CKEDITOR.dom.walker.whitespaces(), c = CKEDITOR.dom.walker.bookmark(!0), + d = CKEDITOR.dom.walker.bogus(); + return function (f) { + return c(f) || b(f) ? !0 : d(f) && !a ? a = !0 : f.type == CKEDITOR.NODE_TEXT && (f.hasAscendant("pre") || CKEDITOR.tools.trim(f.getText()).length) || f.type == CKEDITOR.NODE_ELEMENT && !f.is(h) ? !1 : !0 + } + } + + function c(a) { + var b = CKEDITOR.dom.walker.whitespaces(), c = CKEDITOR.dom.walker.bookmark(1); + return function (d) { + return c(d) || b(d) ? !0 : !a && k(d) || d.type == CKEDITOR.NODE_ELEMENT && d.is(CKEDITOR.dtd.$removeEmpty) + } + } + + function f(a) { + return function () { + var b; + return this[a ? "getPreviousNode" : "getNextNode"](function (a) { + !b && r(a) && (b = a); + return m(a) && !(k(a) && a.equals(b)) + }) + } + } + + var h = { + abbr: 1, + acronym: 1, + b: 1, + bdo: 1, + big: 1, + cite: 1, + code: 1, + del: 1, + dfn: 1, + em: 1, + font: 1, + i: 1, + ins: 1, + label: 1, + kbd: 1, + q: 1, + samp: 1, + small: 1, + span: 1, + strike: 1, + strong: 1, + sub: 1, + sup: 1, + tt: 1, + u: 1, + "var": 1 + }, k = CKEDITOR.dom.walker.bogus(), g = /^[\t\r\n ]*(?: |\xa0)$/, m = CKEDITOR.dom.walker.editable(), + r = CKEDITOR.dom.walker.ignored(!0); + CKEDITOR.dom.range.prototype = { + clone: function () { + var a = + new CKEDITOR.dom.range(this.root); + a._setStartContainer(this.startContainer); + a.startOffset = this.startOffset; + a._setEndContainer(this.endContainer); + a.endOffset = this.endOffset; + a.collapsed = this.collapsed; + return a + }, collapse: function (a) { + a ? (this._setEndContainer(this.startContainer), this.endOffset = this.startOffset) : (this._setStartContainer(this.endContainer), this.startOffset = this.endOffset); + this.collapsed = !0 + }, cloneContents: function (a) { + var b = new CKEDITOR.dom.documentFragment(this.document); + this.collapsed || + d(this, 2, b, !1, "undefined" == typeof a ? !0 : a); + return b + }, deleteContents: function (a) { + this.collapsed || d(this, 0, null, a) + }, extractContents: function (a, b) { + var c = new CKEDITOR.dom.documentFragment(this.document); + this.collapsed || d(this, 1, c, a, "undefined" == typeof b ? !0 : b); + return c + }, createBookmark: function (a) { + var b, c, d, f, h = this.collapsed; + b = this.document.createElement("span"); + b.data("cke-bookmark", 1); + b.setStyle("display", "none"); + b.setHtml("\x26nbsp;"); + a && (d = "cke_bm_" + CKEDITOR.tools.getNextNumber(), b.setAttribute("id", + d + (h ? "C" : "S"))); + h || (c = b.clone(), c.setHtml("\x26nbsp;"), a && c.setAttribute("id", d + "E"), f = this.clone(), f.collapse(), f.insertNode(c)); + f = this.clone(); + f.collapse(!0); + f.insertNode(b); + c ? (this.setStartAfter(b), this.setEndBefore(c)) : this.moveToPosition(b, CKEDITOR.POSITION_AFTER_END); + return {startNode: a ? d + (h ? "C" : "S") : b, endNode: a ? d + "E" : c, serializable: a, collapsed: h} + }, createBookmark2: function () { + function a(b) { + var e = b.container, d = b.offset, p; + p = e; + var f = d; + p = p.type != CKEDITOR.NODE_ELEMENT || 0 === f || f == p.getChildCount() ? + 0 : p.getChild(f - 1).type == CKEDITOR.NODE_TEXT && p.getChild(f).type == CKEDITOR.NODE_TEXT; + p && (e = e.getChild(d - 1), d = e.getLength()); + if (e.type == CKEDITOR.NODE_ELEMENT && 0 < d) { + a:{ + for (p = e; d--;) if (f = p.getChild(d).getIndex(!0), 0 <= f) { + d = f; + break a + } + d = -1 + } + d += 1 + } + if (e.type == CKEDITOR.NODE_TEXT) { + p = e; + for (f = 0; (p = p.getPrevious()) && p.type == CKEDITOR.NODE_TEXT;) f += p.getText().replace(CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE, "").length; + p = f; + e.getText() ? d += p : (f = e.getPrevious(c), p ? (d = p, e = f ? f.getNext() : e.getParent().getFirst()) : (e = + e.getParent(), d = f ? f.getIndex(!0) + 1 : 0)) + } + b.container = e; + b.offset = d + } + + function b(a, c) { + var e = c.getCustomData("cke-fillingChar"); + if (e) { + var d = a.container; + e.equals(d) && (a.offset -= CKEDITOR.dom.selection.FILLING_CHAR_SEQUENCE.length, 0 >= a.offset && (a.offset = d.getIndex(), a.container = d.getParent())) + } + } + + var c = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_TEXT, !0); + return function (c) { + var d = this.collapsed, f = {container: this.startContainer, offset: this.startOffset}, + p = {container: this.endContainer, offset: this.endOffset}; + c && (a(f), + b(f, this.root), d || (a(p), b(p, this.root))); + return { + start: f.container.getAddress(c), + end: d ? null : p.container.getAddress(c), + startOffset: f.offset, + endOffset: p.offset, + normalized: c, + collapsed: d, + is2: !0 + } + } + }(), moveToBookmark: function (a) { + if (a.is2) { + var b = this.document.getByAddress(a.start, a.normalized), c = a.startOffset, + d = a.end && this.document.getByAddress(a.end, a.normalized); + a = a.endOffset; + this.setStart(b, c); + d ? this.setEnd(d, a) : this.collapse(!0) + } else b = (c = a.serializable) ? this.document.getById(a.startNode) : a.startNode, + a = c ? this.document.getById(a.endNode) : a.endNode, this.setStartBefore(b), b.remove(), a ? (this.setEndBefore(a), a.remove()) : this.collapse(!0) + }, getBoundaryNodes: function () { + var a = this.startContainer, b = this.endContainer, c = this.startOffset, d = this.endOffset, f; + if (a.type == CKEDITOR.NODE_ELEMENT) if (f = a.getChildCount(), f > c) a = a.getChild(c); else if (1 > f) a = a.getPreviousSourceNode(); else { + for (a = a.$; a.lastChild;) a = a.lastChild; + a = new CKEDITOR.dom.node(a); + a = a.getNextSourceNode() || a + } + if (b.type == CKEDITOR.NODE_ELEMENT) if (f = b.getChildCount(), + f > d) b = b.getChild(d).getPreviousSourceNode(!0); else if (1 > f) b = b.getPreviousSourceNode(); else { + for (b = b.$; b.lastChild;) b = b.lastChild; + b = new CKEDITOR.dom.node(b) + } + a.getPosition(b) & CKEDITOR.POSITION_FOLLOWING && (a = b); + return {startNode: a, endNode: b} + }, getCommonAncestor: function (a, b) { + var c = this.startContainer, d = this.endContainer, + c = c.equals(d) ? a && c.type == CKEDITOR.NODE_ELEMENT && this.startOffset == this.endOffset - 1 ? c.getChild(this.startOffset) : c : c.getCommonAncestor(d); + return b && !c.is ? c.getParent() : c + }, optimize: function () { + var a = + this.startContainer, b = this.startOffset; + a.type != CKEDITOR.NODE_ELEMENT && (b ? b >= a.getLength() && this.setStartAfter(a) : this.setStartBefore(a)); + a = this.endContainer; + b = this.endOffset; + a.type != CKEDITOR.NODE_ELEMENT && (b ? b >= a.getLength() && this.setEndAfter(a) : this.setEndBefore(a)) + }, optimizeBookmark: function () { + var a = this.startContainer, b = this.endContainer; + a.is && a.is("span") && a.data("cke-bookmark") && this.setStartAt(a, CKEDITOR.POSITION_BEFORE_START); + b && b.is && b.is("span") && b.data("cke-bookmark") && this.setEndAt(b, CKEDITOR.POSITION_AFTER_END) + }, + trim: function (a, b) { + var c = this.startContainer, d = this.startOffset, f = this.collapsed; + if ((!a || f) && c && c.type == CKEDITOR.NODE_TEXT) { + if (d) if (d >= c.getLength()) d = c.getIndex() + 1, c = c.getParent(); else { + var h = c.split(d), d = c.getIndex() + 1, c = c.getParent(); + this.startContainer.equals(this.endContainer) ? this.setEnd(h, this.endOffset - this.startOffset) : c.equals(this.endContainer) && (this.endOffset += 1) + } else d = c.getIndex(), c = c.getParent(); + this.setStart(c, d); + if (f) { + this.collapse(!0); + return + } + } + c = this.endContainer; + d = this.endOffset; + b || f || !c || c.type != CKEDITOR.NODE_TEXT || (d ? (d >= c.getLength() || c.split(d), d = c.getIndex() + 1) : d = c.getIndex(), c = c.getParent(), this.setEnd(c, d)) + }, enlarge: function (a, b) { + function c(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 f = 1; + case CKEDITOR.ENLARGE_ELEMENT: + var h = function (a, b) { + var c = new CKEDITOR.dom.range(g); + c.setStart(a, b); + c.setEndAt(g, CKEDITOR.POSITION_BEFORE_END); + var c = new CKEDITOR.dom.walker(c), + e; + for (c.guard = function (a) { + return !(a.type == CKEDITOR.NODE_ELEMENT && a.isBlockBoundary()) + }; e = c.next();) { + if (e.type != CKEDITOR.NODE_TEXT) return !1; + M = e != a ? e.getText() : e.substring(b); + if (d.test(M)) return !1 + } + return !0 + }; + if (this.collapsed) break; + var p = this.getCommonAncestor(), g = this.root, k, r, l, q, F, L = !1, E, M; + E = this.startContainer; + var t = this.startOffset; + E.type == CKEDITOR.NODE_TEXT ? (t && (E = !CKEDITOR.tools.trim(E.substring(0, t)).length && E, L = !!E), E && ((q = E.getPrevious()) || (l = E.getParent()))) : (t && (q = E.getChild(t - 1) || E.getLast()), + q || (l = E)); + for (l = c(l); l || q;) { + if (l && !q) { + !F && l.equals(p) && (F = !0); + if (f ? l.isBlockBoundary() : !g.contains(l)) break; + L && "inline" == l.getComputedStyle("display") || (L = !1, F ? k = l : this.setStartBefore(l)); + q = l.getPrevious() + } + for (; q;) if (E = !1, q.type == CKEDITOR.NODE_COMMENT) q = q.getPrevious(); else { + if (q.type == CKEDITOR.NODE_TEXT) M = q.getText(), d.test(M) && (q = null), E = /[\s\ufeff]$/.test(M); else if ((q.$.offsetWidth > (CKEDITOR.env.webkit ? 1 : 0) || b && q.is("br")) && !q.data("cke-bookmark")) if (L && CKEDITOR.dtd.$removeEmpty[q.getName()]) { + M = + q.getText(); + if (d.test(M)) q = null; else for (var t = q.$.getElementsByTagName("*"), C = 0, z; z = t[C++];) if (!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]) { + q = null; + break + } + q && (E = !!M.length) + } else q = null; + E && (L ? F ? k = l : l && this.setStartBefore(l) : L = !0); + if (q) { + E = q.getPrevious(); + if (!l && !E) { + l = q; + q = null; + break + } + q = E + } else l = null + } + l && (l = c(l.getParent())) + } + E = this.endContainer; + t = this.endOffset; + l = q = null; + F = L = !1; + E.type == CKEDITOR.NODE_TEXT ? CKEDITOR.tools.trim(E.substring(t)).length ? L = !0 : (L = !E.getLength(), t == E.getLength() ? (q = E.getNext()) || + (l = E.getParent()) : h(E, t) && (l = E.getParent())) : (q = E.getChild(t)) || (l = E); + for (; l || q;) { + if (l && !q) { + !F && l.equals(p) && (F = !0); + if (f ? l.isBlockBoundary() : !g.contains(l)) break; + L && "inline" == l.getComputedStyle("display") || (L = !1, F ? r = l : l && this.setEndAfter(l)); + q = l.getNext() + } + for (; q;) { + E = !1; + if (q.type == CKEDITOR.NODE_TEXT) M = q.getText(), h(q, 0) || (q = null), E = /^[\s\ufeff]/.test(M); else if (q.type == CKEDITOR.NODE_ELEMENT) { + if ((0 < q.$.offsetWidth || b && q.is("br")) && !q.data("cke-bookmark")) if (L && CKEDITOR.dtd.$removeEmpty[q.getName()]) { + M = + q.getText(); + if (d.test(M)) q = null; else for (t = q.$.getElementsByTagName("*"), C = 0; z = t[C++];) if (!CKEDITOR.dtd.$removeEmpty[z.nodeName.toLowerCase()]) { + q = null; + break + } + q && (E = !!M.length) + } else q = null + } else E = 1; + E && L && (F ? r = l : this.setEndAfter(l)); + if (q) { + E = q.getNext(); + if (!l && !E) { + l = q; + q = null; + break + } + q = E + } else l = null + } + l && (l = c(l.getParent())) + } + k && r && (p = k.contains(r) ? r : k, this.setStartBefore(p), this.setEndAfter(p)); + break; + case CKEDITOR.ENLARGE_BLOCK_CONTENTS: + case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: + l = new CKEDITOR.dom.range(this.root); + g = this.root; + l.setStartAt(g, CKEDITOR.POSITION_AFTER_START); + l.setEnd(this.startContainer, this.startOffset); + l = new CKEDITOR.dom.walker(l); + var H, P, + O = CKEDITOR.dom.walker.blockBoundary(a == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ? {br: 1} : null), + n = null, N = function (a) { + if (a.type == CKEDITOR.NODE_ELEMENT && "false" == a.getAttribute("contenteditable")) if (n) { + if (n.equals(a)) { + n = null; + return + } + } else n = a; else if (n) return; + var b = O(a); + b || (H = a); + return b + }, f = function (a) { + var b = N(a); + !b && a.is && a.is("br") && (P = a); + return b + }; + l.guard = N; + l = l.lastBackward(); + H = H || g; + this.setStartAt(H, !H.is("br") && (!l && this.checkStartOfBlock() || l && H.contains(l)) ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_AFTER_END); + if (a == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS) { + l = this.clone(); + l = new CKEDITOR.dom.walker(l); + var v = CKEDITOR.dom.walker.whitespaces(), A = CKEDITOR.dom.walker.bookmark(); + l.evaluator = function (a) { + return !v(a) && !A(a) + }; + if ((l = l.previous()) && l.type == CKEDITOR.NODE_ELEMENT && l.is("br")) break + } + l = this.clone(); + l.collapse(); + l.setEndAt(g, CKEDITOR.POSITION_BEFORE_END); + l = new CKEDITOR.dom.walker(l); + l.guard = a == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ? f : N; + H = n = P = null; + l = l.lastForward(); + H = H || g; + this.setEndAt(H, !l && this.checkEndOfBlock() || l && H.contains(l) ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_BEFORE_START); + P && this.setEndAfter(P) + } + }, shrink: function (a, b, c) { + var d = "boolean" === typeof c ? c : c && "boolean" === typeof c.shrinkOnBlockBoundary ? c.shrinkOnBlockBoundary : !0, + f = c && c.skipBogus; + if (!this.collapsed) { + a = a || CKEDITOR.SHRINK_TEXT; + var h = this.clone(), p = this.startContainer, g = this.endContainer, k = this.startOffset, + r = this.endOffset, l = c = 1; + p && p.type == CKEDITOR.NODE_TEXT && (k ? k >= p.getLength() ? h.setStartAfter(p) : (h.setStartBefore(p), c = 0) : h.setStartBefore(p)); + g && g.type == CKEDITOR.NODE_TEXT && (r ? r >= g.getLength() ? h.setEndAfter(g) : (h.setEndAfter(g), l = 0) : h.setEndBefore(g)); + var h = new CKEDITOR.dom.walker(h), q = CKEDITOR.dom.walker.bookmark(), + F = CKEDITOR.dom.walker.bogus(); + h.evaluator = function (b) { + return b.type == (a == CKEDITOR.SHRINK_ELEMENT ? CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT) + }; + var L; + h.guard = function (b, c) { + if (f && F(b) || q(b)) return !0; + if (a == CKEDITOR.SHRINK_ELEMENT && b.type == CKEDITOR.NODE_TEXT || c && b.equals(L) || !1 === d && b.type == CKEDITOR.NODE_ELEMENT && b.isBlockBoundary() || b.type == CKEDITOR.NODE_ELEMENT && b.hasAttribute("contenteditable")) return !1; + c || b.type != CKEDITOR.NODE_ELEMENT || (L = b); + return !0 + }; + c && (p = h[a == CKEDITOR.SHRINK_ELEMENT ? "lastForward" : "next"]()) && this.setStartAt(p, b ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START); + l && (h.reset(), (h = h[a == CKEDITOR.SHRINK_ELEMENT ? "lastBackward" : "previous"]()) && this.setEndAt(h, b ? CKEDITOR.POSITION_BEFORE_END : + CKEDITOR.POSITION_AFTER_END)); + return !(!c && !l) + } + }, insertNode: function (a) { + this.optimizeBookmark(); + this.trim(!1, !0); + var b = this.startContainer, c = b.getChild(this.startOffset); + c ? a.insertBefore(c) : b.append(a); + a.getParent() && a.getParent().equals(this.endContainer) && this.endOffset++; + this.setStartBefore(a) + }, moveToPosition: function (a, b) { + this.setStartAt(a, b); + this.collapse(!0) + }, moveToRange: function (a) { + this.setStart(a.startContainer, a.startOffset); + this.setEnd(a.endContainer, a.endOffset) + }, selectNodeContents: function (a) { + this.setStart(a, + 0); + this.setEnd(a, a.type == CKEDITOR.NODE_TEXT ? a.getLength() : a.getChildCount()) + }, setStart: function (b, c) { + b.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[b.getName()] && (c = b.getIndex(), b = b.getParent()); + this._setStartContainer(b); + this.startOffset = c; + this.endContainer || (this._setEndContainer(b), this.endOffset = c); + a(this) + }, setEnd: function (b, c) { + b.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[b.getName()] && (c = b.getIndex() + 1, b = b.getParent()); + this._setEndContainer(b); + this.endOffset = c; + this.startContainer || + (this._setStartContainer(b), this.startOffset = c); + a(this) + }, setStartAfter: function (a) { + this.setStart(a.getParent(), a.getIndex() + 1) + }, setStartBefore: function (a) { + this.setStart(a.getParent(), a.getIndex()) + }, setEndAfter: function (a) { + this.setEnd(a.getParent(), a.getIndex() + 1) + }, setEndBefore: function (a) { + this.setEnd(a.getParent(), a.getIndex()) + }, setStartAt: function (b, c) { + switch (c) { + case CKEDITOR.POSITION_AFTER_START: + this.setStart(b, 0); + break; + case CKEDITOR.POSITION_BEFORE_END: + b.type == CKEDITOR.NODE_TEXT ? this.setStart(b, + b.getLength()) : this.setStart(b, b.getChildCount()); + break; + case CKEDITOR.POSITION_BEFORE_START: + this.setStartBefore(b); + break; + case CKEDITOR.POSITION_AFTER_END: + this.setStartAfter(b) + } + a(this) + }, setEndAt: function (b, c) { + switch (c) { + case CKEDITOR.POSITION_AFTER_START: + this.setEnd(b, 0); + break; + case CKEDITOR.POSITION_BEFORE_END: + b.type == CKEDITOR.NODE_TEXT ? this.setEnd(b, b.getLength()) : this.setEnd(b, b.getChildCount()); + break; + case CKEDITOR.POSITION_BEFORE_START: + this.setEndBefore(b); + break; + case CKEDITOR.POSITION_AFTER_END: + this.setEndAfter(b) + } + a(this) + }, + fixBlock: function (a, b) { + var c = this.createBookmark(), d = this.document.createElement(b); + this.collapse(a); + this.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS); + this.extractContents().appendTo(d); + d.trim(); + this.insertNode(d); + var f = d.getBogus(); + f && f.remove(); + d.appendBogus(); + this.moveToBookmark(c); + return d + }, splitBlock: function (a, b) { + var c = new CKEDITOR.dom.elementPath(this.startContainer, this.root), + d = new CKEDITOR.dom.elementPath(this.endContainer, this.root), f = c.block, h = d.block, p = null; + if (!c.blockLimit.equals(d.blockLimit)) return null; + "br" != a && (f || (f = this.fixBlock(!0, a), h = (new CKEDITOR.dom.elementPath(this.endContainer, this.root)).block), h || (h = this.fixBlock(!1, a))); + c = f && this.checkStartOfBlock(); + d = h && this.checkEndOfBlock(); + this.deleteContents(); + f && f.equals(h) && (d ? (p = new CKEDITOR.dom.elementPath(this.startContainer, this.root), this.moveToPosition(h, CKEDITOR.POSITION_AFTER_END), h = null) : c ? (p = new CKEDITOR.dom.elementPath(this.startContainer, this.root), this.moveToPosition(f, CKEDITOR.POSITION_BEFORE_START), f = null) : (h = this.splitElement(f, + b || !1), f.is("ul", "ol") || f.appendBogus())); + return {previousBlock: f, nextBlock: h, wasStartOfBlock: c, wasEndOfBlock: d, elementPath: p} + }, splitElement: function (a, b) { + if (!this.collapsed) return null; + this.setEndAt(a, CKEDITOR.POSITION_BEFORE_END); + var c = this.extractContents(!1, b || !1), d = a.clone(!1, b || !1); + c.appendTo(d); + d.insertAfter(a); + this.moveToPosition(a, CKEDITOR.POSITION_AFTER_END); + return d + }, removeEmptyBlocksAtEnd: function () { + function a(d) { + return function (a) { + return b(a) || c(a) || a.type == CKEDITOR.NODE_ELEMENT && a.isEmptyInlineRemoveable() || + d.is("table") && a.is("caption") ? !1 : !0 + } + } + + var b = CKEDITOR.dom.walker.whitespaces(), c = CKEDITOR.dom.walker.bookmark(!1); + return function (b) { + for (var c = this.createBookmark(), d = this[b ? "endPath" : "startPath"](), f = d.block || d.blockLimit, h; f && !f.equals(d.root) && !f.getFirst(a(f));) h = f.getParent(), this[b ? "setEndAt" : "setStartAt"](f, CKEDITOR.POSITION_AFTER_END), f.remove(1), f = h; + this.moveToBookmark(c) + } + }(), 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, b) { + var d = b == CKEDITOR.START, f = this.clone(); + f.collapse(d); + f[d ? "setStartAt" : "setEndAt"](a, d ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END); + f = new CKEDITOR.dom.walker(f); + f.evaluator = c(d); + return f[d ? "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)), g.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 = b(); + 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)), g.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 = b(); + return a.checkForward() + }, getPreviousNode: function (a, b, c) { + var d = this.clone(); + d.collapse(1); + d.setStartAt(c || this.root, CKEDITOR.POSITION_AFTER_START); + c = new CKEDITOR.dom.walker(d); + c.evaluator = a; + c.guard = b; + return c.previous() + }, getNextNode: function (a, b, c) { + var d = this.clone(); + d.collapse(); + d.setEndAt(c || this.root, CKEDITOR.POSITION_BEFORE_END); + c = new CKEDITOR.dom.walker(d); + c.evaluator = a; + c.guard = b; + return c.next() + }, checkReadOnly: function () { + function a(b, c) { + for (; b;) { + if (b.type == + CKEDITOR.NODE_ELEMENT) { + if ("false" == b.getAttribute("contentEditable") && !b.data("cke-editable")) return 0; + if (b.is("html") || "true" == b.getAttribute("contentEditable") && (b.contains(c) || b.equals(c))) break + } + b = b.getParent() + } + return 1 + } + + return function () { + var b = this.startContainer, c = this.endContainer; + return !(a(b, c) && a(c, b)) + } + }(), moveToElementEditablePosition: function (a, b) { + if (a.type == CKEDITOR.NODE_ELEMENT && !a.isEditable(!1)) return this.moveToPosition(a, b ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START), + !0; + for (var c = 0; a;) { + if (a.type == CKEDITOR.NODE_TEXT) { + b && this.endContainer && this.checkEndOfBlock() && g.test(a.getText()) ? this.moveToPosition(a, CKEDITOR.POSITION_BEFORE_START) : this.moveToPosition(a, b ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START); + c = 1; + break + } + if (a.type == CKEDITOR.NODE_ELEMENT) if (a.isEditable()) this.moveToPosition(a, b ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_START), c = 1; else if (b && a.is("br") && this.endContainer && this.checkEndOfBlock()) this.moveToPosition(a, CKEDITOR.POSITION_BEFORE_START); + else if ("false" == a.getAttribute("contenteditable") && a.is(CKEDITOR.dtd.$block)) return this.setStartBefore(a), this.setEndAfter(a), !0; + var d = a, f = c, h = void 0; + d.type == CKEDITOR.NODE_ELEMENT && d.isEditable(!1) && (h = d[b ? "getLast" : "getFirst"](r)); + f || h || (h = d[b ? "getPrevious" : "getNext"](r)); + a = h + } + return !!c + }, moveToClosestEditablePosition: function (a, b) { + var c, d = 0, f, h, p = [CKEDITOR.POSITION_AFTER_END, CKEDITOR.POSITION_BEFORE_START]; + a ? (c = new CKEDITOR.dom.range(this.root), c.moveToPosition(a, p[b ? 0 : 1])) : c = this.clone(); + if (a && + !a.is(CKEDITOR.dtd.$block)) d = 1; else if (f = c[b ? "getNextEditableNode" : "getPreviousEditableNode"]()) d = 1, (h = f.type == CKEDITOR.NODE_ELEMENT) && f.is(CKEDITOR.dtd.$block) && "false" == f.getAttribute("contenteditable") ? (c.setStartAt(f, CKEDITOR.POSITION_BEFORE_START), c.setEndAt(f, CKEDITOR.POSITION_AFTER_END)) : !CKEDITOR.env.needsBrFiller && h && f.is(CKEDITOR.dom.walker.validEmptyBlockContainers) ? (c.setEnd(f, 0), c.collapse()) : c.moveToPosition(f, p[b ? 1 : 0]); + d && this.moveToRange(c); + 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), b = CKEDITOR.dom.walker.bookmark(!1, !0), + c = CKEDITOR.dom.walker.whitespaces(!0); + a.evaluator = function (a) { + return c(a) && b(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: f(), getPreviousEditableNode: f(1), _getTableElement: function (a) { + a = a || {td: 1, th: 1, tr: 1, tbody: 1, thead: 1, tfoot: 1, table: 1}; + var b = this.startContainer, c = this.endContainer, d = b.getAscendant("table", !0), + f = c.getAscendant("table", !0); + return CKEDITOR.env.safari && d && c.equals(this.root) ? + b.getAscendant(a, !0) : this.getEnclosedNode() ? this.getEnclosedNode().getAscendant(a, !0) : d && f && (d.equals(f) || d.contains(f) || f.contains(d)) ? b.getAscendant(a, !0) : null + }, scrollIntoView: function () { + var a = new CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e", this.document), b, + c, d, f = this.clone(); + f.optimize(); + (d = f.startContainer.type == CKEDITOR.NODE_TEXT) ? (c = f.startContainer.getText(), b = f.startContainer.split(f.startOffset), a.insertAfter(f.startContainer)) : f.insertNode(a); + a.scrollIntoView(); + d && (f.startContainer.setText(c), b.remove()); + a.remove() + }, _setStartContainer: function (a) { + this.startContainer = a + }, _setEndContainer: function (a) { + this.endContainer = a + }, _find: function (a, b) { + var c = this.getCommonAncestor(), d = this.getBoundaryNodes(), f = [], h, p, g, k; + if (c && c.find) for (p = c.find(a), h = 0; h < p.count(); h++) if (c = p.getItem(h), b || !c.isReadOnly()) g = c.getPosition(d.startNode) & CKEDITOR.POSITION_FOLLOWING || d.startNode.equals(c), k = c.getPosition(d.endNode) & CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IS_CONTAINED || + d.endNode.equals(c), g && k && f.push(c); + return f + } + }; + CKEDITOR.dom.range.mergeRanges = function (a) { + return CKEDITOR.tools.array.reduce(a, function (a, b) { + var c = a[a.length - 1], d = !1; + b = b.clone(); + b.enlarge(CKEDITOR.ENLARGE_ELEMENT); + if (c) { + var e = new CKEDITOR.dom.range(b.root), d = new CKEDITOR.dom.walker(e), + f = CKEDITOR.dom.walker.whitespaces(); + e.setStart(c.endContainer, c.endOffset); + e.setEnd(b.startContainer, b.startOffset); + for (e = d.next(); f(e) || b.endContainer.equals(e);) e = d.next(); + d = !e + } + d ? c.setEnd(b.endContainer, b.endOffset) : + a.push(b); + return a + }, []) + } + })(); + CKEDITOR.POSITION_AFTER_START = 1; + CKEDITOR.POSITION_BEFORE_END = 2; + CKEDITOR.POSITION_BEFORE_START = 3; + CKEDITOR.POSITION_AFTER_END = 4; + CKEDITOR.ENLARGE_ELEMENT = 1; + CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2; + CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3; + CKEDITOR.ENLARGE_INLINE = 4; + CKEDITOR.START = 1; + CKEDITOR.END = 2; + CKEDITOR.SHRINK_ELEMENT = 1; + CKEDITOR.SHRINK_TEXT = 2; + "use strict"; + (function () { + function a(a) { + 1 > arguments.length || (this.range = a, this.forceBrBreak = 0, this.enlargeBr = 1, this.enforceRealBlocks = 0, this._ || (this._ = {})) + } + + function d(a) { + var b = []; + a.forEach(function (a) { + if ("true" == a.getAttribute("contenteditable")) return b.push(a), !1 + }, CKEDITOR.NODE_ELEMENT, !0); + return b + } + + function b(a, c, f, h) { + a:{ + null == h && (h = d(f)); + for (var g; g = h.shift();) if (g.getDtd().p) { + h = {element: g, remaining: h}; + break a + } + h = null + } + if (!h) return 0; + if ((g = CKEDITOR.filter.instances[h.element.data("cke-filter")]) && !g.check(c)) return b(a, + c, f, h.remaining); + c = new CKEDITOR.dom.range(h.element); + c.selectNodeContents(h.element); + c = c.createIterator(); + c.enlargeBr = a.enlargeBr; + c.enforceRealBlocks = a.enforceRealBlocks; + c.activeFilter = c.filter = g; + a._.nestedEditable = {element: h.element, container: f, remaining: h.remaining, iterator: c}; + return 1 + } + + function c(a, b, c) { + if (!b) return !1; + a = a.clone(); + a.collapse(!c); + return a.checkBoundaryOfElement(b, c ? CKEDITOR.START : CKEDITOR.END) + } + + var f = /^[\r\n\t ]+$/, h = CKEDITOR.dom.walker.bookmark(!1, !0), k = CKEDITOR.dom.walker.whitespaces(!0), + g = function (a) { + return h(a) && k(a) + }, m = {dd: 1, dt: 1, li: 1}; + a.prototype = { + getNextParagraph: function (a) { + var d, k, x, B, D; + a = a || "p"; + if (this._.nestedEditable) { + if (d = this._.nestedEditable.iterator.getNextParagraph(a)) return this.activeFilter = this._.nestedEditable.iterator.activeFilter, d; + this.activeFilter = this.filter; + if (b(this, a, this._.nestedEditable.container, this._.nestedEditable.remaining)) return this.activeFilter = this._.nestedEditable.iterator.activeFilter, this._.nestedEditable.iterator.getNextParagraph(a); + this._.nestedEditable = + null + } + if (!this.range.root.getDtd()[a]) return null; + if (!this._.started) { + var w = this.range.clone(); + k = w.startPath(); + var p = w.endPath(), J = !w.collapsed && c(w, k.block), u = !w.collapsed && c(w, p.block, 1); + w.shrink(CKEDITOR.SHRINK_ELEMENT, !0); + J && w.setStartAt(k.block, CKEDITOR.POSITION_BEFORE_END); + u && w.setEndAt(p.block, CKEDITOR.POSITION_AFTER_START); + k = w.endContainer.hasAscendant("pre", !0) || w.startContainer.hasAscendant("pre", !0); + w.enlarge(this.forceBrBreak && !k || !this.enlargeBr ? CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS : CKEDITOR.ENLARGE_BLOCK_CONTENTS); + w.collapsed || (k = new CKEDITOR.dom.walker(w.clone()), p = CKEDITOR.dom.walker.bookmark(!0, !0), k.evaluator = p, this._.nextNode = k.next(), k = new CKEDITOR.dom.walker(w.clone()), k.evaluator = p, k = k.previous(), this._.lastNode = k.getNextSourceNode(!0, null, w.root), this._.lastNode && this._.lastNode.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim(this._.lastNode.getText()) && this._.lastNode.getParent().isBlockBoundary() && (p = this.range.clone(), p.moveToPosition(this._.lastNode, CKEDITOR.POSITION_AFTER_END), p.checkEndOfBlock() && + (p = new CKEDITOR.dom.elementPath(p.endContainer, p.root), this._.lastNode = (p.block || p.blockLimit).getNextSourceNode(!0))), this._.lastNode && w.root.contains(this._.lastNode) || (this._.lastNode = this._.docEndMarker = w.document.createText(""), this._.lastNode.insertAfter(k)), w = null); + this._.started = 1; + k = w + } + p = this._.nextNode; + w = this._.lastNode; + for (this._.nextNode = null; p;) { + var J = 0, u = p.hasAscendant("pre"), K = p.type != CKEDITOR.NODE_ELEMENT, l = 0; + if (K) p.type == CKEDITOR.NODE_TEXT && f.test(p.getText()) && (K = 0); else { + var q = p.getName(); + if (CKEDITOR.dtd.$block[q] && "false" == p.getAttribute("contenteditable")) { + d = p; + b(this, a, d); + break + } else if (p.isBlockBoundary(this.forceBrBreak && !u && {br: 1})) { + if ("br" == q) K = 1; else if (!k && !p.getChildCount() && "hr" != q) { + d = p; + x = p.equals(w); + break + } + k && (k.setEndAt(p, CKEDITOR.POSITION_BEFORE_START), "br" != q && (this._.nextNode = p)); + J = 1 + } else { + if (p.getFirst()) { + k || (k = this.range.clone(), k.setStartAt(p, CKEDITOR.POSITION_BEFORE_START)); + p = p.getFirst(); + continue + } + K = 1 + } + } + K && !k && (k = this.range.clone(), k.setStartAt(p, CKEDITOR.POSITION_BEFORE_START)); + x = (!J || K) && p.equals(w); + if (k && !J) for (; !p.getNext(g) && !x;) { + q = p.getParent(); + if (q.isBlockBoundary(this.forceBrBreak && !u && {br: 1})) { + J = 1; + K = 0; + x || q.equals(w); + k.setEndAt(q, CKEDITOR.POSITION_BEFORE_END); + break + } + p = q; + K = 1; + x = p.equals(w); + l = 1 + } + K && k.setEndAt(p, CKEDITOR.POSITION_AFTER_END); + p = this._getNextSourceNode(p, l, w); + if ((x = !p) || J && k) break + } + if (!d) { + if (!k) return this._.docEndMarker && this._.docEndMarker.remove(), this._.nextNode = null; + d = new CKEDITOR.dom.elementPath(k.startContainer, k.root); + p = d.blockLimit; + J = {div: 1, th: 1, td: 1}; + d = d.block; + !d && p && !this.enforceRealBlocks && J[p.getName()] && k.checkStartOfBlock() && k.checkEndOfBlock() && !p.equals(k.root) ? d = p : !d || this.enforceRealBlocks && d.is(m) ? (d = this.range.document.createElement(a), k.extractContents().appendTo(d), d.trim(), k.insertNode(d), B = D = !0) : "li" != d.getName() ? k.checkStartOfBlock() && k.checkEndOfBlock() || (d = d.clone(!1), k.extractContents().appendTo(d), d.trim(), D = k.splitBlock(), B = !D.wasStartOfBlock, D = !D.wasEndOfBlock, k.insertNode(d)) : x || (this._.nextNode = d.equals(w) ? null : this._getNextSourceNode(k.getBoundaryNodes().endNode, + 1, w)) + } + B && (B = d.getPrevious()) && B.type == CKEDITOR.NODE_ELEMENT && ("br" == B.getName() ? B.remove() : B.getLast() && "br" == B.getLast().$.nodeName.toLowerCase() && B.getLast().remove()); + D && (B = d.getLast()) && B.type == CKEDITOR.NODE_ELEMENT && "br" == B.getName() && (!CKEDITOR.env.needsBrFiller || B.getPrevious(h) || B.getNext(h)) && B.remove(); + this._.nextNode || (this._.nextNode = x || d.equals(w) || !w ? null : this._getNextSourceNode(d, 1, w)); + return d + }, _getNextSourceNode: function (a, b, c) { + function d(a) { + return !(a.equals(c) || a.equals(f)) + } + + var f = + this.range.root; + for (a = a.getNextSourceNode(b, null, d); !h(a);) a = a.getNextSourceNode(b, null, d); + return a + } + }; + CKEDITOR.dom.range.prototype.createIterator = function () { + return new a(this) + } + })(); + CKEDITOR.command = function (a, d) { + this.uiItems = []; + this.exec = function (b) { + if (this.state == CKEDITOR.TRISTATE_DISABLED || !this.checkAllowed()) return !1; + this.editorFocus && a.focus(); + return !1 === this.fire("exec") ? !0 : !1 !== d.exec.call(this, a, b) + }; + this.refresh = function (a, b) { + if (!this.readOnly && a.readOnly) return !0; + if (this.context && !b.isContextFor(this.context) || !this.checkAllowed(!0)) return this.disable(), !0; + this.startDisabled || this.enable(); + this.modes && !this.modes[a.mode] && this.disable(); + return !1 === this.fire("refresh", + {editor: a, path: b}) ? !0 : d.refresh && !1 !== d.refresh.apply(this, arguments) + }; + var b; + this.checkAllowed = function (c) { + return c || "boolean" != typeof b ? b = a.activeFilter.checkFeature(this) : b + }; + CKEDITOR.tools.extend(this, d, { + modes: {wysiwyg: 1}, + editorFocus: 1, + contextSensitive: !!d.context, + state: CKEDITOR.TRISTATE_DISABLED + }); + CKEDITOR.event.call(this) + }; + CKEDITOR.command.prototype = { + enable: function () { + this.state == CKEDITOR.TRISTATE_DISABLED && this.checkAllowed() && this.setState(this.preserveState && "undefined" != typeof this.previousState ? this.previousState : CKEDITOR.TRISTATE_OFF) + }, disable: function () { + this.setState(CKEDITOR.TRISTATE_DISABLED) + }, setState: function (a) { + if (this.state == a || a != CKEDITOR.TRISTATE_DISABLED && !this.checkAllowed()) return !1; + this.previousState = this.state; + this.state = a; + this.fire("state"); + return !0 + }, toggleState: function () { + this.state == CKEDITOR.TRISTATE_OFF ? + this.setState(CKEDITOR.TRISTATE_ON) : this.state == CKEDITOR.TRISTATE_ON && this.setState(CKEDITOR.TRISTATE_OFF) + } + }; + CKEDITOR.event.implementOn(CKEDITOR.command.prototype); + CKEDITOR.ENTER_P = 1; + CKEDITOR.ENTER_BR = 2; + CKEDITOR.ENTER_DIV = 3; + CKEDITOR.config = { + customConfig: "config.js", + autoUpdateElement: !0, + language: "", + defaultLanguage: "en", + contentsLangDirection: "", + enterMode: CKEDITOR.ENTER_P, + forceEnterMode: !1, + shiftEnterMode: CKEDITOR.ENTER_BR, + docType: "\x3c!DOCTYPE html\x3e", + bodyId: "", + bodyClass: "", + fullPage: !1, + height: 200, + contentsCss: CKEDITOR.getUrl("contents.css"), + extraPlugins: "", + removePlugins: "", + protectedSource: [], + tabIndex: 0, + width: "", + baseFloatZIndex: 1E4, + blockedKeystrokes: [CKEDITOR.CTRL + 66, CKEDITOR.CTRL + 73, CKEDITOR.CTRL + 85] + }; + (function () { + function a(a, b, c, d, f) { + var e, v; + a = []; + for (e in b) { + v = b[e]; + v = "boolean" == typeof v ? {} : "function" == typeof v ? {match: v} : C(v); + "$" != e.charAt(0) && (v.elements = e); + c && (v.featureName = c.toLowerCase()); + var l = v; + l.elements = k(l.elements, /\s+/) || null; + l.propertiesOnly = l.propertiesOnly || !0 === l.elements; + var n = /\s*,\s*/, p = void 0; + for (p in P) { + l[p] = k(l[p], n) || null; + var h = l, q = O[p], t = k(l[O[p]], n), A = l[p], z = [], g = !0, H = void 0; + t ? g = !1 : t = {}; + for (H in A) "!" == H.charAt(0) && (H = H.slice(1), z.push(H), t[H] = !0, g = !1); + for (; H = z.pop();) A[H] = + A["!" + H], delete A["!" + H]; + h[q] = (g ? !1 : t) || null + } + l.match = l.match || null; + d.push(v); + a.push(v) + } + b = f.elements; + f = f.generic; + var F; + c = 0; + for (d = a.length; c < d; ++c) { + e = C(a[c]); + v = !0 === e.classes || !0 === e.styles || !0 === e.attributes; + l = e; + p = q = n = void 0; + for (n in P) l[n] = J(l[n]); + h = !0; + for (p in O) { + n = O[p]; + q = l[n]; + t = []; + A = void 0; + for (A in q) -1 < A.indexOf("*") ? t.push(new RegExp("^" + A.replace(/\*/g, ".*") + "$")) : t.push(A); + q = t; + q.length && (l[n] = q, h = !1) + } + l.nothingRequired = h; + l.noProperties = !(l.attributes || l.classes || l.styles); + if (!0 === e.elements || + null === e.elements) f[v ? "unshift" : "push"](e); else for (F in l = e.elements, delete e.elements, l) if (b[F]) b[F][v ? "unshift" : "push"](e); else b[F] = [e] + } + } + + function d(a, c, d, f) { + if (!a.match || a.match(c)) if (f || g(a, c)) if (a.propertiesOnly || (d.valid = !0), d.allAttributes || (d.allAttributes = b(a.attributes, c.attributes, d.validAttributes)), d.allStyles || (d.allStyles = b(a.styles, c.styles, d.validStyles)), !d.allClasses) { + a = a.classes; + c = c.classes; + f = d.validClasses; + if (a) if (!0 === a) a = !0; else { + for (var e = 0, v = c.length, l; e < v; ++e) l = c[e], f[l] || + (f[l] = a(l)); + a = !1 + } else a = !1; + d.allClasses = a + } + } + + function b(a, b, c) { + if (!a) return !1; + if (!0 === a) return !0; + for (var d in b) c[d] || (c[d] = a(d)); + return !1 + } + + function c(a, b, c) { + if (!a.match || a.match(b)) { + if (a.noProperties) return !1; + c.hadInvalidAttribute = f(a.attributes, b.attributes) || c.hadInvalidAttribute; + c.hadInvalidStyle = f(a.styles, b.styles) || c.hadInvalidStyle; + a = a.classes; + b = b.classes; + if (a) { + for (var d = !1, e = !0 === a, v = b.length; v--;) if (e || a(b[v])) b.splice(v, 1), d = !0; + a = d + } else a = !1; + c.hadInvalidClass = a || c.hadInvalidClass + } + } + + function f(a, + b) { + if (!a) return !1; + var c = !1, d = !0 === a, f; + for (f in b) if (d || a(f)) delete b[f], c = !0; + return c + } + + function h(a, b, c) { + if (a.disabled || a.customConfig && !c || !b) return !1; + a._.cachedChecks = {}; + return !0 + } + + function k(a, b) { + if (!a) return !1; + if (!0 === a) return a; + if ("string" == typeof a) return a = z(a), "*" == a ? !0 : CKEDITOR.tools.convertArrayToObject(a.split(b)); + if (CKEDITOR.tools.isArray(a)) return a.length ? CKEDITOR.tools.convertArrayToObject(a) : !1; + var c = {}, d = 0, f; + for (f in a) c[f] = a[f], d++; + return d ? c : !1 + } + + function g(a, b) { + if (a.nothingRequired) return !0; + var c, d, f, e; + if (f = a.requiredClasses) for (e = b.classes, c = 0; c < f.length; ++c) if (d = f[c], "string" == typeof d) { + if (-1 == CKEDITOR.tools.indexOf(e, d)) return !1 + } else if (!CKEDITOR.tools.checkIfAnyArrayItemMatches(e, d)) return !1; + return m(b.styles, a.requiredStyles) && m(b.attributes, a.requiredAttributes) + } + + function m(a, b) { + if (!b) return !0; + for (var c = 0, d; c < b.length; ++c) if (d = b[c], "string" == typeof d) { + if (!(d in a)) return !1 + } else if (!CKEDITOR.tools.checkIfAnyObjectPropertyMatches(a, d)) return !1; + return !0 + } + + function r(a) { + if (!a) return {}; + a = a.split(/\s*,\s*/).sort(); + for (var b = {}; a.length;) b[a.shift()] = "cke-test"; + return b + } + + function e(a) { + var b, c, d, f, e = {}, v = 1; + for (a = z(a); b = a.match(n);) (c = b[2]) ? (d = y(c, "styles"), f = y(c, "attrs"), c = y(c, "classes")) : d = f = c = null, e["$" + v++] = { + elements: b[1], + classes: c, + styles: d, + attributes: f + }, a = a.slice(b[0].length); + return e + } + + function y(a, b) { + var c = a.match(N[b]); + return c ? z(c[1]) : null + } + + function x(a) { + var b = a.styleBackup = a.attributes.style, c = a.classBackup = a.attributes["class"]; + a.styles || (a.styles = CKEDITOR.tools.parseCssText(b || + "", 1)); + a.classes || (a.classes = c ? c.split(/\s+/) : []) + } + + function B(a, b, f, e) { + var l = 0, n; + e.toHtml && (b.name = b.name.replace(v, "$1")); + if (e.doCallbacks && a.elementCallbacks) { + a:{ + n = a.elementCallbacks; + for (var h = 0, t = n.length, C; h < t; ++h) if (C = n[h](b)) { + n = C; + break a + } + n = void 0 + } + if (n) return n + } + if (e.doTransform && (n = a._.transformations[b.name])) { + x(b); + for (h = 0; h < n.length; ++h) q(a, b, n[h]); + w(b) + } + if (e.doFilter) { + a:{ + h = b.name; + t = a._; + a = t.allowedRules.elements[h]; + n = t.allowedRules.generic; + h = t.disallowedRules.elements[h]; + t = t.disallowedRules.generic; + C = e.skipRequired; + var z = { + valid: !1, + validAttributes: {}, + validClasses: {}, + validStyles: {}, + allAttributes: !1, + allClasses: !1, + allStyles: !1, + hadInvalidAttribute: !1, + hadInvalidClass: !1, + hadInvalidStyle: !1 + }, k, g; + if (a || n) { + x(b); + if (h) for (k = 0, g = h.length; k < g; ++k) if (!1 === c(h[k], b, z)) { + a = null; + break a + } + if (t) for (k = 0, g = t.length; k < g; ++k) c(t[k], b, z); + if (a) for (k = 0, g = a.length; k < g; ++k) d(a[k], b, z, C); + if (n) for (k = 0, g = n.length; k < g; ++k) d(n[k], b, z, C); + a = z + } else a = null + } + if (!a || !a.valid) return f.push(b), 1; + g = a.validAttributes; + var H = a.validStyles; + n = a.validClasses; + var h = b.attributes, F = b.styles, t = b.classes; + C = b.classBackup; + var L = b.styleBackup, G, N, E = [], z = [], O = /^data-cke-/; + k = !1; + delete h.style; + delete h["class"]; + delete b.classBackup; + delete b.styleBackup; + if (!a.allAttributes) for (G in h) g[G] || (O.test(G) ? G == (N = G.replace(/^data-cke-saved-/, "")) || g[N] || (delete h[G], k = !0) : (delete h[G], k = !0)); + if (!a.allStyles || a.hadInvalidStyle) { + for (G in F) a.allStyles || H[G] ? E.push(G + ":" + F[G]) : k = !0; + E.length && (h.style = E.sort().join("; ")) + } else L && (h.style = L); + if (!a.allClasses || + a.hadInvalidClass) { + for (G = 0; G < t.length; ++G) (a.allClasses || n[t[G]]) && z.push(t[G]); + z.length && (h["class"] = z.sort().join(" ")); + C && z.length < C.split(/\s+/).length && (k = !0) + } else C && (h["class"] = C); + k && (l = 1); + if (!e.skipFinalValidation && !p(b)) return f.push(b), 1 + } + e.toHtml && (b.name = b.name.replace(A, "cke:$1")); + return l + } + + function D(a) { + var b = [], c; + for (c in a) -1 < c.indexOf("*") && b.push(c.replace(/\*/g, ".*")); + return b.length ? new RegExp("^(?:" + b.join("|") + ")$") : null + } + + function w(a) { + var b = a.attributes, c; + delete b.style; + delete b["class"]; + if (c = CKEDITOR.tools.writeCssText(a.styles, !0)) b.style = c; + a.classes.length && (b["class"] = a.classes.sort().join(" ")) + } + + function p(a) { + switch (a.name) { + case "a": + if (!(a.children.length || a.attributes.name || a.attributes.id)) return !1; + break; + case "img": + if (!a.attributes.src) return !1 + } + return !0 + } + + function J(a) { + if (!a) return !1; + if (!0 === a) return !0; + var b = D(a); + return function (c) { + return c in a || b && c.match(b) + } + } + + function u() { + return new CKEDITOR.htmlParser.element("br") + } + + function K(a) { + return a.type == CKEDITOR.NODE_ELEMENT && ("br" == + a.name || t.$block[a.name]) + } + + function l(a, b, c) { + var d = a.name; + if (t.$empty[d] || !a.children.length) "hr" == d && "br" == b ? a.replaceWith(u()) : (a.parent && c.push({ + check: "it", + el: a.parent + }), a.remove()); else if (t.$block[d] || "tr" == d) if ("br" == b) a.previous && !K(a.previous) && (b = u(), b.insertBefore(a)), a.next && !K(a.next) && (b = u(), b.insertAfter(a)), a.replaceWithChildren(); else { + var d = a.children, f; + b:{ + f = t[b]; + for (var e = 0, v = d.length, l; e < v; ++e) if (l = d[e], l.type == CKEDITOR.NODE_ELEMENT && !f[l.name]) { + f = !1; + break b + } + f = !0 + } + if (f) a.name = b, a.attributes = + {}, c.push({check: "parent-down", el: a}); else { + f = a.parent; + for (var e = f.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || "body" == f.name, n, h, v = d.length; 0 < v;) l = d[--v], e && (l.type == CKEDITOR.NODE_TEXT || l.type == CKEDITOR.NODE_ELEMENT && t.$inline[l.name]) ? (n || (n = new CKEDITOR.htmlParser.element(b), n.insertAfter(a), c.push({ + check: "parent-down", + el: n + })), n.add(l, 0)) : (n = null, h = t[f.name] || t.span, l.insertAfter(a), f.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || l.type != CKEDITOR.NODE_ELEMENT || h[l.name] || c.push({ + check: "el-up", + el: l + })); + a.remove() + } + } else d in + {style: 1, script: 1} ? a.remove() : (a.parent && c.push({ + check: "it", + el: a.parent + }), a.replaceWithChildren()) + } + + function q(a, b, c) { + var d, f; + for (d = 0; d < c.length; ++d) if (f = c[d], !(f.check && !a.check(f.check, !1) || f.left && !f.left(b))) { + f.right(b, G); + break + } + } + + function F(a, b) { + var c = b.getDefinition(), d = c.attributes, f = c.styles, e, v, l, n; + if (a.name != c.element) return !1; + for (e in d) if ("class" == e) for (c = d[e].split(/\s+/), l = a.classes.join("|"); n = c.pop();) { + if (-1 == l.indexOf(n)) return !1 + } else if (a.attributes[e] != d[e]) return !1; + for (v in f) if (a.styles[v] != + f[v]) return !1; + return !0 + } + + function L(a, b) { + var c, d; + "string" == typeof a ? c = a : a instanceof CKEDITOR.style ? d = a : (c = a[0], d = a[1]); + return [{ + element: c, left: d, right: function (a, c) { + c.transform(a, b) + } + }] + } + + function E(a) { + return function (b) { + return F(b, a) + } + } + + function M(a) { + return function (b, c) { + c[a](b) + } + } + + var t = CKEDITOR.dtd, C = CKEDITOR.tools.copy, z = CKEDITOR.tools.trim, H = ["", "p", "br", "div"]; + CKEDITOR.FILTER_SKIP_TREE = 2; + CKEDITOR.filter = function (a) { + this.allowedContent = []; + this.disallowedContent = []; + this.elementCallbacks = null; + this.disabled = + !1; + this.editor = null; + this.id = CKEDITOR.tools.getNextNumber(); + this._ = { + allowedRules: {elements: {}, generic: []}, + disallowedRules: {elements: {}, generic: []}, + transformations: {}, + cachedTests: {}, + cachedChecks: {} + }; + CKEDITOR.filter.instances[this.id] = this; + if (a instanceof CKEDITOR.editor) { + a = this.editor = a; + this.customConfig = !0; + var b = a.config.allowedContent; + !0 === b ? this.disabled = !0 : (b || (this.customConfig = !1), this.allow(b, "config", 1), this.allow(a.config.extraAllowedContent, "extra", 1), this.allow(H[a.enterMode] + " " + H[a.shiftEnterMode], + "default", 1), this.disallow(a.config.disallowedContent)) + } else this.customConfig = !1, this.allow(a, "default", 1) + }; + CKEDITOR.filter.instances = {}; + CKEDITOR.filter.prototype = { + allow: function (b, c, d) { + if (!h(this, b, d)) return !1; + var f, v; + if ("string" == typeof b) b = e(b); else if (b instanceof CKEDITOR.style) { + if (b.toAllowedContentRules) return this.allow(b.toAllowedContentRules(this.editor), c, d); + f = b.getDefinition(); + b = {}; + d = f.attributes; + b[f.element] = f = { + styles: f.styles, + requiredStyles: f.styles && CKEDITOR.tools.objectKeys(f.styles) + }; + d && (d = C(d), f.classes = d["class"] ? d["class"].split(/\s+/) : null, f.requiredClasses = f.classes, delete d["class"], f.attributes = d, f.requiredAttributes = d && CKEDITOR.tools.objectKeys(d)) + } else if (CKEDITOR.tools.isArray(b)) { + for (f = 0; f < b.length; ++f) v = this.allow(b[f], c, d); + return v + } + a(this, b, c, this.allowedContent, this._.allowedRules); + return !0 + }, applyTo: function (a, b, c, d) { + if (this.disabled) return !1; + var f = this, e = [], v = this.editor && this.editor.config.protectedSource, n, h = !1, + q = {doFilter: !c, doTransform: !0, doCallbacks: !0, toHtml: b}; + a.forEach(function (a) { + if (a.type == CKEDITOR.NODE_ELEMENT) { + if ("off" == a.attributes["data-cke-filter"]) return !1; + if (!b || "span" != a.name || !~CKEDITOR.tools.objectKeys(a.attributes).join("|").indexOf("data-cke-")) if (n = B(f, a, e, q), n & 1) h = !0; else if (n & 2) return !1 + } else if (a.type == CKEDITOR.NODE_COMMENT && a.value.match(/^\{cke_protected\}(?!\{C\})/)) { + var c; + a:{ + var d = decodeURIComponent(a.value.replace(/^\{cke_protected\}/, "")); + c = []; + var l, p, t; + if (v) for (p = 0; p < v.length; ++p) if ((t = d.match(v[p])) && t[0].length == d.length) { + c = !0; + break a + } + d = CKEDITOR.htmlParser.fragment.fromHtml(d); + 1 == d.children.length && (l = d.children[0]).type == CKEDITOR.NODE_ELEMENT && B(f, l, c, q); + c = !c.length + } + c || e.push(a) + } + }, null, !0); + e.length && (h = !0); + var C; + a = []; + d = H[d || (this.editor ? this.editor.enterMode : CKEDITOR.ENTER_P)]; + for (var z; c = e.pop();) c.type == CKEDITOR.NODE_ELEMENT ? l(c, d, a) : c.remove(); + for (; C = a.pop();) if (c = C.el, c.parent) switch (z = t[c.parent.name] || t.span, C.check) { + case "it": + t.$removeEmpty[c.name] && !c.children.length ? l(c, d, a) : p(c) || l(c, d, a); + break; + case "el-up": + c.parent.type == + CKEDITOR.NODE_DOCUMENT_FRAGMENT || z[c.name] || l(c, d, a); + break; + case "parent-down": + c.parent.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT || z[c.name] || l(c.parent, d, a) + } + return h + }, checkFeature: function (a) { + if (this.disabled || !a) return !0; + a.toFeature && (a = a.toFeature(this.editor)); + return !a.requiredContent || this.check(a.requiredContent) + }, disable: function () { + this.disabled = !0 + }, disallow: function (b) { + if (!h(this, b, !0)) return !1; + "string" == typeof b && (b = e(b)); + a(this, b, null, this.disallowedContent, this._.disallowedRules); + return !0 + }, + addContentForms: function (a) { + if (!this.disabled && a) { + var b, c, d = [], f; + for (b = 0; b < a.length && !f; ++b) c = a[b], ("string" == typeof c || c instanceof CKEDITOR.style) && this.check(c) && (f = c); + if (f) { + for (b = 0; b < a.length; ++b) d.push(L(a[b], f)); + this.addTransformations(d) + } + } + }, addElementCallback: function (a) { + this.elementCallbacks || (this.elementCallbacks = []); + this.elementCallbacks.push(a) + }, addFeature: function (a) { + if (this.disabled || !a) return !0; + a.toFeature && (a = a.toFeature(this.editor)); + this.allow(a.allowedContent, a.name); + this.addTransformations(a.contentTransformations); + this.addContentForms(a.contentForms); + return a.requiredContent && (this.customConfig || this.disallowedContent.length) ? this.check(a.requiredContent) : !0 + }, addTransformations: function (a) { + var b, c; + if (!this.disabled && a) { + var d = this._.transformations, f; + for (f = 0; f < a.length; ++f) { + b = a[f]; + var e = void 0, v = void 0, l = void 0, n = void 0, h = void 0, p = void 0; + c = []; + for (v = 0; v < b.length; ++v) l = b[v], "string" == typeof l ? (l = l.split(/\s*:\s*/), n = l[0], h = null, p = l[1]) : (n = l.check, h = l.left, p = l.right), e || (e = l, e = e.element ? e.element : n ? n.match(/^([a-z0-9]+)/i)[0] : + e.left.getDefinition().element), h instanceof CKEDITOR.style && (h = E(h)), c.push({ + check: n == e ? null : n, + left: h, + right: "string" == typeof p ? M(p) : p + }); + b = e; + d[b] || (d[b] = []); + d[b].push(c) + } + } + }, check: function (a, b, c) { + if (this.disabled) return !0; + if (CKEDITOR.tools.isArray(a)) { + for (var d = a.length; d--;) if (this.check(a[d], b, c)) return !0; + return !1 + } + var f, v; + if ("string" == typeof a) { + v = a + "\x3c" + (!1 === b ? "0" : "1") + (c ? "1" : "0") + "\x3e"; + if (v in this._.cachedChecks) return this._.cachedChecks[v]; + d = e(a).$1; + f = d.styles; + var l = d.classes; + d.name = d.elements; + d.classes = l = l ? l.split(/\s*,\s*/) : []; + d.styles = r(f); + d.attributes = r(d.attributes); + d.children = []; + l.length && (d.attributes["class"] = l.join(" ")); + f && (d.attributes.style = CKEDITOR.tools.writeCssText(d.styles)); + f = d + } else d = a.getDefinition(), f = d.styles, l = d.attributes || {}, f && !CKEDITOR.tools.isEmpty(f) ? (f = C(f), l.style = CKEDITOR.tools.writeCssText(f, !0)) : f = {}, f = { + name: d.element, + attributes: l, + classes: l["class"] ? l["class"].split(/\s+/) : [], + styles: f, + children: [] + }; + var l = CKEDITOR.tools.clone(f), n = [], h; + if (!1 !== b && (h = this._.transformations[f.name])) { + for (d = + 0; d < h.length; ++d) q(this, f, h[d]); + w(f) + } + B(this, l, n, {doFilter: !0, doTransform: !1 !== b, skipRequired: !c, skipFinalValidation: !c}); + b = 0 < n.length ? !1 : CKEDITOR.tools.objectCompare(f.attributes, l.attributes, !0) ? !0 : !1; + "string" == typeof a && (this._.cachedChecks[v] = b); + return b + }, getAllowedEnterMode: function () { + var a = ["p", "div", "br"], b = {p: CKEDITOR.ENTER_P, div: CKEDITOR.ENTER_DIV, br: CKEDITOR.ENTER_BR}; + return function (c, d) { + var f = a.slice(), e; + if (this.check(H[c])) return c; + for (d || (f = f.reverse()); e = f.pop();) if (this.check(e)) return b[e]; + return CKEDITOR.ENTER_BR + } + }(), clone: function () { + var a = new CKEDITOR.filter, b = CKEDITOR.tools.clone; + a.allowedContent = b(this.allowedContent); + a._.allowedRules = b(this._.allowedRules); + a.disallowedContent = b(this.disallowedContent); + a._.disallowedRules = b(this._.disallowedRules); + a._.transformations = b(this._.transformations); + a.disabled = this.disabled; + a.editor = this.editor; + return a + }, destroy: function () { + delete CKEDITOR.filter.instances[this.id]; + delete this._; + delete this.allowedContent; + delete this.disallowedContent + } + }; + var P = {styles: 1, attributes: 1, classes: 1}, + O = {styles: "requiredStyles", attributes: "requiredAttributes", classes: "requiredClasses"}, + n = /^([a-z0-9\-*\s]+)((?:\s*\{[!\w\-,\s\*]+\}\s*|\s*\[[!\w\-,\s\*]+\]\s*|\s*\([!\w\-,\s\*]+\)\s*){0,3})(?:;\s*|$)/i, + N = {styles: /{([^}]+)}/, attrs: /\[([^\]]+)\]/, classes: /\(([^\)]+)\)/}, v = /^cke:(object|embed|param)$/, + A = /^(object|embed|param)$/, G; + G = CKEDITOR.filter.transformationsTools = { + sizeToStyle: function (a) { + this.lengthToStyle(a, "width"); + this.lengthToStyle(a, "height") + }, sizeToAttribute: function (a) { + this.lengthToAttribute(a, + "width"); + this.lengthToAttribute(a, "height") + }, lengthToStyle: function (a, b, c) { + c = c || b; + if (!(c in a.styles)) { + var d = a.attributes[b]; + d && (/^\d+$/.test(d) && (d += "px"), a.styles[c] = d) + } + delete a.attributes[b] + }, lengthToAttribute: function (a, b, c) { + c = c || b; + if (!(c in a.attributes)) { + var d = a.styles[b], f = d && d.match(/^(\d+)(?:\.\d*)?px$/); + f ? a.attributes[c] = f[1] : "cke-test" == d && (a.attributes[c] = "cke-test") + } + delete a.styles[b] + }, alignmentToStyle: function (a) { + if (!("float" in a.styles)) { + var b = a.attributes.align; + if ("left" == b || "right" == + b) a.styles["float"] = b + } + delete a.attributes.align + }, alignmentToAttribute: function (a) { + if (!("align" in a.attributes)) { + var b = a.styles["float"]; + if ("left" == b || "right" == b) a.attributes.align = b + } + delete a.styles["float"] + }, splitBorderShorthand: function (a) { + function b(d) { + a.styles["border-top-width"] = c[d[0]]; + a.styles["border-right-width"] = c[d[1]]; + a.styles["border-bottom-width"] = c[d[2]]; + a.styles["border-left-width"] = c[d[3]] + } + + if (a.styles.border) { + var c = a.styles.border.match(/([\.\d]+\w+)/g) || ["0px"]; + switch (c.length) { + case 1: + a.styles["border-width"] = + c[0]; + break; + case 2: + b([0, 1, 0, 1]); + break; + case 3: + b([0, 1, 2, 1]); + break; + case 4: + b([0, 1, 2, 3]) + } + a.styles["border-style"] = a.styles["border-style"] || (a.styles.border.match(/(none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit)/) || [])[0]; + a.styles["border-style"] || delete a.styles["border-style"]; + delete a.styles.border + } + }, listTypeToStyle: function (a) { + if (a.attributes.type) switch (a.attributes.type) { + case "a": + a.styles["list-style-type"] = "lower-alpha"; + break; + case "A": + a.styles["list-style-type"] = + "upper-alpha"; + break; + case "i": + a.styles["list-style-type"] = "lower-roman"; + break; + case "I": + a.styles["list-style-type"] = "upper-roman"; + break; + case "1": + a.styles["list-style-type"] = "decimal"; + break; + default: + a.styles["list-style-type"] = a.attributes.type + } + }, splitMarginShorthand: function (a) { + function b(d) { + a.styles["margin-top"] = c[d[0]]; + a.styles["margin-right"] = c[d[1]]; + a.styles["margin-bottom"] = c[d[2]]; + a.styles["margin-left"] = c[d[3]] + } + + if (a.styles.margin) { + var c = a.styles.margin.match(/(\-?[\.\d]+\w+)/g) || ["0px"]; + switch (c.length) { + case 1: + b([0, + 0, 0, 0]); + break; + case 2: + b([0, 1, 0, 1]); + break; + case 3: + b([0, 1, 2, 1]); + break; + case 4: + b([0, 1, 2, 3]) + } + delete a.styles.margin + } + }, matchesStyle: F, transform: function (a, b) { + if ("string" == typeof b) a.name = b; else { + var c = b.getDefinition(), d = c.styles, f = c.attributes, e, l, v, n; + a.name = c.element; + for (e in f) if ("class" == e) for (c = a.classes.join("|"), v = f[e].split(/\s+/); n = v.pop();) -1 == c.indexOf(n) && a.classes.push(n); else a.attributes[e] = f[e]; + for (l in d) a.styles[l] = d[l] + } + } + } + })(); + (function () { + CKEDITOR.focusManager = function (a) { + if (a.focusManager) return a.focusManager; + this.hasFocus = !1; + this.currentActive = null; + this._ = {editor: a}; + return this + }; + CKEDITOR.focusManager._ = {blurDelay: 200}; + CKEDITOR.focusManager.prototype = { + focus: function (a) { + this._.timer && clearTimeout(this._.timer); + a && (this.currentActive = a); + this.hasFocus || this._.locked || ((a = CKEDITOR.currentInstance) && a.focusManager.blur(1), this.hasFocus = !0, (a = this._.editor.container) && a.addClass("cke_focus"), this._.editor.fire("focus")) + }, lock: function () { + this._.locked = + 1 + }, unlock: function () { + delete this._.locked + }, blur: function (a) { + function d() { + if (this.hasFocus) { + this.hasFocus = !1; + var a = this._.editor.container; + a && a.removeClass("cke_focus"); + this._.editor.fire("blur") + } + } + + if (!this._.locked) { + this._.timer && clearTimeout(this._.timer); + var b = CKEDITOR.focusManager._.blurDelay; + a || !b ? d.call(this) : this._.timer = CKEDITOR.tools.setTimeout(function () { + delete this._.timer; + d.call(this) + }, b, this) + } + }, add: function (a, d) { + var b = a.getCustomData("focusmanager"); + if (!b || b != this) { + b && b.remove(a); + var b = + "focus", c = "blur"; + d && (CKEDITOR.env.ie ? (b = "focusin", c = "focusout") : CKEDITOR.event.useCapture = 1); + var f = { + blur: function () { + a.equals(this.currentActive) && this.blur() + }, focus: function () { + this.focus(a) + } + }; + a.on(b, f.focus, this); + a.on(c, f.blur, this); + d && (CKEDITOR.event.useCapture = 0); + a.setCustomData("focusmanager", this); + a.setCustomData("focusmanager_handlers", f) + } + }, remove: function (a) { + a.removeCustomData("focusmanager"); + var d = a.removeCustomData("focusmanager_handlers"); + a.removeListener("blur", d.blur); + a.removeListener("focus", + d.focus) + } + } + })(); + CKEDITOR.keystrokeHandler = function (a) { + if (a.keystrokeHandler) return a.keystrokeHandler; + this.keystrokes = {}; + this.blockedKeystrokes = {}; + this._ = {editor: a}; + return this + }; + (function () { + var a, d = function (b) { + b = b.data; + var d = b.getKeystroke(), h = this.keystrokes[d], k = this._.editor; + a = !1 === k.fire("key", {keyCode: d, domEvent: b}); + a || (h && (a = !1 !== k.execCommand(h, {from: "keystrokeHandler"})), a || (a = !!this.blockedKeystrokes[d])); + a && b.preventDefault(!0); + return !a + }, b = function (b) { + a && (a = !1, b.data.preventDefault(!0)) + }; + CKEDITOR.keystrokeHandler.prototype = { + attach: function (a) { + a.on("keydown", d, this); + if (CKEDITOR.env.gecko && CKEDITOR.env.mac) a.on("keypress", b, this) + } + } + })(); + (function () { + CKEDITOR.lang = { + languages: { + af: 1, + ar: 1, + az: 1, + bg: 1, + bn: 1, + bs: 1, + ca: 1, + cs: 1, + cy: 1, + da: 1, + de: 1, + "de-ch": 1, + el: 1, + "en-au": 1, + "en-ca": 1, + "en-gb": 1, + en: 1, + eo: 1, + es: 1, + "es-mx": 1, + et: 1, + eu: 1, + fa: 1, + fi: 1, + fo: 1, + "fr-ca": 1, + fr: 1, + gl: 1, + gu: 1, + he: 1, + hi: 1, + hr: 1, + hu: 1, + id: 1, + is: 1, + it: 1, + ja: 1, + ka: 1, + km: 1, + ko: 1, + ku: 1, + lt: 1, + lv: 1, + mk: 1, + mn: 1, + ms: 1, + nb: 1, + nl: 1, + no: 1, + oc: 1, + pl: 1, + "pt-br": 1, + pt: 1, + ro: 1, + ru: 1, + si: 1, + sk: 1, + sl: 1, + sq: 1, + "sr-latn": 1, + sr: 1, + sv: 1, + th: 1, + tr: 1, + tt: 1, + ug: 1, + uk: 1, + vi: 1, + "zh-cn": 1, + zh: 1 + }, rtl: {ar: 1, fa: 1, he: 1, ku: 1, ug: 1}, load: function (a, d, b) { + a && CKEDITOR.lang.languages[a] || + (a = this.detect(d, a)); + var c = this; + d = function () { + c[a].dir = c.rtl[a] ? "rtl" : "ltr"; + b(a, c[a]) + }; + this[a] ? d() : CKEDITOR.scriptLoader.load(CKEDITOR.getUrl("lang/" + a + ".js"), d, this) + }, detect: function (a, d) { + var b = this.languages; + d = d || navigator.userLanguage || navigator.language || a; + var c = d.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/), f = c[1], c = c[2]; + b[f + "-" + c] ? f = f + "-" + c : b[f] || (f = null); + CKEDITOR.lang.detect = f ? function () { + return f + } : function (a) { + return a + }; + return f || a + } + } + })(); + CKEDITOR.scriptLoader = function () { + var a = {}, d = {}; + return { + load: function (b, c, f, h) { + var k = "string" == typeof b; + k && (b = [b]); + f || (f = CKEDITOR); + var g = b.length, m = [], r = [], e = function (a) { + c && (k ? c.call(f, a) : c.call(f, m, r)) + }; + if (0 === g) e(!0); else { + var y = function (a, b) { + (b ? m : r).push(a); + 0 >= --g && (h && CKEDITOR.document.getDocumentElement().removeStyle("cursor"), e(b)) + }, x = function (b, c) { + a[b] = 1; + var f = d[b]; + delete d[b]; + for (var e = 0; e < f.length; e++) f[e](b, c) + }, B = function (b) { + if (a[b]) y(b, !0); else { + var f = d[b] || (d[b] = []); + f.push(y); + if (!(1 < f.length)) { + var e = + new CKEDITOR.dom.element("script"); + e.setAttributes({type: "text/javascript", src: b}); + c && (CKEDITOR.env.ie && (8 >= CKEDITOR.env.version || CKEDITOR.env.ie9Compat) ? e.$.onreadystatechange = function () { + if ("loaded" == e.$.readyState || "complete" == e.$.readyState) e.$.onreadystatechange = null, x(b, !0) + } : (e.$.onload = function () { + setTimeout(function () { + x(b, !0) + }, 0) + }, e.$.onerror = function () { + x(b, !1) + })); + e.appendTo(CKEDITOR.document.getHead()) + } + } + }; + h && CKEDITOR.document.getDocumentElement().setStyle("cursor", "wait"); + for (var D = 0; D < g; D++) B(b[D]) + } + }, + queue: function () { + function a() { + var b; + (b = c[0]) && this.load(b.scriptUrl, b.callback, CKEDITOR, 0) + } + + var c = []; + return function (d, h) { + var k = this; + c.push({ + scriptUrl: d, callback: function () { + h && h.apply(this, arguments); + c.shift(); + a.call(k) + } + }); + 1 == c.length && a.call(this) + } + }() + } + }(); + CKEDITOR.resourceManager = function (a, d) { + this.basePath = a; + this.fileName = d; + this.registered = {}; + this.loaded = {}; + this.externals = {}; + this._ = {waitingList: {}} + }; + CKEDITOR.resourceManager.prototype = { + add: function (a, d) { + if (this.registered[a]) throw Error('[CKEDITOR.resourceManager.add] The resource name "' + a + '" is already registered.'); + var b = this.registered[a] = d || {}; + b.name = a; + b.path = this.getPath(a); + CKEDITOR.fire(a + CKEDITOR.tools.capitalize(this.fileName) + "Ready", b); + return this.get(a) + }, get: function (a) { + return this.registered[a] || null + }, getPath: function (a) { + var d = this.externals[a]; + return CKEDITOR.getUrl(d && d.dir || this.basePath + a + "/") + }, getFilePath: function (a) { + var d = this.externals[a]; + return CKEDITOR.getUrl(this.getPath(a) + (d ? d.file : this.fileName + ".js")) + }, addExternal: function (a, d, b) { + a = a.split(","); + for (var c = 0; c < a.length; c++) { + var f = a[c]; + b || (d = d.replace(/[^\/]+$/, function (a) { + b = a; + return "" + })); + this.externals[f] = {dir: d, file: b || this.fileName + ".js"} + } + }, load: function (a, d, b) { + CKEDITOR.tools.isArray(a) || (a = a ? [a] : []); + for (var c = this.loaded, f = this.registered, h = [], k = {}, g = {}, m = 0; m < a.length; m++) { + var r = a[m]; + if (r) if (c[r] || f[r]) g[r] = this.get(r); else { + var e = this.getFilePath(r); + h.push(e); + e in k || (k[e] = + []); + k[e].push(r) + } + } + CKEDITOR.scriptLoader.load(h, function (a, f) { + if (f.length) throw Error('[CKEDITOR.resourceManager.load] Resource name "' + k[f[0]].join(",") + '" was not found at "' + f[0] + '".'); + for (var e = 0; e < a.length; e++) for (var h = k[a[e]], m = 0; m < h.length; m++) { + var p = h[m]; + g[p] = this.get(p); + c[p] = 1 + } + d.call(b, g) + }, this) + } + }; + CKEDITOR.plugins = new CKEDITOR.resourceManager("plugins/", "plugin"); + CKEDITOR.plugins.load = CKEDITOR.tools.override(CKEDITOR.plugins.load, function (a) { + var d = {}; + return function (b, c, f) { + var h = {}, k = function (b) { + a.call(this, b, function (a) { + CKEDITOR.tools.extend(h, a); + var b = [], e; + for (e in a) { + var g = a[e], x = g && g.requires; + if (!d[e]) { + if (g.icons) for (var B = g.icons.split(","), D = B.length; D--;) CKEDITOR.skin.addIcon(B[D], g.path + "icons/" + (CKEDITOR.env.hidpi && g.hidpi ? "hidpi/" : "") + B[D] + ".png"); + d[e] = 1 + } + if (x) for (x.split && (x = x.split(",")), g = 0; g < x.length; g++) h[x[g]] || b.push(x[g]) + } + if (b.length) k.call(this, + b); else { + for (e in h) g = h[e], g.onLoad && !g.onLoad._called && (!1 === g.onLoad() && delete h[e], g.onLoad._called = 1); + c && c.call(f || window, h) + } + }, this) + }; + k.call(this, b) + } + }); + CKEDITOR.plugins.setLang = function (a, d, b) { + var c = this.get(a); + a = c.langEntries || (c.langEntries = {}); + c = c.lang || (c.lang = []); + c.split && (c = c.split(",")); + -1 == CKEDITOR.tools.indexOf(c, d) && c.push(d); + a[d] = b + }; + CKEDITOR.ui = function (a) { + if (a.ui) return a.ui; + this.items = {}; + this.instances = {}; + this.editor = a; + this._ = {handlers: {}}; + return this + }; + CKEDITOR.ui.prototype = { + add: function (a, d, b) { + b.name = a.toLowerCase(); + var c = this.items[a] = { + type: d, + command: b.command || null, + args: Array.prototype.slice.call(arguments, 2) + }; + CKEDITOR.tools.extend(c, b) + }, get: function (a) { + return this.instances[a] + }, create: function (a) { + var d = this.items[a], b = d && this._.handlers[d.type], + c = d && d.command && this.editor.getCommand(d.command), b = b && b.create.apply(this, d.args); + this.instances[a] = b; + c && c.uiItems.push(b); + b && !b.type && (b.type = d.type); + return b + }, addHandler: function (a, d) { + this._.handlers[a] = + d + }, space: function (a) { + return CKEDITOR.document.getById(this.spaceId(a)) + }, spaceId: function (a) { + return this.editor.id + "_" + a + } + }; + CKEDITOR.event.implementOn(CKEDITOR.ui); + (function () { + function a(a, f, e) { + CKEDITOR.event.call(this); + a = a && CKEDITOR.tools.clone(a); + if (void 0 !== f) { + if (!(f instanceof CKEDITOR.dom.element)) throw Error("Expect element of type CKEDITOR.dom.element."); + if (!e) throw Error("One of the element modes must be specified."); + if (CKEDITOR.env.ie && CKEDITOR.env.quirks && e == CKEDITOR.ELEMENT_MODE_INLINE) throw Error("Inline element mode is not supported on IE quirks."); + if (!b(f, e)) throw Error('The specified element mode is not supported on element: "' + f.getName() + '".'); + this.element = f; + this.elementMode = e; + this.name = this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO && (f.getId() || f.getNameAtt()) + } else this.elementMode = CKEDITOR.ELEMENT_MODE_NONE; + this._ = {}; + this.commands = {}; + this.templates = {}; + this.name = this.name || d(); + this.id = CKEDITOR.tools.getNextId(); + this.status = "unloaded"; + this.config = CKEDITOR.tools.prototypedCopy(CKEDITOR.config); + this.ui = new CKEDITOR.ui(this); + this.focusManager = new CKEDITOR.focusManager(this); + this.keystrokeHandler = new CKEDITOR.keystrokeHandler(this); + this.on("readOnly", + c); + this.on("selectionChange", function (a) { + h(this, a.data.path) + }); + this.on("activeFilterChange", function () { + h(this, this.elementPath(), !0) + }); + this.on("mode", c); + this.on("instanceReady", function () { + this.config.startupFocus && this.focus() + }); + CKEDITOR.fire("instanceCreated", null, this); + CKEDITOR.add(this); + CKEDITOR.tools.setTimeout(function () { + "destroyed" !== this.status ? g(this, a) : CKEDITOR.warn("editor-incorrect-destroy") + }, 0, this) + } + + function d() { + do var a = "editor" + ++D; while (CKEDITOR.instances[a]); + return a + } + + function b(a, + b) { + return b == CKEDITOR.ELEMENT_MODE_INLINE ? a.is(CKEDITOR.dtd.$editable) || a.is("textarea") : b == CKEDITOR.ELEMENT_MODE_REPLACE ? !a.is(CKEDITOR.dtd.$nonBodyContent) : 1 + } + + function c() { + var a = this.commands, b; + for (b in a) f(this, a[b]) + } + + function f(a, b) { + b[b.startDisabled ? "disable" : a.readOnly && !b.readOnly ? "disable" : b.modes[a.mode] ? "enable" : "disable"]() + } + + function h(a, b, c) { + if (b) { + var d, f, e = a.commands; + for (f in e) d = e[f], (c || d.contextSensitive) && d.refresh(a, b) + } + } + + function k(a) { + var b = a.config.customConfig; + if (!b) return !1; + var b = + CKEDITOR.getUrl(b), c = w[b] || (w[b] = {}); + c.fn ? (c.fn.call(a, a.config), CKEDITOR.getUrl(a.config.customConfig) != b && k(a) || a.fireOnce("customConfigLoaded")) : CKEDITOR.scriptLoader.queue(b, function () { + c.fn = CKEDITOR.editorConfig ? CKEDITOR.editorConfig : function () { + }; + k(a) + }); + return !0 + } + + function g(a, b) { + a.on("customConfigLoaded", function () { + if (b) { + if (b.on) for (var c in b.on) a.on(c, b.on[c]); + CKEDITOR.tools.extend(a.config, b, !0); + delete a.config.on + } + c = a.config; + a.readOnly = c.readOnly ? !0 : a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? + a.element.is("textarea") ? a.element.hasAttribute("disabled") || a.element.hasAttribute("readonly") : a.element.isReadOnly() : a.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ? a.element.hasAttribute("disabled") || a.element.hasAttribute("readonly") : !1; + a.blockless = a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? !(a.element.is("textarea") || CKEDITOR.dtd[a.element.getName()].p) : !1; + a.tabIndex = c.tabIndex || a.element && a.element.getAttribute("tabindex") || 0; + a.activeEnterMode = a.enterMode = a.blockless ? CKEDITOR.ENTER_BR : c.enterMode; + a.activeShiftEnterMode = a.shiftEnterMode = a.blockless ? CKEDITOR.ENTER_BR : c.shiftEnterMode; + c.skin && (CKEDITOR.skinName = c.skin); + a.fireOnce("configLoaded"); + a.dataProcessor = new CKEDITOR.htmlDataProcessor(a); + a.filter = a.activeFilter = new CKEDITOR.filter(a); + m(a) + }); + b && null != b.customConfig && (a.config.customConfig = b.customConfig); + k(a) || a.fireOnce("customConfigLoaded") + } + + function m(a) { + CKEDITOR.skin.loadPart("editor", function () { + r(a) + }) + } + + function r(a) { + CKEDITOR.lang.load(a.config.language, a.config.defaultLanguage, function (b, + c) { + var d = a.config.title; + a.langCode = b; + a.lang = CKEDITOR.tools.prototypedCopy(c); + a.title = "string" == typeof d || !1 === d ? d : [a.lang.editor, a.name].join(", "); + a.config.contentsLangDirection || (a.config.contentsLangDirection = a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? a.element.getDirection(1) : a.lang.dir); + a.fire("langLoaded"); + e(a) + }) + } + + function e(a) { + a.getStylesSet(function (b) { + a.once("loaded", function () { + a.fire("stylesSet", {styles: b}) + }, null, null, 1); + y(a) + }) + } + + function y(a) { + var b = a.config, c = b.plugins, d = b.extraPlugins, f = + b.removePlugins; + if (d) var e = new RegExp("(?:^|,)(?:" + d.replace(/\s*,\s*/g, "|") + ")(?\x3d,|$)", "g"), + c = c.replace(e, ""), c = c + ("," + d); + if (f) var h = new RegExp("(?:^|,)(?:" + f.replace(/\s*,\s*/g, "|") + ")(?\x3d,|$)", "g"), + c = c.replace(h, ""); + CKEDITOR.env.air && (c += ",adobeair"); + CKEDITOR.plugins.load(c.split(","), function (c) { + var d = [], f = [], e = []; + a.plugins = c; + for (var l in c) { + var q = c[l], k = q.lang, g = null, O = q.requires, n; + CKEDITOR.tools.isArray(O) && (O = O.join(",")); + if (O && (n = O.match(h))) for (; O = n.pop();) CKEDITOR.error("editor-plugin-required", + {plugin: O.replace(",", ""), requiredBy: l}); + k && !a.lang[l] && (k.split && (k = k.split(",")), 0 <= CKEDITOR.tools.indexOf(k, a.langCode) ? g = a.langCode : (g = a.langCode.replace(/-.*/, ""), g = g != a.langCode && 0 <= CKEDITOR.tools.indexOf(k, g) ? g : 0 <= CKEDITOR.tools.indexOf(k, "en") ? "en" : k[0]), q.langEntries && q.langEntries[g] ? (a.lang[l] = q.langEntries[g], g = null) : e.push(CKEDITOR.getUrl(q.path + "lang/" + g + ".js"))); + f.push(g); + d.push(q) + } + CKEDITOR.scriptLoader.load(e, function () { + for (var c = ["beforeInit", "init", "afterInit"], e = 0; e < c.length; e++) for (var l = + 0; l < d.length; l++) { + var n = d[l]; + 0 === e && f[l] && n.lang && n.langEntries && (a.lang[n.name] = n.langEntries[f[l]]); + if (n[c[e]]) n[c[e]](a) + } + a.fireOnce("pluginsLoaded"); + b.keystrokes && a.setKeystroke(a.config.keystrokes); + for (l = 0; l < a.config.blockedKeystrokes.length; l++) a.keystrokeHandler.blockedKeystrokes[a.config.blockedKeystrokes[l]] = 1; + a.status = "loaded"; + a.fireOnce("loaded"); + CKEDITOR.fire("instanceLoaded", null, a) + }) + }) + } + + function x() { + var a = this.element; + if (a && this.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO) { + var b = this.getData(); + this.config.htmlEncodeOutput && (b = CKEDITOR.tools.htmlEncode(b)); + a.is("textarea") ? a.setValue(b) : a.setHtml(b); + return !0 + } + return !1 + } + + function B(a, b) { + function c(a) { + var b = a.startContainer, d = a.endContainer; + return b.is && (b.is("tr") || b.is("td") && b.equals(d) && a.endOffset === b.getChildCount()) ? !0 : !1 + } + + function d(a) { + var b = a.startContainer; + return b.is("tr") ? a.cloneContents() : b.clone(!0) + } + + for (var f = new CKEDITOR.dom.documentFragment, e, h, g, k = 0; k < a.length; k++) { + var M = a[k], t = M.startContainer.getAscendant("tr", !0); + c(M) ? (e || + (e = t.getAscendant("table").clone(), e.append(t.getAscendant({ + thead: 1, + tbody: 1, + tfoot: 1 + }).clone()), f.append(e), e = e.findOne("thead, tbody, tfoot")), h && h.equals(t) || (h = t, g = t.clone(), e.append(g)), g.append(d(M))) : f.append(M.cloneContents()) + } + return e ? f : b.getHtmlFromRange(a[0]) + } + + a.prototype = CKEDITOR.editor.prototype; + CKEDITOR.editor = a; + var D = 0, w = {}; + CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { + addCommand: function (a, b) { + b.name = a.toLowerCase(); + var c = new CKEDITOR.command(this, b); + this.mode && f(this, c); + return this.commands[a] = + c + }, _attachToForm: function () { + function a(b) { + c.updateElement(); + c._.required && !d.getValue() && !1 === c.fire("required") && b.data.preventDefault() + } + + function b(a) { + return !!(a && a.call && a.apply) + } + + var c = this, d = c.element, f = new CKEDITOR.dom.element(d.$.form); + d.is("textarea") && f && (f.on("submit", a), b(f.$.submit) && (f.$.submit = CKEDITOR.tools.override(f.$.submit, function (b) { + return function () { + a(); + b.apply ? b.apply(this) : b() + } + })), c.on("destroy", function () { + f.removeListener("submit", a) + })) + }, destroy: function (a) { + this.fire("beforeDestroy"); + !a && x.call(this); + this.editable(null); + this.filter && (this.filter.destroy(), delete this.filter); + delete this.activeFilter; + this.status = "destroyed"; + this.fire("destroy"); + this.removeAllListeners(); + CKEDITOR.remove(this); + CKEDITOR.fire("instanceDestroyed", null, this) + }, elementPath: function (a) { + if (!a) { + a = this.getSelection(); + if (!a) return null; + a = a.getStartElement() + } + return a ? new CKEDITOR.dom.elementPath(a, this.editable()) : null + }, createRange: function () { + var a = this.editable(); + return a ? new CKEDITOR.dom.range(a) : null + }, execCommand: function (a, + b) { + var c = this.getCommand(a), d = {name: a, commandData: b || {}, command: c}; + return c && c.state != CKEDITOR.TRISTATE_DISABLED && !1 !== this.fire("beforeCommandExec", d) && (d.returnValue = c.exec(d.commandData), !c.async && !1 !== this.fire("afterCommandExec", d)) ? d.returnValue : !1 + }, getCommand: function (a) { + return this.commands[a] + }, getData: function (a) { + !a && this.fire("beforeGetData"); + var b = this._.data; + "string" != typeof b && (b = (b = this.element) && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ? b.is("textarea") ? b.getValue() : b.getHtml() : + ""); + b = {dataValue: b}; + !a && this.fire("getData", b); + return b.dataValue + }, getSnapshot: function () { + var a = this.fire("getSnapshot"); + "string" != typeof a && (a = (a = this.element) && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ? a.is("textarea") ? a.getValue() : a.getHtml() : ""); + return a + }, loadSnapshot: function (a) { + this.fire("loadSnapshot", a) + }, setData: function (a, b, c) { + var d = !0, f = b; + b && "object" == typeof b && (c = b.internal, f = b.callback, d = !b.noSnapshot); + !c && d && this.fire("saveSnapshot"); + if (f || !c) this.once("dataReady", function (a) { + !c && + d && this.fire("saveSnapshot"); + f && f.call(a.editor) + }); + a = {dataValue: a}; + !c && this.fire("setData", a); + this._.data = a.dataValue; + !c && this.fire("afterSetData", a) + }, setReadOnly: function (a) { + a = null == a || a; + this.readOnly != a && (this.readOnly = a, this.keystrokeHandler.blockedKeystrokes[8] = +a, this.editable().setReadOnly(a), this.fire("readOnly")) + }, insertHtml: function (a, b, c) { + this.fire("insertHtml", {dataValue: a, mode: b, range: c}) + }, insertText: function (a) { + this.fire("insertText", a) + }, insertElement: function (a) { + this.fire("insertElement", + a) + }, getSelectedHtml: function (a) { + var b = this.editable(), c = this.getSelection(), c = c && c.getRanges(); + if (!b || !c || 0 === c.length) return null; + b = B(c, b); + return a ? b.getHtml() : b + }, extractSelectedHtml: function (a, b) { + var c = this.editable(), d = this.getSelection().getRanges(), f = new CKEDITOR.dom.documentFragment, e; + if (!c || 0 === d.length) return null; + for (e = 0; e < d.length; e++) f.append(c.extractHtmlFromRange(d[e], b)); + b || this.getSelection().selectRanges([d[0]]); + return a ? f.getHtml() : f + }, focus: function () { + this.fire("beforeFocus") + }, checkDirty: function () { + return "ready" == + this.status && this._.previousValue !== this.getSnapshot() + }, resetDirty: function () { + this._.previousValue = this.getSnapshot() + }, updateElement: function () { + return x.call(this) + }, setKeystroke: function () { + for (var a = this.keystrokeHandler.keystrokes, b = CKEDITOR.tools.isArray(arguments[0]) ? arguments[0] : [[].slice.call(arguments, 0)], c, d, f = b.length; f--;) c = b[f], d = 0, CKEDITOR.tools.isArray(c) && (d = c[1], c = c[0]), d ? a[c] = d : delete a[c] + }, getCommandKeystroke: function (a) { + if (a = "string" === typeof a ? this.getCommand(a) : a) { + var b = CKEDITOR.tools.object.findKey(this.commands, + a), c = this.keystrokeHandler.keystrokes, d; + if (a.fakeKeystroke) return a.fakeKeystroke; + for (d in c) if (c.hasOwnProperty(d) && c[d] == b) return d + } + return null + }, addFeature: function (a) { + return this.filter.addFeature(a) + }, setActiveFilter: function (a) { + a || (a = this.filter); + this.activeFilter !== a && (this.activeFilter = a, this.fire("activeFilterChange"), a === this.filter ? this.setActiveEnterMode(null, null) : this.setActiveEnterMode(a.getAllowedEnterMode(this.enterMode), a.getAllowedEnterMode(this.shiftEnterMode, !0))) + }, setActiveEnterMode: function (a, + b) { + a = a ? this.blockless ? CKEDITOR.ENTER_BR : a : this.enterMode; + b = b ? this.blockless ? CKEDITOR.ENTER_BR : b : this.shiftEnterMode; + if (this.activeEnterMode != a || this.activeShiftEnterMode != b) this.activeEnterMode = a, this.activeShiftEnterMode = b, this.fire("activeEnterModeChange") + }, showNotification: function (a) { + alert(a) + } + }) + })(); + CKEDITOR.ELEMENT_MODE_NONE = 0; + CKEDITOR.ELEMENT_MODE_REPLACE = 1; + CKEDITOR.ELEMENT_MODE_APPENDTO = 2; + CKEDITOR.ELEMENT_MODE_INLINE = 3; + CKEDITOR.htmlParser = function () { + this._ = {htmlPartsRegex: /<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)--\x3e)|(?:([^\/\s>]+)((?:\s+[\w\-:.]+(?:\s*=\s*?(?:(?:"[^"]*")|(?:'[^']*')|[^\s"'\/>]+))?)*)[\S\s]*?(\/?)>))/g} + }; + (function () { + var a = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g, d = { + 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 (b) { + for (var c, f, h = 0, k; c = this._.htmlPartsRegex.exec(b);) { + f = c.index; + if (f > h) if (h = b.substring(h, f), k) k.push(h); else this.onText(h); + h = this._.htmlPartsRegex.lastIndex; + if (f = c[1]) if (f = f.toLowerCase(), k && CKEDITOR.dtd.$cdata[f] && (this.onCDATA(k.join("")), k = null), !k) { + this.onTagClose(f); + continue + } + if (k) k.push(c[0]); else if (f = c[3]) { + if (f = f.toLowerCase(), !/="/.test(f)) { + var g = {}, m, r = c[4]; + c = !!c[5]; + if (r) for (; m = a.exec(r);) { + var e = m[1].toLowerCase(); + m = m[2] || m[3] || m[4] || ""; + g[e] = !m && d[e] ? e : CKEDITOR.tools.htmlDecodeAttr(m) + } + this.onTagOpen(f, g, c); + !k && CKEDITOR.dtd.$cdata[f] && (k = []) + } + } else if (f = c[2]) this.onComment(f) + } + if (b.length > h) this.onText(b.substring(h, + b.length)) + } + } + })(); + CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass({ + $: function () { + this._ = {output: []} + }, proto: { + openTag: function (a) { + this._.output.push("\x3c", a) + }, openTagClose: function (a, d) { + d ? this._.output.push(" /\x3e") : this._.output.push("\x3e") + }, attribute: function (a, d) { + "string" == typeof d && (d = CKEDITOR.tools.htmlEncodeAttr(d)); + this._.output.push(" ", a, '\x3d"', d, '"') + }, closeTag: function (a) { + this._.output.push("\x3c/", a, "\x3e") + }, text: function (a) { + this._.output.push(a) + }, comment: function (a) { + this._.output.push("\x3c!--", a, + "--\x3e") + }, write: function (a) { + this._.output.push(a) + }, reset: function () { + this._.output = []; + this._.indent = !1 + }, getHtml: function (a) { + var d = this._.output.join(""); + a && this.reset(); + return d + } + } + }); + "use strict"; + (function () { + CKEDITOR.htmlParser.node = function () { + }; + CKEDITOR.htmlParser.node.prototype = { + remove: function () { + var a = this.parent.children, d = CKEDITOR.tools.indexOf(a, this), b = this.previous, c = this.next; + b && (b.next = c); + c && (c.previous = b); + a.splice(d, 1); + this.parent = null + }, replaceWith: function (a) { + var d = this.parent.children, b = CKEDITOR.tools.indexOf(d, this), c = a.previous = this.previous, + f = a.next = this.next; + c && (c.next = a); + f && (f.previous = a); + d[b] = a; + a.parent = this.parent; + this.parent = null + }, insertAfter: function (a) { + var d = a.parent.children, + b = CKEDITOR.tools.indexOf(d, a), c = a.next; + d.splice(b + 1, 0, this); + this.next = a.next; + this.previous = a; + a.next = this; + c && (c.previous = this); + this.parent = a.parent + }, insertBefore: function (a) { + var d = a.parent.children, b = CKEDITOR.tools.indexOf(d, a); + d.splice(b, 0, this); + this.next = a; + (this.previous = a.previous) && (a.previous.next = this); + a.previous = this; + this.parent = a.parent + }, getAscendant: function (a) { + var d = "function" == typeof a ? a : "string" == typeof a ? function (b) { + return b.name == a + } : function (b) { + return b.name in a + }, b = this.parent; + for (; b && + b.type == CKEDITOR.NODE_ELEMENT;) { + if (d(b)) return b; + b = b.parent + } + return null + }, wrapWith: function (a) { + this.replaceWith(a); + a.add(this); + return a + }, getIndex: function () { + return CKEDITOR.tools.indexOf(this.parent.children, this) + }, getFilterContext: function (a) { + return a || {} + } + } + })(); + "use strict"; + CKEDITOR.htmlParser.comment = function (a) { + this.value = a; + this._ = {isBlockLike: !1} + }; + CKEDITOR.htmlParser.comment.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { + type: CKEDITOR.NODE_COMMENT, + filter: function (a, d) { + var b = this.value; + if (!(b = a.onComment(d, b, this))) return this.remove(), !1; + if ("string" != typeof b) return this.replaceWith(b), !1; + this.value = b; + return !0 + }, + writeHtml: function (a, d) { + d && this.filter(d); + a.comment(this.value) + } + }); + "use strict"; + (function () { + CKEDITOR.htmlParser.text = function (a) { + this.value = a; + this._ = {isBlockLike: !1} + }; + CKEDITOR.htmlParser.text.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { + type: CKEDITOR.NODE_TEXT, + filter: function (a, d) { + if (!(this.value = a.onText(d, this.value, this))) return this.remove(), !1 + }, + writeHtml: function (a, d) { + d && this.filter(d); + a.text(this.value) + } + }) + })(); + "use strict"; + (function () { + CKEDITOR.htmlParser.cdata = function (a) { + this.value = a + }; + CKEDITOR.htmlParser.cdata.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { + type: CKEDITOR.NODE_TEXT, + filter: function () { + }, + writeHtml: function (a) { + a.write(this.value) + } + }) + })(); + "use strict"; + CKEDITOR.htmlParser.fragment = function () { + this.children = []; + this.parent = null; + this._ = {isBlockLike: !0, hasInlineStarted: !1} + }; + (function () { + function a(a) { + return a.attributes["data-cke-survive"] ? !1 : "a" == a.name && a.attributes.href || CKEDITOR.dtd.$removeEmpty[a.name] + } + + var d = CKEDITOR.tools.extend({ + table: 1, + ul: 1, + ol: 1, + dl: 1 + }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl), b = {ol: 1, ul: 1}, + c = CKEDITOR.tools.extend({}, {html: 1}, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { + style: 1, + script: 1 + }), f = {ul: "li", ol: "li", dl: "dd", table: "tbody", tbody: "tr", thead: "tr", tfoot: "tr", tr: "td"}; + CKEDITOR.htmlParser.fragment.fromHtml = + function (h, k, g) { + function m(a) { + var b; + if (0 < p.length) for (var c = 0; c < p.length; c++) { + var d = p[c], f = d.name, e = CKEDITOR.dtd[f], l = u.name && CKEDITOR.dtd[u.name]; + l && !l[f] || a && e && !e[a] && CKEDITOR.dtd[a] ? f == u.name && (y(u, u.parent, 1), c--) : (b || (r(), b = 1), d = d.clone(), d.parent = u, u = d, p.splice(c, 1), c--) + } + } + + function r() { + for (; J.length;) y(J.shift(), u) + } + + function e(a) { + if (a._.isBlockLike && "pre" != a.name && "textarea" != a.name) { + var b = a.children.length, c = a.children[b - 1], d; + c && c.type == CKEDITOR.NODE_TEXT && ((d = CKEDITOR.tools.rtrim(c.value)) ? + c.value = d : a.children.length = b - 1) + } + } + + function y(b, c, d) { + c = c || u || w; + var f = u; + void 0 === b.previous && (x(c, b) && (u = c, D.onTagOpen(g, {}), b.returnPoint = c = u), e(b), a(b) && !b.children.length || c.add(b), "pre" == b.name && (l = !1), "textarea" == b.name && (K = !1)); + b.returnPoint ? (u = b.returnPoint, delete b.returnPoint) : u = d ? c : f + } + + function x(a, b) { + if ((a == w || "body" == a.name) && g && (!a.name || CKEDITOR.dtd[a.name][g])) { + var c, d; + return (c = b.attributes && (d = b.attributes["data-cke-real-element-type"]) ? d : b.name) && c in CKEDITOR.dtd.$inline && !(c in CKEDITOR.dtd.head) && + !b.isOrphan || b.type == CKEDITOR.NODE_TEXT + } + } + + function B(a, b) { + return a in CKEDITOR.dtd.$listItem || a in CKEDITOR.dtd.$tableContent ? a == b || "dt" == a && "dd" == b || "dd" == a && "dt" == b : !1 + } + + var D = new CKEDITOR.htmlParser, + w = k instanceof CKEDITOR.htmlParser.element ? k : "string" == typeof k ? new CKEDITOR.htmlParser.element(k) : new CKEDITOR.htmlParser.fragment, + p = [], J = [], u = w, K = "textarea" == w.name, l = "pre" == w.name; + D.onTagOpen = function (f, e, h, g) { + e = new CKEDITOR.htmlParser.element(f, e); + e.isUnknown && h && (e.isEmpty = !0); + e.isOptionalClose = g; + if (a(e)) p.push(e); else { + if ("pre" == f) l = !0; else { + if ("br" == f && l) { + u.add(new CKEDITOR.htmlParser.text("\n")); + return + } + "textarea" == f && (K = !0) + } + if ("br" == f) J.push(e); else { + for (; !(g = (h = u.name) ? CKEDITOR.dtd[h] || (u._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span) : c, e.isUnknown || u.isUnknown || g[f]);) if (u.isOptionalClose) D.onTagClose(h); else if (f in b && h in b) h = u.children, (h = h[h.length - 1]) && "li" == h.name || y(h = new CKEDITOR.htmlParser.element("li"), u), !e.returnPoint && (e.returnPoint = u), u = h; else if (f in CKEDITOR.dtd.$listItem && + !B(f, h)) D.onTagOpen("li" == f ? "ul" : "dl", {}, 0, 1); else if (h in d && !B(f, h)) !e.returnPoint && (e.returnPoint = u), u = u.parent; else if (h in CKEDITOR.dtd.$inline && p.unshift(u), u.parent) y(u, u.parent, 1); else { + e.isOrphan = 1; + break + } + m(f); + r(); + e.parent = u; + e.isEmpty ? y(e) : u = e + } + } + }; + D.onTagClose = function (a) { + for (var b = p.length - 1; 0 <= b; b--) if (a == p[b].name) { + p.splice(b, 1); + return + } + for (var c = [], d = [], f = u; f != w && f.name != a;) f._.isBlockLike || d.unshift(f), c.push(f), f = f.returnPoint || f.parent; + if (f != w) { + for (b = 0; b < c.length; b++) { + var e = c[b]; + y(e, e.parent) + } + u = + f; + f._.isBlockLike && r(); + y(f, f.parent); + f == u && (u = u.parent); + p = p.concat(d) + } + "body" == a && (g = !1) + }; + D.onText = function (a) { + if (!(u._.hasInlineStarted && !J.length || l || K) && (a = CKEDITOR.tools.ltrim(a), 0 === a.length)) return; + var b = u.name, + e = b ? CKEDITOR.dtd[b] || (u._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span) : c; + if (!K && !e["#"] && b in d) D.onTagOpen(f[b] || ""), D.onText(a); else { + r(); + m(); + l || K || (a = a.replace(/[\t\r\n ]{2,}|[\t\r\n]/g, " ")); + a = new CKEDITOR.htmlParser.text(a); + if (x(u, a)) this.onTagOpen(g, {}, 0, 1); + u.add(a) + } + }; + D.onCDATA = + function (a) { + u.add(new CKEDITOR.htmlParser.cdata(a)) + }; + D.onComment = function (a) { + r(); + m(); + u.add(new CKEDITOR.htmlParser.comment(a)) + }; + D.parse(h); + for (r(); u != w;) y(u, u.parent, 1); + e(w); + return w + }; + CKEDITOR.htmlParser.fragment.prototype = { + type: CKEDITOR.NODE_DOCUMENT_FRAGMENT, add: function (a, b) { + isNaN(b) && (b = this.children.length); + var c = 0 < b ? this.children[b - 1] : null; + if (c) { + if (a._.isBlockLike && c.type == CKEDITOR.NODE_TEXT && (c.value = CKEDITOR.tools.rtrim(c.value), 0 === c.value.length)) { + this.children.pop(); + this.add(a); + return + } + c.next = + a + } + a.previous = c; + a.parent = this; + this.children.splice(b, 0, a); + this._.hasInlineStarted || (this._.hasInlineStarted = a.type == CKEDITOR.NODE_TEXT || a.type == CKEDITOR.NODE_ELEMENT && !a._.isBlockLike) + }, filter: function (a, b) { + b = this.getFilterContext(b); + a.onRoot(b, this); + this.filterChildren(a, !1, b) + }, filterChildren: function (a, b, c) { + if (this.childrenFilteredBy != a.id) { + c = this.getFilterContext(c); + if (b && !this.parent) a.onRoot(c, this); + this.childrenFilteredBy = a.id; + for (b = 0; b < this.children.length; b++) !1 === this.children[b].filter(a, + c) && b-- + } + }, writeHtml: function (a, b) { + b && this.filter(b); + this.writeChildrenHtml(a) + }, writeChildrenHtml: function (a, b, c) { + var d = this.getFilterContext(); + if (c && !this.parent && b) b.onRoot(d, this); + b && this.filterChildren(b, !1, d); + b = 0; + c = this.children; + for (d = c.length; b < d; b++) c[b].writeHtml(a) + }, forEach: function (a, b, c) { + if (!(c || b && this.type != b)) var d = a(this); + if (!1 !== d) { + c = this.children; + for (var f = 0; f < c.length; f++) d = c[f], d.type == CKEDITOR.NODE_ELEMENT ? d.forEach(a, b) : b && d.type != b || a(d) + } + }, getFilterContext: function (a) { + return a || + {} + } + } + })(); + "use strict"; + (function () { + function a() { + this.rules = [] + } + + function d(b, c, d, h) { + var k, g; + for (k in c) (g = b[k]) || (g = b[k] = new a), g.add(c[k], d, h) + } + + CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass({ + $: function (b) { + this.id = CKEDITOR.tools.getNextNumber(); + this.elementNameRules = new a; + this.attributeNameRules = new a; + this.elementsRules = {}; + this.attributesRules = {}; + this.textRules = new a; + this.commentRules = new a; + this.rootRules = new a; + b && this.addRules(b, 10) + }, proto: { + addRules: function (a, c) { + var f; + "number" == typeof c ? f = c : c && "priority" in c && (f = + c.priority); + "number" != typeof f && (f = 10); + "object" != typeof c && (c = {}); + a.elementNames && this.elementNameRules.addMany(a.elementNames, f, c); + a.attributeNames && this.attributeNameRules.addMany(a.attributeNames, f, c); + a.elements && d(this.elementsRules, a.elements, f, c); + a.attributes && d(this.attributesRules, a.attributes, f, c); + a.text && this.textRules.add(a.text, f, c); + a.comment && this.commentRules.add(a.comment, f, c); + a.root && this.rootRules.add(a.root, f, c) + }, applyTo: function (a) { + a.filter(this) + }, onElementName: function (a, c) { + return this.elementNameRules.execOnName(a, + c) + }, onAttributeName: function (a, c) { + return this.attributeNameRules.execOnName(a, c) + }, onText: function (a, c, d) { + return this.textRules.exec(a, c, d) + }, onComment: function (a, c, d) { + return this.commentRules.exec(a, c, d) + }, onRoot: function (a, c) { + return this.rootRules.exec(a, c) + }, onElement: function (a, c) { + for (var d = [this.elementsRules["^"], this.elementsRules[c.name], this.elementsRules.$], h, k = 0; 3 > k; k++) if (h = d[k]) { + h = h.exec(a, c, this); + if (!1 === h) return null; + if (h && h != c) return this.onNode(a, h); + if (c.parent && !c.name) break + } + return c + }, + onNode: function (a, c) { + var d = c.type; + return d == CKEDITOR.NODE_ELEMENT ? this.onElement(a, c) : d == CKEDITOR.NODE_TEXT ? new CKEDITOR.htmlParser.text(this.onText(a, c.value)) : d == CKEDITOR.NODE_COMMENT ? new CKEDITOR.htmlParser.comment(this.onComment(a, c.value)) : null + }, onAttribute: function (a, c, d, h) { + return (d = this.attributesRules[d]) ? d.exec(a, h, c, this) : h + } + } + }); + CKEDITOR.htmlParser.filterRulesGroup = a; + a.prototype = { + add: function (a, c, d) { + this.rules.splice(this.findIndex(c), 0, {value: a, priority: c, options: d}) + }, addMany: function (a, + c, d) { + for (var h = [this.findIndex(c), 0], k = 0, g = a.length; k < g; k++) h.push({ + value: a[k], + priority: c, + options: d + }); + this.rules.splice.apply(this.rules, h) + }, findIndex: function (a) { + for (var c = this.rules, d = c.length - 1; 0 <= d && a < c[d].priority;) d--; + return d + 1 + }, exec: function (a, c) { + var d = c instanceof CKEDITOR.htmlParser.node || c instanceof CKEDITOR.htmlParser.fragment, + h = Array.prototype.slice.call(arguments, 1), k = this.rules, g = k.length, m, r, e, y; + for (y = 0; y < g; y++) if (d && (m = c.type, r = c.name), e = k[y], !(a.nonEditable && !e.options.applyToAll || + a.nestedEditable && e.options.excludeNestedEditable)) { + e = e.value.apply(null, h); + if (!1 === e || d && e && (e.name != r || e.type != m)) return e; + null != e && (h[0] = c = e) + } + return c + }, execOnName: function (a, c) { + for (var d = 0, h = this.rules, k = h.length, g; c && d < k; d++) g = h[d], a.nonEditable && !g.options.applyToAll || a.nestedEditable && g.options.excludeNestedEditable || (c = c.replace(g.value[0], g.value[1])); + return c + } + } + })(); + (function () { + function a(a, d) { + function e(a) { + return a || CKEDITOR.env.needsNbspFiller ? new CKEDITOR.htmlParser.text(" ") : new CKEDITOR.htmlParser.element("br", {"data-cke-bogus": 1}) + } + + function n(a, d) { + return function (f) { + if (f.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) { + var l = [], v = b(f), n, C; + if (v) for (t(v, 1) && l.push(v); v;) h(v) && (n = c(v)) && t(n) && ((C = c(n)) && !h(C) ? l.push(n) : (e(z).insertAfter(n), n.remove())), v = v.previous; + for (v = 0; v < l.length; v++) l[v].remove(); + if (l = !a || !1 !== ("function" == typeof d ? d(f) : d)) z || CKEDITOR.env.needsBrFiller || + f.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT ? z || CKEDITOR.env.needsBrFiller || !(7 < document.documentMode || f.name in CKEDITOR.dtd.tr || f.name in CKEDITOR.dtd.$listItem) ? (l = b(f), l = !l || "form" == f.name && "input" == l.name) : l = !1 : l = !1; + l && f.add(e(a)) + } + } + } + + function t(a, b) { + if ((!z || CKEDITOR.env.needsBrFiller) && a.type == CKEDITOR.NODE_ELEMENT && "br" == a.name && !a.attributes["data-cke-eol"]) return !0; + var c; + return a.type == CKEDITOR.NODE_TEXT && (c = a.value.match(p)) && (c.index && ((new CKEDITOR.htmlParser.text(a.value.substring(0, c.index))).insertBefore(a), + a.value = c[0]), !CKEDITOR.env.needsBrFiller && z && (!b || a.parent.name in g) || !z && ((c = a.previous) && "br" == c.name || !c || h(c))) ? !0 : !1 + } + + var C = {elements: {}}, z = "html" == d, g = CKEDITOR.tools.extend({}, l), q; + for (q in g) "#" in u[q] || delete g[q]; + for (q in g) C.elements[q] = n(z, a.config.fillEmptyBlocks); + C.root = n(z, !1); + C.elements.br = function (a) { + return function (b) { + if (b.parent.type != CKEDITOR.NODE_DOCUMENT_FRAGMENT) { + var d = b.attributes; + if ("data-cke-bogus" in d || "data-cke-eol" in d) delete d["data-cke-bogus"]; else { + for (d = b.next; d && f(d);) d = + d.next; + var l = c(b); + !d && h(b.parent) ? k(b.parent, e(a)) : h(d) && l && !h(l) && e(a).insertBefore(d) + } + } + } + }(z); + return C + } + + function d(a, b) { + return a != CKEDITOR.ENTER_BR && !1 !== b ? a == CKEDITOR.ENTER_DIV ? "div" : "p" : !1 + } + + function b(a) { + for (a = a.children[a.children.length - 1]; a && f(a);) a = a.previous; + return a + } + + function c(a) { + for (a = a.previous; a && f(a);) a = a.previous; + return a + } + + function f(a) { + return a.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim(a.value) || a.type == CKEDITOR.NODE_ELEMENT && a.attributes["data-cke-bookmark"] + } + + function h(a) { + return a && + (a.type == CKEDITOR.NODE_ELEMENT && a.name in l || a.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT) + } + + function k(a, b) { + var c = a.children[a.children.length - 1]; + a.children.push(b); + b.parent = a; + c && (c.next = b, b.previous = c) + } + + function g(a) { + a = a.attributes; + "false" != a.contenteditable && (a["data-cke-editable"] = a.contenteditable ? "true" : 1); + a.contenteditable = "false" + } + + function m(a) { + a = a.attributes; + switch (a["data-cke-editable"]) { + case "true": + a.contenteditable = "true"; + break; + case "1": + delete a.contenteditable + } + } + + function r(a) { + return a.replace(M, + function (a, b, c) { + return "\x3c" + b + c.replace(t, function (a, b) { + return C.test(b) && -1 == c.indexOf("data-cke-saved-" + b) ? " data-cke-saved-" + a + " data-cke-" + CKEDITOR.rnd + "-" + a : a + }) + "\x3e" + }) + } + + function e(a, b) { + return a.replace(b, function (a, b, c) { + 0 === a.indexOf("\x3ctextarea") && (a = b + B(c).replace(//g, "\x26gt;") + "\x3c/textarea\x3e"); + return "\x3ccke:encoded\x3e" + encodeURIComponent(a) + "\x3c/cke:encoded\x3e" + }) + } + + function y(a) { + return a.replace(P, function (a, b) { + return decodeURIComponent(b) + }) + } + + function x(a) { + return a.replace(/\x3c!--(?!{cke_protected})[\s\S]+?--\x3e/g, + function (a) { + return "\x3c!--" + J + "{C}" + encodeURIComponent(a).replace(/--/g, "%2D%2D") + "--\x3e" + }) + } + + function B(a) { + return a.replace(/\x3c!--\{cke_protected\}\{C\}([\s\S]+?)--\x3e/g, function (a, b) { + return decodeURIComponent(b) + }) + } + + function D(a, b) { + var c = b._.dataStore; + return a.replace(/\x3c!--\{cke_protected\}([\s\S]+?)--\x3e/g, function (a, b) { + return decodeURIComponent(b) + }).replace(/\{cke_protected_(\d+)\}/g, function (a, b) { + return c && c[b] || "" + }) + } + + function w(a, b) { + var c = [], d = b.config.protectedSource, f = b._.dataStore || (b._.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}" + (c.push(a) - 1) + "--\x3e" + }); + for (var l = 0; l < d.length; l++) a = a.replace(d[l], function (a) { + a = a.replace(e, function (a, b, d) { + return c[d] + }); + return /cke_temp(comment)?/.test(a) ? a : "\x3c!--{cke_temp}" + (c.push(a) - 1) + "--\x3e" + }); + a = a.replace(e, function (a, b, d) { + return "\x3c!--" + J + (b ? "{C}" : + "") + encodeURIComponent(c[d]).replace(/--/g, "%2D%2D") + "--\x3e" + }); + a = a.replace(/<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=\/>]+))+\s*\/?>/g, function (a) { + return a.replace(/\x3c!--\{cke_protected\}([^>]*)--\x3e/g, function (a, b) { + f[f.id] = decodeURIComponent(b); + return "{cke_protected_" + f.id++ + "}" + }) + }); + return a = a.replace(/<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g, function (a, c, d, f) { + return "\x3c" + c + d + "\x3e" + D(B(f), b) + "\x3c/" + c + "\x3e" + }) + } + + CKEDITOR.htmlDataProcessor = function (b) { + var c, + f, l = this; + this.editor = b; + this.dataFilter = c = new CKEDITOR.htmlParser.filter; + this.htmlFilter = f = new CKEDITOR.htmlParser.filter; + this.writer = new CKEDITOR.htmlParser.basicWriter; + c.addRules(q); + c.addRules(F, {applyToAll: !0}); + c.addRules(a(b, "data"), {applyToAll: !0}); + f.addRules(L); + f.addRules(E, {applyToAll: !0}); + f.addRules(a(b, "html"), {applyToAll: !0}); + b.on("toHtml", function (a) { + a = a.data; + var c = a.dataValue, f, c = w(c, b), c = e(c, H), c = r(c), c = e(c, z), c = c.replace(O, "$1cke:$2"), + c = c.replace(N, "\x3ccke:$1$2\x3e\x3c/cke:$1\x3e"), + c = c.replace(/(]*>)(\r\n|\n)/g, "$1$2$2"), + c = c.replace(/([^a-z0-9<\-])(on\w{3,})(?!>)/gi, "$1data-cke-" + CKEDITOR.rnd + "-$2"); + f = a.context || b.editable().getName(); + var l; + CKEDITOR.env.ie && 9 > CKEDITOR.env.version && "pre" == f && (f = "div", c = "\x3cpre\x3e" + c + "\x3c/pre\x3e", l = 1); + f = b.document.createElement(f); + f.setHtml("a" + c); + c = f.getHtml().substr(1); + c = c.replace(new RegExp("data-cke-" + CKEDITOR.rnd + "-", "ig"), ""); + l && (c = c.replace(/^
|<\/pre>$/gi, ""));
+                c = c.replace(n, "$1$2");
+                c = y(c);
+                c = B(c);
+                f = !1 === a.fixForBody ? !1 :
+                    d(a.enterMode, b.config.autoParagraph);
+                c = CKEDITOR.htmlParser.fragment.fromHtml(c, a.context, f);
+                f && (l = c, !l.children.length && CKEDITOR.dtd[l.name][f] && (f = new CKEDITOR.htmlParser.element(f), l.add(f)));
+                a.dataValue = c
+            }, null, null, 5);
+            b.on("toHtml", function (a) {
+                a.data.filter.applyTo(a.data.dataValue, !0, a.data.dontFilter, a.data.enterMode) && b.fire("dataFiltered")
+            }, null, null, 6);
+            b.on("toHtml", function (a) {
+                a.data.dataValue.filterChildren(l.dataFilter, !0)
+            }, null, null, 10);
+            b.on("toHtml", function (a) {
+                a = a.data;
+                var b = a.dataValue,
+                    c = new CKEDITOR.htmlParser.basicWriter;
+                b.writeChildrenHtml(c);
+                b = c.getHtml(!0);
+                a.dataValue = x(b)
+            }, 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, d(a.data.enterMode, b.config.autoParagraph)) + }, null, null, 5); + b.on("toDataFormat", function (a) { + a.data.dataValue.filterChildren(l.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 = l.writer; + d.reset(); + c.writeChildrenHtml(d); + c = d.getHtml(!0); + c = B(c); + c = D(c, b); + a.data.dataValue = c + }, null, null, 15) + }; + CKEDITOR.htmlDataProcessor.prototype = { + toHtml: function (a, b, c, d) { + var f = this.editor, e, l, n, h; + b && "object" == typeof b ? (e = b.context, c = b.fixForBody, d = b.dontFilter, l = b.filter, n = b.enterMode, h = b.protectedWhitespaces) : e = b; + e || null === e || (e = f.editable().getName()); + return f.fire("toHtml", { + dataValue: a, context: e, fixForBody: c, dontFilter: d, + filter: l || f.filter, enterMode: n || f.enterMode, protectedWhitespaces: h + }).dataValue + }, toDataFormat: function (a, b) { + var c, d, f; + b && (c = b.context, d = b.filter, f = b.enterMode); + c || null === c || (c = this.editor.editable().getName()); + return this.editor.fire("toDataFormat", { + dataValue: a, + filter: d || this.editor.filter, + context: c, + enterMode: f || this.editor.enterMode + }).dataValue + } + }; + var p = /(?: |\xa0)$/, J = "{cke_protected}", u = CKEDITOR.dtd, + K = "caption colgroup col thead tfoot tbody".split(" "), l = CKEDITOR.tools.extend({}, u.$blockLimit, + u.$block), q = {elements: {input: g, textarea: g}}, F = { + attributeNames: [[/^on/, "data-cke-pa-on"], [/^srcdoc/, "data-cke-pa-srcdoc"], [/^data-cke-expando$/, ""]], + elements: { + iframe: function (a) { + if (a.attributes && a.attributes.src) { + var b = a.attributes.src.toLowerCase().replace(/[^a-z]/gi, ""); + if (0 === b.indexOf("javascript") || 0 === b.indexOf("data")) a.attributes["data-cke-pa-src"] = a.attributes.src, delete a.attributes.src + } + } + } + }, L = { + elements: { + embed: function (a) { + var b = a.parent; + if (b && "object" == b.name) { + var c = b.attributes.width, b = b.attributes.height; + c && (a.attributes.width = c); + b && (a.attributes.height = b) + } + }, a: function (a) { + var b = a.attributes; + if (!(a.children.length || b.name || b.id || a.attributes["data-cke-saved-name"])) return !1 + } + } + }, E = { + elementNames: [[/^cke:/, ""], [/^\?xml:namespace$/, ""]], + attributeNames: [[/^data-cke-(saved|pa)-/, ""], [/^data-cke-.*/, ""], ["hidefocus", ""]], + elements: { + $: function (a) { + var b = a.attributes; + if (b) { + if (b["data-cke-temp"]) return !1; + for (var c = ["name", "href", "src"], d, f = 0; f < c.length; f++) d = "data-cke-saved-" + c[f], d in b && delete b[c[f]] + } + return a + }, + table: function (a) { + a.children.slice(0).sort(function (a, b) { + var c, d; + a.type == CKEDITOR.NODE_ELEMENT && b.type == a.type && (c = CKEDITOR.tools.indexOf(K, a.name), d = CKEDITOR.tools.indexOf(K, b.name)); + -1 < c && -1 < d && c != d || (c = a.parent ? a.getIndex() : -1, d = b.parent ? b.getIndex() : -1); + return c > d ? 1 : -1 + }) + }, param: function (a) { + a.children = []; + a.isEmpty = !0; + return a + }, span: function (a) { + "Apple-style-span" == a.attributes["class"] && delete a.name + }, html: function (a) { + delete a.attributes.contenteditable; + delete a.attributes["class"] + }, body: function (a) { + delete a.attributes.spellcheck; + delete a.attributes.contenteditable + }, style: function (a) { + var b = a.children[0]; + b && b.value && (b.value = CKEDITOR.tools.trim(b.value)); + a.attributes.type || (a.attributes.type = "text/css") + }, title: function (a) { + var b = a.children[0]; + !b && k(a, b = new CKEDITOR.htmlParser.text); + b.value = a.attributes["data-cke-title"] || "" + }, input: m, textarea: m + }, + attributes: { + "class": function (a) { + return CKEDITOR.tools.ltrim(a.replace(/(?:^|\s+)cke_[^\s]*/g, "")) || !1 + } + } + }; + CKEDITOR.env.ie && (E.attributes.style = function (a) { + return a.replace(/(^|;)([^\:]+)/g, + function (a) { + return a.toLowerCase() + }) + }); + var M = /<(a|area|img|input|source)\b([^>]*)>/gi, + t = /([\w-:]+)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi, C = /^(href|src|name)$/i, + z = /(?:])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, + H = /(])[^>]*>)([\s\S]*?)(?:<\/textarea>)/gi, P = /([^<]*)<\/cke:encoded>/gi, + O = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi, + n = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi, N = /]*?)\/?>(?!\s*<\/cke:\1)/gi + })(); + "use strict"; + CKEDITOR.htmlParser.element = function (a, d) { + this.name = a; + this.attributes = d || {}; + this.children = []; + var b = a || "", c = b.match(/^cke:(.*)/); + c && (b = c[1]); + b = !!(CKEDITOR.dtd.$nonBodyContent[b] || CKEDITOR.dtd.$block[b] || CKEDITOR.dtd.$listItem[b] || CKEDITOR.dtd.$tableContent[b] || CKEDITOR.dtd.$nonEditable[b] || "br" == b); + this.isEmpty = !!CKEDITOR.dtd.$empty[a]; + this.isUnknown = !CKEDITOR.dtd[a]; + this._ = {isBlockLike: b, hasInlineStarted: this.isEmpty || !b} + }; + CKEDITOR.htmlParser.cssStyle = function (a) { + var d = {}; + ((a instanceof CKEDITOR.htmlParser.element ? a.attributes.style : a) || "").replace(/"/g, '"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function (a, c, f) { + "font-family" == c && (f = f.replace(/["']/g, "")); + d[c.toLowerCase()] = f + }); + return { + rules: d, populate: function (a) { + var c = this.toString(); + c && (a instanceof CKEDITOR.dom.element ? a.setAttribute("style", c) : a instanceof CKEDITOR.htmlParser.element ? a.attributes.style = c : a.style = c) + }, toString: function () { + var a = [], c; + for (c in d) d[c] && a.push(c, ":", d[c], ";"); + return a.join("") + } + } + }; + (function () { + function a(a) { + return function (b) { + return b.type == CKEDITOR.NODE_ELEMENT && ("string" == typeof a ? b.name == a : b.name in a) + } + } + + var d = function (a, b) { + a = a[0]; + b = b[0]; + return a < b ? -1 : a > b ? 1 : 0 + }, b = CKEDITOR.htmlParser.fragment.prototype; + CKEDITOR.htmlParser.element.prototype = CKEDITOR.tools.extend(new CKEDITOR.htmlParser.node, { + type: CKEDITOR.NODE_ELEMENT, add: b.add, clone: function () { + return new CKEDITOR.htmlParser.element(this.name, this.attributes) + }, filter: function (a, b) { + var d = this, k, g; + b = d.getFilterContext(b); + if (b.off) return !0; + if (!d.parent) a.onRoot(b, d); + for (; ;) { + k = d.name; + if (!(g = a.onElementName(b, k))) return this.remove(), !1; + d.name = g; + if (!(d = a.onElement(b, d))) return this.remove(), !1; + if (d !== this) return this.replaceWith(d), !1; + if (d.name == k) break; + if (d.type != CKEDITOR.NODE_ELEMENT) return this.replaceWith(d), !1; + if (!d.name) return this.replaceWithChildren(), !1 + } + k = d.attributes; + var m, r; + for (m in k) { + for (g = k[m]; ;) if (r = a.onAttributeName(b, m)) if (r != m) delete k[m], m = r; else break; else { + delete k[m]; + break + } + r && (!1 === (g = a.onAttribute(b, d, r, g)) ? delete k[r] : + k[r] = g) + } + d.isEmpty || this.filterChildren(a, !1, b); + return !0 + }, filterChildren: b.filterChildren, writeHtml: function (a, b) { + b && this.filter(b); + var h = this.name, k = [], g = this.attributes, m, r; + a.openTag(h, g); + for (m in g) k.push([m, g[m]]); + a.sortAttributes && k.sort(d); + m = 0; + for (r = k.length; m < r; m++) g = k[m], a.attribute(g[0], g[1]); + a.openTagClose(h, this.isEmpty); + this.writeChildrenHtml(a); + this.isEmpty || a.closeTag(h) + }, writeChildrenHtml: b.writeChildrenHtml, replaceWithChildren: function () { + for (var a = this.children, b = a.length; b;) a[--b].insertAfter(this); + this.remove() + }, forEach: b.forEach, getFirst: function (b) { + if (!b) return this.children.length ? this.children[0] : null; + "function" != typeof b && (b = a(b)); + for (var d = 0, h = this.children.length; d < h; ++d) if (b(this.children[d])) return this.children[d]; + return null + }, getHtml: function () { + var a = new CKEDITOR.htmlParser.basicWriter; + this.writeChildrenHtml(a); + return a.getHtml() + }, setHtml: function (a) { + a = this.children = CKEDITOR.htmlParser.fragment.fromHtml(a).children; + for (var b = 0, d = a.length; b < d; ++b) a[b].parent = this + }, getOuterHtml: function () { + var a = + new CKEDITOR.htmlParser.basicWriter; + this.writeHtml(a); + return a.getHtml() + }, split: function (a) { + for (var b = this.children.splice(a, this.children.length - a), d = this.clone(), k = 0; k < b.length; ++k) b[k].parent = d; + d.children = b; + b[0] && (b[0].previous = null); + 0 < a && (this.children[a - 1].next = null); + this.parent.add(d, this.getIndex() + 1); + return d + }, find: function (a, b) { + void 0 === b && (b = !1); + var d = [], k; + for (k = 0; k < this.children.length; k++) { + var g = this.children[k]; + "function" == typeof a && a(g) ? d.push(g) : "string" == typeof a && g.name === a && d.push(g); + b && g.find && (d = d.concat(g.find(a, b))) + } + return d + }, addClass: function (a) { + if (!this.hasClass(a)) { + var b = this.attributes["class"] || ""; + this.attributes["class"] = b + (b ? " " : "") + a + } + }, removeClass: function (a) { + var b = this.attributes["class"]; + b && ((b = CKEDITOR.tools.trim(b.replace(new RegExp("(?:\\s+|^)" + a + "(?:\\s+|$)"), " "))) ? this.attributes["class"] = b : delete this.attributes["class"]) + }, hasClass: function (a) { + var b = this.attributes["class"]; + return b ? (new RegExp("(?:^|\\s)" + a + "(?\x3d\\s|$)")).test(b) : !1 + }, getFilterContext: function (a) { + var b = + []; + a || (a = {off: !1, nonEditable: !1, nestedEditable: !1}); + a.off || "off" != this.attributes["data-cke-processor"] || b.push("off", !0); + a.nonEditable || "false" != this.attributes.contenteditable ? a.nonEditable && !a.nestedEditable && "true" == this.attributes.contenteditable && b.push("nestedEditable", !0) : b.push("nonEditable", !0); + if (b.length) { + a = CKEDITOR.tools.copy(a); + for (var d = 0; d < b.length; d += 2) a[b[d]] = b[d + 1] + } + return a + } + }, !0) + })(); + (function () { + var a = /{([^}]+)}/g; + CKEDITOR.template = function (a) { + this.source = String(a) + }; + CKEDITOR.template.prototype.output = function (d, b) { + var c = this.source.replace(a, function (a, b) { + return void 0 !== d[b] ? d[b] : a + }); + return b ? b.push(c) : c + } + })(); + delete CKEDITOR.loadFullCore; + CKEDITOR.instances = {}; + CKEDITOR.document = new CKEDITOR.dom.document(document); + CKEDITOR.add = function (a) { + CKEDITOR.instances[a.name] = a; + a.on("focus", function () { + CKEDITOR.currentInstance != a && (CKEDITOR.currentInstance = a, CKEDITOR.fire("currentInstance")) + }); + a.on("blur", function () { + CKEDITOR.currentInstance == a && (CKEDITOR.currentInstance = null, CKEDITOR.fire("currentInstance")) + }); + CKEDITOR.fire("instance", null, a) + }; + CKEDITOR.remove = function (a) { + delete CKEDITOR.instances[a.name] + }; + (function () { + var a = {}; + CKEDITOR.addTemplate = function (d, b) { + var c = a[d]; + if (c) return c; + c = {name: d, source: b}; + CKEDITOR.fire("template", c); + return a[d] = new CKEDITOR.template(c.source) + }; + CKEDITOR.getTemplate = function (d) { + return a[d] + } + })(); + (function () { + var a = []; + CKEDITOR.addCss = function (d) { + a.push(d) + }; + CKEDITOR.getCss = function () { + return a.join("\n") + } + })(); + CKEDITOR.on("instanceDestroyed", function () { + CKEDITOR.tools.isEmpty(this.instances) && CKEDITOR.fire("reset") + }); + CKEDITOR.TRISTATE_ON = 1; + CKEDITOR.TRISTATE_OFF = 2; + CKEDITOR.TRISTATE_DISABLED = 0; + (function () { + CKEDITOR.inline = function (a, d) { + if (!CKEDITOR.env.isCompatible) return null; + a = CKEDITOR.dom.element.get(a); + if (a.getEditor()) throw'The editor instance "' + a.getEditor().name + '" is already attached to the provided element.'; + var b = new CKEDITOR.editor(d, a, CKEDITOR.ELEMENT_MODE_INLINE), c = a.is("textarea") ? a : null; + c ? (b.setData(c.getValue(), null, !0), a = CKEDITOR.dom.element.createFromHtml('\x3cdiv contenteditable\x3d"' + !!b.readOnly + '" class\x3d"cke_textarea_inline"\x3e' + c.getValue() + "\x3c/div\x3e", CKEDITOR.document), + a.insertAfter(c), c.hide(), c.$.form && b._attachToForm()) : b.setData(a.getHtml(), null, !0); + b.on("loaded", function () { + b.fire("uiReady"); + b.editable(a); + b.container = a; + b.ui.contentsElement = a; + b.setData(b.getData(1)); + b.resetDirty(); + b.fire("contentDom"); + b.mode = "wysiwyg"; + b.fire("mode"); + b.status = "ready"; + b.fireOnce("instanceReady"); + CKEDITOR.fire("instanceReady", null, b) + }, null, null, 1E4); + b.on("destroy", function () { + c && (b.container.clearCustomData(), b.container.remove(), c.show()); + b.element.clearCustomData(); + delete b.element + }); + return b + }; + CKEDITOR.inlineAll = function () { + var a, d, b; + for (b in CKEDITOR.dtd.$editable) for (var c = CKEDITOR.document.getElementsByTag(b), f = 0, h = c.count(); f < h; f++) a = c.getItem(f), "true" == a.getAttribute("contenteditable") && (d = { + element: a, + config: {} + }, !1 !== CKEDITOR.fire("inline", d) && CKEDITOR.inline(a, d.config)) + }; + CKEDITOR.domReady(function () { + !CKEDITOR.disableAutoInline && CKEDITOR.inlineAll() + }) + })(); + CKEDITOR.replaceClass = "ckeditor"; + (function () { + function a(a, f, h, k) { + if (!CKEDITOR.env.isCompatible) return null; + a = CKEDITOR.dom.element.get(a); + if (a.getEditor()) throw'The editor instance "' + a.getEditor().name + '" is already attached to the provided element.'; + var g = new CKEDITOR.editor(f, a, k); + k == CKEDITOR.ELEMENT_MODE_REPLACE && (a.setStyle("visibility", "hidden"), g._.required = a.hasAttribute("required"), a.removeAttribute("required")); + h && g.setData(h, null, !0); + g.on("loaded", function () { + b(g); + k == CKEDITOR.ELEMENT_MODE_REPLACE && g.config.autoUpdateElement && + a.$.form && g._attachToForm(); + g.setMode(g.config.startupMode, function () { + g.resetDirty(); + g.status = "ready"; + g.fireOnce("instanceReady"); + CKEDITOR.fire("instanceReady", null, g) + }) + }); + g.on("destroy", d); + return g + } + + function d() { + var a = this.container, b = this.element; + a && (a.clearCustomData(), a.remove()); + b && (b.clearCustomData(), this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && (b.show(), this._.required && b.setAttribute("required", "required")), delete this.element) + } + + function b(a) { + var b = a.name, d = a.element, k = a.elementMode, g = + a.fire("uiSpace", {space: "top", html: ""}).html, + m = a.fire("uiSpace", {space: "bottom", html: ""}).html, + r = new CKEDITOR.template('\x3c{outerEl} id\x3d"cke_{name}" class\x3d"{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} ' + CKEDITOR.env.cssClass + '" dir\x3d"{langDir}" lang\x3d"{langCode}" role\x3d"application"' + (a.title ? ' aria-labelledby\x3d"cke_{name}_arialbl"' : "") + "\x3e" + (a.title ? '\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e' : "") + '\x3c{outerEl} class\x3d"cke_inner cke_reset" role\x3d"presentation"\x3e{topHtml}\x3c{outerEl} id\x3d"{contentId}" class\x3d"cke_contents cke_reset" role\x3d"presentation"\x3e\x3c/{outerEl}\x3e{bottomHtml}\x3c/{outerEl}\x3e\x3c/{outerEl}\x3e'), + b = CKEDITOR.dom.element.createFromHtml(r.output({ + id: a.id, + name: b, + langDir: a.lang.dir, + langCode: a.langCode, + voiceLabel: a.title, + topHtml: g ? '\x3cspan id\x3d"' + a.ui.spaceId("top") + '" class\x3d"cke_top cke_reset_all" role\x3d"presentation" style\x3d"height:auto"\x3e' + g + "\x3c/span\x3e" : "", + contentId: a.ui.spaceId("contents"), + bottomHtml: m ? '\x3cspan id\x3d"' + a.ui.spaceId("bottom") + '" class\x3d"cke_bottom cke_reset_all" role\x3d"presentation"\x3e' + m + "\x3c/span\x3e" : "", + outerEl: CKEDITOR.env.ie ? "span" : "div" + })); + k == CKEDITOR.ELEMENT_MODE_REPLACE ? + (d.hide(), b.insertAfter(d)) : d.append(b); + a.container = b; + a.ui.contentsElement = a.ui.space("contents"); + g && a.ui.space("top").unselectable(); + m && a.ui.space("bottom").unselectable(); + d = a.config.width; + k = a.config.height; + d && b.setStyle("width", CKEDITOR.tools.cssLength(d)); + k && a.ui.space("contents").setStyle("height", CKEDITOR.tools.cssLength(k)); + b.disableContextMenu(); + CKEDITOR.env.webkit && b.on("focus", function () { + a.focus() + }); + a.fireOnce("uiReady") + } + + CKEDITOR.replace = function (b, d) { + return a(b, d, null, CKEDITOR.ELEMENT_MODE_REPLACE) + }; + CKEDITOR.appendTo = function (b, d, h) { + return a(b, d, h, CKEDITOR.ELEMENT_MODE_APPENDTO) + }; + CKEDITOR.replaceAll = function () { + for (var a = document.getElementsByTagName("textarea"), b = 0; b < a.length; b++) { + var d = null, k = a[b]; + if (k.name || k.id) { + if ("string" == typeof arguments[0]) { + if (!(new RegExp("(?:^|\\s)" + arguments[0] + "(?:$|\\s)")).test(k.className)) continue + } else if ("function" == typeof arguments[0] && (d = {}, !1 === arguments[0](k, d))) continue; + this.replace(k, d) + } + } + }; + CKEDITOR.editor.prototype.addMode = function (a, b) { + (this._.modes || (this._.modes = + {}))[a] = b + }; + CKEDITOR.editor.prototype.setMode = function (a, b) { + var d = this, k = this._.modes; + if (a != d.mode && k && k[a]) { + d.fire("beforeSetMode", a); + if (d.mode) { + var g = d.checkDirty(), k = d._.previousModeData, m, r = 0; + d.fire("beforeModeUnload"); + d.editable(0); + d._.previousMode = d.mode; + d._.previousModeData = m = d.getData(1); + "source" == d.mode && k == m && (d.fire("lockSnapshot", {forceUpdate: !0}), r = 1); + d.ui.space("contents").setHtml(""); + d.mode = "" + } else d._.previousModeData = d.getData(1); + this._.modes[a](function () { + d.mode = a; + void 0 !== g && !g && + d.resetDirty(); + r ? d.fire("unlockSnapshot") : "wysiwyg" == a && d.fire("saveSnapshot"); + setTimeout(function () { + d.fire("mode"); + b && b.call(d) + }, 0) + }) + } + }; + CKEDITOR.editor.prototype.resize = function (a, b, d, k) { + var g = this.container, m = this.ui.space("contents"), + r = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement; + k = k ? this.container.getFirst(function (a) { + return a.type == CKEDITOR.NODE_ELEMENT && a.hasClass("cke_inner") + }) : g; + k.setSize("width", a, !0); + r && (r.style.width = "1%"); + var e = (k.$.offsetHeight || 0) - (m.$.clientHeight || + 0), g = Math.max(b - (d ? 0 : e), 0); + b = d ? b + e : b; + m.setStyle("height", g + "px"); + r && (r.style.width = "100%"); + this.fire("resize", {outerHeight: b, contentsHeight: g, outerWidth: a || k.getSize("width")}) + }; + CKEDITOR.editor.prototype.getResizable = function (a) { + return a ? this.ui.space("contents") : this.container + }; + CKEDITOR.domReady(function () { + CKEDITOR.replaceClass && CKEDITOR.replaceAll(CKEDITOR.replaceClass) + }) + })(); + CKEDITOR.config.startupMode = "wysiwyg"; + (function () { + function a(a) { + var b = a.editor, e = a.data.path, f = e.blockLimit, h = a.data.selection, g = h.getRanges()[0], t; + if (CKEDITOR.env.gecko || CKEDITOR.env.ie && CKEDITOR.env.needsBrFiller) if (h = d(h, e)) h.appendBogus(), t = CKEDITOR.env.ie; + k(b, e.block, f) && g.collapsed && !g.getCommonAncestor().isReadOnly() && (e = g.clone(), e.enlarge(CKEDITOR.ENLARGE_BLOCK_CONTENTS), f = new CKEDITOR.dom.walker(e), f.guard = function (a) { + return !c(a) || a.type == CKEDITOR.NODE_COMMENT || a.isReadOnly() + }, !f.checkForward() || e.checkStartOfBlock() && e.checkEndOfBlock()) && + (b = g.fixBlock(!0, b.activeEnterMode == CKEDITOR.ENTER_DIV ? "div" : "p"), CKEDITOR.env.needsBrFiller || (b = b.getFirst(c)) && b.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim(b.getText()).match(/^(?: |\xa0)$/) && b.remove(), t = 1, a.cancel()); + t && g.select() + } + + function d(a, b) { + if (a.isFake) return 0; + var d = b.block || b.blockLimit, e = d && d.getLast(c); + if (!(!d || !d.isBlockBoundary() || e && e.type == CKEDITOR.NODE_ELEMENT && e.isBlockBoundary() || d.is("pre") || d.getBogus())) return d + } + + function b(a) { + var b = a.data.getTarget(); + b.is("input") && + (b = b.getAttribute("type"), "submit" != b && "reset" != b || a.data.preventDefault()) + } + + function c(a) { + return e(a) && y(a) + } + + function f(a, b) { + return function (c) { + var d = c.data.$.toElement || c.data.$.fromElement || c.data.$.relatedTarget; + (d = d && d.nodeType == CKEDITOR.NODE_ELEMENT ? new CKEDITOR.dom.element(d) : null) && (b.equals(d) || b.contains(d)) || a.call(this, c) + } + } + + function h(a) { + function b(a) { + return function (b, e) { + e && b.type == CKEDITOR.NODE_ELEMENT && b.is(f) && (d = b); + if (!(e || !c(b) || a && B(b))) return !1 + } + } + + var d, e = a.getRanges()[0]; + a = a.root; + var f = {table: 1, ul: 1, ol: 1, dl: 1}; + if (e.startPath().contains(f)) { + var h = e.clone(); + h.collapse(1); + h.setStartAt(a, CKEDITOR.POSITION_AFTER_START); + a = new CKEDITOR.dom.walker(h); + a.guard = b(); + a.checkBackward(); + if (d) return h = e.clone(), h.collapse(), h.setEndAt(d, CKEDITOR.POSITION_AFTER_END), a = new CKEDITOR.dom.walker(h), a.guard = b(!0), d = !1, a.checkForward(), d + } + return null + } + + function k(a, b, c) { + return !1 !== a.config.autoParagraph && a.activeEnterMode != CKEDITOR.ENTER_BR && (a.editable().equals(c) && !b || b && "true" == b.getAttribute("contenteditable")) + } + + function g(a) { + return a.activeEnterMode != CKEDITOR.ENTER_BR && !1 !== a.config.autoParagraph ? a.activeEnterMode == CKEDITOR.ENTER_DIV ? "div" : "p" : !1 + } + + function m(a) { + var b = a.editor; + b.getSelection().scrollIntoView(); + setTimeout(function () { + b.fire("saveSnapshot") + }, 0) + } + + function r(a, b, c) { + var d = a.getCommonAncestor(b); + for (b = a = c ? b : a; (a = a.getParent()) && !d.equals(a) && 1 == a.getChildCount();) b = a; + b.remove() + } + + var e, y, x, B, D, w, p, J, u, K; + CKEDITOR.editable = CKEDITOR.tools.createClass({ + base: CKEDITOR.dom.element, $: function (a, b) { + this.base(b.$ || + b); + this.editor = a; + this.status = "unloaded"; + this.hasFocus = !1; + this.setup() + }, proto: { + focus: function () { + var a; + if (CKEDITOR.env.webkit && !this.hasFocus && (a = this.editor._.previousActive || this.getDocument().getActive(), this.contains(a))) { + a.focus(); + return + } + CKEDITOR.env.edge && 14 < CKEDITOR.env.version && !this.hasFocus && this.getDocument().equals(CKEDITOR.document) && (this.editor._.previousScrollTop = this.$.scrollTop); + try { + if (!CKEDITOR.env.ie || CKEDITOR.env.edge && 14 < CKEDITOR.env.version || !this.getDocument().equals(CKEDITOR.document)) if (CKEDITOR.env.chrome) { + var b = + this.$.scrollTop; + this.$.focus(); + this.$.scrollTop = b + } else this.$.focus(); else this.$.setActive() + } catch (c) { + if (!CKEDITOR.env.ie) throw c; + } + CKEDITOR.env.safari && !this.isInline() && (a = CKEDITOR.document.getActive(), a.equals(this.getWindow().getFrame()) || this.getWindow().focus()) + }, on: function (a, b) { + var c = Array.prototype.slice.call(arguments, 0); + CKEDITOR.env.ie && /^focus|blur$/.exec(a) && (a = "focus" == a ? "focusin" : "focusout", b = f(b, this), c[0] = a, c[1] = b); + return CKEDITOR.dom.element.prototype.on.apply(this, c) + }, attachListener: function (a) { + !this._.listeners && + (this._.listeners = []); + var b = Array.prototype.slice.call(arguments, 1), b = a.on.apply(a, b); + this._.listeners.push(b); + return b + }, clearListeners: function () { + var a = this._.listeners; + try { + for (; a.length;) a.pop().removeListener() + } catch (b) { + } + }, restoreAttrs: function () { + var a = this._.attrChanges, b, c; + for (c in a) a.hasOwnProperty(c) && (b = a[c], null !== b ? this.setAttribute(c, b) : this.removeAttribute(c)) + }, attachClass: function (a) { + var b = this.getCustomData("classes"); + this.hasClass(a) || (!b && (b = []), b.push(a), this.setCustomData("classes", + b), this.addClass(a)) + }, changeAttr: function (a, b) { + var c = this.getAttribute(a); + b !== c && (!this._.attrChanges && (this._.attrChanges = {}), a in this._.attrChanges || (this._.attrChanges[a] = c), this.setAttribute(a, b)) + }, insertText: function (a) { + this.editor.focus(); + this.insertHtml(this.transformPlainTextToHtml(a), "text") + }, transformPlainTextToHtml: function (a) { + var b = this.editor.getSelection().getStartElement().hasAscendant("pre", !0) ? CKEDITOR.ENTER_BR : this.editor.activeEnterMode; + return CKEDITOR.tools.transformPlainTextToHtml(a, + b) + }, insertHtml: function (a, b, c) { + var d = this.editor; + d.focus(); + d.fire("saveSnapshot"); + c || (c = d.getSelection().getRanges()[0]); + w(this, b || "html", a, c); + c.select(); + m(this); + this.editor.fire("afterInsertHtml", {}) + }, insertHtmlIntoRange: function (a, b, c) { + w(this, c || "html", a, b); + this.editor.fire("afterInsertHtml", {intoRange: b}) + }, insertElement: function (a, b) { + var d = this.editor; + d.focus(); + d.fire("saveSnapshot"); + var e = d.activeEnterMode, d = d.getSelection(), f = a.getName(), f = CKEDITOR.dtd.$block[f]; + b || (b = d.getRanges()[0]); + this.insertElementIntoRange(a, + b) && (b.moveToPosition(a, CKEDITOR.POSITION_AFTER_END), f && ((f = a.getNext(function (a) { + return c(a) && !B(a) + })) && f.type == CKEDITOR.NODE_ELEMENT && f.is(CKEDITOR.dtd.$block) ? f.getDtd()["#"] ? b.moveToElementEditStart(f) : b.moveToElementEditEnd(a) : f || e == CKEDITOR.ENTER_BR || (f = b.fixBlock(!0, e == CKEDITOR.ENTER_DIV ? "div" : "p"), b.moveToElementEditStart(f)))); + d.selectRanges([b]); + m(this) + }, insertElementIntoSelection: function (a) { + this.insertElement(a) + }, insertElementIntoRange: function (a, b) { + var c = this.editor, d = c.config.enterMode, + e = a.getName(), f = CKEDITOR.dtd.$block[e]; + if (b.checkReadOnly()) return !1; + b.deleteContents(1); + b.startContainer.type == CKEDITOR.NODE_ELEMENT && (b.startContainer.is({ + tr: 1, + table: 1, + tbody: 1, + thead: 1, + tfoot: 1 + }) ? p(b) : b.startContainer.is(CKEDITOR.dtd.$list) && J(b)); + var t, C; + if (f) for (; (t = b.getCommonAncestor(0, 1)) && (C = CKEDITOR.dtd[t.getName()]) && (!C || !C[e]);) t.getName() in CKEDITOR.dtd.span ? b.splitElement(t) : b.checkStartOfBlock() && b.checkEndOfBlock() ? (b.setStartBefore(t), b.collapse(!0), t.remove()) : b.splitBlock(d == CKEDITOR.ENTER_DIV ? + "div" : "p", c.editable()); + b.insertNode(a); + return !0 + }, setData: function (a, b) { + b || (a = this.editor.dataProcessor.toHtml(a)); + this.setHtml(a); + this.fixInitialSelection(); + "unloaded" == this.status && (this.status = "ready"); + this.editor.fire("dataReady") + }, getData: function (a) { + var b = this.getHtml(); + a || (b = this.editor.dataProcessor.toDataFormat(b)); + return b + }, setReadOnly: function (a) { + this.setAttribute("contenteditable", !a) + }, detach: function () { + this.removeClass("cke_editable"); + this.status = "detached"; + var a = this.editor; + this._.detach(); + delete a.document; + delete a.window + }, isInline: function () { + return this.getDocument().equals(CKEDITOR.document) + }, fixInitialSelection: function () { + function a() { + var b = c.getDocument().$, d = b.getSelection(), e; + a:if (d.anchorNode && d.anchorNode == c.$) e = !0; else { + if (CKEDITOR.env.webkit && (e = c.getDocument().getActive()) && e.equals(c) && !d.anchorNode) { + e = !0; + break a + } + e = void 0 + } + e && (e = new CKEDITOR.dom.range(c), e.moveToElementEditStart(c), b = b.createRange(), b.setStart(e.startContainer.$, e.startOffset), b.collapse(!0), d.removeAllRanges(), + d.addRange(b)) + } + + function b() { + var a = c.getDocument().$, d = a.selection, e = c.getDocument().getActive(); + "None" == d.type && e.equals(c) && (d = new CKEDITOR.dom.range(c), a = a.body.createTextRange(), d.moveToElementEditStart(c), d = d.startContainer, d.type != CKEDITOR.NODE_ELEMENT && (d = d.getParent()), a.moveToElementText(d.$), a.collapse(!0), a.select()) + } + + var c = this; + if (CKEDITOR.env.ie && (9 > CKEDITOR.env.version || CKEDITOR.env.quirks)) this.hasFocus && (this.focus(), b()); else if (this.hasFocus) this.focus(), a(); else this.once("focus", + function () { + a() + }, null, null, -999) + }, getHtmlFromRange: function (a) { + if (a.collapsed) return new CKEDITOR.dom.documentFragment(a.document); + a = {doc: this.getDocument(), range: a.clone()}; + u.eol.detect(a, this); + u.bogus.exclude(a); + u.cell.shrink(a); + a.fragment = a.range.cloneContents(); + u.tree.rebuild(a, this); + u.eol.fix(a, this); + return new CKEDITOR.dom.documentFragment(a.fragment.$) + }, extractHtmlFromRange: function (a, b) { + var c = K, d = {range: a, doc: a.document}, e = this.getHtmlFromRange(a); + if (a.collapsed) return a.optimize(), e; + a.enlarge(CKEDITOR.ENLARGE_INLINE, + 1); + c.table.detectPurge(d); + d.bookmark = a.createBookmark(); + delete d.range; + var f = this.editor.createRange(); + f.moveToPosition(d.bookmark.startNode, CKEDITOR.POSITION_BEFORE_START); + d.targetBookmark = f.createBookmark(); + c.list.detectMerge(d, this); + c.table.detectRanges(d, this); + c.block.detectMerge(d, this); + d.tableContentsRanges ? (c.table.deleteRanges(d), a.moveToBookmark(d.bookmark), d.range = a) : (a.moveToBookmark(d.bookmark), d.range = a, a.extractContents(c.detectExtractMerge(d))); + a.moveToBookmark(d.targetBookmark); + a.optimize(); + c.fixUneditableRangePosition(a); + c.list.merge(d, this); + c.table.purge(d, this); + c.block.merge(d, this); + if (b) { + c = a.startPath(); + if (d = a.checkStartOfBlock() && a.checkEndOfBlock() && c.block && !a.root.equals(c.block)) { + a:{ + var d = c.block.getElementsByTag("span"), f = 0, t; + if (d) for (; t = d.getItem(f++);) if (!y(t)) { + d = !0; + break a + } + d = !1 + } + d = !d + } + d && (a.moveToPosition(c.block, CKEDITOR.POSITION_BEFORE_START), c.block.remove()) + } else c.autoParagraph(this.editor, a), x(a.startContainer) && a.startContainer.appendBogus(); + a.startContainer.mergeSiblings(); + return e + }, setup: function () { + var a = this.editor; + this.attachListener(a, "beforeGetData", function () { + var b = this.getData(); + this.is("textarea") || !1 !== a.config.ignoreEmptyParagraph && (b = b.replace(D, function (a, b) { + return b + })); + a.setData(b, null, 1) + }, this); + this.attachListener(a, "getSnapshot", function (a) { + a.data = this.getData(1) + }, this); + this.attachListener(a, "afterSetData", function () { + this.setData(a.getData(1)) + }, this); + this.attachListener(a, "loadSnapshot", function (a) { + this.setData(a.data, 1) + }, this); + this.attachListener(a, + "beforeFocus", function () { + var b = a.getSelection(); + (b = b && b.getNative()) && "Control" == b.type || this.focus() + }, this); + this.attachListener(a, "insertHtml", function (a) { + this.insertHtml(a.data.dataValue, a.data.mode, a.data.range) + }, this); + this.attachListener(a, "insertElement", function (a) { + this.insertElement(a.data) + }, this); + this.attachListener(a, "insertText", function (a) { + this.insertText(a.data) + }, this); + this.setReadOnly(a.readOnly); + this.attachClass("cke_editable"); + a.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? this.attachClass("cke_editable_inline") : + a.elementMode != CKEDITOR.ELEMENT_MODE_REPLACE && a.elementMode != CKEDITOR.ELEMENT_MODE_APPENDTO || this.attachClass("cke_editable_themed"); + this.attachClass("cke_contents_" + a.config.contentsLangDirection); + a.keystrokeHandler.blockedKeystrokes[8] = +a.readOnly; + a.keystrokeHandler.attach(this); + this.on("blur", function () { + this.hasFocus = !1 + }, null, null, -1); + this.on("focus", function () { + this.hasFocus = !0 + }, null, null, -1); + if (CKEDITOR.env.webkit) this.on("scroll", function () { + a._.previousScrollTop = a.editable().$.scrollTop + }, null, + null, -1); + if (CKEDITOR.env.edge && 14 < CKEDITOR.env.version) { + var d = function () { + var b = a.editable(); + null != a._.previousScrollTop && b.getDocument().equals(CKEDITOR.document) && (b.$.scrollTop = a._.previousScrollTop, a._.previousScrollTop = null, this.removeListener("scroll", d)) + }; + this.on("scroll", d) + } + a.focusManager.add(this); + this.equals(CKEDITOR.document.getActive()) && (this.hasFocus = !0, a.once("contentDom", function () { + a.focusManager.focus(this) + }, this)); + this.isInline() && this.changeAttr("tabindex", a.tabIndex); + if (!this.is("textarea")) { + a.document = + this.getDocument(); + a.window = this.getWindow(); + var f = a.document; + this.changeAttr("spellcheck", !a.config.disableNativeSpellChecker); + var g = a.config.contentsLangDirection; + this.getDirection(1) != g && this.changeAttr("dir", g); + var k = CKEDITOR.getCss(); + if (k) { + var g = f.getHead(), p = g.getCustomData("stylesheet"); + p ? k != p.getText() && (CKEDITOR.env.ie && 9 > CKEDITOR.env.version ? p.$.styleSheet.cssText = k : p.setText(k)) : (k = f.appendStyleText(k), k = new CKEDITOR.dom.element(k.ownerNode || k.owningElement), g.setCustomData("stylesheet", + k), k.data("cke-temp", 1)) + } + g = f.getCustomData("stylesheet_ref") || 0; + f.setCustomData("stylesheet_ref", g + 1); + this.setCustomData("cke_includeReadonly", !a.config.disableReadonlyStyling); + this.attachListener(this, "click", function (a) { + a = a.data; + var b = (new CKEDITOR.dom.elementPath(a.getTarget(), this)).contains("a"); + b && 2 != a.$.button && b.isReadOnly() && a.preventDefault() + }); + var t = {8: 1, 46: 1}; + this.attachListener(a, "key", function (b) { + if (a.readOnly) return !0; + var c = b.data.domEvent.getKey(), d; + b = a.getSelection(); + if (0 !== b.getRanges().length) { + if (c in + t) { + var f, g = b.getRanges()[0], n = g.startPath(), k, v, A, c = 8 == c; + CKEDITOR.env.ie && 11 > CKEDITOR.env.version && (f = b.getSelectedElement()) || (f = h(b)) ? (a.fire("saveSnapshot"), g.moveToPosition(f, CKEDITOR.POSITION_BEFORE_START), f.remove(), g.select(), a.fire("saveSnapshot"), d = 1) : g.collapsed && ((k = n.block) && (A = k[c ? "getPrevious" : "getNext"](e)) && A.type == CKEDITOR.NODE_ELEMENT && A.is("table") && g[c ? "checkStartOfBlock" : "checkEndOfBlock"]() ? (a.fire("saveSnapshot"), g[c ? "checkEndOfBlock" : "checkStartOfBlock"]() && k.remove(), g["moveToElementEdit" + + (c ? "End" : "Start")](A), g.select(), a.fire("saveSnapshot"), d = 1) : n.blockLimit && n.blockLimit.is("td") && (v = n.blockLimit.getAscendant("table")) && g.checkBoundaryOfElement(v, c ? CKEDITOR.START : CKEDITOR.END) && (A = v[c ? "getPrevious" : "getNext"](e)) ? (a.fire("saveSnapshot"), g["moveToElementEdit" + (c ? "End" : "Start")](A), g.checkStartOfBlock() && g.checkEndOfBlock() ? A.remove() : g.select(), a.fire("saveSnapshot"), d = 1) : (v = n.contains(["td", "th", "caption"])) && g.checkBoundaryOfElement(v, c ? CKEDITOR.START : CKEDITOR.END) && (d = 1)) + } + return !d + } + }); + a.blockless && CKEDITOR.env.ie && CKEDITOR.env.needsBrFiller && this.attachListener(this, "keyup", function (b) { + b.data.getKeystroke() in t && !this.getFirst(c) && (this.appendBogus(), b = a.createRange(), b.moveToPosition(this, CKEDITOR.POSITION_AFTER_START), b.select()) + }); + this.attachListener(this, "dblclick", function (b) { + if (a.readOnly) return !1; + b = {element: b.data.getTarget()}; + a.fire("doubleclick", b) + }); + CKEDITOR.env.ie && this.attachListener(this, "click", b); + CKEDITOR.env.ie && !CKEDITOR.env.edge || this.attachListener(this, "mousedown", + function (b) { + var c = b.data.getTarget(); + c.is("img", "hr", "input", "textarea", "select") && !c.isReadOnly() && (a.getSelection().selectElement(c), c.is("input", "textarea", "select") && b.data.preventDefault()) + }); + CKEDITOR.env.edge && this.attachListener(this, "mouseup", function (b) { + (b = b.data.getTarget()) && b.is("img") && a.getSelection().selectElement(b) + }); + CKEDITOR.env.gecko && this.attachListener(this, "mouseup", function (b) { + if (2 == b.data.$.button && (b = b.data.getTarget(), !b.getOuterHtml().replace(D, ""))) { + var c = a.createRange(); + c.moveToElementEditStart(b); + 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(a, "key", function (b) { + if (a.readOnly) return !0; + var c = b.data.domEvent.getKey(); + if (c in t && (b = a.getSelection(), 0 !== b.getRanges().length)) { + var c = 8 == c, d = b.getRanges()[0]; + b = d.startPath(); + if (d.collapsed) a:{ + var e = b.block; + if (e && d[c ? "checkStartOfBlock" : "checkEndOfBlock"]() && d.moveToClosestEditablePosition(e, !c) && d.collapsed) { + if (d.startContainer.type == CKEDITOR.NODE_ELEMENT) { + var f = d.startContainer.getChild(d.startOffset - (c ? 1 : 0)); + if (f && f.type == CKEDITOR.NODE_ELEMENT && f.is("hr")) { + a.fire("saveSnapshot"); + f.remove(); + b = !0; + break a + } + } + d = d.startPath().block; + if (!d || d && d.contains(e)) b = void 0; else { + a.fire("saveSnapshot"); + var n; + (n = (c ? d : e).getBogus()) && n.remove(); + n = a.getSelection(); + f = n.createBookmarks(); + (c ? e : d).moveChildren(c ? d : e, !1); + b.lastElement.mergeSiblings(); + r(e, d, !c); + n.selectBookmarks(f); + b = !0 + } + } else b = !1 + } else c = d, n = b.block, d = c.endPath().block, n && d && !n.equals(d) ? (a.fire("saveSnapshot"), (e = n.getBogus()) && e.remove(), c.enlarge(CKEDITOR.ENLARGE_INLINE), c.deleteContents(), d.getParent() && (d.moveChildren(n, !1), b.lastElement.mergeSiblings(), r(n, d, !0)), c = a.getSelection().getRanges()[0], c.collapse(1), c.optimize(), "" === c.startContainer.getHtml() && c.startContainer.appendBogus(), c.select(), b = !0) : b = !1; + if (!b) return; + a.getSelection().scrollIntoView(); + a.fire("saveSnapshot"); + return !1 + } + }, this, null, 100) + } + } + }, _: { + detach: function () { + this.editor.setData(this.editor.getData(), 0, 1); + this.clearListeners(); + this.restoreAttrs(); + var a; + if (a = this.removeCustomData("classes")) for (; a.length;) this.removeClass(a.pop()); + if (!this.is("textarea")) { + a = this.getDocument(); + var b = a.getHead(); + if (b.getCustomData("stylesheet")) { + var c = a.getCustomData("stylesheet_ref"); + --c ? a.setCustomData("stylesheet_ref", c) : (a.removeCustomData("stylesheet_ref"), b.removeCustomData("stylesheet").remove()) + } + } + this.editor.fire("contentDomUnload"); + delete this.editor + } + } + }); + CKEDITOR.editor.prototype.editable = function (a) { + var b = this._.editable; + if (b && a) return 0; + arguments.length && (b = this._.editable = a ? a instanceof CKEDITOR.editable ? a : new CKEDITOR.editable(this, a) : (b && b.detach(), null)); + return b + }; + CKEDITOR.on("instanceLoaded", function (b) { + var c = b.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 (b) { + if (!c.readOnly) { + var d = c.getSelection(); + d && !d.isLocked && (d = c.checkDirty(), c.fire("lockSnapshot"), a(b), c.fire("unlockSnapshot"), !d && c.resetDirty()) + } + }) + }); + CKEDITOR.on("instanceCreated", function (a) { + var b = a.editor; + b.on("mode", function () { + var a = b.editable(); + if (a && a.isInline()) { + var c = b.title; + a.changeAttr("role", "textbox"); + a.changeAttr("aria-label", c); + c && a.changeAttr("title", c); + var d = b.fire("ariaEditorHelpLabel", {}).label; + if (d && (c = this.ui.space(this.elementMode == CKEDITOR.ELEMENT_MODE_INLINE ? "top" : "contents"))) { + var e = CKEDITOR.tools.getNextId(), + d = CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"' + e + '" class\x3d"cke_voice_label"\x3e' + d + "\x3c/span\x3e"); + c.append(d); + a.changeAttr("aria-describedby", e) + } + } + }) + }); + CKEDITOR.addCss(".cke_editable{cursor:text}.cke_editable img,.cke_editable input,.cke_editable textarea{cursor:default}"); + e = CKEDITOR.dom.walker.whitespaces(!0); + y = CKEDITOR.dom.walker.bookmark(!1, !0); + x = CKEDITOR.dom.walker.empty(); + B = CKEDITOR.dom.walker.bogus(); + D = /(^|]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi; + w = function () { + function a(b) { + return b.type == CKEDITOR.NODE_ELEMENT + } + + function b(c, d) { + var e, f, t, g, h = [], k = d.range.startContainer; + e = d.range.startPath(); + for (var k = C[k.getName()], z = 0, H = c.getChildren(), p = H.count(), m = -1, r = -1, P = 0, E = e.contains(C.$list); z < p; ++z) e = H.getItem(z), a(e) ? (t = e.getName(), E && t in CKEDITOR.dtd.$list ? h = h.concat(b(e, d)) : (g = !!k[t], + "br" != t || !e.data("cke-eol") || z && z != p - 1 || (P = (f = z ? h[z - 1].node : H.getItem(z + 1)) && (!a(f) || !f.is("br")), f = f && a(f) && C.$block[f.getName()]), -1 != m || g || (m = z), g || (r = z), h.push({ + isElement: 1, + isLineBreak: P, + isBlock: e.isBlockBoundary(), + hasBlockSibling: f, + node: e, + name: t, + allowed: g + }), f = P = 0)) : h.push({isElement: 0, node: e, allowed: 1}); + -1 < m && (h[m].firstNotAllowed = 1); + -1 < r && (h[r].lastNotAllowed = 1); + return h + } + + function d(b, c) { + var e = [], f = b.getChildren(), t = f.count(), h, g = 0, z = C[c], k = !b.is(C.$inline) || b.is("br"); + for (k && e.push(" "); g < t; g++) h = + f.getItem(g), a(h) && !h.is(z) ? e = e.concat(d(h, c)) : e.push(h); + k && e.push(" "); + return e + } + + function e(b) { + return a(b.startContainer) && b.startContainer.getChild(b.startOffset - 1) + } + + function f(b) { + return b && a(b) && (b.is(C.$removeEmpty) || b.is("a") && !b.isBlockBoundary()) + } + + function h(b, c, d, e) { + var f = b.clone(), t, g; + f.setEndAt(c, CKEDITOR.POSITION_BEFORE_END); + (t = (new CKEDITOR.dom.walker(f)).next()) && a(t) && z[t.getName()] && (g = t.getPrevious()) && a(g) && !g.getParent().equals(b.startContainer) && d.contains(g) && e.contains(t) && t.isIdentical(g) && + (t.moveChildren(g), t.remove(), h(b, c, d, e)) + } + + function t(b, c) { + function d(b, c) { + if (c.isBlock && c.isElement && !c.node.is("br") && a(b) && b.is("br")) return b.remove(), 1 + } + + var e = c.endContainer.getChild(c.endOffset), f = c.endContainer.getChild(c.endOffset - 1); + e && d(e, b[b.length - 1]); + f && d(f, b[0]) && (c.setEnd(c.endContainer, c.endOffset - 1), c.collapse()) + } + + var C = CKEDITOR.dtd, z = { + p: 1, + div: 1, + h1: 1, + h2: 1, + h3: 1, + h4: 1, + h5: 1, + h6: 1, + ul: 1, + ol: 1, + li: 1, + pre: 1, + dl: 1, + blockquote: 1 + }, H = {p: 1, div: 1, h1: 1, h2: 1, h3: 1, h4: 1, h5: 1, h6: 1}, p = CKEDITOR.tools.extend({}, + C.$inline); + delete p.br; + return function (z, n, N, v) { + var A = z.editor, G = !1; + "unfiltered_html" == n && (n = "html", G = !0); + if (!v.checkReadOnly()) { + var I = (new CKEDITOR.dom.elementPath(v.startContainer, v.root)).blockLimit || v.root; + z = { + type: n, + dontFilter: G, + editable: z, + editor: A, + range: v, + blockLimit: I, + mergeCandidates: [], + zombies: [] + }; + n = z.range; + v = z.mergeCandidates; + var m, r; + "text" == z.type && n.shrink(CKEDITOR.SHRINK_ELEMENT, !0, !1) && (m = CKEDITOR.dom.element.createFromHtml("\x3cspan\x3e\x26nbsp;\x3c/span\x3e", n.document), n.insertNode(m), + n.setStartAfter(m)); + G = new CKEDITOR.dom.elementPath(n.startContainer); + z.endPath = I = new CKEDITOR.dom.elementPath(n.endContainer); + if (!n.collapsed) { + var A = I.block || I.blockLimit, x = n.getCommonAncestor(); + A && !A.equals(x) && !A.contains(x) && n.checkEndOfBlock() && z.zombies.push(A); + n.deleteContents() + } + for (; (r = e(n)) && a(r) && r.isBlockBoundary() && G.contains(r);) n.moveToPosition(r, CKEDITOR.POSITION_BEFORE_END); + h(n, z.blockLimit, G, I); + m && (n.setEndBefore(m), n.collapse(), m.remove()); + m = n.startPath(); + if (A = m.contains(f, !1, 1)) n.splitElement(A), + z.inlineStylesRoot = A, z.inlineStylesPeak = m.lastElement; + m = n.createBookmark(); + (A = m.startNode.getPrevious(c)) && a(A) && f(A) && v.push(A); + (A = m.startNode.getNext(c)) && a(A) && f(A) && v.push(A); + for (A = m.startNode; (A = A.getParent()) && f(A);) v.push(A); + n.moveToBookmark(m); + if (m = N) { + m = z.range; + if ("text" == z.type && z.inlineStylesRoot) { + r = z.inlineStylesPeak; + n = r.getDocument().createText("{cke-peak}"); + for (v = z.inlineStylesRoot.getParent(); !r.equals(v);) n = n.appendTo(r.clone()), r = r.getParent(); + N = n.getOuterHtml().split("{cke-peak}").join(N) + } + r = + z.blockLimit.getName(); + if (/^\s+|\s+$/.test(N) && "span" in CKEDITOR.dtd[r]) { + var w = '\x3cspan data-cke-marker\x3d"1"\x3e\x26nbsp;\x3c/span\x3e'; + N = w + N + w + } + N = z.editor.dataProcessor.toHtml(N, { + context: null, + fixForBody: !1, + protectedWhitespaces: !!w, + dontFilter: z.dontFilter, + filter: z.editor.activeFilter, + enterMode: z.editor.activeEnterMode + }); + r = m.document.createElement("body"); + r.setHtml(N); + w && (r.getFirst().remove(), r.getLast().remove()); + if ((w = m.startPath().block) && (1 != w.getChildCount() || !w.getBogus())) a:{ + var y; + if (1 == + r.getChildCount() && a(y = r.getFirst()) && y.is(H) && !y.hasAttribute("contenteditable")) { + w = y.getElementsByTag("*"); + m = 0; + for (v = w.count(); m < v; m++) if (n = w.getItem(m), !n.is(p)) break a; + y.moveChildren(y.getParent(1)); + y.remove() + } + } + z.dataWrapper = r; + m = N + } + if (m) { + y = z.range; + m = y.document; + var u; + r = z.blockLimit; + v = 0; + var B, w = [], D, T; + N = A = 0; + var J, K; + n = y.startContainer; + var G = z.endPath.elements[0], W, I = G.getPosition(n), + x = !!G.getCommonAncestor(n) && I != CKEDITOR.POSITION_IDENTICAL && !(I & CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_IS_CONTAINED); + n = b(z.dataWrapper, z); + for (t(n, y); v < n.length; v++) { + I = n[v]; + if (u = I.isLineBreak) { + u = y; + J = r; + var S = void 0, Y = void 0; + I.hasBlockSibling ? u = 1 : (S = u.startContainer.getAscendant(C.$block, 1)) && S.is({ + div: 1, + p: 1 + }) ? (Y = S.getPosition(J), Y == CKEDITOR.POSITION_IDENTICAL || Y == CKEDITOR.POSITION_CONTAINS ? u = 0 : (J = u.splitElement(S), u.moveToPosition(J, CKEDITOR.POSITION_AFTER_START), u = 1)) : u = 0 + } + if (u) N = 0 < v; else { + u = y.startPath(); + !I.isBlock && k(z.editor, u.block, u.blockLimit) && (T = g(z.editor)) && (T = m.createElement(T), T.appendBogus(), y.insertNode(T), + CKEDITOR.env.needsBrFiller && (B = T.getBogus()) && B.remove(), y.moveToPosition(T, CKEDITOR.POSITION_BEFORE_END)); + if ((u = y.startPath().block) && !u.equals(D)) { + if (B = u.getBogus()) B.remove(), w.push(u); + D = u + } + I.firstNotAllowed && (A = 1); + if (A && I.isElement) { + u = y.startContainer; + for (J = null; u && !C[u.getName()][I.name];) { + if (u.equals(r)) { + u = null; + break + } + J = u; + u = u.getParent() + } + if (u) J && (K = y.splitElement(J), z.zombies.push(K), z.zombies.push(J)); else { + J = r.getName(); + W = !v; + u = v == n.length - 1; + J = d(I.node, J); + for (var S = [], Y = J.length, Z = 0, ba = void 0, + ca = 0, U = -1; Z < Y; Z++) ba = J[Z], " " == ba ? (ca || W && !Z || (S.push(new CKEDITOR.dom.text(" ")), U = S.length), ca = 1) : (S.push(ba), ca = 0); + u && U == S.length && S.pop(); + W = S + } + } + if (W) { + for (; u = W.pop();) y.insertNode(u); + W = 0 + } else y.insertNode(I.node); + I.lastNotAllowed && v < n.length - 1 && ((K = x ? G : K) && y.setEndAt(K, CKEDITOR.POSITION_AFTER_START), A = 0); + y.collapse() + } + } + 1 != n.length ? B = !1 : (B = n[0], B = B.isElement && "false" == B.node.getAttribute("contenteditable")); + B && (N = !0, u = n[0].node, y.setStartAt(u, CKEDITOR.POSITION_BEFORE_START), y.setEndAt(u, CKEDITOR.POSITION_AFTER_END)); + z.dontMoveCaret = N; + z.bogusNeededBlocks = w + } + B = z.range; + var R; + K = z.bogusNeededBlocks; + for (W = B.createBookmark(); D = z.zombies.pop();) D.getParent() && (T = B.clone(), T.moveToElementEditStart(D), T.removeEmptyBlocksAtEnd()); + if (K) for (; D = K.pop();) CKEDITOR.env.needsBrFiller ? D.appendBogus() : D.append(B.document.createText(" ")); + for (; D = z.mergeCandidates.pop();) D.mergeSiblings(); + B.moveToBookmark(W); + if (!z.dontMoveCaret) { + for (D = e(B); D && a(D) && !D.is(C.$empty);) { + if (D.isBlockBoundary()) B.moveToPosition(D, CKEDITOR.POSITION_BEFORE_END); + else { + if (f(D) && D.getHtml().match(/(\s| )$/g)) { + R = null; + break + } + R = B.clone(); + R.moveToPosition(D, CKEDITOR.POSITION_BEFORE_END) + } + D = D.getLast(c) + } + R && B.moveToRange(R) + } + } + } + }(); + p = function () { + function a(b) { + b = new CKEDITOR.dom.walker(b); + b.guard = function (a, b) { + if (b) return !1; + if (a.type == CKEDITOR.NODE_ELEMENT) return a.is(CKEDITOR.dtd.$tableContent) + }; + b.evaluator = function (a) { + return a.type == CKEDITOR.NODE_ELEMENT + }; + return b + } + + function b(a, c, d) { + c = a.getDocument().createElement(c); + a.append(c, d); + return c + } + + function c(a) { + var b = a.count(), + d; + for (b; 0 < b--;) d = a.getItem(b), CKEDITOR.tools.trim(d.getHtml()) || (d.appendBogus(), CKEDITOR.env.ie && 9 > CKEDITOR.env.version && d.getChildCount() && d.getFirst().remove()) + } + + return function (d) { + var e = d.startContainer, f = e.getAscendant("table", 1), t = !1; + c(f.getElementsByTag("td")); + c(f.getElementsByTag("th")); + f = d.clone(); + f.setStart(e, 0); + f = a(f).lastBackward(); + f || (f = d.clone(), f.setEndAt(e, CKEDITOR.POSITION_BEFORE_END), f = a(f).lastForward(), t = !0); + f || (f = e); + f.is("table") ? (d.setStartAt(f, CKEDITOR.POSITION_BEFORE_START), + d.collapse(!0), f.remove()) : (f.is({ + tbody: 1, + thead: 1, + tfoot: 1 + }) && (f = b(f, "tr", t)), f.is("tr") && (f = b(f, f.getParent().is("thead") ? "th" : "td", t)), (e = f.getBogus()) && e.remove(), d.moveToPosition(f, t ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END)) + } + }(); + J = function () { + function a(b) { + b = new CKEDITOR.dom.walker(b); + b.guard = function (a, b) { + if (b) return !1; + if (a.type == CKEDITOR.NODE_ELEMENT) return a.is(CKEDITOR.dtd.$list) || a.is(CKEDITOR.dtd.$listItem) + }; + b.evaluator = function (a) { + return a.type == CKEDITOR.NODE_ELEMENT && + a.is(CKEDITOR.dtd.$listItem) + }; + return b + } + + return function (b) { + var c = b.startContainer, d = !1, e; + e = b.clone(); + e.setStart(c, 0); + e = a(e).lastBackward(); + e || (e = b.clone(), e.setEndAt(c, CKEDITOR.POSITION_BEFORE_END), e = a(e).lastForward(), d = !0); + e || (e = c); + e.is(CKEDITOR.dtd.$list) ? (b.setStartAt(e, CKEDITOR.POSITION_BEFORE_START), b.collapse(!0), e.remove()) : ((c = e.getBogus()) && c.remove(), b.moveToPosition(e, d ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END), b.select()) + } + }(); + u = { + eol: { + detect: function (a, b) { + var c = a.range, + d = c.clone(), e = c.clone(), f = new CKEDITOR.dom.elementPath(c.startContainer, b), + t = new CKEDITOR.dom.elementPath(c.endContainer, b); + d.collapse(1); + e.collapse(); + f.block && d.checkBoundaryOfElement(f.block, CKEDITOR.END) && (c.setStartAfter(f.block), a.prependEolBr = 1); + t.block && e.checkBoundaryOfElement(t.block, CKEDITOR.START) && (c.setEndBefore(t.block), a.appendEolBr = 1) + }, fix: function (a, b) { + var c = b.getDocument(), d; + a.appendEolBr && (d = this.createEolBr(c), a.fragment.append(d)); + !a.prependEolBr || d && !d.getPrevious() || a.fragment.append(this.createEolBr(c), + 1) + }, createEolBr: function (a) { + return a.createElement("br", {attributes: {"data-cke-eol": 1}}) + } + }, bogus: { + exclude: function (a) { + var b = a.range.getBoundaryNodes(), c = b.startNode, b = b.endNode; + !b || !B(b) || c && c.equals(b) || a.range.setEndBefore(b) + } + }, tree: { + rebuild: function (a, b) { + var c = a.range, d = c.getCommonAncestor(), e = new CKEDITOR.dom.elementPath(d, b), + f = new CKEDITOR.dom.elementPath(c.startContainer, b), + c = new CKEDITOR.dom.elementPath(c.endContainer, b), t; + d.type == CKEDITOR.NODE_TEXT && (d = d.getParent()); + if (e.blockLimit.is({ + tr: 1, + table: 1 + })) { + var g = e.contains("table").getParent(); + t = function (a) { + return !a.equals(g) + } + } else if (e.block && e.block.is(CKEDITOR.dtd.$listItem) && (f = f.contains(CKEDITOR.dtd.$list), c = c.contains(CKEDITOR.dtd.$list), !f.equals(c))) { + var h = e.contains(CKEDITOR.dtd.$list).getParent(); + t = function (a) { + return !a.equals(h) + } + } + t || (t = function (a) { + return !a.equals(e.block) && !a.equals(e.blockLimit) + }); + this.rebuildFragment(a, b, d, t) + }, rebuildFragment: function (a, b, c, d) { + for (var e; c && !c.equals(b) && d(c);) e = c.clone(0, 1), a.fragment.appendTo(e), + a.fragment = e, c = c.getParent() + } + }, cell: { + shrink: function (a) { + a = a.range; + var b = a.startContainer, c = a.endContainer, d = a.startOffset, e = a.endOffset; + b.type == CKEDITOR.NODE_ELEMENT && b.equals(c) && b.is("tr") && ++d == e && a.shrink(CKEDITOR.SHRINK_TEXT) + } + } + }; + K = function () { + function a(b, c) { + var d = b.getParent(); + if (d.is(CKEDITOR.dtd.$inline)) b[c ? "insertBefore" : "insertAfter"](d) + } + + function b(c, d, e) { + a(d); + a(e, 1); + for (var f; f = e.getNext();) f.insertAfter(d), d = f; + x(c) && c.remove() + } + + function c(a, b) { + var d = new CKEDITOR.dom.range(a); + d.setStartAfter(b.startNode); + d.setEndBefore(b.endNode); + return d + } + + return { + list: { + detectMerge: function (a, b) { + var d = c(b, a.bookmark), e = d.startPath(), f = d.endPath(), + g = e.contains(CKEDITOR.dtd.$list), h = f.contains(CKEDITOR.dtd.$list); + a.mergeList = g && h && g.getParent().equals(h.getParent()) && !g.equals(h); + a.mergeListItems = e.block && f.block && e.block.is(CKEDITOR.dtd.$listItem) && f.block.is(CKEDITOR.dtd.$listItem); + if (a.mergeList || a.mergeListItems) d = d.clone(), d.setStartBefore(a.bookmark.startNode), d.setEndAfter(a.bookmark.endNode), a.mergeListBookmark = + d.createBookmark() + }, merge: function (a, c) { + if (a.mergeListBookmark) { + var d = a.mergeListBookmark.startNode, e = a.mergeListBookmark.endNode, + f = new CKEDITOR.dom.elementPath(d, c), g = new CKEDITOR.dom.elementPath(e, c); + if (a.mergeList) { + var h = f.contains(CKEDITOR.dtd.$list), k = g.contains(CKEDITOR.dtd.$list); + h.equals(k) || (k.moveChildren(h), k.remove()) + } + a.mergeListItems && (f = f.contains(CKEDITOR.dtd.$listItem), g = g.contains(CKEDITOR.dtd.$listItem), f.equals(g) || b(g, d, e)); + d.remove(); + e.remove() + } + } + }, block: { + detectMerge: function (a, + b) { + if (!a.tableContentsRanges && !a.mergeListBookmark) { + var c = new CKEDITOR.dom.range(b); + c.setStartBefore(a.bookmark.startNode); + c.setEndAfter(a.bookmark.endNode); + a.mergeBlockBookmark = c.createBookmark() + } + }, merge: function (a, c) { + if (a.mergeBlockBookmark && !a.purgeTableBookmark) { + var d = a.mergeBlockBookmark.startNode, e = a.mergeBlockBookmark.endNode, + f = new CKEDITOR.dom.elementPath(d, c), g = new CKEDITOR.dom.elementPath(e, c), + f = f.block, g = g.block; + f && g && !f.equals(g) && b(g, d, e); + d.remove(); + e.remove() + } + } + }, table: function () { + function a(c) { + var e = + [], f, g = new CKEDITOR.dom.walker(c), h = c.startPath().contains(d), + k = c.endPath().contains(d), n = {}; + g.guard = function (a, g) { + if (a.type == CKEDITOR.NODE_ELEMENT) { + var A = "visited_" + (g ? "out" : "in"); + if (a.getCustomData(A)) return; + CKEDITOR.dom.element.setMarker(n, a, A, 1) + } + if (g && h && a.equals(h)) f = c.clone(), f.setEndAt(h, CKEDITOR.POSITION_BEFORE_END), e.push(f); else if (!g && k && a.equals(k)) f = c.clone(), f.setStartAt(k, CKEDITOR.POSITION_AFTER_START), e.push(f); else { + if (A = !g) A = a.type == CKEDITOR.NODE_ELEMENT && a.is(d) && (!h || b(a, h)) && (!k || + b(a, k)); + if (!A && (A = g)) if (a.is(d)) var A = h && h.getAscendant("table", !0), + l = k && k.getAscendant("table", !0), H = a.getAscendant("table", !0), + A = A && A.contains(H) || l && l.contains(H); else A = void 0; + A && (f = c.clone(), f.selectNodeContents(a), e.push(f)) + } + }; + g.lastForward(); + CKEDITOR.dom.element.clearAllMarkers(n); + return e + } + + function b(a, c) { + var d = CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_IS_CONTAINED, e = a.getPosition(c); + return e === CKEDITOR.POSITION_IDENTICAL ? !1 : 0 === (e & d) + } + + var d = {td: 1, th: 1, caption: 1}; + return { + detectPurge: function (a) { + var b = + a.range, c = b.clone(); + c.enlarge(CKEDITOR.ENLARGE_ELEMENT); + var c = new CKEDITOR.dom.walker(c), e = 0; + c.evaluator = function (a) { + a.type == CKEDITOR.NODE_ELEMENT && a.is(d) && ++e + }; + c.checkForward(); + if (1 < e) { + var c = b.startPath().contains("table"), f = b.endPath().contains("table"); + c && f && b.checkBoundaryOfElement(c, CKEDITOR.START) && b.checkBoundaryOfElement(f, CKEDITOR.END) && (b = a.range.clone(), b.setStartBefore(c), b.setEndAfter(f), a.purgeTableBookmark = b.createBookmark()) + } + }, detectRanges: function (e, f) { + var g = c(f, e.bookmark), h = g.clone(), + k, l, n = g.getCommonAncestor(); + n.is(CKEDITOR.dtd.$tableContent) && !n.is(d) && (n = n.getAscendant("table", !0)); + l = n; + n = new CKEDITOR.dom.elementPath(g.startContainer, l); + l = new CKEDITOR.dom.elementPath(g.endContainer, l); + n = n.contains("table"); + l = l.contains("table"); + if (n || l) n && l && b(n, l) ? (e.tableSurroundingRange = h, h.setStartAt(n, CKEDITOR.POSITION_AFTER_END), h.setEndAt(l, CKEDITOR.POSITION_BEFORE_START), h = g.clone(), h.setEndAt(n, CKEDITOR.POSITION_AFTER_END), k = g.clone(), k.setStartAt(l, CKEDITOR.POSITION_BEFORE_START), + k = a(h).concat(a(k))) : n ? l || (e.tableSurroundingRange = h, h.setStartAt(n, CKEDITOR.POSITION_AFTER_END), g.setEndAt(n, CKEDITOR.POSITION_AFTER_END)) : (e.tableSurroundingRange = h, h.setEndAt(l, CKEDITOR.POSITION_BEFORE_START), g.setStartAt(l, CKEDITOR.POSITION_AFTER_START)), e.tableContentsRanges = k ? k : a(g) + }, deleteRanges: function (a) { + for (var b; b = a.tableContentsRanges.pop();) b.extractContents(), x(b.startContainer) && b.startContainer.appendBogus(); + a.tableSurroundingRange && a.tableSurroundingRange.extractContents() + }, purge: function (a) { + if (a.purgeTableBookmark) { + var b = + a.doc, c = a.range.clone(), b = b.createElement("p"); + b.insertBefore(a.purgeTableBookmark.startNode); + c.moveToBookmark(a.purgeTableBookmark); + c.deleteContents(); + a.range.moveToPosition(b, CKEDITOR.POSITION_AFTER_START) + } + } + } + }(), detectExtractMerge: function (a) { + return !(a.range.startPath().contains(CKEDITOR.dtd.$listItem) && a.range.endPath().contains(CKEDITOR.dtd.$listItem)) + }, fixUneditableRangePosition: function (a) { + a.startContainer.getDtd()["#"] || a.moveToClosestEditablePosition(null, !0) + }, autoParagraph: function (a, b) { + var c = + b.startPath(), d; + k(a, c.block, c.blockLimit) && (d = g(a)) && (d = b.document.createElement(d), d.appendBogus(), b.insertNode(d), b.moveToPosition(d, CKEDITOR.POSITION_AFTER_START)) + } + } + }() + })(); + (function () { + function a(a) { + return CKEDITOR.plugins.widget && CKEDITOR.plugins.widget.isDomWidget(a) + } + + function d(b, c) { + if (0 === b.length || a(b[0].getEnclosedNode())) return !1; + var d, e; + if ((d = !c && 1 === b.length) && !(d = b[0].collapsed)) { + var f = b[0]; + d = f.startContainer.getAscendant({td: 1, th: 1}, !0); + var g = f.endContainer.getAscendant({td: 1, th: 1}, !0); + e = CKEDITOR.tools.trim; + d && d.equals(g) && !d.findOne("td, th, tr, tbody, table") ? (f = f.cloneContents(), d = f.getFirst() ? e(f.getFirst().getText()) !== e(d.getText()) : !0) : d = !1 + } + if (d) return !1; + for (e = 0; e < b.length; e++) if (d = b[e]._getTableElement(), !d) return !1; + return !0 + } + + function b(a) { + function b(a) { + a = a.find("td, th"); + var c = [], d; + for (d = 0; d < a.count(); d++) c.push(a.getItem(d)); + return c + } + + var c = [], d, e; + for (e = 0; e < a.length; e++) d = a[e]._getTableElement(), d.is && d.is({ + td: 1, + th: 1 + }) ? c.push(d) : c = c.concat(b(d)); + return c + } + + function c(a) { + a = b(a); + var c = "", d = [], e, f; + for (f = 0; f < a.length; f++) e && !e.equals(a[f].getAscendant("tr")) ? (c += d.join("\t") + "\n", e = a[f].getAscendant("tr"), d = []) : 0 === f && (e = a[f].getAscendant("tr")), d.push(a[f].getText()); + return c += d.join("\t") + } + + function f(a) { + var b = this.root.editor, d = b.getSelection(1); + this.reset(); + l = !0; + d.root.once("selectionchange", function (a) { + a.cancel() + }, null, null, 0); + d.selectRanges([a[0]]); + d = this._.cache; + d.ranges = new CKEDITOR.dom.rangeList(a); + d.type = CKEDITOR.SELECTION_TEXT; + d.selectedElement = a[0]._getTableElement(); + d.selectedText = c(a); + d.nativeSel = null; + this.isFake = 1; + this.rev = J++; + b._.fakeSelection = this; + l = !1; + this.root.fire("selectionchange") + } + + function h() { + var b = this._.fakeSelection, c; + if (b) { + c = this.getSelection(1); + var e; + if (!(e = !c) && (e = !c.isHidden())) { + e = b; + var f = c.getRanges(), g = e.getRanges(), + h = f.length && f[0]._getTableElement() && f[0]._getTableElement().getAscendant("table", !0), + n = g.length && g[0]._getTableElement() && g[0]._getTableElement().getAscendant("table", !0), + k = 1 === f.length && f[0]._getTableElement() && f[0]._getTableElement().is("table"), + v = 1 === g.length && g[0]._getTableElement() && g[0]._getTableElement().is("table"); + if (a(e.getSelectedElement())) e = !1; else { + var A = 1 === f.length && f[0].collapsed, g = d(f, !!CKEDITOR.env.webkit) && + d(g); + h = h && n ? h.equals(n) || n.contains(h) : !1; + h && (A || g) ? (k && !v && e.selectRanges(f), e = !0) : e = !1 + } + e = !e + } + e && (b.reset(), b = 0) + } + if (!b && (b = c || this.getSelection(1), !b || b.getType() == CKEDITOR.SELECTION_NONE)) return; + this.fire("selectionCheck", b); + c = this.elementPath(); + c.compare(this._.selectionPreviousPath) || (e = this._.selectionPreviousPath && this._.selectionPreviousPath.blockLimit.equals(c.blockLimit), CKEDITOR.env.webkit && !e && (this._.previousActive = this.document.getActive()), this._.selectionPreviousPath = c, this.fire("selectionChange", + {selection: b, path: c})) + } + + function k() { + F = !0; + q || (g.call(this), q = CKEDITOR.tools.setTimeout(g, 200, this)) + } + + function g() { + q = null; + F && (CKEDITOR.tools.setTimeout(h, 0, this), F = !1) + } + + function m(a) { + return L(a) || a.type == CKEDITOR.NODE_ELEMENT && !a.is(CKEDITOR.dtd.$empty) ? !0 : !1 + } + + function r(a) { + function b(c, d) { + return c && c.type != CKEDITOR.NODE_TEXT ? a.clone()["moveToElementEdit" + (d ? "End" : "Start")](c) : !1 + } + + if (!(a.root instanceof CKEDITOR.editable)) return !1; + var c = a.startContainer, d = a.getPreviousNode(m, null, c), e = a.getNextNode(m, null, + c); + return b(d) || b(e, 1) || !(d || e || c.type == CKEDITOR.NODE_ELEMENT && c.isBlockBoundary() && c.getBogus()) ? !0 : !1 + } + + function e(a) { + y(a, !1); + var b = a.getDocument().createText(u); + a.setCustomData("cke-fillingChar", b); + return b + } + + function y(a, b) { + var c = a && a.removeCustomData("cke-fillingChar"); + if (c) { + if (!1 !== b) { + var d = a.getDocument().getSelection().getNative(), e = d && "None" != d.type && d.getRangeAt(0), + f = u.length; + if (c.getLength() > f && e && e.intersectsNode(c.$)) { + var n = [{node: d.anchorNode, offset: d.anchorOffset}, { + node: d.focusNode, + offset: d.focusOffset + }]; + d.anchorNode == c.$ && d.anchorOffset > f && (n[0].offset -= f); + d.focusNode == c.$ && d.focusOffset > f && (n[1].offset -= f) + } + } + c.setText(x(c.getText(), 1)); + n && (c = a.getDocument().$, d = c.getSelection(), c = c.createRange(), c.setStart(n[0].node, n[0].offset), c.collapse(!0), d.removeAllRanges(), d.addRange(c), d.extend(n[1].node, n[1].offset)) + } + } + + function x(a, b) { + return b ? a.replace(K, function (a, b) { + return b ? " " : "" + }) : a.replace(u, "") + } + + function B(a, b) { + var c = CKEDITOR.dom.element.createFromHtml('\x3cdiv data-cke-hidden-sel\x3d"1" data-cke-temp\x3d"1" style\x3d"' + + (CKEDITOR.env.ie && 14 > CKEDITOR.env.version ? "display:none" : "position:fixed;top:0;left:-1000px") + '"\x3e' + (b || "\x26nbsp;") + "\x3c/div\x3e", a.document); + a.fire("lockSnapshot"); + a.editable().append(c); + var d = a.getSelection(1), e = a.createRange(), f = d.root.on("selectionchange", function (a) { + a.cancel() + }, null, null, 0); + e.setStartAt(c, CKEDITOR.POSITION_AFTER_START); + e.setEndAt(c, CKEDITOR.POSITION_BEFORE_END); + d.selectRanges([e]); + f.removeListener(); + a.fire("unlockSnapshot"); + a._.hiddenSelectionContainer = c + } + + function D(a) { + var b = + {37: 1, 39: 1, 8: 1, 46: 1}; + return function (c) { + var d = c.data.getKeystroke(); + if (b[d]) { + var e = a.getSelection().getRanges(), f = e[0]; + 1 == e.length && f.collapsed && (d = f[38 > d ? "getPreviousEditableNode" : "getNextEditableNode"]()) && d.type == CKEDITOR.NODE_ELEMENT && "false" == d.getAttribute("contenteditable") && (a.getSelection().fake(d), c.data.preventDefault(), c.cancel()) + } + } + } + + function w(a) { + for (var b = 0; b < a.length; b++) { + var c = a[b]; + c.getCommonAncestor().isReadOnly() && a.splice(b, 1); + if (!c.collapsed) { + if (c.startContainer.isReadOnly()) for (var d = + c.startContainer, e; d && !((e = d.type == CKEDITOR.NODE_ELEMENT) && d.is("body") || !d.isReadOnly());) e && "false" == d.getAttribute("contentEditable") && c.setStartAfter(d), d = d.getParent(); + d = c.startContainer; + e = c.endContainer; + var f = c.startOffset, n = c.endOffset, g = c.clone(); + d && d.type == CKEDITOR.NODE_TEXT && (f >= d.getLength() ? g.setStartAfter(d) : g.setStartBefore(d)); + e && e.type == CKEDITOR.NODE_TEXT && (n ? g.setEndAfter(e) : g.setEndBefore(e)); + d = new CKEDITOR.dom.walker(g); + d.evaluator = function (d) { + if (d.type == CKEDITOR.NODE_ELEMENT && + d.isReadOnly()) { + var e = c.clone(); + c.setEndBefore(d); + c.collapsed && a.splice(b--, 1); + d.getPosition(g.endContainer) & CKEDITOR.POSITION_CONTAINS || (e.setStartAfter(d), e.collapsed || a.splice(b + 1, 0, e)); + return !0 + } + return !1 + }; + d.next() + } + } + return a + } + + var p = "function" != typeof window.getSelection, J = 1, u = CKEDITOR.tools.repeat("​", 7), + K = new RegExp(u + "( )?", "g"), l, q, F, L = CKEDITOR.dom.walker.invisible(1), E = function () { + function a(b) { + return function (a) { + var c = a.editor.createRange(); + c.moveToClosestEditablePosition(a.selected, b) && a.editor.getSelection().selectRanges([c]); + return !1 + } + } + + function b(a) { + return function (b) { + var c = b.editor, d = c.createRange(), e; + (e = d.moveToClosestEditablePosition(b.selected, a)) || (e = d.moveToClosestEditablePosition(b.selected, !a)); + e && c.getSelection().selectRanges([d]); + c.fire("saveSnapshot"); + b.selected.remove(); + e || (d.moveToElementEditablePosition(c.editable()), c.getSelection().selectRanges([d])); + c.fire("saveSnapshot"); + return !1 + } + } + + var c = a(), d = a(1); + return {37: c, 38: c, 39: d, 40: d, 8: b(), 46: b(1)} + }(); + CKEDITOR.on("instanceCreated", function (a) { + function b() { + var a = + c.getSelection(); + a && a.removeAllRanges() + } + + var c = a.editor; + c.on("contentDom", function () { + function a() { + r = new CKEDITOR.dom.selection(c.getSelection()); + r.lock() + } + + function b() { + f.removeListener("mouseup", b); + t.removeListener("mouseup", b); + var a = CKEDITOR.document.$.selection, c = a.createRange(); + "None" != a.type && c.parentElement() && c.parentElement().ownerDocument == e.$ && c.select() + } + + function d(a) { + if (CKEDITOR.env.ie) { + var b = (a = a.getRanges()[0]) ? a.startContainer.getAscendant(function (a) { + return a.type == CKEDITOR.NODE_ELEMENT && + ("false" == a.getAttribute("contenteditable") || "true" == a.getAttribute("contenteditable")) + }, !0) : null; + return a && "false" == b.getAttribute("contenteditable") && b + } + } + + var e = c.document, f = CKEDITOR.document, g = c.editable(), l = e.getBody(), + t = e.getDocumentElement(), C = g.isInline(), m, r; + CKEDITOR.env.gecko && g.attachListener(g, "focus", function (a) { + a.removeListener(); + 0 !== m && (a = c.getSelection().getNative()) && a.isCollapsed && a.anchorNode == g.$ && (a = c.createRange(), a.moveToElementEditStart(g), a.select()) + }, null, null, -2); + g.attachListener(g, + CKEDITOR.env.webkit ? "DOMFocusIn" : "focus", function () { + m && CKEDITOR.env.webkit && (m = c._.previousActive && c._.previousActive.equals(e.getActive())) && null != c._.previousScrollTop && c._.previousScrollTop != g.$.scrollTop && (g.$.scrollTop = c._.previousScrollTop); + c.unlockSelection(m); + m = 0 + }, null, null, -1); + g.attachListener(g, "mousedown", function () { + m = 0 + }); + if (CKEDITOR.env.ie || C) p ? g.attachListener(g, "beforedeactivate", a, null, null, -1) : g.attachListener(c, "selectionCheck", a, null, null, -1), g.attachListener(g, CKEDITOR.env.webkit ? + "DOMFocusOut" : "blur", function () { + c.lockSelection(r); + m = 1 + }, null, null, -1), g.attachListener(g, "mousedown", function () { + m = 0 + }); + if (CKEDITOR.env.ie && !C) { + var x; + g.attachListener(g, "mousedown", function (a) { + 2 == a.data.$.button && ((a = c.document.getSelection()) && a.getType() != CKEDITOR.SELECTION_NONE || (x = c.window.getScrollPosition())) + }); + g.attachListener(g, "mouseup", function (a) { + 2 == a.data.$.button && x && (c.document.$.documentElement.scrollLeft = x.x, c.document.$.documentElement.scrollTop = x.y); + x = null + }); + if ("BackCompat" != e.$.compatMode) { + if (CKEDITOR.env.ie7Compat || + CKEDITOR.env.ie6Compat) { + var q, u; + t.on("mousedown", function (a) { + function b(a) { + a = a.data.$; + if (q) { + var c = l.$.createTextRange(); + try { + c.moveToPoint(a.clientX, a.clientY) + } catch (d) { + } + q.setEndPoint(0 > u.compareEndPoints("StartToStart", c) ? "EndToEnd" : "StartToStart", c); + q.select() + } + } + + function c() { + t.removeListener("mousemove", b); + f.removeListener("mouseup", c); + t.removeListener("mouseup", c); + q.select() + } + + a = a.data; + if (a.getTarget().is("html") && a.$.y < t.$.clientHeight && a.$.x < t.$.clientWidth) { + q = l.$.createTextRange(); + try { + q.moveToPoint(a.$.clientX, + a.$.clientY) + } catch (d) { + } + u = q.duplicate(); + t.on("mousemove", b); + f.on("mouseup", c); + t.on("mouseup", c) + } + }) + } + if (7 < CKEDITOR.env.version && 11 > CKEDITOR.env.version) t.on("mousedown", function (a) { + a.data.getTarget().is("html") && (f.on("mouseup", b), t.on("mouseup", b)) + }) + } + } + g.attachListener(g, "selectionchange", h, c); + g.attachListener(g, "keyup", k, c); + g.attachListener(g, "keydown", function (a) { + var b = this.getSelection(1); + d(b) && (b.selectElement(d(b)), a.data.preventDefault()) + }, c); + g.attachListener(g, CKEDITOR.env.webkit ? "DOMFocusIn" : + "focus", function () { + c.forceNextSelectionCheck(); + c.selectionChange(1) + }); + if (C && (CKEDITOR.env.webkit || CKEDITOR.env.gecko)) { + var w; + g.attachListener(g, "mousedown", function () { + w = 1 + }); + g.attachListener(e.getDocumentElement(), "mouseup", function () { + w && k.call(c); + w = 0 + }) + } else g.attachListener(CKEDITOR.env.ie ? g : e.getDocumentElement(), "mouseup", k, c); + CKEDITOR.env.webkit && g.attachListener(e, "keydown", function (a) { + switch (a.data.getKey()) { + case 13: + case 33: + case 34: + case 35: + case 36: + case 37: + case 39: + case 8: + case 45: + case 46: + g.hasFocus && + y(g) + } + }, null, null, -1); + g.attachListener(g, "keydown", D(c), null, null, -1) + }); + c.on("setData", function () { + c.unlockSelection(); + CKEDITOR.env.webkit && b() + }); + c.on("contentDomUnload", function () { + c.unlockSelection() + }); + if (CKEDITOR.env.ie9Compat) c.on("beforeDestroy", b, null, null, 9); + c.on("dataReady", function () { + delete c._.fakeSelection; + delete c._.hiddenSelectionContainer; + c.selectionChange(1) + }); + c.on("loadSnapshot", function () { + var a = CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_ELEMENT), b = c.editable().getLast(a); + b && b.hasAttribute("data-cke-hidden-sel") && + (b.remove(), CKEDITOR.env.gecko && (a = c.editable().getFirst(a)) && a.is("br") && a.getAttribute("_moz_editor_bogus_node") && a.remove()) + }, null, null, 100); + c.on("key", function (a) { + if ("wysiwyg" == c.mode) { + var b = c.getSelection(); + if (b.isFake) { + var d = E[a.data.keyCode]; + if (d) return d({editor: c, selected: b.getSelectedElement(), selection: b, keyEvent: a}) + } + } + }) + }); + if (CKEDITOR.env.webkit) CKEDITOR.on("instanceReady", function (a) { + var b = a.editor; + b.on("selectionChange", function () { + var a = b.editable(), c = a.getCustomData("cke-fillingChar"); + c && (c.getCustomData("ready") ? (y(a), a.editor.fire("selectionCheck")) : c.setCustomData("ready", 1)) + }, null, null, -1); + b.on("beforeSetMode", function () { + y(b.editable()) + }, null, null, -1); + b.on("getSnapshot", function (a) { + a.data && (a.data = x(a.data)) + }, b, null, 20); + b.on("toDataFormat", function (a) { + a.data.dataValue = x(a.data.dataValue) + }, null, null, 0) + }); + CKEDITOR.editor.prototype.selectionChange = function (a) { + (a ? h : k).call(this) + }; + CKEDITOR.editor.prototype.getSelection = function (a) { + return !this._.savedSelection && !this._.fakeSelection || + a ? (a = this.editable()) && "wysiwyg" == this.mode ? new CKEDITOR.dom.selection(a) : null : this._.savedSelection || this._.fakeSelection + }; + CKEDITOR.editor.prototype.lockSelection = function (a) { + a = a || this.getSelection(1); + return a.getType() != CKEDITOR.SELECTION_NONE ? (!a.isLocked && a.lock(), this._.savedSelection = a, !0) : !1 + }; + CKEDITOR.editor.prototype.unlockSelection = function (a) { + var b = this._.savedSelection; + return b ? (b.unlock(a), delete this._.savedSelection, !0) : !1 + }; + CKEDITOR.editor.prototype.forceNextSelectionCheck = function () { + delete this._.selectionPreviousPath + }; + CKEDITOR.dom.document.prototype.getSelection = function () { + return new CKEDITOR.dom.selection(this) + }; + CKEDITOR.dom.range.prototype.select = function () { + var a = this.root instanceof CKEDITOR.editable ? this.root.editor.getSelection() : new CKEDITOR.dom.selection(this.root); + a.selectRanges([this]); + return a + }; + CKEDITOR.SELECTION_NONE = 1; + CKEDITOR.SELECTION_TEXT = 2; + CKEDITOR.SELECTION_ELEMENT = 3; + CKEDITOR.dom.selection = function (a) { + if (a instanceof CKEDITOR.dom.selection) { + var b = a; + a = a.root + } + var c = a instanceof CKEDITOR.dom.element; + this.rev = b ? b.rev : J++; + this.document = a instanceof CKEDITOR.dom.document ? a : a.getDocument(); + this.root = c ? a : this.document.getBody(); + this.isLocked = 0; + this._ = {cache: {}}; + if (b) return CKEDITOR.tools.extend(this._.cache, b._.cache), this.isFake = b.isFake, this.isLocked = b.isLocked, this; + a = this.getNative(); + var d, e; + if (a) if (a.getRangeAt) d = (e = a.rangeCount && a.getRangeAt(0)) && new CKEDITOR.dom.node(e.commonAncestorContainer); else { + try { + e = a.createRange() + } catch (f) { + } + d = e && CKEDITOR.dom.element.get(e.item && e.item(0) || e.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 M = { + 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: x, + _createFillingCharSequenceNode: e, FILLING_CHAR_SEQUENCE: u + }); + CKEDITOR.dom.selection.prototype = { + getNative: function () { + return void 0 !== this._.cache.nativeSel ? this._.cache.nativeSel : this._.cache.nativeSel = p ? this.document.$.selection : this.document.getWindow().$.getSelection() + }, getType: p ? function () { + var a = this._.cache; + if (a.type) return a.type; + var b = CKEDITOR.SELECTION_NONE; + try { + var c = this.getNative(), d = c.type; + "Text" == d && (b = CKEDITOR.SELECTION_TEXT); + "Control" == d && (b = CKEDITOR.SELECTION_ELEMENT); + c.createRange().parentElement() && + (b = CKEDITOR.SELECTION_TEXT) + } catch (e) { + } + return a.type = b + } : function () { + var a = this._.cache; + if (a.type) return a.type; + var b = CKEDITOR.SELECTION_TEXT, c = this.getNative(); + if (!c || !c.rangeCount) b = CKEDITOR.SELECTION_NONE; else if (1 == c.rangeCount) { + var c = c.getRangeAt(0), d = c.startContainer; + d == c.endContainer && 1 == d.nodeType && 1 == c.endOffset - c.startOffset && M[d.childNodes[c.startOffset].nodeName.toLowerCase()] && (b = CKEDITOR.SELECTION_ELEMENT) + } + return a.type = b + }, getRanges: function () { + var a = p ? function () { + function a(b) { + return (new CKEDITOR.dom.node(b)).getIndex() + } + + var b = function (b, c) { + b = b.duplicate(); + b.collapse(c); + var d = b.parentElement(); + if (!d.hasChildNodes()) return {container: d, offset: 0}; + for (var e = d.children, f, g, h = b.duplicate(), k = 0, l = e.length - 1, t = -1, m, p; k <= l;) if (t = Math.floor((k + l) / 2), f = e[t], h.moveToElementText(f), m = h.compareEndPoints("StartToStart", b), 0 < m) l = t - 1; else if (0 > m) k = t + 1; else return { + container: d, + offset: a(f) + }; + if (-1 == t || t == e.length - 1 && 0 > m) { + h.moveToElementText(d); + h.setEndPoint("StartToStart", b); + h = h.text.replace(/(\r\n|\r)/g, "\n").length; + e = d.childNodes; + if (!h) return f = + e[e.length - 1], f.nodeType != CKEDITOR.NODE_TEXT ? { + container: d, + offset: e.length + } : {container: f, offset: f.nodeValue.length}; + for (d = e.length; 0 < h && 0 < d;) g = e[--d], g.nodeType == CKEDITOR.NODE_TEXT && (p = g, h -= g.nodeValue.length); + return {container: p, offset: -h} + } + h.collapse(0 < m ? !0 : !1); + h.setEndPoint(0 < m ? "StartToStart" : "EndToStart", b); + h = h.text.replace(/(\r\n|\r)/g, "\n").length; + if (!h) return {container: d, offset: a(f) + (0 < m ? 0 : 1)}; + for (; 0 < h;) try { + g = f[0 < m ? "previousSibling" : "nextSibling"], g.nodeType == CKEDITOR.NODE_TEXT && (h -= g.nodeValue.length, + p = g), f = g + } catch (r) { + return {container: d, offset: a(f)} + } + return {container: p, offset: 0 < m ? -h : p.nodeValue.length + h} + }; + return function () { + var a = this.getNative(), c = a && a.createRange(), d = this.getType(); + if (!a) return []; + if (d == CKEDITOR.SELECTION_TEXT) return a = new CKEDITOR.dom.range(this.root), d = b(c, !0), a.setStart(new CKEDITOR.dom.node(d.container), d.offset), d = b(c), a.setEnd(new CKEDITOR.dom.node(d.container), d.offset), a.endContainer.getPosition(a.startContainer) & CKEDITOR.POSITION_PRECEDING && a.endOffset <= a.startContainer.getIndex() && + a.collapse(), [a]; + if (d == CKEDITOR.SELECTION_ELEMENT) { + for (var d = [], e = 0; e < c.length; e++) { + for (var f = c.item(e), g = f.parentNode, h = 0, a = new CKEDITOR.dom.range(this.root); h < g.childNodes.length && g.childNodes[h] != f; h++) ; + a.setStart(new CKEDITOR.dom.node(g), h); + a.setEnd(new CKEDITOR.dom.node(g), h + 1); + d.push(a) + } + return d + } + return [] + } + }() : function () { + var a = [], b, c = this.getNative(); + if (!c) return a; + for (var d = 0; d < c.rangeCount; d++) { + var e = c.getRangeAt(d); + b = new CKEDITOR.dom.range(this.root); + b.setStart(new CKEDITOR.dom.node(e.startContainer), + e.startOffset); + b.setEnd(new CKEDITOR.dom.node(e.endContainer), e.endOffset); + a.push(b) + } + return a + }; + return function (b) { + var c = this._.cache, d = c.ranges; + d || (c.ranges = d = new CKEDITOR.dom.rangeList(a.call(this))); + return b ? w(new CKEDITOR.dom.rangeList(d.slice())) : d + } + }(), getStartElement: function () { + var a = this._.cache; + if (void 0 !== a.startElement) return a.startElement; + var b; + switch (this.getType()) { + case CKEDITOR.SELECTION_ELEMENT: + return this.getSelectedElement(); + case CKEDITOR.SELECTION_TEXT: + var c = this.getRanges()[0]; + if (c) { + if (c.collapsed) b = c.startContainer, b.type != CKEDITOR.NODE_ELEMENT && (b = b.getParent()); else { + for (c.optimize(); b = c.startContainer, c.startOffset == (b.getChildCount ? b.getChildCount() : b.getLength()) && !b.isBlockBoundary();) c.setStartAfter(b); + b = c.startContainer; + if (b.type != CKEDITOR.NODE_ELEMENT) return b.getParent(); + if ((b = b.getChild(c.startOffset)) && b.type == CKEDITOR.NODE_ELEMENT) for (c = b.getFirst(); c && c.type == CKEDITOR.NODE_ELEMENT;) b = c, c = c.getFirst(); else b = c.startContainer + } + b = b.$ + } + } + return a.startElement = b ? + new CKEDITOR.dom.element(b) : null + }, getSelectedElement: function () { + var a = this._.cache; + if (void 0 !== a.selectedElement) return a.selectedElement; + var b = this, c = CKEDITOR.tools.tryThese(function () { + return b.getNative().createRange().item(0) + }, function () { + for (var a = b.getRanges()[0].clone(), c, d, e = 2; e && !((c = a.getEnclosedNode()) && c.type == CKEDITOR.NODE_ELEMENT && M[c.getName()] && (d = c)); e--) a.shrink(CKEDITOR.SHRINK_ELEMENT); + return d && d.$ + }); + return a.selectedElement = c ? new CKEDITOR.dom.element(c) : null + }, getSelectedText: function () { + var a = + this._.cache; + if (void 0 !== a.selectedText) return a.selectedText; + var b = this.getNative(), b = p ? "Control" == b.type ? "" : b.createRange().text : b.toString(); + return a.selectedText = b + }, lock: function () { + this.getRanges(); + this.getStartElement(); + this.getSelectedElement(); + this.getSelectedText(); + this._.cache.nativeSel = null; + this.isLocked = 1 + }, unlock: function (a) { + if (this.isLocked) { + if (a) var b = this.getSelectedElement(), c = this.getRanges(), e = this.isFake; + this.isLocked = 0; + this.reset(); + a && (a = b || c[0] && c[0].getCommonAncestor()) && a.getAscendant("body", + 1) && (d(c) ? f.call(this, c) : e ? this.fake(b) : b ? this.selectElement(b) : this.selectRanges(c)) + } + }, reset: function () { + this._.cache = {}; + this.isFake = 0; + var a = this.root.editor; + if (a && a._.fakeSelection) if (this.rev == a._.fakeSelection.rev) { + delete a._.fakeSelection; + var b = a._.hiddenSelectionContainer; + if (b) { + var c = a.checkDirty(); + a.fire("lockSnapshot"); + b.remove(); + a.fire("unlockSnapshot"); + !c && a.resetDirty() + } + delete a._.hiddenSelectionContainer + } else CKEDITOR.warn("selection-fake-reset"); + this.rev = J++ + }, selectElement: function (a) { + var b = + new CKEDITOR.dom.range(this.root); + b.setStartBefore(a); + b.setEndAfter(a); + this.selectRanges([b]) + }, selectRanges: function (a) { + var b = this.root.editor, c = b && b._.hiddenSelectionContainer; + this.reset(); + if (c) for (var c = this.root, g, h = 0; h < a.length; ++h) g = a[h], g.endContainer.equals(c) && (g.endOffset = Math.min(g.endOffset, c.getChildCount())); + if (a.length) if (this.isLocked) { + var k = CKEDITOR.document.getActive(); + this.unlock(); + this.selectRanges(a); + this.lock(); + k && !k.equals(this.root) && k.focus() + } else { + var n; + a:{ + var m, v; + if (1 == a.length && + !(v = a[0]).collapsed && (n = v.getEnclosedNode()) && n.type == CKEDITOR.NODE_ELEMENT && (v = v.clone(), v.shrink(CKEDITOR.SHRINK_ELEMENT, !0), (m = v.getEnclosedNode()) && m.type == CKEDITOR.NODE_ELEMENT && (n = m), "false" == n.getAttribute("contenteditable"))) break a; + n = void 0 + } + if (n) this.fake(n); else if (b && b.plugins.tableselection && CKEDITOR.plugins.tableselection.isSupportedEnvironment && d(a) && !l) f.call(this, a); else { + if (p) { + m = CKEDITOR.dom.walker.whitespaces(!0); + n = /\ufeff|\u00a0/; + v = {table: 1, tbody: 1, tr: 1}; + 1 < a.length && (b = a[a.length - + 1], a[0].setEnd(b.endContainer, b.endOffset)); + b = a[0]; + a = b.collapsed; + var A, G, I; + if ((c = b.getEnclosedNode()) && c.type == CKEDITOR.NODE_ELEMENT && c.getName() in M && (!c.is("a") || !c.getText())) try { + I = c.$.createControlRange(); + I.addElement(c.$); + I.select(); + return + } catch (q) { + } + if (b.startContainer.type == CKEDITOR.NODE_ELEMENT && b.startContainer.getName() in v || b.endContainer.type == CKEDITOR.NODE_ELEMENT && b.endContainer.getName() in v) b.shrink(CKEDITOR.NODE_ELEMENT, !0), a = b.collapsed; + I = b.createBookmark(); + v = I.startNode; + a || (k = I.endNode); + I = b.document.$.body.createTextRange(); + I.moveToElementText(v.$); + I.moveStart("character", 1); + k ? (n = b.document.$.body.createTextRange(), n.moveToElementText(k.$), I.setEndPoint("EndToEnd", n), I.moveEnd("character", -1)) : (A = v.getNext(m), G = v.hasAscendant("pre"), A = !(A && A.getText && A.getText().match(n)) && (G || !v.hasPrevious() || v.getPrevious().is && v.getPrevious().is("br")), G = b.document.createElement("span"), G.setHtml("\x26#65279;"), G.insertBefore(v), A && b.document.createText("").insertBefore(v)); + b.setStartBefore(v); + v.remove(); + a ? (A ? (I.moveStart("character", -1), I.select(), b.document.$.selection.clear()) : I.select(), b.moveToPosition(G, CKEDITOR.POSITION_BEFORE_START), G.remove()) : (b.setEndBefore(k), k.remove(), I.select()) + } else { + k = this.getNative(); + if (!k) return; + this.removeAllRanges(); + for (I = 0; I < a.length; I++) { + if (I < a.length - 1 && (A = a[I], G = a[I + 1], n = A.clone(), n.setStart(A.endContainer, A.endOffset), n.setEnd(G.startContainer, G.startOffset), !n.collapsed && (n.shrink(CKEDITOR.NODE_ELEMENT, !0), b = n.getCommonAncestor(), n = n.getEnclosedNode(), + b.isReadOnly() || n && n.isReadOnly()))) { + G.setStart(A.startContainer, A.startOffset); + a.splice(I--, 1); + continue + } + b = a[I]; + G = this.document.$.createRange(); + b.collapsed && CKEDITOR.env.webkit && r(b) && (n = e(this.root), b.insertNode(n), (A = n.getNext()) && !n.getPrevious() && A.type == CKEDITOR.NODE_ELEMENT && "br" == A.getName() ? (y(this.root), b.moveToPosition(A, CKEDITOR.POSITION_BEFORE_START)) : b.moveToPosition(n, CKEDITOR.POSITION_AFTER_END)); + G.setStart(b.startContainer.$, b.startOffset); + try { + G.setEnd(b.endContainer.$, b.endOffset) + } catch (x) { + if (0 <= + x.toString().indexOf("NS_ERROR_ILLEGAL_VALUE")) b.collapse(1), G.setEnd(b.endContainer.$, b.endOffset); else throw x; + } + k.addRange(G) + } + } + this.reset(); + this.root.fire("selectionchange") + } + } + }, fake: function (a, b) { + var c = this.root.editor; + void 0 === b && a.hasAttribute("aria-label") && (b = a.getAttribute("aria-label")); + this.reset(); + B(c, b); + var d = this._.cache, e = new CKEDITOR.dom.range(this.root); + e.setStartBefore(a); + e.setEndAfter(a); + d.ranges = new CKEDITOR.dom.rangeList(e); + d.selectedElement = d.startElement = a; + d.type = CKEDITOR.SELECTION_ELEMENT; + d.selectedText = d.nativeSel = null; + this.isFake = 1; + this.rev = J++; + c._.fakeSelection = this; + this.root.fire("selectionchange") + }, isHidden: function () { + var a = this.getCommonAncestor(); + a && a.type == CKEDITOR.NODE_TEXT && (a = a.getParent()); + return !(!a || !a.data("cke-hidden-sel")) + }, isInTable: function (a) { + return d(this.getRanges(), a) + }, isCollapsed: function () { + var a = this.getRanges(); + return 1 === a.length && a[0].collapsed + }, createBookmarks: function (a) { + a = this.getRanges().createBookmarks(a); + this.isFake && (a.isFake = 1); + return a + }, createBookmarks2: function (a) { + a = + this.getRanges().createBookmarks2(a); + this.isFake && (a.isFake = 1); + return a + }, selectBookmarks: function (a) { + for (var b = [], c, e = 0; e < a.length; e++) { + var f = new CKEDITOR.dom.range(this.root); + f.moveToBookmark(a[e]); + b.push(f) + } + a.isFake && (c = d(b) ? b[0]._getTableElement() : b[0].getEnclosedNode(), c && c.type == CKEDITOR.NODE_ELEMENT || (CKEDITOR.warn("selection-not-fake"), a.isFake = 0)); + a.isFake && !d(b) ? this.fake(c) : this.selectRanges(b); + return this + }, getCommonAncestor: function () { + var a = this.getRanges(); + return a.length ? a[0].startContainer.getCommonAncestor(a[a.length - + 1].endContainer) : null + }, scrollIntoView: function () { + this.type != CKEDITOR.SELECTION_NONE && this.getRanges()[0].scrollIntoView() + }, removeAllRanges: function () { + if (this.getType() != CKEDITOR.SELECTION_NONE) { + var a = this.getNative(); + try { + a && a[p ? "empty" : "removeAllRanges"]() + } catch (b) { + } + this.reset() + } + } + } + })(); + "use strict"; + CKEDITOR.STYLE_BLOCK = 1; + CKEDITOR.STYLE_INLINE = 2; + CKEDITOR.STYLE_OBJECT = 3; + (function () { + function a(a, b) { + for (var c, d; (a = a.getParent()) && !a.equals(b);) if (a.getAttribute("data-nostyle")) c = a; else if (!d) { + var e = a.getAttribute("contentEditable"); + "false" == e ? c = a : "true" == e && (d = 1) + } + return c + } + + function d(a, b, c, d) { + return (a.getPosition(b) | d) == d && (!c.childRule || c.childRule(a)) + } + + function b(c) { + var e = c.document; + if (c.collapsed) e = J(this, e), c.insertNode(e), c.moveToPosition(e, CKEDITOR.POSITION_BEFORE_END); else { + var g = this.element, h = this._.definition, k, l = h.ignoreReadonly, m = l || h.includeReadonly; + null == + m && (m = c.root.getCustomData("cke_includeReadonly")); + var p = CKEDITOR.dtd[g]; + p || (k = !0, p = CKEDITOR.dtd.span); + c.enlarge(CKEDITOR.ENLARGE_INLINE, 1); + c.trim(); + var r = c.createBookmark(), t = r.startNode, x = r.endNode, q = t, u; + if (!l) { + var w = c.getCommonAncestor(), l = a(t, w), w = a(x, w); + l && (q = l.getNextSourceNode(!0)); + w && (x = w) + } + for (q.getPosition(x) == CKEDITOR.POSITION_FOLLOWING && (q = 0); q;) { + l = !1; + if (q.equals(x)) q = null, l = !0; else { + var y = q.type == CKEDITOR.NODE_ELEMENT ? q.getName() : null, + w = y && "false" == q.getAttribute("contentEditable"), B = y && + q.getAttribute("data-nostyle"); + if (y && q.data("cke-bookmark")) { + q = q.getNextSourceNode(!0); + continue + } + if (w && m && CKEDITOR.dtd.$block[y]) for (var E = q, C = f(E), F = void 0, H = C.length, K = 0, E = H && new CKEDITOR.dom.range(E.getDocument()); K < H; ++K) { + var F = C[K], L = CKEDITOR.filter.instances[F.data("cke-filter")]; + if (L ? L.check(this) : 1) E.selectNodeContents(F), b.call(this, E) + } + C = y ? !p[y] || B ? 0 : w && !m ? 0 : d(q, x, h, P) : 1; + if (C) if (F = q.getParent(), C = h, H = g, K = k, !F || !(F.getDtd() || CKEDITOR.dtd.span)[H] && !K || C.parentRule && !C.parentRule(F)) l = !0; else { + if (u || + y && CKEDITOR.dtd.$removeEmpty[y] && (q.getPosition(x) | P) != P || (u = c.clone(), u.setStartBefore(q)), y = q.type, y == CKEDITOR.NODE_TEXT || w || y == CKEDITOR.NODE_ELEMENT && !q.getChildCount()) { + for (var y = q, M; (l = !y.getNext(z)) && (M = y.getParent(), p[M.getName()]) && d(M, t, h, O);) y = M; + u.setEndAfter(y) + } + } else l = !0; + q = q.getNextSourceNode(B || w) + } + if (l && u && !u.collapsed) { + for (var l = J(this, e), w = l.hasAttributes(), B = u.getCommonAncestor(), y = {}, C = {}, F = {}, H = {}, U, R, aa; l && B;) { + if (B.getName() == g) { + for (U in h.attributes) !H[U] && (aa = B.getAttribute(R)) && + (l.getAttribute(U) == aa ? C[U] = 1 : H[U] = 1); + for (R in h.styles) !F[R] && (aa = B.getStyle(R)) && (l.getStyle(R) == aa ? y[R] = 1 : F[R] = 1) + } + B = B.getParent() + } + for (U in C) l.removeAttribute(U); + for (R in y) l.removeStyle(R); + w && !l.hasAttributes() && (l = null); + l ? (u.extractContents().appendTo(l), u.insertNode(l), D.call(this, l), l.mergeSiblings(), CKEDITOR.env.ie || l.$.normalize()) : (l = new CKEDITOR.dom.element("span"), u.extractContents().appendTo(l), u.insertNode(l), D.call(this, l), l.remove(!0)); + u = null + } + } + c.moveToBookmark(r); + c.shrink(CKEDITOR.SHRINK_TEXT); + c.shrink(CKEDITOR.NODE_ELEMENT, !0) + } + } + + function c(a) { + function b() { + for (var a = new CKEDITOR.dom.elementPath(d.getParent()), c = new CKEDITOR.dom.elementPath(p.getParent()), e = null, f = null, g = 0; g < a.elements.length; g++) { + var h = a.elements[g]; + if (h == a.block || h == a.blockLimit) break; + r.checkElementRemovable(h, !0) && (e = h) + } + for (g = 0; g < c.elements.length; g++) { + h = c.elements[g]; + if (h == c.block || h == c.blockLimit) break; + r.checkElementRemovable(h, !0) && (f = h) + } + f && p.breakParent(f); + e && d.breakParent(e) + } + + a.enlarge(CKEDITOR.ENLARGE_INLINE, 1); + var c = + a.createBookmark(), d = c.startNode, e = this._.definition.alwaysRemoveElement; + if (a.collapsed) { + for (var f = new CKEDITOR.dom.elementPath(d.getParent(), a.root), g, h = 0, k; h < f.elements.length && (k = f.elements[h]) && k != f.block && k != f.blockLimit; h++) if (this.checkElementRemovable(k)) { + var m; + !e && a.collapsed && (a.checkBoundaryOfElement(k, CKEDITOR.END) || (m = a.checkBoundaryOfElement(k, CKEDITOR.START))) ? (g = k, g.match = m ? "start" : "end") : (k.mergeSiblings(), k.is(this.element) ? B.call(this, k) : w(k, l(this)[k.getName()])) + } + if (g) { + e = d; + for (h = + 0; ; h++) { + k = f.elements[h]; + if (k.equals(g)) break; else if (k.match) continue; else k = k.clone(); + k.append(e); + e = k + } + e["start" == g.match ? "insertBefore" : "insertAfter"](g) + } + } else { + var p = c.endNode, r = this; + b(); + for (f = d; !f.equals(p);) g = f.getNextSourceNode(), f.type == CKEDITOR.NODE_ELEMENT && this.checkElementRemovable(f) && (f.getName() == this.element ? B.call(this, f) : w(f, l(this)[f.getName()]), g.type == CKEDITOR.NODE_ELEMENT && g.contains(d) && (b(), g = d.getNext())), f = g + } + a.moveToBookmark(c); + a.shrink(CKEDITOR.NODE_ELEMENT, !0) + } + + function f(a) { + var b = + []; + a.forEach(function (a) { + if ("true" == a.getAttribute("contenteditable")) return b.push(a), !1 + }, CKEDITOR.NODE_ELEMENT, !0); + return b + } + + function h(a) { + var b = a.getEnclosedNode() || a.getCommonAncestor(!1, !0); + (a = (new CKEDITOR.dom.elementPath(b, a.root)).contains(this.element, 1)) && !a.isReadOnly() && u(a, this) + } + + function k(a) { + var b = a.getCommonAncestor(!0, !0); + if (a = (new CKEDITOR.dom.elementPath(b, a.root)).contains(this.element, 1)) { + var b = this._.definition, c = b.attributes; + if (c) for (var d in c) a.removeAttribute(d, c[d]); + if (b.styles) for (var e in b.styles) b.styles.hasOwnProperty(e) && + a.removeStyle(e) + } + } + + function g(a) { + var b = a.createBookmark(!0), c = a.createIterator(); + c.enforceRealBlocks = !0; + this._.enterMode && (c.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR); + for (var d, e = a.document, f; d = c.getNextParagraph();) !d.isReadOnly() && (c.activeFilter ? c.activeFilter.check(this) : 1) && (f = J(this, e, d), r(d, f)); + a.moveToBookmark(b) + } + + function m(a) { + var b = a.createBookmark(1), c = a.createIterator(); + c.enforceRealBlocks = !0; + c.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR; + for (var d, e; d = c.getNextParagraph();) this.checkElementRemovable(d) && + (d.is("pre") ? ((e = this._.enterMode == CKEDITOR.ENTER_BR ? null : a.document.createElement(this._.enterMode == CKEDITOR.ENTER_P ? "p" : "div")) && d.copyAttributes(e), r(d, e)) : B.call(this, d)); + a.moveToBookmark(b) + } + + function r(a, b) { + var c = !b; + c && (b = a.getDocument().createElement("div"), a.copyAttributes(b)); + var d = b && b.is("pre"), f = a.is("pre"), g = !d && f; + if (d && !f) { + f = b; + (g = a.getBogus()) && g.remove(); + g = a.getHtml(); + g = y(g, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, ""); + g = g.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi, "$1"); + g = g.replace(/([ \t\n\r]+| )/g, + " "); + g = g.replace(/]*>/gi, "\n"); + if (CKEDITOR.env.ie) { + var h = a.getDocument().createElement("div"); + h.append(f); + f.$.outerHTML = "\x3cpre\x3e" + g + "\x3c/pre\x3e"; + f.copyAttributes(h.getFirst()); + f = h.getFirst().remove() + } else f.setHtml(g); + b = f + } else g ? b = x(c ? [a.getHtml()] : e(a), b) : a.moveChildren(b); + b.replace(a); + if (d) { + var c = b, k; + (k = c.getPrevious(H)) && k.type == CKEDITOR.NODE_ELEMENT && k.is("pre") && (d = y(k.getHtml(), /\n$/, "") + "\n\n" + y(c.getHtml(), /^\n/, ""), CKEDITOR.env.ie ? c.$.outerHTML = "\x3cpre\x3e" + d + "\x3c/pre\x3e" : + c.setHtml(d), k.remove()) + } else c && p(b) + } + + function e(a) { + var b = []; + y(a.getOuterHtml(), /(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi, function (a, b, c) { + return b + "\x3c/pre\x3e" + c + "\x3cpre\x3e" + }).replace(/([\s\S]*?)<\/pre>/gi, function (a, c) { + b.push(c) + }); + return b + } + + function y(a, b, c) { + var d = "", e = ""; + a = a.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi, function (a, b, c) { + b && (d = b); + c && (e = c); + return "" + }); + return d + a.replace(b, c) + e + } + + function x(a, b) { + var c; + 1 < a.length && (c = new CKEDITOR.dom.documentFragment(b.getDocument())); + for (var d = 0; d < a.length; d++) { + var e = a[d], e = e.replace(/(\r\n|\r)/g, "\n"), e = y(e, /^[ \t]*\n/, ""), e = y(e, /\n$/, ""), + e = y(e, /^[ \t]+|[ \t]+$/g, function (a, b) { + return 1 == a.length ? "\x26nbsp;" : b ? " " + CKEDITOR.tools.repeat("\x26nbsp;", a.length - 1) : CKEDITOR.tools.repeat("\x26nbsp;", a.length - 1) + " " + }), e = e.replace(/\n/g, "\x3cbr\x3e"), e = e.replace(/[ \t]{2,}/g, function (a) { + return CKEDITOR.tools.repeat("\x26nbsp;", a.length - 1) + " " + }); + if (c) { + var f = b.clone(); + f.setHtml(e); + c.append(f) + } else b.setHtml(e) + } + return c || b + } + + function B(a, b) { + var c = this._.definition, d = c.attributes, c = c.styles, e = l(this)[a.getName()], + f = CKEDITOR.tools.isEmpty(d) && CKEDITOR.tools.isEmpty(c), g; + for (g in d) if ("class" != g && !this._.definition.fullMatch || a.getAttribute(g) == q(g, d[g])) b && "data-" == g.slice(0, 5) || (f = a.hasAttribute(g), a.removeAttribute(g)); + for (var h in c) this._.definition.fullMatch && a.getStyle(h) != q(h, c[h], !0) || (f = f || !!a.getStyle(h), a.removeStyle(h)); + w(a, e, E[a.getName()]); + f && (this._.definition.alwaysRemoveElement ? + p(a, 1) : !CKEDITOR.dtd.$block[a.getName()] || this._.enterMode == CKEDITOR.ENTER_BR && !a.hasAttributes() ? p(a) : a.renameNode(this._.enterMode == CKEDITOR.ENTER_P ? "p" : "div")) + } + + function D(a) { + for (var b = l(this), c = a.getElementsByTag(this.element), d, e = c.count(); 0 <= --e;) d = c.getItem(e), d.isReadOnly() || B.call(this, d, !0); + for (var f in b) if (f != this.element) for (c = a.getElementsByTag(f), e = c.count() - 1; 0 <= e; e--) d = c.getItem(e), d.isReadOnly() || w(d, b[f]) + } + + function w(a, b, c) { + if (b = b && b.attributes) for (var d = 0; d < b.length; d++) { + var e = b[d][0], + f; + if (f = a.getAttribute(e)) { + var g = b[d][1]; + (null === g || g.test && g.test(f) || "string" == typeof g && f == g) && a.removeAttribute(e) + } + } + c || p(a) + } + + function p(a, b) { + if (!a.hasAttributes() || b) if (CKEDITOR.dtd.$block[a.getName()]) { + var c = a.getPrevious(H), d = a.getNext(H); + !c || c.type != CKEDITOR.NODE_TEXT && c.isBlockBoundary({br: 1}) || a.append("br", 1); + !d || d.type != CKEDITOR.NODE_TEXT && d.isBlockBoundary({br: 1}) || a.append("br"); + a.remove(!0) + } else c = a.getFirst(), d = a.getLast(), a.remove(!0), c && (c.type == CKEDITOR.NODE_ELEMENT && c.mergeSiblings(), + d && !c.equals(d) && d.type == CKEDITOR.NODE_ELEMENT && d.mergeSiblings()) + } + + function J(a, b, c) { + var d; + d = a.element; + "*" == d && (d = "span"); + d = new CKEDITOR.dom.element(d, b); + c && c.copyAttributes(d); + d = u(d, a); + b.getCustomData("doc_processing_style") && d.hasAttribute("id") ? d.removeAttribute("id") : b.setCustomData("doc_processing_style", 1); + return d + } + + function u(a, b) { + var c = b._.definition, d = c.attributes, c = CKEDITOR.style.getStyleText(c); + if (d) for (var e in d) a.setAttribute(e, d[e]); + c && a.setAttribute("style", c); + return a + } + + function K(a, + b) { + for (var c in a) a[c] = a[c].replace(C, function (a, c) { + return b[c] + }) + } + + function l(a) { + if (a._.overrides) return a._.overrides; + var b = a._.overrides = {}, c = a._.definition.overrides; + if (c) { + CKEDITOR.tools.isArray(c) || (c = [c]); + for (var d = 0; d < c.length; d++) { + var e = c[d], f, g; + "string" == typeof e ? f = e.toLowerCase() : (f = e.element ? e.element.toLowerCase() : a.element, g = e.attributes); + e = b[f] || (b[f] = {}); + if (g) { + var e = e.attributes = e.attributes || [], h; + for (h in g) e.push([h.toLowerCase(), g[h]]) + } + } + } + return b + } + + function q(a, b, c) { + var d = new CKEDITOR.dom.element("span"); + d[c ? "setStyle" : "setAttribute"](a, b); + return d[c ? "getStyle" : "getAttribute"](a) + } + + function F(a, b) { + function c(a, b) { + return "font-family" == b.toLowerCase() ? a.replace(/["']/g, "") : a + } + + "string" == typeof a && (a = CKEDITOR.tools.parseCssText(a)); + "string" == typeof b && (b = CKEDITOR.tools.parseCssText(b, !0)); + for (var d in a) if (!(d in b) || c(b[d], d) != c(a[d], d) && "inherit" != a[d] && "inherit" != b[d]) return !1; + return !0 + } + + function L(a, b, c) { + var d = a.document, e = a.getRanges(); + b = b ? this.removeFromRange : this.applyToRange; + var f, g; + if (a.isFake && a.isInTable()) for (f = + [], g = 0; g < e.length; g++) f.push(e[g].clone()); + for (var h = e.createIterator(); g = h.getNextRange();) b.call(this, g, c); + a.selectRanges(f || e); + d.removeCustomData("doc_processing_style") + } + + var E = { + address: 1, + div: 1, + h1: 1, + h2: 1, + h3: 1, + h4: 1, + h5: 1, + h6: 1, + p: 1, + pre: 1, + section: 1, + header: 1, + footer: 1, + nav: 1, + article: 1, + aside: 1, + figure: 1, + dialog: 1, + hgroup: 1, + time: 1, + meter: 1, + menu: 1, + command: 1, + keygen: 1, + output: 1, + progress: 1, + details: 1, + datagrid: 1, + datalist: 1 + }, M = { + a: 1, + blockquote: 1, + embed: 1, + hr: 1, + img: 1, + li: 1, + object: 1, + ol: 1, + table: 1, + td: 1, + tr: 1, + th: 1, + ul: 1, + dl: 1, + dt: 1, + dd: 1, + form: 1, + audio: 1, + video: 1 + }, t = /\s*(?:;\s*|$)/, C = /#\((.+?)\)/g, z = CKEDITOR.dom.walker.bookmark(0, 1), + H = CKEDITOR.dom.walker.whitespaces(1); + CKEDITOR.style = function (a, b) { + if ("string" == typeof a.type) return new CKEDITOR.style.customHandlers[a.type](a); + var c = a.attributes; + c && c.style && (a.styles = CKEDITOR.tools.extend({}, a.styles, CKEDITOR.tools.parseCssText(c.style)), delete c.style); + b && (a = CKEDITOR.tools.clone(a), K(a.attributes, b), K(a.styles, b)); + c = this.element = a.element ? "string" == typeof a.element ? a.element.toLowerCase() : + a.element : "*"; + this.type = a.type || (E[c] ? CKEDITOR.STYLE_BLOCK : M[c] ? CKEDITOR.STYLE_OBJECT : CKEDITOR.STYLE_INLINE); + "object" == typeof this.element && (this.type = CKEDITOR.STYLE_OBJECT); + this._ = {definition: a} + }; + CKEDITOR.style.prototype = { + apply: function (a) { + if (a instanceof CKEDITOR.dom.document) return L.call(this, a.getSelection()); + if (this.checkApplicable(a.elementPath(), a)) { + var b = this._.enterMode; + b || (this._.enterMode = a.activeEnterMode); + L.call(this, a.getSelection(), 0, a); + this._.enterMode = b + } + }, remove: function (a) { + if (a instanceof + CKEDITOR.dom.document) return L.call(this, a.getSelection(), 1); + if (this.checkApplicable(a.elementPath(), a)) { + var b = this._.enterMode; + b || (this._.enterMode = a.activeEnterMode); + L.call(this, a.getSelection(), 1, a); + this._.enterMode = b + } + }, applyToRange: function (a) { + this.applyToRange = this.type == CKEDITOR.STYLE_INLINE ? b : this.type == CKEDITOR.STYLE_BLOCK ? g : this.type == CKEDITOR.STYLE_OBJECT ? h : null; + return this.applyToRange(a) + }, removeFromRange: function (a) { + this.removeFromRange = this.type == CKEDITOR.STYLE_INLINE ? c : this.type == CKEDITOR.STYLE_BLOCK ? + m : this.type == CKEDITOR.STYLE_OBJECT ? k : null; + return this.removeFromRange(a) + }, applyToObject: function (a) { + u(a, this) + }, checkActive: function (a, b) { + switch (this.type) { + case CKEDITOR.STYLE_BLOCK: + return this.checkElementRemovable(a.block || a.blockLimit, !0, b); + case CKEDITOR.STYLE_OBJECT: + case CKEDITOR.STYLE_INLINE: + for (var c = a.elements, d = 0, e; d < c.length; d++) if (e = c[d], this.type != CKEDITOR.STYLE_INLINE || e != a.block && e != a.blockLimit) { + if (this.type == CKEDITOR.STYLE_OBJECT) { + var f = e.getName(); + if (!("string" == typeof this.element ? + f == this.element : f in this.element)) continue + } + if (this.checkElementRemovable(e, !0, b)) return !0 + } + } + return !1 + }, checkApplicable: function (a, b, c) { + b && b instanceof CKEDITOR.filter && (c = b); + if (c && !c.check(this)) return !1; + switch (this.type) { + case CKEDITOR.STYLE_OBJECT: + return !!a.contains(this.element); + case CKEDITOR.STYLE_BLOCK: + return !!a.blockLimit.getDtd()[this.element] + } + return !0 + }, checkElementMatch: function (a, b) { + var c = this._.definition; + if (!a || !c.ignoreReadonly && a.isReadOnly()) return !1; + var d = a.getName(); + if ("string" == typeof this.element ? + d == this.element : d in this.element) { + if (!b && !a.hasAttributes()) return !0; + if (d = c._AC) c = d; else { + var d = {}, e = 0, f = c.attributes; + if (f) for (var g in f) e++, d[g] = f[g]; + if (g = CKEDITOR.style.getStyleText(c)) d.style || e++, d.style = g; + d._length = e; + c = c._AC = d + } + if (c._length) { + for (var h in c) if ("_length" != h) if (d = a.getAttribute(h) || "", "style" == h ? F(c[h], d) : c[h] == d) { + if (!b) return !0 + } else if (b) return !1; + if (b) return !0 + } else return !0 + } + return !1 + }, checkElementRemovable: function (a, b, c) { + if (this.checkElementMatch(a, b, c)) return !0; + if (b = l(this)[a.getName()]) { + var d; + if (!(b = b.attributes)) return !0; + for (c = 0; c < b.length; c++) if (d = b[c][0], d = a.getAttribute(d)) { + var e = b[c][1]; + if (null === e) return !0; + if ("string" == typeof e) { + if (d == e) return !0 + } else if (e.test(d)) return !0 + } + } + return !1 + }, buildPreview: function (a) { + var b = this._.definition, c = [], d = b.element; + "bdo" == d && (d = "span"); + var c = ["\x3c", d], e = b.attributes; + if (e) for (var f in e) c.push(" ", f, '\x3d"', e[f], '"'); + (e = CKEDITOR.style.getStyleText(b)) && c.push(' style\x3d"', e, '"'); + c.push("\x3e", a || b.name, "\x3c/", d, "\x3e"); + return c.join("") + }, getDefinition: function () { + return this._.definition + } + }; + CKEDITOR.style.getStyleText = function (a) { + var b = a._ST; + if (b) return b; + var b = a.styles, c = a.attributes && a.attributes.style || "", d = ""; + c.length && (c = c.replace(t, ";")); + for (var e in b) { + var f = b[e], g = (e + ":" + f).replace(t, ";"); + "inherit" == f ? d += g : c += g + } + c.length && (c = CKEDITOR.tools.normalizeCssText(c, !0)); + return a._ST = c + d + }; + CKEDITOR.style.customHandlers = {}; + CKEDITOR.style.addCustomHandler = function (a) { + var b = function (a) { + this._ = {definition: a}; + this.setup && this.setup(a) + }; + b.prototype = CKEDITOR.tools.extend(CKEDITOR.tools.prototypedCopy(CKEDITOR.style.prototype), + {assignedTo: CKEDITOR.STYLE_OBJECT}, a, !0); + return this.customHandlers[a.type] = b + }; + var P = CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED, + O = CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED + })(); + CKEDITOR.styleCommand = function (a, d) { + this.requiredContent = this.allowedContent = this.style = a; + CKEDITOR.tools.extend(this, d, !0) + }; + CKEDITOR.styleCommand.prototype.exec = function (a) { + a.focus(); + this.state == CKEDITOR.TRISTATE_OFF ? a.applyStyle(this.style) : this.state == CKEDITOR.TRISTATE_ON && a.removeStyle(this.style) + }; + CKEDITOR.stylesSet = new CKEDITOR.resourceManager("", "stylesSet"); + CKEDITOR.addStylesSet = CKEDITOR.tools.bind(CKEDITOR.stylesSet.add, CKEDITOR.stylesSet); + CKEDITOR.loadStylesSet = function (a, d, b) { + CKEDITOR.stylesSet.addExternal(a, d, ""); + CKEDITOR.stylesSet.load(a, b) + }; + CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { + attachStyleStateChange: function (a, d) { + var b = this._.styleStateChangeCallbacks; + b || (b = this._.styleStateChangeCallbacks = [], this.on("selectionChange", function (a) { + for (var d = 0; d < b.length; d++) { + var h = b[d], + k = h.style.checkActive(a.data.path, this) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF; + h.fn.call(this, k) + } + })); + b.push({style: a, fn: d}) + }, applyStyle: function (a) { + a.apply(this) + }, removeStyle: function (a) { + a.remove(this) + }, getStylesSet: function (a) { + if (this._.stylesDefinitions) a(this._.stylesDefinitions); + else { + var d = this, b = d.config.stylesCombo_stylesSet || d.config.stylesSet; + if (!1 === b) a(null); else if (b instanceof Array) d._.stylesDefinitions = b, a(b); else { + b || (b = "default"); + var b = b.split(":"), c = b[0]; + CKEDITOR.stylesSet.addExternal(c, b[1] ? b.slice(1).join(":") : CKEDITOR.getUrl("styles.js"), ""); + CKEDITOR.stylesSet.load(c, function (b) { + d._.stylesDefinitions = b[c]; + a(d._.stylesDefinitions) + }) + } + } + } + }); + CKEDITOR.dom.comment = function (a, d) { + "string" == typeof a && (a = (d ? d.$ : document).createComment(a)); + CKEDITOR.dom.domObject.call(this, a) + }; + CKEDITOR.dom.comment.prototype = new CKEDITOR.dom.node; + CKEDITOR.tools.extend(CKEDITOR.dom.comment.prototype, { + type: CKEDITOR.NODE_COMMENT, getOuterHtml: function () { + return "\x3c!--" + this.$.nodeValue + "--\x3e" + } + }); + "use strict"; + (function () { + var a = {}, d = {}, b; + for (b in CKEDITOR.dtd.$blockLimit) b in CKEDITOR.dtd.$list || (a[b] = 1); + for (b in CKEDITOR.dtd.$block) b in CKEDITOR.dtd.$blockLimit || b in CKEDITOR.dtd.$empty || (d[b] = 1); + CKEDITOR.dom.elementPath = function (b, f) { + var h = null, k = null, g = [], m = b, r; + f = f || b.getDocument().getBody(); + m || (m = f); + do if (m.type == CKEDITOR.NODE_ELEMENT) { + g.push(m); + if (!this.lastElement && (this.lastElement = m, m.is(CKEDITOR.dtd.$object) || "false" == m.getAttribute("contenteditable"))) continue; + if (m.equals(f)) break; + if (!k && (r = m.getName(), + "true" == m.getAttribute("contenteditable") ? k = m : !h && d[r] && (h = m), a[r])) { + if (r = !h && "div" == r) { + a:{ + r = m.getChildren(); + for (var e = 0, y = r.count(); e < y; e++) { + var x = r.getItem(e); + if (x.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[x.getName()]) { + r = !0; + break a + } + } + r = !1 + } + r = !r + } + r ? h = m : k = m + } + } while (m = m.getParent()); + k || (k = f); + this.block = h; + this.blockLimit = k; + this.root = f; + this.elements = g + } + })(); + CKEDITOR.dom.elementPath.prototype = { + compare: function (a) { + var d = this.elements; + a = a && a.elements; + if (!a || d.length != a.length) return !1; + for (var b = 0; b < d.length; b++) if (!d[b].equals(a[b])) return !1; + return !0 + }, contains: function (a, d, b) { + var c = 0, f; + "string" == typeof a && (f = function (b) { + return b.getName() == a + }); + a instanceof CKEDITOR.dom.element ? f = function (b) { + return b.equals(a) + } : CKEDITOR.tools.isArray(a) ? f = function (b) { + return -1 < CKEDITOR.tools.indexOf(a, b.getName()) + } : "function" == typeof a ? f = a : "object" == typeof a && (f = function (b) { + return b.getName() in + a + }); + var h = this.elements, k = h.length; + d && (b ? c += 1 : --k); + b && (h = Array.prototype.slice.call(h, 0), h.reverse()); + for (; c < k; c++) if (f(h[c])) return h[c]; + return null + }, isContextFor: function (a) { + var d; + return a in CKEDITOR.dtd.$block ? (d = this.contains(CKEDITOR.dtd.$intermediate) || this.root.equals(this.block) && this.block || this.blockLimit, !!d.getDtd()[a]) : !0 + }, direction: function () { + return (this.block || this.blockLimit || this.root).getDirection(1) + } + }; + CKEDITOR.dom.text = function (a, d) { + "string" == typeof a && (a = (d ? d.$ : document).createTextNode(a)); + this.$ = a + }; + CKEDITOR.dom.text.prototype = new CKEDITOR.dom.node; + CKEDITOR.tools.extend(CKEDITOR.dom.text.prototype, { + type: CKEDITOR.NODE_TEXT, getLength: function () { + return this.$.nodeValue.length + }, getText: function () { + return this.$.nodeValue + }, setText: function (a) { + this.$.nodeValue = a + }, split: function (a) { + var d = this.$.parentNode, b = d.childNodes.length, c = this.getLength(), f = this.getDocument(), + h = new CKEDITOR.dom.text(this.$.splitText(a), f); + d.childNodes.length == b && (a >= c ? (h = f.createText(""), h.insertAfter(this)) : (a = f.createText(""), a.insertAfter(h), a.remove())); + return h + }, substring: function (a, + d) { + return "number" != typeof d ? this.$.nodeValue.substr(a) : this.$.nodeValue.substring(a, d) + } + }); + (function () { + function a(a, c, d) { + var h = a.serializable, k = c[d ? "endContainer" : "startContainer"], g = d ? "endOffset" : "startOffset", + m = h ? c.document.getById(a.startNode) : a.startNode; + a = h ? c.document.getById(a.endNode) : a.endNode; + k.equals(m.getPrevious()) ? (c.startOffset = c.startOffset - k.getLength() - a.getPrevious().getLength(), k = a.getNext()) : k.equals(a.getPrevious()) && (c.startOffset -= k.getLength(), k = a.getNext()); + k.equals(m.getParent()) && c[g]++; + k.equals(a.getParent()) && c[g]++; + c[d ? "endContainer" : "startContainer"] = k; + return c + } + + CKEDITOR.dom.rangeList = function (a) { + if (a instanceof CKEDITOR.dom.rangeList) return a; + a ? a instanceof CKEDITOR.dom.range && (a = [a]) : a = []; + return CKEDITOR.tools.extend(a, d) + }; + var d = { + createIterator: function () { + var a = this, c = CKEDITOR.dom.walker.bookmark(), d = [], h; + return { + getNextRange: function (k) { + h = void 0 === h ? 0 : h + 1; + var g = a[h]; + if (g && 1 < a.length) { + if (!h) for (var m = a.length - 1; 0 <= m; m--) d.unshift(a[m].createBookmark(!0)); + if (k) for (var r = 0; a[h + r + 1];) { + var e = g.document; + k = 0; + m = e.getById(d[r].endNode); + for (e = e.getById(d[r + 1].startNode); ;) { + m = + m.getNextSourceNode(!1); + if (e.equals(m)) k = 1; else if (c(m) || m.type == CKEDITOR.NODE_ELEMENT && m.isBlockBoundary()) continue; + break + } + if (!k) break; + r++ + } + for (g.moveToBookmark(d.shift()); r--;) m = a[++h], m.moveToBookmark(d.shift()), g.setEnd(m.endContainer, m.endOffset) + } + return g + } + } + }, createBookmarks: function (b) { + for (var c = [], d, h = 0; h < this.length; h++) { + c.push(d = this[h].createBookmark(b, !0)); + for (var k = h + 1; k < this.length; k++) this[k] = a(d, this[k]), this[k] = a(d, this[k], !0) + } + return c + }, createBookmarks2: function (a) { + for (var c = [], d = 0; d < + this.length; d++) c.push(this[d].createBookmark2(a)); + return c + }, moveToBookmarks: function (a) { + for (var c = 0; c < this.length; c++) this[c].moveToBookmark(a[c]) + } + } + })(); + (function () { + function a() { + return CKEDITOR.getUrl(CKEDITOR.skinName.split(",")[1] || "skins/" + CKEDITOR.skinName.split(",")[0] + "/") + } + + function d(b) { + var c = CKEDITOR.skin["ua_" + b], d = CKEDITOR.env; + if (c) for (var c = c.split(",").sort(function (a, b) { + return a > b ? -1 : 1 + }), f = 0, g; f < c.length; f++) if (g = c[f], d.ie && (g.replace(/^ie/, "") == d.version || d.quirks && "iequirks" == g) && (g = "ie"), d[g]) { + b += "_" + c[f]; + break + } + return CKEDITOR.getUrl(a() + b + ".css") + } + + function b(a, b) { + h[a] || (CKEDITOR.document.appendStyleSheet(d(a)), h[a] = 1); + b && b() + } + + function c(a) { + var b = + a.getById(k); + b || (b = a.getHead().append("style"), b.setAttribute("id", k), b.setAttribute("type", "text/css")); + return b + } + + function f(a, b, c) { + var d, f, g; + if (CKEDITOR.env.webkit) for (b = b.split("}").slice(0, -1), f = 0; f < b.length; f++) b[f] = b[f].split("{"); + for (var h = 0; h < a.length; h++) if (CKEDITOR.env.webkit) for (f = 0; f < b.length; f++) { + g = b[f][1]; + for (d = 0; d < c.length; d++) g = g.replace(c[d][0], c[d][1]); + a[h].$.sheet.addRule(b[f][0], g) + } else { + g = b; + for (d = 0; d < c.length; d++) g = g.replace(c[d][0], c[d][1]); + CKEDITOR.env.ie && 11 > CKEDITOR.env.version ? + a[h].$.styleSheet.cssText += g : a[h].$.innerHTML += g + } + } + + var h = {}; + CKEDITOR.skin = { + path: a, loadPart: function (c, d) { + CKEDITOR.skin.name != CKEDITOR.skinName.split(",")[0] ? CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(a() + "skin.js"), function () { + b(c, d) + }) : b(c, d) + }, getPath: function (a) { + return CKEDITOR.getUrl(d(a)) + }, icons: {}, addIcon: function (a, b, c, d) { + a = a.toLowerCase(); + this.icons[a] || (this.icons[a] = {path: b, offset: c || 0, bgsize: d || "16px"}) + }, getIconStyle: function (a, b, c, d, f) { + var g; + a && (a = a.toLowerCase(), b && (g = this.icons[a + "-rtl"]), + g || (g = this.icons[a])); + a = c || g && g.path || ""; + d = d || g && g.offset; + f = f || g && g.bgsize || "16px"; + a && (a = a.replace(/'/g, "\\'")); + return a && "background-image:url('" + CKEDITOR.getUrl(a) + "');background-position:0 " + d + "px;background-size:" + f + ";" + } + }; + CKEDITOR.tools.extend(CKEDITOR.editor.prototype, { + getUiColor: function () { + return this.uiColor + }, setUiColor: function (a) { + var b = c(CKEDITOR.document); + return (this.setUiColor = function (a) { + this.uiColor = a; + var c = CKEDITOR.skin.chameleon, d = "", h = ""; + "function" == typeof c && (d = c(this, "editor"), h = + c(this, "panel")); + a = [[m, a]]; + f([b], d, a); + f(g, h, a) + }).call(this, a) + } + }); + var k = "cke_ui_color", g = [], m = /\$color/g; + CKEDITOR.on("instanceLoaded", function (a) { + if (!CKEDITOR.env.ie || !CKEDITOR.env.quirks) { + var b = a.editor; + a = function (a) { + a = (a.data[0] || a.data).element.getElementsByTag("iframe").getItem(0).getFrameDocument(); + if (!a.getById("cke_ui_color")) { + a = c(a); + g.push(a); + var d = b.getUiColor(); + d && f([a], CKEDITOR.skin.chameleon(b, "panel"), [[m, d]]) + } + }; + b.on("panelShow", a); + b.on("menuShow", a); + b.config.uiColor && b.setUiColor(b.config.uiColor) + } + }) + })(); + (function () { + if (CKEDITOR.env.webkit) CKEDITOR.env.hc = !1; else { + var a = CKEDITOR.dom.element.createFromHtml('\x3cdiv style\x3d"width:0;height:0;position:absolute;left:-10000px;border:1px solid;border-color:red blue"\x3e\x3c/div\x3e', CKEDITOR.document); + a.appendTo(CKEDITOR.document.getHead()); + try { + var d = a.getComputedStyle("border-top-color"), b = a.getComputedStyle("border-right-color"); + CKEDITOR.env.hc = !(!d || d != b) + } catch (c) { + CKEDITOR.env.hc = !1 + } + a.remove() + } + CKEDITOR.env.hc && (CKEDITOR.env.cssClass += " cke_hc"); + CKEDITOR.document.appendStyleText(".cke{visibility:hidden;}"); + CKEDITOR.status = "loaded"; + CKEDITOR.fireOnce("loaded"); + if (a = CKEDITOR._.pending) for (delete CKEDITOR._.pending, d = 0; d < a.length; d++) CKEDITOR.editor.prototype.constructor.apply(a[d][0], a[d][1]), CKEDITOR.add(a[d][0]) + })();/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ -CKEDITOR.skin.name="moono-lisa";CKEDITOR.skin.ua_editor="ie,iequirks,ie8,gecko";CKEDITOR.skin.ua_dialog="ie,iequirks,ie8"; -CKEDITOR.skin.chameleon=function(){var b=function(){return function(b,d){for(var a=b.match(/[^#]./g),e=0;3>e;e++){var f=e,c;c=parseInt(a[e],16);c=("0"+(0>d?0|c*(1+d):0|c+(255-c)*d).toString(16)).slice(-2);a[f]=c}return"#"+a.join("")}}(),f={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(g,d){var a=b(g.uiColor,.4),a={id:"."+g.id,defaultBorder:b(a,-.2),toolbarElementsBorder:b(a,-.25),defaultBackground:a,lightBackground:b(a,.8),darkBackground:b(a,-.15),ckeButtonOn:b(a,.4),ckeResizer:b(a,-.4),ckeColorauto:b(a,.8),dialogBody:b(a,.7),dialogTab:b(a,.65),dialogTabSelected:"#FFF",dialogTabSelectedBorder:"#FFF",elementsPathColor:b(a,-.6),menubuttonHover:b(a,.1),menubuttonIcon:b(a,.5),menubuttonIconHover:b(a,.3)};return f[d].output(a).replace(/\[/g,"{").replace(/\]/g,"}")}}();CKEDITOR.plugins.add("dialogui",{onLoad:function(){var h=function(b){this._||(this._={});this._["default"]=this._.initValue=b["default"]||"";this._.required=b.required||!1;for(var a=[this._],d=1;darguments.length)){var c=h.call(this,a);c.labelId=CKEDITOR.tools.getNextId()+ -"_label";this._.children=[];var e={role:a.role||"presentation"};a.includeLabel&&(e["aria-labelledby"]=c.labelId);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"div",null,e,function(){var e=[],g=a.required?" cke_required":"";"horizontal"!=a.labelLayout?e.push('\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" ',' id\x3d"'+c.labelId+'"',c.inputId?' for\x3d"'+c.inputId+'"':"",(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",a.label,"\x3c/label\x3e",'\x3cdiv class\x3d"cke_dialog_ui_labeled_content"', -a.controlStyle?' style\x3d"'+a.controlStyle+'"':"",' role\x3d"presentation"\x3e',f.call(this,b,a),"\x3c/div\x3e"):(g={type:"hbox",widths:a.widths,padding:0,children:[{type:"html",html:'\x3clabel class\x3d"cke_dialog_ui_labeled_label'+g+'" id\x3d"'+c.labelId+'" for\x3d"'+c.inputId+'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e"+CKEDITOR.tools.htmlEncode(a.label)+"\x3c/label\x3e"},{type:"html",html:'\x3cspan class\x3d"cke_dialog_ui_labeled_content"'+(a.controlStyle?' style\x3d"'+a.controlStyle+ -'"':"")+"\x3e"+f.call(this,b,a)+"\x3c/span\x3e"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,g,e));return e.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+a.type,id:f,type:a.type};a.validate&&(this.validate=a.validate);a.maxLength&&(c.maxlength=a.maxLength);a.size&&(c.size=a.size);a.inputStyle&&(c.style=a.inputStyle);var e=this,m=!1;b.on("load",function(){e.getInputElement().on("keydown", -function(a){13==a.data.getKeystroke()&&(m=!0)});e.getInputElement().on("keyup",function(a){13==a.data.getKeystroke()&&m&&(b.getButton("ok")&&setTimeout(function(){b.getButton("ok").click()},0),m=!1);e.bidi&&w.call(e,a)},null,null,1E3)});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var b=['\x3cdiv class\x3d"cke_dialog_ui_input_',a.type,'" role\x3d"presentation"'];a.width&&b.push('style\x3d"width:'+a.width+'" ');b.push("\x3e\x3cinput ");c["aria-labelledby"]=this._.labelId;this._.required&& -(c["aria-required"]=this._.required);for(var e in c)b.push(e+'\x3d"'+c[e]+'" ');b.push(" /\x3e\x3c/div\x3e");return b.join("")})}},textarea:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);var f=this,c=this._.inputId=CKEDITOR.tools.getNextId()+"_textarea",e={};a.validate&&(this.validate=a.validate);e.rows=a.rows||5;e.cols=a.cols||20;e["class"]="cke_dialog_ui_input_textarea "+(a["class"]||"");"undefined"!=typeof a.inputStyle&&(e.style=a.inputStyle);a.dir&&(e.dir=a.dir);if(f.bidi)b.on("load", -function(){f.getInputElement().on("keyup",w)},f);CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){e["aria-labelledby"]=this._.labelId;this._.required&&(e["aria-required"]=this._.required);var a=['\x3cdiv class\x3d"cke_dialog_ui_input_textarea" role\x3d"presentation"\x3e\x3ctextarea id\x3d"',c,'" '],b;for(b in e)a.push(b+'\x3d"'+CKEDITOR.tools.htmlEncode(e[b])+'" ');a.push("\x3e",CKEDITOR.tools.htmlEncode(f._["default"]),"\x3c/textarea\x3e\x3c/div\x3e");return a.join("")})}},checkbox:function(b, -a,d){if(!(3>arguments.length)){var f=h.call(this,a,{"default":!!a["default"]});a.validate&&(this.validate=a.validate);CKEDITOR.ui.dialog.uiElement.call(this,b,a,d,"span",null,null,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_checkbox":CKEDITOR.tools.getNextId()+"_checkbox"},!0),e=[],d=CKEDITOR.tools.getNextId()+"_label",g={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":d};t(c);a["default"]&&(g.checked="checked");"undefined"!=typeof c.inputStyle&&(c.style=c.inputStyle); -f.checkbox=new CKEDITOR.ui.dialog.uiElement(b,c,e,"input",null,g);e.push(' \x3clabel id\x3d"',d,'" for\x3d"',g.id,'"'+(a.labelStyle?' style\x3d"'+a.labelStyle+'"':"")+"\x3e",CKEDITOR.tools.htmlEncode(a.label),"\x3c/label\x3e");return e.join("")})}},radio:function(b,a,d){if(!(3>arguments.length)){h.call(this,a);this._["default"]||(this._["default"]=this._.initValue=a.items[0][1]);a.validate&&(this.validate=a.validate);var f=[],c=this;a.role="radiogroup";a.includeLabel=!0;CKEDITOR.ui.dialog.labeledElement.call(this, -b,a,d,function(){for(var e=[],d=[],g=(a.id?a.id:CKEDITOR.tools.getNextId())+"_radio",k=0;karguments.length)){var f=h.call(this,a);a.validate&&(this.validate=a.validate);f.inputId=CKEDITOR.tools.getNextId()+"_select";CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){var c=CKEDITOR.tools.extend({},a,{id:a.id?a.id+"_select":CKEDITOR.tools.getNextId()+"_select"},!0),e=[],d=[],g={id:f.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};e.push('\x3cdiv class\x3d"cke_dialog_ui_input_', -a.type,'" role\x3d"presentation"');a.width&&e.push('style\x3d"width:'+a.width+'" ');e.push("\x3e");void 0!==a.size&&(g.size=a.size);void 0!==a.multiple&&(g.multiple=a.multiple);t(c);for(var k=0,l;karguments.length)){void 0===a["default"]&&(a["default"]="");var f=CKEDITOR.tools.extend(h.call(this,a),{definition:a,buttons:[]});a.validate&&(this.validate=a.validate);b.on("load",function(){CKEDITOR.document.getById(f.frameId).getParent().addClass("cke_dialog_ui_input_file")});CKEDITOR.ui.dialog.labeledElement.call(this,b,a,d,function(){f.frameId=CKEDITOR.tools.getNextId()+"_fileInput";var b=['\x3ciframe frameborder\x3d"0" allowtransparency\x3d"0" class\x3d"cke_dialog_ui_input_file" role\x3d"presentation" id\x3d"', -f.frameId,'" title\x3d"',a.label,'" src\x3d"javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"\x3e\x3c/iframe\x3e');return b.join("")})}},fileButton:function(b,a,d){var f=this;if(!(3>arguments.length)){h.call(this,a);a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),e=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d= -a["for"];e&&!1===e.call(this,c)||(b.getContentElement(d[0],d[1]).submit(),this.disable())};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(f)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(f,c,e){if(!(3>arguments.length)){var m=[],g=c.html;"\x3c"!=g.charAt(0)&&(g="\x3cspan\x3e"+g+"\x3c/span\x3e");var k=c.focus;if(k){var l=this.focus;this.focus=function(){("function"== -typeof k?k:l).call(this);this.fire("focus")};c.isFocusable&&(this.isFocusable=this.isFocusable);this.keyboardFocusable=!0}CKEDITOR.ui.dialog.uiElement.call(this,f,c,m,"span",null,null,"");m=m.join("").match(b);g=g.match(a)||["","",""];d.test(g[1])&&(g[1]=g[1].slice(0,-1),g[2]="/"+g[2]);e.push([g[1]," ",m[1]||"",g[2]].join(""))}}}(),fieldset:function(b,a,d,f,c){var e=c.label;this._={children:a};CKEDITOR.ui.dialog.uiElement.call(this,b,c,f,"fieldset",null,null,function(){var a=[];e&&a.push("\x3clegend"+ -(c.labelStyle?' style\x3d"'+c.labelStyle+'"':"")+"\x3e"+e+"\x3c/legend\x3e");for(var b=0;ba.getChildCount()?(new CKEDITOR.dom.text(b,CKEDITOR.document)).appendTo(a):a.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:r},!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,a){this.on("click",function(){a.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 a=b.getInputElement();a&&a.$.focus()},0)},select:function(){var b=this.selectParentTab();setTimeout(function(){var a=b.getInputElement();a&&(a.$.focus(),a.$.select())},0)},accessKeyUp:function(){this.select()},setValue:function(b){if(this.bidi){var a=b&&b.charAt(0);(a="‪"==a?"ltr":"‫"==a?"rtl":null)&&(b=b.slice(1));this.setDirectionMarker(a)}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 a=this.getDirectionMarker();a&&(b=("ltr"==a?"‪":"‫")+b)}return b},setDirectionMarker:function(b){var a=this.getInputElement();b?a.setAttributes({dir:b,"data-cke-dir-marker":b}):this.getDirectionMarker()&&a.removeAttributes(["dir","data-cke-dir-marker"])},getDirectionMarker:function(){return this.getInputElement().data("cke-dir-marker")},keyboardFocusable:!0},q,!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,a,d){var f=new CKEDITOR.dom.element("option",this.getDialog().getParentEditor().document),c=this.getInputElement().$;f.$.text=b;f.$.value=void 0===a||null===a?b:a;void 0===d||null===d?CKEDITOR.env.ie?c.add(f.$):c.add(f.$,null):c.add(f.$,d);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 A(){for(var a=this._.tabIdList.length,b=CKEDITOR.tools.indexOf(this._.tabIdList,this._.currentTabId),c=b+1;ck.width-c.width-g?k.width-c.width+("rtl"==f.lang.dir?0:h[1]):d.x,d.y+h[0]k.height-c.height-g?k.height-c.height+h[2]:d.y,1);b.data.preventDefault()} -function c(){CKEDITOR.document.removeListener("mousemove",b);CKEDITOR.document.removeListener("mouseup",c);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mousemove",b);a.removeListener("mouseup",c)}}var e=null,d=null,f=a.getParentEditor(),g=f.config.dialog_magnetDistance,h=CKEDITOR.skin.margins||[0,0,0,0];"undefined"==typeof g&&(g=20);a.parts.title.on("mousedown",function(g){e={x:g.data.$.screenX,y:g.data.$.screenY};CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup", -c);d=a.getPosition();if(CKEDITOR.env.ie6Compat){var f=u.getChild(0).getFrameDocument();f.on("mousemove",b);f.on("mouseup",c)}g.data.preventDefault()},a)}function Z(a){function b(b){var c="rtl"==f.lang.dir,n=k.width,q=k.height,G=n+(b.data.$.screenX-m.x)*(c?-1:1)*(a._.moved?1:2),H=q+(b.data.$.screenY-m.y)*(a._.moved?1:2),B=a._.element.getFirst(),B=c&&B.getComputedStyle("right"),C=a.getPosition();C.y+H>p.height&&(H=p.height-C.y);(c?B:C.x)+G>p.width&&(G=p.width-(c?B:C.x));if(d==CKEDITOR.DIALOG_RESIZE_WIDTH|| -d==CKEDITOR.DIALOG_RESIZE_BOTH)n=Math.max(e.minWidth||0,G-g);if(d==CKEDITOR.DIALOG_RESIZE_HEIGHT||d==CKEDITOR.DIALOG_RESIZE_BOTH)q=Math.max(e.minHeight||0,H-h);a.resize(n,q);a._.moved||a.layout();b.data.preventDefault()}function c(){CKEDITOR.document.removeListener("mouseup",c);CKEDITOR.document.removeListener("mousemove",b);q&&(q.remove(),q=null);if(CKEDITOR.env.ie6Compat){var a=u.getChild(0).getFrameDocument();a.removeListener("mouseup",c);a.removeListener("mousemove",b)}}var e=a.definition,d=e.resizable; -if(d!=CKEDITOR.DIALOG_RESIZE_NONE){var f=a.getParentEditor(),g,h,p,m,k,q,n=CKEDITOR.tools.addFunction(function(d){k=a.getSize();var e=a.parts.contents;e.$.getElementsByTagName("iframe").length&&(q=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_dialog_resize_cover" style\x3d"height: 100%; position: absolute; width: 100%;"\x3e\x3c/div\x3e'),e.append(q));h=k.height-a.parts.contents.getSize("height",!(CKEDITOR.env.gecko||CKEDITOR.env.ie&&CKEDITOR.env.quirks));g=k.width-a.parts.contents.getSize("width", -1);m={x:d.screenX,y:d.screenY};p=CKEDITOR.document.getWindow().getViewPaneSize();CKEDITOR.document.on("mousemove",b);CKEDITOR.document.on("mouseup",c);CKEDITOR.env.ie6Compat&&(e=u.getChild(0).getFrameDocument(),e.on("mousemove",b),e.on("mouseup",c));d.preventDefault&&d.preventDefault()});a.on("load",function(){var b="";d==CKEDITOR.DIALOG_RESIZE_WIDTH?b=" cke_resizer_horizontal":d==CKEDITOR.DIALOG_RESIZE_HEIGHT&&(b=" cke_resizer_vertical");b=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_resizer'+ -b+" cke_resizer_"+f.lang.dir+'" title\x3d"'+CKEDITOR.tools.htmlEncode(f.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+n+', event )"\x3e'+("ltr"==f.lang.dir?"◢":"◣")+"\x3c/div\x3e");a.parts.footer.append(b,1)});f.on("destroy",function(){CKEDITOR.tools.removeFunction(n)})}}function I(a){a.data.preventDefault(1)}function N(a){var b=CKEDITOR.document.getWindow(),c=a.config,e=CKEDITOR.skinName||a.config.skin,d=c.dialog_backgroundCoverColor||("moono-lisa"==e?"black":"white"),e=c.dialog_backgroundCoverOpacity, -f=c.baseFloatZIndex,c=CKEDITOR.tools.genKey(d,e,f),g=z[c];g?g.show():(f=['\x3cdiv tabIndex\x3d"-1" style\x3d"position: ',CKEDITOR.env.ie6Compat?"absolute":"fixed","; z-index: ",f,"; top: 0px; left: 0px; ",CKEDITOR.env.ie6Compat?"":"background-color: "+d,'" class\x3d"cke_dialog_background_cover"\x3e'],CKEDITOR.env.ie6Compat&&(d="\x3chtml\x3e\x3cbody style\x3d\\'background-color:"+d+";\\'\x3e\x3c/body\x3e\x3c/html\x3e",f.push('\x3ciframe hidefocus\x3d"true" frameborder\x3d"0" id\x3d"cke_dialog_background_iframe" src\x3d"javascript:'), -f.push("void((function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.write( '"+d+"' );document.close();")+"})())"),f.push('" style\x3d"position:absolute;left:0;top:0;width:100%;height: 100%;filter: progid:DXImageTransform.Microsoft.Alpha(opacity\x3d0)"\x3e\x3c/iframe\x3e')),f.push("\x3c/div\x3e"),g=CKEDITOR.dom.element.createFromHtml(f.join("")),g.setOpacity(void 0!==e?e:.5),g.on("keydown",I),g.on("keypress",I),g.on("keyup",I),g.appendTo(CKEDITOR.document.getBody()), -z[c]=g);a.focusManager.add(g);u=g;a=function(){var a=b.getViewPaneSize();g.setStyles({width:a.width+"px",height:a.height+"px"})};var h=function(){var a=b.getScrollPosition(),c=CKEDITOR.dialog._.currentTop;g.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)}};J=a;b.on("resize",a);a();CKEDITOR.env.mac&&CKEDITOR.env.webkit||g.focus();if(CKEDITOR.env.ie6Compat){var p=function(){h();arguments.callee.prevScrollHandler.apply(this,arguments)};b.$.setTimeout(function(){p.prevScrollHandler= -window.onscroll||function(){};window.onscroll=p},0);h()}}function O(a){u&&(a.focusManager.remove(u),a=CKEDITOR.document.getWindow(),u.hide(),a.removeListener("resize",J),CKEDITOR.env.ie6Compat&&a.$.setTimeout(function(){window.onscroll=window.onscroll&&window.onscroll.prevScrollHandler||null},0),J=null)}var v=CKEDITOR.tools.cssLength,W='\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(a,b){function c(){var a=l._.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=l._.currentFocusIndex;l._.tabBarMode&&0>a&&(c=0);try{b[c].getInputElement().$.blur()}catch(d){}var e=c,g=1c.height||b.width+(0c.width?a.setStyle("position","absolute"):a.setStyle("position","fixed"));this.move(this._.moved?this._.position.x:e,this._.moved?this._.position.y:d)},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(ba(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 O(this._.editor);if(CKEDITOR.dialog._.currentTop=this._.parentDialog)CKEDITOR.dialog._.currentZIndex-=10;else{CKEDITOR.dialog._.currentZIndex=null;a.removeListener("keydown",Q);a.removeListener("keyup",R);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)+'"':"",e=CKEDITOR.dialog._.uiElementBuilders.vbox.build(this,{type:"vbox",className:"cke_dialog_page_contents", -children:a.elements,expand:!!a.expand,padding:a.padding,style:a.style||"width: 100%;"},b),d=this._.contents[a.id]={},f=e.getChild(),g=0;e=f.shift();)e.notAllowed||"hbox"==e.type||"vbox"==e.type||g++,d[e.id]=e,"function"==typeof e.getChild&&f.push.apply(f,e.getChild());g||(a.hidden=!0);b=CKEDITOR.dom.element.createFromHtml(b.join(""));b.setAttribute("role","tabpanel");e=CKEDITOR.env;d="cke_"+a.id+"_"+CKEDITOR.tools.getNextNumber();c=CKEDITOR.dom.element.createFromHtml(['\x3ca class\x3d"cke_dialog_tab"', -0arguments.length)){var h=(e.call?e(b):e)||"div",p=["\x3c",h," "],m=(d&&d.call?d(b):d)||{},k=(f&&f.call?f(b):f)||{},q=(g&&g.call?g.call(this,a,b):g)||"",n=this.domId=k.id||CKEDITOR.tools.getNextId()+"_uiElement";b.requiredContent&&!a.getParentEditor().filter.check(b.requiredContent)&&(m.display="none",this.notAllowed=!0);k.id=n;var r={};b.type&&(r["cke_dialog_ui_"+ -b.type]=1);b.className&&(r[b.className]=1);b.disabled&&(r.cke_disabled=1);for(var l=k["class"]&&k["class"].split?k["class"].split(" "):[],n=0;nCKEDITOR.env.version?"cke_dialog_ui_focused":"";b.on("focus",function(){a._.tabBarMode=!1;a._.hasFocus=!0;t.fire("focus"); -c&&this.addClass(c)});b.on("blur",function(){t.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=t.focusIndex}))}},hbox:function(a,b,c,e,d){if(!(4>arguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.widths||null,h=d&&d.height||null,p,m={role:"presentation"};d&&d.align&&(m.align=d.align);CKEDITOR.ui.dialog.uiElement.call(this, -a,d||{type:"hbox"},e,"table",{},m,function(){var a=['\x3ctbody\x3e\x3ctr class\x3d"cke_dialog_ui_hbox"\x3e'];for(p=0;parguments.length)){this._||(this._={});var f=this._.children=b,g=d&&d.width||null,h=d&&d.heights||null;CKEDITOR.ui.dialog.uiElement.call(this,a,d||{type:"vbox"},e,"div",null,{role:"presentation"},function(){var b=['\x3ctable role\x3d"presentation" cellspacing\x3d"0" border\x3d"0" ']; -b.push('style\x3d"');d&&d.expand&&b.push("height:100%;");b.push("width:"+v(g||"100%"),";");CKEDITOR.env.webkit&&b.push("float:none;");b.push('"');b.push('align\x3d"',CKEDITOR.tools.htmlEncode(d&&d.align||("ltr"==a.getParentEditor().lang.dir?"left":"right")),'" ');b.push("\x3e\x3ctbody\x3e");for(var e=0;earguments.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,c,e){for(var d=c.children,f,g=[],h=[],p=0;pc?d+c:b.width>c?d-a.left:d-a.right+b.width): -mc?d-c:b.width>c?d-a.right+b.width:d-a.left);c=a.top;b.height-a.tope?p-e:b.height>e?p-a.bottom+b.height:p-a.top);CKEDITOR.env.ie&&(b=a=new CKEDITOR.dom.element(l.$.offsetParent),"html"==b.getName()&&(b=b.getDocument().getBody()),"rtl"==b.getComputedStyle("direction")&&(d=CKEDITOR.env.ie8Compat?d-2*l.getDocument().getDocumentElement().$.scrollLeft:d-(a.$.scrollWidth-a.$.clientWidth)));var a=l.getFirst(),f;(f=a.getCustomData("activePanel"))&&f.onHide&&f.onHide.call(this,1);a.setCustomData("activePanel", -this);l.setStyles({top:p+"px",left:d+"px"});l.setOpacity(1);g&&g()},this);n.isLoaded?a():n.onLoad=a;CKEDITOR.tools.setTimeout(function(){var a=CKEDITOR.env.webkit&&CKEDITOR.document.getWindow().getScrollPosition().y;this.focus();k.element.focus();CKEDITOR.env.webkit&&(CKEDITOR.document.getBody().$.scrollTop=a);this.allowBlur(!0);CKEDITOR.env.ie?CKEDITOR.tools.setTimeout(function(){k.markFirstDisplayed?k.markFirstDisplayed():k._.markFirstDisplayed()},0):k.markFirstDisplayed?k.markFirstDisplayed(): -k._.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 a=this._.showBlockParams;this.visible&&this._.showBlockParams&&(this.hide(),this.showBlock.apply(this,a))},focus:function(){if(CKEDITOR.env.webkit){var a=CKEDITOR.document.getActive();a&&!a.equals(this._.iframe)&&a.$.blur()}(this._.lastFocused||this._.iframe.getFrameDocument().getWindow()).focus()},blur:function(){var a= -this._.iframe.getFrameDocument().getActive();a&&a.is("a")&&(this._.lastFocused=a)},hide:function(a){if(this.visible&&(!this.onHide||!0!==this.onHide.call(this))){this.hideChild();CKEDITOR.env.gecko&&this._.iframe.getFrameDocument().$.activeElement.blur();this.element.setStyle("display","none");this.visible=0;this.element.getFirst().removeCustomData("activePanel");if(a=a&&this._.returnFocus)CKEDITOR.env.webkit&&a.type&&a.getWindow().$.focus(),a.focus();delete this._.lastFocused;this._.showBlockParams= -null;this._.editor.fire("panelHide",this)}},allowBlur:function(a){var b=this._.panel;void 0!==a&&(b.allowBlur=a);return b.allowBlur},showAsChild:function(a,b,c,f,h,g){if(this._.activeChild!=a||a._.panel._.offsetParentId!=c.getId())this.hideChild(),a.onHide=CKEDITOR.tools.bind(function(){CKEDITOR.tools.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=a,this._.focused=!1,a.showBlock(b,c,f,h,g),this.blur(),(CKEDITOR.env.ie7Compat||CKEDITOR.env.ie6Compat)&&setTimeout(function(){a.element.getChild(0).$.style.cssText+= -""},100)},hideChild:function(a){var b=this._.activeChild;b&&(delete b.onHide,delete this._.activeChild,b.hide(),a&&this.focus())}}});CKEDITOR.on("instanceDestroyed",function(){var a=CKEDITOR.tools.isEmpty(CKEDITOR.instances),b;for(b in f){var c=f[b];a?c.destroy():c.element.hide()}a&&(f={})})})();CKEDITOR.plugins.add("menu",{requires:"floatpanel",beforeInit:function(l){for(var h=l.config.menu_groups.split(","),r=l._.menuGroups={},t=l._.menuItems={},n=0;nd.group?1:a.orderd.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'),r=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'),t=CKEDITOR.addTemplate("menuArrow",'\x3cspan class\x3d"cke_menuarrow"\x3e\x3cspan\x3e{label}\x3c/span\x3e\x3c/span\x3e'), -n=CKEDITOR.addTemplate("menuShortcut",'\x3cspan class\x3d"cke_menubutton_label cke_menubutton_shortcut"\x3e{shortcut}\x3c/span\x3e');CKEDITOR.menu=CKEDITOR.tools.createClass({$:function(a,b){b=this._.definition=b||{};this.id=CKEDITOR.tools.getNextId();this.editor=a;this.items=[];this._.listeners=[];this._.level=b.level||1;var d=CKEDITOR.tools.extend({},b.panel,{css:[CKEDITOR.skin.getPath("editor")],level:this._.level-1,block:{}}),m=d.block.attributes=d.attributes||{};!m.role&&(m.role="menu");this._.panelDefinition= -d},_:{onShow:function(){var a=this.editor.getSelection(),b=a&&a.getStartElement(),d=this.editor.elementPath(),m=this._.listeners;this.removeAll();for(var g=0;g=a||"a"<=a&&"z">=a||"а"<=a&&"я">=a||"А"<=a&&"Я">=a||"ё"==a||"Ё"==a||"0"<=a&&"9">=a}function w(a){return'"'==a||"'"==a||"«"==a||"‘"==a||"“"==a||"„"==a||"("==a||"["==a||"{"==a}function n(a){if(a.startContainer.type==CKEDITOR.NODE_ELEMENT){var f=a.startContainer.getChild(a.startOffset),b=0,c=k(f,!0);if(c){c!=f&&(b=c.getText().length);for(;c.type==CKEDITOR.NODE_ELEMENT;)c=c.getFirst()}else c=new CKEDITOR.dom.text(""),a.insertNode(c); -a.setStart(c,b);a.collapse(!0)}}function E(a){n(a);var f=a.startContainer.getText().substring(a.startOffset-1,a.startOffset);i("replaceHyphens")&&w(f)&&F(a,f);var b;if(b=i("smartQuotes"))'"'!==f?b=!1:(G(a,R),b=!0);if(!b){if(b=i("smartQuotes"))"'"!==f?b=!1:(G(a,S),b=!0);if(!b){if(t(f)){if(b=i("formatBulletedLists"))b:{b=l(a.startContainer);if("p"===b.getName()){var c=new CKEDITOR.dom.range(g.editable());c.selectNodeContents(l(a.startContainer));var e=new m(c);e.referenceNode=a.startContainer;e.referenceCharacterOffset= -a.startOffset;c=new CKEDITOR.dom.range(g.editable());c.setEnd(e.referenceNode,e.referenceCharacterOffset);if(!f||e.previousCharacter()){var d=e.previousCharacter();if(!d||!(d in T)){b=!1;break b}c.setStart(e.referenceNode,e.referenceCharacterOffset);if(e.previousCharacter()){b=!1;break b}e=b.getPrevious();p();d=a.createBookmark();c.deleteContents();!o&&e&&e.type==CKEDITOR.NODE_ELEMENT&&"ul"==e.getName()?C(b,e):H([b],"ul",null);a.moveToBookmark(d);n(a);q();b=!0;break b}}b=void 0}b||(!i("formatNumberedLists")|| -!U(a,f))&&i("replaceHyphens")&&I(a,f)}(r(f)||t(f))&&J(a,f)}}}function K(a){n(a);i("replaceHyphens")&&I(a,"");J(a,"")}function V(a,f){var b=new CKEDITOR.dom.range(g.editable());b.setStart(a,0);for(b.collapse(!0);b.startOffseth)break}else e=d,h=1;if(0<=h||e&&!t(e)&&!B(e)&&!w(e))return!1;b.setStart(c.referenceNode,c.referenceCharacterOffset);d=c.previousCharacter();if(!d||!B(d)&&!('"'==d||"'"==d||"»"==d||"’"==d||"”"==d||"“"==d||")"==d||"]"==d||"}"==d))return!1;p();d=a.createBookmark(); -y(b,"—");a.moveToBookmark(d);n(a);q()}}function I(a,f){var b=new CKEDITOR.dom.range(g.editable());b.selectNodeContents(l(a.startContainer));var c=new m(b);c.referenceNode=a.startContainer;c.referenceCharacterOffset=a.startOffset;if(!f||c.previousCharacter()){b=new CKEDITOR.dom.range(g.editable());b.setEnd(c.referenceNode,c.referenceCharacterOffset);if("-"!==c.previousCharacter())return!1;b.setStart(c.referenceNode,c.referenceCharacterOffset);var e=c.previousCharacter();"-"==e&&(b.setStart(c.referenceNode, -c.referenceCharacterOffset),e=c.previousCharacter());if(!t(e))return!1;c=u.autocorrect_dash;p();e=a.createBookmark();y(b,c);a.moveToBookmark(e);n(a);q()}}function J(a,f){var b;if(b=i("recognizeUrls"))a:{if(!r(f)){b=new CKEDITOR.dom.range(g.editable());b.selectNodeContents(l(a.startContainer));var c=new m(b);c.referenceNode=a.startContainer;c.referenceCharacterOffset=a.startOffset;if(!f||c.previousCharacter()){b=new CKEDITOR.dom.range(g.editable());b.setEnd(c.referenceNode,c.referenceCharacterOffset); -for(var e=!0,d="",h;(h=c.previousCharacter())&&" "!=h&&" "!=h;)e&&h in Y?b.setEnd(c.referenceNode,c.referenceCharacterOffset):(d=h+d,e=!1,b.setStart(c.referenceNode,c.referenceCharacterOffset));d=d.match(Z);if(!d){b=!1;break a}h=d[0];d="www."===d[1].toLowerCase()?"http://"+h:h;p();h=a.createBookmark();d=new CKEDITOR.style({element:"a",attributes:{"data-cke-saved-href":d,href:d}});d.type=CKEDITOR.STYLE_INLINE;d.applyToRange(b);a.moveToBookmark(h);n(a);q();b=!0;break a}}b=void 0}if(!b){if(u.autocorrect_useReplacementTable&& -(b=new CKEDITOR.dom.range(g.editable()),b.selectNodeContents(l(a.startContainer)),h=new m(b),h.referenceNode=a.startContainer,h.referenceCharacterOffset=a.startOffset,!f||h.previousCharacter())){var j;b=new CKEDITOR.dom.range(g.editable());b.setEnd(h.referenceNode,h.referenceCharacterOffset);for(var d="",k;(k=h.previousCharacter())&&!t(k);)d=k+d,d in M&&(j=d,j=M[j],b.setStart(h.referenceNode,h.referenceCharacterOffset));j&&(p(),k=a.createBookmark(),y(b,j),a.moveToBookmark(k),n(a),q())}i("formatOrdinals")&& -$(a,f);i("replaceHyphens")&&F(a,f)}}function p(){o&&(g.fire("saveSnapshot"),N=g.getSelection().getRanges().shift().createBookmark())}function q(){o&&(g.getSelection().selectBookmarks([N]),g.fire("saveSnapshot"))}function $(a,f){var b=new CKEDITOR.dom.range(g.editable());b.selectNodeContents(l(a.startContainer));var c=new m(b);c.referenceNode=a.startContainer;c.referenceCharacterOffset=a.startOffset;if(!f||c.previousCharacter()){b=new CKEDITOR.dom.range(g.editable());b.setEnd(c.referenceNode,c.referenceCharacterOffset); -for(var e="",d,h=0;2>h;h++){d=c.previousCharacter();if(!d)break;e=d+e}if(!(e in aa))return!1;b.setStart(c.referenceNode,c.referenceCharacterOffset);for(h="";d=c.previousCharacter();)if("0"<=d&&"9">=d)h=d+h;else{if(B(d))return!1;break}c=h%100;if(9c){if("th"!==e)return!1}else if(c=h%10,1==c){if("st"!==e)return!1}else if(2==c){if("nd"!==e)return!1}else if(3==c){if("rd"!==e)return!1}else if("th"!==e)return!1;p();e=a.createBookmark();(new CKEDITOR.style({element:"sup"})).applyToRange(b);a.moveToBookmark(e); -n(a);q();return!0}}function U(a,f){var b=l(a.startContainer);if("p"===b.getName()){var c=new CKEDITOR.dom.range(g.editable());c.selectNodeContents(l(a.startContainer));b=new m(c);b.referenceNode=a.startContainer;b.referenceCharacterOffset=a.startOffset;c=new CKEDITOR.dom.range(g.editable());c.setEnd(b.referenceNode,b.referenceCharacterOffset);if(!f||b.previousCharacter()){if(!(b.previousCharacter()in{".":!0,")":!0}))return!1;for(var e="",d;(d=b.previousCharacter())&&" "!=d&&" "!=d;)e=d+e,c.setStart(b.referenceNode, -b.referenceCharacterOffset);if(e.match(/^[0-9]+$/))d="1";else if(e.match(/^[ivxlcdm]+$/))d="i";else if(e.match(/^[IVXLCDM]+$/))d="I";else if(e.match(/^[a-z]$/))d="a";else if(e.match(/^[A-Z]$/))d="A";else return!1;if(b.previousCharacter())return!1;var e=ba(e,d),b=l(a.startContainer),h=b.getPrevious();p();var i=a.createBookmark();c.deleteContents();!o&&h&&h.type==CKEDITOR.NODE_ELEMENT&&"ol"==h.getName()&&h.getAttribute("type")==d&&h.$.start+h.getChildCount()-1==e-1?C(b,h):H([b],"ol",1===e?{type:d}: -{type:d,start:e});a.moveToBookmark(i);n(a);q();return!0}}}function G(a,f){var b=new CKEDITOR.dom.range(g.editable());b.selectNodeContents(l(a.startContainer));var c=new m(b);c.referenceNode=a.startContainer;c.referenceCharacterOffset=a.startOffset;b=new CKEDITOR.dom.range(g.editable());b.setEnd(c.referenceNode,c.referenceCharacterOffset);c.previousCharacter();b.setStart(c.referenceNode,c.referenceCharacterOffset);c=(c=c.previousCharacter())?0>"  –—([{".indexOf(c):!1;c=f[Number(c)];p();var e=a.createBookmark(); -y(b,c);a.moveToBookmark(e);n(a);q()}function l(a){for(;a&&(a.type!==CKEDITOR.NODE_ELEMENT||a.getName()in CKEDITOR.dtd.$inline||a.getName()in CKEDITOR.dtd.$empty);)a=a.getParent();return a}function H(a,f,b){for(var c=a[a.length-1].getNext(),f=g.document.createElement(f),e=a[0].getParent(),d;a.length;)d=a.shift(),C(d,f);b&&f.setAttributes(b);c?f.insertBefore(c):f.appendTo(e)}function C(a,f){var b=g.document.createElement("li");a.copyAttributes(b);a.moveChildren(b);a.remove();b.appendTo(f)}function O(a){return"ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(a)+ -1}function j(a){if(!a)return 0;if("M"==a.substring(0,1))return 1E3+j(a.substring(1));if("CM"==a.substring(0,2))return 900+j(a.substring(2));if("D"==a.substring(0,1))return 500+j(a.substring(1));if("CD"==a.substring(0,2))return 400+j(a.substring(2));if("C"==a.substring(0,1))return 100+j(a.substring(1));if("XC"==a.substring(0,2))return 90+j(a.substring(2));if("L"==a.substring(0,1))return 50+j(a.substring(1));if("XL"==a.substring(0,2))return 40+j(a.substring(2));if("X"==a.substring(0,1))return 10+j(a.substring(1)); -if("IX"==a.substring(0,2))return 9+j(a.substring(2));if("V"==a.substring(0,1))return 5+j(a.substring(1));if("IV"==a.substring(0,2))return 4+j(a.substring(2));if("I"==a.substring(0,1))return 1+j(a.substring(1))}function ba(a,f){switch(f){case "1":return a|0;case "i":return j(a.toUpperCase());case "I":return j(a);case "a":return O(a.toUpperCase());case "A":return O(a)}}var u=g.config,v=g.lang.autocorrect;P();g.addCommand("autocorrect",{exec:function(a){a.fire("saveSnapshot");var f=a.getSelection().getRanges().shift(), -b=f.createBookmark();f.collapsed?(f=new CKEDITOR.dom.range(a.editable()),f.selectNodeContents(a.editable())):f=f.clone();f=new CKEDITOR.dom.walker(f);a.editable().$.normalize();f.evaluator=function(a){return a.type===CKEDITOR.NODE_TEXT&&!x(a)};for(var c;c=f.next();){var e=X(c),d=l(c);f.current=V(c,d.isBlockBoundary()&&!e||e&&e.type===CKEDITOR.NODE_ELEMENT&&"br"===e.getName());"p"===d.getName()&&!k(e)&&L(d)}a.getSelection().selectBookmarks([b]);a.fire("saveSnapshot")}});var A=g.addCommand("toggleAutocorrect", -{preserveState:!0,canUndo:!1,exec:function(){this.setState(z()?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_ON)}}),z=function(){return A.state===CKEDITOR.TRISTATE_ON},s=g.addCommand("autocorrectOptions",new CKEDITOR.dialogCommand("autocorrectOptions"));s.canUndo=!1;s.readOnly=1;CKEDITOR.dialog.add("autocorrectOptions",this.path+"dialogs/options.js");g.addMenuGroup("autocorrectButton");s={};s.autoCorrectWhileTyping={label:v.disable,group:"autocorrectButton",command:"toggleAutocorrect"};s.autoCorrectNow= -{label:v.autocorrectNow,command:"autocorrect",group:"autocorrectButton"};s.autocorrectOptions={label:v.options,command:"autocorrectOptions",group:"autocorrectButton"};g.addMenuItems(s);g.ui.add("AutoCorrect",CKEDITOR.UI_MENUBUTTON,{label:v.toolbar,modes:{wysiwyg:1},toolbar:"spellchecker,20",onRender:function(){A.on("state",function(){this.setState(A.state)},this)},onMenu:function(){g.getMenuItem("autoCorrectWhileTyping").label=z()?v.disable:v.enable;return{autoCorrectWhileTyping:CKEDITOR.TRISTATE_OFF, -autoCorrectNow:CKEDITOR.TRISTATE_OFF,autocorrectOptions:CKEDITOR.TRISTATE_OFF}}});g.on("instanceReady",function(a){a.removeListener();A.setState(u.autocorrect_enabled?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var o=!1,Y=D(".,?!:()[]{}\"'‘’“”«»<>".split("")),N,M=u.autocorrect_replacementTable,Z=/^(http:|https:|ftp:|mailto:|tel:|skype:|www\.).+$/i,aa={st:!0,nd:!0,rd:!0,th:!0},W=/^(-{3,}|_{3,})$/,T=D(["*","+","•"]),R=u.autocorrect_doubleQuotes,S=u.autocorrect_singleQuotes;g.on("key",function(a){if(!(2228237!= -a.data.keyCode&&13!=a.data.keyCode)&&z()&&"wysiwyg"===g.mode){var f=g.getSelection().getRanges().shift(),b=null;13===a.data.keyCode&&(a=l(f.startContainer),"p"===a.getName()&&(b=a));setTimeout(function(){o=true;K(f);L(b);o=false})}});g.on("contentDom",function(){g.editable().on("keypress",function(a){0!==a.data.$.charCode&&z()&&setTimeout(function(){o=!0;var a=g.getSelection().getRanges().shift();E(a);o=!1})})})}})})();CKEDITOR.config.autocorrect_enabled=!0; -CKEDITOR.config.autocorrect_replacementTable={"--\>":"→","-+":"∓","->":"→","...":"…","(c)":"©","(e)":"€","(r)":"®","(tm)":"™","(o)":"˚","+-":"±","<-":"←","<--":"←","<--\>":"↔","<->":"↔","<<":"«",">>":"»","~=":"≈","1/2":"½","1/4":"¼","3/4":"¾"};CKEDITOR.config.autocorrect_useReplacementTable=!0;CKEDITOR.config.autocorrect_recognizeUrlsAsYouType=!0;CKEDITOR.config.autocorrect_recognizeUrls=!0;CKEDITOR.config.autocorrect_dash="–";CKEDITOR.config.autocorrect_replaceHyphensAsYouType=!0; -CKEDITOR.config.autocorrect_replaceHyphens=!0;CKEDITOR.config.autocorrect_formatOrdinalsAsYouType=!0;CKEDITOR.config.autocorrect_formatOrdinals=!0;CKEDITOR.config.autocorrect_singleQuotes="‘’";CKEDITOR.config.autocorrect_smartQuotesAsYouType=!0;CKEDITOR.config.autocorrect_smartQuotes=!0;CKEDITOR.config.autocorrect_doubleQuotes="“”";CKEDITOR.config.autocorrect_createHorizontalRulesAsYouType=!0;CKEDITOR.config.autocorrect_createHorizontalRules=!0; -CKEDITOR.config.autocorrect_formatBulletedListsAsYouType=!0;CKEDITOR.config.autocorrect_formatBulletedLists=!0;CKEDITOR.config.autocorrect_formatNumberedListsAsYouType=!0;CKEDITOR.config.autocorrect_formatNumberedLists=!0;(function(){function h(a){function m(){e=a.document;n=e[CKEDITOR.env.ie?"getBody":"getDocumentElement"]();c=CKEDITOR.env.quirks?e.getBody():e.getDocumentElement();var d=CKEDITOR.env.quirks?c:c.findOne("body");d&&(d.setStyle("height","auto"),d.setStyle("min-height",CKEDITOR.env.safari?"0%":"auto"));f=CKEDITOR.dom.element.createFromHtml('\x3cspan style\x3d"margin:0;padding:0;border:0;clear:both;width:1px;height:1px;display:block;"\x3e'+(CKEDITOR.env.webkit?"\x26nbsp;":"")+"\x3c/span\x3e",e)}function g(){k&& -c.setStyle("overflow-y","hidden");var d=a.window.getViewPaneSize().height,b;n.append(f);b=f.getDocumentPosition(e).y+f.$.offsetHeight;f.remove();b+=h;b=Math.max(b,r);b=Math.min(b,p);b!=d&&l!=b&&(b=a.fire("autoGrow",{currentHeight:d,newHeight:b}).newHeight,a.resize(a.container.getStyle("width"),b,!0),l=b);k||(bc.$.clientHeight?c.setStyle("overflow-y","hidden"):c.removeStyle("overflow-y"))}var l,e,n,c,f,h=a.config.autoGrow_bottomSpace||0,r=void 0!==a.config.autoGrow_minHeight?a.config.autoGrow_minHeight: -200,p=a.config.autoGrow_maxHeight||Infinity,k=!a.config.autoGrow_maxHeight;a.addCommand("autogrow",{exec:g,modes:{wysiwyg:1},readOnly:1,canUndo:!1,editorFocus:!1});var t={contentDom:1,key:1,selectionChange:1,insertElement:1,mode:1},q;for(q in t)a.on(q,function(d){"wysiwyg"==d.editor.mode&&setTimeout(function(){var b=a.getCommand("maximize");!a.window||b&&b.state==CKEDITOR.TRISTATE_ON?l=null:(g(),k||g())},100)});a.on("afterCommandExec",function(a){"maximize"==a.data.name&&"wysiwyg"==a.editor.mode&& -(a.data.command.state==CKEDITOR.TRISTATE_ON?c.removeStyle("overflow-y"):g())});a.on("contentDom",m);m();a.config.autoGrow_onStartup&&a.editable().isVisible()&&a.execCommand("autogrow")}CKEDITOR.plugins.add("autogrow",{init:function(a){if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE)a.on("instanceReady",function(){a.editable().isInline()?a.ui.space("contents").setStyle("height","auto"):h(a)})}})})();CKEDITOR.plugins.add("basicstyles",{init:function(c){var e=0,d=function(g,d,b,a){if(a){a=new CKEDITOR.style(a);var f=h[b];f.unshift(a);c.attachStyleStateChange(a,function(a){!c.readOnly&&c.getCommand(b).setState(a)});c.addCommand(b,new CKEDITOR.styleCommand(a,{contentForms:f}));c.ui.addButton&&c.ui.addButton(g,{label:d,command:b,toolbar:"basicstyles,"+(e+=10)})}},h={bold:["strong","b",["span",function(a){a=a.styles["font-weight"];return"bold"==a||700<=+a}]],italic:["em","i",["span",function(a){return"italic"== -a.styles["font-style"]}]],underline:["u",["span",function(a){return"underline"==a.styles["text-decoration"]}]],strike:["s","strike",["span",function(a){return"line-through"==a.styles["text-decoration"]}]],subscript:["sub"],superscript:["sup"]},b=c.config,a=c.lang.basicstyles;d("Bold",a.bold,"bold",b.coreStyles_bold);d("Italic",a.italic,"italic",b.coreStyles_italic);d("Underline",a.underline,"underline",b.coreStyles_underline);d("Strike",a.strike,"strike",b.coreStyles_strike);d("Subscript",a.subscript, -"subscript",b.coreStyles_subscript);d("Superscript",a.superscript,"superscript",b.coreStyles_superscript);c.setKeystroke([[CKEDITOR.CTRL+66,"bold"],[CKEDITOR.CTRL+73,"italic"],[CKEDITOR.CTRL+85,"underline"]])}});CKEDITOR.config.coreStyles_bold={element:"strong",overrides:"b"};CKEDITOR.config.coreStyles_italic={element:"em",overrides:"i"};CKEDITOR.config.coreStyles_underline={element:"u"};CKEDITOR.config.coreStyles_strike={element:"s",overrides:"strike"};CKEDITOR.config.coreStyles_subscript={element:"sub"}; -CKEDITOR.config.coreStyles_superscript={element:"sup"};(function(){function q(a,f,d,b){if(!a.isReadOnly()&&!a.equals(d.editable())){CKEDITOR.dom.element.setMarker(b,a,"bidi_processed",1);b=a;for(var c=d.editable();(b=b.getParent())&&!b.equals(c);)if(b.getCustomData("bidi_processed")){a.removeStyle("direction");a.removeAttribute("dir");return}b="useComputedState"in d.config?d.config.useComputedState:1;(b?a.getComputedStyle("direction"):a.getStyle("direction")||a.hasAttribute("dir"))!=f&&(a.removeStyle("direction"),b?(a.removeAttribute("dir"),f!=a.getComputedStyle("direction")&& -a.setAttribute("dir",f)):a.setAttribute("dir",f),d.forceNextSelectionCheck())}}function v(a,f,d){var b=a.getCommonAncestor(!1,!0);a=a.clone();a.enlarge(d==CKEDITOR.ENTER_BR?CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS:CKEDITOR.ENLARGE_BLOCK_CONTENTS);if(a.checkBoundaryOfElement(b,CKEDITOR.START)&&a.checkBoundaryOfElement(b,CKEDITOR.END)){for(var c;b&&b.type==CKEDITOR.NODE_ELEMENT&&(c=b.getParent())&&1==c.getChildCount()&&!(b.getName()in f);)b=c;return b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in f&&b}}function p(a){return{context:"p", -allowedContent:{"h1 h2 h3 h4 h5 h6 table ul ol blockquote div tr p div li td":{propertiesOnly:!0,attributes:"dir"}},requiredContent:"p[dir]",refresh:function(a,d){var b=a.config.useComputedState,c,b=void 0===b||b;if(!b){c=d.lastElement;for(var h=a.editable();c&&!(c.getName()in u||c.equals(h));){var e=c.getParent();if(!e)break;c=e}}c=c||d.block||d.blockLimit;c.equals(a.editable())&&(h=a.getSelection().getRanges()[0].getEnclosedNode())&&h.type==CKEDITOR.NODE_ELEMENT&&(c=h);c&&(b=b?c.getComputedStyle("direction"): -c.getStyle("direction")||c.getAttribute("dir"),a.getCommand("bidirtl").setState("rtl"==b?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF),a.getCommand("bidiltr").setState("ltr"==b?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF));b=(d.block||d.blockLimit||a.editable()).getDirection(1);b!=(a._.selDir||a.lang.dir)&&(a._.selDir=b,a.fire("contentDirChanged",b))},exec:function(f){var d=f.getSelection(),b=f.config.enterMode,c=d.getRanges();if(c&&c.length){for(var h={},e=d.createBookmarks(),c=c.createIterator(),g, -l=0;g=c.getNextRange(1);){var k=g.getEnclosedNode();k&&(!k||k.type==CKEDITOR.NODE_ELEMENT&&k.getName()in r)||(k=v(g,t,b));k&&q(k,a,f,h);var m=new CKEDITOR.dom.walker(g),n=e[l].startNode,p=e[l++].endNode;m.evaluator=function(a){var c=b==CKEDITOR.ENTER_P?"p":"div",d;if(d=(a?a.type==CKEDITOR.NODE_ELEMENT:!1)&&a.getName()in t){if(c=a.is(c))c=(c=a.getParent())?c.type==CKEDITOR.NODE_ELEMENT:!1;d=!(c&&a.getParent().is("blockquote"))}return!!(d&&a.getPosition(n)&CKEDITOR.POSITION_FOLLOWING&&(a.getPosition(p)& -CKEDITOR.POSITION_PRECEDING+CKEDITOR.POSITION_CONTAINS)==CKEDITOR.POSITION_PRECEDING)};for(;k=m.next();)q(k,a,f,h);g=g.createIterator();for(g.enlargeBr=b!=CKEDITOR.ENTER_BR;k=g.getNextParagraph(b==CKEDITOR.ENTER_P?"p":"div");)q(k,a,f,h)}CKEDITOR.dom.element.clearAllMarkers(h);f.forceNextSelectionCheck();d.selectBookmarks(e);f.focus()}}}}function w(a){var f=a==l.setAttribute,d=a==l.removeAttribute,b=/\bdirection\s*:\s*(.*?)\s*(:?$|;)/;return function(c,h){if(!this.isReadOnly()){var e;if(e=c==(f||d? -"dir":"direction")||"style"==c&&(d||b.test(h))){a:{e=this;for(var g=e.getDocument().getBody().getParent();e;){if(e.equals(g)){e=!1;break a}e=e.getParent()}e=!0}e=!e}if(e&&(e=this.getDirection(1),g=a.apply(this,arguments),e!=this.getDirection(1)))return this.getDocument().fire("dirChanged",this),g}return a.apply(this,arguments)}}var t={table:1,ul:1,ol:1,blockquote:1,div:1},r={},u={};CKEDITOR.tools.extend(r,t,{tr:1,p:1,div:1,li:1});CKEDITOR.tools.extend(u,r,{td:1});CKEDITOR.plugins.add("bidi",{init:function(a){function f(b, -c,d,e,f){a.addCommand(d,new CKEDITOR.command(a,e));a.ui.addButton&&a.ui.addButton(b,{label:c,command:d,toolbar:"bidi,"+f})}if(!a.blockless){var d=a.lang.bidi;f("BidiLtr",d.ltr,"bidiltr",p("ltr"),10);f("BidiRtl",d.rtl,"bidirtl",p("rtl"),20);a.on("contentDom",function(){a.document.on("dirChanged",function(b){a.fire("dirChanged",{node:b.data,dir:b.data.getDirection(1)})})});a.on("contentDirChanged",function(b){b=(a.lang.dir!=b.data?"add":"remove")+"Class";var c=a.ui.space(a.config.toolbarLocation);if(c)c[b]("cke_mixed_dir_content")})}}}); -for(var l=CKEDITOR.dom.element.prototype,n=["setStyle","removeStyle","setAttribute","removeAttribute"],m=0;me.length&&(a=g.document.createElement(g.config.enterMode==CKEDITOR.ENTER_P?"p":"div"),b=h.shift(),c.insertNode(a),a.append(new CKEDITOR.dom.text("",g.document)),c.moveToBookmark(b),c.selectNodeContents(a),c.collapse(!0),b=c.createBookmark(),e.push(a),h.unshift(b));d=e[0].getParent();c=[];for(b=0;ba||(this.notifications.splice(a,1),b.element.remove(),this.element.getChildCount()||(this._removeListeners(),this.element.remove()))},_createElement:function(){var b=this.editor,a=b.config,c=new CKEDITOR.dom.element("div");c.addClass("cke_notifications_area");c.setAttribute("id","cke_notifications_area_"+b.name);c.setStyle("z-index",a.baseFloatZIndex-2);return c},_attachListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.on("scroll",this._uiBuffer.input);b.on("resize",this._uiBuffer.input); -a.on("change",this._changeBuffer.input);a.on("floatingSpaceLayout",this._layout,this,null,20);a.on("blur",this._layout,this,null,20)},_removeListeners:function(){var b=CKEDITOR.document.getWindow(),a=this.editor;b.removeListener("scroll",this._uiBuffer.input);b.removeListener("resize",this._uiBuffer.input);a.removeListener("change",this._changeBuffer.input);a.removeListener("floatingSpaceLayout",this._layout);a.removeListener("blur",this._layout)},_layout:function(){function b(){a.setStyle("left", -k(n+d.width-g-h))}var a=this.element,c=this.editor,d=c.ui.contentsElement.getClientRect(),e=c.ui.contentsElement.getDocumentPosition(),f,l,u=a.getClientRect(),m,g=this._notificationWidth,h=this._notificationMargin;m=CKEDITOR.document.getWindow();var p=m.getScrollPosition(),t=m.getViewPaneSize(),q=CKEDITOR.document.getBody(),r=q.getDocumentPosition(),k=CKEDITOR.tools.cssLength;g&&h||(m=this.element.getChild(0),g=this._notificationWidth=m.getClientRect().width,h=this._notificationMargin=parseInt(m.getComputedStyle("margin-left"), -10)+parseInt(m.getComputedStyle("margin-right"),10));c.toolbar&&(f=c.ui.space("top"),l=f.getClientRect());f&&f.isVisible()&&l.bottom>d.top&&l.bottomp.y?a.setStyles({position:"fixed",top:0}):a.setStyles({position:"absolute",top:k(e.y+d.height-u.height)});var n="fixed"==a.getStyle("position")?d.left:"static"!=q.getComputedStyle("position")?e.x-r.x:e.x;d.width< -g+h?e.x+g+h>p.x+t.width?b():a.setStyle("left",k(n)):e.x+g+h>p.x+t.width?a.setStyle("left",k(n)):e.x+d.width/2+g/2+h>p.x+t.width?a.setStyle("left",k(n-e.x+p.x+t.width-g-h)):0>d.left+d.width-g-h?b():0>d.left+d.width/2-g/2?a.setStyle("left",k(n-e.x+p.x)):a.setStyle("left",k(n+d.width/2-g/2-h/2))}};CKEDITOR.plugins.notification=q})();(function(){function D(a){function d(){for(var b=f(),e=CKEDITOR.tools.clone(a.config.toolbarGroups)||v(a),n=0;na.order?-1:0>b.order?1:b.order]+data-cke-bookmark[^<]*?<\/span>/ig,"");d&&r(a,c)})}function t(){if("wysiwyg"==a.mode){var b=q("paste");a.getCommand("cut").setState(q("cut"));a.getCommand("copy").setState(q("copy")); -a.getCommand("paste").setState(b);a.fire("pasteState",b)}}function q(b){if(v&&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 p=CKEDITOR.plugins.clipboard,m=0,u=0,v=0;(function(){a.on("key",n);a.on("contentDom",b);a.on("selectionChange",function(a){v=a.data.selection.getRanges()[0].checkReadOnly(); -t()});a.contextMenu&&a.contextMenu.addListener(function(a,b){v=b.getRanges()[0].checkReadOnly();return{cut:q("cut"),copy:q("copy"),paste:q("paste")}})})();(function(){function b(c,d,e,h,f){var n=a.lang.clipboard[d];a.addCommand(d,e);a.ui.addButton&&a.ui.addButton(c,{label:n,command:d,toolbar:"clipboard,"+h});a.addMenuItems&&a.addMenuItem(d,{label:n,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.getClipboardData= -function(b,c){function d(a){a.removeListener();a.cancel();c(a.data)}c||(c=b,b=null);a.on("paste",d,null,null,0);!1===y()&&(a.removeListener("paste",d),c(null))}}function z(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 A(a,b){function c(a){return CKEDITOR.tools.repeat("\x3c/p\x3e\x3cp\x3e",~~(a/2))+(1==a%2?"\x3cbr\x3e":"")}b=b.replace(/\s+/g," ").replace(/> +/gi,"\x3cbr\x3e");b=b.replace(/<\/?[A-Z]+>/g,function(a){return a.toLowerCase()});if(b.match(/^[^<]$/))return b;CKEDITOR.env.webkit&&-1(
|)<\/div>)(?!$|(

(
|)<\/div>))/g,"\x3cbr\x3e").replace(/^(
(
|)<\/div>){2}(?!$)/g,"\x3cdiv\x3e\x3c/div\x3e"), -b.match(/
(
|)<\/div>/)&&(b="\x3cp\x3e"+b.replace(/(
(
|)<\/div>)+/g,function(a){return 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 B(a,b)}function C(){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 w(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 B(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 D(a){a.data.preventDefault();a.data.$.dataTransfer.dropEffect="none"}function E(a){var b=CKEDITOR.plugins.clipboard;a.on("contentDom",function(){function c(b,c,d){c.select();r(a,{dataTransfer:d, -method:"drop"},1);d.sourceEditor.fire("saveSnapshot");d.sourceEditor.editable().extractHtmlFromRange(b);d.sourceEditor.getSelection().selectRanges([b]);d.sourceEditor.fire("saveSnapshot")}function d(c,d){c.select();r(a,{dataTransfer:d,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 h(a){a.type!=CKEDITOR.NODE_ELEMENT&&(a=a.getParent());return a.getChildCount()} -var e=a.editable(),f=CKEDITOR.plugins.clipboard.getDropTarget(a),k=a.ui.space("top"),m=a.ui.space("bottom");b.preventDefaultDropOnElement(k);b.preventDefaultDropOnElement(m);e.attachListener(f,"dragstart",g);e.attachListener(a,"dragstart",b.resetDragDataTransfer,b,null,1);e.attachListener(a,"dragstart",function(c){b.initDragDataTransfer(c,a)},null,null,2);e.attachListener(a,"dragstart",function(){var c=b.dragRange=a.getSelection().getRanges()[0];CKEDITOR.env.ie&&10>CKEDITOR.env.version&&(b.dragStartContainerChildCount= -c?h(c.startContainer):null,b.dragEndContainerChildCount=c?h(c.endContainer):null)},null,null,100);e.attachListener(f,"dragend",g);e.attachListener(a,"dragend",b.initDragDataTransfer,b,null,1);e.attachListener(a,"dragend",b.resetDragDataTransfer,b,null,100);e.attachListener(f,"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()}});e.attachListener(f,"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);e.attachListener(a,"drop",b.initDragDataTransfer,b,null,1);e.attachListener(a,"drop",function(e){if(e=e.data){var h=e.dropRange,f=e.dragRange,g=e.dataTransfer;g.getTransferType(a)==CKEDITOR.DATA_TRANSFER_INTERNAL? -setTimeout(function(){b.internalDrop(f,h,g,a)},0):g.getTransferType(a)==CKEDITOR.DATA_TRANSFER_CROSS_EDITORS?c(f,h,g):d(h,g)}},null,null,9999)})}var m;CKEDITOR.plugins.add("clipboard",{requires:"notification,toolbar",init:function(a){var b,c=C();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);x(a);E(a);if(CKEDITOR.env.gecko){var d=["image/png","image/jpeg","image/gif"], -g;a.on("paste",function(b){var c=b.data,f=c.dataTransfer;if(!c.dataValue&&"paste"==c.method&&f&&1==f.getFilesCount()&&g!=f.id&&(f=f.getFile(0),-1!=CKEDITOR.tools.indexOf(d,f.type))){var k=new FileReader;k.addEventListener("load",function(){b.data.dataValue='\x3cimg src\x3d"'+k.result+'" /\x3e';a.fire("paste",b.data)},!1);k.addEventListener("abort",function(){a.fire("paste",b.data)},!1);k.addEventListener("error",function(){a.fire("paste",b.data)},!1);k.readAsDataURL(f);g=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,n=new CKEDITOR.dom.element("div");for(n.setHtml(b);1==n.getChildCount()&& -(d=n.getFirst())&&d.type==CKEDITOR.NODE_ELEMENT&&(d.hasClass("cke_editable")||d.hasClass("cke_contents"));)n=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,f=b.dataValue,g,m=a.config.clipboard_defaultContentType||"html",n=b.dataTransfer.getTransferType(a);g="html"==d||"html"==b.preSniffing?"html":z(f);delete a._.nextPasteType;"htmlifiedtext"==g&&(f=A(a.config,f));"text"==d&&"html"==g?f=w(a,f,c.get("plain-text")):n==CKEDITOR.DATA_TRANSFER_EXTERNAL&&a.pasteFilter&&!b.dontFilter&&(f=w(a,f,a.pasteFilter));b.startsWithEOL&&(f='\x3cbr data-cke-eol\x3d"1"\x3e'+f);b.endsWithEOL&&(f+='\x3cbr data-cke-eol\x3d"1"\x3e'); -"auto"==d&&(d="html"==g||"html"==m?"html":"text");b.type=d;b.dataValue=f;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)}});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 g=a;g.type==CKEDITOR.NODE_TEXT&&(g=a.getParent());if(g.equals(c)&&d!=c.getChildCount())return a=b.startContainer.getChild(b.startOffset-1),c=b.startContainer.getChild(b.startOffset),a&&a.type==CKEDITOR.NODE_TEXT&&c&&c.type==CKEDITOR.NODE_TEXT&&(d=a.getLength(),a.setText(a.getText()+c.getText()),c.remove(),b.setStart(a,d),b.collapse(!0)),!0}var h=b.startContainer;"number"==typeof d&&"number"==typeof c&&h.type== -CKEDITOR.NODE_ELEMENT&&(g(a.startContainer,h,c)||g(a.endContainer,h,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);(f=this.isDropRangeAffectedByDragRange(a,b))||(e=a.createBookmark(!1));g=b.clone().createBookmark(!1);f&&(e=a.createBookmark(!1));a=e.startNode;b=e.endNode;f=g.startNode;b&&a.getPosition(f)&CKEDITOR.POSITION_PRECEDING&&b.getPosition(f)&CKEDITOR.POSITION_FOLLOWING&&f.insertBefore(a);a=d.createRange();a.moveToBookmark(e);h.extractHtmlFromRange(a,1);b=d.createRange();b.moveToBookmark(g); -r(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,h=b.getSelection(!0).getRanges()[0],e=b.createRange();if(a.data.testRange)return a.data.testRange;if(document.caretRangeFromPoint&&b.document.$.caretRangeFromPoint(d,g))c=b.document.$.caretRangeFromPoint(d,g),e.setStart(CKEDITOR.dom.node(c.startContainer),c.startOffset),e.collapse(!0);else if(c.rangeParent)e.setStart(CKEDITOR.dom.node(c.rangeParent),c.rangeOffset), -e.collapse(!0);else{if(CKEDITOR.env.ie&&8k&&!f;k++){if(!f)try{c.moveToPoint(d,g-k),f=!0}catch(m){}if(!f)try{c.moveToPoint(d,g+k),f=!0}catch(n){}}if(f){var l="cke-temp-"+(new Date).getTime();c.pasteHTML('\x3cspan id\x3d"'+l+'"\x3e​\x3c/span\x3e');var t=b.document.getById(l);e.moveToPosition(t,CKEDITOR.POSITION_BEFORE_START);t.remove()}else{var q= -b.document.$.elementFromPoint(d,g),p=new CKEDITOR.dom.element(q),r;if(p.equals(b.editable())||"html"==p.getName())return h&&h.startContainer&&!h.startContainer.equals(b.editable())?h:null;r=p.getClientRect();d/i,bodyRegExp:/([\s\S]*)<\/body>/i,fragmentRegExp:/\x3c!--(?:Start|End)Fragment--\x3e/g,data:{},files:[],nativeHtmlCache:"",normalizeType:function(b){b= -b.toLowerCase();return"text"==b||"text/plain"==b?"Text":"url"==b?"URL":b}};this._.fallbackDataTransfer=new CKEDITOR.plugins.clipboard.fallbackDataTransfer(this);this.id=this.getData(m);this.id||(this.id="Text"==m?"":"cke-"+CKEDITOR.tools.getUniqueId());b&&(this.sourceEditor=b,this.setData("text/html",b.getSelectedHtml(1)),"Text"==m||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"==m&&"Text"==a&&(this.id=b),this._.fallbackDataTransfer.isRequired())this._.fallbackDataTransfer.setData(a,b);else try{this.$.setData(a,b)}catch(c){}},storeId:function(){"Text"!==m&&this.setData(m,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;cCKEDITOR.env.version?f.createText("\r"):f.createElement("br"),a.deleteContents(),a.insertNode(b),CKEDITOR.env.needsBrFiller?(f.createText("").insertAfter(b),k&&(l||m.blockLimit).appendBogus(),b.getNext().$.nodeValue="",a.setStartAt(b.getNext(),CKEDITOR.POSITION_AFTER_START)): -a.setStartAt(b,CKEDITOR.POSITION_AFTER_END)),a.collapse(!0),a.select(),a.scrollIntoView()):u(b,d,a,h)}}};var x=CKEDITOR.plugins.enterkey,t=x.enterBr,u=x.enterBlock,w=/^h[1-6]$/})();(function(){function k(b,f){var g={},c=[],e={nbsp:" ",shy:"­",gt:"\x3e",lt:"\x3c",amp:"\x26",apos:"'",quot:'"'};b=b.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(b,a){var d=f?"\x26"+a+";":e[a];g[d]=f?e[a]:"\x26"+a+";";c.push(d);return""});if(!f&&b){b=b.split(",");var a=document.createElement("div"),d;a.innerHTML="\x26"+b.join(";\x26")+";";d=a.innerHTML;a=null;for(a=0;aa&&(a=640);420>b&&(b=420);var f=parseInt((window.screen.height-b)/2,10),g=parseInt((window.screen.width-a)/2,10);d=(d||"location\x3dno,menubar\x3dno,toolbar\x3dno,dependent\x3dyes,minimizable\x3dno,modal\x3dyes,alwaysRaised\x3dyes,resizable\x3dyes,scrollbars\x3dyes")+",width\x3d"+ -a+",height\x3d"+b+",top\x3d"+f+",left\x3d"+g;var c=window.open("",null,d,!0);if(!c)return!1;try{-1==navigator.userAgent.toLowerCase().indexOf(" chrome/")&&(c.moveTo(g,f),c.resizeTo(a,b)),c.focus(),c.location.href=e}catch(h){window.open(e,null,d,!0)}return!0}});(function(){function g(a,c){var d=[];if(c)for(var b in c)d.push(b+"\x3d"+encodeURIComponent(c[b]));else return a;return a+(-1!=a.indexOf("?")?"\x26":"?")+d.join("\x26")}function k(a){a+="";return a.charAt(0).toUpperCase()+a.substr(1)}function m(){var a=this.getDialog(),c=a.getParentEditor();c._.filebrowserSe=this;var d=c.config["filebrowser"+k(a.getName())+"WindowWidth"]||c.config.filebrowserWindowWidth||"80%",a=c.config["filebrowser"+k(a.getName())+"WindowHeight"]||c.config.filebrowserWindowHeight|| -"70%",b=this.filebrowser.params||{};b.CKEditor=c.name;b.CKEditorFuncNum=c._.filebrowserFn;b.langCode||(b.langCode=c.langCode);b=g(this.filebrowser.url,b);c.popup(b,d,a,c.config.filebrowserWindowFeatures||c.config.fileBrowserWindowFeatures)}function n(){var a=this.getDialog();a.getParentEditor()._.filebrowserSe=this;return a.getContentElement(this["for"][0],this["for"][1]).getInputElement().$.value&&a.getContentElement(this["for"][0],this["for"][1]).getAction()?!0:!1}function p(a,c,d){var b=d.params|| -{};b.CKEditor=a.name;b.CKEditorFuncNum=a._.filebrowserFn;b.langCode||(b.langCode=a.langCode);c.action=g(d.url,b);c.filebrowser=d}function l(a,c,d,b){if(b&&b.length)for(var e,g=b.length;g--;)if(e=b[g],"hbox"!=e.type&&"vbox"!=e.type&&"fieldset"!=e.type||l(a,c,d,e.children),e.filebrowser)if("string"==typeof e.filebrowser&&(e.filebrowser={action:"fileButton"==e.type?"QuickUpload":"Browse",target:e.filebrowser}),"Browse"==e.filebrowser.action){var f=e.filebrowser.url;void 0===f&&(f=a.config["filebrowser"+ -k(c)+"BrowseUrl"],void 0===f&&(f=a.config.filebrowserBrowseUrl));f&&(e.onClick=m,e.filebrowser.url=f,e.hidden=!1)}else if("QuickUpload"==e.filebrowser.action&&e["for"]&&(f=e.filebrowser.url,void 0===f&&(f=a.config["filebrowser"+k(c)+"UploadUrl"],void 0===f&&(f=a.config.filebrowserUploadUrl)),f)){var h=e.onClick;e.onClick=function(a){var b=a.sender;if(h&&!1===h.call(b,a))return!1;if(n.call(b,a)){a=b.getDialog().getContentElement(this["for"][0],this["for"][1]).getInputElement();if(b=new CKEDITOR.dom.element(a.$.form))(a= -b.$.elements.ckCsrfToken)?a=new CKEDITOR.dom.element(a):(a=new CKEDITOR.dom.element("input"),a.setAttributes({name:"ckCsrfToken",type:"hidden"}),b.append(a)),a.setAttribute("value",CKEDITOR.tools.getCsrfToken());return!0}return!1};e.filebrowser.url=f;e.hidden=!1;p(a,d.getContents(e["for"][0]).get(e["for"][1]),e.filebrowser)}}function h(a,c,d){if(-1!==d.indexOf(";")){d=d.split(";");for(var b=0;bh.height-c.bottom?e("pin"):e("bottom"),d=h.width/2,d=l.floatSpacePreferRight?"right":0n.width?"rtl"==l.contentsLangDirection? -"right":"left":d-c.left>c.right-d?"left":"right",n.width>h.width?(d="left",f=0):(f="left"==d?0h.width&&(d="left"==d?"right":"left",f=0)),b.setStyle(d,w(("pin"==m?u:p)+f+("pin"==m?0:"left"==d?v:-v)))):(m="pin",e("pin"),t(d))}}}();if(p){var k=new CKEDITOR.template('\x3cdiv id\x3d"cke_{name}" class\x3d"cke {id} cke_reset_all cke_chrome cke_editor_{name} cke_float cke_{langDir} '+CKEDITOR.env.cssClass+'" dir\x3d"{langDir}" title\x3d"'+(CKEDITOR.env.gecko? -" ":"")+'" lang\x3d"{langCode}" role\x3d"application" style\x3d"{style}"'+(a.title?' aria-labelledby\x3d"cke_{name}_arialbl"':" ")+"\x3e"+(a.title?'\x3cspan id\x3d"cke_{name}_arialbl" class\x3d"cke_voice_label"\x3e{voiceLabel}\x3c/span\x3e':" ")+'\x3cdiv class\x3d"cke_inner"\x3e\x3cdiv id\x3d"{topId}" class\x3d"cke_top" role\x3d"presentation"\x3e{content}\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e'),b=CKEDITOR.document.getBody().append(CKEDITOR.dom.element.createFromHtml(k.output({content:p,id:a.id,langDir:a.lang.dir, -langCode:a.langCode,name:a.name,style:"display:none;z-index:"+(l.baseFloatZIndex-1),topId:a.ui.spaceId("top"),voiceLabel:a.title}))),u=CKEDITOR.tools.eventsBuffer(500,t),e=CKEDITOR.tools.eventsBuffer(100,t);b.unselectable();b.on("mousedown",function(a){a=a.data;a.getTarget().hasAscendant("a",1)||a.preventDefault()});a.on("focus",function(b){t(b);a.on("change",u.input);g.on("scroll",e.input);g.on("resize",e.input)});a.on("blur",function(){b.hide();a.removeListener("change",u.input);g.removeListener("scroll", -e.input);g.removeListener("resize",e.input)});a.on("destroy",function(){g.removeListener("scroll",e.input);g.removeListener("resize",e.input);b.clearCustomData();b.remove()});a.focusManager.hasFocus&&b.show();a.focusManager.add(b,1)}}var g=CKEDITOR.document.getWindow(),w=CKEDITOR.tools.cssLength;CKEDITOR.plugins.add("floatingspace",{init:function(a){a.on("loaded",function(){k(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'),g=CKEDITOR.addTemplate("panel-list-item",'\x3cli id\x3d"{id}" class\x3d"cke_panel_listItem" role\x3dpresentation\x3e\x3ca id\x3d"{id}_option" _cke_focus\x3d1 hidefocus\x3dtrue title\x3d"{title}" 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'), -h=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(a,b){return this.addBlock(a,new CKEDITOR.ui.listBlock(this.getHolderElement(),b))};CKEDITOR.ui.listBlock=CKEDITOR.tools.createClass({base:CKEDITOR.ui.panel.block,$:function(a,b){b=b||{};var c=b.attributes||(b.attributes={});(this.multiSelect=!!b.multiSelect)&&(c["aria-multiselectable"]=!0);!c.role&& -(c.role="listbox");this.base.apply(this,arguments);this.element.setAttribute("role",c.role);c=this.keys;c[40]="next";c[9]="next";c[38]="prev";c[CKEDITOR.SHIFT+9]="prev";c[32]=CKEDITOR.env.ie?"mouseup":"click";CKEDITOR.env.ie&&(c[13]="mouseup");this._.pendingHtml=[];this._.pendingList=[];this._.items={};this._.groups={}},_:{close:function(){if(this._.started){var a=f.output({items:this._.pendingList.join("")});this._.pendingList=[];this._.pendingHtml.push(a);delete this._.started}},getClick:function(){this._.click|| -(this._.click=CKEDITOR.tools.addFunction(function(a){var b=this.toggle(a);if(this.onClick)this.onClick(a,b)},this));return this._.click}},proto:{add:function(a,b,c){var d=CKEDITOR.tools.getNextId();this._.started||(this._.started=1,this._.size=this._.size||0);this._.items[a]=d;var e;e=CKEDITOR.tools.htmlEncodeAttr(a).replace(k,"\\'");a={id:d,val:e,onclick:CKEDITOR.env.ie?'onclick\x3d"return false;" onmouseup':"onclick",clickFn:this._.getClick(),title:CKEDITOR.tools.htmlEncodeAttr(c||a),text:b||a}; -this._.pendingList.push(g.output(a))},startGroup:function(a){this._.close();var b=CKEDITOR.tools.getNextId();this._.groups[a]=b;this._.pendingHtml.push(h.output({id:b,label:a}))},commit:function(){this._.close();this.element.appendHtml(this._.pendingHtml.join(""));delete this._.size;this._.pendingHtml=[]},toggle:function(a){var b=this.isMarked(a);b?this.unmark(a):this.mark(a);return!b},hideGroup:function(a){var b=(a=this.element.getDocument().getById(this._.groups[a]))&&a.getNext();a&&(a.setStyle("display", -"none"),b&&"ul"==b.getName()&&b.setStyle("display","none"))},hideItem:function(a){this.element.getDocument().getById(this._.items[a]).setStyle("display","none")},showAll:function(){var a=this._.items,b=this._.groups,c=this.element.getDocument(),d;for(d in a)c.getById(a[d]).setStyle("display","");for(var e in b)a=c.getById(b[e]),d=a.getNext(),a.setStyle("display",""),d&&"ul"==d.getName()&&d.setStyle("display","")},mark:function(a){this.multiSelect||this.unmarkAll();a=this._.items[a];var b=this.element.getDocument().getById(a); -b.addClass("cke_selected");this.element.getDocument().getById(a+"_option").setAttribute("aria-selected",!0);this.onMark&&this.onMark(b)},markFirstDisplayed:function(){var a=this;this._.markFirstDisplayed(function(){a.multiSelect||a.unmarkAll()})},unmark:function(a){var b=this.element.getDocument();a=this._.items[a];var c=b.getById(a);c.removeClass("cke_selected");b.getById(a+"_option").removeAttribute("aria-selected");this.onUnmark&&this.onUnmark(c)},unmarkAll:function(){var a=this._.items,b=this.element.getDocument(), -c;for(c in a){var d=a[c];b.getById(d).removeClass("cke_selected");b.getById(d+"_option").removeAttribute("aria-selected")}this.onUnmark&&this.onUnmark()},isMarked:function(a){return this.element.getDocument().getById(this._.items[a]).hasClass("cke_selected")},focus:function(a){this._.focusIndex=-1;var b=this.element.getElementsByTag("a"),c,d=-1;if(a)for(c=this.element.getDocument().getById(this._.items[a]).getFirst();a=b.getItem(++d);){if(a.equals(c)){this._.focusIndex=d;break}}else this.element.focus(); -c&&setTimeout(function(){c.focus()},0)}}})}});CKEDITOR.plugins.add("richcombo",{requires:"floatpanel,listblock,button",beforeInit:function(c){c.ui.addHandler(CKEDITOR.UI_RICHCOMBO,CKEDITOR.ui.richCombo.handler)}}); -(function(){var c='\x3cspan id\x3d"{id}" class\x3d"cke_combo cke_combo__{name} {cls}" role\x3d"presentation"\x3e\x3cspan id\x3d"{id}_label" class\x3d"cke_combo_label"\x3e{label}\x3c/span\x3e\x3ca class\x3d"cke_combo_button" title\x3d"{title}" tabindex\x3d"-1"'+(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&&(c+=' onkeypress\x3d"return false;"'); -CKEDITOR.env.gecko&&(c+=' onblur\x3d"this.style.cssText \x3d this.style.cssText;"');var c=c+(' 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"),k=CKEDITOR.addTemplate("combo",c);CKEDITOR.UI_RICHCOMBO="richcombo";CKEDITOR.ui.richCombo=CKEDITOR.tools.createClass({$:function(a){CKEDITOR.tools.extend(this,a,{canGroup:!1,title:a.label,modes:{wysiwyg:1},editorFocus:1});a=this.panel||{};delete this.panel;this.id=CKEDITOR.tools.getNextNumber();this.document=a.parent&&a.parent.getDocument()||CKEDITOR.document;a.className="cke_combopanel"; -a.block={multiSelect:a.multiSelect,attributes:a.attributes};a.toolbarRelated=!0;this._={panelDefinition:a,items:{}}},proto:{renderHtml:function(a){var b=[];this.render(a,b);return b.join("")},render:function(a,b){function f(){if(this.getState()!=CKEDITOR.TRISTATE_ON){var b=this.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED;a.readOnly&&!this.readOnly&&(b=CKEDITOR.TRISTATE_DISABLED);this.setState(b);this.setValue("");b!=CKEDITOR.TRISTATE_DISABLED&&this.refresh&&this.refresh()}}var c= -CKEDITOR.env,h="cke_"+this.id,e=CKEDITOR.tools.addFunction(function(b){l&&(a.unlockSelection(1),l=0);g.execute(b)},this),d=this,g={id:h,combo:this,focus:function(){CKEDITOR.document.getById(h).getChild(1).focus()},execute:function(b){var c=d._;if(c.state!=CKEDITOR.TRISTATE_DISABLED)if(d.createPanel(a),c.on)c.panel.hide();else{d.commit();var f=d.getValue();f?c.list.mark(f):c.list.unmarkAll();c.panel.showBlock(d.id,new CKEDITOR.dom.element(b),4)}},clickFn:e};a.on("activeFilterChange",f,this);a.on("mode", -f,this);a.on("selectionChange",f,this);!this.readOnly&&a.on("readOnly",f,this);var m=CKEDITOR.tools.addFunction(function(a,b){a=new CKEDITOR.dom.event(a);var d=a.getKeystroke();switch(d){case 13:case 32:case 40:CKEDITOR.tools.callFunction(e,b);break;default:g.onkey(g,d)}a.preventDefault()}),n=CKEDITOR.tools.addFunction(function(){g.onfocus&&g.onfocus()}),l=0;g.keyDownFn=m;c={id:h,name:this.name||this.command,label:this.label,title:this.title,cls:this.className||"",titleJs:c.gecko&&!c.hc?"":(this.title|| -"").replace("'",""),keydownFn:m,focusFn:n,clickFn:e};k.output(c,b);if(this.onRender)this.onRender();return g},createPanel:function(a){if(!this._.panel){var b=this._.panelDefinition,c=this._.panelDefinition.block,k=b.parent||CKEDITOR.document.getBody(),h="cke_combopanel__"+this.name,e=new CKEDITOR.ui.floatPanel(a,k,b),b=e.addListBlock(this.id,c),d=this;e.onShow=function(){this.element.addClass(h);d.setState(CKEDITOR.TRISTATE_ON);d._.on=1;d.editorFocus&&!a.focusManager.hasFocus&&a.focus();if(d.onOpen)d.onOpen()}; -e.onHide=function(b){this.element.removeClass(h);d.setState(d.modes&&d.modes[a.mode]?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED);d._.on=0;if(!b&&d.onClose)d.onClose()};e.onEscape=function(){e.hide(1)};b.onClick=function(a,b){d.onClick&&d.onClick.call(d,a,b);e.hide()};this._.panel=e;this._.list=b;e.getBlock(this.id).onHide=function(){d._.on=0;d.setState(CKEDITOR.TRISTATE_OFF)};this.init&&this.init()}},setValue:function(a,b){this._.value=a;var c=this.document.getById("cke_"+this.id+"_text");c&& -(a||b?c.removeClass("cke_combo_inlinelabel"):(b=this.label,c.addClass("cke_combo_inlinelabel")),c.setText("undefined"!=typeof b?b:a))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(a){this._.list.mark(a)},hideItem:function(a){this._.list.hideItem(a)},hideGroup:function(a){this._.list.hideGroup(a)},showAll:function(){this._.list.showAll()},add:function(a,b,c){this._.items[a]=c||a;this._.list.add(a,b,c)},startGroup:function(a){this._.list.startGroup(a)}, -commit:function(){this._.committed||(this._.list.commit(),this._.committed=1,CKEDITOR.ui.fire("ready",this));this._.committed=1},setState:function(a){if(this._.state!=a){var b=this.document.getById("cke_"+this.id);b.setState(a,"cke_combo");a==CKEDITOR.TRISTATE_DISABLED?b.setAttribute("aria-disabled",!0):b.removeAttribute("aria-disabled");this._.state=a}},getState:function(){return this._.state},enable:function(){this._.state==CKEDITOR.TRISTATE_DISABLED&&this.setState(this._.lastState)},disable:function(){this._.state!= -CKEDITOR.TRISTATE_DISABLED&&(this._.lastState=this._.state,this.setState(CKEDITOR.TRISTATE_DISABLED))}},statics:{handler:{create:function(a){return new CKEDITOR.ui.richCombo(a)}}}});CKEDITOR.ui.prototype.addRichCombo=function(a,b){this.add(a,CKEDITOR.UI_RICHCOMBO,b)}})();(function(){function p(b,f,e,d,r,p,v,x){var y=b.config,t=new CKEDITOR.style(v),g=r.split(";");r=[];for(var k={},l=0;l=this.rect.right||a<=this.rect.top||a>=this.rect.bottom)&&this.hideVisible();(0>=b||b>=this.winTopPane.width||0>=a||a>=this.winTopPane.height)&&this.hideVisible()},this);b.attachListener(a,"resize",c);b.attachListener(a,"mode",g);a.on("destroy",g);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({}, -t,this.lineStyle,!0)),tipLeftStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},q,{left:"0px","border-left-color":"red","border-width":"6px 0 6px 6px"},this.tipCss,this.tipLeftStyle,!0)),tipRightStyle:CKEDITOR.tools.writeCssText(CKEDITOR.tools.extend({},q,{right:"0px","border-right-color":"red","border-width":"6px 6px 6px 0"},this.tipCss,this.tipRightStyle,!0))})}function l(a){var d;if(d=a&&a.type==CKEDITOR.NODE_ELEMENT)d=!(r[a.getComputedStyle("float")]||r[a.getAttribute("align")]);return d&& -!u[a.getComputedStyle("position")]}CKEDITOR.plugins.add("lineutils");CKEDITOR.LINEUTILS_BEFORE=1;CKEDITOR.LINEUTILS_AFTER=2;CKEDITOR.LINEUTILS_INSIDE=4;m.prototype={start:function(a){var d=this,b=this.editor,c=this.doc,e,g,f,h,k=CKEDITOR.tools.eventsBuffer(50,function(){b.readOnly||"wysiwyg"!=b.mode||(d.relations={},(g=c.$.elementFromPoint(f,h))&&g.nodeType&&(e=new CKEDITOR.dom.element(g),d.traverseSearch(e),isNaN(f+h)||d.pixelSearch(e,f,h),a&&a(d.relations,f,h)))});this.listener=this.editable.attachListener(this.target, -"mousemove",function(a){f=a.data.$.clientX;h=a.data.$.clientY;k.input()});this.editable.attachListener(this.inline?this.editable:this.frame,"mouseout",function(){k.reset()})},stop:function(){this.listener&&this.listener.removeListener()},getRange:function(){var a={};a[CKEDITOR.LINEUTILS_BEFORE]=CKEDITOR.POSITION_BEFORE_START;a[CKEDITOR.LINEUTILS_AFTER]=CKEDITOR.POSITION_AFTER_END;a[CKEDITOR.LINEUTILS_INSIDE]=CKEDITOR.POSITION_AFTER_START;return function(d){var b=this.editor.createRange();b.moveToPosition(this.relations[d.uid].element, -a[d.type]);return b}}(),store:function(){function a(a,b,c){var e=a.getUniqueId();e in c?c[e].type|=b:c[e]={element:a,type:b}}return function(d,b){var c;b&CKEDITOR.LINEUTILS_AFTER&&l(c=d.getNext())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),b^=CKEDITOR.LINEUTILS_AFTER);b&CKEDITOR.LINEUTILS_INSIDE&&l(c=d.getFirst())&&c.isVisible()&&(a(c,CKEDITOR.LINEUTILS_BEFORE,this.relations),b^=CKEDITOR.LINEUTILS_INSIDE);a(d,b,this.relations)}}(),traverseSearch:function(a){var d,b,c;do if(c=a.$["data-cke-expando"], -!(c&&c in this.relations)){if(a.equals(this.editable))break;if(l(a))for(d in this.lookups)(b=this.lookups[d](a))&&this.store(a,b)}while((!a||a.type!=CKEDITOR.NODE_ELEMENT||"true"!=a.getAttribute("contenteditable"))&&(a=a.getParent()))},pixelSearch:function(){function a(a,c,e,g,f){for(var h=0,k;f(e);){e+=g;if(25==++h)break;if(k=this.doc.$.elementFromPoint(c,e))if(k==a)h=0;else if(d(a,k)&&(h=0,l(k=new CKEDITOR.dom.element(k))))return k}}var d=CKEDITOR.env.ie||CKEDITOR.env.webkit?function(a,c){return a.contains(c)}: -function(a,c){return!!(a.compareDocumentPosition(c)&16)};return function(b,c,d){var g=this.win.getViewPaneSize().height,f=a.call(this,b.$,c,d,-1,function(a){return 0this.rect.bottom)return!1;this.inline? -e.left=b.elementRect.left-this.rect.relativeX:(0[^<]*d});0>e&&(e=a._.upcasts.length);a._.upcasts.splice(e,0,[CKEDITOR.tools.bind(b,c),c.name,d])}var e=b.upcast,f=b.upcastPriority||10;e&&("string"==typeof e?d(c,b,f):d(e,b,f))}function t(a,b){a.focused=null;if(b.isInited()){var c=b.editor.checkDirty();a.fire("widgetBlurred",{widget:b});b.setFocused(!1);!c&&b.editor.resetDirty()}}function K(a){a=a.data;if("wysiwyg"== -this.editor.mode){var b=this.editor.editable(),c=this.instances,d,e,f,h;if(b){for(d in c)c[d].isReady()&&!b.contains(c[d].wrapper)&&this.destroy(c[d],!0);if(a&&a.initOnlyNew)c=this.initOnAll();else{var l=b.find(".cke_widget_wrapper"),c=[];d=0;for(e=l.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,h,g;a.editor.fire("lockSnapshot");for(f&& -(h=a.focused)&&t(a,h);h=d.pop();)b.splice(CKEDITOR.tools.indexOf(b,h),1),h.isInited()&&(g=h.editor.checkDirty(),h.setSelected(!1),!g&&h.editor.resetDirty());f&&e&&(g=a.editor.checkDirty(),a.focused=e,a.fire("widgetFocused",{widget:e}),e.setFocused(!0),!g&&a.editor.resetDirty());for(;h=c.pop();)b.push(h),h.setSelected(!0);a.editor.fire("unlockSnapshot")}}}function D(a,b,c){var d=0;b=E(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 F(a){a.cancel()}function B(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),h=d.createElement(f),f=CKEDITOR.env.ie&&9>CKEDITOR.env.version;h.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 g=c.createRange();g.setStartBefore(a.wrapper);g.setEndAfter(a.wrapper);e.setHtml('\x3cspan data-cke-copybin-start\x3d"1"\x3e​\x3c/span\x3e'+c.editable().getHtmlFromRange(g).getHtml()+'\x3cspan data-cke-copybin-end\x3d"1"\x3e​\x3c/span\x3e');c.fire("saveSnapshot");c.fire("lockSnapshot");h.append(e);c.editable().append(h);var k=c.on("selectionChange",F,null,null,0),m=a.repository.on("checkSelection",F,null,null,0);if(f)var n=d.getDocumentElement().$,p=n.scrollTop;g=c.createRange(); -g.selectNodeContents(e);g.select();f&&(n.scrollTop=p);setTimeout(function(){b||a.focus();h.remove();k.removeListener();m.removeListener();c.fire("unlockSnapshot");b&&(a.repository.del(a),c.fire("saveSnapshot"))},100)}}function E(a){return(a=(a=a.getDefinition().attributes)&&a["class"])?a.split(/\s+/):null}function G(){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 H(){CKEDITOR.env.gecko&& -this.editor.unlockSelection();CKEDITOR.env.webkit||(this.editor.forceNextSelectionCheck(),this.editor.selectionChange(1))}function Y(a){var b=null;a.on("data",function(){var a=this.data.classes,d;if(b!=a){for(d in b)a&&a[d]||this.removeClass(d);for(d in a)this.addClass(d);b=a}})}function Z(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 aa(a){if(a.draggable){var b=a.editor,c=a.wrapper.getLast(g.isDomDragHandlerContainer),d;c?d=c.findOne("img"):(c=new CKEDITOR.dom.element("span",b.document),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",ba,a),CKEDITOR.env.ie&&9>CKEDITOR.env.version))d.on("dragstart",function(a){a.data.preventDefault(!0)}); -a.dragHandlerContainer=c}}function ba(a){function b(){var b;for(q.reset();b=g.pop();)b.removeListener();var c=k;b=a.sender;var d=this.repository.finder,e=this.repository.liner,f=this.editor,h=this.editor.editable();CKEDITOR.tools.isEmpty(e.visible)||(c=d.getRange(c[0]),this.focus(),f.fire("drop",{dropRange:c,target:c.startContainer}));h.removeClass("cke_widget_dragging");e.hideVisible();f.fire("dragend",{target:b})}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,h=f.editable(),g=[],k=[],m,n;this.repository._.draggedWidget=this;var p=c.greedySearch(),q=CKEDITOR.tools.eventsBuffer(50,function(){m=d.locate(p);k=d.sort(n,1);k.length&&(e.prepare(p,m),e.placeLine(k[0]),e.cleanup())});h.addClass("cke_widget_dragging");g.push(h.on("mousemove",function(a){n=a.data.$.clientY;q.input()}));f.fire("dragstart",{target:a.sender});g.push(f.document.once("mouseup",b,this));h.isInline()||g.push(CKEDITOR.document.once("mouseup", -b,this))}}function ca(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 da(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 ea(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 Q(a,b){fa(a);ea(a);ca(a);da(a);aa(a);Y(a);Z(a);if(CKEDITOR.env.ie&&9>CKEDITOR.env.version)a.wrapper.on("dragstart",function(b){var d=b.data.getTarget();g.getNestedEditable(a,d)||a.inline&&g.isDomDragHandler(d)||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){B(a,b==CKEDITOR.CTRL+88);return}if(b in ga||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 fa(a){(a.wrapper=a.element.getParent()).setAttribute("data-cke-widget-id",a.id)}function r(a){a.element.data("cke-widget-data",encodeURIComponent(JSON.stringify(a.data)))}function ha(){function a(){}function b(a,b,c){return c&&this.checkElement(a)?(a=c.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 f=0,h=this.group.length;f)?(?:<(?:div|span)(?: style="[^"]+")?>)?]*data-cke-copybin-start="1"[^>]*>.?<\/span>([\s\S]+)]*data-cke-copybin-end="1"[^>]*>.?<\/span>(?:<\/(?:div|span)>)?(?:<\/(?:div|span)>)?$/i, -ga={37:1,38:1,39:1,40:1,8:1,46:1};CKEDITOR.plugins.widget=g;g.repository=p;g.nestedEditable=q})();(function(){function D(a){function b(){this.deflated||(a.widgets.focused==this.widget&&(this.focused=!0),a.widgets.destroy(this.widget),this.deflated=!0)}function c(){var d=a.editable(),e=a.document;if(this.deflated)this.widget=a.widgets.initOn(this.element,"image",this.widget.data),this.widget.inline&&!(new CKEDITOR.dom.elementPath(this.widget.wrapper,d)).block&&(d=e.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div"),d.replace(this.widget.wrapper),this.widget.wrapper.move(d)),this.focused&& -(this.widget.focus(),delete this.focused),delete this.deflated;else{var b=this.widget,d=g,e=b.wrapper,c=b.data.align,b=b.data.hasCaption;if(d){for(var l=3;l--;)e.removeClass(d[l]);"center"==c?b&&e.addClass(d[1]):"none"!=c&&e.addClass(d[q[c]])}else"center"==c?(b?e.setStyle("text-align","center"):e.removeStyle("text-align"),e.removeStyle("float")):("none"==c?e.removeStyle("float"):e.setStyle("float",c),e.removeStyle("text-align"))}}var g=a.config.image2_alignClasses,f=a.config.image2_captionedClass; -return{allowedContent:E(a),requiredContent:"img[src,alt]",features:F(a),styleableElements:"img figure",contentTransformations:[["img[width]: sizeToAttribute"]],editables:{caption:{selector:"figcaption",allowedContent:"br em strong sub sup u s; a[!href,target]"}},parts:{image:"img",caption:"figcaption"},dialog:"image2",template:'\x3cimg alt\x3d"" src\x3d"" /\x3e',data:function(){var d=this.features;this.data.hasCaption&&!a.filter.checkFeature(d.caption)&&(this.data.hasCaption=!1);"none"==this.data.align|| -a.filter.checkFeature(d.align)||(this.data.align="none");this.shiftState({widget:this,element:this.element,oldData:this.oldData,newData:this.data,deflate:b,inflate:c});this.data.link?this.parts.link||(this.parts.link=this.parts.image.getParent()):this.parts.link&&delete this.parts.link;this.parts.image.setAttributes({src:this.data.src,"data-cke-saved-src":this.data.src,alt:this.data.alt});if(this.oldData&&!this.oldData.hasCaption&&this.data.hasCaption)for(var e in this.data.classes)this.parts.image.removeClass(e); -if(a.filter.checkFeature(d.dimension)){d=this.data;d={width:d.width,height:d.height};e=this.parts.image;for(var g in d)d[g]?e.setAttribute(g,d[g]):e.removeAttribute(g)}this.oldData=CKEDITOR.tools.extend({},this.data)},init:function(){var d=CKEDITOR.plugins.image2,b=this.parts.image,c={hasCaption:!!this.parts.caption,src:b.getAttribute("src"),alt:b.getAttribute("alt")||"",width:b.getAttribute("width")||"",height:b.getAttribute("height")||"",lock:this.ready?d.checkHasNaturalRatio(b):!0},f=b.getAscendant("a"); -f&&this.wrapper.contains(f)&&(this.parts.link=f);c.align||(b=c.hasCaption?this.element:b,g?(b.hasClass(g[0])?c.align="left":b.hasClass(g[2])&&(c.align="right"),c.align?b.removeClass(g[q[c.align]]):c.align="none"):(c.align=b.getStyle("float")||"none",b.removeStyle("float")));a.plugins.link&&this.parts.link&&(c.link=d.getLinkAttributesParser()(a,this.parts.link),(b=c.link.advanced)&&b.advCSSClasses&&(b.advCSSClasses=CKEDITOR.tools.trim(b.advCSSClasses.replace(/cke_\S+/,""))));this.wrapper[(c.hasCaption? -"remove":"add")+"Class"]("cke_image_nocaption");this.setData(c);a.filter.checkFeature(this.features.dimension)&&!0!==a.config.image2_disableResizer&&1!=a.readOnly&&G(this);this.shiftState=d.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){m(this).addClass(a)},hasClass:function(a){return m(this).hasClass(a)}, -removeClass:function(a){m(this).removeClass(a)},getClasses:function(){var a=new RegExp("^("+[].concat(f,g).join("|")+")$");return function(){var b=this.repository.parseElementClasses(m(this).getAttribute("class")),c;for(c in b)a.test(c)&&delete b[c];return b}}(),upcast:H(a),downcast:I(a),getLabel:function(){return this.editor.lang.widget.label.replace(/%1/,(this.data.alt||"")+" "+this.pathName)}}}function H(a){var b=n(a),c=a.config.image2_captionedClass;return function(a,f){var d={width:1,height:1}, -e=a.name,h;if(!a.attributes["data-cke-realelement"]&&(b(a)?("div"==e&&(h=a.getFirst("figure"))&&(a.replaceWith(h),a=h),f.align="center",h=a.getFirst("img")||a.getFirst("a").getFirst("img")):"figure"==e&&a.hasClass(c)?h=a.getFirst("img")||a.getFirst("a").getFirst("img"):r(a)&&(h="a"==a.name?a.children[0]:a),h)){for(var C in d)(d=h.attributes[C])&&d.match(J)&&delete h.attributes[C];return a}}}function I(a){var b=a.config.image2_alignClasses;return function(a){var g="a"==a.name?a.getFirst():a,f=g.attributes, -d=this.data.align;if(!this.inline){var e=a.getFirst("span");e&&e.replaceWith(e.getFirst({img:1,a:1}))}d&&"none"!=d&&(e=CKEDITOR.tools.parseCssText(f.style||""),"center"==d&&"figure"==a.name?a=a.wrapWith(new CKEDITOR.htmlParser.element("div",b?{"class":b[1]}:{style:"text-align:center"})):d in{left:1,right:1}&&(b?g.addClass(b[q[d]]):e["float"]=d),b||CKEDITOR.tools.isEmpty(e)||(f.style=CKEDITOR.tools.writeCssText(e)));return a}}function n(a){var b=a.config.image2_captionedClass,c=a.config.image2_alignClasses, -g={figure:1,a:1,img:1};return function(f){if(!(f.name in{div:1,p:1}))return!1;var d=f.children;if(1!==d.length)return!1;d=d[0];if(!(d.name in g))return!1;if("p"==f.name){if(!r(d))return!1}else if("figure"==d.name){if(!d.hasClass(b))return!1}else if(a.enterMode==CKEDITOR.ENTER_P||!r(d))return!1;return(c?f.hasClass(c[1]):"center"==CKEDITOR.tools.parseCssText(f.attributes.style||"",!0)["text-align"])?!0:!1}}function r(a){return"img"==a.name?!0:"a"==a.name?1==a.children.length&&a.getFirst("img"):!1}function G(a){var b= -a.editor,c=b.editable(),g=b.document,f=a.resizer=g.createElement("span");f.addClass("cke_image_resizer");f.setAttribute("title",b.lang.image2.resizer);f.append(new CKEDITOR.dom.text("​",g));if(a.inline)a.wrapper.append(f);else{var d=a.parts.link||a.parts.image,e=d.getParent(),h=g.createElement("span");h.addClass("cke_image_resizer_wrapper");h.append(d);h.append(f);a.element.append(h,!0);e.is("span")&&e.remove()}f.on("mousedown",function(d){function l(a,b,d){var l=CKEDITOR.document,c=[];g.equals(l)|| -c.push(l.on(a,b));c.push(g.on(a,b));if(d)for(a=c.length;a--;)d.push(c.pop())}function e(){t=m+A*x;u=Math.round(t/v)}function w(){u=q-p;t=Math.round(u*v)}var h=a.parts.image,A="right"==a.data.align?-1:1,k=d.data.$.screenX,K=d.data.$.screenY,m=h.$.clientWidth,q=h.$.clientHeight,v=m/q,n=[],r="cke_image_s"+(~A?"e":"w"),B,t,u,z,x,p,y;b.fire("saveSnapshot");l("mousemove",function(a){B=a.data.$;x=B.screenX-k;p=K-B.screenY;y=Math.abs(x/p);1==A?0>=x?0>=p?e():y>=v?e():w():0>=p?y>=v?w():e():w():0>=x?0>=p?y>= -v?w():e():w():0>=p?e():y>=v?e():w();15<=t&&15<=u?(h.setAttributes({width:t,height:u}),z=!0):z=!1},n);l("mouseup",function(){for(var d;d=n.pop();)d.removeListener();c.removeClass(r);f.removeClass("cke_image_resizing");z&&(a.setData({width:t,height:u}),b.fire("saveSnapshot"));z=!1},n);c.addClass(r);f.addClass("cke_image_resizing")});a.on("data",function(){f["right"==a.data.align?"addClass":"removeClass"]("cke_image_resizer_left")})}function L(a){var b=[],c;return function(g){var f=a.getCommand("justify"+ -g);if(f){b.push(function(){f.refresh(a,a.elementPath())});if(g in{right:1,left:1,center:1})f.on("exec",function(d){var c=k(a);if(c){c.setData("align",g);for(c=b.length;c--;)b[c]();d.cancel()}});f.on("refresh",function(b){var f=k(a),h={right:1,left:1,center:1};f&&(void 0===c&&(c=a.filter.checkFeature(a.widgets.registered.image.features.align)),c?this.setState(f.data.align==g?CKEDITOR.TRISTATE_ON:g in h?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED):this.setState(CKEDITOR.TRISTATE_DISABLED),b.cancel())})}}} -function M(a){a.plugins.link&&(CKEDITOR.on("dialogDefinition",function(b){b=b.data;if("link"==b.name){b=b.definition;var c=b.onShow,g=b.onOk;b.onShow=function(){var b=k(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=k(a);if(b&&(b.inline?!b.wrapper.getAscendant("a"):1)){var c={};this.commitContent(c);b.setData("link", -c)}else g.apply(this,arguments)}}}),a.getCommand("unlink").on("exec",function(b){var c=k(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=k(a);c&&(this.setState(c.data.link||c.wrapper.getAscendant("a")?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED),b.cancel())}))}function k(a){return(a=a.widgets.focused)&&"image"==a.name?a:null}function E(a){var b=a.config.image2_alignClasses;a={div:{match:n(a)},p:{match:n(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 F(a){a=a.config.image2_alignClasses;return{dimension:{requiredContent:"img[width,height]"},align:{requiredContent:"img"+(a?"("+a[0]+")":"{float}")},caption:{requiredContent:"figcaption"}}} -function m(a){return a.data.hasCaption?a.element:a.parts.image}var N=new CKEDITOR.template('\x3cfigure class\x3d"{captionedClass}"\x3e\x3cimg alt\x3d"" src\x3d"" /\x3e\x3cfigcaption\x3e{captionPlaceholder}\x3c/figcaption\x3e\x3c/figure\x3e'),q={left:0,center:1,right:2},J=/^\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){var b=a.config,c=a.lang.image2,g=D(a);b.filebrowserImage2BrowseUrl=b.filebrowserImageBrowseUrl;b.filebrowserImage2UploadUrl=b.filebrowserImageUploadUrl;g.pathName=c.pathName;g.editables.caption.pathName=c.pathNameCaption;a.widgets.add("image",g);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 b={left:1,right:1,center:1,block:1},c=L(a),g;for(g in b)c(g);M(a)}});CKEDITOR.plugins.image2={stateShifter:function(a){function b(a,b){var d={};f?d.attributes={"class":f[1]}:d.styles={"text-align":"center"};d=g.createElement(a.activeEnterMode==CKEDITOR.ENTER_P?"p":"div",d);c(d,b);b.move(d);return d}function c(b,d){if(d.getParent()){var c=a.createRange();c.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();e.insertElementIntoRange(b, -c)}else b.replace(d)}var g=a.document,f=a.config.image2_alignClasses,d=a.config.image2_captionedClass,e=a.editable(),h=["hasCaption","align","link"],k={align:function(d,c,g){var e=d.element;d.changed.align?d.newData.hasCaption||("center"==g&&(d.deflate(),d.element=b(a,e)),d.changed.hasCaption||"center"!=c||"center"==g||(d.deflate(),c=e.findOne("a,img"),c.replace(e),d.element=c)):"center"==g&&d.changed.hasCaption&&!d.newData.hasCaption&&(d.deflate(),d.element=b(a,e));!f&&e.is("figure")&&("center"== -g?e.setStyle("display","inline-block"):e.removeStyle("display"))},hasCaption:function(b,e,f){b.changed.hasCaption&&(e=b.element.is({img:1,a:1})?b.element:b.element.findOne("a,img"),b.deflate(),f?(f=CKEDITOR.dom.element.createFromHtml(N.output({captionedClass:d,captionPlaceholder:a.lang.image2.captionPlaceholder}),g),c(f,b.element),e.replace(f.findOne("img")),b.element=f):(e.replace(b.element),b.element=e))},link:function(b,d,c){if(b.changed.link){var e=b.element.is("img")?b.element:b.element.findOne("img"), -f=b.element.is("a")?b.element:b.element.findOne("a"),h=b.element.is("a")&&!c||b.element.is("img")&&c,k;h&&b.deflate();c?(d||(k=g.createElement("a",{attributes:{href:b.newData.link.url}}),k.replace(e),e.move(k)),c=CKEDITOR.plugins.image2.getLinkAttributesGetter()(a,c),CKEDITOR.tools.isEmpty(c.set)||(k||f).setAttributes(c.set),c.removed.length&&(k||f).removeAttributes(c.removed)):(c=f.findOne("img"),c.replace(f),k=c);h&&(b.element=k)}}};return function(a){var b,c;a.changed={};for(c=0;c(a+=l?1:-1))return;a=Math.min(a,c.length);a=Math.max(a,0);b.$.className=CKEDITOR.tools.ltrim(b.$.className.replace(this.classNameRegex,""));0a)return;a=Math.max(a, -0);a=Math.ceil(a/g)*g;b.setStyle(c,a?a+(d.config.indentUnit||"px"):"");""===b.getAttribute("style")&&b.removeAttribute("style")}CKEDITOR.dom.element.setMarker(this.database,b,"indent_processed",1)}}function m(b,c){return"ltr"==(c||b.getComputedStyle("direction"))?"margin-left":"margin-right"}var h=CKEDITOR.dtd.$listItem,p=CKEDITOR.dtd.$list,k=CKEDITOR.TRISTATE_DISABLED,n=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentblock",{requires:"indent",init:function(b){function c(){a.specificDefinition.apply(this, -arguments);this.allowedContent={"div h1 h2 h3 h4 h5 h6 ol p pre ul":{propertiesOnly:!0,styles:d?null:"margin-left,margin-right",classes:d||null}};this.contentTransformations=[["div: splitMarginShorthand"],["h1: splitMarginShorthand"],["h2: splitMarginShorthand"],["h3: splitMarginShorthand"],["h4: splitMarginShorthand"],["h5: splitMarginShorthand"],["h6: splitMarginShorthand"],["ol: splitMarginShorthand"],["p: splitMarginShorthand"],["pre: splitMarginShorthand"],["ul: splitMarginShorthand"]];this.enterBr&& -(this.allowedContent.div=!0);this.requiredContent=(this.enterBr?"div":"p")+(d?"("+d.join(",")+")":"{margin-left}");this.jobs={20:{refresh:function(a,b){var e=b.block||b.blockLimit;if(!e.is(h))var c=e.getAscendant(h),e=c&&b.contains(c)||e;e.is(h)&&(e=e.getParent());if(this.enterBr||this.getContext(b)){if(d){var c=d,e=e.$.className.match(this.classNameRegex),f=this.isIndent,c=e?f?e[1]!=c.slice(-1):!0:f;return c?n:k}return this.isIndent?n:e?CKEDITOR[0>=(parseInt(e.getStyle(m(e)),10)||0)?"TRISTATE_DISABLED": -"TRISTATE_OFF"]:k}return k},exec:function(a){var b=a.getSelection(),b=b&&b.getRanges()[0],c;if(c=a.elementPath().contains(p))f.call(this,c,d);else for(b=b.createIterator(),a=a.config.enterMode,b.enforceRealBlocks=!0,b.enlargeBr=a!=CKEDITOR.ENTER_BR;c=b.getNextParagraph(a==CKEDITOR.ENTER_P?"p":"div");)c.isReadOnly()||f.call(this,c,d);return!0}}}}var a=CKEDITOR.plugins.indent,d=b.config.indentClasses;a.registerCommands(b,{indentblock:new c(b,"indentblock",!0),outdentblock:new c(b,"outdentblock")}); -CKEDITOR.tools.extend(c.prototype,a.specificDefinition.prototype,{context:{div:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,ul:1,ol:1,p:1,pre:1,table:1},classNameRegex:d?new RegExp("(?:^|\\s+)("+d.join("|")+")(?\x3d$|\\s)"):null})}})})();(function(){function w(f){function g(b){for(var e=c.startContainer,a=c.endContainer;e&&!e.getParent().equals(b);)e=e.getParent();for(;a&&!a.getParent().equals(b);)a=a.getParent();if(!e||!a)return!1;for(var d=[],h=!1;!h;)e.equals(a)&&(h=!0),d.push(e),e=e.getNext();if(1>d.length)return!1;e=b.getParents(!0);for(a=0;am;a++)h[a].indent+=e;e=CKEDITOR.plugins.list.arrayToList(h,q,null,f.config.enterMode,b.getDirection());if(!k.isIndent){var t;if((t=b.getParent())&&t.is("li"))for(var d=e.listNode.getChildren(), -r=[],l,a=d.count()-1;0<=a;a--)(l=d.getItem(a))&&l.is&&l.is("li")&&r.push(l)}e&&e.listNode.replace(b);if(r&&r.length)for(a=0;af[k-1].indent+1){g=f[k-1].indent+1-f[k].indent;for(h=f[k].indent;f[k]&&f[k].indent>=h;)f[k].indent+=g,k++;k--}var d=CKEDITOR.plugins.list.arrayToList(f,e,null,b.config.enterMode,m.root.getAttribute("dir")).listNode,a,p;c(!0);c();d.replace(m.root);b.fire("contentDomInvalidated")}function B(b,m){this.name=b;this.context=this.type=m;this.allowedContent= -m+" li";this.requiredContent=m}function E(b,m,e,c){for(var f,g;f=b[c?"getLast":"getFirst"](J);)(g=f.getDirection(1))!==m.getDirection(1)&&f.setAttribute("dir",g),f.remove(),e?f[c?"insertBefore":"insertAfter"](e):m.append(f,c)}function F(b){function m(e){var c=b[e?"getPrevious":"getNext"](u);c&&c.type==CKEDITOR.NODE_ELEMENT&&c.is(b.getName())&&(E(b,c,null,!e),b.remove(),b=c)}m();m(1)}function G(b){return b.type==CKEDITOR.NODE_ELEMENT&&(b.getName()in CKEDITOR.dtd.$block||b.getName()in CKEDITOR.dtd.$listItem)&& -CKEDITOR.dtd[b.getName()]["#"]}function C(b,m,e){b.fire("saveSnapshot");e.enlarge(CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS);var c=e.extractContents();m.trim(!1,!0);var f=m.createBookmark(),g=new CKEDITOR.dom.elementPath(m.startContainer),k=g.block,g=g.lastElement.getAscendant("li",1)||k,h=new CKEDITOR.dom.elementPath(e.startContainer),d=h.contains(CKEDITOR.dtd.$listItem),h=h.contains(CKEDITOR.dtd.$list);k?(k=k.getBogus())&&k.remove():h&&(k=h.getPrevious(u))&&z(k)&&k.remove();(k=c.getLast())&&k.type==CKEDITOR.NODE_ELEMENT&& -k.is("br")&&k.remove();(k=m.startContainer.getChild(m.startOffset))?c.insertBefore(k):m.startContainer.append(c);d&&(c=A(d))&&(g.contains(d)?(E(c,d.getParent(),d),c.remove()):g.append(c));for(;e.checkStartOfBlock()&&e.checkEndOfBlock();){h=e.startPath();c=h.block;if(!c)break;c.is("li")&&(g=c.getParent(),c.equals(g.getLast(u))&&c.equals(g.getFirst(u))&&(c=g));e.moveToPosition(c,CKEDITOR.POSITION_BEFORE_START);c.remove()}e=e.clone();c=b.editable();e.setEndAt(c,CKEDITOR.POSITION_BEFORE_END);e=new CKEDITOR.dom.walker(e); -e.evaluator=function(a){return u(a)&&!z(a)};(e=e.next())&&e.type==CKEDITOR.NODE_ELEMENT&&e.getName()in CKEDITOR.dtd.$list&&F(e);m.moveToBookmark(f);m.select();b.fire("saveSnapshot")}function A(b){return(b=b.getLast(u))&&b.type==CKEDITOR.NODE_ELEMENT&&b.getName()in v?b:null}var v={ol:1,ul:1},K=CKEDITOR.dom.walker.whitespaces(),H=CKEDITOR.dom.walker.bookmark(),u=function(b){return!(K(b)||H(b))},z=CKEDITOR.dom.walker.bogus();CKEDITOR.plugins.list={listToArray:function(b,m,e,c,f){if(!v[b.getName()])return[]; -c||(c=0);e||(e=[]);for(var g=0,k=b.getChildCount();g=k.$.documentMode&&l.append(k.createText(" ")),l.append(a.listNode),a=a.nextIndex;else if(-1== -r.indent&&!e&&g){v[g.getName()]?(l=r.element.clone(!1,!0),q!=g.getDirection(1)&&l.setAttribute("dir",q)):l=new CKEDITOR.dom.documentFragment(k);var d=g.getDirection(1)!=q,y=r.element,D=y.getAttribute("class"),z=y.getAttribute("style"),A=l.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT&&(c!=CKEDITOR.ENTER_BR||d||z||D),w,B=r.contents.length,x;for(g=0;gh.length)){l= -h[h.length-1].getNext();n=c.createElement(this.type);d.push(n);for(t=d=void 0;h.length;)d=h.shift(),t=c.createElement("li"),r=d,r.is("pre")||L.test(r.getName())||"false"==r.getAttribute("contenteditable")?d.appendTo(t):(d.copyAttributes(t),a&&d.getDirection()&&(t.removeStyle("direction"),t.removeAttribute("dir")),d.moveChildren(t),d.remove()),t.appendTo(n);a&&p&&n.setAttribute("dir",a);l?n.insertBefore(l):n.appendTo(g)}}else this.state==CKEDITOR.TRISTATE_ON&&v[a.root.getName()]&&I.call(this,b,a,k); -for(n=0;nc&&at.version?" ":J,f=a.hotNode&&a.hotNode.getText()==d&&a.element.equals(a.hotNode)&&a.lastCmdDirection===!!c;S(a,function(d){f&&a.hotNode&&a.hotNode.remove();d[c?"insertAfter":"insertBefore"](b);d.setAttributes({"data-cke-magicline-hot":1,"data-cke-magicline-dir":!!c});a.lastCmdDirection=!!c});t.ie||a.enterMode==CKEDITOR.ENTER_BR||a.hotNode.scrollIntoView();a.line.detach()}return function(b){b=b.getSelection().getStartElement(); -var e;b=b.getAscendant(Z,1);if(!aa(a,b)&&b&&!b.equals(a.editable)&&!b.contains(a.editable)){(e=P(b))&&"false"==e.getAttribute("contenteditable")&&(b=e);a.element=b;e=w(a,b,!c);var f;n(e)&&e.is(a.triggers)&&e.is(ma)&&(!w(a,e,!c)||(f=w(a,e,!c))&&n(f)&&f.is(a.triggers))?d(e):(f=O(a,b),n(f)&&(w(a,f,!c)?(b=w(a,f,!c))&&n(b)&&b.is(a.triggers)&&d(f):d(f)))}}}()}}function A(a,c){if(!c||c.type!=CKEDITOR.NODE_ELEMENT||!c.$)return!1;var d=a.line;return d.wrap.equals(c)||d.wrap.contains(c)}function n(a){return a&& -a.type==CKEDITOR.NODE_ELEMENT&&a.$}function u(a){if(!n(a))return!1;var c;(c=ba(a))||(n(a)?(c={left:1,right:1,center:1},c=!(!c[a.getComputedStyle("float")]&&!c[a.getAttribute("align")])):c=!1);return c}function ba(a){return!!{absolute:1,fixed:1}[a.getComputedStyle("position")]}function L(a,c){return n(c)?c.is(a.triggers):null}function aa(a,c){if(!c)return!1;for(var d=c.getParents(1),b=d.length;b--;)for(var e=a.tabuList.length;e--;)if(d[b].hasAttribute(a.tabuList[e]))return!0;return!1}function na(a, -c,d){c=c[d?"getLast":"getFirst"](function(b){return a.isRelevant(b)&&!b.is(oa)});if(!c)return!1;r(a,c);return d?c.size.top>a.mouse.y:c.size.bottom(a.inInlineMode?b.editable.top+b.editable.height/2:Math.min(b.editable.height,b.pane.height)/2),c=c[f?"getLast":"getFirst"](function(a){return!(E(a)||F(a))});if(!c)return null;A(a,c)&&(c=a.line.wrap[f?"getPrevious":"getNext"](function(a){return!(E(a)||F(a))})); -if(!n(c)||u(c)||!L(a,c))return null;r(a,c);return!f&&0<=c.size.top&&q(d.y,0,c.size.top+e)?(a=a.inInlineMode||0===b.scroll.y?C:x,new z([null,c,I,M,a])):f&&c.size.bottom<=b.pane.height&&q(d.y,c.size.bottom-e,b.pane.height)?(a=a.inInlineMode||q(c.size.bottom,b.pane.height-e,b.pane.height)?D:x,new z([c,null,da,M,a])):null}function ea(a){var c=a.mouse,d=a.view,b=a.triggerOffset,e=O(a);if(!e)return null;r(a,e);var b=Math.min(b,0|e.size.outerHeight/2),f=[],k,h;if(q(c.y,e.size.top-1,e.size.top+b))h=!1;else if(q(c.y, -e.size.bottom-b,e.size.bottom+1))h=!0;else return null;if(u(e)||na(a,e,h)||e.getParent().is(fa))return null;var g=w(a,e,!h);if(g){if(g&&g.type==CKEDITOR.NODE_TEXT)return null;if(n(g)){if(u(g)||!L(a,g)||g.getParent().is(fa))return null;f=[g,e][h?"reverse":"concat"]().concat([T,M])}}else e.equals(a.editable[h?"getLast":"getFirst"](a.isRelevant))?(H(a),h&&q(c.y,e.size.bottom-b,d.pane.height)&&q(e.size.bottom,d.pane.height-b,d.pane.height)?k=D:q(c.y,0,e.size.top+b)&&(k=C)):k=x,f=[null,e][h?"reverse": -"concat"]().concat([h?da:I,M,k,e.equals(a.editable[h?"getLast":"getFirst"](a.isRelevant))?h?D:C:x]);return 0 in f?new z(f):null}function U(a,c,d,b){for(var e=c.getDocumentPosition(),f={},k={},h={},g={},l=y.length;l--;)f[y[l]]=parseInt(c.getComputedStyle.call(c,"border-"+y[l]+"-width"),10)||0,h[y[l]]=parseInt(c.getComputedStyle.call(c,"padding-"+y[l]),10)||0,k[y[l]]=parseInt(c.getComputedStyle.call(c,"margin-"+y[l]),10)||0;d&&!b||N(a,b);g.top=e.y-(d?0:a.view.scroll.y);g.left=e.x-(d?0:a.view.scroll.x); -g.outerWidth=c.$.offsetWidth;g.outerHeight=c.$.offsetHeight;g.height=g.outerHeight-(h.top+h.bottom+f.top+f.bottom);g.width=g.outerWidth-(h.left+h.right+f.left+f.right);g.bottom=g.top+g.outerHeight;g.right=g.left+g.outerWidth;a.inInlineMode&&(g.scroll={top:c.$.scrollTop,left:c.$.scrollLeft});return v({border:f,padding:h,margin:k,ignoreScroll:d},g,!0)}function r(a,c,d){if(!n(c))return c.size=null;if(!c.size)c.size={};else if(c.size.ignoreScroll==d&&c.size.date>new Date-ga)return null;return v(c.size, -U(a,c,d),{date:+new Date},!0)}function H(a,c){a.view.editable=U(a,a.editable,c,!0)}function N(a,c){a.view||(a.view={});var d=a.view;if(!(!c&&d&&d.date>new Date-ga)){var b=a.win,d=b.getScrollPosition(),b=b.getViewPaneSize();v(a.view,{scroll:{x:d.x,y:d.y,width:a.doc.$.documentElement.scrollWidth-b.width,height:a.doc.$.documentElement.scrollHeight-b.height},pane:{width:b.width,height:b.height,bottom:b.height+d.y},date:+new Date},!0)}}function pa(a,c,d,b){for(var e=b,f=b,k=0,h=!1,g=!1,l=a.view.pane.height, -p=a.mouse;p.y+ke.left-f.x&&de.top-f.y&&cCKEDITOR.env.version,B=CKEDITOR.dtd,K={},I=128,da=64,T=32,M=16,C=4,D=2,x=1,J=" ",fa=B.$listItem,oa=B.$tableContent,ma=v({},B.$nonEditable,B.$empty),Z=B.$block,ga=100,Q="width:0px;height:0px;padding:0px;margin:0px;display:block;z-index:9999;color:#fff;position:absolute;font-size: 0px;line-height:0px;", -X=Q+"border-color:transparent;display:block;border-style:solid;",W="\x3cspan\x3e"+J+"\x3c/span\x3e";K[CKEDITOR.ENTER_BR]="br";K[CKEDITOR.ENTER_P]="p";K[CKEDITOR.ENTER_DIV]="div";z.prototype={set:function(a,c,d){this.properties=a+c+(d||x);return this},is:function(a){return(this.properties&a)==a}};var ha=function(){function a(a,d){var b=a.$.elementFromPoint(d.x,d.y);return b&&b.nodeType?new CKEDITOR.dom.element(b):null}return function(c,d,b){if(!c.mouse)return null;var e=c.doc,f=c.line.wrap;b=b||c.mouse; -var k=a(e,b);d&&A(c,k)&&(f.hide(),k=a(e,b),f.show());return!k||k.type!=CKEDITOR.NODE_ELEMENT||!k.$||t.ie&&9>t.version&&!c.boundary.equals(k)&&!c.boundary.contains(k)?null:k}}(),E=CKEDITOR.dom.walker.whitespaces(),F=CKEDITOR.dom.walker.nodeType(CKEDITOR.NODE_COMMENT),ia=function(){function a(a){var b=a.element,e,f,k;if(!n(b)||b.contains(a.editable)||b.isReadOnly())return null;k=pa(a,function(a,b){return!b.equals(a)},function(a,b){return ha(a,!0,b)},b);e=k.upper;f=k.lower;if(V(a,e,f))return k.set(T, -8);if(e&&b.contains(e))for(;!e.getParent().equals(b);)e=e.getParent();else e=b.getFirst(function(b){return c(a,b)});if(f&&b.contains(f))for(;!f.getParent().equals(b);)f=f.getParent();else f=b.getLast(function(b){return c(a,b)});if(!e||!f)return null;r(a,e);r(a,f);if(!q(a.mouse.y,e.size.top,f.size.bottom))return null;for(var b=Number.MAX_VALUE,h,g,l,p;f&&!f.equals(e)&&(g=e.getNext(a.isRelevant));)h=Math.abs(ka(a,e,g)-a.mouse.y),h|<\/font>)/,d=//,"$\x26"+f).replace(/[^>]*(?=<\/title>)/,"$\x26 \x26mdash; "+a.lang.preview.preview);else{var b="\x3cbody ",d=a.document&&a.document.getBody();d&&(d.getAttribute("id")&&(b+='id\x3d"'+d.getAttribute("id")+'" '),d.getAttribute("class")&&(b+='class\x3d"'+d.getAttribute("class")+'" '));b+="\x3e";g=a.config.docType+ -'\x3chtml dir\x3d"'+a.config.contentsLangDirection+'"\x3e\x3chead\x3e'+f+"\x3ctitle\x3e"+a.lang.preview.preview+"\x3c/title\x3e"+CKEDITOR.tools.buildStyleHtml(a.config.contentsCss)+"\x3c/head\x3e"+b+a.getData()+"\x3c/body\x3e\x3c/html\x3e"}f=640;b=420;d=80;try{var c=window.screen,f=Math.round(.8*c.width),b=Math.round(.7*c.height),d=Math.round(.1*c.width)}catch(k){}if(!1===a.fire("contentPreview",a={dataValue:g}))return!1;var c="",e;CKEDITOR.env.ie&&(window._cke_htmlToLoad=a.dataValue,e="javascript:void( (function(){document.open();"+ -("("+CKEDITOR.tools.fixDomain+")();").replace(/\/\/.*?\n/g,"").replace(/parent\./g,"window.opener.")+"document.write( window.opener._cke_htmlToLoad );document.close();window.opener._cke_htmlToLoad \x3d null;})() )",c="");CKEDITOR.env.gecko&&(window._cke_htmlToLoad=a.dataValue,c=CKEDITOR.getUrl(h+"preview.html"));c=window.open(c,null,"toolbar\x3dyes,location\x3dno,status\x3dyes,menubar\x3dyes,scrollbars\x3dyes,resizable\x3dyes,width\x3d"+f+",height\x3d"+b+",left\x3d"+d);CKEDITOR.env.ie&&c&&(c.location= -e);CKEDITOR.env.ie||CKEDITOR.env.gecko||(e=c.document,e.open(),e.write(a.dataValue),e.close());return!0}};CKEDITOR.plugins.add("preview",{init:function(a){a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(h=this.path,a.addCommand("preview",k),a.ui.addButton&&a.ui.addButton("Preview",{label:a.lang.preview.preview,command:"preview",toolbar:"document,40"}))}})})();CKEDITOR.plugins.add("print",{init:function(a){a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE&&(a.addCommand("print",CKEDITOR.plugins.print),a.ui.addButton&&a.ui.addButton("Print",{label:a.lang.print.toolbar,command:"print",toolbar:"document,50"}))}});CKEDITOR.plugins.print={exec:function(a){CKEDITOR.env.gecko?a.window.$.print():a.document.$.execCommand("Print")},canUndo:!1,readOnly:1,modes:{wysiwyg:1}};CKEDITOR.plugins.add("table",{requires:"dialog",init:function(a){function f(c){return CKEDITOR.tools.extend(c||{},{contextSensitive:1,refresh:function(c,b){this.setState(b.contains("table",1)?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED)}})}if(!a.blockless){var e=a.lang.table;a.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];"+(a.plugins.dialogadvtab? -"table"+a.plugins.dialogadvtab.allowedContent():""),requiredContent:"table",contentTransformations:[["table{width}: sizeToStyle","table[width]: sizeToAttribute"],["td: splitBorderShorthand"],[{element:"table",right:function(c){if(c.styles){var a;if(c.styles.border)a=CKEDITOR.tools.style.parse.border(c.styles.border);else if(CKEDITOR.env.ie&&8===CKEDITOR.env.version){var b=c.styles;b["border-left"]&&b["border-left"]===b["border-right"]&&b["border-right"]===b["border-top"]&&b["border-top"]===b["border-bottom"]&& -(a=CKEDITOR.tools.style.parse.border(b["border-top"]))}a&&a.style&&"solid"===a.style&&a.width&&0!==parseFloat(a.width)&&(c.attributes.border=1);"collapse"==c.styles["border-collapse"]&&(c.attributes.cellspacing=0)}}}]]}));a.addCommand("tableProperties",new CKEDITOR.dialogCommand("tableProperties",f()));a.addCommand("tableDelete",f({exec:function(a){var d=a.elementPath().contains("table",1);if(d){var b=d.getParent(),e=a.editable();1!=b.getChildCount()||b.is("td","th")||b.equals(e)||(d=b);a=a.createRange(); -a.moveToPosition(d,CKEDITOR.POSITION_BEFORE_START);d.remove();a.select()}}}));a.ui.addButton&&a.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");a.addMenuItems&&a.addMenuItems({table:{label:e.menu,command:"tableProperties",group:"table",order:5},tabledelete:{label:e.deleteTable,command:"tableDelete",group:"table",order:1}});a.on("doubleclick",function(a){a.data.element.is("table")&& -(a.data.dialog="tableProperties")});a.contextMenu&&a.contextMenu.addListener(function(){return{tabledelete:CKEDITOR.TRISTATE_OFF,table:CKEDITOR.TRISTATE_OFF}})}}});CKEDITOR.plugins.add("quicktable",{requires:"table,panelbutton,floatpanel",afterInit:function(f){var k,l;function i(a){return new CKEDITOR.dom.element(a,f.document)}function m(a,b){for(var c=i("table"),h=c.append(i("tbody")),e=0;e');for(var h=0;h");for(var e=0;e");b.push("")}b.push("
");return b.join("")}function j(a,b,c,h){for(var b=b.$.tBodies[0].rows,e=0;ed||0>g?this.panel.hide():((d>n-1||g>o-1)&&f.execCommand("table"),j(c,b,d+1,g+ -1),a.data.preventDefault(),a.data.stopPropagation())});return b},createMoreButton:function(){var a=new CKEDITOR.dom.element("a");a.setAttributes({_cke_focus:1,hidefocus:!0,title:f.lang.quicktable.more,href:'javascript:void("'+f.lang.quicktable.more+'")',role:"option"});a.addClass("cke_colormore");a.setText(f.lang.quicktable.more);a.setStyle("text-align","center");a.on("click",function(a){f.execCommand("table");a.data.preventDefault()});return a},onOpen:function(){j(this.caption,this.table,1,1)}})}});CKEDITOR.plugins.add("removeformat",{init:function(a){a.addCommand("removeFormat",CKEDITOR.plugins.removeformat.commands.removeformat);a.ui.addButton&&a.ui.addButton("RemoveFormat",{label:a.lang.removeformat.toolbar,command:"removeFormat",toolbar:"cleanup,10"})}}); -CKEDITOR.plugins.removeformat={commands:{removeformat:{exec:function(a){for(var h=a._.removeFormatRegex||(a._.removeFormatRegex=new RegExp("^(?:"+a.config.removeFormatTags.replace(/,/g,"|")+")$","i")),e=a._.removeAttributes||(a._.removeAttributes=a.config.removeFormatAttributes.split(",")),f=CKEDITOR.plugins.removeformat.filter,m=a.getSelection().getRanges(),n=m.createIterator(),p=function(a){return a.type==CKEDITOR.NODE_ELEMENT},c;c=n.getNextRange();){c.collapsed||c.enlarge(CKEDITOR.ENLARGE_ELEMENT); -var l=c.createBookmark(),b=l.startNode,d=l.endNode,k=function(b){for(var c=a.elementPath(b),e=c.elements,d=1,g;(g=e[d])&&!g.equals(c.block)&&!g.equals(c.blockLimit);d++)h.test(g.getName())&&f(a,g)&&b.breakParent(g)};k(b);if(d)for(k(d),b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT);b&&!b.equals(d);)if(b.isReadOnly()){if(b.getPosition(d)&CKEDITOR.POSITION_CONTAINS)break;b=b.getNext(p)}else k=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT),"img"==b.getName()&&b.data("cke-realelement")||!f(a,b)||(h.test(b.getName())? -b.remove(1):(b.removeAttributes(e),a.fire("removeFormatCleanup",b))),b=k;c.moveToBookmark(l)}a.forceNextSelectionCheck();a.getSelection().selectRanges(m)}}},filter:function(a,h){for(var e=a._.removeFormatFilters||[],f=0;fc.width&&(a.resize_minWidth=c.width);a.resize_minHeight>c.height&&(a.resize_minHeight=c.height);CKEDITOR.document.on("mousemove",f);CKEDITOR.document.on("mouseup",k);b.document&&(b.document.on("mousemove",f),b.document.on("mouseup",k));d.preventDefault&&d.preventDefault()});b.on("destroy", -function(){CKEDITOR.tools.removeFunction(q)});b.on("uiSpace",function(a){if("bottom"==a.data.space){var e="";h&&!p&&(e=" cke_resizer_horizontal");!h&&p&&(e=" cke_resizer_vertical");var c='\x3cspan id\x3d"'+r+'" class\x3d"cke_resizer'+e+" cke_resizer_"+g+'" title\x3d"'+CKEDITOR.tools.htmlEncode(b.lang.common.resize)+'" onmousedown\x3d"CKEDITOR.tools.callFunction('+q+', event)"\x3e'+("ltr"==g?"◢":"◣")+"\x3c/span\x3e";"ltr"==g&&"ltr"==e?a.data.html+=c:a.data.html=c+a.data.html}},b,null,100);b.on("maximize", -function(a){b.ui.space("resizer")[a.data==CKEDITOR.TRISTATE_ON?"hide":"show"]()})}}});(function(){var b={readOnly:1,modes:{wysiwyg:1,source:1},exec:function(a){if(a.fire("save")&&(a=a.element.$.form))try{a.submit()}catch(b){a.submit.click&&a.submit.click()}}};CKEDITOR.plugins.add("save",{init:function(a){a.elementMode==CKEDITOR.ELEMENT_MODE_REPLACE&&(a.addCommand("save",b).startDisabled=!a.element.$.form,a.ui.addButton&&a.ui.addButton("Save",{label:a.lang.save.toolbar,command:"save",toolbar:"document,10"}))}})})();CKEDITOR.plugins.add("scayt",{requires:"menubutton,dialog",tabToOpen:null,dialogName:"scaytDialog",onLoad:function(a){CKEDITOR.plugins.scayt.onLoadTimestamp=(new Date).getTime();"moono-lisa"==(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/scayt.css");CKEDITOR.document.appendStyleSheet(this.path+"dialogs/dialog.css")},init:function(a){var c=this,d=CKEDITOR.plugins.scayt;this.bindEvents(a);this.parseConfig(a);this.addRule(a);CKEDITOR.dialog.add(this.dialogName, -CKEDITOR.getUrl(this.path+"dialogs/options.js"));this.addMenuItems(a);var b=a.lang.scayt,e=CKEDITOR.env;a.ui.add("Scayt",CKEDITOR.UI_MENUBUTTON,{label:b.text_title,title:a.plugins.wsc?a.lang.wsc.title:b.text_title,modes:{wysiwyg:!(e.ie&&(8>e.version||e.quirks))},toolbar:"spellchecker,20",refresh:function(){var b=a.ui.instances.Scayt.getState();a.scayt&&(b=d.state.scayt[a.name]?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF);a.fire("scaytButtonState",b)},onRender:function(){var b=this;a.on("scaytButtonState", -function(a){void 0!==typeof a.data&&b.setState(a.data)})},onMenu:function(){var b=a.scayt;a.getMenuItem("scaytToggle").label=a.lang.scayt[b&&d.state.scayt[a.name]?"btn_disable":"btn_enable"];var c={scaytToggle:CKEDITOR.TRISTATE_OFF,scaytOptions:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytLangs:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytDict:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,scaytAbout:b?CKEDITOR.TRISTATE_OFF:CKEDITOR.TRISTATE_DISABLED,WSC:a.plugins.wsc?CKEDITOR.TRISTATE_OFF: -CKEDITOR.TRISTATE_DISABLED};a.config.scayt_uiTabs[0]||delete c.scaytOptions;a.config.scayt_uiTabs[1]||delete c.scaytLangs;a.config.scayt_uiTabs[2]||delete c.scaytDict;b&&!CKEDITOR.plugins.scayt.isNewUdSupported(b)&&(delete c.scaytDict,a.config.scayt_uiTabs[2]=0,CKEDITOR.plugins.scayt.alarmCompatibilityMessage());return c}});a.contextMenu&&a.addMenuItems&&(a.contextMenu.addListener(function(b,d){var h=a.scayt,k,e;h&&(e=h.getSelectionNode())&&(k=c.menuGenerator(a,e),h.showBanner("."+a.contextMenu._.definition.panel.className.split(" ").join(" ."))); -return k}),a.contextMenu._.onHide=CKEDITOR.tools.override(a.contextMenu._.onHide,function(b){return function(){var d=a.scayt;d&&d.hideBanner();return b.apply(this)}}))},addMenuItems:function(a){var c=this,d=CKEDITOR.plugins.scayt;a.addMenuGroup("scaytButton");for(var b=a.config.scayt_contextMenuItemsOrder.split("|"),e=0;ea.config.scayt_maxSuggestions)a.config.scayt_maxSuggestions=5;if(void 0===a.config.scayt_minWordLength||"number"!= -typeof a.config.scayt_minWordLength||1>a.config.scayt_minWordLength)a.config.scayt_minWordLength=4;if(void 0===a.config.scayt_customDictionaryIds||"string"!==typeof a.config.scayt_customDictionaryIds)a.config.scayt_customDictionaryIds="";if(void 0===a.config.scayt_userDictionaryName||"string"!==typeof a.config.scayt_userDictionaryName)a.config.scayt_userDictionaryName=null;if("string"===typeof a.config.scayt_uiTabs&&3===a.config.scayt_uiTabs.split(",").length){var d=[],b=[];a.config.scayt_uiTabs= -a.config.scayt_uiTabs.split(",");CKEDITOR.tools.search(a.config.scayt_uiTabs,function(a){1===Number(a)||0===Number(a)?(b.push(!0),d.push(Number(a))):b.push(!1)});null===CKEDITOR.tools.search(b,!1)?a.config.scayt_uiTabs=d:a.config.scayt_uiTabs=[1,1,1]}else a.config.scayt_uiTabs=[1,1,1];"string"!=typeof a.config.scayt_serviceProtocol&&(a.config.scayt_serviceProtocol=null);"string"!=typeof a.config.scayt_serviceHost&&(a.config.scayt_serviceHost=null);"string"!=typeof a.config.scayt_servicePort&&(a.config.scayt_servicePort= -null);"string"!=typeof a.config.scayt_servicePath&&(a.config.scayt_servicePath=null);a.config.scayt_moreSuggestions||(a.config.scayt_moreSuggestions="on");"string"!==typeof a.config.scayt_customerId&&(a.config.scayt_customerId="1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2");"string"!==typeof a.config.scayt_customPunctuation&&(a.config.scayt_customPunctuation="-");"string"!==typeof a.config.scayt_srcUrl&&(c=document.location.protocol,c=-1!=c.search(/https?:/)?c:"http:",a.config.scayt_srcUrl= -c+"//svc.webspellchecker.net/spellcheck31/lf/scayt3/ckscayt/ckscayt.js");"boolean"!==typeof CKEDITOR.config.scayt_handleCheckDirty&&(CKEDITOR.config.scayt_handleCheckDirty=!0);"boolean"!==typeof CKEDITOR.config.scayt_handleUndoRedo&&(CKEDITOR.config.scayt_handleUndoRedo=!0);CKEDITOR.config.scayt_handleUndoRedo=CKEDITOR.plugins.undo?CKEDITOR.config.scayt_handleUndoRedo:!1;"boolean"!==typeof a.config.scayt_multiLanguageMode&&(a.config.scayt_multiLanguageMode=!1);"object"!==typeof a.config.scayt_multiLanguageStyles&& -(a.config.scayt_multiLanguageStyles={});a.config.scayt_ignoreAllCapsWords&&"boolean"!==typeof a.config.scayt_ignoreAllCapsWords&&(a.config.scayt_ignoreAllCapsWords=!1);a.config.scayt_ignoreDomainNames&&"boolean"!==typeof a.config.scayt_ignoreDomainNames&&(a.config.scayt_ignoreDomainNames=!1);a.config.scayt_ignoreWordsWithMixedCases&&"boolean"!==typeof a.config.scayt_ignoreWordsWithMixedCases&&(a.config.scayt_ignoreWordsWithMixedCases=!1);a.config.scayt_ignoreWordsWithNumbers&&"boolean"!==typeof a.config.scayt_ignoreWordsWithNumbers&& -(a.config.scayt_ignoreWordsWithNumbers=!1);if(a.config.scayt_disableOptionsStorage){var c=CKEDITOR.tools.isArray(a.config.scayt_disableOptionsStorage)?a.config.scayt_disableOptionsStorage:"string"===typeof a.config.scayt_disableOptionsStorage?[a.config.scayt_disableOptionsStorage]:void 0,e="all options lang ignore-all-caps-words ignore-domain-names ignore-words-with-mixed-cases ignore-words-with-numbers".split(" "),f=["lang","ignore-all-caps-words","ignore-domain-names","ignore-words-with-mixed-cases", -"ignore-words-with-numbers"],g=CKEDITOR.tools.search,h=CKEDITOR.tools.indexOf;a.config.scayt_disableOptionsStorage=function(a){for(var b=[],d=0;d=parseInt(c)*Math.pow(10,d)}return c?Array(7).join(String.fromCharCode(8203)):String.fromCharCode(8203)}()}],onLoadTimestamp:"",state:{scayt:{},grayt:{}},warningCounter:0,suggestions:[],options:{disablingCommandExec:{source:!0,newpage:!0,templates:!0}, -data_attribute_name:"data-scayt-word",misspelled_word_class:"scayt-misspell-word",problem_grammar_data_attribute:"data-grayt-phrase",problem_grammar_class:"gramm-problem"},backCompatibilityMap:{scayt_service_protocol:"scayt_serviceProtocol",scayt_service_host:"scayt_serviceHost",scayt_service_port:"scayt_servicePort",scayt_service_path:"scayt_servicePath",scayt_customerid:"scayt_customerId"},alarmCompatibilityMessage:function(){5>this.warningCounter&&(console.warn("You are using the latest version of SCAYT plugin for CKEditor with the old application version. In order to have access to the newest features, it is recommended to upgrade the application version to latest one as well. Contact us for more details at support@webspellchecker.net."), -this.warningCounter+=1)},isNewUdSupported:function(a){return a.getUserDictionary?!0:!1},reloadMarkup:function(a){var c;a&&(c=a.getScaytLangList(),a.reloadMarkup?a.reloadMarkup():(this.alarmCompatibilityMessage(),c&&c.ltr&&c.rtl&&a.fire("startSpellCheck, startGrammarCheck")))},replaceOldOptionsNames:function(a){for(var c in a)c in this.backCompatibilityMap&&(a[this.backCompatibilityMap[c]]=a[c],delete a[c])},createScayt:function(a){var c=this,d=CKEDITOR.plugins.scayt;this.loadScaytLibrary(a,function(a){function e(a){return new SCAYT.CKSCAYT(a, -function(){},function(){})}var f=a.window&&a.window.getFrame()||a.editable();if(f){f={lang:a.config.scayt_sLang,container:f.$,customDictionary:a.config.scayt_customDictionaryIds,userDictionaryName:a.config.scayt_userDictionaryName,localization:a.langCode,customer_id:a.config.scayt_customerId,customPunctuation:a.config.scayt_customPunctuation,debug:a.config.scayt_debug,data_attribute_name:c.options.data_attribute_name,misspelled_word_class:c.options.misspelled_word_class,problem_grammar_data_attribute:c.options.problem_grammar_data_attribute, -problem_grammar_class:c.options.problem_grammar_class,"options-to-restore":a.config.scayt_disableOptionsStorage,focused:a.editable().hasFocus,ignoreElementsRegex:a.config.scayt_elementsToIgnore,ignoreGraytElementsRegex:a.config.grayt_elementsToIgnore,minWordLength:a.config.scayt_minWordLength,multiLanguageMode:a.config.scayt_multiLanguageMode,multiLanguageStyles:a.config.scayt_multiLanguageStyles,graytAutoStartup:a.config.grayt_autoStartup,charsToObserve:d.charsToObserve};a.config.scayt_serviceProtocol&& -(f.service_protocol=a.config.scayt_serviceProtocol);a.config.scayt_serviceHost&&(f.service_host=a.config.scayt_serviceHost);a.config.scayt_servicePort&&(f.service_port=a.config.scayt_servicePort);a.config.scayt_servicePath&&(f.service_path=a.config.scayt_servicePath);"boolean"===typeof a.config.scayt_ignoreAllCapsWords&&(f["ignore-all-caps-words"]=a.config.scayt_ignoreAllCapsWords);"boolean"===typeof a.config.scayt_ignoreDomainNames&&(f["ignore-domain-names"]=a.config.scayt_ignoreDomainNames);"boolean"=== -typeof a.config.scayt_ignoreWordsWithMixedCases&&(f["ignore-words-with-mixed-cases"]=a.config.scayt_ignoreWordsWithMixedCases);"boolean"===typeof a.config.scayt_ignoreWordsWithNumbers&&(f["ignore-words-with-numbers"]=a.config.scayt_ignoreWordsWithNumbers);var g;try{g=e(f)}catch(h){c.alarmCompatibilityMessage(),delete f.charsToObserve,g=e(f)}g.subscribe("suggestionListSend",function(a){for(var b={},d=[],c=0;cCKEDITOR.env.version),g=l?":not([contenteditable\x3dfalse]):not(.cke_show_blocks_off)":"",d,h;for(c=b=e=f="";d=a.pop();)h=a.length?",":"",c+=".cke_show_blocks "+d+g+h,e+=".cke_show_blocks.cke_contents_ltr "+d+g+h,f+=".cke_show_blocks.cke_contents_rtl "+d+g+h,b+=".cke_show_blocks "+d+g+"{background-image:url("+CKEDITOR.getUrl(k+"images/block_"+d+".png")+")}";CKEDITOR.addCss((c+"{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px}").concat(b,e+"{background-position:top left;padding-left:8px}", -f+"{background-position:top right;padding-right:8px}"));l||CKEDITOR.addCss(".cke_show_blocks [contenteditable\x3dfalse],.cke_show_blocks .cke_show_blocks_off{border:none;padding-top:0;background-image:none}.cke_show_blocks.cke_contents_rtl [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_rtl .cke_show_blocks_off{padding-right:0}.cke_show_blocks.cke_contents_ltr [contenteditable\x3dfalse],.cke_show_blocks.cke_contents_ltr .cke_show_blocks_off{padding-left:0}")},init:function(a){function c(){b.refresh(a)} -if(!a.blockless){var b=a.addCommand("showblocks",k);b.canUndo=!1;a.config.startupOutlineBlocks&&b.setState(CKEDITOR.TRISTATE_ON);a.ui.addButton&&a.ui.addButton("ShowBlocks",{label:a.lang.showblocks.toolbar,command:"showblocks",toolbar:"tools,20"});a.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)});a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE&&(a.on("focus",c),a.on("blur",c));a.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)})}}})})();(function(){var f={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(a){this.toggleState();this.refresh(a)},refresh:function(a){if(a.document){var b=this.state==CKEDITOR.TRISTATE_ON?"attachClass":"removeClass";a.editable()[b]("cke_show_borders")}}};CKEDITOR.plugins.add("showborders",{modes:{wysiwyg:1},onLoad:function(){var a;a=(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(a)},init:function(a){var b=a.addCommand("showborders",f);b.canUndo=!1;!1!==a.config.startupShowBorders&&b.setState(CKEDITOR.TRISTATE_ON);a.on("mode",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)},null,null,100);a.on("contentDom",function(){b.state!=CKEDITOR.TRISTATE_DISABLED&&b.refresh(a)});a.on("removeFormatCleanup",function(d){d=d.data;a.getCommand("showborders").state==CKEDITOR.TRISTATE_ON&&d.is("table")&&(!d.hasAttribute("border")|| -0>=parseInt(d.getAttribute("border"),10))&&d.addClass("cke_show_border")})},afterInit:function(a){var b=a.dataProcessor;a=b&&b.dataFilter;b=b&&b.htmlFilter;a&&a.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"],c=parseInt(a.border,10);c&&!(0>=c)||b&&-1!=b.indexOf("cke_show_border")||(a["class"]=(b||"")+" cke_show_border")}}});b&&b.addRules({elements:{table:function(a){a=a.attributes;var b=a["class"];b&&(a["class"]=b.replace("cke_show_border","").replace(/\s{2}/," ").replace(/^\s+|\s+$/, -""))}}})}});CKEDITOR.on("dialogDefinition",function(a){var b=a.data.name;if("table"==b||"tableProperties"==b)if(a=a.data.definition,b=a.getContents("info").get("txtBorder"),b.commit=CKEDITOR.tools.override(b.commit,function(a){return function(b,c){a.apply(this,arguments);var e=parseInt(this.getValue(),10);c[!e||0>=e?"addClass":"removeClass"]("cke_show_border")}}),a=(a=a.getContents("advanced"))&&a.get("advCSSClasses"))a.setup=CKEDITOR.tools.override(a.setup,function(a){return function(){a.apply(this, -arguments);this.setValue(this.getValue().replace(/cke_show_border/,""))}}),a.commit=CKEDITOR.tools.override(a.commit,function(a){return function(b,c){a.apply(this,arguments);parseInt(c.getAttribute("border"),10)||c.addClass("cke_show_border")}})})})();CKEDITOR.plugins.add("smiley",{requires:"dialog",init:function(a){a.config.smiley_path=a.config.smiley_path||this.path+"images/";a.addCommand("smiley",new CKEDITOR.dialogCommand("smiley",{allowedContent:"img[alt,height,!src,title,width]",requiredContent:"img"}));a.ui.addButton&&a.ui.addButton("Smiley",{label:a.lang.smiley.toolbar,command:"smiley",toolbar:"insert,50"});CKEDITOR.dialog.add("smiley",this.path+"dialogs/smiley.js")}});CKEDITOR.config.smiley_images="regular_smile.png sad_smile.png wink_smile.png teeth_smile.png confused_smile.png tongue_smile.png embarrassed_smile.png omg_smile.png whatchutalkingabout_smile.png angry_smile.png angel_smile.png shades_smile.png devil_smile.png cry_smile.png lightbulb.png thumbs_down.png thumbs_up.png heart.png broken_heart.png kiss.png envelope.png".split(" "); -CKEDITOR.config.smiley_descriptions="smiley;sad;wink;laugh;frown;cheeky;blush;surprise;indecision;angry;angel;cool;devil;crying;enlightened;no;yes;heart;broken heart;kiss;mail".split(";");(function(){CKEDITOR.plugins.add("sourcearea",{init:function(a){function d(){var a=e&&this.equals(CKEDITOR.document.getActive());this.hide();this.setStyle("height",this.getParent().$.clientHeight+"px");this.setStyle("width",this.getParent().$.clientWidth+"px");this.show();a&&this.focus()}if(a.elementMode!=CKEDITOR.ELEMENT_MODE_INLINE){var f=CKEDITOR.plugins.sourcearea;a.addMode("source",function(e){var b=a.ui.space("contents").getDocument().createElement("textarea");b.setStyles(CKEDITOR.tools.extend({width:CKEDITOR.env.ie7Compat? -"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"},CKEDITOR.tools.cssVendorPrefix("tab-size",a.config.sourceAreaTabSize||4)));b.setAttribute("dir","ltr");b.addClass("cke_source").addClass("cke_reset").addClass("cke_enable_context_menu");a.ui.space("contents").append(b);b=a.editable(new c(a,b));b.setData(a.getData(1));CKEDITOR.env.ie&&(b.attachListener(a,"resize",d,b),b.attachListener(CKEDITOR.document.getWindow(),"resize",d,b),CKEDITOR.tools.setTimeout(d,0,b));a.fire("ariaWidget", -this);e()});a.addCommand("source",f.commands.source);a.ui.addButton&&a.ui.addButton("Source",{label:a.lang.sourcearea.toolbar,command:"source",toolbar:"mode,10"});a.on("mode",function(){a.getCommand("source").setState("source"==a.mode?CKEDITOR.TRISTATE_ON:CKEDITOR.TRISTATE_OFF)});var e=CKEDITOR.env.ie&&9==CKEDITOR.env.version}}});var c=CKEDITOR.tools.createClass({base:CKEDITOR.editable,proto:{setData:function(a){this.setValue(a);this.status="ready";this.editor.fire("dataReady")},getData:function(){return this.getValue()}, -insertHtml:function(){},insertElement:function(){},insertText:function(){},setReadOnly:function(a){this[(a?"set":"remove")+"Attribute"]("readOnly","readonly")},detach:function(){c.baseProto.detach.call(this);this.clearCustomData();this.remove()}}})})(); -CKEDITOR.plugins.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(c){"wysiwyg"==c.mode&&c.fire("saveSnapshot");c.getCommand("source").setState(CKEDITOR.TRISTATE_DISABLED);c.setMode("source"==c.mode?"wysiwyg":"source")},canUndo:!1}}};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(a){var c=this;CKEDITOR.dialog.add("specialchar",this.path+"dialogs/specialchar.js");a.addCommand("specialchar", -{exec:function(){var b=a.langCode,b=c.availableLangs[b]?b:c.availableLangs[b.replace(/-.*/,"")]?b.replace(/-.*/,""):"en";CKEDITOR.scriptLoader.load(CKEDITOR.getUrl(c.path+"dialogs/lang/"+b+".js"),function(){CKEDITOR.tools.extend(a.lang.specialchar,c.langEntries[b]);a.openDialog("specialchar")})},modes:{wysiwyg:1},canUndo:!1});a.ui.addButton&&a.ui.addButton("SpecialChar",{label:a.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(c){var l=c.config,g=c.lang.stylescombo,f={},k=[],m=[];c.on("stylesSet",function(a){if(a=a.data.styles){for(var b,h,d,e=0,n=a.length;e|\+|~)/g," ");a=a.replace(/\[[^\]]*/g,"");a=a.replace(/#[^\s]*/g,"");a=a.replace(/\:{1,2}[^\s]*/g,"");a=a.replace(/\s+/g," ");a=a.split(" ");b=[];for(g=0;g=g)for(b=this.getNextSourceNode(k,CKEDITOR.NODE_ELEMENT);b;){if(b.isVisible()&&0===b.getTabIndex()){d=b;break}b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT)}else for(b=this.getDocument().getBody().getFirst();b=b.getNextSourceNode(!1,CKEDITOR.NODE_ELEMENT);){if(!f)if(!c&&b.equals(this)){if(c=!0,k){if(!(b=b.getNextSourceNode(!0,CKEDITOR.NODE_ELEMENT)))break;f=1}}else c&&!this.contains(b)&& -(f=1);if(b.isVisible()&&!(0>(a=b.getTabIndex()))){if(f&&a==g){d=b;break}a>g&&(!d||!e||a(b=a.getTabIndex())))if(0>=g){if(f&&0===b){d=a;break}b>e&&(d=a,e=b)}else{if(f&&b==g){d=a;break}be)&&(d=a,e=b)}}d&&d.focus()};(function(){function q(d,f){function b(a){return f?f.contains(a)&&a.getAscendant("table",!0).equals(f):!0}function c(b){0b)b=e}return b}function u(d,f){for(var b=D(d)?d:q(d),c=b[0].getAscendant("table"), -e=w(b,1),b=w(b),a=f?e:b,g=CKEDITOR.tools.buildTableMap(c),c=[],e=[],b=[],k=g.length,h=0;hh?new CKEDITOR.dom.element(g[0][h+1]):k&&-1!==g[0][k-1].cellIndex?new CKEDITOR.dom.element(g[0][k-1]):new CKEDITOR.dom.element(c.$.parentNode);l.length==d&&(b[0].moveToPosition(c,CKEDITOR.POSITION_AFTER_END), -b[0].select(),c.remove());return k}function t(d,f){var b=d.getStartElement().getAscendant({td:1,th:1},!0);if(b){var c=b.clone();c.appendBogus();f?c.insertBefore(b):c.insertAfter(b)}}function z(d){if(d instanceof CKEDITOR.dom.selection){var f=d.getRanges(),b=q(d),c=b[0]&&b[0].getAscendant("table"),e;a:{var a=0;e=b.length-1;for(var g={},k,h;k=b[a++];)CKEDITOR.dom.element.setMarker(g,k,"delete_cell",!0);for(a=0;k=b[a++];)if((h=k.getPrevious())&&!h.getCustomData("delete_cell")||(h=k.getNext())&&!h.getCustomData("delete_cell")){CKEDITOR.dom.element.clearAllMarkers(g); -e=h;break a}CKEDITOR.dom.element.clearAllMarkers(g);a=b[0].getParent();(a=a.getPrevious())?e=a.getLast():(a=b[e].getParent(),e=(a=a.getNext())?a.getChild(0):null)}d.reset();for(d=b.length-1;0<=d;d--)z(b[d]);e?p(e,!0):c&&(f[0].moveToPosition(c,CKEDITOR.POSITION_BEFORE_START),f[0].select(),c.remove())}else d instanceof CKEDITOR.dom.element&&(f=d.getParent(),1==f.getChildCount()?f.remove():d.remove())}function p(d,f){var b=d.getDocument(),c=CKEDITOR.document;CKEDITOR.env.ie&&10==CKEDITOR.env.version&& -(c.focus(),b.focus());b=new CKEDITOR.dom.range(b);b["moveToElementEdit"+(f?"End":"Start")](d)||(b.selectNodeContents(d),b.collapse(f?!1:!0));b.select(!0)}function A(d,f,b){d=d[f];if("undefined"==typeof b)return d;for(f=0;d&&fc.length)||(e=d.getCommonAncestor())&&e.type==CKEDITOR.NODE_ELEMENT&&e.is("table"))return!1;var a;d=c[0];e=d.getAscendant("table"); -var g=CKEDITOR.tools.buildTableMap(e),k=g.length,h=g[0].length,l=d.getParent().$.rowIndex,m=A(g,l,d);if(f){var n;try{var p=parseInt(d.getAttribute("rowspan"),10)||1;a=parseInt(d.getAttribute("colspan"),10)||1;n=g["up"==f?l-p:"down"==f?l+p:l]["left"==f?m-a:"right"==f?m+a:m]}catch(x){return!1}if(!n||d.$==n)return!1;c["up"==f||"left"==f?"unshift":"push"](new CKEDITOR.dom.element(n))}f=d.getDocument();var r=l,p=n=0,u=!b&&new CKEDITOR.dom.documentFragment(f),w=0;for(f=0;f=h?d.removeAttribute("rowSpan"):d.$.rowSpan=n;n>=k?d.removeAttribute("colSpan"): -d.$.colSpan=p;b=new CKEDITOR.dom.nodeList(e.$.rows);c=b.count();for(f=c-1;0<=f;f--)e=b.getItem(f),e.$.cells.length||(e.remove(),c++);return d}function C(d,f){var b=q(d);if(1k){c.insertBefore(new CKEDITOR.dom.element(m));break}else m=null;m||e.append(c)}else for(h=l=1,e=c.clone(),e.insertAfter(c),e.append(c=b.clone()),m=A(a,g),k=0;kv);x++){y[u+x]||(y[u+x]=[]);for(var C=0;C=w)break}}return y};(function(){CKEDITOR.plugins.add("templates",{requires:"dialog",init:function(a){CKEDITOR.dialog.add("templates",CKEDITOR.getUrl(this.path+"dialogs/templates.js"));a.addCommand("templates",new CKEDITOR.dialogCommand("templates"));a.ui.addButton&&a.ui.addButton("Templates",{label:a.lang.templates.button,command:"templates",toolbar:"doctools,10"})}});var c={},f={};CKEDITOR.addTemplates=function(a,d){c[a]=d};CKEDITOR.getTemplates=function(a){return c[a]};CKEDITOR.loadTemplates=function(a,d){for(var e= -[],b=0,c=a.length;b=this.strokesLimit;this.typing||(this.hasUndo=this.typing=!0,this.hasRedo=!1,this.onChange());b?(d=0,this.editor.fire("saveSnapshot")):this.editor.fire("change");this.strokesRecorded[c]= -d;this.previousKeyGroup=c},keyGroupChanged:function(a){return e.getKeyGroup(a)!=this.previousKeyGroup},reset:function(){this.snapshots=[];this.index=-1;this.currentImage=null;this.hasRedo=this.hasUndo=!1;this.locked=null;this.resetType()},resetType:function(){this.strokesRecorded=[0,0];this.typing=!1;this.previousKeyGroup=-1},refreshState:function(){this.hasUndo=!!this.getNextImage(!0);this.hasRedo=!!this.getNextImage(!1);this.resetType();this.onChange()},save:function(a,b,c){var d=this.editor;if(this.locked|| -"ready"!=d.status||"wysiwyg"!=d.mode)return!1;var e=d.editable();if(!e||"ready"!=e.status)return!1;e=this.snapshots;b||(b=new f(d));if(!1===b.contents)return!1;if(this.currentImage)if(b.equalsContent(this.currentImage)){if(a||b.equalsSelection(this.currentImage))return!1}else!1!==c&&d.fire("change");e.splice(this.index+1,e.length-this.index-1);e.length==this.limit&&e.shift();this.index=e.push(b)-1;this.currentImage=b;!1!==c&&this.refreshState();return!0},restoreImage:function(a){var b=this.editor, -c;a.bookmarks&&(b.focus(),c=b.getSelection());this.locked={level:999};this.editor.loadSnapshot(a.contents);a.bookmarks?c.selectBookmarks(a.bookmarks):CKEDITOR.env.ie&&(c=this.editor.document.getBody().$.createTextRange(),c.collapse(!0),c.select());this.locked=null;this.index=a.index;this.currentImage=this.snapshots[this.index];this.update();this.refreshState();b.fire("change")},getNextImage:function(a){var b=this.snapshots,c=this.currentImage,d;if(c)if(a)for(d=this.index-1;0<=d;d--){if(a=b[d],!c.equalsContent(a))return a.index= -d,a}else for(d=this.index+1;d=this.undoManager.strokesLimit&&(this.undoManager.type(a.keyCode,!0),this.keyEventsStack.resetInputs())}},onKeyup:function(a){var b=this.undoManager; -a=a.data.getKey();var c=this.keyEventsStack.getTotalInputs();this.keyEventsStack.remove(a);if(!(e.ieFunctionalKeysBug(a)&&this.lastKeydownImage&&this.lastKeydownImage.equalsContent(new f(b.editor,!0))))if(0/i),-1!=e)){var g=b.search(/<\/body>/i);b=b.substring(e+6,g)}e=b;a.countSpacesAsChars||(e=b.replace(/\s/g,"").replace(/ /g,""));e=a.countLineBreaks?e.replace(/(\r\n|\n|\r)/gm,""):e.replace(/(\r\n|\n|\r)/gm,"").replace(/ /gi, -" ");e=t(e).replace(/^([\t\r\n]*)$/,"");if(a.countBytesAsChars){var g=0,d=e.length,h;e=String(e||"");for(h=0;h]+)>)/ig,"").replace(/^\s*$[\n\r]{1,}/gm,"++").split("++").length),a.showWordCount&&(e=w(d)));f=x.replace("%paragraphs%",f);a.showRemaining?(f=0<=a.maxCharCount?f.replace("%charCount%",a.maxCharCount-g):f.replace("%charCount%",g),f=0<=a.maxWordCount?f.replace("%wordCount%",a.maxWordCount- -e):f.replace("%wordCount%",e)):f=f.replace("%wordCount%",e).replace("%charCount%",g);(b.config.wordcount||(b.config.wordcount={})).wordCount=e;(b.config.wordcount||(b.config.wordcount={})).charCount=g;CKEDITOR.env.gecko?document.getElementById(h(b)).innerHTML=f:document.getElementById(h(b)).innerText=f;if(g==l&&e==m){if(g==a.maxCharCount||e==a.maxWordCount)p=c.getSnapshot();return!0}f=e-m;d=g-l;m=e;l=g;-1==m&&(m=e);-1==l&&(l=g);-1a.maxWordCount&&0a.maxCharCount&& -0a.maxCharCount&& --1a.maxWordCount&&-1a.maxCharCount&&a.hardLimit&&(k.isVisible()||k.show(),b.cancel());0a.maxWordCount&&a.hardLimit&&(k.isVisible()||k.show(),b.cancel())}},c,null,100);c.on("afterPaste",function(a){n(a.editor)}, -c,null,100);c.on("blur",function(){},c,null,300)}});CKEDITOR.plugins.add("wsc",{requires:"dialog",parseApi:function(a){a.config.wsc_onFinish="function"===typeof a.config.wsc_onFinish?a.config.wsc_onFinish:function(){};a.config.wsc_onClose="function"===typeof a.config.wsc_onClose?a.config.wsc_onClose:function(){}},parseConfig:function(a){a.config.wsc_customerId=a.config.wsc_customerId||CKEDITOR.config.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk";a.config.wsc_customDictionaryIds=a.config.wsc_customDictionaryIds|| -CKEDITOR.config.wsc_customDictionaryIds||"";a.config.wsc_userDictionaryName=a.config.wsc_userDictionaryName||CKEDITOR.config.wsc_userDictionaryName||"";a.config.wsc_customLoaderScript=a.config.wsc_customLoaderScript||CKEDITOR.config.wsc_customLoaderScript;a.config.wsc_interfaceLang=a.config.wsc_interfaceLang;CKEDITOR.config.wsc_cmd=a.config.wsc_cmd||CKEDITOR.config.wsc_cmd||"spell";CKEDITOR.config.wsc_version="v4.3.0-master-d769233";CKEDITOR.config.wsc_removeGlobalVariable=!0},onLoad:function(a){"moono-lisa"== -(CKEDITOR.skinName||a.config.skin)&&CKEDITOR.document.appendStyleSheet(this.path+"skins/"+CKEDITOR.skin.name+"/wsc.css")},init:function(a){var b=CKEDITOR.env;this.parseConfig(a);this.parseApi(a);a.addCommand("checkspell",new CKEDITOR.dialogCommand("checkspell")).modes={wysiwyg:!CKEDITOR.env.opera&&!CKEDITOR.env.air&&document.domain==window.location.hostname&&!(b.ie&&(8>b.version||b.quirks))};"undefined"==typeof a.plugins.scayt&&a.ui.addButton&&a.ui.addButton("SpellChecker",{label:a.lang.wsc.toolbar, -click:function(a){var b=a.elementMode==CKEDITOR.ELEMENT_MODE_INLINE?a.container.getText():a.document.getBody().getText();(b=b.replace(/\s/g,""))?a.execCommand("checkspell"):alert("Nothing to check!")},toolbar:"spellchecker,10"});CKEDITOR.dialog.add("checkspell",this.path+(CKEDITOR.env.ie&&7>=CKEDITOR.env.version?"dialogs/wsc_ie.js":window.postMessage?"dialogs/wsc.js":"dialogs/wsc_ie.js"))}});(function(){function m(a){function f(a){var b=!1;g.attachListener(g,"keydown",function(){var d=c.getBody().getElementsByTag(a);if(!b){for(var e=0;eCKEDITOR.env.version&&b.enterMode!=CKEDITOR.ENTER_DIV&&f("div");if(CKEDITOR.env.webkit||CKEDITOR.env.ie&&10this.$.offsetHeight){var d=b.createRange();d[33==c?"moveToElementEditStart":"moveToElementEditEnd"](this);d.select();a.data.preventDefault()}});CKEDITOR.env.ie&&this.attachListener(c,"blur",function(){try{c.$.selection.empty()}catch(a){}});CKEDITOR.env.iOS&&this.attachListener(c,"touchend",function(){a.focus()});d=b.document.getElementsByTag("title").getItem(0); -d.data("cke-title",d.getText());CKEDITOR.env.ie&&(b.document.$.title=this._.docTitle);CKEDITOR.tools.setTimeout(function(){"unloaded"==this.status&&(this.status="ready");b.fire("contentDom");this._.isPendingFocus&&(b.focus(),this._.isPendingFocus=!1);setTimeout(function(){b.fire("dataReady")},0)},0,this)}function n(a){function f(){var c;a.editable().attachListener(a,"selectionChange",function(){var d=a.getSelection().getSelectedElement();d&&(c&&(c.detachEvent("onresizestart",b),c=null),d.$.attachEvent("onresizestart", -b),c=d.$)})}function b(a){a.returnValue=!1}if(CKEDITOR.env.gecko)try{var c=a.document.$;c.execCommand("enableObjectResizing",!1,!a.config.disableObjectResizing);c.execCommand("enableInlineTableEditing",!1,!a.config.disableNativeTableHandles)}catch(d){}else CKEDITOR.env.ie&&11>CKEDITOR.env.version&&a.config.disableObjectResizing&&f(a)}function p(){var a=[];if(8<=CKEDITOR.document.$.documentMode){a.push("html.CSS1Compat [contenteditable\x3dfalse]{min-height:0 !important}");var f=[],b;for(b in CKEDITOR.dtd.$removeEmpty)f.push("html.CSS1Compat "+ -b+"[contenteditable\x3dfalse]");a.push(f.join(",")+"{display:inline-block}")}else CKEDITOR.env.gecko&&(a.push("html{height:100% !important}"),a.push("img:-moz-broken{-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"));a.push("html{cursor:text;*cursor:auto}");a.push("img,input,textarea{cursor:default}");return a.join("\n")}var l;CKEDITOR.plugins.add("wysiwygarea",{init:function(a){a.config.fullPage&&a.addFeature({allowedContent:"html head title; style [media,type]; body (*)[id]; meta link [*]", -requiredContent:"body"});a.addMode("wysiwyg",function(f){function b(b){b&&b.removeListener();a.editable(new l(a,d.$.contentWindow.document.body));a.setData(a.getData(1),f)}var c="document.open();"+(CKEDITOR.env.ie?"("+CKEDITOR.tools.fixDomain+")();":"")+"document.close();",c=CKEDITOR.env.air?"javascript:void(0)":CKEDITOR.env.ie&&!CKEDITOR.env.edge?"javascript:void(function(){"+encodeURIComponent(c)+"}())":"",d=CKEDITOR.dom.element.createFromHtml('\x3ciframe src\x3d"'+c+'" frameBorder\x3d"0"\x3e\x3c/iframe\x3e'); -d.setStyles({width:"100%",height:"100%"});d.addClass("cke_wysiwyg_frame").addClass("cke_reset");c=a.ui.space("contents");c.append(d);var e=CKEDITOR.env.ie&&!CKEDITOR.env.edge||CKEDITOR.env.gecko;if(e)d.on("load",b);var g=a.title,h=a.fire("ariaEditorHelpLabel",{}).label;g&&(CKEDITOR.env.ie&&h&&(g+=", "+h),d.setAttribute("title",g));if(h){var g=CKEDITOR.tools.getNextId(),k=CKEDITOR.dom.element.createFromHtml('\x3cspan id\x3d"'+g+'" class\x3d"cke_voice_label"\x3e'+h+"\x3c/span\x3e");c.append(k,1);d.setAttribute("aria-describedby", -g)}a.on("beforeModeUnload",function(a){a.removeListener();k&&k.remove()});d.setAttributes({tabIndex:a.tabIndex,allowTransparency:"true"});!e&&b();a.fire("ariaWidget",d)})}});CKEDITOR.editor.prototype.addContentsCss=function(a){var f=this.config,b=f.contentsCss;CKEDITOR.tools.isArray(b)||(f.contentsCss=b?[b]:[]);f.contentsCss.push(a)};l=CKEDITOR.tools.createClass({$:function(){this.base.apply(this,arguments);this._.frameLoadedHandler=CKEDITOR.tools.addFunction(function(a){CKEDITOR.tools.setTimeout(m, -0,this,a)},this);this._.docTitle=this.getWindow().getFrame().getAttribute("title")},base:CKEDITOR.editable,proto:{setData:function(a,f){var b=this.editor;if(f)this.setHtml(a),this.fixInitialSelection(),b.fire("dataReady");else{this._.isLoadingData=!0;b._.dataStore={id:1};var c=b.config,d=c.fullPage,e=c.docType,g=CKEDITOR.tools.buildStyleHtml(p()).replace(/